gcc/testsuite/g++.dg/pr67876.C
raw| 1 | // PR c++/67876 - [6 Regression] ICE when compiling Firefox 38 |
| 2 | // Caused by a patch for c/66516 - missing diagnostic on taking |
| 3 | // the address of a builtin function |
| 4 | // { dg-do compile } |
| 5 | |
| 6 | template <class T, void (&F)(T*)> |
| 7 | struct S { }; |
| 8 | |
| 9 | extern void foo (int*); |
| 10 | |
| 11 | template <class T, void (&F)(T*)> |
| 12 | void bar (S<T, F>&s) { } |
| 13 | |
| 14 | S<int, foo> s; |
| 15 | |
| 16 | void foobar (S<int, foo> &s) { bar (s); } |