public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/17517] New: [4.0 Regression] ICE: SSA corruption
@ 2004-09-16 10:17 steven at gcc dot gnu dot org
  2004-09-16 10:18 ` [Bug tree-optimization/17517] " steven at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-09-16 10:17 UTC (permalink / raw)
  To: gcc-bugs

$ g++ --version 
g++ (GCC) 4.0.0 20040915 (experimental) 
Copyright (C) 2004 Free Software Foundation, Inc. 
This is free software; see the source for copying conditions.  There is NO 
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
 
$ g++ -O t.cc 
 
Different root vars: checker$ptr and p across an abnormal edge from BB3->BB6 
t.cc: In function `void pipe()': 
t.cc:25466: internal compiler error: SSA corruption 
 
The test case, which I'll attach soon, comes from aspell.  I've tried 
to reduce the test case to something manageable, though probably some 
more C++-savvy bug master can reduce it a lot further...

-- 
           Summary: [4.0 Regression] ICE: SSA corruption
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: steven at gcc dot gnu dot org
                CC: amacleod at redhat dot com,gcc-bugs at gcc dot gnu dot
                    org


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


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

* [Bug tree-optimization/17517] [4.0 Regression] ICE: SSA corruption
  2004-09-16 10:17 [Bug tree-optimization/17517] New: [4.0 Regression] ICE: SSA corruption steven at gcc dot gnu dot org
@ 2004-09-16 10:18 ` steven at gcc dot gnu dot org
  2004-09-16 10:52 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-09-16 10:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-09-16 10:18 -------
Created an attachment (id=7149)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7149&action=view)
Test case for this bug

Note, that it failed for me on x86_64-unknown-linux-gnu,
but I suppose it's not target dependent.

-- 


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


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

* [Bug tree-optimization/17517] [4.0 Regression] ICE: SSA corruption
  2004-09-16 10:17 [Bug tree-optimization/17517] New: [4.0 Regression] ICE: SSA corruption steven at gcc dot gnu dot org
  2004-09-16 10:18 ` [Bug tree-optimization/17517] " steven at gcc dot gnu dot org
