Bug 41469 - [4.5 Regression] -fexceptions ICE in expand_gimple_stmt_1, at cfgexpand.c:1947
Summary: [4.5 Regression] -fexceptions ICE in expand_gimple_stmt_1, at cfgexpand.c:1947
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: 4.5.0
Assignee: Richard Henderson
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks: 41470
  Show dependency treegraph
 
Reported: 2009-09-25 14:00 UTC by Jan Kratochvil
Modified: 2009-09-28 11:16 UTC (History)
3 users (show)

See Also:
Host:
Target: x86_64-unknown-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-09-25 17:47:41


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kratochvil 2009-09-25 14:00:07 UTC
void
af (void *a)
{
}
void
bf (void)
{
  int i = 1;
  char v[i];
  af (v);
}

.../xgcc (-B...) -fexceptions -c -o 1.o 1.c 
1.c: In function ‘bf’:
1.c:6:1: internal compiler error: in expand_gimple_stmt_1, at cfgexpand.c:1947

xgcc (GCC) 4.5.0 20090925 (experimental)
Comment 1 Richard Biener 2009-09-25 15:03:13 UTC
Confirmed.
Comment 2 Richard Biener 2009-09-25 15:14:27 UTC
Because we have GIMPLE_RESX which we don't expect here.
Comment 3 Richard Henderson 2009-09-25 17:47:41 UTC
We're generating exception handling code when we previously didn't.
I suspect that the changes to the call location of using_eh_for_cleanups.
Comment 4 Richard Henderson 2009-09-25 20:49:27 UTC
Subject: Bug 41469

Author: rth
Date: Fri Sep 25 20:49:08 2009
New Revision: 152185

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152185
Log:
        PR middle-end/41469
        * tree-eh.c (lower_resx): Resolve RESX with no source region to
        __builtin_trap.
        (gate_lower_resx): New.
        (gate_lower_eh_dispatch): Rename from gate_lower_ehcontrol.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr41469.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-eh.c

Comment 5 Richard Biener 2009-09-28 11:16:10 UTC
Fixed.