public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/48794] New: [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop
@ 2011-04-27 18:35 zsojka at seznam dot cz
  2011-04-27 22:51 ` [Bug middle-end/48794] " hjl.tools at gmail dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: zsojka at seznam dot cz @ 2011-04-27 18:35 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr
                    (tree-inline.c:1194) with -Os -fopenmp -fexceptions
                    -fno-tree-ccp -fno-tree-copy-prop
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz
                CC: jakub@gcc.gnu.org
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu


Created attachment 24119
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24119
auto-reduced testcase (from libgomp.fortran/allocatable3.f90)

This is very similiar ro PR48611.

Compiler output:
$ gcc -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop testcase.f90
==32088== Invalid read of size 4
==32088==    at 0xBCFC1F: remap_eh_region_nr.isra.74 (tree-inline.c:1194)
==32088==    by 0xBD3A89: remap_gimple_stmt (tree-inline.c:1444)
==32088==    by 0xBD4477: copy_bb (tree-inline.c:1540)
==32088==    by 0xBD5654: copy_body (tree-inline.c:2244)
==32088==    by 0xBD7D8E: expand_call_inline (tree-inline.c:3906)
==32088==    by 0xBDA2BF: optimize_inline_calls (tree-inline.c:4018)
==32088==    by 0xBB3B06: inline_transform (ipa-inline-transform.c:313)
==32088==    by 0x872E30: execute_all_ipa_transforms (passes.c:1455)
==32088==    by 0x9BBCA1: tree_rest_of_compilation (tree-optimize.c:416)
==32088==    by 0xB9F1B2: cgraph_expand_function (cgraphunit.c:1578)
==32088==    by 0xBA16CB: cgraph_optimize (cgraphunit.c:1637)
==32088==    by 0xBA1C59: cgraph_finalize_compilation_unit (cgraphunit.c:1098)
==32088==    by 0x82A75C: write_global_declarations (langhooks.c:303)
==32088==    by 0x95FCC7: toplev_main (toplev.c:591)
==32088==    by 0x644AB6C: (below main) (in /lib64/libc-2.11.3.so)
==32088==  Address 0x18 is not stack'd, malloc'd or (recently) free'd
==32088== 
testcase.f90: In function 'main':
testcase.f90:8:0: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Tested revisions:
r173040 - crash
4.6 r172337 - OK


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

* [Bug middle-end/48794] [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop
  2011-04-27 18:35 [Bug middle-end/48794] New: [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop zsojka at seznam dot cz
@ 2011-04-27 22:51 ` hjl.tools at gmail dot com
  2011-04-28  8:57 ` rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: hjl.tools at gmail dot com @ 2011-04-27 22:51 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.04.27 22:51:10
                 CC|                            |rguenth at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2011-04-27 22:51:10 UTC ---
It is caused by revision 171450:

http://gcc.gnu.org/ml/gcc-cvs/2011-03/msg00874.html


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

* [Bug middle-end/48794] [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop
  2011-04-27 18:35 [Bug middle-end/48794] New: [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop zsojka at seznam dot cz
  2011-04-27 22:51 ` [Bug middle-end/48794] " hjl.tools at gmail dot com
@ 2011-04-28  8:57 ` rguenth at gcc dot gnu.org
  2011-05-09 16:03 ` [Bug tree-optimization/48794] " jakub at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-04-28  8:57 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.0


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

* [Bug tree-optimization/48794] [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop
  2011-04-27 18:35 [Bug middle-end/48794] New: [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop zsojka at seznam dot cz
  2011-04-27 22:51 ` [Bug middle-end/48794] " hjl.tools at gmail dot com
  2011-04-28  8:57 ` rguenth at gcc dot gnu.org
@ 2011-05-09 16:03 ` jakub at gcc dot gnu.org
  2011-05-10  6:11 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-05-09 16:03 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-09 15:51:28 UTC ---
Created attachment 24213
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24213
gcc47-pr48794.patch

Untested fix, which fixes also PR48611 if I back out the tree-eh.c change that
was committed for it.


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

* [Bug tree-optimization/48794] [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop
  2011-04-27 18:35 [Bug middle-end/48794] New: [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2011-05-09 16:03 ` [Bug tree-optimization/48794] " jakub at gcc dot gnu.org
@ 2011-05-10  6:11 ` jakub at gcc dot gnu.org
  2011-05-10  6:33 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-05-10  6:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-10 06:08:23 UTC ---
Author: jakub
Date: Tue May 10 06:08:18 2011
New Revision: 173607

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173607
Log:
    PR tree-optimization/48611
    PR tree-optimization/48794
    * tree-eh.c (remove_unreachable_handlers): Don't remove regions
    referenced from RESX or EH_DISPATCH arguments.

    * gfortran.dg/gomp/pr48611.f90: New test.
    * gfortran.dg/gomp/pr48794.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/gomp/pr48611.f90
    trunk/gcc/testsuite/gfortran.dg/gomp/pr48794.f90
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-eh.c


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

* [Bug tree-optimization/48794] [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop
  2011-04-27 18:35 [Bug middle-end/48794] New: [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2011-05-10  6:11 ` jakub at gcc dot gnu.org
@ 2011-05-10  6:33 ` jakub at gcc dot gnu.org
  2011-05-10  6:47 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-05-10  6:33 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-10 06:21:34 UTC ---
Fixed.


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

* [Bug tree-optimization/48794] [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop
  2011-04-27 18:35 [Bug middle-end/48794] New: [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2011-05-10  6:33 ` jakub at gcc dot gnu.org
@ 2011-05-10  6:47 ` jakub at gcc dot gnu.org
  2012-01-25 15:37 ` matz at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-05-10  6:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-10 06:32:04 UTC ---
Author: jakub
Date: Tue May 10 06:31:59 2011
New Revision: 173608

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173608
Log:
    PR tree-optimization/48611
    PR tree-optimization/48794
    * tree-eh.c (remove_unreachable_handlers): Don't remove regions
    referenced from RESX or EH_DISPATCH arguments.

    * gfortran.dg/gomp/pr48611.f90: New test.
    * gfortran.dg/gomp/pr48794.f90: New test.

Added:
    branches/gcc-4_6-branch/gcc/testsuite/gfortran.dg/gomp/pr48611.f90
    branches/gcc-4_6-branch/gcc/testsuite/gfortran.dg/gomp/pr48794.f90
Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_6-branch/gcc/tree-eh.c


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

* [Bug tree-optimization/48794] [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop
  2011-04-27 18:35 [Bug middle-end/48794] New: [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2011-05-10  6:47 ` jakub at gcc dot gnu.org
@ 2012-01-25 15:37 ` matz at gcc dot gnu.org
  2012-01-25 15:55 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: matz at gcc dot gnu.org @ 2012-01-25 15:37 UTC (permalink / raw)
  To: gcc-bugs

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

Michael Matz <matz at gcc dot gnu.org> changed:

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

--- Comment #6 from Michael Matz <matz at gcc dot gnu.org> 2012-01-25 15:13:35 UTC ---
This testcase still segfaults in the same way.  The problem this time is
in removing regions without landing pads (remove_unreachable_handlers_no_lp),
which also happily removes regions that still are referenced by resx
instructions.

% cat pr48794-2.f90
! PR tree-optimization/48794
! { dg-do compile }
! { dg-options "-Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop" }

  integer, allocatable :: a(:)
  integer :: b(48)
  logical :: l
  if (allocated (a)) then
    call abort
    call bla(b)
  end if
!$omp parallel private (a) reduction (.or.:l)
  do i = 1, 7
  end do
!$omp end parallel
end

% ./gcc/f951 -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop
pr48794-2.f90
pr48794-2.f90: In function ‘main’:
pr48794-2.f90:16:0: internal compiler error: Segmentation fault


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

* [Bug tree-optimization/48794] [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop
  2011-04-27 18:35 [Bug middle-end/48794] New: [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop zsojka at seznam dot cz
                   ` (6 preceding siblings ...)
  2012-01-25 15:37 ` matz at gcc dot gnu.org
@ 2012-01-25 15:55 ` jakub at gcc dot gnu.org
  2012-01-25 16:23 ` matz at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-25 15:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-25 15:33:53 UTC ---
Well, that is a different testcase for a different bug, better would be not to
reuse this one for that.
Are you working on it?


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

* [Bug tree-optimization/48794] [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop
  2011-04-27 18:35 [Bug middle-end/48794] New: [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop zsojka at seznam dot cz
                   ` (7 preceding siblings ...)
  2012-01-25 15:55 ` jakub at gcc dot gnu.org
@ 2012-01-25 16:23 ` matz at gcc dot gnu.org
  2012-01-26 14:10 ` matz at gcc dot gnu.org
  2012-01-26 14:24 ` matz at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: matz at gcc dot gnu.org @ 2012-01-25 16:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Michael Matz <matz at gcc dot gnu.org> 2012-01-25 15:54:29 UTC ---
(In reply to comment #7)
> Well, that is a different testcase for a different bug, better would be not
> to reuse this one for that.

Hmm, perhaps.  Too late now.

> Are you working on it?

Yeah, http://gcc.gnu.org/ml/gcc-patches/2012-01/msg01304.html .


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

* [Bug tree-optimization/48794] [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop
  2011-04-27 18:35 [Bug middle-end/48794] New: [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop zsojka at seznam dot cz
                   ` (8 preceding siblings ...)
  2012-01-25 16:23 ` matz at gcc dot gnu.org
@ 2012-01-26 14:10 ` matz at gcc dot gnu.org
  2012-01-26 14:24 ` matz at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: matz at gcc dot gnu.org @ 2012-01-26 14:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Michael Matz <matz at gcc dot gnu.org> 2012-01-26 13:25:06 UTC ---
Author: matz
Date: Thu Jan 26 13:24:58 2012
New Revision: 183559

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183559
Log:
    PR tree-optimization/48794
    * tree-eh.c (remove_unreachable_handlers_no_lp): Don't remove
    regions referenced from RESX/EH_DISPATCH.

testsuite/
    * gfortran.dg/gomp/pr48794-2.f90: New testcase.

Added:
    trunk/gcc/testsuite/gfortran.dg/gomp/pr48794-2.f90
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-eh.c


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

* [Bug tree-optimization/48794] [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop
  2011-04-27 18:35 [Bug middle-end/48794] New: [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop zsojka at seznam dot cz
                   ` (9 preceding siblings ...)
  2012-01-26 14:10 ` matz at gcc dot gnu.org
@ 2012-01-26 14:24 ` matz at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: matz at gcc dot gnu.org @ 2012-01-26 14:24 UTC (permalink / raw)
  To: gcc-bugs

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

Michael Matz <matz at gcc dot gnu.org> changed:

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

--- Comment #10 from Michael Matz <matz at gcc dot gnu.org> 2012-01-26 13:52:15 UTC ---
Fixed some more.


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

end of thread, other threads:[~2012-01-26 13:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-27 18:35 [Bug middle-end/48794] New: [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop zsojka at seznam dot cz
2011-04-27 22:51 ` [Bug middle-end/48794] " hjl.tools at gmail dot com
2011-04-28  8:57 ` rguenth at gcc dot gnu.org
2011-05-09 16:03 ` [Bug tree-optimization/48794] " jakub at gcc dot gnu.org
2011-05-10  6:11 ` jakub at gcc dot gnu.org
2011-05-10  6:33 ` jakub at gcc dot gnu.org
2011-05-10  6:47 ` jakub at gcc dot gnu.org
2012-01-25 15:37 ` matz at gcc dot gnu.org
2012-01-25 15:55 ` jakub at gcc dot gnu.org
2012-01-25 16:23 ` matz at gcc dot gnu.org
2012-01-26 14:10 ` matz at gcc dot gnu.org
2012-01-26 14:24 ` matz 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).