public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/59322] New: ICE with segfault on valid code at -O1, -O2, and -O3 on x86_64-linux-gnu
@ 2013-11-28  1:21 su at cs dot ucdavis.edu
  2013-11-28 11:24 ` [Bug tree-optimization/59322] [4.9 Regression] " mpolacek at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: su at cs dot ucdavis.edu @ 2013-11-28  1:21 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59322
           Summary: ICE with segfault on valid code at -O1, -O2, and -O3
                    on x86_64-linux-gnu
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu

The following code causes an ICE when compiled with the current gcc trunk at
-O1, -O2 and -O3 on x86_64-linux-gnu in both 32-bit and 64-bit modes. 

It is a regression from 4.8.x. 

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 4.9.0 20131127 (experimental) [trunk revision 205463] (GCC) 
$ 
$ gcc-trunk -O0 -c small.c
$ gcc-trunk -Os -c small.c
$ gcc-4.8.2 -O1 -c small.c
$ 
$ gcc-trunk -O1 -c small.c
small.c: In function ‘foo’:
small.c:5:1: internal compiler error: Segmentation fault
 foo ()
 ^
0x9ab60f crash_signal
    ../../gcc-trunk/gcc/toplev.c:336
0xb4c595 thread_through_all_blocks(bool)
    ../../gcc-trunk/gcc/tree-ssa-threadupdate.c:1651
0xa93a4a tree_ssa_dominator_optimize
    ../../gcc-trunk/gcc/tree-ssa-dom.c:886
0xa93a4a execute
    ../../gcc-trunk/gcc/tree-ssa-dom.c:984
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.
$ 


----------------------------


int a, b, d;
short c;

int
foo ()
{
  for (b = 0; b; b = a)
    for (c = 18; c < 10; c++)
      {
    d = c;
    if (d)
      return 0;
      }
  return 0;
}
>From gcc-bugs-return-436083-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Nov 28 01:41:57 2013
Return-Path: <gcc-bugs-return-436083-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 26649 invoked by alias); 28 Nov 2013 01:41:57 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 26612 invoked by uid 48); 28 Nov 2013 01:41:53 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/59304] #pragma diagnostic pop after warning fails for options unspecified in the command-line and disabled by default
Date: Thu, 28 Nov 2013 01:41:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: manu at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: short_desc
Message-ID: <bug-59304-4-XJZId7JENq@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59304-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59304-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-11/txt/msg02860.txt.bz2
Content-length: 1024

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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|#pragma diagnostic pop      |#pragma diagnostic pop
                   |fails with -Wswitch-enum    |after warning fails for
                   |                            |options unspecified in the
                   |                            |command-line and disabled
                   |                            |by default

--- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
We could undo back to the command-line just reseting variables mentioned in the
classification history up to the POP. But this might be fragile (the pragma
diagnostics warning uses handle_generated_option, which does a lot of extra
work) and also it does not work with variables that enable other variables
like: "-Wall".
>From gcc-bugs-return-436084-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Nov 28 01:54:06 2013
Return-Path: <gcc-bugs-return-436084-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 31155 invoked by alias); 28 Nov 2013 01:54:05 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 31095 invoked by uid 48); 28 Nov 2013 01:54:02 -0000
From: "bernd.edlinger at hotmail dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/57748] [4.7/4.8/4.9 Regression] ICE when expanding assignment to unaligned zero-sized array
Date: Thu, 28 Nov 2013 01:54:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 4.8.0
X-Bugzilla-Keywords: ice-on-valid-code, wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: bernd.edlinger at hotmail dot de
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.8.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-57748-4-MP7Ep0HBy8@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57748-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57748-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-11/txt/msg02861.txt.bz2
Content-length: 466

http://gcc.gnu.org/bugzilla/show_bug.cgi?idW748

--- Comment #50 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
(In reply to Paulo J. Matos from comment #49)
> I noticed that enabling misaligned moves have created a few test failures on
> my port. Namely: execute.exp 051113-1.c. It was generating one too many
> moves to deference the structure in function Sum.

Just for curiosity:
On which target did you reproduce this problem in 20051113-1.c ?


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

* [Bug tree-optimization/59322] [4.9 Regression] ICE with segfault on valid code at -O1, -O2, and -O3 on x86_64-linux-gnu
  2013-11-28  1:21 [Bug tree-optimization/59322] New: ICE with segfault on valid code at -O1, -O2, and -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
@ 2013-11-28 11:24 ` mpolacek at gcc dot gnu.org
  2013-11-28 11:26 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-11-28 11:24 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-11-28
                 CC|                            |law at gcc dot gnu.org,
                   |                            |mpolacek at gcc dot gnu.org
      Known to work|                            |4.8.2
   Target Milestone|---                         |4.9.0
            Summary|ICE with segfault on valid  |[4.9 Regression] ICE with
                   |code at -O1, -O2, and -O3   |segfault on valid code at
                   |on x86_64-linux-gnu         |-O1, -O2, and -O3 on
                   |                            |x86_64-linux-gnu
     Ever confirmed|0                           |1
      Known to fail|                            |4.9.0

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.


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

