| 1 |
/* { dg-do compile { target { ! ia32 } } } */ |
| 2 |
/* { dg-options "-O2 -fcf-protection -mharden-sls=indirect-jmp" } */ |
| 3 |
|
| 4 |
struct _Unwind_Context _Unwind_Resume_or_Rethrow_this_context; |
| 5 |
|
| 6 |
void offset (int); |
| 7 |
|
| 8 |
struct _Unwind_Context { |
| 9 |
void *reg[7]; |
| 10 |
} _Unwind_Resume_or_Rethrow() { |
| 11 |
struct _Unwind_Context cur_contextcur_context = |
| 12 |
_Unwind_Resume_or_Rethrow_this_context; |
| 13 |
offset(0); |
| 14 |
__builtin_eh_return ((__INTPTR_TYPE__) offset, 0); |
| 15 |
} |
| 16 |
|
| 17 |
/* { dg-final { scan-assembler "jmp\[ \t\]+\\*%rcx" } } */ |
| 18 |
/* { dg-final { scan-assembler-times "int3" 1 } } */ |