aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>2006-04-30 10:34:05 +0000
committerVolker Reichelt <reichelt@gcc.gnu.org>2006-04-30 10:34:05 +0000
commit85990800b175ab6d0f638303c145ac28c4437ae2 (patch)
treec4eaa47ad67c76d75e8ae5ea9f5107c262a18720 /gcc/cp/decl.c
parent4e72e1c5a2cdef4e9b123cfa544e7fe78c92eda2 (diff)
downloadgcc-85990800b175ab6d0f638303c145ac28c4437ae2.zip
gcc-85990800b175ab6d0f638303c145ac28c4437ae2.tar.gz
gcc-85990800b175ab6d0f638303c145ac28c4437ae2.tar.bz2
re PR c++/27278 (ICE with invalid operator declaration)
PR c++/27278 * decl.c (grok_op_properties): Skip operators with invalid args when checking for class-type or enum-type args. * g++.dg/parse/operator7.C: New test. From-SVN: r113389
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 1617a47..e59bd68 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -9086,6 +9086,9 @@ grok_op_properties (tree decl, bool complain)
for (p = argtypes; p && p != void_list_node; p = TREE_CHAIN (p))
{
tree arg = non_reference (TREE_VALUE (p));
+ if (arg == error_mark_node)
+ return;
+
/* IS_AGGR_TYPE, rather than CLASS_TYPE_P, is used
because these checks are performed even on
template functions. */