diff options
author | Jason Merrill <jason@redhat.com> | 2010-04-21 02:06:27 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2010-04-21 02:06:27 -0400 |
commit | 88274c4d22e7cd9261fdf779dcd740d3056d60db (patch) | |
tree | 631ba0c2a3cd0765b80dd1f410e73be5326be1dc /gcc/cp/cvt.c | |
parent | 4811db8d424dfb3527a921504c800520ca89ad36 (diff) | |
download | gcc-88274c4d22e7cd9261fdf779dcd740d3056d60db.zip gcc-88274c4d22e7cd9261fdf779dcd740d3056d60db.tar.gz gcc-88274c4d22e7cd9261fdf779dcd740d3056d60db.tar.bz2 |
re PR c++/9335 (repeated diagnostic when maximum template depth is exceeded)
PR c++/9335
gcc/cp:
* init.c (constant_value_1): Treat error_mark_node as a constant
if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
* cvt.c (ocp_convert): Handle getting error_mark_node from
integral_constant_value.
* decl.c (compute_array_index_type): Likewise.
gcc/testsuite:
* lib/prune.exp: Prune "skipping N instantiation contexts".
From-SVN: r158586
Diffstat (limited to 'gcc/cp/cvt.c')
-rw-r--r-- | gcc/cp/cvt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index 6fcb1f0..1f87c5f 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -610,6 +610,8 @@ ocp_convert (tree type, tree expr, int convtype, int flags) } e = integral_constant_value (e); + if (error_operand_p (e)) + return error_mark_node; if (MAYBE_CLASS_TYPE_P (type) && (convtype & CONV_FORCE_TEMP)) /* We need a new temporary; don't take this shortcut. */; |