| 1 |
/* { 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) |
| 25 |
#if __cplusplus <= 201402L |
| 26 |
throw (B,A) // { dg-warning "deprecated" "" { target { c++11 && { ! c++17 } } } } |
| 27 |
#endif |
| 28 |
{ |
| 29 |
aligned i; |
| 30 |
|
| 31 |
if (check_int (&i, __alignof__(i)) != i) |
| 32 |
abort (); |
| 33 |
|
| 34 |
if (i != 20 || j != 1 || k != 2 || m != 3 || n != 4 || o != 5) |
| 35 |
abort (); |
| 36 |
|
| 37 |
throw A(); |
| 38 |
} |
| 39 |
|
| 40 |
int |
| 41 |
main() |
| 42 |
{ |
| 43 |
try { foo (1, 2, 3, 4, 5); } |
| 44 |
catch (A& a) { } |
| 45 |
return 0; |
| 46 |
} |