* [Bug tree-optimization/59322] [4.9 Regression] ICE with segfault on valid code at -O1, -O2, and -O3 on x86_64-linux-gnu
  2013-11-28  1:21 [Bug tree-optimization/59322] New: ICE with segfault on valid code at -O1, -O2, and -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
  2013-11-28 11:24 ` [Bug tree-optimization/59322] [4.9 Regression] " mpolacek at gcc dot gnu.org
@ 2013-11-28 11:26 ` rguenth at gcc dot gnu.org
  2013-11-28 12:16 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-28 11:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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

* [Bug tree-optimization/59322] [4.9 Regression] ICE with segfault on valid code at -O1, -O2, and -O3 on x86_64-linux-gnu
  2013-11-28  1:21 [Bug tree-optimization/59322] New: ICE with segfault on valid code at -O1, -O2, and -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
  2013-11-28 11:24 ` [Bug tree-optimization/59322] [4.9 Regression] " mpolacek at gcc dot gnu.org
  2013-11-28 11:26 ` rguenth at gcc dot gnu.org
@ 2013-11-28 12:16 ` jakub at gcc dot gnu.org
  2013-12-02 16:29 ` law at redhat dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-11-28 12:16 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r205279.


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

* [Bug tree-optimization/59322] [4.9 Regression] ICE with segfault on valid code at -O1, -O2, and -O3 on x86_64-linux-gnu
  2013-11-28  1:21 [Bug tree-optimization/59322] New: ICE with segfault on valid code at -O1, -O2, and -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
                   ` (2 preceding siblings ...)
  2013-11-28 12:16 ` jakub at gcc dot gnu.org
@ 2013-12-02 16:29 ` law at redhat dot com
  2013-12-02 17:59 ` law at redhat dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: law at redhat dot com @ 2013-12-02 16:29 UTC (permalink / raw)
  To: gcc-bugs

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

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |antoine.balestrat at gmail dot com

--- Comment #3 from Jeffrey A. Law <law at redhat dot com> ---
*** Bug 59359 has been marked as a duplicate of this bug. ***


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

* [Bug tree-optimization/59322] [4.9 Regression] ICE with segfault on valid code at -O1, -O2, and -O3 on x86_64-linux-gnu
  2013-11-28  1:21 [Bug tree-optimization/59322] New: ICE with segfault on valid code at -O1, -O2, and -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
                   ` (3 preceding siblings ...)
  2013-12-02 16:29 ` law at redhat dot com
@ 2013-12-02 17:59 ` law at redhat dot com
  2013-12-03  3:37 ` law at gcc dot gnu.org
  2013-12-03  3:46 ` law at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: law at redhat dot com @ 2013-12-02 17:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jeffrey A. Law <law at redhat dot com> ---
Thanks for the bug report.  It hits a hunk of code which I've looked at a few
times in the last couple months and haven't been able to convince myself it's
correct or desirable.

In create_edge_and_update_destination_phis, we clone a jump threading path onto
the newly created edge.

That path has a reference to an edge that later gets removed.

Then we look at the path and fault.


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

* [Bug tree-optimization/59322] [4.9 Regression] ICE with segfault on valid code at -O1, -O2, and -O3 on x86_64-linux-gnu
  2013-11-28  1:21 [Bug tree-optimization/59322] New: ICE with segfault on valid code at -O1, -O2, and -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
                   ` (4 preceding siblings ...)
  2013-12-02 17:59 ` law at redhat dot com
@ 2013-12-03  3:37 ` law at gcc dot gnu.org
  2013-12-03  3:46 ` law at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: law at gcc dot gnu.org @ 2013-12-03  3:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Author: law
Date: Tue Dec  3 03:36:58 2013
New Revision: 205617

URL: http://gcc.gnu.org/viewcvs?rev=205617&root=gcc&view=rev
Log:
    PR tree-optimization/59322
    * tree-ssa-threadedge.c (create_edge_and_update_destination_phis):
    Remove code which copied jump threading paths.

    PR tree-optimization/59322
    * gcc.c-torture/compile/pr59322.c: New test

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr59322.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-threadupdate.c


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

* [Bug tree-optimization/59322] [4.9 Regression] ICE with segfault on valid code at -O1, -O2, and -O3 on x86_64-linux-gnu
  2013-11-28  1:21 [Bug tree-optimization/59322] New: ICE with segfault on valid code at -O1, -O2, and -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
                   ` (5 preceding siblings ...)
  2013-12-03  3:37 ` law at gcc dot gnu.org
@ 2013-12-03  3:46 ` law at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: law at redhat dot com @ 2013-12-03  3:46 UTC (permalink / raw)
  To: gcc-bugs

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

Jeffrey A. Law <law at redhat dot com> changed:

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

--- Comment #6 from Jeffrey A. Law <law at redhat dot com> ---
Fixed on trunk.


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

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

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-28  1:21 [Bug tree-optimization/59322] New: ICE with segfault on valid code at -O1, -O2, and -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
2013-11-28 11:24 ` [Bug tree-optimization/59322] [4.9 Regression] " mpolacek at gcc dot gnu.org
2013-11-28 11:26 ` rguenth at gcc dot gnu.org
2013-11-28 12:16 ` jakub at gcc dot gnu.org
2013-12-02 16:29 ` law at redhat dot com
2013-12-02 17:59 ` law at redhat dot com
2013-12-03  3:37 ` law at gcc dot gnu.org
2013-12-03  3:46 ` law at redhat dot com

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).