From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16543 invoked by alias); 4 Jan 2007 05:30:31 -0000 Received: (qmail 16533 invoked by uid 22791); 4 Jan 2007 05:30:30 -0000 X-Spam-Check-By: sourceware.org Received: from doa.scea.com (HELO Paris.playstation.sony.com) (64.157.7.133) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 04 Jan 2007 05:30:25 +0000 Received: from constantine.playstation.sony.com ([162.49.67.15]) by Paris.playstation.sony.com (Lotus Domino Release 6.5.5FP1) with ESMTP id 2007010321302196-89089 ; Wed, 3 Jan 2007 21:30:21 -0800 To: gcc-patches@gcc.gnu.org Subject: [PATCH, C++] Make Canonical ICE instead of just warn when mismatching MIME-Version: 1.0 X-Mailer: Lotus Notes Release 6.5.5 November 30, 2005 Message-ID: From: Andrew_Pinski@PlayStation.Sony.Com Date: Thu, 04 Jan 2007 05:30:00 -0000 Content-Type: multipart/mixed; boundary="=_mixed 001E3D8188257259_=" Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-01/txt/msg00211.txt.bz2 --=_mixed 001E3D8188257259_= Content-Type: text/plain; charset="US-ASCII" Content-length: 864 Since Doug mentioned it would ICE without checking enabled (http://gcc.gnu.org/ml/gcc-patches/2007-01/msg00172.html), it seems the right thing to just ICE and then watch out for more fall out. Yes right now we know of a testcase where before this patch we will pass but after we will now ICE but it seems like a good idea to get this ICEing before we get more testcases where we ICE with checking disable. (I posted the reduced testcase for this problem at http://gcc.gnu.org/ml/gcc-patches/2007-01/msg00209.html ). OK? Bootstrapped and tested on i686-linux-gnu with no regressions. Thanks, Andrew Pinski ChangeLog: * typeck.c (comptypes): Call error instead of warning for "canonical types differ for identical types". And then call gcc_unreachable. Likewise for "same canonical type node for different types" case. --=_mixed 001E3D8188257259_= Content-Transfer-Encoding: 8bit Content-Type: text/plain; name="makeinternal_error.diff.txt" Content-Disposition: attachment; filename="makeinternal_error.diff.txt" Content-length: 1192 Index: typeck.c =================================================================== --- typeck.c (revision 120428) +++ typeck.c (working copy) @@ -1121,22 +1121,22 @@ comptypes (tree t1, tree t2, int strict) /* The two types are structurally equivalent, but their canonical types were different. This is a failure of the canonical type propagation code.*/ - warning(0, - "canonical types differ for identical types %T and %T", - t1, t2); + error ("canonical types differ for identical types %T and %T", + t1, t2); debug_tree (t1); debug_tree (t2); + gcc_unreachable (); } else if (!result && TYPE_CANONICAL (t1) == TYPE_CANONICAL (t2)) { /* Two types are structurally different, but the canonical types are the same. This means we were over-eager in assigning canonical types. */ - warning (0, - "same canonical type node for different types %T and %T", - t1, t2); + error ("same canonical type node for different types %T and %T", + t1, t2); debug_tree (t1); debug_tree (t2); + gcc_unreachable (); } return result; --=_mixed 001E3D8188257259_=--