public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/37526]  New: ICE using --combine -O2
@ 2008-09-15 19:00 patrik dot hagglund at bredband dot net
  2008-09-15 19:02 ` [Bug c/37526] " patrik dot hagglund at bredband dot net
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: patrik dot hagglund at bredband dot net @ 2008-09-15 19:00 UTC (permalink / raw)
  To: gcc-bugs

I get an ICE using --combine -O2:

/usr/local/encap/gcc-4.4-20080912/bin/gcc -std=gnu99 --combine -O2 
leg.leg-saved.i tree-saved.i compile-saved.i
tree-saved.c: In function 'Node_print_p':
tree-saved.c:186: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

/usr/local/encap/gcc-4.4-20080912/bin/gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/usr/local/encap/gcc-4.4-20080912
Thread model: posix
gcc version 4.4.0 20080912 (experimental) (GCC)


-- 
           Summary: ICE using --combine -O2
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: patrik dot hagglund at bredband dot net


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/37526] ICE using --combine -O2
  2008-09-15 19:00 [Bug c/37526] New: ICE using --combine -O2 patrik dot hagglund at bredband dot net
@ 2008-09-15 19:02 ` patrik dot hagglund at bredband dot net
  2008-09-15 19:03 ` patrik dot hagglund at bredband dot net
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: patrik dot hagglund at bredband dot net @ 2008-09-15 19:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from patrik dot hagglund at bredband dot net  2008-09-15 19:01 -------
Created an attachment (id=16324)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16324&action=view)
leg.leg-saved.i


-- 


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/37526] ICE using --combine -O2
  2008-09-15 19:00 [Bug c/37526] New: ICE using --combine -O2 patrik dot hagglund at bredband dot net
  2008-09-15 19:02 ` [Bug c/37526] " patrik dot hagglund at bredband dot net
@ 2008-09-15 19:03 ` patrik dot hagglund at bredband dot net
  2008-09-15 19:04 ` patrik dot hagglund at bredband dot net
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: patrik dot hagglund at bredband dot net @ 2008-09-15 19:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from patrik dot hagglund at bredband dot net  2008-09-15 19:02 -------
Created an attachment (id=16325)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16325&action=view)
tree-saved.i


-- 


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/37526] ICE using --combine -O2
  2008-09-15 19:00 [Bug c/37526] New: ICE using --combine -O2 patrik dot hagglund at bredband dot net
  2008-09-15 19:02 ` [Bug c/37526] " patrik dot hagglund at bredband dot net
  2008-09-15 19:03 ` patrik dot hagglund at bredband dot net
@ 2008-09-15 19:04 ` patrik dot hagglund at bredband dot net
  2008-09-15 19:05 ` [Bug middle-end/37526] " patrik dot hagglund at bredband dot net
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: patrik dot hagglund at bredband dot net @ 2008-09-15 19:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from patrik dot hagglund at bredband dot net  2008-09-15 19:03 -------
Created an attachment (id=16326)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16326&action=view)
compile-saved.i


-- 


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug middle-end/37526] ICE using --combine -O2
  2008-09-15 19:00 [Bug c/37526] New: ICE using --combine -O2 patrik dot hagglund at bredband dot net
                   ` (2 preceding siblings ...)
  2008-09-15 19:04 ` patrik dot hagglund at bredband dot net
@ 2008-09-15 19:05 ` patrik dot hagglund at bredband dot net
  2008-09-15 19:12 ` [Bug tree-optimization/37526] " pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: patrik dot hagglund at bredband dot net @ 2008-09-15 19:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from patrik dot hagglund at bredband dot net  2008-09-15 19:04 -------
Created an attachment (id=16327)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16327&action=view)
leg.leg-saved.i


-- 

patrik dot hagglund at bredband dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #16324|0                           |1
        is obsolete|                            |


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug tree-optimization/37526] ICE using --combine -O2
  2008-09-15 19:00 [Bug c/37526] New: ICE using --combine -O2 patrik dot hagglund at bredband dot net
                   ` (3 preceding siblings ...)
  2008-09-15 19:05 ` [Bug middle-end/37526] " patrik dot hagglund at bredband dot net
@ 2008-09-15 19:12 ` pinskia at gcc dot gnu dot org
  2008-09-15 19:39 ` [Bug tree-optimization/37526] [4.4 Regression] " pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-15 19:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2008-09-15 19:11 -------
reducing ...

It is an ICE in PRE.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|middle-end                  |tree-optimization
           Keywords|                            |ice-on-valid-code


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug tree-optimization/37526] [4.4 Regression] ICE using --combine -O2
  2008-09-15 19:00 [Bug c/37526] New: ICE using --combine -O2 patrik dot hagglund at bredband dot net
                   ` (4 preceding siblings ...)
  2008-09-15 19:12 ` [Bug tree-optimization/37526] " pinskia at gcc dot gnu dot org
