public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/59388] New: ICE on valid code at -O1 and above on x86_64-linux-gnu
@ 2013-12-04 18:54 su at cs dot ucdavis.edu
  2013-12-04 23:21 ` [Bug tree-optimization/59388] [4.9 Regression] " mpolacek at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: su at cs dot ucdavis.edu @ 2013-12-04 18:54 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59388
           Summary: ICE on valid code at -O1 and above 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 and above 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 20131204 (experimental) [trunk revision 205673] (GCC) 
$ 
$ gcc-trunk -O0 small.c; a.out
$ gcc-4.8 -O1 small.c; a.out
$ 
$ gcc-trunk -O1 small.c
small.c: In function ‘main’:
small.c:9:1: error: definition in block 2 follows the use
 main () 
 ^
for SSA_NAME: _2 in statement:
_8 = _2;
small.c:9:1: internal compiler error: verify_ssa failed
0xb56fcc verify_ssa(bool)
    ../../gcc-trunk/gcc/tree-ssa.c:1096
0x8fa8be execute_function_todo
    ../../gcc-trunk/gcc/passes.c:1844
0x8fb2b3 execute_todo
    ../../gcc-trunk/gcc/passes.c:1877
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;

struct
{
  unsigned int f:1;
} b;

int 
main () 
{ 
  a = (0 < b.f) | b.f; 
  return a; 
}
>From gcc-bugs-return-436663-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Dec 04 19:00:19 2013
Return-Path: <gcc-bugs-return-436663-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 30654 invoked by alias); 4 Dec 2013 19:00:18 -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 30614 invoked by uid 48); 4 Dec 2013 19:00:15 -0000
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/59388] [4.9 Regression] ICE on valid code at -O1 and above on x86_64-linux-gnu
Date: Wed, 04 Dec 2013 19:00:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mpolacek 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: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc cf_known_to_work target_milestone short_desc everconfirmed cf_known_to_fail
Message-ID: <bug-59388-4-YfKgrduFic@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59388-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59388-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-12/txt/msg00318.txt.bz2
Content-length: 984

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-12-04
                 CC|                            |mpolacek at gcc dot gnu.org
      Known to work|                            |4.8.2
   Target Milestone|---                         |4.9.0
            Summary|ICE on valid code at -O1    |[4.9 Regression] ICE on
                   |and above on                |valid code at -O1 and above
                   |x86_64-linux-gnu            |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, -fno-tree-reassoc makes the ICE go away.


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

* [Bug tree-optimization/59388] [4.9 Regression] ICE on valid code at -O1 and above on x86_64-linux-gnu
  2013-12-04 18:54 [Bug tree-optimization/59388] New: ICE on valid code at -O1 and above on x86_64-linux-gnu su at cs dot ucdavis.edu
@ 2013-12-04 23:21 ` mpolacek at gcc dot gnu.org
  2013-12-05 10:59 ` [Bug tree-optimization/59388] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-12-04 23:21 UTC (permalink / raw)
  To: gcc-bugs

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

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

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


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

* [Bug tree-optimization/59388] [4.7/4.8/4.9 Regression] ICE on valid code at -O1 and above on x86_64-linux-gnu
  2013-12-04 18:54 [Bug tree-optimization/59388] New: ICE on valid code at -O1 and above on x86_64-linux-gnu su at cs dot ucdavis.edu
  2013-12-04 23:21 ` [Bug tree-optimization/59388] [4.9 Regression] " mpolacek at gcc dot gnu.org
