]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/57573 ([C++1y] bogus "taking address of temporary" error)
authorPaolo Carlini <paolo.carlini@oracle.com>
Thu, 26 Jun 2014 19:38:36 +0000 (19:38 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 26 Jun 2014 19:38:36 +0000 (19:38 +0000)
2014-06-26  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/57573
* g++.dg/template/pr57573.C: New.

From-SVN: r212052

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

index 3d0c9ae61430ca6a11e3d8a245eda3409e094215..8c00352422541c16b2bd40e2b81cc271127e4a2d 100644 (file)
@@ -1,3 +1,8 @@
+2014-06-26  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/57573
+       * g++.dg/template/pr57573.C: New.
+
 2014-06-26  Jan Hubicka  <hubicka@ucw.cz>
 
        * gcc.dg/tree-ssa/interposition.c: New testcase.
diff --git a/gcc/testsuite/g++.dg/template/pr57573.C b/gcc/testsuite/g++.dg/template/pr57573.C
new file mode 100644 (file)
index 0000000..1344511
--- /dev/null
@@ -0,0 +1,13 @@
+// PR c++/57573
+
+struct A { };
+struct B { A a; };
+
+void f(A*) { }
+
+template<class T>
+void g()
+{
+  B b;
+  f(&(b.a));
+}