2015-03-20 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/48324
* g++.dg/cpp0x/constexpr-48324.C: New.
From-SVN: r221539
+2015-03-20 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/48324
+ * g++.dg/cpp0x/constexpr-48324.C: New.
+
2015-03-20 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/48453
--- /dev/null
+// PR c++/48324
+// { dg-do compile { target c++11 } }
+
+struct S {
+ const int val;
+ constexpr S(int i) : val(i) { }
+};
+
+constexpr const int& to_ref(int i) {
+ return S(i).val; // { dg-warning "reference to temporary" }
+}
+
+constexpr int ary[to_ref(98)] = { }; // { dg-error "not an integral" }