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

Sam James <sjames at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|DUPLICATE                   |---
                 CC|                            |jakub at gcc dot gnu.org
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=126848
             Status|RESOLVED                    |UNCONFIRMED

--- Comment #4 from Sam James <sjames at gcc dot gnu.org> ---
$ diff -u <(g++ a.cxx -o a -std=gnu++23 -fdump-tree-optimized=- 2>&1)  <(g++
a.cxx -o a -std=gnu++26 -fdump-tree-optimized=- 2>&1)
...
@@ -134,10 +124,10 @@

   <bb 2> :
   abc = 123;
-  ABC_RETURNER ={v} {CLOBBER(bob)};
+  ABC_RETURNER = .DEFERRED_INIT (8, 3, &"ABC_RETURNER"[0]);
   ABC_RETURNER.__abc = &abc;
-  c ={v} {CLOBBER(bob)};
-  c.D.92806 = ABC_RETURNER;
+  c = .DEFERRED_INIT (8, 3, &"c"[0]);
+  c.D.99935 = ABC_RETURNER;
   _17 = std::operator<< <std::char_traits<char> > (&cerr, "c(): ");
   _1 = _17;
   _2 = composed<main()::<lambda()> >::operator()<composed<main()::<lambda()>
>&> (&c);

I indeed don't see the behaviour I'd expect but I'm not a C++ expert, so will
see what others say.

Reply via email to