| 1 |
// PR c++/103401 |
| 2 |
// { dg-do compile { target c++23 } } |
| 3 |
|
| 4 |
void f1 (decltype(auto(0))); |
| 5 |
void f2 (decltype(auto{0})); |
| 6 |
void f3 (int = auto(42)); |
| 7 |
void f4 (int = auto{42}); |
| 8 |
void f5 (decltype(auto(0)) = auto(42)); |
| 9 |
void f6 (auto (x)); |
| 10 |
void f7 (int[auto(10)]); |
| 11 |
void f8 (int[auto{10}]); |
| 12 |
void f9 (auto[auto{10}]); |
| 13 |
void f10 (auto); |
| 14 |
void f11 (int x, decltype(x) y); |
| 15 |
void f12 (int[sizeof(auto{10})]); |
| 16 |
void f13 (int[sizeof(auto(10))]); |
| 17 |
void f14 (int[__extension__ alignof(auto{10})]); |
| 18 |
void f15 (int[__extension__ alignof(auto(10))]); |
| 19 |
|
| 20 |
void |
| 21 |
g () |
| 22 |
{ |
| 23 |
int a[2]; |
| 24 |
f1 (1); |
| 25 |
f2 (1); |
| 26 |
f3 (); |
| 27 |
f3 (1); |
| 28 |
f4 (); |
| 29 |
f4 (1); |
| 30 |
f5 (); |
| 31 |
f5 (1); |
| 32 |
f6 ('a'); |
| 33 |
f7 (&a[0]); |
| 34 |
f8 (&a[0]); |
| 35 |
f9 (&a[0]); |
| 36 |
f10 (1); |
| 37 |
f11 (1, 2); |
| 38 |
f12 (&a[0]); |
| 39 |
f13 (&a[0]); |
| 40 |
f14 (&a[0]); |
| 41 |
f15 (&a[0]); |
| 42 |
} |