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-thiscall-1.C] - Blame information for rev 715

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

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

powered by: WebSVN 2.1.0

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