@ 2004-09-16 10:52 ` pinskia at gcc dot gnu dot org
  2004-09-16 13:12 ` amacleod at redhat dot com
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-16 10:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-16 10:52 -------
Hmm, this is a recent regression, 3.5.0 20040909 cannot reproduce it
but 4.0.0 20040916 can.  I cannot debug it as the 4.0.0 one is on openbsd and gdb support there is 
worse than on darwin, gdb seg faults or internal errors. (and my linux server which used to build gcc is 
down for some reason:( ). 

I almost want to say this is a latent bug (in the sense it was present before 20040909 but did not show 
in this testcase because SRA did not happen on the struct).

If I have time tommorrow I will try to reduce it on darwin where gdb actually works.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.0


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


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

* [Bug tree-optimization/17517] [4.0 Regression] ICE: SSA corruption
  2004-09-16 10:17 [Bug tree-optimization/17517] New: [4.0 Regression] ICE: SSA corruption steven at gcc dot gnu dot org
  2004-09-16 10:18 ` [Bug tree-optimization/17517] " steven at gcc dot gnu dot org
  2004-09-16 10:52 ` pinskia at gcc dot gnu dot org
@ 2004-09-16 13:12 ` amacleod at redhat dot com
  2004-09-16 13:32 ` belyshev at lubercy dot com
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: amacleod at redhat dot com @ 2004-09-16 13:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amacleod at redhat dot com  2004-09-16 13:12 -------
a followon issue with copyrename.

if we have an abnormal PHI:
  a_6 = <a_4, a_3>

and somewhere else we have 
  p_9 = a_2
<...>
  a_3 = a_2

we coalesce p_9 and a_2 because there is no reason not to.
a_3 and a_2 are automatically coalesced since they hgave the same root.

now we have p_9 propgated into the abnormal PHI, and boom.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-09-16 13:12:10
               date|                            |


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


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

* [Bug tree-optimization/17517] [4.0 Regression] ICE: SSA corruption
  2004-09-16 10:17 [Bug tree-optimization/17517] New: [4.0 Regression] ICE: SSA corruption steven at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-09-16 13:12 ` amacleod at redhat dot com
@ 2004-09-16 13:32 ` belyshev at lubercy dot com
  2004-09-16 16:20 ` stevenb at suse dot de
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: belyshev at lubercy dot com @ 2004-09-16 13:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From belyshev at lubercy dot com  2004-09-16 13:32 -------
// smaller testcase:

extern void foo ();

struct Ptr {
  int * ptr;
  Ptr () { ptr = 0; }
  ~Ptr() { delete ptr; }
  Ptr &operator= (int * p) { ptr = p; return *this; }
};

int *new_checker () { foo (); return 0; }

void pipe (int c)
{
  Ptr checker;
  
  foo ();
  for (;;)
    {
    switch (c)
      {
    case '-':
      checker = new_checker ();
      break;
      }
    }
}


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2004-09-16 13:12:10         |2004-09-16 13:32:11
               date|                            |


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


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

* [Bug tree-optimization/17517] [4.0 Regression] ICE: SSA corruption
  2004-09-16 10:17 [Bug tree-optimization/17517] New: [4.0 Regression] ICE: SSA corruption steven at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-09-16 13:32 ` belyshev at lubercy dot com
@ 2004-09-16 16:20 ` stevenb at suse dot de
  2004-09-16 16:26 ` amacleod at redhat dot com
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: stevenb at suse dot de @ 2004-09-16 16:20 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stevenb at suse dot de  2004-09-16 16:20 -------
Subject: Re:  [4.0 Regression] ICE: SSA corruption

On Thursday 16 September 2004 15:55, amacleod at redhat dot com wrote:
> I am bootstrapping and regression checking these on x86, you might want to
> try that on x86_64.

It does not fix the bug for me :-/

Gr.
Steven




-- 


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


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

* [Bug tree-optimization/17517] [4.0 Regression] ICE: SSA corruption
  2004-09-16 10:17 [Bug tree-optimization/17517] New: [4.0 Regression] ICE: SSA corruption steven at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-09-16 16:20 ` stevenb at suse dot de
@ 2004-09-16 16:26 ` amacleod at redhat dot com
  2004-09-16 16:50 ` stevenb at suse dot de
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: amacleod at redhat dot com @ 2004-09-16 16:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amacleod at redhat dot com  2004-09-16 16:26 -------
I noticed my comment was a little vague. Did you apply the patch I attached?
Thats the one that fixes the bug. The patch embedded in the comment fixes the
follow on problem when -fdump-tree-all-all is used.  You will need both patches.

The attached patch is the one which fixes the bug. At least it should :-)

Andrew

-- 


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


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

* [Bug tree-optimization/17517] [4.0 Regression] ICE: SSA corruption
  2004-09-16 10:17 [Bug tree-optimization/17517] New: [4.0 Regression] ICE: SSA corruption steven at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2004-09-16 16:26 ` amacleod at redhat dot com
@ 2004-09-16 16:50 ` stevenb at suse dot de
  2004-09-16 17:26 ` stevenb at suse dot de
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: stevenb at suse dot de @ 2004-09-16 16:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stevenb at suse dot de  2004-09-16 16:50 -------
Subject: Re:  [4.0 Regression] ICE: SSA corruption

On Thursday 16 September 2004 18:26, amacleod at redhat dot com wrote:
> ------- Additional Comments From amacleod at redhat dot com  2004-09-16
> 16:26 ------- I noticed my comment was a little vague. Did you apply the
> patch I attached? Thats the one that fixes the bug. The patch embedded in
> the comment fixes the follow on problem when -fdump-tree-all-all is used. 
> You will need both patches.
>
> The attached patch is the one which fixes the bug. At least it should :-)

Heh, no you were clear enough.

The patch that you attached does not fix the bug for me, with the patch
applied I still see an ICE, 

stevenb@kalman:/space/stevenb/build/gcc> ./cc1plus -w -quiet -O2 t.cc

Different root vars: checker$ptr and p across an abnormal edge from BB3->BB6
t.cc: In function `void pipe()':
t.cc:25466: internal compiler error: SSA corruption
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

This is with the original test case, not the reduced one.

In copyrename1 I see no complaints about "Abnormal PHI barrier" that
would prevent coalescing.  In copyrename2, I have the following:


;; Function void pipe() (_Z4pipev)

Try : checker$ptr_324(P324) & p_36(P36) : Abnormal PHI barrier.  No coalesce.
Try : D.61354_279(P279) & checker$ptr_327(P327) : Abnormal PHI barrier.  No coalesce.
Try : checker$ptr_320(P320) & p_274(P274) --> P320 p
Try : D.61458_157(P157) & checker$ptr_325(P325) : Abnormal PHI barrier.  No coalesce.
Try : checker$ptr_329(P329) & checker$ptr_327(P327) : Same root, coalesced --> P329.
Try : checker$ptr_329(P329) & p_320(P320) --> P329 p
Try : checker$ptr_327(P329) & checker$ptr_324(P324) : Abnormal PHI barrier.  No coalesce.
Try : checker$ptr_327(P329) & p_329(P329) : Already coalesced.
Try : checker$ptr_325(P325) & checker$ptr_324(P324) : Same root, coalesced --> P325.
Try : checker$ptr_325(P325) & checker$ptr_327(P329) : Abnormal PHI barrier.  No coalesce.

Partition map

Partition 36 (p_36 - 36 )
Partition 157 (D.61458_157 - 157 )
Partition 279 (D.61354_279 - 279 )
Partition 325 (checker$ptr_325 - 324 325 )
Partition 329 (p_329 - 274 320 327 329 )

Coalesced checker$ptr_327 to p_329

I can attach the full dumps if you want them.




-- 


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


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

* [Bug tree-optimization/17517] [4.0 Regression] ICE: SSA corruption
  2004-09-16 10:17 [Bug tree-optimization/17517] New: [4.0 Regression] ICE: SSA corruption steven at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2004-09-16 16:50 ` stevenb at suse dot de
