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 middle-end/67639] New: ICE at -O1 and above on x86_64-linux-gnu in expand_gimple_basic_block, at cfgexpand.c:5697
Date: Sat, 19 Sep 2015 18:20:00 -0000	[thread overview]
Message-ID: <bug-67639-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 67639
           Summary: ICE at -O1 and above on x86_64-linux-gnu in
                    expand_gimple_basic_block, at cfgexpand.c:5697
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

The following (invalid) code causes an ICE when compiled with the current gcc
trunk at -O1 and above on x86_64-linux-gnu in the 64-bit mode (but not in
32-bit mode). 

This is a regression from 5.2.x. 


$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-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 20150919 (experimental) [trunk revision 227932] (GCC) 
$ 
$ gcc-trunk -m64 -O0 -c small.c
small.c: In function ‘foo’:
small.c:5:17: error: invalid register name for ‘x’
   register long x asm ("r2") = p;
                 ^
$ gcc-trunk -m32 -O1 -c small.c
small.c: In function ‘foo’:
small.c:5:17: error: invalid register name for ‘x’
   register long x asm ("r2") = p;
                 ^
$ gcc-5.2 -m64 -O1 -c small.c
small.c: In function ‘foo’:
small.c:5:17: error: invalid register name for ‘x’
   register long x asm ("r2") = p;
                 ^
$ 
$ gcc-trunk -m64 -O1 -c small.c
small.c: In function ‘foo’:
small.c:5:17: error: invalid register name for ‘x’
   register long x asm ("r2") = p;
                 ^
small.c:2:1: internal compiler error: tree check: expected ssa_name, have
var_decl in expand_gimple_basic_block, at cfgexpand.c:5697
 foo (int p)
 ^
0xd292cc tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc-trunk/gcc/tree.c:9512
0x6f8e36 tree_check(tree_node*, char const*, int, char const*, tree_code)
        ../../gcc-trunk/gcc/tree.h:2858
0x6f8e36 expand_gimple_basic_block
        ../../gcc-trunk/gcc/cfgexpand.c:5697
0x6fdfc6 execute
        ../../gcc-trunk/gcc/cfgexpand.c:6286
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.
$ 


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


void
foo (int p)
{
  int t; 
  register long x asm ("r2") = p;
  __asm ("mov %0, %1;" : "=r" (t), "=r" (t), "=r" (t), "=r" (x) : "0" (x));
}
>From gcc-bugs-return-497580-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Sep 19 19:34:29 2015
Return-Path: <gcc-bugs-return-497580-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 25414 invoked by alias); 19 Sep 2015 19:34:29 -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 25350 invoked by uid 48); 19 Sep 2015 19:34:26 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/66181] [6 Regression]: /usr/include/bits/types.h:134:16: ICE: verify_type failed
Date: Sat, 19 Sep 2015 19:34:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: ipa
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ubizjak at gmail dot com
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: FIXED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution
Message-ID: <bug-66181-4-jZFMymbMF5@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66181-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66181-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-09/txt/msg01558.txt.bz2
Content-length: 491

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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #17 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Oleg Endo from comment #16)
> Can this be closed?
Yes.
>From gcc-bugs-return-497581-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Sep 19 20:50:14 2015
Return-Path: <gcc-bugs-return-497581-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 75125 invoked by alias); 19 Sep 2015 20:50:14 -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 74925 invoked by uid 48); 19 Sep 2015 20:50:10 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug driver/67640] New: driver passes -fdiagnostics-color= always last
Date: Sat, 19 Sep 2015 20:50:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: driver
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: manu 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: ---
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-67640-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-09/txt/msg01559.txt.bz2
Content-length: 1166

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

            Bug ID: 67640
           Summary: driver passes -fdiagnostics-color= always last
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
          Assignee: unassigned at gcc dot gnu.org
          Reporter: manu at gcc dot gnu.org
  Target Milestone: ---

The driver alters the order when passing command-line options to the compiler
proper. This means that -fdiagnostics-color has no chance to disable color
before the first error is emitted:

$. /xgcc -B ./ ~/test.c -fdiagnostics-color=never -Wnoexcept -E -### 2>&1 |
grep cc1
./cc1 -E -quiet -iprefix ./../lib/gcc/x86_64-pc-linux-gnu/6.0.0/ -isystem
./include -isystem ./include-fixed ./test.c "-mtune=generic" "-march=x86-64"
-Wnoexcept "-fdiagnostics-color=never"

$ ./xgcc -B ./ ~/test.c -Wnoexcept -fdiagnostics-color=never -E -### 2>&1 |
grep cc1
./cc1 -E -quiet -iprefix ./../lib/gcc/x86_64-pc-linux-gnu/6.0.0/ -isystem
./include -isystem ./include-fixed ./test.c "-mtune=generic" "-march=x86-64"
-Wnoexcept "-fdiagnostics-color=never"


             reply	other threads:[~2015-09-19 18:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-19 18:20 su at cs dot ucdavis.edu [this message]
2015-09-21  7:32 ` [Bug middle-end/67639] " rguenth at gcc dot gnu.org
2015-09-21 10:01 ` mpolacek 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-67639-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).