public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/64494] New: ICE at -Os and above on x86_64-linux-gnu in duplicate_ssa_name_range_info, at tree-ssanames.c:499
@ 2015-01-05  2:23 su at cs dot ucdavis.edu
  2015-01-05  8:10 ` [Bug tree-optimization/64494] [5 Regression] " jakub at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: su at cs dot ucdavis.edu @ 2015-01-05  2:23 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 64494
           Summary: ICE at -Os and above on x86_64-linux-gnu in
                    duplicate_ssa_name_range_info, at tree-ssanames.c:499
           Product: gcc
           Version: 5.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
-Os and above on x86_64-linux-gnu in both 32-bit and 64-bit modes. 

It is a regression from 4.9.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/5.0.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 5.0.0 20150104 (experimental) [trunk revision 219172] (GCC) 

$ 
$ gcc-trunk -O1 small.c; a.out
$ gcc-4.9 -Os small.c; a.out
$ 
$ gcc-trunk -Os small.c
small.c: In function ‘main’:
small.c:5:1: internal compiler error: in duplicate_ssa_name_range_info, at
tree-ssanames.c:499
 main ()
 ^
0xc90af5 duplicate_ssa_name_range_info(tree_node*, value_range_type,
range_info_def*)
        ../../gcc-trunk/gcc/tree-ssanames.c:499
0xba9f24 fini_copy_prop
        ../../gcc-trunk/gcc/tree-ssa-copy.c:572
0xba9f24 execute_copy_prop
        ../../gcc-trunk/gcc/tree-ssa-copy.c:628
0xba9f24 execute
        ../../gcc-trunk/gcc/tree-ssa-copy.c:658
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;
char c;

int
main ()
{
  int d = 0;
  a = 0;
  for (; d < 2; d++)
    {
      a &= (b >= 1);
      c = (204 > (255 >> a)) ? 0 : 204 << a;
      b = 0;
    }
  return 0;
}
>From gcc-bugs-return-472197-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jan 05 03:00:31 2015
Return-Path: <gcc-bugs-return-472197-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 22413 invoked by alias); 5 Jan 2015 03:00:25 -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 22309 invoked by uid 48); 5 Jan 2015 03:00:14 -0000
From: "su at cs dot ucdavis.edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/64495] New: ICE at -O3 for trunk and wrong code for 4.8/4.9 on x86_64-linux-gnu
Date: Mon, 05 Jan 2015 03:00:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: su at cs dot ucdavis.edu
X-Bugzilla-Status: UNCONFIRMED
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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-64495-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: 2015-01/txt/msg00191.txt.bz2
Content-length: 2488

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

            Bug ID: 64495
           Summary: ICE at -O3 for trunk and wrong code for 4.8/4.9 on
                    x86_64-linux-gnu
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu

This is an almost identical test as the one for PR 64493: 

(1) Like PR 64493, the code causes an ICE when compiled with the current gcc
trunk at -O3 on x86_64-linux-gnu in both 32-bit and 64-bit modes; and 

(2) it is also miscompiled at -O3 by 4.8.x and 4.9.x (thus a regression from
4.7.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/5.0.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 5.0.0 20150104 (experimental) [trunk revision 219172] (GCC) 

$ 
$ gcc-trunk -O3 small.c
small.c: In function ‘main’:
small.c:7:1: error: definition in block 33 does not dominate use in block 31
 main ()
 ^
for SSA_NAME: vect_d.30_19 in statement:
vect__32.36_66 = vect_d.30_19 | vect__32.36_39;
small.c:7:1: internal compiler error: verify_ssa failed
0xc8c6b1 verify_ssa(bool, bool)
    ../../gcc-trunk/gcc/tree-ssa.c:1062
0x9daae5 execute_function_todo
    ../../gcc-trunk/gcc/passes.c:1947
0x9db523 execute_todo
    ../../gcc-trunk/gcc/passes.c:1997
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.
$ 
$ gcc-4.7 -O3 small.c; a.out
$ gcc-4.8 -O2 small.c; a.out
$ gcc-4.9 -O2 small.c; a.out
$ 
$ gcc-4.8 -O3 small.c; a.out
Aborted (core dumped)
$ gcc-4.9 -O3 small.c; a.out
Aborted (core dumped)
$ 


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


#include <assert.h>

int a, b, c, d, e, f, g, i, j;
static int *h = &e;

int
main ()
{
  for (; a;)
    for (; g; g++)
      for (; f; f++)
    if (j)
      {
        assert(b); 
        assert(0);
      }
  for (i = 24; i; i--)
    {
      for (c = 0; c < 6; c++)
    d |= 1;
      *h |= d;
    }

  if (e != 1) 
    __builtin_abort (); 

  return 0;
}
>From gcc-bugs-return-472198-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jan 05 05:34:39 2015
Return-Path: <gcc-bugs-return-472198-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 4924 invoked by alias); 5 Jan 2015 05:34:38 -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 4887 invoked by uid 48); 5 Jan 2015 05:34:31 -0000
From: "laguest at archeia dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ada/64492] Disabling libada prevents building gnattools-cross
Date: Mon, 05 Jan 2015 05:34:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: ada
X-Bugzilla-Version: 4.9.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: laguest at archeia dot com
X-Bugzilla-Status: UNCONFIRMED
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: cc
Message-ID: <bug-64492-4-XY8e1y0EHe@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-64492-4@http.gcc.gnu.org/bugzilla/>
References: <bug-64492-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: 2015-01/txt/msg00192.txt.bz2
Content-length: 1056

https://gcc.gnu.org/bugzilla/show_bug.cgi?idd492

Luke A. Guest <laguest at archeia dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |laguest at archeia dot com

--- Comment #2 from Luke A. Guest <laguest at archeia dot com> ---
I haven't sent in my copyright assignment yet.

But, I noticed this in the gnat makefile a while back and was going to
investigate, but haven't got around to it yet:

# *-elf, *-eabi, or *-eabispe
ifeq ($(strip $(filter-out elf eabi eabispe,$(target_os))),)
  TOOLS_TARGET_PAIRS=\
  mlib-tgt-specific.adb<mlib-tgt-specific-xi.adb \
  indepsw.adb<indepsw-gnu.adb
endif

Essentially, we just need for that to include a specific system or build with
just those two files and it's sorted.

It may require a custom target, such as the gnatlib-shared-win32/darwin targets
to do this cleanly without hacking up the configure scripts.

I don't know which is the best route to take.


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

* [Bug tree-optimization/64494] [5 Regression] ICE at -Os and above on x86_64-linux-gnu in duplicate_ssa_name_range_info, at tree-ssanames.c:499
  2015-01-05  2:23 [Bug tree-optimization/64494] New: ICE at -Os and above on x86_64-linux-gnu in duplicate_ssa_name_range_info, at tree-ssanames.c:499 su at cs dot ucdavis.edu
@ 2015-01-05  8:10 ` jakub at gcc dot gnu.org
  2015-01-05  9:42 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-05  8:10 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-01-05
                 CC|                            |jakub at gcc dot gnu.org
   Target Milestone|---                         |5.0
            Summary|ICE at -Os and above on     |[5 Regression] ICE at -Os
                   |x86_64-linux-gnu in         |and above on
                   |duplicate_ssa_name_range_in |x86_64-linux-gnu in
                   |fo, at tree-ssanames.c:499  |duplicate_ssa_name_range_in
                   |                            |fo, at tree-ssanames.c:499
     Ever confirmed|0                           |1

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


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

