[Bug c++/11283] [3.4 regression] ICE in build_conditional_expr

giovannibajo at libero dot it gcc-bugzilla@gcc.gnu.org
Sun Jun 22 17:49:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11283


giovannibajo at libero dot it changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[3.4 regression] ICE in     |[3.4 regression] ICE in
                   |build_conditional_expr with |build_conditional_expr
                   |vector<bool>                |


------- Additional Comments From giovannibajo at libero dot it  2003-06-22 17:44 -------
This seems to fix it:


Index: call.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cp/call.c,v
retrieving revision 1.386
diff -c -p -r1.386 call.c
*** call.c      15 May 2003 22:25:51 -0000      1.386
--- call.c      22 Jun 2003 17:42:12 -0000
*************** build_conditional_expr (tree arg1, tree
*** 3345,3351 ****
        {
          arg2 = convert_like (conv2, arg2);
          arg2 = convert_from_reference (arg2);
!         if (!same_type_p (TREE_TYPE (arg2), arg3_type))
            abort ();
          arg2_type = TREE_TYPE (arg2);
        }
--- 3345,3353 ----
        {
          arg2 = convert_like (conv2, arg2);
          arg2 = convert_from_reference (arg2);
!         if (!same_type_ignoring_top_level_qualifiers_p
!             (TREE_TYPE (arg2), arg3_type)
!             || !at_least_as_qualified_p (arg3_type, TREE_TYPE (arg2)))
            abort ();
          arg2_type = TREE_TYPE (arg2);
        }
*************** build_conditional_expr (tree arg1, tree
*** 3353,3359 ****
        {
          arg3 = convert_like (conv3, arg3);
          arg3 = convert_from_reference (arg3);
!         if (!same_type_p (TREE_TYPE (arg3), arg2_type))
            abort ();
          arg3_type = TREE_TYPE (arg3);
        }
--- 3355,3363 ----
        {
          arg3 = convert_like (conv3, arg3);
          arg3 = convert_from_reference (arg3);
!         if (!same_type_ignoring_top_level_qualifiers_p
!             (TREE_TYPE (arg3), arg2_type)
!             || !at_least_as_qualified_p (arg2_type, TREE_TYPE (arg3)))
            abort ();
          arg3_type = TREE_TYPE (arg3);
        }



More information about the Gcc-bugs mailing list