public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/12688] New: ICE building tcl
@ 2003-10-20 14:37 green at redhat dot com
  2003-10-20 14:46 ` [Bug c/12688] " green at redhat dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: green at redhat dot com @ 2003-10-20 14:37 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: ICE building tcl
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: green at redhat dot com
                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

I will upload the problematic .i file.

$ gcc --version
gcc (GCC) 3.5-tree-ssa 20031019 (merged 20031017)
Copyright (C) 2003 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.
                                                                                
$ gcc -S -O1 tclUtf.i
../../../src/HEAD-2003-10-19/tcl/unix/../generic/tclUtf.c: In function
`Tcl_UtfToTitle':
                                                                                
../../../src/HEAD-2003-10-19/tcl/unix/../generic/tclUtf.c:924: internal compiler
error: in stmt_ann, at tree-flow-inline.h:54
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


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

* [Bug c/12688] ICE building tcl
  2003-10-20 14:37 [Bug c/12688] New: ICE building tcl green at redhat dot com
@ 2003-10-20 14:46 ` green at redhat dot com
  2003-10-20 14:51 ` falk at debian dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: green at redhat dot com @ 2003-10-20 14:46 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From green at redhat dot com  2003-10-20 14:37 -------
Created an attachment (id=4963)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4963&action=view)
Preprocessed input source

Compile using tree-ssa compiler with -S -O1 to reproduce the problem.


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

* [Bug c/12688] ICE building tcl
  2003-10-20 14:37 [Bug c/12688] New: ICE building tcl green at redhat dot com
  2003-10-20 14:46 ` [Bug c/12688] " green at redhat dot com
@ 2003-10-20 14:51 ` falk at debian dot org
  2003-10-20 15:17 ` [Bug c/12688] [tree-ssa] " pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: falk at debian dot org @ 2003-10-20 14:51 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From falk at debian dot org  2003-10-20 14:46 -------
I can't reproduce this on alpha-linux with 3.5-tree-ssa 20031019 (same version).
So it's probably target specific.


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

* [Bug c/12688] [tree-ssa] ICE building tcl
  2003-10-20 14:37 [Bug c/12688] New: ICE building tcl green at redhat dot com
  2003-10-20 14:46 ` [Bug c/12688] " green at redhat dot com
  2003-10-20 14:51 ` falk at debian dot org
@ 2003-10-20 15:17 ` pinskia at gcc dot gnu dot org
  2003-10-20 15:24 ` schwab at suse dot de
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-20 15:17 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
            Summary|ICE building tcl            |[tree-ssa] ICE building tcl
   Target Milestone|---                         |tree-ssa


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

* [Bug c/12688] [tree-ssa] ICE building tcl
  2003-10-20 14:37 [Bug c/12688] New: ICE building tcl green at redhat dot com
                   ` (2 preceding siblings ...)
  2003-10-20 15:17 ` [Bug c/12688] [tree-ssa] " pinskia at gcc dot gnu dot org
@ 2003-10-20 15:24 ` schwab at suse dot de
  2003-10-20 15:40 ` [Bug optimization/12688] " pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: schwab at suse dot de @ 2003-10-20 15:24 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


schwab at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schwab at suse dot de


------- Additional Comments From schwab at suse dot de  2003-10-20 15:17 -------
I get the same ICE while bootstrapping the compiler on ia64-linux, so it's 
probably not target specific.


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

* [Bug optimization/12688] [tree-ssa] ICE building tcl
  2003-10-20 14:37 [Bug c/12688] New: ICE building tcl green at redhat dot com
                   ` (3 preceding siblings ...)
  2003-10-20 15:24 ` schwab at suse dot de
@ 2003-10-20 15:40 ` pinskia at gcc dot gnu dot org
  2003-10-20 16:36 ` dnovillo at redhat dot com
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-20 15:40 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical
          Component|c                           |optimization


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-20 15:38 -------
Looks like it was introduced yesterday.


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

* [Bug optimization/12688] [tree-ssa] ICE building tcl
  2003-10-20 14:37 [Bug c/12688] New: ICE building tcl green at redhat dot com
                   ` (4 preceding siblings ...)
  2003-10-20 15:40 ` [Bug optimization/12688] " pinskia at gcc dot gnu dot org
@ 2003-10-20 16:36 ` dnovillo at redhat dot com
  2003-10-20 16:44 ` dnovillo at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dnovillo at redhat dot com @ 2003-10-20 16:36 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From dnovillo at redhat dot com  2003-10-20 16:35 -------
Subject: Re:  [tree-ssa] ICE building tcl

On Mon, 2003-10-20 at 11:38, pinskia at gcc dot gnu dot org wrote:

> Looks like it was introduced yesterday.
>
I think it may have been brought in by the latest mainline merge.  I'm
working on this now.


Diego.


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

* [Bug optimization/12688] [tree-ssa] ICE building tcl
  2003-10-20 14:37 [Bug c/12688] New: ICE building tcl green at redhat dot com
                   ` (5 preceding siblings ...)
  2003-10-20 16:36 ` dnovillo at redhat dot com
@ 2003-10-20 16:44 ` dnovillo at gcc dot gnu dot org
  2003-10-21  2:31 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2003-10-20 16:44 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


