diff options
author | Jason Merrill <jason@redhat.com> | 2011-03-11 11:49:41 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-03-11 11:49:41 -0500 |
commit | e8d6ec55fd0e42332ef3014312c5b139c20d0fa8 (patch) | |
tree | 2f7ae9f6f328255d6116b239ee49e367364f369e /gcc/cp/decl.c | |
parent | a758fd670cbf0935c6fa6cac3336b184f5c3c92a (diff) | |
download | gcc-e8d6ec55fd0e42332ef3014312c5b139c20d0fa8.tar.gz |
re PR c++/47808 ([C++0x] internal compiler error: in tsubst_copy_and_build, at cp/pt.c:13326)
PR c++/47808
* decl.c (compute_array_index_type): Discard folding
if it didn't produce a constant.
From-SVN: r170878
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 93c184845f9..f9d90ad3258 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -7523,6 +7523,8 @@ compute_array_index_type (tree name, tree size, tsubst_flags_t complain) } size = maybe_constant_value (size); + if (!TREE_CONSTANT (size)) + size = osize; } if (error_operand_p (size)) |