[Bug c++/45894] [4.5 Regression] [C++0x] ICE: segmentation fault with -Wall
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 2 16:28:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45894
--- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-02-02 16:27:46 UTC ---
Although this bug has 4.4.5 in the "Known to work" field, the bug in cp/tree.c
is present on the 4.4 branch, and the testcase in PR 47589 causes an ICE with
4.4.5, without -Wall or -std=c++0x
The fix for cp/tree.c looks safe to backport to 4.4 - any objections to doing
so?
--- gcc/cp/tree.c.jj 2010-11-03 16:58:26.000000000 +0100
+++ gcc/cp/tree.c 2010-11-05 13:45:53.000000000 +0100
@@ -67,7 +67,8 @@ lvalue_kind (const_tree ref)
== REFERENCE_TYPE)
return lvalue_kind (TREE_OPERAND (ref, 0));
- if (TREE_CODE (TREE_TYPE (ref)) == REFERENCE_TYPE)
+ if (TREE_TYPE (ref)
+ && TREE_CODE (TREE_TYPE (ref)) == REFERENCE_TYPE)
{
/* unnamed rvalue references are rvalues */
if (TYPE_REF_IS_RVALUE (TREE_TYPE (ref))
More information about the Gcc-bugs
mailing list