public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/54902] New: [4.7 Regression], ICE (segfault) building on arm-linux-gnueabi
@ 2012-10-11 15:34 doko at gcc dot gnu.org
  2012-10-12  9:37 ` [Bug target/54902] " rguenth at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: doko at gcc dot gnu.org @ 2012-10-11 15:34 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 54902
           Summary: [4.7 Regression], ICE (segfault) building on
                    arm-linux-gnueabi
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: doko@gcc.gnu.org


Created attachment 28426
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28426
preprocessed source

seen building the cone package on arm-linux-gnueabi, works with 4.6 branch,
fails with 4.7.

g++-4.7 -c -g -O[123] myserver.ii
myserver.C: In static member function 'static bool
myServer::eventloop(myServer::Callback*)':
myserver.C:168:6: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.

Program received signal SIGSEGV, Segmentation fault.
0x003b90ae in free_scc_vn() ()
(gdb) bt
#0 0x003b90ae in free_scc_vn() ()
#1 0x003aee44 in ?? ()
#2 0x003aee44 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)


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

* [Bug target/54902] [4.7 Regression], ICE (segfault) building on arm-linux-gnueabi
  2012-10-11 15:34 [Bug target/54902] New: [4.7 Regression], ICE (segfault) building on arm-linux-gnueabi doko at gcc dot gnu.org
@ 2012-10-12  9:37 ` rguenth at gcc dot gnu.org
  2012-10-12  9:59 ` doko at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-12  9:37 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.3

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> 2012-10-12 09:37:04 UTC ---
Please also check trunk.


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

* [Bug target/54902] [4.7 Regression], ICE (segfault) building on arm-linux-gnueabi
  2012-10-11 15:34 [Bug target/54902] New: [4.7 Regression], ICE (segfault) building on arm-linux-gnueabi doko at gcc dot gnu.org
  2012-10-12  9:37 ` [Bug target/54902] " rguenth at gcc dot gnu.org
@ 2012-10-12  9:59 ` doko at gcc dot gnu.org
  2012-10-13 15:39 ` mikpe at it dot uu.se
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: doko at gcc dot gnu.org @ 2012-10-12  9:59 UTC (permalink / raw)
  To: gcc-bugs


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

Matthias Klose <doko at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.8.0

--- Comment #2 from Matthias Klose <doko at gcc dot gnu.org> 2012-10-12 09:58:46 UTC ---
trunk 20120820 and 20121008 do work.


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

* [Bug target/54902] [4.7 Regression], ICE (segfault) building on arm-linux-gnueabi
  2012-10-11 15:34 [Bug target/54902] New: [4.7 Regression], ICE (segfault) building on arm-linux-gnueabi doko at gcc dot gnu.org
  2012-10-12  9:37 ` [Bug target/54902] " rguenth at gcc dot gnu.org
  2012-10-12  9:59 ` doko at gcc dot gnu.org
@ 2012-10-13 15:39 ` mikpe at it dot uu.se
  2012-10-23  5:35 ` zhenqiang.chen at linaro dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mikpe at it dot uu.se @ 2012-10-13 15:39 UTC (permalink / raw)
  To: gcc-bugs


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

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

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

--- Comment #3 from Mikael Pettersson <mikpe at it dot uu.se> 2012-10-13 15:39:25 UTC ---
I can reproduce the ICE with gcc-4.7.2 on armv5tel-linux-gnueabi, sparc64-linux
-m32, x86_64-linux -m32, and m68k-linux.  I haven't checked any other targets.

The ICE stopped on trunk with Richard B's "Make gsi_remove return whether EH
cleanup is required" patch in r186159:
http://gcc.gnu.org/ml/gcc-patches/2012-04/msg00202.html
http://gcc.gnu.org/ml/gcc-cvs/2012-04/msg00108.html

Backporting r186159 and the follow-up fix in r186164 to gcc-4.7.2 eliminates
the ICE there for the four targets mentioned above.

The description of Richard's patch makes it sound more like a cleanup than a
bug fix, so I'm not sure if it actually fixes the bug or just masks it.


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

* [Bug target/54902] [4.7 Regression], ICE (segfault) building on arm-linux-gnueabi
  2012-10-11 15:34 [Bug target/54902] New: [4.7 Regression], ICE (segfault) building on arm-linux-gnueabi doko at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-10-13 15:39 ` mikpe at it dot uu.se
@ 2012-10-23  5:35 ` zhenqiang.chen at linaro dot org
  2012-10-24 13:41 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: zhenqiang.chen at linaro dot org @ 2012-10-23  5:35 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #4 from zhenqiang.chen at linaro dot org 2012-10-23 05:35:17 UTC ---
Created attachment 28512
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28512
gdb backtrace

Root cause:

PRE bases on the result of value numbering (run_scc_vn). At the end, it
free_scc_vn. But before free_scc_vn, it might call cleanup_tree_cfg ();

  if (do_eh_cleanup || do_ab_cleanup)
    cleanup_tree_cfg ();

cleanup_tree_cfg might call make_ssa_name which might reuse some "name" from
the FREE_SSANAMES list. If the VN_INFO of the "name" is NULL, free_scc_vn will
"Segmentation fault".

