public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/22013] New: ICE in gimple_add_tmp_var, at gimplify.c:535
@ 2005-06-11  6:10 marcus at jet dot franken dot de
  2005-06-11  6:11 ` [Bug c/22013] " marcus at jet dot franken dot de
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: marcus at jet dot franken dot de @ 2005-06-11  6:10 UTC (permalink / raw)
  To: gcc-bugs

Following testcase extracted from WINE crashes in gimple_add_tmp_var, at 
gimplify.c:535 
 
/home/marcus/projects/gcc/BIN/bin/gcc -O2 -c dialog.i  
dialog.i: In function 'f': 
dialog.i:8: internal compiler error: in gimple_add_tmp_var, at gimplify.c:535 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions. 
 
gcc version 4.1.0 20050610 (experimental)

-- 
           Summary: ICE in gimple_add_tmp_var, at gimplify.c:535
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: marcus at jet dot franken dot de
                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=22013


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

* [Bug c/22013] ICE in gimple_add_tmp_var, at gimplify.c:535
  2005-06-11  6:10 [Bug c/22013] New: ICE in gimple_add_tmp_var, at gimplify.c:535 marcus at jet dot franken dot de
@ 2005-06-11  6:11 ` marcus at jet dot franken dot de
  2005-06-11  9:11 ` steven at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: marcus at jet dot franken dot de @ 2005-06-11  6:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From marcus at jet dot franken dot de  2005-06-11 06:11 -------
Created an attachment (id=9067)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9067&action=view)
dialog.i

gcc -c -O2 dialog.i

-- 


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


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

* [Bug c/22013] ICE in gimple_add_tmp_var, at gimplify.c:535
  2005-06-11  6:10 [Bug c/22013] New: ICE in gimple_add_tmp_var, at gimplify.c:535 marcus at jet dot franken dot de
  2005-06-11  6:11 ` [Bug c/22013] " marcus at jet dot franken dot de
@ 2005-06-11  9:11 ` steven at gcc dot gnu dot org
  2005-06-11 14:58 ` [Bug c/22013] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-06-11  9:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-06-11 09:11 -------
Problem seems to be that the C front end assumes something without 
a DECL_NAME is not yet in the unexpanded variables list.  Don't ask 
me why :-/ 
 
Hack: 
 
