OSDN Git Service

PR c++/54325
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / other / component1.C
1 // { dg-do compile }
2
3 // Copyright (C) 2001, 2002 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 28 Dec 2001 <nathan@codesourcery.com>
5
6 // PR 5123. ICE
7
8 struct C {
9   template<class T> void f(T);
10   void g ();
11   void g (int);
12 };
13
14 void Foo () {
15   C c;
16
17   (c.g) ();
18   (c.f) (1);
19   
20   (c.f<int>) (2);
21
22   c.g;                  // { dg-error "statement cannot resolve" "" }
23   c.f;                  // { dg-error "statement cannot resolve" "" }
24   c.f<int>;             // { dg-error "statement cannot resolve" "" }
25   
26   c.g == 1;             // { dg-error "invalid" "" }
27   c.f == 1;             // { dg-error "invalid" "" }
28   c.f<int> == 1;        // { dg-error "invalid" "" }
29 }