@ 2008-09-15 19:39 ` pinskia at gcc dot gnu dot org
  2008-09-16 13:21 ` rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-15 19:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2008-09-15 19:38 -------
Here is a short reduced testcase.
t1.i:
extern struct _IO_FILE *stderr;
typedef struct Node Node;
struct Node {
  int type;
};
void Node_print(Node *node)
{
  while (node->type == 0)
    f(stderr);
  f(stderr);
}
--- CUT ---
t2.i:
struct _IO_FILE { };
extern struct _IO_FILE *stderr;

--- CUT ---
Compile it as gcc t1.i t2.i -O2 -combine and you will get an ICE in FRE.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-09-15 19:38:14
               date|                            |
            Summary|ICE using --combine -O2     |[4.4 Regression] ICE using -
                   |                            |-combine -O2
   Target Milestone|---                         |4.4.0


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug tree-optimization/37526] [4.4 Regression] ICE using --combine -O2
  2008-09-15 19:00 [Bug c/37526] New: ICE using --combine -O2 patrik dot hagglund at bredband dot net
                   ` (5 preceding siblings ...)
  2008-09-15 19:39 ` [Bug tree-optimization/37526] [4.4 Regression] " pinskia at gcc dot gnu dot org
@ 2008-09-16 13:21 ` rguenth at gcc dot gnu dot org
  2008-09-16 13:29   ` Andrew Thomas Pinski
  2008-09-16 13:31 ` pinskia at gmail dot com
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-09-16 13:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rguenth at gcc dot gnu dot org  2008-09-16 13:20 -------
./cc1 -quiet -O2 t1.i t2.i     
t2.i: In function 'Node_print':
t2.i:2: error: non-trivial conversion at assignment
struct _IO_FILE *
struct _IO_FILE *
# LOADS:  { stderr }
stderr.0_3 = stderr;

t2.i:2: error: non-trivial conversion at assignment
struct _IO_FILE *
struct _IO_FILE *
# LOADS:  { stderr }
stderr.0_4 = stderr;

t2.i:2: internal compiler error: verify_stmts failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


So we have wrong GIMPLE here.  GIGO.

Value numbering stderr.0_3 stmt = stderr.0_3 = stderr;
Setting value number of stderr.0_3 to stderr.0_3
...
Value numbering stderr.0_4 stmt = stderr.0_4 = stderr;
Inserting name stderr.0_17 for expression (struct _IO_FILE *) stderr.0_3
Setting value number of stderr.0_4 to stderr.0_17


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Bug tree-optimization/37526] [4.4 Regression] ICE using --combine -O2
  2008-09-16 13:21 ` rguenth at gcc dot gnu dot org
