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>
Baz(I * 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 ()); // { dg-error "" }
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 }
30