diff options
Diffstat (limited to 'gcc/testsuite/gcc.apple/i386-deep-branch-predict-1.c')
-rw-r--r-- | gcc/testsuite/gcc.apple/i386-deep-branch-predict-1.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.apple/i386-deep-branch-predict-1.c b/gcc/testsuite/gcc.apple/i386-deep-branch-predict-1.c new file mode 100644 index 00000000000..b0b3765299a --- /dev/null +++ b/gcc/testsuite/gcc.apple/i386-deep-branch-predict-1.c @@ -0,0 +1,18 @@ +/* APPLE LOCAL file Radar 4010498 et. al. */ +/* { dg-do compile { target i?86-*-darwin* } } */ +/* { dg-options "-march=pentium4" } */ +/* { dg-final { scan-assembler "86.get_pc_thunk" } } */ +#define TEST_STRING "test string %d" +#define TEST_STRING0 "test string 0" +#include <stdlib.h> +#include <stdio.h> +int globalvar_i; +main (int argc, char *argv[]) +{ + char buf[90]; + + sprintf (buf, TEST_STRING, globalvar_i); + if (strcmp (buf, TEST_STRING0)) + abort (); + exit (0); +} |