diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-23 11:00:27 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-23 11:00:27 +0000 |
commit | bd992fe5d55b910f8090731b362d1b7f6c72e917 (patch) | |
tree | e44e86d90275e1bd95ec240c0b97e8b9f05d5f35 /gcc/testsuite/gcc.dg/pr45750.c | |
parent | d1e6b747c60b6745784efeb8bf5405fc427f303e (diff) | |
download | gcc-bd992fe5d55b910f8090731b362d1b7f6c72e917.tar.gz |
2010-09-23 Richard Guenther <rguenther@suse.de>
PR middle-end/45750
* gimplify.c (gimplify_expr): Properly pass on GS_ERROR when
gimplifying MEM_REF.
* gcc.dg/pr45750.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164555 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr45750.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr45750.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr45750.c b/gcc/testsuite/gcc.dg/pr45750.c new file mode 100644 index 00000000000..22c471b7070 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr45750.c @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options "-O" } */ + +struct S +{ + int i; +}; + +int invalid[] = 0; /* { dg-error "invalid initializer" } */ + +void foo (void) +{ + if (((struct S *)undeclared)->i); /* { dg-error "undeclared" } */ +} + +/* { dg-message "reported only once" "" { target *-*-* } 13 } */ |