1// { dg-do run  }
2struct S
3{
4  template <class T>
5  void f(T (&i)[7])
6    {}
7
8  void g()
9    {
10      int i[] = {1, 2, 3, 4, 5, 6, 7};
11      f(i);
12      int j[7];
13      f(j);
14    }
15};
16
17struct foo {
18  template <typename T, int N>
19  static T* array_end(T(&array)[N]) { return &array[N]; }
20};
21
22struct X
23{
24  template <class T1>
25  void f(const T1&) {}
26};
27
28int main(int ac, char* av[]) {
29  S s;
30  s.g();
31  int i[] = {1,2,3,4,5};
32  int* e = foo::array_end(i);
33  X x;
34  x.f("hello");
35}
36
37