public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/66691] New: ICE on valid code at -O3 with -g enabled in simplify_subreg, at simplify-rtx.c:5744
@ 2015-06-28  5:21 su at cs dot ucdavis.edu
  2015-06-28  7:18 ` [Bug debug/66691] [5/6 Regression] " trippels at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: su at cs dot ucdavis.edu @ 2015-06-28  5:21 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66691
           Summary: ICE on valid code at -O3 with -g enabled in
                    simplify_subreg, at simplify-rtx.c:5744
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          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
-O3 with -g enabled on x86_64-linux-gnu in 32-bit mode (but not in 64-bit
mode).

It also affects 5.1.x, thus 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 20150627 (experimental) [trunk revision 225100] (GCC) 
$ 
$ gcc-trunk -m32 -O3 small.c; ./a.out
$ gcc-trunk -m32 -O2 -g small.c; ./a.out
$ gcc-trunk -m64 -O3 -g small.c; ./a.out
$ gcc-4.9 -m32 -O3 -g small.c; ./a.out
$ 
$ gcc-trunk -m32 -O3 -g small.c
small.c: In function ‘main’:
small.c:59:1: internal compiler error: in simplify_subreg, at
simplify-rtx.c:5744
 }
 ^
0xb19a79 simplify_subreg(machine_mode, rtx_def*, machine_mode, unsigned int)
        ../../gcc-trunk/gcc/simplify-rtx.c:5744
0xb19cc9 simplify_gen_subreg(machine_mode, rtx_def*, machine_mode, unsigned
int)
        ../../gcc-trunk/gcc/simplify-rtx.c:5969
0xde472e vt_expand_loc_callback
        ../../gcc-trunk/gcc/var-tracking.c:8437
0x74b921 cselib_expand_value_rtx_1
        ../../gcc-trunk/gcc/cselib.c:1683
0x74c00e cselib_expand_value_rtx_cb(rtx_def*, bitmap_head*, int, rtx_def*
(*)(rtx_def*, bitmap_head*, int, void*), void*)
        ../../gcc-trunk/gcc/cselib.c:1565
0xde49d4 vt_expand_var_loc_chain
        ../../gcc-trunk/gcc/var-tracking.c:8332
0xde49d4 vt_expand_loc_callback
        ../../gcc-trunk/gcc/var-tracking.c:8494
0x74b9c2 cselib_expand_value_rtx_1
        ../../gcc-trunk/gcc/cselib.c:1718
0x74c00e cselib_expand_value_rtx_cb(rtx_def*, bitmap_head*, int, rtx_def*
(*)(rtx_def*, bitmap_head*, int, void*), void*)
        ../../gcc-trunk/gcc/cselib.c:1565
0xde53be vt_expand_var_loc_chain
        ../../gcc-trunk/gcc/var-tracking.c:8332
0xde53be vt_expand_1pvar
        ../../gcc-trunk/gcc/var-tracking.c:8607
0xde53be emit_note_insn_var_location(variable_def**, emit_note_data_def*)
        ../../gcc-trunk/gcc/var-tracking.c:8662
0xded88a void hash_table<variable_hasher,
xcallocator>::traverse_noresize<emit_note_data_def*,
&(emit_note_insn_var_location(variable_def**,
emit_note_data_def*))>(emit_note_data_def*)
        ../../gcc-trunk/gcc/hash-table.h:915
0xded88a void hash_table<variable_hasher,
xcallocator>::traverse<emit_note_data_def*,
&(emit_note_insn_var_location(variable_def**,
emit_note_data_def*))>(emit_note_data_def*)
        ../../gcc-trunk/gcc/hash-table.h:937
0xded88a emit_notes_for_changes
        ../../gcc-trunk/gcc/var-tracking.c:9022
0xdf30fb emit_notes_in_bb
        ../../gcc-trunk/gcc/var-tracking.c:9454
0xdf30fb vt_emit_notes
        ../../gcc-trunk/gcc/var-tracking.c:9515
0xdf3a26 variable_tracking_main_1
        ../../gcc-trunk/gcc/var-tracking.c:10368
0xdf3a26 variable_tracking_main()
        ../../gcc-trunk/gcc/var-tracking.c:10382
0xdf3a26 execute
        ../../gcc-trunk/gcc/var-tracking.c:10419
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.
$ 


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


unsigned int a;
int b[2], c, d, e, f, g, h, i, k[8], l, m, s, t, w;
static int j;

void
fn1 (long long p)
{
  int t = p; 
  c = c ^ b[c ^ (t & 1)];
}

static void
fn2 (long long p)
{
  c = c ^ b[1 ^ (d & 1)];
  fn1 (p >> 1 & 1);
  fn1 (p >> 2);
}

static void
fn3 ()
{
  unsigned char p;
  f = g = 0;
  for (h = 0; h < 6; h++)
    {
      for (s = 0; s < 7; s++)
        if (k[s+1])
          g = 0;
        else
          for (j = 0; j < 2; j++)
            ;
      t = j > 2 ? 0 : 1 >> j;
    }
  if (l)
    {
      short q[2];
      q[0] = q[1] = 0;
      if (m)
        for (i = 0; i < 2; i++)
          {
            unsigned char r = q[i];
            p = f ? r % f : r; 
            e = ((p > 0) <= (q[i] ^ 1)) + a;
            if (k[1])
              for (e = 0; e != 18; ++e)
                k[0] = 0;
          }
    }
}

int
main ()
{
  fn3 ();
  fn2 (w);
  fn2 (j);
  return 0;
}
>From gcc-bugs-return-490911-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Jun 28 07:03:36 2015
Return-Path: <gcc-bugs-return-490911-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 50156 invoked by alias); 28 Jun 2015 07:03:33 -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 50096 invoked by uid 55); 28 Jun 2015 07:03:27 -0000
From: "kkojima at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu
Date: Sun, 28 Jun 2015 07:03:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 4.9.2
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: kkojima at gcc dot gnu.org
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: 4.9.4
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-66563-4-ZGLefnOXXr@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66563-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66563-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/msg03243.txt.bz2
Content-length: 524

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

--- Comment #38 from Kazumoto Kojima <kkojima at gcc dot gnu.org> ---
Author: kkojima
Date: Sun Jun 28 07:02:47 2015
New Revision: 225104

URL: https://gcc.gnu.org/viewcvs?rev"5104&root=gcc&view=rev
Log:
PR target/66563
* [SH] Add a new operand to GOTaddr2picreg so to avoid CSE.  Modify caller
  of gen_GOTaddr2picreg.


Modified:
    branches/gcc-4_9-branch/gcc/ChangeLog
    branches/gcc-4_9-branch/gcc/config/sh/sh.c
    branches/gcc-4_9-branch/gcc/config/sh/sh.md


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

end of thread, other threads:[~2015-07-31 13:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-28  5:21 [Bug target/66691] New: ICE on valid code at -O3 with -g enabled in simplify_subreg, at simplify-rtx.c:5744 su at cs dot ucdavis.edu
2015-06-28  7:18 ` [Bug debug/66691] [5/6 Regression] " trippels at gcc dot gnu.org
2015-06-28  7:57 ` ubizjak at gmail dot com
2015-06-28  9:57 ` trippels at gcc dot gnu.org
2015-06-30 14:56 ` vmakarov at gcc dot gnu.org
2015-06-30 17:41 ` vmakarov at gcc dot gnu.org
2015-06-30 18:10 ` vmakarov at gcc dot gnu.org
2015-07-01  6:51 ` ubizjak at gmail dot com
2015-07-16  9:12 ` rguenth at gcc dot gnu.org
2015-07-31 13:52 ` vmakarov 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).