gcc/testsuite/g++.dg/DRs/dr2387-aux.cc
raw| 1 | // DR 2387 |
| 2 | |
| 3 | template <int N> |
| 4 | extern const int a; |
| 5 | template <int N> |
| 6 | static const int b = N; |
| 7 | template <int N> |
| 8 | extern const int c; |
| 9 | template <int N> |
| 10 | extern const volatile int d; |
| 11 | template <int N> |
| 12 | extern const int e; |
| 13 | extern const int *pa, *pb, *pc, *pe; |
| 14 | extern const volatile int *pd; |
| 15 | |
| 16 | int |
| 17 | main () |
| 18 | { |
| 19 | if (pa != &a <42> |
| 20 | || pb == &b <42> |
| 21 | || pc != &c <42> |
| 22 | || pd != &d <42> |
| 23 | || pe != &e <43>) |
| 24 | __builtin_abort (); |
| 25 | } |