2017-07-11 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51270
* g++.dg/warn/Wreturn-local-addr-3.C: New.
From-SVN: r250140
+2017-07-11 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51270
+ * g++.dg/warn/Wreturn-local-addr-3.C: New.
+
2017-07-11 Carl Love <cel@us.ibm.com>
* gcc.target/powerpc/builtins-2-p9-runnable.c: Add new file with
--- /dev/null
+// PR c++/51270
+// { dg-options "-O2" }
+
+const int& f(long l)
+{
+ const int& i = l;
+ return i; // { dg-warning "address of local variable" }
+}