]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/28766 (compound literal expression vs templates)
authorAndrew Pinski <pinskia@gmail.com>
Thu, 16 Apr 2009 17:07:06 +0000 (10:07 -0700)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Thu, 16 Apr 2009 17:07:06 +0000 (10:07 -0700)
2009-04-16  Andrew Pinski  <pinskia@gmail.com>

        PR C++/28766
        * g++.dg/ext/complit11.C: New testcase.

From-SVN: r146203

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/complit11.C [new file with mode: 0644]

index 00964103e75653785821141ed78756042d77792a..fcc05cb7db8621d34dac65d94e72a2d16a506412 100644 (file)
@@ -1,3 +1,8 @@
+2009-04-16  Andrew Pinski  <pinskia@gmail.com>
+
+       PR C++/28766
+       * g++.dg/ext/complit11.C: New testcase.
+
 2009-04-15  Le-Chun Wu  <lcwu@google.com>
 
        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 (file)
index 0000000..a248755
--- /dev/null
@@ -0,0 +1,15 @@
+// { dg-do compile }
+
+struct A { int i; };
+
+template<int t>
+void foo()
+{
+    ((struct A) { 0 }).i += 1;
+}
+
+void g(void)
+{
+  foo<0>();
+}
+