@ 2013-12-05 10:59 ` jakub at gcc dot gnu.org
  2013-12-06 17:40 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-12-05 10:59 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|4.8.2                       |
            Summary|[4.9 Regression] ICE on     |[4.7/4.8/4.9 Regression]
                   |valid code at -O1 and above |ICE on valid code at -O1
                   |on x86_64-linux-gnu         |and above on
                   |                            |x86_64-linux-gnu
      Known to fail|                            |4.8.2

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This really is 4.7+ regression, you just need --enable-checking=yes compiler on
the branches to reproduce (otherwise it is a silent wrong-code ? ).
I'll have a look soon.


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

* [Bug tree-optimization/59388] [4.7/4.8/4.9 Regression] ICE on valid code at -O1 and above on x86_64-linux-gnu
  2013-12-04 18:54 [Bug tree-optimization/59388] New: ICE on valid code at -O1 and above on x86_64-linux-gnu su at cs dot ucdavis.edu
  2013-12-04 23:21 ` [Bug tree-optimization/59388] [4.9 Regression] " mpolacek at gcc dot gnu.org
  2013-12-05 10:59 ` [Bug tree-optimization/59388] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
@ 2013-12-06 17:40 ` jakub at gcc dot gnu.org
  2013-12-06 17:41 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-12-06 17:40 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 31392
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31392&action=edit
gcc49-pr59388.patch

Untested 4.9 fix.


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

* [Bug tree-optimization/59388] [4.7/4.8/4.9 Regression] ICE on valid code at -O1 and above on x86_64-linux-gnu
  2013-12-04 18:54 [Bug tree-optimization/59388] New: ICE on valid code at -O1 and above on x86_64-linux-gnu su at cs dot ucdavis.edu
                   ` (2 preceding siblings ...)
  2013-12-06 17:40 ` jakub at gcc dot gnu.org
@ 2013-12-06 17:41 ` jakub at gcc dot gnu.org
  2013-12-06 21:00 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-12-06 17:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 31393
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31393&action=edit
gcc48-pr59388.patch

Untested 4.8.x patch.


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

* [Bug tree-optimization/59388] [4.7/4.8/4.9 Regression] ICE on valid code at -O1 and above on x86_64-linux-gnu
  2013-12-04 18:54 [Bug tree-optimization/59388] New: ICE on valid code at -O1 and above on x86_64-linux-gnu su at cs dot ucdavis.edu
                   ` (3 preceding siblings ...)
  2013-12-06 17:41 ` jakub at gcc dot gnu.org
@ 2013-12-06 21:00 ` jakub at gcc dot gnu.org
  2013-12-06 21:06 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-12-06 21:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Dec  6 21:00:49 2013
New Revision: 205761

URL: http://gcc.gnu.org/viewcvs?rev=205761&root=gcc&view=rev
Log:
    PR tree-optimization/59388
    * tree-ssa-reassoc.c (update_range_test): If op == range->exp,
    gimplify tem after stmt rather than before it.

    * gcc.c-torture/execute/pr59388.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/execute/pr59388.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-reassoc.c


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

* [Bug tree-optimization/59388] [4.7/4.8/4.9 Regression] ICE on valid code at -O1 and above on x86_64-linux-gnu
  2013-12-04 18:54 [Bug tree-optimization/59388] New: ICE on valid code at -O1 and above on x86_64-linux-gnu su at cs dot ucdavis.edu
                   ` (4 preceding siblings ...)
  2013-12-06 21:00 ` jakub at gcc dot gnu.org
