Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/paren-init31.C

raw
1 // PR c++/92812
2 // P1975R0
3 // { dg-do compile { target c++20 } }
4 // Test we don't lifetime-extend the int temporary.
5
6 struct A { const int &r; };
7 A a(42);
8 auto a2 = static_cast<A>(42);
9
10 // { dg-final { scan-assembler-not "_ZGR" } }