| 1 |
// { dg-do compile } |
| 2 |
// { dg-options "-fabi-version=2 -fabi-compat-version=2" } |
| 3 |
|
| 4 |
// Copyright (C) 2003 Free Software Foundation, Inc. |
| 5 |
// Contributed by Nathan Sidwell 15 Dec 2003 <[email protected]> |
| 6 |
|
| 7 |
// PR 9043 |
| 8 |
// mangled array types in templates |
| 9 |
|
| 10 |
template <int I> void f(int (*)[2]) {} |
| 11 |
template <int I> void g(int (*)[I+2]) {} |
| 12 |
|
| 13 |
static const int I=1; |
| 14 |
static const int J=2; |
| 15 |
|
| 16 |
template void f<1>(int (*)[2]); |
| 17 |
// { dg-final { scan-assembler "\n_?_Z1fILi1EEvPA2_i\[: \t\n\]" } } |
| 18 |
template void g<1>(int (*)[3]); |
| 19 |
// { dg-final { scan-assembler "\n_?_Z1gILi1EEvPAplT_Li2E_i\[: \t\n\]" } } |