@ 2013-12-06 21:06 ` jakub at gcc dot gnu.org
  2013-12-06 21:08 ` [Bug tree-optimization/59388] [4.7 " jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-12-06 21:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Dec  6 21:06:13 2013
New Revision: 205762

URL: http://gcc.gnu.org/viewcvs?rev=205762&root=gcc&view=rev
Log:
    PR tree-optimization/59388
    * tree-ssa-reassoc.c (update_range_test): If op == range->exp,
    gimplify tem after stmt rather than before it.

    * gcc.c-torture/execute/pr59388.c: New test.

Added:
    branches/gcc-4_8-branch/gcc/testsuite/gcc.c-torture/execute/pr59388.c
Modified:
    branches/gcc-4_8-branch/gcc/ChangeLog
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_8-branch/gcc/tree-ssa-reassoc.c


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

* [Bug tree-optimization/59388] [4.7 Regression] ICE on valid code at -O1 and above on x86_64-linux-gnu
  2013-12-04 18:54 [Bug tree-optimization/59388] New: ICE on valid code at -O1 and above on x86_64-linux-gnu su at cs dot ucdavis.edu
                   ` (5 preceding siblings ...)
  2013-12-06 21:06 ` jakub at gcc dot gnu.org
@ 2013-12-06 21:08 ` jakub at gcc dot gnu.org
  2014-01-30 15:43 ` trippels at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-12-06 21:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.8.3, 4.9.0
            Summary|[4.7/4.8/4.9 Regression]    |[4.7 Regression] ICE on
                   |ICE on valid code at -O1    |valid code at -O1 and above
                   |and above on                |on x86_64-linux-gnu
                   |x86_64-linux-gnu            |
      Known to fail|4.9.0                       |

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for 4.8.3+ so far.


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

* [Bug tree-optimization/59388] [4.7 Regression] ICE on valid code at -O1 and above on x86_64-linux-gnu
  2013-12-04 18:54 [Bug tree-optimization/59388] New: ICE on valid code at -O1 and above on x86_64-linux-gnu su at cs dot ucdavis.edu
                   ` (6 preceding siblings ...)
  2013-12-06 21:08 ` [Bug tree-optimization/59388] [4.7 " jakub at gcc dot gnu.org
@ 2014-01-30 15:43 ` trippels at gcc dot gnu.org
  2014-05-26 13:59 ` rguenth at gcc dot gnu.org
  2014-06-12 13:33 ` rguenth at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-01-30 15:43 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |trippels at gcc dot gnu.org
   Target Milestone|4.9.0                       |4.7.4


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

* [Bug tree-optimization/59388] [4.7 Regression] ICE on valid code at -O1 and above on x86_64-linux-gnu
  2013-12-04 18:54 [Bug tree-optimization/59388] New: ICE on valid code at -O1 and above on x86_64-linux-gnu su at cs dot ucdavis.edu
                   ` (7 preceding siblings ...)
  2014-01-30 15:43 ` trippels at gcc dot gnu.org
@ 2014-05-26 13:59 ` rguenth at gcc dot gnu.org
  2014-06-12 13:33 ` rguenth at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-05-26 13:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59388

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-checking, wrong-code
           Priority|P1                          |P2
      Known to fail|                            |4.7.3

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Not sure why this was P1, dropping to P2.


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

* [Bug tree-optimization/59388] [4.7 Regression] ICE on valid code at -O1 and above on x86_64-linux-gnu
  2013-12-04 18:54 [Bug tree-optimization/59388] New: ICE on valid code at -O1 and above on x86_64-linux-gnu su at cs dot ucdavis.edu
                   ` (8 preceding siblings ...)
  2014-05-26 13:59 ` rguenth at gcc dot gnu.org
@ 2014-06-12 13:33 ` rguenth at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-06-12 13:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59388

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|4.7.4                       |4.8.3
      Known to fail|                            |4.7.4

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed for 4.8.3.


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

end of thread, other threads:[~2014-06-12 13:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-04 18:54 [Bug tree-optimization/59388] New: ICE on valid code at -O1 and above on x86_64-linux-gnu su at cs dot ucdavis.edu
2013-12-04 23:21 ` [Bug tree-optimization/59388] [4.9 Regression] " mpolacek at gcc dot gnu.org
2013-12-05 10:59 ` [Bug tree-optimization/59388] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
2013-12-06 17:40 ` jakub at gcc dot gnu.org
2013-12-06 17:41 ` jakub at gcc dot gnu.org
2013-12-06 21:00 ` jakub at gcc dot gnu.org
2013-12-06 21:06 ` jakub at gcc dot gnu.org
2013-12-06 21:08 ` [Bug tree-optimization/59388] [4.7 " jakub at gcc dot gnu.org
2014-01-30 15:43 ` trippels at gcc dot gnu.org
2014-05-26 13:59 ` rguenth at gcc dot gnu.org
2014-06-12 13:33 ` 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).