[Bug c++/50858] [4.7 Regression] segfault at ../../gcc/libiberty/hashtab.c:981
paolo.carlini at oracle dot com
gcc-bugzilla@gcc.gnu.org
Tue Oct 25 00:56:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50858
--- Comment #8 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-25 00:55:26 UTC ---
This patchlet avoids the ICE and passes the testsuite:
Index: typeck.c
===================================================================
--- typeck.c (revision 180413)
+++ typeck.c (working copy)
@@ -510,8 +510,12 @@ composite_pointer_type_r (tree t1, tree t2,
&& TREE_CODE (pointee2) == POINTER_TYPE)
|| (TYPE_PTR_TO_MEMBER_P (pointee1)
&& TYPE_PTR_TO_MEMBER_P (pointee2)))
- result_type = composite_pointer_type_r (pointee1, pointee2, operation,
- complain);
+ {
+ result_type = composite_pointer_type_r (pointee1, pointee2, operation,
+ complain);
+ if (result_type == error_mark_node)
+ return error_mark_node;
+ }
else
{
if (complain & tf_error)
More information about the Gcc-bugs
mailing list