public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/13767] New: [tree-ssa] ICE in verify_flow_info
@ 2004-01-20 10:54 steven at gcc dot gnu dot org
  2004-01-20 11:11 ` [Bug middle-end/13767] " steven at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-01-20 10:54 UTC (permalink / raw)
  To: gcc-bugs

static int b, c = 1; 
 
int main (void) 
{ 
  __label__ L1; 
 
  void t (int *a) 
  { 
    *a = 0; 
    goto L1; 
  } 
 
  b = 1; 
  if (!c) 
    goto L1; 
 
  t (&b); 
  abort (); 
 
L1: 
  if (b != 0) 
    abort (); 
  return 0; 
} 
 
$ gcc-ssa f.c -O 
f.c: In function `main': 
f.c:4: error: Fallthru edge after a control statement in bb 1 
f.c:4: error: Wrong outgoing edge flags at end of bb 1 
f.c:4: internal compiler error: verify_flow_info failed 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

-- 
           Summary: [tree-ssa] ICE in verify_flow_info
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: steven at gcc dot gnu dot org
                CC: dnovillo at redhat dot com,gcc-bugs at gcc dot gnu dot
                    org


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


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

* [Bug middle-end/13767] [tree-ssa] ICE in verify_flow_info
  2004-01-20 10:54 [Bug middle-end/13767] New: [tree-ssa] ICE in verify_flow_info steven at gcc dot gnu dot org
@ 2004-01-20 11:11 ` steven at gcc dot gnu dot org
  2004-01-20 11:21 ` steven at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-01-20 11:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-01-20 11:11 -------
Another example of why GOTO's in the CFG suck ;-) 
The GOTO to L1 is redundant but it's not killed because it 
jumps to a nonlocal label. 
 
(gdb) p debug_tree_cfg (0) 
main () 
{ 
  static  t; 
  void L1 = <<< error >>>; 
  int c.1; 
 
  # BLOCK 0 
  # PRED: ENTRY (fallthru) 
  c.1 = c; 
  if (c.1 == 0) goto <L0>; else goto <L1>; 
  # SUCC: 2 (false) 1 (true) 
 
  # BLOCK 1 
  # PRED: 0 (true) 
<L0>:; 
  goto L1; 
  # SUCC: 2 (fallthru) 
 
  # BLOCK 2 
  # PRED: 1 (fallthru) 0 (false) 
<L1>:; 
  t (); 
  # SUCC: 3 (fallthru) 4 (ab) 
 
  # BLOCK 3 
  # PRED: 2 (fallthru) 
  abort (); 
  # SUCC: 4 (ab) 
 
  # BLOCK 4 
  # PRED: ENTRY (ab) 3 (ab) 2 (ab) 
L1:; 
  return 0; 
  # SUCC: EXIT 
} 
 

-- 


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


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

* [Bug middle-end/13767] [tree-ssa] ICE in verify_flow_info
  2004-01-20 10:54 [Bug middle-end/13767] New: [tree-ssa] ICE in verify_flow_info steven at gcc dot gnu dot org
  2004-01-20 11:11 ` [Bug middle-end/13767] " steven at gcc dot gnu dot org
@ 2004-01-20 11:21 ` steven at gcc dot gnu dot org
  2004-01-20 15:28 ` [Bug optimization/13767] " pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-01-20 11:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-01-20 11:21 -------
Not sure, but I'd say all gotos to labels in the same function context 
are simple gotos. 
 
	* tree-cfg.c (simple_goto_p):  
 
Index: tree-cfg.c 
=================================================================== 
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-cfg.c,v 
retrieving revision 1.1.4.261 
diff -c -3 -p -r1.1.4.261 tree-cfg.c 
*** tree-cfg.c  20 Jan 2004 11:17:44 -0000      1.1.4.261 
--- tree-cfg.c  20 Jan 2004 11:18:26 -0000 
*************** simple_goto_p (tree expr) 
*** 2197,2203 **** 
  { 
    return  (TREE_CODE (expr) == GOTO_EXPR 
           && TREE_CODE (GOTO_DESTINATION (expr)) == LABEL_DECL 
-          && ! NONLOCAL_LABEL (GOTO_DESTINATION (expr)) 
           && (decl_function_context (GOTO_DESTINATION (expr)) 
               == current_function_decl)); 
  } 
--- 2197,2202 ---- 

-- 


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


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

* [Bug optimization/13767] [tree-ssa] ICE in verify_flow_info
  2004-01-20 10:54 [Bug middle-end/13767] New: [tree-ssa] ICE in verify_flow_info steven at gcc dot gnu dot org
  2004-01-20 11:11 ` [Bug middle-end/13767] " steven at gcc dot gnu dot org
  2004-01-20 11:21 ` steven at gcc dot gnu dot org
@ 2004-01-20 15:28 ` pinskia at gcc dot gnu dot org
  2004-01-20 15:30 ` steven at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-20 15:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-20 15:28 -------
Confirmed.
From: Search converges between 2003-12-03-ssa (#146) and 2003-12-04-ssa (#147).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|middle-end                  |optimization
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-01-20 15:28:07
               date|                            |
   Target Milestone|---                         |tree-ssa


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


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

* [Bug optimization/13767] [tree-ssa] ICE in verify_flow_info
  2004-01-20 10:54 [Bug middle-end/13767] New: [tree-ssa] ICE in verify_flow_info steven at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-01-20 15:28 ` [Bug optimization/13767] " pinskia at gcc dot gnu dot org
