diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/c-c++-common/pr33193.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/c-c++-common/pr33193.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/pr33193.c b/gcc-4.9/gcc/testsuite/c-c++-common/pr33193.c new file mode 100644 index 000000000..2d1929848 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/c-c++-common/pr33193.c @@ -0,0 +1,19 @@ +/* PR c/33193 */ +/* { dg-do compile } */ + +struct a {float x, y; }; + +float f(struct a b) +{ + /* The error messages here are different between C and C++, so just + make sure we get an error. */ + float x = __real b; /* { dg-error "" } */ + float y = __imag b; /* { dg-error "" } */ + return x / y; +} +int f1(int *b) +{ + float x = __imag b; /* { dg-error "wrong type argument" } */ + float y = __real b; /* { dg-error "wrong type argument" } */ + return x - y; +} |