diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/pr70877.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr70877.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr70877.c b/gcc/testsuite/gcc.target/i386/pr70877.c new file mode 100644 index 00000000000..4269e84daff --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr70877.c @@ -0,0 +1,14 @@ +/* { dg-do compile { target { ! x32 } } } */ +/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ + +int foo(int); + +typedef struct { + double d; + int a; +} str_t; + +void bar(double d, int i, str_t s) +{ + d = ((double (*) (int)) foo) (i); /* { dg-warning "function called through a non-compatible type" } */ +} |