public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/66412] New: ICE on valid code at -O2 and -O3 with -g enabled in simplify_subreg, at simplify-rtx.c:5748
@ 2015-06-04  4:50 su at cs dot ucdavis.edu
  2015-06-22 12:05 ` [Bug rtl-optimization/66412] [5/6 Regression] " rguenth at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: su at cs dot ucdavis.edu @ 2015-06-04  4:50 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66412
           Summary: ICE on valid code at -O2 and -O3 with -g enabled in
                    simplify_subreg, at simplify-rtx.c:5748
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

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

This 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/6.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 6.0.0 20150603 (experimental) [trunk revision 224056] (GCC) 
$ 
$ gcc-trunk -O2 -c small.c
$ gcc-trunk -Os -g -c small.c
$ gcc-4.9.2 -O2 -g -c small.c
$ 
$ gcc-trunk -O2 -g -c small.c
small.c: In function ‘fn1’:
small.c:12:1: internal compiler error: in simplify_subreg, at
simplify-rtx.c:5743
 }
 ^
0xae6809 simplify_subreg(machine_mode, rtx_def*, machine_mode, unsigned int)
        ../../gcc-trunk/gcc/simplify-rtx.c:5742
0xae6bf9 simplify_gen_subreg(machine_mode, rtx_def*, machine_mode, unsigned
int)
        ../../gcc-trunk/gcc/simplify-rtx.c:5962
0xae9176 simplify_replace_fn_rtx(rtx_def*, rtx_def const*, rtx_def*
(*)(rtx_def*, rtx_def const*, void*), void*)
        ../../gcc-trunk/gcc/simplify-rtx.c:524
0xd9b7ef propagate_for_debug(rtx_insn*, rtx_insn*, rtx_def*, rtx_def*,
basic_block_def*)
        ../../gcc-trunk/gcc/valtrack.c:210
0x106d801 try_combine
        ../../gcc-trunk/gcc/combine.c:4399
0x1071301 combine_instructions
        ../../gcc-trunk/gcc/combine.c:1324
0x1071301 rest_of_handle_combine
        ../../gcc-trunk/gcc/combine.c:14326
0x1071301 execute
        ../../gcc-trunk/gcc/combine.c:14369
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, c, d;

void
fn1 ()
{
  short e;
  for (c = 0; c < 1; c++)
    d = 0;
  unsigned short g = ((a == 0) ^ d) % 8;
  e = g << 1;
  b = e && 1;
}
>From gcc-bugs-return-488062-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jun 04 05:02:14 2015
Return-Path: <gcc-bugs-return-488062-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 113856 invoked by alias); 4 Jun 2015 05:02:13 -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 113821 invoked by uid 48); 4 Jun 2015 05:02:08 -0000
From: "su at cs dot ucdavis.edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/66413] New: ICE at -Os and above with -g enabled on x86_64-linux-gnu
Date: Thu, 04 Jun 2015 05:02: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: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: su at cs dot ucdavis.edu
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
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 target_milestone
Message-ID: <bug-66413-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-06/txt/msg00394.txt.bz2
Content-length: 2743

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

            Bug ID: 66413
           Summary: ICE at -Os and above with -g enabled on
                    x86_64-linux-gnu
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

The following code causes an ICE when compiled with the current gcc trunk at
-Os and above with -g enabled on x86_64-linux-gnu in both 32-bit and 64-bit
modes.

This is a regression from 5.1.x. 

The test case is still quite complex, but I couldn't seem to reduce it further. 


$ 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/6.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 6.0.0 20150603 (experimental) [trunk revision 224056] (GCC) 
$ 
$ gcc-trunk -Os small.c; ./a.out
$ gcc-trunk -O1 -g small.c; ./a.out
$ gcc-5.1.0 -Os -g small.c; ./a.out
$ 
$ gcc-trunk -Os -g small.c
small.c: In function ‘fn4.constprop’:
small.c:39:1: error: location references block not in block tree
 fn4 (int *p1)
 ^
&d
# DEBUG p1 => &d
small.c:39:1: internal compiler error: verify_gimple failed
0xb456c7 verify_gimple_in_cfg(function*, bool)
        ../../gcc-trunk/gcc/tree-cfg.c:5137
0xa3f3b7 execute_function_todo
        ../../gcc-trunk/gcc/passes.c:1946
0xa3fc23 execute_todo
        ../../gcc-trunk/gcc/passes.c:2003
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, c, d, i, j, q, *e, *h, *k, *r, **p = &e;
const int *f, **n = &f;
static int g;

void
fn1 (int p1)
{
  c = p1;
}

static int *
fn2 (int *p1, const int *p2)
{
  if (g)
    n = &p2;
  *n = p2;
  int o[245];
  fn1 (o != p2);
  return p1;
}

static int *
fn3 ()
{
  int s[54], *t = &s[0], u = 0, v = 1;
  h = &v;
  q = 1;
  for (; q; q++)
    {
      int *w[] = { &u };
      for (; v;)
        return *p;
    }
  *r = *t + b >= 0;
  return *p;
}

static int
fn4 (int *p1)
{
  int *l[2], **m[7];
  for (; i < 1; i++)
    for (; j < 1; j++)
      m[i * 70] = &l[0];
  k = fn3 ();
  fn2 (0, p1);
  if ((m[0] == 0) & a)
    for (;;)
      ;
  return 0;
}

int
main ()
{
  fn4 (&d);
  return 0;
}
>From gcc-bugs-return-488063-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jun 04 07:19:39 2015
Return-Path: <gcc-bugs-return-488063-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 99880 invoked by alias); 4 Jun 2015 07:19:39 -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 99836 invoked by uid 48); 4 Jun 2015 07:19:35 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/66412] [5/6 Regression] ICE on valid code at -O2 and -O3 with -g enabled in simplify_subreg, at simplify-rtx.c:5748
Date: Thu, 04 Jun 2015 07:19:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.2
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc target_milestone short_desc everconfirmed
Message-ID: <bug-66412-4-b9FwR9fdJm@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66412-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66412-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-06/txt/msg00395.txt.bz2
Content-length: 969

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-06-04
                 CC|                            |jakub at gcc dot gnu.org
   Target Milestone|---                         |5.2
            Summary|ICE on valid code at -O2    |[5/6 Regression] ICE on
                   |and -O3 with -g enabled in  |valid code at -O2 and -O3
                   |simplify_subreg, at         |with -g enabled in
                   |simplify-rtx.c:5748         |simplify_subreg, at
                   |                            |simplify-rtx.c:5748
     Ever confirmed|0                           |1

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


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

end of thread, other threads:[~2015-06-27  9:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-04  4:50 [Bug rtl-optimization/66412] New: ICE on valid code at -O2 and -O3 with -g enabled in simplify_subreg, at simplify-rtx.c:5748 su at cs dot ucdavis.edu
2015-06-22 12:05 ` [Bug rtl-optimization/66412] [5/6 Regression] " rguenth at gcc dot gnu.org
2015-06-23  8:35 ` ubizjak at gmail dot com
2015-06-24 16:13 ` ubizjak at gmail dot com
2015-06-24 16:17 ` ubizjak at gmail dot com
2015-06-24 16:27 ` jakub at gcc dot gnu.org
2015-06-24 16:31 ` ubizjak at gmail dot com
2015-06-24 19:44 ` segher at gcc dot gnu.org
2015-06-26  7:45 ` uros at gcc dot gnu.org
2015-06-27  9:17 ` uros at gcc dot gnu.org
2015-06-27  9:19 ` [Bug target/66412] " ubizjak at gmail 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).