Index: c-gimplify.c 
=================================================================== 
RCS file: /cvs/gcc/gcc/gcc/c-gimplify.c,v 
retrieving revision 2.30 
diff -u -3 -p -r2.30 c-gimplify.c 
--- c-gimplify.c        1 Jun 2005 02:50:51 -0000       2.30 
+++ c-gimplify.c        11 Jun 2005 09:10:51 -0000 
@@ -185,9 +185,11 @@ gimplify_compound_literal_expr (tree *ex 
   tree decl = DECL_EXPR_DECL (decl_s); 
 
   /* This decl isn't mentioned in the enclosing block, so add it to the 
-     list of temps.  FIXME it seems a bit of a kludge to say that 
-     anonymous artificial vars aren't pushed, but everything else is.  */ 
-  if (DECL_NAME (decl) == NULL_TREE) 
+     list of temps if it is not already in that list. 
+     FIXME it seems a bit of a kludge to say that anonymous artificial 
+     vars aren't pushed, but everything else is.  */ 
+  if (DECL_NAME (decl) == NULL_TREE 
+      && !DECL_SEEN_IN_BIND_EXPR_P (decl)) 
     gimple_add_tmp_var (decl); 
 
   gimplify_and_add (decl_s, pre_p); 
 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-06-11 09:11:54
               date|                            |


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


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

* [Bug c/22013] [4.0/4.1 Regression] ICE in gimple_add_tmp_var, at gimplify.c:535
  2005-06-11  6:10 [Bug c/22013] New: ICE in gimple_add_tmp_var, at gimplify.c:535 marcus at jet dot franken dot de
  2005-06-11  6:11 ` [Bug c/22013] " marcus at jet dot franken dot de
  2005-06-11  9:11 ` steven at gcc dot gnu dot org
@ 2005-06-11 14:58 ` pinskia at gcc dot gnu dot org
  2005-06-13 15:15 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-11 14:58 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-06-11 14:58 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia 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           |
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|2005-06-11 09:11:54         |2005-06-11 14:58:56
               date|                            |
            Summary|ICE in gimple_add_tmp_var,  |[4.0/4.1 Regression] ICE in
                   |at gimplify.c:535           |gimple_add_tmp_var, at
                   |                            |gimplify.c:535
   Target Milestone|---                         |4.0.1


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


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

* [Bug c/22013] [4.0/4.1 Regression] ICE in gimple_add_tmp_var, at gimplify.c:535
  2005-06-11  6:10 [Bug c/22013] New: ICE in gimple_add_tmp_var, at gimplify.c:535 marcus at jet dot franken dot de
                   ` (2 preceding siblings ...)
  2005-06-11 14:58 ` [Bug c/22013] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-06-13 15:15 ` pinskia at gcc dot gnu dot org
  2005-06-30 15:00 ` jsm28 at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-13 15:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-06-13 15:15 -------
*** Bug 22050 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at redhat dot com


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


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

* [Bug c/22013] [4.0/4.1 Regression] ICE in gimple_add_tmp_var, at gimplify.c:535
  2005-06-11  6:10 [Bug c/22013] New: ICE in gimple_add_tmp_var, at gimplify.c:535 marcus at jet dot franken dot de
                   ` (3 preceding siblings ...)
  2005-06-13 15:15 ` pinskia at gcc dot gnu dot org
@ 2005-06-30 15:00 ` jsm28 at gcc dot gnu dot org
  2005-07-05 17:50 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2005-06-30 15:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jsm28 at gcc dot gnu dot org  2005-06-30 15:00 -------
Testing a patch for bugs 22013 and 22098.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jsm28 at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-06-11 14:58:56         |2005-06-30 15:00:16
               date|                            |


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


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

* [Bug c/22013] [4.0/4.1 Regression] ICE in gimple_add_tmp_var, at gimplify.c:535
  2005-06-11  6:10 [Bug c/22013] New: ICE in gimple_add_tmp_var, at gimplify.c:535 marcus at jet dot franken dot de
                   ` (4 preceding siblings ...)
  2005-06-30 15:00 ` jsm28 at gcc dot gnu dot org
@ 2005-07-05 17:50 ` cvs-commit at gcc dot gnu dot org
  2005-07-05 19:50 ` [Bug c/22013] [4.0 " pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-07-05 17:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-07-05 17:50 -------
Subject: Bug 22013

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	jsm28@gcc.gnu.org	2005-07-05 17:50:24

Modified files:
	gcc            : ChangeLog c-objc-common.h c-tree.h c-typeck.c 
	                 langhooks-def.h langhooks.c langhooks.h tree.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/compile: pr22013-1.c 
	gcc/testsuite/gcc.c-torture/execute: pr22098-1.c pr22098-2.c 
	                                     pr22098-3.c 

Log message:
	PR c/22013
	PR c/22098
	* langhooks.h (struct lang_hooks): Add expr_to_decl.
	* langhooks.c (lhd_expr_to_decl): New.
	* langhooks-def.h (lhd_expr_to_decl, LANG_HOOKS_EXPR_TO_DECL):
	New.
	(LANG_HOOKS_INITIALIZER): Update.
	* tree.c (recompute_tree_invarant_for_addr_expr): Call
	expr_to_decl langhook.
	* c-tree.h (c_expr_to_decl): Declare.
	* c-typeck.c (c_expr_to_decl): New.
	(build_unary_op): Do not handle ADDR_EXPR of COMPOUND_LITERAL_EXPR
	specially.
	* c-objc-common.h (LANG_HOOKS_EXPR_TO_DECL): Define.
	
	testsuite:
	* gcc.c-torture/compile/pr22013-1.c,
	gcc.c-torture/execute/pr22098-1.c,
	gcc.c-torture/execute/pr22098-2.c,
	gcc.c-torture/execute/pr22098-3.c: New tests.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9345&r2=2.9346
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-objc-common.h.diff?cvsroot=gcc&r1=2.7&r2=2.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-tree.h.diff?cvsroot=gcc&r1=1.207&r2=1.208
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&r1=1.463&r2=1.464
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/langhooks-def.h.diff?cvsroot=gcc&r1=1.99&r2=1.100
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/langhooks.c.diff?cvsroot=gcc&r1=1.83&r2=1.84
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/langhooks.h.diff?cvsroot=gcc&r1=1.107&r2=1.108
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree.c.diff?cvsroot=gcc&r1=1.493&r2=1.494
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5725&r2=1.5726
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/pr22013-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/pr22098-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/pr22098-2.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/pr22098-3.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug c/22013] [4.0 Regression] ICE in gimple_add_tmp_var, at gimplify.c:535
  2005-06-11  6:10 [Bug c/22013] New: ICE in gimple_add_tmp_var, at gimplify.c:535 marcus at jet dot franken dot de
                   ` (5 preceding siblings ...)
  2005-07-05 17:50 ` cvs-commit at gcc dot gnu dot org
@ 2005-07-05 19:50 ` pinskia at gcc dot gnu dot org
  2005-07-08 13:09 ` cvs-commit at gcc dot gnu dot org
  2005-07-08 14:48 ` pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-05 19:50 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.0/4.1 Regression] ICE in |[4.0 Regression] ICE in
                   |gimple_add_tmp_var, at      |gimple_add_tmp_var, at
                   |gimplify.c:535              |gimplify.c:535
   Target Milestone|4.0.1                       |4.0.2


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


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

* [Bug c/22013] [4.0 Regression] ICE in gimple_add_tmp_var, at gimplify.c:535
  2005-06-11  6:10 [Bug c/22013] New: ICE in gimple_add_tmp_var, at gimplify.c:535 marcus at jet dot franken dot de
                   ` (6 preceding siblings ...)
  2005-07-05 19:50 ` [Bug c/22013] [4.0 " pinskia at gcc dot gnu dot org
@ 2005-07-08 13:09 ` cvs-commit at gcc dot gnu dot org
  2005-07-08 14:48 ` pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-07-08 13:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-07-08 13:09 -------
Subject: Bug 22013

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	jsm28@gcc.gnu.org	2005-07-08 13:08:15

Modified files:
	gcc            : ChangeLog c-objc-common.h c-tree.h c-typeck.c 
	                 langhooks-def.h langhooks.c langhooks.h tree.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/compile: pr22013-1.c 
	gcc/testsuite/gcc.c-torture/execute: pr22098-1.c pr22098-2.c 
	                                     pr22098-3.c 

Log message:
	PR c/22013
	PR c/22098
	* langhooks.h (struct lang_hooks): Add expr_to_decl.
	* langhooks.c (lhd_expr_to_decl): New.
	* langhooks-def.h (lhd_expr_to_decl, LANG_HOOKS_EXPR_TO_DECL):
	New.
	(LANG_HOOKS_INITIALIZER): Update.
	* tree.c (recompute_tree_invarant_for_addr_expr): Call
	expr_to_decl langhook.
	* c-tree.h (c_expr_to_decl): Declare.
	* c-typeck.c (c_expr_to_decl): New.
	(build_unary_op): Do not handle ADDR_EXPR of COMPOUND_LITERAL_EXPR
	specially.
	* c-objc-common.h (LANG_HOOKS_EXPR_TO_DECL): Define.
	
	testsuite:
	* gcc.c-torture/compile/pr22013-1.c,
	gcc.c-torture/execute/pr22098-1.c,
	gcc.c-torture/execute/pr22098-2.c,
	gcc.c-torture/execute/pr22098-3.c: New tests.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.297&r2=2.7592.2.298
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-objc-common.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.4&r2=2.4.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-tree.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.193.4.4&r2=1.193.4.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.419.2.7&r2=1.419.2.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/langhooks-def.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.97&r2=1.97.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/langhooks.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.81&r2=1.81.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/langhooks.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.104&r2=1.104.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.466.4.4&r2=1.466.4.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.249&r2=1.5084.2.250
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/pr22013-1.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.6.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/pr22098-1.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.6.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/pr22098-2.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.6.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/pr22098-3.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.6.1



-- 


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


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

* [Bug c/22013] [4.0 Regression] ICE in gimple_add_tmp_var, at gimplify.c:535
  2005-06-11  6:10 [Bug c/22013] New: ICE in gimple_add_tmp_var, at gimplify.c:535 marcus at jet dot franken dot de
                   ` (7 preceding siblings ...)
  2005-07-08 13:09 ` cvs-commit at gcc dot gnu dot org
@ 2005-07-08 14:48 ` pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-08 14:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-08 14:48 -------
Fixed for 4.0.2 and above.

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


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


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

end of thread, other threads:[~2005-07-08 14:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-11  6:10 [Bug c/22013] New: ICE in gimple_add_tmp_var, at gimplify.c:535 marcus at jet dot franken dot de
2005-06-11  6:11 ` [Bug c/22013] " marcus at jet dot franken dot de
2005-06-11  9:11 ` steven at gcc dot gnu dot org
2005-06-11 14:58 ` [Bug c/22013] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-06-13 15:15 ` pinskia at gcc dot gnu dot org
2005-06-30 15:00 ` jsm28 at gcc dot gnu dot org
2005-07-05 17:50 ` cvs-commit at gcc dot gnu dot org
2005-07-05 19:50 ` [Bug c/22013] [4.0 " pinskia at gcc dot gnu dot org
2005-07-08 13:09 ` cvs-commit at gcc dot gnu dot org
2005-07-08 14:48 ` pinskia 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).