public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/54957] New: Two crashes introduced by rev192488
@ 2012-10-17 18:03 rmansfield at qnx dot com
  2012-10-17 18:04 ` [Bug middle-end/54957] " pinskia at gcc dot gnu.org
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: rmansfield at qnx dot com @ 2012-10-17 18:03 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 54957
           Summary: Two crashes introduced by rev192488
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rmansfield@qnx.com
                CC: eraman@google.com


http://gcc.gnu.org/viewcvs?view=revision&revision=192488


sh4-unknown-linux-gnu no longer builds libgcc.

0x7df7df emit_cmp_and_jump_insn_1
    ../../gcc/optabs.c:4273
0x7df7df emit_cmp_and_jump_insns(rtx_def*, rtx_def*, rtx_code, rtx_def*,
machine_mode, int, rtx_def*, int)
    ../../gcc/optabs.c:4324
0x6136f6 do_compare_rtx_and_jump(rtx_def*, rtx_def*, rtx_code, int,
machine_mode, rtx_def*, rtx_def*, rtx_def*, int)
    ../../gcc/dojump.c:1072
0x61479b do_compare_and_jump
    ../../gcc/dojump.c:1154
0x6164c1 do_jump_1(tree_code, tree_node*, tree_node*, rtx_def*, rtx_def*, int)
    ../../gcc/dojump.c:206
0x5ba1de expand_gimple_cond
    ../../gcc/cfgexpand.c:1852
0x5c1b9b expand_gimple_basic_block
    ../../gcc/cfgexpand.c:3832
0x5c2ec5 gimple_expand_cfg
    ../../gcc/cfgexpand.c:4477
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.


arm-unknown-linux-gnu (not EABI) crashes building libstdc++-v3 (compiling
thread.cc)

Program received signal SIGSEGV, Segmentation fault.
0x087696fb in emit_case_dispatch_table (index_expr=0x1121f18, 
    index_type=0x1403c0, case_list=0xa7de974, default_label=0x125e18c, 
    minval=0x12b690, maxval=0x12bbf4, range=0x12bbf4, stmt_bb=0x0)
    at /builds/gnu-gcc-trunk/svn/arm-oabi/../gcc/stmt.c:1919


#0  0x087696fb in emit_case_dispatch_table (index_expr=0x1121f18, 
    index_type=0x1403c0, case_list=0xa7de974, default_label=0x125e18c, 
    minval=0x12b690, maxval=0x12bbf4, range=0x12bbf4, stmt_bb=0x0)
    at /builds/gnu-gcc-trunk/svn/arm-oabi/../gcc/stmt.c:1919
#1  0x08769fab in expand_sjlj_dispatch_table (dispatch_index=0x125bc9c, 
    dispatch_table=0xa7b2be0)
    at /builds/gnu-gcc-trunk/svn/arm-oabi/../gcc/stmt.c:2292
#2  0x084deedd in sjlj_emit_dispatch_table (dispatch_label=0x125a924, 
    num_dispatch=6)
    at /builds/gnu-gcc-trunk/svn/arm-oabi/../gcc/except.c:1363
#3  0x084df160 in sjlj_build_landing_pads ()
    at /builds/gnu-gcc-trunk/svn/arm-oabi/../gcc/except.c:1420
#4  0x084df5fe in finish_eh_generation ()
    at /builds/gnu-gcc-trunk/svn/arm-oabi/../gcc/except.c:1454
#5  0x08430102 in gimple_expand_cfg ()
    at /builds/gnu-gcc-trunk/svn/arm-oabi/../gcc/cfgexpand.c:4579
#6  0x086d148a in execute_one_pass (pass=0x9094900)
    at /builds/gnu-gcc-trunk/svn/arm-oabi/../gcc/passes.c:2320
#7  0x086d1a4d in execute_pass_list (pass=0x9094900)
    at /builds/gnu-gcc-trunk/svn/arm-oabi/../gcc/passes.c:2381


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

* [Bug middle-end/54957] Two crashes introduced by rev192488
  2012-10-17 18:03 [Bug middle-end/54957] New: Two crashes introduced by rev192488 rmansfield at qnx dot com
@ 2012-10-17 18:04 ` pinskia at gcc dot gnu.org
  2012-10-17 18:05 ` rmansfield at qnx dot com
                   ` (20 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-10-17 18:04 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-10-17 18:04:16 UTC ---
> arm-unknown-linux-gnu (not EABI) 
I thought that support was removed.


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

* [Bug middle-end/54957] Two crashes introduced by rev192488
  2012-10-17 18:03 [Bug middle-end/54957] New: Two crashes introduced by rev192488 rmansfield at qnx dot com
  2012-10-17 18:04 ` [Bug middle-end/54957] " pinskia at gcc dot gnu.org
@ 2012-10-17 18:05 ` rmansfield at qnx dot com
  2012-10-17 18:08 ` eraman at google dot com
                   ` (19 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: rmansfield at qnx dot com @ 2012-10-17 18:05 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Ryan Mansfield <rmansfield at qnx dot com> 2012-10-17 18:04:49 UTC ---
Created attachment 28464
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28464
preprocessed src (not reduced)


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

* [Bug middle-end/54957] Two crashes introduced by rev192488
  2012-10-17 18:03 [Bug middle-end/54957] New: Two crashes introduced by rev192488 rmansfield at qnx dot com
  2012-10-17 18:04 ` [Bug middle-end/54957] " pinskia at gcc dot gnu.org
  2012-10-17 18:05 ` rmansfield at qnx dot com
@ 2012-10-17 18:08 ` eraman at google dot com
  2012-10-17 18:10 ` rmansfield at qnx dot com
                   ` (18 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: eraman at google dot com @ 2012-10-17 18:08 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #3 from Easwaran Raman <eraman at google dot com> 2012-10-17 18:08:24 UTC ---
(In reply to comment #0)
> http://gcc.gnu.org/viewcvs?view=revision&revision=192488
> 
> 
> sh4-unknown-linux-gnu no longer builds libgcc.
> 
> 0x7df7df emit_cmp_and_jump_insn_1
>     ../../gcc/optabs.c:4273
> 0x7df7df emit_cmp_and_jump_insns(rtx_def*, rtx_def*, rtx_code, rtx_def*,
> machine_mode, int, rtx_def*, int)
>     ../../gcc/optabs.c:4324
> 0x6136f6 do_compare_rtx_and_jump(rtx_def*, rtx_def*, rtx_code, int,
> machine_mode, rtx_def*, rtx_def*, rtx_def*, int)
>     ../../gcc/dojump.c:1072
> 0x61479b do_compare_and_jump
>     ../../gcc/dojump.c:1154
> 0x6164c1 do_jump_1(tree_code, tree_node*, tree_node*, rtx_def*, rtx_def*, int)
>     ../../gcc/dojump.c:206
> 0x5ba1de expand_gimple_cond
>     ../../gcc/cfgexpand.c:1852
> 0x5c1b9b expand_gimple_basic_block
>     ../../gcc/cfgexpand.c:3832
> 0x5c2ec5 gimple_expand_cfg
>     ../../gcc/cfgexpand.c:4477
> Please submit a full bug report,
> with preprocessed source if appropriate.
> Please include the complete backtrace with any bug report.
> See <http://gcc.gnu.org/bugs.html> for instructions.
> 

The first one seems a dup of http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54938.
The obvious fix is to remove the assert. Will send out a patch.


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

* [Bug middle-end/54957] Two crashes introduced by rev192488
  2012-10-17 18:03 [Bug middle-end/54957] New: Two crashes introduced by rev192488 rmansfield at qnx dot com
                   ` (2 preceding siblings ...)
  2012-10-17 18:08 ` eraman at google dot com
@ 2012-10-17 18:10 ` rmansfield at qnx dot com
  2012-10-17 18:25 ` eraman at google dot com
                   ` (17 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: rmansfield at qnx dot com @ 2012-10-17 18:10 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #4 from Ryan Mansfield <rmansfield at qnx dot com> 2012-10-17 18:10:25 UTC ---
(In reply to comment #1)
> > arm-unknown-linux-gnu (not EABI) 
> I thought that support was removed.

I have a local patch re-enabling it, but I don't think it's specific to the
configuration. Do you? I can try to reproduce it on another target..


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

* [Bug middle-end/54957] Two crashes introduced by rev192488
  2012-10-17 18:03 [Bug middle-end/54957] New: Two crashes introduced by rev192488 rmansfield at qnx dot com
                   ` (3 preceding siblings ...)
  2012-10-17 18:10 ` rmansfield at qnx dot com
@ 2012-10-17 18:25 ` eraman at google dot com
  2012-10-17 18:26 ` eraman at google dot com
                   ` (16 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: eraman at google dot com @ 2012-10-17 18:25 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from Easwaran Raman <eraman at google dot com> 2012-10-17 18:24:48 UTC ---
Created attachment 28465
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28465
Proposed patch


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

* [Bug middle-end/54957] Two crashes introduced by rev192488
  2012-10-17 18:03 [Bug middle-end/54957] New: Two crashes introduced by rev192488 rmansfield at qnx dot com
                   ` (4 preceding siblings ...)
  2012-10-17 18:25 ` eraman at google dot com
@ 2012-10-17 18:26 ` eraman at google dot com
  2012-10-17 18:30 ` rmansfield at qnx dot com
                   ` (15 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: eraman at google dot com @ 2012-10-17 18:26 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #6 from Easwaran Raman <eraman at google dot com> 2012-10-17 18:26:30 UTC ---
(In reply to comment #5)
> Created attachment 28465 [details]
> Proposed patch

I haven't tested the patch. Ryan, could you please confirm this patch fixes the
crashes?

Thanks,
Easwaran


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

* [Bug middle-end/54957] Two crashes introduced by rev192488
  2012-10-17 18:03 [Bug middle-end/54957] New: Two crashes introduced by rev192488 rmansfield at qnx dot com
                   ` (5 preceding siblings ...)
  2012-10-17 18:26 ` eraman at google dot com
@ 2012-10-17 18:30 ` rmansfield at qnx dot com
  2012-10-17 18:56 ` eraman at google dot com
                   ` (14 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: rmansfield at qnx dot com @ 2012-10-17 18:30 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #7 from Ryan Mansfield <rmansfield at qnx dot com> 2012-10-17 18:29:45 UTC ---
(In reply to comment #6)
> (In reply to comment #5)
> > Created attachment 28465 [details]
> > Proposed patch
> 
> I haven't tested the patch. Ryan, could you please confirm this patch fixes the
> crashes?

The patch fixes the crash in emit_cmp_and_jump_insn_1, but not the one in
emit_case_dispatch_table.


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

* [Bug middle-end/54957] Two crashes introduced by rev192488
  2012-10-17 18:03 [Bug middle-end/54957] New: Two crashes introduced by rev192488 rmansfield at qnx dot com
                   ` (6 preceding siblings ...)
  2012-10-17 18:30 ` rmansfield at qnx dot com
@ 2012-10-17 18:56 ` eraman at google dot com
  2012-10-17 19:05 ` rmansfield at qnx dot com
                   ` (13 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: eraman at google dot com @ 2012-10-17 18:56 UTC (permalink / raw)
  To: gcc-bugs


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

Easwaran Raman <eraman at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #28465|0                           |1
        is obsolete|                            |

--- Comment #8 from Easwaran Raman <eraman at google dot com> 2012-10-17 18:56:14 UTC ---
Created attachment 28466
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28466
Proposed patch

Handle the possibility that stmt_bb may be NULL in emit_case_dispatch_table.
Untested.


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

* [Bug middle-end/54957] Two crashes introduced by rev192488
  2012-10-17 18:03 [Bug middle-end/54957] New: Two crashes introduced by rev192488 rmansfield at qnx dot com
                   ` (7 preceding siblings ...)
  2012-10-17 18:56 ` eraman at google dot com
@ 2012-10-17 19:05 ` rmansfield at qnx dot com
  2012-10-17 19:47 ` rmansfield at qnx dot com
                   ` (12 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: rmansfield at qnx dot com @ 2012-10-17 19:05 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #9 from Ryan Mansfield <rmansfield at qnx dot com> 2012-10-17 19:05:36 UTC ---
(In reply to comment #8)
> Created attachment 28466 [details]
> Proposed patch
> 
> Handle the possibility that stmt_bb may be NULL in emit_case_dispatch_table.
> Untested.

I was able to reproduce the crash in emit_case_dispatch_table on a stock 
sh4-unknown-linux-gnu configuration with another testcase. This patch fixes the
all crashes I've seen so far.


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

* [Bug middle-end/54957] Two crashes introduced by rev192488
  2012-10-17 18:03 [Bug middle-end/54957] New: Two crashes introduced by rev192488 rmansfield at qnx dot com
                   ` (8 preceding siblings ...)
  2012-10-17 19:05 ` rmansfield at qnx dot com
@ 2012-10-17 19:47 ` rmansfield at qnx dot com
  2012-10-17 20:31 ` eraman at google dot com
                   ` (11 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: rmansfield at qnx dot com @ 2012-10-17 19:47 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #10 from Ryan Mansfield <rmansfield at qnx dot com> 2012-10-17 19:47:08 UTC ---
Created attachment 28467
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28467
emit_case_dispatch_table testcase

Here's a csmith generated testcase that crashes with -O0 -fexceptions on
sh4-unknown-linux-gnu. It's slightly reduced but I can reduce it further by
hand if necessary.


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

* [Bug middle-end/54957] Two crashes introduced by rev192488
  2012-10-17 18:03 [Bug middle-end/54957] New: Two crashes introduced by rev192488 rmansfield at qnx dot com
                   ` (9 preceding siblings ...)
  2012-10-17 19:47 ` rmansfield at qnx dot com
@ 2012-10-17 20:31 ` eraman at google dot com
  2012-10-17 20:39 ` rmansfield at qnx dot com
                   ` (10 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: eraman at google dot com @ 2012-10-17 20:31 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #11 from Easwaran Raman <eraman at google dot com> 2012-10-17 20:31:21 UTC ---
(In reply to comment #10)
> Created attachment 28467 [details]
> emit_case_dispatch_table testcase
> 
> Here's a csmith generated testcase that crashes with -O0 -fexceptions on
> sh4-unknown-linux-gnu. It's slightly reduced but I can reduce it further by
> hand if necessary.

Does my second patch fix this as well or is it still there?

- Easwaran


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

* [Bug middle-end/54957] Two crashes introduced by rev192488
  2012-10-17 18:03 [Bug middle-end/54957] New: Two crashes introduced by rev192488 rmansfield at qnx dot com
                   ` (10 preceding siblings ...)
  2012-10-17 20:31 ` eraman at google dot com
@ 2012-10-17 20:39 ` rmansfield at qnx dot com
  2012-10-22 23:37 ` amylaar at gcc dot gnu.org
                   ` (9 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: rmansfield at qnx dot com @ 2012-10-17 20:39 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #12 from Ryan Mansfield <rmansfield at qnx dot com> 2012-10-17 20:38:56 UTC ---
(In reply to comment #11)
> (In reply to comment #10)
> > Created attachment 28467 [details]
> > emit_case_dispatch_table testcase
> > 
> > Here's a csmith generated testcase that crashes with -O0 -fexceptions on
> > sh4-unknown-linux-gnu. It's slightly reduced but I can reduce it further by
> > hand if necessary.
> 
> Does my second patch fix this as well or is it still there?

Sorry for being unclear. Yes, it fixes the crash. I was attaching it in as a
reference.


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

* [Bug middle-end/54957] Two crashes introduced by rev192488
  2012-10-17 18:03 [Bug middle-end/54957] New: Two crashes introduced by rev192488 rmansfield at qnx dot com
                   ` (11 preceding siblings ...)
  2012-10-17 20:39 ` rmansfield at qnx dot com
@ 2012-10-22 23:37 ` amylaar at gcc dot gnu.org
  2012-10-23 17:10 ` uweigand at gcc dot gnu.org
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: amylaar at gcc dot gnu.org @ 2012-10-22 23:37 UTC (permalink / raw)
  To: gcc-bugs


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

Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-10-22
                 CC|                            |amylaar at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #13 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> 2012-10-22 23:37:07 UTC ---
(In reply to comment #0)

> Program received signal SIGSEGV, Segmentation fault.
> 0x087696fb in emit_case_dispatch_table (index_expr=0x1121f18, 
>     index_type=0x1403c0, case_list=0xa7de974, default_label=0x125e18c, 
>     minval=0x12b690, maxval=0x12bbf4, range=0x12bbf4, stmt_bb=0x0)
>     at /builds/gnu-gcc-trunk/svn/arm-oabi/../gcc/stmt.c:1919
> 
> 
> #0  0x087696fb in emit_case_dispatch_table (index_expr=0x1121f18, 
>     index_type=0x1403c0, case_list=0xa7de974, default_label=0x125e18c, 
>     minval=0x12b690, maxval=0x12bbf4, range=0x12bbf4, stmt_bb=0x0)
>     at /builds/gnu-gcc-trunk/svn/arm-oabi/../gcc/stmt.c:1919
> #1  0x08769fab in expand_sjlj_dispatch_table (dispatch_index=0x125bc9c, 
>     dispatch_table=0xa7b2be0)
>     at /builds/gnu-gcc-trunk/svn/arm-oabi/../gcc/stmt.c:2292

I got essentially the same here for arc-elf32:

Starting program: /home/joern/synopsys/arc_gnu_4.8-r192641/bd-elf32/gcc/cc1plus
-fpreprocessed complex_io.ii -quiet -dumpbase complex_io.cc -auxbase-strip
complex_io.o -g -O2 -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi -version
-fno-implicit-templates -fdiagnostics-show-location=once -ffunction-sections
-fdata-sections -frandom-seed=complex_io.lo -o complex_io.s
GNU C++ (ARCompact elf32 toolchain (built 20121023)) version 4.8.0 20121020
(experimental) (arc-elf32)
        compiled by GNU C version 4.7.2 20120921 (Red Hat 4.7.2-2), GMP version
5.0.2, MPFR version 3.1.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C++ (ARCompact elf32 toolchain (built 20121023)) version 4.8.0 20121020
(experimental) (arc-elf32)
        compiled by GNU C version 4.7.2 20120921 (Red Hat 4.7.2-2), GMP version
5.0.2, MPFR version 3.1.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: ee7ca61d2a64c77d0855e3f95c0f285e

Program received signal SIGSEGV, Segmentation fault.
0x086ac657 in emit_case_dispatch_table (
    index_expr=index_expr@entry=0xb7081508, 
    index_type=index_type@entry=0xb7bfc3c0, case_list=0x8d89bac, 
    default_label=default_label@entry=0xb7096414, 
    minval=minval@entry=0xb7be7618, maxval=maxval@entry=0xb7c9485c, 
    range=range@entry=0xb7c9485c, stmt_bb=stmt_bb@entry=0x0)
    at /home/joern/synopsys/arc_gnu_4.8-r192641/unisrc/gcc/stmt.c:1919
1919      edge default_edge = EDGE_SUCC(stmt_bb, 0);
(gdb) bt
#0  0x086ac657 in emit_case_dispatch_table (
    index_expr=index_expr@entry=0xb7081508, 
    index_type=index_type@entry=0xb7bfc3c0, case_list=0x8d89bac, 
    default_label=default_label@entry=0xb7096414, 
    minval=minval@entry=0xb7be7618, maxval=maxval@entry=0xb7c9485c, 
    range=range@entry=0xb7c9485c, stmt_bb=stmt_bb@entry=0x0)
    at /home/joern/synopsys/arc_gnu_4.8-r192641/unisrc/gcc/stmt.c:1919
#1  0x086b4104 in expand_sjlj_dispatch_table (dispatch_index=0xb7095438, 
    dispatch_table=0x8d7e150)
    at /home/joern/synopsys/arc_gnu_4.8-r192641/unisrc/gcc/stmt.c:2292
#2  0x0847a661 in sjlj_emit_dispatch_table (num_dispatch=8, 
    dispatch_label=0xb709296c)
    at /home/joern/synopsys/arc_gnu_4.8-r192641/unisrc/gcc/except.c:1363
#3  sjlj_build_landing_pads ()
    at /home/joern/synopsys/arc_gnu_4.8-r192641/unisrc/gcc/except.c:1420
#4  finish_eh_generation ()
    at /home/joern/synopsys/arc_gnu_4.8-r192641/unisrc/gcc/except.c:1454
#5  0x083d481b in gimple_expand_cfg ()
    at /home/joern/synopsys/arc_gnu_4.8-r192641/unisrc/gcc/cfgexpand.c:4579
#6  0x08615c6c in execute_one_pass (pass=pass@entry=0x8c5ca00)
    at /home/joern/synopsys/arc_gnu_4.8-r192641/unisrc/gcc/passes.c:2320
#7  0x08616095 in execute_pass_list (pass=0x8c5ca00)
    at /home/joern/synopsys/arc_gnu_4.8-r192641/unisrc/gcc/passes.c:2381


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

* [Bug middle-end/54957] Two crashes introduced by rev192488
  2012-10-17 18:03 [Bug middle-end/54957] New: Two crashes introduced by rev192488 rmansfield at qnx dot com
                   ` (12 preceding siblings ...)
  2012-10-22 23:37 ` amylaar at gcc dot gnu.org
@ 2012-10-23 17:10 ` uweigand at gcc dot gnu.org
  2012-10-23 21:16 ` d.g.gorbachev at gmail dot com
                   ` (7 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: uweigand at gcc dot gnu.org @ 2012-10-23 17:10 UTC (permalink / raw)
  To: gcc-bugs


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

Ulrich Weigand <uweigand at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |uweigand at gcc dot gnu.org

--- Comment #14 from Ulrich Weigand <uweigand at gcc dot gnu.org> 2012-10-23 17:10:11 UTC ---
I'm getting the same crash when building libstdc++ for spu-elf:

Program received signal SIGSEGV, Segmentation fault.
emit_case_dispatch_table (index_expr=0xf601b1c0, index_type=0xf5e70420,
case_list=0x110001c0, default_label=0xeda05398, minval=0xf5dd0bc0,
maxval=0xf5dd3740, 
    range=0xf5dd3740, stmt_bb=0x0) at
/home/uweigand/fsf/gcc-head/gcc/stmt.c:1919
1919      edge default_edge = EDGE_SUCC(stmt_bb, 0);
(gdb) bt
#0  emit_case_dispatch_table (index_expr=0xf601b1c0, index_type=0xf5e70420,
case_list=0x110001c0, default_label=0xeda05398, minval=0xf5dd0bc0,
maxval=0xf5dd3740, 
    range=0xf5dd3740, stmt_bb=0x0) at
/home/uweigand/fsf/gcc-head/gcc/stmt.c:1919
#1  0x1079240c in expand_sjlj_dispatch_table (dispatch_index=<value optimized
out>, dispatch_table=0x10fe6108) at /home/uweigand/fsf/gcc-head/gcc/stmt.c:2292
#2  0x104ac3c4 in sjlj_emit_dispatch_table (dispatch_label=0xeda03980,
num_dispatch=8) at /home/uweigand/fsf/gcc-head/gcc/except.c:1363
#3  0x104ac6f0 in sjlj_build_landing_pads () at
/home/uweigand/fsf/gcc-head/gcc/except.c:1420
#4  0x104acb4c in finish_eh_generation () at
/home/uweigand/fsf/gcc-head/gcc/except.c:1454
#5  0x103ddc24 in gimple_expand_cfg () at
/home/uweigand/fsf/gcc-head/gcc/cfgexpand.c:4579
#6  0x106e1608 in execute_one_pass (pass=0x10ec19b4) at
/home/uweigand/fsf/gcc-head/gcc/passes.c:2320
#7  0x106e1cb4 in execute_pass_list (pass=0x10ec19b4) at
/home/uweigand/fsf/gcc-head/gcc/passes.c:2381
#8  0x10406770 in expand_function (node=0xf1998e50) at
/home/uweigand/fsf/gcc-head/gcc/cgraphunit.c:1601
#9  0x10407b44 in expand_all_functions () at
/home/uweigand/fsf/gcc-head/gcc/cgraphunit.c:1705
#10 0x10408060 in compile () at
/home/uweigand/fsf/gcc-head/gcc/cgraphunit.c:2003
#11 0x1040942c in finalize_compilation_unit () at
/home/uweigand/fsf/gcc-head/gcc/cgraphunit.c:2080
#12 0x101c5fc0 in cp_write_global_declarations () at
/home/uweigand/fsf/gcc-head/gcc/cp/decl2.c:4286
#13 0x107a6ef4 in compile_file () at
/home/uweigand/fsf/gcc-head/gcc/toplev.c:560
#14 0x107a77ec in do_compile () at
/home/uweigand/fsf/gcc-head/gcc/toplev.c:1866
#15 0x107a85bc in toplev_main (argc=23, argv=0xffabf8c4) at
/home/uweigand/fsf/gcc-head/gcc/toplev.c:1942
#16 0x10c0f6d0 in main (argc=<value optimized out>, argv=<value optimized out>)
at /home/uweigand/fsf/gcc-head/gcc/main.c:36


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

* [Bug middle-end/54957] Two crashes introduced by rev192488
  2012-10-17 18:03 [Bug middle-end/54957] New: Two crashes introduced by rev192488 rmansfield at qnx dot com
                   ` (13 preceding siblings ...)
  2012-10-23 17:10 ` uweigand at gcc dot gnu.org
@ 2012-10-23 21:16 ` d.g.gorbachev at gmail dot com
  2012-10-27 15:15 ` mikpe at it dot uu.se
                   ` (6 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2012-10-23 21:16 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #15 from Dmitry Gorbachev <d.g.gorbachev at gmail dot com> 2012-10-23 21:16:37 UTC ---
Mingw32 target, GCC 4.8.0 20121021 (experimental).

$ cat > bug.cc
struct S {
  ~S();
};

int main()
{
  S s1, s2, s3, s4, s5, s6, s7;
  return 0;
}
^D
$ g++ bug.cc
bug.cc: In function 'int main()':
bug.cc:9:1: internal compiler error: Segmentation fault
 }
 ^
0x87e5f10 crash_signal
    ../../gcc-4.8/gcc/toplev.c:335
0x87d2428 emit_case_dispatch_table
    ../../gcc-4.8/gcc/stmt.c:1919
0x87d4ae5 expand_sjlj_dispatch_table(rtx_def*, vec_t<tree_node*>*)
    ../../gcc-4.8/gcc/stmt.c:2292
0x853e6cc sjlj_emit_dispatch_table
    ../../gcc-4.8/gcc/except.c:1363
0x853f900 sjlj_build_landing_pads
    ../../gcc-4.8/gcc/except.c:1420
0x853fa5b finish_eh_generation()
    ../../gcc-4.8/gcc/except.c:1454
0x8487921 gimple_expand_cfg
    ../../gcc-4.8/gcc/cfgexpand.c:4579
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.


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

* [Bug middle-end/54957] Two crashes introduced by rev192488
  2012-10-17 18:03 [Bug middle-end/54957] New: Two crashes introduced by rev192488 rmansfield at qnx dot com
                   ` (14 preceding siblings ...)
  2012-10-23 21:16 ` d.g.gorbachev at gmail dot com
@ 2012-10-27 15:15 ` mikpe at it dot uu.se
  2012-10-28 16:38 ` amylaar at gcc dot gnu.org
                   ` (5 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: mikpe at it dot uu.se @ 2012-10-27 15:15 UTC (permalink / raw)
  To: gcc-bugs


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

Mikael Pettersson <mikpe at it dot uu.se> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikpe at it dot uu.se

--- Comment #16 from Mikael Pettersson <mikpe at it dot uu.se> 2012-10-27 15:15:28 UTC ---
PR55014 is another build failure caused by r192488, this time on
x86_64-w64-mingw32 and i686-w64-mingw32 in libstdc++.  The proposed patch in
comment 8 fixes that failure as well.


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

* [Bug middle-end/54957] Two crashes introduced by rev192488
  2012-10-17 18:03 [Bug middle-end/54957] New: Two crashes introduced by rev192488 rmansfield at qnx dot com
                   ` (15 preceding siblings ...)
  2012-10-27 15:15 ` mikpe at it dot uu.se
@ 2012-10-28 16:38 ` amylaar at gcc dot gnu.org
  2012-10-30  1:57 ` rbmj at verizon dot net
                   ` (4 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: amylaar at gcc dot gnu.org @ 2012-10-28 16:38 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #17 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> 2012-10-28 16:37:46 UTC ---
(In reply to comment #8)
> Created attachment 28466 [details]
> Proposed patch
> 
> Handle the possibility that stmt_bb may be NULL in emit_case_dispatch_table.
> Untested.

It works for arc-elf32.


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

* [Bug middle-end/54957] Two crashes introduced by rev192488
  2012-10-17 18:03 [Bug middle-end/54957] New: Two crashes introduced by rev192488 rmansfield at qnx dot com
                   ` (16 preceding siblings ...)
  2012-10-28 16:38 ` amylaar at gcc dot gnu.org
@ 2012-10-30  1:57 ` rbmj at verizon dot net
  2012-10-30  1:59 ` rbmj at verizon dot net
                   ` (3 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: rbmj at verizon dot net @ 2012-10-30  1:57 UTC (permalink / raw)
  To: gcc-bugs


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

rbmj at verizon dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rbmj at verizon dot net

--- Comment #18 from rbmj at verizon dot net 2012-10-30 01:56:42 UTC ---
Works for powerpc-wrs-vxworks as well.


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

* [Bug middle-end/54957] Two crashes introduced by rev192488
  2012-10-17 18:03 [Bug middle-end/54957] New: Two crashes introduced by rev192488 rmansfield at qnx dot com
                   ` (17 preceding siblings ...)
  2012-10-30  1:57 ` rbmj at verizon dot net
@ 2012-10-30  1:59 ` rbmj at verizon dot net
  2012-10-31 23:29 ` eraman at gcc dot gnu.org
                   ` (2 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: rbmj at verizon dot net @ 2012-10-30  1:59 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #19 from rbmj at verizon dot net 2012-10-30 01:59:10 UTC ---
*** Bug 55126 has been marked as a duplicate of this bug. ***


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

* [Bug middle-end/54957] Two crashes introduced by rev192488
  2012-10-17 18:03 [Bug middle-end/54957] New: Two crashes introduced by rev192488 rmansfield at qnx dot com
                   ` (18 preceding siblings ...)
  2012-10-30  1:59 ` rbmj at verizon dot net
@ 2012-10-31 23:29 ` eraman at gcc dot gnu.org
  2012-11-01 18:05 ` rbmj at verizon dot net
  2013-12-17 16:03 ` ktietz at gcc dot gnu.org
  21 siblings, 0 replies; 23+ messages in thread
From: eraman at gcc dot gnu.org @ 2012-10-31 23:29 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #20 from eraman at gcc dot gnu.org 2012-10-31 23:28:52 UTC ---
Author: eraman
Date: Wed Oct 31 23:28:45 2012
New Revision: 193052

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193052
Log:
2012-10-31   Easwaran Raman  <eraman@google.com>

    PR target/54938
    PR middle-end/54957
    * optabs.c (emit_cmp_and_jump_insn_1): Add REG_BR_PROB note
    only if it doesn't already exist.
    * stmt.c (get_outgoing_edge_probs): Return 0 if BB is NULL.
    (emit_case_dispatch_table): Handle the case where STMT_BB is
    NULL.
    (expand_sjlj_dispatch_table): Pass BB containing before_case
    to emit_case_dispatch_table.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/optabs.c
    trunk/gcc/stmt.c


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

* [Bug middle-end/54957] Two crashes introduced by rev192488
  2012-10-17 18:03 [Bug middle-end/54957] New: Two crashes introduced by rev192488 rmansfield at qnx dot com
                   ` (19 preceding siblings ...)
  2012-10-31 23:29 ` eraman at gcc dot gnu.org
@ 2012-11-01 18:05 ` rbmj at verizon dot net
  2013-12-17 16:03 ` ktietz at gcc dot gnu.org
  21 siblings, 0 replies; 23+ messages in thread
From: rbmj at verizon dot net @ 2012-11-01 18:05 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #21 from rbmj at verizon dot net 2012-11-01 18:05:36 UTC ---
That fixes it for me :)


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

* [Bug middle-end/54957] Two crashes introduced by rev192488
  2012-10-17 18:03 [Bug middle-end/54957] New: Two crashes introduced by rev192488 rmansfield at qnx dot com
                   ` (20 preceding siblings ...)
  2012-11-01 18:05 ` rbmj at verizon dot net
@ 2013-12-17 16:03 ` ktietz at gcc dot gnu.org
  21 siblings, 0 replies; 23+ messages in thread
From: ktietz at gcc dot gnu.org @ 2013-12-17 16:03 UTC (permalink / raw)
  To: gcc-bugs

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

Kai Tietz <ktietz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |ktietz at gcc dot gnu.org
         Resolution|---                         |FIXED

--- Comment #22 from Kai Tietz <ktietz at gcc dot gnu.org> ---
As issue was fixed for 4.8 and also for 4.9, I close this bug.


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

end of thread, other threads:[~2013-12-17 16:03 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-17 18:03 [Bug middle-end/54957] New: Two crashes introduced by rev192488 rmansfield at qnx dot com
2012-10-17 18:04 ` [Bug middle-end/54957] " pinskia at gcc dot gnu.org
2012-10-17 18:05 ` rmansfield at qnx dot com
2012-10-17 18:08 ` eraman at google dot com
2012-10-17 18:10 ` rmansfield at qnx dot com
2012-10-17 18:25 ` eraman at google dot com
2012-10-17 18:26 ` eraman at google dot com
2012-10-17 18:30 ` rmansfield at qnx dot com
2012-10-17 18:56 ` eraman at google dot com
2012-10-17 19:05 ` rmansfield at qnx dot com
2012-10-17 19:47 ` rmansfield at qnx dot com
2012-10-17 20:31 ` eraman at google dot com
2012-10-17 20:39 ` rmansfield at qnx dot com
2012-10-22 23:37 ` amylaar at gcc dot gnu.org
2012-10-23 17:10 ` uweigand at gcc dot gnu.org
2012-10-23 21:16 ` d.g.gorbachev at gmail dot com
2012-10-27 15:15 ` mikpe at it dot uu.se
2012-10-28 16:38 ` amylaar at gcc dot gnu.org
2012-10-30  1:57 ` rbmj at verizon dot net
2012-10-30  1:59 ` rbmj at verizon dot net
2012-10-31 23:29 ` eraman at gcc dot gnu.org
2012-11-01 18:05 ` rbmj at verizon dot net
2013-12-17 16:03 ` ktietz at gcc dot gnu.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).