@ 2004-09-16 17:26 ` stevenb at suse dot de
  2004-09-16 18:45 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: stevenb at suse dot de @ 2004-09-16 17:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stevenb at suse dot de  2004-09-16 17:26 -------
Subject: Re:  [4.0 Regression] ICE: SSA corruption

> The patch that you attached does not fix the bug for me, with the patch
> applied I still see an ICE,

Hmm it *does* fix the bug - if you apply the patch in the right tree.  Oops :)




-- 


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


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

* [Bug tree-optimization/17517] [4.0 Regression] ICE: SSA corruption
  2004-09-16 10:17 [Bug tree-optimization/17517] New: [4.0 Regression] ICE: SSA corruption steven at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2004-09-16 17:26 ` stevenb at suse dot de
@ 2004-09-16 18:45 ` cvs-commit at gcc dot gnu dot org
  2004-09-16 19:19 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-16 18:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-09-16 18:45 -------
Subject: Bug 17517

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	amacleod@gcc.gnu.org	2004-09-16 18:45:33

Modified files:
	gcc            : ChangeLog tree-ssa-copyrename.c 

Log message:
	2004-09-16  Andrew MacLeod  <amacleod@redhat.com>
	
	PR tree-optimization/17517
	* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Don't
	coalesce same-root variables without checking for abnormal PHI usage.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5480&r2=2.5481
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-copyrename.c.diff?cvsroot=gcc&r1=2.15&r2=2.16



-- 


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


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

* [Bug tree-optimization/17517] [4.0 Regression] ICE: SSA corruption
  2004-09-16 10:17 [Bug tree-optimization/17517] New: [4.0 Regression] ICE: SSA corruption steven at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2004-09-16 18:45 ` cvs-commit at gcc dot gnu dot org
@ 2004-09-16 19:19 ` pinskia at gcc dot gnu dot org
  2004-09-22 23:07 ` steven at gcc dot gnu dot org
  2004-09-24 16:22 ` cvs-commit at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-16 19:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-16 19:19 -------
Fixed.

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


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


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

* [Bug tree-optimization/17517] [4.0 Regression] ICE: SSA corruption
  2004-09-16 10:17 [Bug tree-optimization/17517] New: [4.0 Regression] ICE: SSA corruption steven at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2004-09-16 19:19 ` pinskia at gcc dot gnu dot org
@ 2004-09-22 23:07 ` steven at gcc dot gnu dot org
  2004-09-24 16:22 ` cvs-commit at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-09-22 23:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-09-22 23:07 -------
This still needs a test case in the test suite 

-- 


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


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

* [Bug tree-optimization/17517] [4.0 Regression] ICE: SSA corruption
  2004-09-16 10:17 [Bug tree-optimization/17517] New: [4.0 Regression] ICE: SSA corruption steven at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2004-09-22 23:07 ` steven at gcc dot gnu dot org
@ 2004-09-24 16:22 ` cvs-commit at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-24 16:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-09-24 16:22 -------
Subject: Bug 17517

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	amacleod@gcc.gnu.org	2004-09-24 16:22:20

Modified files:
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/tree-ssa: pr17517.C 

Log message:
	Test case for PR 17517

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4342&r2=1.4343
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/tree-ssa/pr17517.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

end of thread, other threads:[~2004-09-24 16:22 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-16 10:17 [Bug tree-optimization/17517] New: [4.0 Regression] ICE: SSA corruption steven at gcc dot gnu dot org
2004-09-16 10:18 ` [Bug tree-optimization/17517] " steven at gcc dot gnu dot org
2004-09-16 10:52 ` pinskia at gcc dot gnu dot org
2004-09-16 13:12 ` amacleod at redhat dot com
2004-09-16 13:32 ` belyshev at lubercy dot com
2004-09-16 16:20 ` stevenb at suse dot de
2004-09-16 16:26 ` amacleod at redhat dot com
2004-09-16 16:50 ` stevenb at suse dot de
2004-09-16 17:26 ` stevenb at suse dot de
2004-09-16 18:45 ` cvs-commit at gcc dot gnu dot org
2004-09-16 19:19 ` pinskia at gcc dot gnu dot org
2004-09-22 23:07 ` steven at gcc dot gnu dot org
2004-09-24 16:22 ` cvs-commit 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).