PR c++/86728 - C variadic generic lambda.
[official-gcc.git] / gcc / testsuite / g++.dg / init / reference1.C
blob7ce5f90fb4cf2f667f84b4ae59909aeab037a703
1 // { dg-do compile }
2 // This code used to be accepted but it is invalid as there is no
3 // value initialization of a reference type.
4 // PR c++/36695
6 int main()
8   typedef int& T;
9   T a = T();  // { dg-error "value-initialization of reference" }