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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [stackalign/] [eh-global-1.C] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
/* { dg-do run } */
2
/* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */
3
 
4
#include "check.h"
5
 
6
#ifndef ALIGNMENT
7
#define ALIGNMENT       64
8
#endif
9
 
10
typedef int aligned __attribute__((aligned(ALIGNMENT)));
11
 
12
int global;
13
 
14
class Base {};
15
 
16
struct A : virtual public Base
17
{
18
  A() {}
19
};
20
 
21
struct B {};
22
 
23
void
24
foo (void) throw (B,A)
25
{
26
  aligned i;
27
 
28
  if (check_int (&i,  __alignof__(i)) != i)
29
    abort ();
30
 
31
  throw A();
32
}
33
 
34
int
35
main()
36
{
37
  try { foo (); }
38
  catch (A& a) { }
39
  return 0;
40
}

powered by: WebSVN 2.1.0

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