https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80331
--- Comment #10 from Marc Glisse ---
(In reply to AK from comment #9)
> can't repro this with gcc 12.1 Seems like this is fixed?
No. As stated in other comments, it still reproduces with a longer string (or
with -D_GLIBCXX_USE_CXX11_ABI=0).
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80331
--- Comment #9 from AK ---
can't repro this with gcc 12.1 Seems like this is fixed?
https://godbolt.org/z/e6n94zK4E
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80331
--- Comment #8 from Jonathan Wakely ---
(In reply to Andrew Pinski from comment #7)
> With -std=c++20 -O2 I get better code than just -std=c++17 -O2:
> _34 = operator new (24);
> __builtin_memcpy (_34, "a ", 23);
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80331
--- Comment #7 from Andrew Pinski ---
With -std=c++20 -O2 I get better code than just -std=c++17 -O2:
_34 = operator new (24);
__builtin_memcpy (_34, "a ", 23);
MEM[(char_type &)_34 + 23] = 0;
operator delete (_34,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80331
Andrew Pinski changed:
What|Removed |Added
Last reconfirmed||2022-01-07
Resolution|DUPLICATE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80331
Bug 80331 depends on bug 23383, which changed state.
Bug 23383 Summary: builtin array operator new is not marked with malloc
attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23383
What|Removed |Added
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80331
Markus Trippelsdorf changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80331
Andrew Pinski changed:
What|Removed |Added
Depends on||23383
--- Comment #4 from Andrew Pinski
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80331
--- Comment #3 from Marc Glisse ---
(In reply to Marc Glisse from comment #2)
> I didn't check if those are the only blockers in this case...
Looks like they are indeed the only blockers, since we optimize the below just
fine. So, known issue
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80331
--- Comment #2 from Marc Glisse ---
If you replace "a" with something longer (size>16 when counting the last '\0'),
it does reproduce. I'd say this is a dup of 2 known issues:
- the compiled part of libstdc++ prevents optimization (maybe
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80331
Markus Trippelsdorf changed:
What|Removed |Added
CC||trippels at gcc dot gnu.org
---
11 matches
Mail list logo