summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/crash41.C
blob: 9a440b0761eb66a5e986a0a25d31bd1c19fbde08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// PR c++/22464

template<typename T>
void do_something(const T* A) // { dg-error "declared" }
{ 
  struct helper_t{ 
    helper_t() {  
      A[0]; // { dg-error "use" }
    }
  } helper;
}

void sub1() {
  double A[7];
  do_something (A);
}