@ 2008-09-16 13:29   ` Andrew Thomas Pinski
  0 siblings, 0 replies; 13+ messages in thread
From: Andrew Thomas Pinski @ 2008-09-16 13:29 UTC (permalink / raw)
  To: gcc-bugzilla; +Cc: gcc-bugs



Sent from my iPhone

On Sep 16, 2008, at 6:20 AM, "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org 
 > wrote:

>
>
> ------- Comment #7 from rguenth at gcc dot gnu dot org  2008-09-16  
> 13:20 -------
> ./cc1 -quiet -O2 t1.i t2.i
> t2.i: In function 'Node_print':
> t2.i:2: error: non-trivial conversion at assignment
> struct _IO_FILE *
> struct _IO_FILE *
> # LOADS:  { stderr }
> stderr.0_3 = stderr;
>
> t2.i:2: error: non-trivial conversion at assignment
> struct _IO_FILE *
> struct _IO_FILE *
> # LOADS:  { stderr }
> stderr.0_4 = stderr;
>

No those two types should compatible. If they are not then there is a  
bug in the middle-end. I think this is why there was the Lang hook in  
the first place.

> t2.i:2: internal compiler error: verify_stmts failed
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html> for instructions.
>
>
> So we have wrong GIMPLE here.  GIGO.
>
> Value numbering stderr.0_3 stmt = stderr.0_3 = stderr;
> Setting value number of stderr.0_3 to stderr.0_3
> ...
> Value numbering stderr.0_4 stmt = stderr.0_4 = stderr;
> Inserting name stderr.0_17 for expression (struct _IO_FILE *) stderr. 
> 0_3
> Setting value number of stderr.0_4 to stderr.0_17
>
>
> -- 
>
> rguenth at gcc dot gnu dot org changed:
>
>           What    |Removed                     |Added
> --- 
> --- 
> ----------------------------------------------------------------------
>                 CC|                            |rguenth at gcc dot  
> gnu dot
>                   |                            |org
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37526
>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug tree-optimization/37526] [4.4 Regression] ICE using --combine -O2
  2008-09-15 19:00 [Bug c/37526] New: ICE using --combine -O2 patrik dot hagglund at bredband dot net
                   ` (6 preceding siblings ...)
  2008-09-16 13:21 ` rguenth at gcc dot gnu dot org
@ 2008-09-16 13:31 ` pinskia at gmail dot com
  2008-10-22  3:20 ` mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: pinskia at gmail dot com @ 2008-09-16 13:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pinskia at gmail dot com  2008-09-16 13:29 -------
Subject: Re:  [4.4 Regression] ICE using --combine -O2



Sent from my iPhone

On Sep 16, 2008, at 6:20 AM, "rguenth at gcc dot gnu dot org"
<gcc-bugzilla@gcc.gnu.org 
 > wrote:

>
>
> ------- Comment #7 from rguenth at gcc dot gnu dot org  2008-09-16  
> 13:20 -------
> ./cc1 -quiet -O2 t1.i t2.i
> t2.i: In function 'Node_print':
> t2.i:2: error: non-trivial conversion at assignment
> struct _IO_FILE *
> struct _IO_FILE *
> # LOADS:  { stderr }
> stderr.0_3 = stderr;
>
> t2.i:2: error: non-trivial conversion at assignment
> struct _IO_FILE *
> struct _IO_FILE *
> # LOADS:  { stderr }
> stderr.0_4 = stderr;
>

No those two types should compatible. If they are not then there is a  
bug in the middle-end. I think this is why there was the Lang hook in  
the first place.

> t2.i:2: internal compiler error: verify_stmts failed
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html> for instructions.
>
>
> So we have wrong GIMPLE here.  GIGO.
>
> Value numbering stderr.0_3 stmt = stderr.0_3 = stderr;
> Setting value number of stderr.0_3 to stderr.0_3
> ...
> Value numbering stderr.0_4 stmt = stderr.0_4 = stderr;
> Inserting name stderr.0_17 for expression (struct _IO_FILE *) stderr. 
> 0_3
> Setting value number of stderr.0_4 to stderr.0_17
>
>
> -- 
>
> rguenth at gcc dot gnu dot org changed:
>
>           What    |Removed                     |Added
> --- 
> --- 
> ----------------------------------------------------------------------
>                 CC|                            |rguenth at gcc dot  
> gnu dot
>                   |                            |org
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37526
>


-- 


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug tree-optimization/37526] [4.4 Regression] ICE using --combine -O2
  2008-09-15 19:00 [Bug c/37526] New: ICE using --combine -O2 patrik dot hagglund at bredband dot net
                   ` (7 preceding siblings ...)
  2008-09-16 13:31 ` pinskia at gmail dot com
@ 2008-10-22  3:20 ` mmitchel at gcc dot gnu dot org
  2008-10-27 10:48 ` jakub at gcc dot gnu dot org
  2008-10-27 11:23 ` jakub at gcc dot gnu dot org
  10 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2008-10-22  3:20 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug tree-optimization/37526] [4.4 Regression] ICE using --combine -O2
  2008-09-15 19:00 [Bug c/37526] New: ICE using --combine -O2 patrik dot hagglund at bredband dot net
                   ` (8 preceding siblings ...)
  2008-10-22  3:20 ` mmitchel at gcc dot gnu dot org
@ 2008-10-27 10:48 ` jakub at gcc dot gnu dot org
  2008-10-27 11:23 ` jakub at gcc dot gnu dot org
  10 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-10-27 10:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jakub at gcc dot gnu dot org  2008-10-27 10:46 -------
This got fixed by (or at least no longer reproduces after)
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140562


-- 


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug tree-optimization/37526] [4.4 Regression] ICE using --combine -O2
  2008-09-15 19:00 [Bug c/37526] New: ICE using --combine -O2 patrik dot hagglund at bredband dot net
                   ` (9 preceding siblings ...)
  2008-10-27 10:48 ` jakub at gcc dot gnu dot org
@ 2008-10-27 11:23 ` jakub at gcc dot gnu dot org
  10 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-10-27 11:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from jakub at gcc dot gnu dot org  2008-10-27 11:22 -------
Fixed.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2008-10-27 11:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-15 19:00 [Bug c/37526] New: ICE using --combine -O2 patrik dot hagglund at bredband dot net
2008-09-15 19:02 ` [Bug c/37526] " patrik dot hagglund at bredband dot net
2008-09-15 19:03 ` patrik dot hagglund at bredband dot net
2008-09-15 19:04 ` patrik dot hagglund at bredband dot net
2008-09-15 19:05 ` [Bug middle-end/37526] " patrik dot hagglund at bredband dot net
2008-09-15 19:12 ` [Bug tree-optimization/37526] " pinskia at gcc dot gnu dot org
2008-09-15 19:39 ` [Bug tree-optimization/37526] [4.4 Regression] " pinskia at gcc dot gnu dot org
2008-09-16 13:21 ` rguenth at gcc dot gnu dot org
2008-09-16 13:29   ` Andrew Thomas Pinski
2008-09-16 13:31 ` pinskia at gmail dot com
2008-10-22  3:20 ` mmitchel at gcc dot gnu dot org
2008-10-27 10:48 ` jakub at gcc dot gnu dot org
2008-10-27 11:23 ` 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).