Richard's patch makes "do_eh_cleanup" to false. So cleanup_tree_cfg is not
called in PRE. Then no new ssa name will be created.

bt.log shows the gdb backtrace to create a new ssa name.


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

* [Bug target/54902] [4.7 Regression], ICE (segfault) building on arm-linux-gnueabi
  2012-10-11 15:34 [Bug target/54902] New: [4.7 Regression], ICE (segfault) building on arm-linux-gnueabi doko at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2012-10-23  5:35 ` zhenqiang.chen at linaro dot org
@ 2012-10-24 13:41 ` rguenth at gcc dot gnu.org
  2012-10-24 13:59 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-24 13:41 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2012-10-24
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> 2012-10-24 13:40:38 UTC ---
Mine.


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

* [Bug target/54902] [4.7 Regression], ICE (segfault) building on arm-linux-gnueabi
  2012-10-11 15:34 [Bug target/54902] New: [4.7 Regression], ICE (segfault) building on arm-linux-gnueabi doko at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2012-10-24 13:41 ` rguenth at gcc dot gnu.org
@ 2012-10-24 13:59 ` rguenth at gcc dot gnu.org
  2012-10-25 11:06 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-24 13:59 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> 2012-10-24 13:58:50 UTC ---
Created attachment 28517
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28517
patch

Patch I am testing.


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

* [Bug target/54902] [4.7 Regression], ICE (segfault) building on arm-linux-gnueabi
  2012-10-11 15:34 [Bug target/54902] New: [4.7 Regression], ICE (segfault) building on arm-linux-gnueabi doko at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2012-10-24 13:59 ` rguenth at gcc dot gnu.org
@ 2012-10-25 11:06 ` rguenth at gcc dot gnu.org
  2012-10-25 11:16 ` rguenth at gcc dot gnu.org
  2012-10-25 11:32 ` rguenth at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-25 11:06 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> 2012-10-25 11:05:49 UTC ---
Author: rguenth
Date: Thu Oct 25 11:05:43 2012
New Revision: 192803

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192803
Log:
2012-10-25  Richard Biener  <rguenther@suse.de>

    PR tree-optimization/54902
    * tree-ssa-pre.c (fini_pre): Return TODO.
    (execute_pre): Adjust.
    * tree-ssa-tailmerge.c (tail_merge_optimize): Delete unreachable
    blocks before computing dominators.

    * g++.dg/torture/pr54902.C: New testcase.

Added:
    branches/gcc-4_7-branch/gcc/testsuite/g++.dg/torture/pr54902.C
Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_7-branch/gcc/tree-ssa-pre.c
    branches/gcc-4_7-branch/gcc/tree-ssa-tail-merge.c


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

* [Bug target/54902] [4.7 Regression], ICE (segfault) building on arm-linux-gnueabi
  2012-10-11 15:34 [Bug target/54902] New: [4.7 Regression], ICE (segfault) building on arm-linux-gnueabi doko at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2012-10-25 11:06 ` rguenth at gcc dot gnu.org
@ 2012-10-25 11:16 ` rguenth at gcc dot gnu.org
  2012-10-25 11:32 ` rguenth at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-25 11:16 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> 2012-10-25 11:16:19 UTC ---
Author: rguenth
Date: Thu Oct 25 11:16:12 2012
New Revision: 192804

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192804
Log:
2012-10-25  Richard Biener  <rguenther@suse.de>

    PR tree-optimization/54902
    * tree-ssa-pre.c (fini_eliminate): Return TODO.
    (do_pre): Adjust.
    (execute_fre): Likewise.
    * tree-ssa-tailmerge.c (tail_merge_optimize): Delete unreachable
    blocks before computing dominators.

    * g++.dg/torture/pr54902.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/torture/pr54902.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-pre.c
    trunk/gcc/tree-ssa-tail-merge.c


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

* [Bug target/54902] [4.7 Regression], ICE (segfault) building on arm-linux-gnueabi
  2012-10-11 15:34 [Bug target/54902] New: [4.7 Regression], ICE (segfault) building on arm-linux-gnueabi doko at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2012-10-25 11:16 ` rguenth at gcc dot gnu.org
@ 2012-10-25 11:32 ` rguenth at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-25 11:32 UTC (permalink / raw)
  To: gcc-bugs


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

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

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

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> 2012-10-25 11:32:04 UTC ---
Fixed.


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

end of thread, other threads:[~2012-10-25 11:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-11 15:34 [Bug target/54902] New: [4.7 Regression], ICE (segfault) building on arm-linux-gnueabi doko at gcc dot gnu.org
2012-10-12  9:37 ` [Bug target/54902] " rguenth at gcc dot gnu.org
2012-10-12  9:59 ` doko at gcc dot gnu.org
2012-10-13 15:39 ` mikpe at it dot uu.se
2012-10-23  5:35 ` zhenqiang.chen at linaro dot org
2012-10-24 13:41 ` rguenth at gcc dot gnu.org
2012-10-24 13:59 ` rguenth at gcc dot gnu.org
2012-10-25 11:06 ` rguenth at gcc dot gnu.org
2012-10-25 11:16 ` rguenth at gcc dot gnu.org
2012-10-25 11:32 ` rguenth 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).