Bug 35736 - [4.4 regression] ICE with continue and -Wall
Summary: [4.4 regression] ICE with continue and -Wall
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.4.0
: P1 normal
Target Milestone: 4.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code, monitored
: 35893 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-03-28 18:22 UTC by Volker Reichelt
Modified: 2008-07-15 04:15 UTC (History)
5 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2008-03-30 00:57:03


Attachments
Patch to fix 35736 (512 bytes, patch)
2008-07-03 16:28 UTC, Michael Meissner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Reichelt 2008-03-28 18:22:39 UTC
The following valid code snippet triggers an ICE on mainline
when compiled with "-Wall":

=========================================
void foo()
{
  while (1)
    for (;;({ continue; }))
      ;
}
=========================================

bug.c: In function 'foo':
bug.c:4: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]

The bug appeared between 2008-03-15 and 2008-03-20.
The C++ frontend is not affected.
Comment 1 Andrew Pinski 2008-03-30 00:57:02 UTC
This is a predict_expr tree.  Shouldn't TREE_SIDE_EFFECTS be set on that expression?
Comment 2 Richard Biener 2008-04-20 20:41:44 UTC
Honza?
Comment 3 Andrew Pinski 2008-05-05 05:49:07 UTC
*** Bug 35893 has been marked as a duplicate of this bug. ***
Comment 4 Michael Meissner 2008-07-03 16:23:01 UTC
Subject: Bug 35736

Author: meissner
Date: Thu Jul  3 16:22:12 2008
New Revision: 137425

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=137425
Log:
PR 35736 -- use void_type_node for PREDICT_EXPR tree

Added:
    trunk/gcc/testsuite/gcc.dg/pr35736.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/predict.c
    trunk/gcc/testsuite/ChangeLog

Comment 5 Michael Meissner 2008-07-03 16:28:06 UTC
Created attachment 15849 [details]
Patch to fix 35736

Committed in revision 137425 of the mainline.
Comment 6 Volker Reichelt 2008-07-15 04:15:42 UTC
Fixed.