@ 2004-01-20 15:30 ` steven at gcc dot gnu dot org
  2004-01-21 21:36 ` rth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-01-20 15:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-01-20 15:30 -------
2003-12-03 is when the flow checking code was contributed. 
The bug is not in the checking code, the goto should not be there 
because the block falls through. 

-- 


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


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

* [Bug optimization/13767] [tree-ssa] ICE in verify_flow_info
  2004-01-20 10:54 [Bug middle-end/13767] New: [tree-ssa] ICE in verify_flow_info steven at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-01-20 15:30 ` steven at gcc dot gnu dot org
@ 2004-01-21 21:36 ` rth at gcc dot gnu dot org
  2004-01-23  1:14 ` cvs-commit at gcc dot gnu dot org
  2004-01-23  1:14 ` rth at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-01-21 21:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rth at gcc dot gnu dot org  2004-01-21 21:36 -------
(In reply to comment #2)
> Not sure, but I'd say all gotos to labels in the same function context 
> are simple gotos. 

Correct.  The patch is fine, though the ChangeLog entry
needs a bit o work...  ;-)


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |steven at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
           Keywords|                            |patch


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


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

* [Bug optimization/13767] [tree-ssa] ICE in verify_flow_info
  2004-01-20 10:54 [Bug middle-end/13767] New: [tree-ssa] ICE in verify_flow_info steven at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-01-21 21:36 ` rth at gcc dot gnu dot org
@ 2004-01-23  1:14 ` cvs-commit at gcc dot gnu dot org
  2004-01-23  1:14 ` rth at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-01-23  1:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-01-23 01:13 -------
Subject: Bug 13767

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	tree-ssa-20020619-branch
Changes by:	rth@gcc.gnu.org	2004-01-23 01:13:53

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

Log message:
	PR opt/13767
	* tree-cfg.c (simple_goto_p): Remove NONLOCAL_LABEL check.

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.1123&r2=1.1.2.1124
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-cfg.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.4.261&r2=1.1.4.262



-- 


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


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

* [Bug optimization/13767] [tree-ssa] ICE in verify_flow_info
  2004-01-20 10:54 [Bug middle-end/13767] New: [tree-ssa] ICE in verify_flow_info steven at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2004-01-23  1:14 ` cvs-commit at gcc dot gnu dot org
@ 2004-01-23  1:14 ` rth at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-01-23  1:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rth at gcc dot gnu dot org  2004-01-23 01:14 -------
I committed the patch, since it was in my tree after testing.

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


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


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

end of thread, other threads:[~2004-01-23  1:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-20 10:54 [Bug middle-end/13767] New: [tree-ssa] ICE in verify_flow_info steven at gcc dot gnu dot org
2004-01-20 11:11 ` [Bug middle-end/13767] " steven at gcc dot gnu dot org
2004-01-20 11:21 ` steven at gcc dot gnu dot org
2004-01-20 15:28 ` [Bug optimization/13767] " pinskia at gcc dot gnu dot org
2004-01-20 15:30 ` steven at gcc dot gnu dot org
2004-01-21 21:36 ` rth at gcc dot gnu dot org
2004-01-23  1:14 ` cvs-commit at gcc dot gnu dot org
2004-01-23  1:14 ` rth 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).