| 1 |
/* { dg-do run { target ia32 } } */ |
| 2 |
/* { dg-require-effective-target sse2_runtime } */ |
| 3 |
/* { dg-options "-O2 -msse2 -mstv -W" } */ |
| 4 |
|
| 5 |
#include <stdlib.h> |
| 6 |
#include "pr95021-1.c" |
| 7 |
|
| 8 |
jmp_buf buf; |
| 9 |
|
| 10 |
long long *target_p; |
| 11 |
long long *c; |
| 12 |
|
| 13 |
int count; |
| 14 |
|
| 15 |
__attribute__ ((noclone, noinline)) |
| 16 |
void |
| 17 |
foo (long long x) |
| 18 |
{ |
| 19 |
if (x != *c) |
| 20 |
abort (); |
| 21 |
if (!count) |
| 22 |
{ |
| 23 |
count++; |
| 24 |
longjmp (buf, 1); |
| 25 |
} |
| 26 |
} |
| 27 |
|
| 28 |
int |
| 29 |
main () |
| 30 |
{ |
| 31 |
long long val = 30; |
| 32 |
long long local = 0; |
| 33 |
target_p = &val; |
| 34 |
c = &local; |
| 35 |
bar (); |
| 36 |
if (val != local) |
| 37 |
abort (); |
| 38 |
return 0; |
| 39 |
} |