Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / gen-attrs-81.C
blob150c2087e7a7e8af3b745920a7919be1e91e4ff5
1 // { dg-do compile { target c++11 } }
3 void
4 foo (int n)
6   auto a = new int [n] [[gnu::deprecated]];                             // { dg-warning "attributes ignored on outermost array type in new expression" }
7   auto b = new int [n] [[gnu::deprecated]] [42] [[]] [1] [[]];          // { dg-warning "attributes ignored on outermost array type in new expression" }
8   auto c = new int [n] [[]] [42] [[gnu::deprecated]] [1] [[gnu::deprecated]];
9   delete[] b;
10   delete[] a;