From: Andrew_Pinski@PlayStation.Sony.Com
To: gcc-patches@gcc.gnu.org
Subject: [PATCH, C++] Make Canonical ICE instead of just warn when mismatching
Date: Thu, 04 Jan 2007 05:30:00 -0000 [thread overview]
Message-ID: <OFA2D18E50.F1B427EE-ON88257259.001DC712-88257259.001E3D87@playstation.sony.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 864 bytes --]
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.
[-- Attachment #2: makeinternal_error.diff.txt --]
[-- Type: text/plain, Size: 1192 bytes --]
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;
next reply other threads:[~2007-01-04 5:30 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-04 5:30 Andrew_Pinski [this message]
2007-01-04 19:23 ` Mike Stump
2007-01-04 21:00 ` Andrew_Pinski
2007-01-04 22:26 ` Doug Gregor
2007-01-06 8:25 ` Eric Botcazou
2007-01-04 22:36 ` Mike Stump
2007-01-04 23:44 ` Andrew_Pinski
2007-01-04 23:48 ` Daniel Jacobowitz
2007-01-04 23:59 ` Andrew Pinski
2007-01-05 0:03 ` Daniel Jacobowitz
2007-01-05 0:17 ` Andrew_Pinski
2007-01-05 6:44 ` Gabriel Dos Reis
2007-01-05 14:14 ` Doug Gregor
2007-01-05 14:16 ` Richard Kenner
2007-01-05 6:41 ` Gabriel Dos Reis
2007-01-05 2:04 ` Mike Stump
2007-01-05 3:13 ` Brooks Moses
2007-01-05 14:13 ` Doug Gregor
2007-01-05 14:20 ` Richard Guenther
2007-01-05 14:35 ` Doug Gregor
2007-01-05 19:04 ` Mike Stump
2007-01-05 19:12 ` Richard Guenther
2007-01-08 5:14 ` Andrew Pinski
2007-01-05 6:35 ` Gabriel Dos Reis
2007-01-05 6:33 ` Gabriel Dos Reis
2007-01-23 3:41 ` Mark Mitchell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=OFA2D18E50.F1B427EE-ON88257259.001DC712-88257259.001E3D87@playstation.sony.com \
--to=andrew_pinski@playstation.sony.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).