gcc/testsuite/g++.old-deja/g++.pt/dynarray.C
raw| 1 | // { dg-do assemble } |
| 2 | // { dg-options "" } |
| 3 | // Origin: Theo Papadopoulo <[email protected]> |
| 4 | |
| 5 | inline const unsigned& f(unsigned const& a) { |
| 6 | return a; |
| 7 | } |
| 8 | |
| 9 | template <class T> |
| 10 | void |
| 11 | g(const unsigned n) |
| 12 | { |
| 13 | double D[f(n)]; |
| 14 | } |
| 15 | |
| 16 | template <class T,class U> |
| 17 | void g(unsigned const int) { } |
| 18 | |
| 19 | int main() |
| 20 | { |
| 21 | g<double>(18); |
| 22 | } |