public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "su at cs dot ucdavis.edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/62238] New: ICE with LTO on valid code on x86_64-linux-gnu in verify_ssa (in 64-bit mode)
Date: Sat, 23 Aug 2014 13:58:00 -0000	[thread overview]
Message-ID: <bug-62238-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 62238
           Summary: ICE with LTO on valid code on x86_64-linux-gnu in
                    verify_ssa (in 64-bit mode)
           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 (as
well as 4.9.x) with LTO on x86_64-linux-gnu in 64-bit mode (but not in 32-bit
mode).

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/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 20140823 (experimental) [trunk revision 214394] (GCC) 
$ 
$ gcc-trunk -O0 -c fn1.c
$ gcc-trunk -O0 -c main.c
$ gcc-trunk -O3 *.o
$ ./a.out
$ 
$ gcc-4.8 -flto -O0 -c fn1.c
$ gcc-4.8 -flto -O0 -c main.c
$ gcc-4.8 -flto -O3 *.o
$ ./a.out
$ 
$ gcc-trunk -flto -O0 -c fn1.c
$ gcc-trunk -flto -O0 -c main.c
$ gcc-trunk -flto -O3 *.o
fn1.c: In function ‘fn1’:
fn1.c:4:1: error: missing definition
 fn1 (int p)
 ^
for SSA_NAME: _73 in statement:
_32 = (unsigned int) _73;
fn1.c:4:1: internal compiler error: verify_ssa failed
0xab6be1 verify_ssa(bool, bool)
    ../../gcc-trunk/gcc/tree-ssa.c:1055
0x830f4b execute_function_todo
    ../../gcc-trunk/gcc/passes.c:1758
0x831a23 execute_todo
    ../../gcc-trunk/gcc/passes.c:1808
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.
lto-wrapper: fatal error: gcc-trunk returned 1 exit status
compilation terminated.
/usr/bin/ld: fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status
$ 
$ cat fn1.c
int a[4], b, c, d; 

int
fn1 (int p)
{
  for (; d; d++)
    {
      unsigned int h;
      for (h = 0; h < 3; h++)
    {
      if (a[c+c+h])
        {
          if (p)
        break;
          return 0;
        }
      b = 0;
    }
    }
  return 0;
}
$ cat main.c
extern int fn1 (int);

int
main ()
{
  fn1 (0);
  return 0;
}
$
>From gcc-bugs-return-459092-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Aug 23 14:09:38 2014
Return-Path: <gcc-bugs-return-459092-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 1481 invoked by alias); 23 Aug 2014 14:09:37 -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 1450 invoked by uid 48); 23 Aug 2014 14:09:31 -0000
From: "d.g.gorbachev at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/62239] New: [5 Regression] ICE: in execute_todo, at passes.c:1795 with LTO
Date: Sat, 23 Aug 2014 14:09:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: lto
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: d.g.gorbachev at gmail 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-62239-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: 2014-08/txt/msg01589.txt.bz2
Content-length: 842

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

            Bug ID: 62239
           Summary: [5 Regression] ICE: in execute_todo, at passes.c:1795
                    with LTO
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: d.g.gorbachev at gmail dot com

cat > foo.c
char *foo(unsigned n)
{
  char *s = __builtin_calloc(1, n);
  return __builtin___strcat_chk(s, " ", __builtin_object_size(s, 0));
}
^D
$ gcc -O -flto -shared foo.c
foo.c: In function 'foo':
foo.c:1:7: internal compiler error: in execute_todo, at passes.c:1795
 char *foo(unsigned n)
       ^
0x84e3f13 execute_todo
        ../../gcc-5/gcc/passes.c:1795
Please submit a full bug report,
[...]


             reply	other threads:[~2014-08-23 13:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-23 13:58 su at cs dot ucdavis.edu [this message]
2014-08-26 10:55 ` [Bug tree-optimization/62238] [4.9/5 Regression] " rguenth at gcc dot gnu.org
2014-10-30 10:43 ` jakub at gcc dot gnu.org
2014-11-24 13:08 ` rguenth at gcc dot gnu.org
2014-11-26  9:44 ` [Bug tree-optimization/62238] [4.9 " rguenth at gcc dot gnu.org
2014-11-26  9:44 ` rguenth at gcc dot gnu.org
2014-11-26 11:43 ` rguenth at gcc dot gnu.org
2014-11-26 11:43 ` rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-62238-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).