From: Andrew Pinski Date: Thu, 16 Apr 2009 17:07:06 +0000 (-0700) Subject: re PR c++/28766 (compound literal expression vs templates) X-Git-Tag: releases/gcc-4.5.0~6524 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee85b983e960ea39820303980b27646b56b678c7;p=thirdparty%2Fgcc.git re PR c++/28766 (compound literal expression vs templates) 2009-04-16 Andrew Pinski PR C++/28766 * g++.dg/ext/complit11.C: New testcase. From-SVN: r146203 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 00964103e756..fcc05cb7db86 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-04-16 Andrew Pinski + + PR C++/28766 + * g++.dg/ext/complit11.C: New testcase. + 2009-04-15 Le-Chun Wu PR c++/39551 diff --git a/gcc/testsuite/g++.dg/ext/complit11.C b/gcc/testsuite/g++.dg/ext/complit11.C new file mode 100644 index 000000000000..a2487552e692 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/complit11.C @@ -0,0 +1,15 @@ +// { dg-do compile } + +struct A { int i; }; + +template +void foo() +{ + ((struct A) { 0 }).i += 1; +} + +void g(void) +{ + foo<0>(); +} +