e29b76d42d0699623513b8c4641b52d033f5e249
[gcc.git] / gcc / testsuite / g++.dg / template / dependent-expr1.C
1 // { dg-do compile }
2
3 // Copyright (C) 2003 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 30 Jun 2003 <nathan@codesourcery.com>
5
6 // PR c++ 9779. ICE
7
8 struct I
9 {
10 };
11
12 void Foo (int);
13 namespace std
14 {
15 template <typename X>
16 void Baz (I *x)
17 {
18 Foo (sizeof (I));
19 Foo (sizeof (x));
20 Foo (__alignof__ (I));
21 Foo (__alignof__ (x));
22 Foo (x->~I ());
23 // Foo (typeid (I));
24 Foo (delete x); // { dg-error "" }
25 Foo (delete[] x); // { dg-error "" }
26 Foo (throw x); // { dg-error "" }
27 }
28
29 }