https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124121

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2026-02-16
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
                 CC|                            |rguenth at gcc dot gnu.org

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #3)
> (In reply to Jan Schultke from comment #1)
> > The std::from_range constructor is even worse
> > (https://compiler-explorer.com/z/EexY77zKc):
> > 
> > std::inplace_vector<char, 4> f() {
> >   constexpr std::array elements{'a', 'b', 'c'};
> >   return { std::from_range, elements };
> 
> 
> In this case we don't optimize around the inline-asm:
>   D.60698._M_size = 0;
>   __asm__ __volatile__("" : "=g" __q_7, "=m" MEM <char[0:D.69984]>
> [(char[0:D.69846] *)&D.60698] : "0" &D.60698.D.59887._M_elems, "m" MEM
> <char[0:D.69984]> [(char[0:D.69846] *)&D.60698]);
>   _11 = D.60698._M_size;

inline-asm with memory defs are full barriers on GIMPLE btw.  For DSE
in this case.

start_lifetime_as - you get what you deserve ...  I'd avoid it like a plague in
libstdc++.

Not sure what inplace_vector is for ...

Reply via email to