aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2012-09-13 11:14:08 -0400
committerJason Merrill <jason@gcc.gnu.org>2012-09-13 11:14:08 -0400
commit9c7de5c6bc56ced54ec98abb81c3e3fcec4bc10b (patch)
treeddf15cc5e037bbe09b8d5ead5a4f5a50e0012e42 /gcc/cp
parentafcf5b8e90cde4d5e61785464c3928fb9c965499 (diff)
downloadgcc-9c7de5c6bc56ced54ec98abb81c3e3fcec4bc10b.zip
gcc-9c7de5c6bc56ced54ec98abb81c3e3fcec4bc10b.tar.gz
gcc-9c7de5c6bc56ced54ec98abb81c3e3fcec4bc10b.tar.bz2
re PR c++/53839 ([C++11] internal compiler error: in adjust_temp_type, at cp/semantics.c:6391)
PR c++/53839 * semantics.c (cxx_eval_indirect_ref): If we aren't looking for an address, make sure the value is constant. From-SVN: r191263
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/semantics.c6
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 6d135a3..55b80c8 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,9 @@
2012-09-13 Jason Merrill <jason@redhat.com>
+ PR c++/53839
+ * semantics.c (cxx_eval_indirect_ref): If we aren't looking for an
+ address, make sure the value is constant.
+
PR c++/54511
* pt.c (tsubst_decl) [VAR_DECL]: Handle DECL_ANON_UNION_VAR_P.
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index a6cdfb5..d19ff1c 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -7474,7 +7474,11 @@ cxx_eval_indirect_ref (const constexpr_call *call, tree t,
}
if (r == NULL_TREE)
- return t;
+ {
+ if (!addr)
+ VERIFY_CONSTANT (t);
+ return t;
+ }
return r;
}