aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/other/error6.C
blob: 9b403c7207bc20e4b0a400d5cabffc9de46eb648 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-do compile }
// Make sure we emit a decent error message when trying to mangle an
//  expression not supported by the C++ ABI due to a defect.

template <int N>
struct A {};

struct B
{
  static int foo(void);
};

template <class T>
A<sizeof(T::foo())> func(void);

int main()
{
  func<B>();  // { dg-error "sorry, unimplemented" }
}