diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2008-08-28 23:37:41 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2008-08-28 23:37:41 +0000 |
commit | ffe79825902c65abf908d8376329f4a85269af60 (patch) | |
tree | 22d7a81786a9372beca21781a0b8bf7cfcfabd53 /gcc/cp/decl.c | |
parent | 1cd8b853ba9b8c120ba47182845f62bf2fd1788d (diff) | |
download | gcc-ffe79825902c65abf908d8376329f4a85269af60.zip gcc-ffe79825902c65abf908d8376329f4a85269af60.tar.gz gcc-ffe79825902c65abf908d8376329f4a85269af60.tar.bz2 |
re PR c++/37260 (infinite loop in init)
/cp
2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/37260
* decl.c (reshape_init_r): Check init for error_mark_node.
/testsuite
2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/37260
* g++.dg/parse/crash44.C: New.
From-SVN: r139740
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 2f5d6eb..c3d63bb 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -4772,6 +4772,9 @@ reshape_init_r (tree type, reshape_iter *d, bool first_initializer_p) { tree init = d->cur->value; + if (error_operand_p (init)) + return error_mark_node; + /* A non-aggregate type is always initialized with a single initializer. */ if (!CP_AGGREGATE_TYPE_P (type)) |