OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [eh/] [alias1.C] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// { 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.  */
6
 
7
extern "C" {
8
void exit (int) __attribute__ ((noreturn));
9
}
10
 
11
int i_glob = 42;
12
int *p0 = &i_glob;
13
typedef int **ipp;
14
 
15
void
16
g (int i)
17
{
18
  if (!i_glob)
19
    exit ((__SIZE_TYPE__) & i);
20
}
21
 
22
static void
23
h ()
24
{
25
  throw &p0;
26
}
27
 
28
int
29
main()
30
{
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;
42
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.