public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/38774] New: ice in df_refs_verify, at df-scan.c:4307
@ 2009-01-09 3:31 regehr at cs dot utah dot edu
2009-01-09 10:33 ` [Bug rtl-optimization/38774] [4.4 Regression] " rguenth at gcc dot gnu dot org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: regehr at cs dot utah dot edu @ 2009-01-09 3:31 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2465 bytes --]
This is seen using r143187 on Ubuntu Hardy on x86.
PR 32431 reports a similar failure but at a different line number, and for the
68HC11 target.
regehr@john-home:~/volatile/tmp117$ current-gcc -c -O2 -march=i686 small.c
small.c: In function foo:
small.c:17: internal compiler error: in df_refs_verify, at df-scan.c:4307
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
regehr@john-home:~/volatile/tmp117$ cat small.c
int safe_add_func_int64_t_s_s (int _si1, int _si2)
{
return 1 > 9223372036854775807LL - _si2 && 1 - _si2 ? : 1 + _si2;
}
volatile int g_55;
void func_42 (int p_43, int p_44, int p_46, int p_47)
{
p_44 & 1 && g_55, !1;
}
void foo (int p_38)
{
int l_84 = 0;
func_42 (1, safe_add_func_int64_t_s_s (p_38, 1 >= safe (1)), l_84, 1);
}
regehr@john-home:~/volatile/tmp117$ current-gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure --program-prefix=current-
--enable-languages=c,c++ --prefix=/home/regehr : (reconfigured) ../configure
--program-prefix=current- --enable-languages=c,c++ --prefix=/home/regehr :
(reconfigured) ../configure --program-prefix=current- --enable-languages=c,c++
--prefix=/home/regehr : (reconfigured) ../configure --program-prefix=current-
--prefix=/home/regehr --enable-languages=c,c++ --no-create --no-recursion :
(reconfigured) ../configure --program-prefix=current- --prefix=/home/regehr
--enable-languages=c,c++ --no-create --no-recursion : (reconfigured)
../configure --program-prefix=current- --prefix=/home/regehr
--enable-languages=c,c++ --no-create --no-recursion : (reconfigured)
../configure --program-prefix=current- --prefix=/home/regehr
--enable-languages=c,c++ --no-create --no-recursion : (reconfigured)
../configure --program-prefix=current- --prefix=/home/regehr
--enable-languages=c,c++ --no-create --no-recursion
Thread model: posix
gcc version 4.4.0 20090108 (experimental) (GCC)
--
Summary: ice in df_refs_verify, at df-scan.c:4307
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: regehr at cs dot utah dot edu
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38774
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/38774] [4.4 Regression] ice in df_refs_verify, at df-scan.c:4307
2009-01-09 3:31 [Bug c/38774] New: ice in df_refs_verify, at df-scan.c:4307 regehr at cs dot utah dot edu
@ 2009-01-09 10:33 ` rguenth at gcc dot gnu dot org
2009-01-09 12:41 ` zadeck at naturalbridge dot com
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-09 10:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2009-01-09 10:33 -------
Confirmed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |zadeck at naturalbridge dot
| |com
Status|UNCONFIRMED |NEW
Component|c |rtl-optimization
Ever Confirmed|0 |1
Keywords| |ice-checking, ice-on-valid-
| |code
Priority|P3 |P2
Last reconfirmed|0000-00-00 00:00:00 |2009-01-09 10:33:26
date| |
Summary|ice in df_refs_verify, at |[4.4 Regression] ice in
|df-scan.c:4307 |df_refs_verify, at df-
| |scan.c:4307
Target Milestone|--- |4.4.0
Version|unknown |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38774
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/38774] [4.4 Regression] ice in df_refs_verify, at df-scan.c:4307
2009-01-09 3:31 [Bug c/38774] New: ice in df_refs_verify, at df-scan.c:4307 regehr at cs dot utah dot edu
2009-01-09 10:33 ` [Bug rtl-optimization/38774] [4.4 Regression] " rguenth at gcc dot gnu dot org
@ 2009-01-09 12:41 ` zadeck at naturalbridge dot com
2009-01-10 1:57 ` zadeck at naturalbridge dot com
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: zadeck at naturalbridge dot com @ 2009-01-09 12:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from zadeck at naturalbridge dot com 2009-01-09 12:41 -------
i will have my best people work on it.
--
zadeck at naturalbridge dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |zadeck at naturalbridge dot
|dot org |com
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38774
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/38774] [4.4 Regression] ice in df_refs_verify, at df-scan.c:4307
2009-01-09 3:31 [Bug c/38774] New: ice in df_refs_verify, at df-scan.c:4307 regehr at cs dot utah dot edu
2009-01-09 10:33 ` [Bug rtl-optimization/38774] [4.4 Regression] " rguenth at gcc dot gnu dot org
2009-01-09 12:41 ` zadeck at naturalbridge dot com
@ 2009-01-10 1:57 ` zadeck at naturalbridge dot com
2009-01-13 18:07 ` jakub at gcc dot gnu dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: zadeck at naturalbridge dot com @ 2009-01-10 1:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from zadeck at naturalbridge dot com 2009-01-10 01:57 -------
Created an attachment (id=17068)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17068&action=view)
patch to cause df to verify after every patch
this is a combine bug. The df verification fails after combine makes some
modification to the cc arg of insn 28 in the foo function that bypasses the
implicit and explicit calls to mark the insn as being changed.
I am looking into trying to figure out what path thru combine is doing this.
However, if some combine expert (or just someone who wants to prove that they
have better skill with the debugger than I do) wants to get there first, be my
guest. I have attached a patch that improves some of the debugging and causes
df to verify after every pass. This patch causes the failure to move from
being in ira, to the start of if conversion after combine.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38774
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/38774] [4.4 Regression] ice in df_refs_verify, at df-scan.c:4307
2009-01-09 3:31 [Bug c/38774] New: ice in df_refs_verify, at df-scan.c:4307 regehr at cs dot utah dot edu
` (2 preceding siblings ...)
2009-01-10 1:57 ` zadeck at naturalbridge dot com
@ 2009-01-13 18:07 ` jakub at gcc dot gnu dot org
2009-01-13 20:39 ` jakub at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-13 18:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jakub at gcc dot gnu dot org 2009-01-13 18:07 -------
Simplified testcase:
extern int bar (void);
volatile int g;
int
foo (void)
{
int a = 1 >= bar ();
if ((1 > 9223372036854775807LL - a && 1 - a ? : 1 + a) & 1)
return g;
return 0;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38774
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/38774] [4.4 Regression] ice in df_refs_verify, at df-scan.c:4307
2009-01-09 3:31 [Bug c/38774] New: ice in df_refs_verify, at df-scan.c:4307 regehr at cs dot utah dot edu
` (3 preceding siblings ...)
2009-01-13 18:07 ` jakub at gcc dot gnu dot org
@ 2009-01-13 20:39 ` jakub at gcc dot gnu dot org
2009-01-13 20:57 ` jakub at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-13 20:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jakub at gcc dot gnu dot org 2009-01-13 20:39 -------
The single CC user is modified, then those changes are reverted, but
unfortunately they aren't reverted by putting back the old content, but instead
tweaking the new comparison with PUT_CODE.
SUBST (*cc_use, gen_rtx_fmt_ee (new_code, GET_MODE (*cc_use),
dest, const0_rtx));
other_changed = 1;
...
if ((recog_for_combine (&pat, other_insn, ¬e) < 0
&& ! check_asm_operands (pat)))
{
PUT_CODE (*cc_use, old_code);
other_changed = 0;
We should insert put there the old *cc_use rtx. I'll test a patch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38774
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/38774] [4.4 Regression] ice in df_refs_verify, at df-scan.c:4307
2009-01-09 3:31 [Bug c/38774] New: ice in df_refs_verify, at df-scan.c:4307 regehr at cs dot utah dot edu
` (4 preceding siblings ...)
2009-01-13 20:39 ` jakub at gcc dot gnu dot org
@ 2009-01-13 20:57 ` jakub at gcc dot gnu dot org
2009-01-13 20:59 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-13 20:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jakub at gcc dot gnu dot org 2009-01-13 20:57 -------
Created an attachment (id=17094)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17094&action=view)
gcc44-pr38774.patch
Patch I'm going to bootstrap/regtest. Fixes the testcase on both i686-linux
and x86_64-linux.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|zadeck at naturalbridge dot |jakub at gcc dot gnu dot org
|com |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38774
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/38774] [4.4 Regression] ice in df_refs_verify, at df-scan.c:4307
2009-01-09 3:31 [Bug c/38774] New: ice in df_refs_verify, at df-scan.c:4307 regehr at cs dot utah dot edu
` (5 preceding siblings ...)
2009-01-13 20:57 ` jakub at gcc dot gnu dot org
@ 2009-01-13 20:59 ` pinskia at gcc dot gnu dot org
2009-01-13 22:36 ` jakub at gcc dot gnu dot org
2009-01-13 22:38 ` jakub at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-13 20:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pinskia at gcc dot gnu dot org 2009-01-13 20:59 -------
(In reply to comment #6)
> Created an attachment (id=17094)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17094&action=view) [edit]
> gcc44-pr38774.patch
>
> Patch I'm going to bootstrap/regtest. Fixes the testcase on both i686-linux
> and x86_64-linux.
Do you think the testcase could go into gcc.dg/torture/ instead of just gcc.dg
and remove the -O2 part of dg-options ?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38774
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/38774] [4.4 Regression] ice in df_refs_verify, at df-scan.c:4307
2009-01-09 3:31 [Bug c/38774] New: ice in df_refs_verify, at df-scan.c:4307 regehr at cs dot utah dot edu
` (6 preceding siblings ...)
2009-01-13 20:59 ` pinskia at gcc dot gnu dot org
@ 2009-01-13 22:36 ` jakub at gcc dot gnu dot org
2009-01-13 22:38 ` jakub at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-13 22:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jakub at gcc dot gnu dot org 2009-01-13 22:36 -------
Subject: Bug 38774
Author: jakub
Date: Tue Jan 13 22:36:06 2009
New Revision: 143355
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143355
Log:
PR rtl-optimization/38774
* combine.c (simplify_set): When undoing cc_use change, don't do
PUT_CODE on the newly created comparison, but instead put back the
old comparison.
* gcc.dg/torture/pr38774.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/torture/pr38774.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/combine.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38774
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/38774] [4.4 Regression] ice in df_refs_verify, at df-scan.c:4307
2009-01-09 3:31 [Bug c/38774] New: ice in df_refs_verify, at df-scan.c:4307 regehr at cs dot utah dot edu
` (7 preceding siblings ...)
2009-01-13 22:36 ` jakub at gcc dot gnu dot org
@ 2009-01-13 22:38 ` jakub at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-13 22:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jakub at gcc dot gnu dot org 2009-01-13 22:38 -------
Fixed.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38774
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-01-13 22:38 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-09 3:31 [Bug c/38774] New: ice in df_refs_verify, at df-scan.c:4307 regehr at cs dot utah dot edu
2009-01-09 10:33 ` [Bug rtl-optimization/38774] [4.4 Regression] " rguenth at gcc dot gnu dot org
2009-01-09 12:41 ` zadeck at naturalbridge dot com
2009-01-10 1:57 ` zadeck at naturalbridge dot com
2009-01-13 18:07 ` jakub at gcc dot gnu dot org
2009-01-13 20:39 ` jakub at gcc dot gnu dot org
2009-01-13 20:57 ` jakub at gcc dot gnu dot org
2009-01-13 20:59 ` pinskia at gcc dot gnu dot org
2009-01-13 22:36 ` jakub at gcc dot gnu dot org
2009-01-13 22:38 ` jakub at gcc dot gnu dot org
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).