From: Ian Lance Taylor <iant@google.com>
To: gcc-patches@gcc.gnu.org
Subject: PATCH COMMITTED: Fix for PR 32069: -O0 -fsplit-wide-types
Date: Thu, 24 May 2007 22:19:00 -0000 [thread overview]
Message-ID: <m3abvteupa.fsf@localhost.localdomain> (raw)
PR 32069 is about an ICE when using -fsplit-wide-types -O0. This is
an odd combination. But of course the compiler should not crash.
This patch fixes it.
Bootstrapped and tested on i686-pc-linux-gnu. Committed.
Ian
2007-05-24 Ian Lance Taylor <iant@google.com>
PR rtl-optimization/32069
* regclass.c (regclass): Don't crash if the entry in regno_reg_rtx
is NULL.
Index: regclass.c
===================================================================
--- regclass.c (revision 125032)
+++ regclass.c (working copy)
@@ -1214,6 +1214,9 @@ regclass (rtx f, int nregs)
int class;
struct costs *p = &costs[i];
+ if (regno_reg_rtx[i] == NULL)
+ continue;
+
/* In non-optimizing compilation REG_N_REFS is not initialized
yet. */
if (optimize && !REG_N_REFS (i) && !REG_N_SETS (i))
Index: testsuite/gcc.dg/pr32069.c
===================================================================
--- testsuite/gcc.dg/pr32069.c (revision 0)
+++ testsuite/gcc.dg/pr32069.c (revision 0)
@@ -0,0 +1,7 @@
+/* { dg-do-compile } */
+/* { dg-options "-O0 -fsplit-wide-types" } */
+
+long long int segfault (long long int a, long long int b)
+{
+ return a ^ b;
+}
reply other threads:[~2007-05-24 22:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=m3abvteupa.fsf@localhost.localdomain \
--to=iant@google.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).