* [Bug tree-optimization/64494] [5 Regression] ICE at -Os and above on x86_64-linux-gnu in duplicate_ssa_name_range_info, at tree-ssanames.c:499
  2015-01-05  2:23 [Bug tree-optimization/64494] New: ICE at -Os and above on x86_64-linux-gnu in duplicate_ssa_name_range_info, at tree-ssanames.c:499 su at cs dot ucdavis.edu
  2015-01-05  8:10 ` [Bug tree-optimization/64494] [5 Regression] " jakub at gcc dot gnu.org
@ 2015-01-05  9:42 ` jakub at gcc dot gnu.org
  2015-01-05 18:54 ` jakub at gcc dot gnu.org
  2015-01-06 15:12 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-05  9:42 UTC (permalink / raw)
  To: gcc-bugs

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

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 #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 34376
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34376&action=edit
gcc5-pr64494.patch

Untested fix.


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

* [Bug tree-optimization/64494] [5 Regression] ICE at -Os and above on x86_64-linux-gnu in duplicate_ssa_name_range_info, at tree-ssanames.c:499
  2015-01-05  2:23 [Bug tree-optimization/64494] New: ICE at -Os and above on x86_64-linux-gnu in duplicate_ssa_name_range_info, at tree-ssanames.c:499 su at cs dot ucdavis.edu
  2015-01-05  8:10 ` [Bug tree-optimization/64494] [5 Regression] " jakub at gcc dot gnu.org
  2015-01-05  9:42 ` jakub at gcc dot gnu.org
@ 2015-01-05 18:54 ` jakub at gcc dot gnu.org
  2015-01-06 15:12 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-05 18:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Mon Jan  5 18:53:44 2015
New Revision: 219194

URL: https://gcc.gnu.org/viewcvs?rev=219194&root=gcc&view=rev
Log:
    PR tree-optimization/64494
    * tree-ssa-loop-im.c (move_computations_dom_walker::before_dom): Also
    clear SSA_NAME_ANTI_RANGE_P flag.

    * gcc.c-torture/compile/pr64494.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr64494.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-loop-im.c


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

* [Bug tree-optimization/64494] [5 Regression] ICE at -Os and above on x86_64-linux-gnu in duplicate_ssa_name_range_info, at tree-ssanames.c:499
  2015-01-05  2:23 [Bug tree-optimization/64494] New: ICE at -Os and above on x86_64-linux-gnu in duplicate_ssa_name_range_info, at tree-ssanames.c:499 su at cs dot ucdavis.edu
                   ` (2 preceding siblings ...)
  2015-01-05 18:54 ` jakub at gcc dot gnu.org
@ 2015-01-06 15:12 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-06 15:12 UTC (permalink / raw)
  To: gcc-bugs

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

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


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

end of thread, other threads:[~2015-01-06 15:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-05  2:23 [Bug tree-optimization/64494] New: ICE at -Os and above on x86_64-linux-gnu in duplicate_ssa_name_range_info, at tree-ssanames.c:499 su at cs dot ucdavis.edu
2015-01-05  8:10 ` [Bug tree-optimization/64494] [5 Regression] " jakub at gcc dot gnu.org
2015-01-05  9:42 ` jakub at gcc dot gnu.org
2015-01-05 18:54 ` jakub at gcc dot gnu.org
2015-01-06 15:12 ` jakub 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).