public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/16864] Segmentation fault during tree tail call elimination
  2004-08-03 20:06 [Bug tree-optimization/16864] New: Segmentation fault during tree tail call elimination dberlin at gcc dot gnu dot org
@ 2004-08-03 20:06 ` dberlin at gcc dot gnu dot org
  2004-08-03 20:10 ` dberlin at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: dberlin at gcc dot gnu dot org @ 2004-08-03 20:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dberlin at gcc dot gnu dot org  2004-08-03 20:06 -------
Created an attachment (id=6874)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6874&action=view)
Minimal testcase for this bug


-- 


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


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

* [Bug tree-optimization/16864] New: Segmentation fault during tree tail call elimination
@ 2004-08-03 20:06 dberlin at gcc dot gnu dot org
  2004-08-03 20:06 ` [Bug tree-optimization/16864] " dberlin at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: dberlin at gcc dot gnu dot org @ 2004-08-03 20:06 UTC (permalink / raw)
  To: gcc-bugs

The attached testcase causes a segmentation fault in tree tailcall elimination. 
It looks like it expects local1 (a static), to have a default_def, which it 
doesn't

-- 
           Summary: Segmentation fault during tree tail call elimination
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: rakdver at gcc dot gnu dot org
        ReportedBy: dberlin at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 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=16864


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

* [Bug tree-optimization/16864] Segmentation fault during tree tail call elimination
  2004-08-03 20:06 [Bug tree-optimization/16864] New: Segmentation fault during tree tail call elimination dberlin at gcc dot gnu dot org
  2004-08-03 20:06 ` [Bug tree-optimization/16864] " dberlin at gcc dot gnu dot org
@ 2004-08-03 20:10 ` dberlin at gcc dot gnu dot org
  2004-08-03 20:49 ` [Bug tree-optimization/16864] [3.5 Regression] " pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: dberlin at gcc dot gnu dot org @ 2004-08-03 20:10 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dberlin at gcc dot gnu dot org  2004-08-03 20:10 -------
Sorry, thought Zdenek wrote the tailcall part 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|rakdver at gcc dot gnu dot  |hubicka at gcc dot gnu dot
                   |org                         |org
             Status|UNCONFIRMED                 |ASSIGNED


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


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

* [Bug tree-optimization/16864] [3.5 Regression] Segmentation fault during tree tail call elimination
  2004-08-03 20:06 [Bug tree-optimization/16864] New: Segmentation fault during tree tail call elimination dberlin at gcc dot gnu dot org
  2004-08-03 20:06 ` [Bug tree-optimization/16864] " dberlin at gcc dot gnu dot org
  2004-08-03 20:10 ` dberlin at gcc dot gnu dot org
@ 2004-08-03 20:49 ` pinskia at gcc dot gnu dot org
  2004-08-04 12:27 ` rakdver at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-03 20:49 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2004-08-03 20:49:02
               date|                            |
            Summary|Segmentation fault during   |[3.5 Regression]
                   |tree tail call elimination  |Segmentation fault during
                   |                            |tree tail call elimination
   Target Milestone|---                         |3.5.0


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


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

* [Bug tree-optimization/16864] [3.5 Regression] Segmentation fault during tree tail call elimination
  2004-08-03 20:06 [Bug tree-optimization/16864] New: Segmentation fault during tree tail call elimination dberlin at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-08-03 20:49 ` [Bug tree-optimization/16864] [3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-08-04 12:27 ` rakdver at gcc dot gnu dot org
  2004-08-05  8:42 ` cvs-commit at gcc dot gnu dot org
  2004-08-05  8:42 ` rakdver at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2004-08-04 12:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rakdver at gcc dot gnu dot org  2004-08-04 12:27 -------
Actually I believe the code in question is mine.

This patch should fix the problem, I will send it to gcc-patches once
it passes testing.

Index: tree-tailcall.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-tailcall.c,v
retrieving revision 2.19
diff -c -3 -p -r2.19 tree-tailcall.c
*** tree-tailcall.c     28 Jul 2004 05:13:09 -0000      2.19
--- tree-tailcall.c     4 Aug 2004 12:24:55 -0000
*************** eliminate_tail_call (struct tailcall *t)
*** 730,736 ****
        if (!phi)
        {
          tree name = var_ann (param)->default_def;
!         tree new_name = make_ssa_name (param, SSA_NAME_DEF_STMT (name));

          var_ann (param)->default_def = new_name;
          phi = create_phi_node (name, first);
--- 730,746 ----
        if (!phi)
        {
          tree name = var_ann (param)->default_def;
!         tree new_name;
!
!         if (!name)
!           {
!             /* It may happen that the tag does not have a default_def in case
!                when all uses of it are dominated by a MUST_DEF.  This however
!                means that it is not necessary to add a phi node for this
!                tag.  */
!             continue;
!           }
!         new_name = make_ssa_name (param, SSA_NAME_DEF_STMT (name));

          var_ann (param)->default_def = new_name;
          phi = create_phi_node (name, first);

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|hubicka at gcc dot gnu dot  |rakdver at gcc dot gnu dot
                   |org                         |org
           Keywords|                            |patch


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


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

* [Bug tree-optimization/16864] [3.5 Regression] Segmentation fault during tree tail call elimination
  2004-08-03 20:06 [Bug tree-optimization/16864] New: Segmentation fault during tree tail call elimination dberlin at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-08-05  8:42 ` cvs-commit at gcc dot gnu dot org
@ 2004-08-05  8:42 ` rakdver at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2004-08-05  8:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rakdver at gcc dot gnu dot org  2004-08-05 08:42 -------
Fixed.

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


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


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

* [Bug tree-optimization/16864] [3.5 Regression] Segmentation fault during tree tail call elimination
  2004-08-03 20:06 [Bug tree-optimization/16864] New: Segmentation fault during tree tail call elimination dberlin at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-08-04 12:27 ` rakdver at gcc dot gnu dot org
@ 2004-08-05  8:42 ` cvs-commit at gcc dot gnu dot org
  2004-08-05  8:42 ` rakdver at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-08-05  8:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-08-05 08:42 -------
Subject: Bug 16864

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rakdver@gcc.gnu.org	2004-08-05 08:41:57

Modified files:
	gcc            : ChangeLog tree-tailcall.c 

Log message:
	PR tree-optimization/16864
	* tree-tailcall.c (eliminate_tail_call): Do not create phi nodes
	for ssa names without default_def.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.4808&r2=2.4809
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-tailcall.c.diff?cvsroot=gcc&r1=2.19&r2=2.20



-- 


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


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

end of thread, other threads:[~2004-08-05  8:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-03 20:06 [Bug tree-optimization/16864] New: Segmentation fault during tree tail call elimination dberlin at gcc dot gnu dot org
2004-08-03 20:06 ` [Bug tree-optimization/16864] " dberlin at gcc dot gnu dot org
2004-08-03 20:10 ` dberlin at gcc dot gnu dot org
2004-08-03 20:49 ` [Bug tree-optimization/16864] [3.5 Regression] " pinskia at gcc dot gnu dot org
2004-08-04 12:27 ` rakdver at gcc dot gnu dot org
2004-08-05  8:42 ` cvs-commit at gcc dot gnu dot org
2004-08-05  8:42 ` rakdver 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).