diff options
Diffstat (limited to 'gcc-4.8/gcc/testsuite/gcc.c-torture/execute/pr60062.c')
-rw-r--r-- | gcc-4.8/gcc/testsuite/gcc.c-torture/execute/pr60062.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/gcc.c-torture/execute/pr60062.c b/gcc-4.8/gcc/testsuite/gcc.c-torture/execute/pr60062.c new file mode 100644 index 000000000..62973d458 --- /dev/null +++ b/gcc-4.8/gcc/testsuite/gcc.c-torture/execute/pr60062.c @@ -0,0 +1,25 @@ +/* PR target/60062 */ + +int a; + +static void +foo (const char *p1, int p2) +{ + if (__builtin_strcmp (p1, "hello") != 0) + __builtin_abort (); +} + +static void +bar (const char *p1) +{ + if (__builtin_strcmp (p1, "hello") != 0) + __builtin_abort (); +} + +__attribute__((optimize (0))) int +main () +{ + foo ("hello", a); + bar ("hello"); + return 0; +} |