diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-16 02:31:00 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-16 02:31:00 +0000 |
commit | c4fca9067d203fc1f3bd0e20fcb7eea8b0225871 (patch) | |
tree | 4c234dd523260d550b7be02cc0fe29cc2c7c13dd /gcc | |
parent | c52ea8e5a52635cab459e260b27c636ca13f7bcd (diff) |
PR c++/7939
* typeck.c (comptypes): Don't ICE when its first argument is
error_mark_node.
(compparms): Reverse the arguments of same_type_p.
PR c++/7939
* g++.dg/template/crash11.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-3_3-branch@72546 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/typeck.c | 8 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 |
3 files changed, 15 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1ab34be415f..782aa6c415e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2003-10-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/7939 + * typeck.c (comptypes): Don't ICE when its first argument is + error_mark_node. + (compparms): Reverse the arguments of same_type_p. + 2003-10-14 Jason Merrill <jason@redhat.com> PR c++/11878 diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 2855ee74f42..4b36cc2ceaa 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -909,10 +909,8 @@ comptypes (t1, t2, strict) if (t1 == t2) return 1; - /* This should never happen. */ - my_friendly_assert (t1 != error_mark_node, 307); - - if (t2 == error_mark_node) + /* Suppress errors caused by previously reported errors */ + if (t1 == error_mark_node || t2 == error_mark_node) return 0; /* If either type is the internal version of sizetype, return the @@ -1405,7 +1403,7 @@ compparms (parms1, parms2) they fail to match. */ if (t1 == 0 || t2 == 0) return 0; - if (!same_type_p (TREE_VALUE (t2), TREE_VALUE (t1))) + if (!same_type_p (TREE_VALUE (t1), TREE_VALUE (t2))) return 0; t1 = TREE_CHAIN (t1); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e7a53ec1a13..a64d93dc0fd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2003-10-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/7939 + * g++.dg/template/crash11.C: New test. + 2003-10-14 Steven Bosscher <steven@gcc.gnu.org> * g++.dg/tls/init-2.C: Fix. Expect two warnings. |