aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/paren-init6.C
blob: 96a3284452857e96dfb58f4305e91b56336cc7eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
// { dg-do compile { target c++20 } }

// Test that we don't perform lifetime extension for () init.

struct A {
  int a;
  int&& r;
};

int f();
A a(1, f());

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