aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/paren-init31.C
blob: 3600c4993a58e1e61ef465f064ec828ec5275ae0 (plain)
1
2
3
4
5
6
7
8
9
10
// PR c++/92812
// P1975R0
// { dg-do compile { target c++20 } }
// Test we don't lifetime-extend the int temporary.

struct A { const int &r; };
A a(42);
auto a2 = static_cast<A>(42);

// { dg-final { scan-assembler-not "_ZGR" } }