diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-05 10:32:23 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-05 10:32:23 +0000 |
commit | fe410b3e0f7de0376d98b922113c80f9ab4bd192 (patch) | |
tree | 2907bc726434f732f093ecd43d5f5ba62ac08265 /gcc/testsuite/gcc.dg/pr35440.c | |
parent | 941f2a0d21995a3e06f340891a639c4462850312 (diff) | |
download | gcc-fe410b3e0f7de0376d98b922113c80f9ab4bd192.tar.gz |
2008-04-05 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r133930
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@133932 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr35440.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr35440.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr35440.c b/gcc/testsuite/gcc.dg/pr35440.c new file mode 100644 index 00000000000..796d7e0a9ae --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr35440.c @@ -0,0 +1,12 @@ +/* PR c/35440 */ +/* { dg-do compile } */ +/* { dg-options "-std=gnu99" } */ + +struct A {}; +struct B { int i; char j[2]; }; + +void foo (void) +{ + (struct A){}(); /* { dg-error "called object" } */ + (struct B){ .i = 2, .j[1] = 1 }(); /* { dg-error "called object" } */ +} |