dnovillo at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |dnovillo at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-10-20 16:36:00
               date|                            |


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

* [Bug optimization/12688] [tree-ssa] ICE building tcl
  2003-10-20 14:37 [Bug c/12688] New: ICE building tcl green at redhat dot com
                   ` (6 preceding siblings ...)
  2003-10-20 16:44 ` dnovillo at gcc dot gnu dot org
@ 2003-10-21  2:31 ` cvs-commit at gcc dot gnu dot org
  2003-10-21  2:38 ` dnovillo at redhat dot com
  2003-10-21  3:05 ` dnovillo at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-10-21  2:31 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-10-21 02:18 -------
Subject: Bug 12688

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	tree-ssa-20020619-branch
Changes by:	dnovillo@gcc.gnu.org	2003-10-21 02:18:39

Modified files:
	gcc            : ChangeLog.tree-ssa tree-dfa.c tree-ssa-ccp.c 

Log message:
	Fix PR optimization/12688
	* tree-dfa.c (get_stmt_operands): Don't return early when dealing
	with an empty statement.
	* tree-ssa-ccp.c (set_rhs): If the expression has no side effects,
	replace the statement with an empty statement.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.tree-ssa.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.766&r2=1.1.2.767
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-dfa.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.4.173&r2=1.1.4.174
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-ccp.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.103&r2=1.1.2.104


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

* [Bug optimization/12688] [tree-ssa] ICE building tcl
  2003-10-20 14:37 [Bug c/12688] New: ICE building tcl green at redhat dot com
                   ` (7 preceding siblings ...)
  2003-10-21  2:31 ` cvs-commit at gcc dot gnu dot org
@ 2003-10-21  2:38 ` dnovillo at redhat dot com
  2003-10-21  3:05 ` dnovillo at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: dnovillo at redhat dot com @ 2003-10-21  2:38 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From dnovillo at redhat dot com  2003-10-21 02:35 -------
Subject: [tree-ssa] Fix folding statements into NOPs


When a statement like 'memcpy (T.241_91, (const char *)"", 0);' is
folded into 'T.241_91', we should replace the statement with a NOP
because it has no effect.

This fixes the PR and allows IA64 bootstraps to finish (only to die as
per http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12347 which I'll be
tackling next).


Diego.


	* tree-dfa.c (get_stmt_operands): Don't return early when dealing
	with an empty statement.
	* tree-ssa-ccp.c (set_rhs): If the expression has no side effects,
	replace the statement with an empty statement.

Index: tree-dfa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-dfa.c,v
retrieving revision 1.1.4.173
diff -d -c -p -d -c -p -r1.1.4.173 tree-dfa.c
*** tree-dfa.c	18 Oct 2003 03:09:47 -0000	1.1.4.173
--- tree-dfa.c	21 Oct 2003 00:09:53 -0000
*************** get_stmt_operands (tree stmt)
*** 182,189 ****
      abort ();
  #endif
  
!   /* Ignore empty and error statements.  */
!   if (IS_EMPTY_STMT (stmt) || TREE_CODE (stmt) == ERROR_MARK)
      return;
  
    /* If the statement has not been modified, the operands are still valid.  */
--- 182,189 ----
      abort ();
  #endif
  
!   /* Ignore error statements.  */
!   if (TREE_CODE (stmt) == ERROR_MARK)
      return;
  
    /* If the statement has not been modified, the operands are still valid.  */
*************** get_stmt_operands (tree stmt)
*** 288,297 ****
      default:
        /* Notice that if get_expr_operands tries to use &STMT as the operand
  	 pointer (which may only happen for USE operands), we will abort in
! 	 add_use.  This default will handle statements like CALL_EXPRs or
! 	 VA_ARG_EXPRs that may appear on the RHS of a statement or as
! 	 statements themselves.  */
!       get_expr_operands (stmt, &stmt, opf_none, prev_vops);
        break;
      }
  
--- 288,298 ----
      default:
        /* Notice that if get_expr_operands tries to use &STMT as the operand
  	 pointer (which may only happen for USE operands), we will abort in
! 	 add_use.  This default will handle statements like empty statements,
! 	 CALL_EXPRs or VA_ARG_EXPRs that may appear on the RHS of a statement
! 	 or as statements themselves.  */
!       if (!IS_EMPTY_STMT (stmt))
! 	get_expr_operands (stmt, &stmt, opf_none, prev_vops);
        break;
      }
  
Index: tree-ssa-ccp.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-ccp.c,v
retrieving revision 1.1.2.103
diff -d -c -p -d -c -p -r1.1.2.103 tree-ssa-ccp.c
*** tree-ssa-ccp.c	18 Oct 2003 03:09:47 -0000	1.1.2.103
--- tree-ssa-ccp.c	21 Oct 2003 00:09:53 -0000
*************** set_rhs (tree *stmt_p, tree expr)
*** 1750,1756 ****
    else
      {
        stmt_ann_t ann = stmt_ann (stmt);
!       *stmt_p = expr;
        (*stmt_p)->common.ann = (tree_ann) ann;
      }
  }
--- 1750,1764 ----
    else
      {
        stmt_ann_t ann = stmt_ann (stmt);
!       if (TREE_SIDE_EFFECTS (expr))
! 	*stmt_p = expr;
!       else
! 	{
! 	  /* If the expression is not a statement with side-effects, replace
! 	     the statement with a new empty statement.  */
! 	  *stmt_p = build_empty_stmt ();
! 	}
!      
        (*stmt_p)->common.ann = (tree_ann) ann;
      }
  }


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

* [Bug optimization/12688] [tree-ssa] ICE building tcl
  2003-10-20 14:37 [Bug c/12688] New: ICE building tcl green at redhat dot com
                   ` (8 preceding siblings ...)
  2003-10-21  2:38 ` dnovillo at redhat dot com
@ 2003-10-21  3:05 ` dnovillo at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2003-10-21  3:05 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


dnovillo at gcc dot gnu dot org changed:

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


------- Additional Comments From dnovillo at gcc dot gnu dot org  2003-10-21 02:40 -------

Fixed.


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

end of thread, other threads:[~2003-10-21  2:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-20 14:37 [Bug c/12688] New: ICE building tcl green at redhat dot com
2003-10-20 14:46 ` [Bug c/12688] " green at redhat dot com
2003-10-20 14:51 ` falk at debian dot org
2003-10-20 15:17 ` [Bug c/12688] [tree-ssa] " pinskia at gcc dot gnu dot org
2003-10-20 15:24 ` schwab at suse dot de
2003-10-20 15:40 ` [Bug optimization/12688] " pinskia at gcc dot gnu dot org
2003-10-20 16:36 ` dnovillo at redhat dot com
2003-10-20 16:44 ` dnovillo at gcc dot gnu dot org
2003-10-21  2:31 ` cvs-commit at gcc dot gnu dot org
2003-10-21  2:38 ` dnovillo at redhat dot com
2003-10-21  3:05 ` dnovillo 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).