[PR c++/84702] ICE with default tmpl arg of overload set
[official-gcc.git] / gcc / testsuite / g++.dg / eh / alias1.C
blobe6af3831712effae30c0912363c4b85dea5562fb
1 // { dg-do run }
2 // { dg-options "-O3" }
3 /* PR c++/28139: disjoint alias sets for the store from
4    expand_start_catch_block than for loading P result in P being loaded
5    before it is initialized for sh-elf.  */
7 extern "C" {
8 void exit (int) __attribute__ ((noreturn));
11 int i_glob = 42;
12 int *p0 = &i_glob;
13 typedef int **ipp;
15 void
16 g (int i)
18   if (!i_glob)
19     exit ((__SIZE_TYPE__) & i);
22 static void
23 h ()
25   throw &p0;
28 int
29 main()
31   g (42);
32   try
33     {
34      h ();
35     }
36   catch (const ipp &p)
37     {
38       if (**p != 42)
39         exit (1);
40     }
41   return 0;