public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "kyukhin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/62120] New: [ICE] ADDITIONAL_REGISTER_NAMES for [YZ]MMs, regno>8 should be disable in 32-bit
Date: Wed, 13 Aug 2014 09:26:00 -0000	[thread overview]
Message-ID: <bug-62120-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 62120
           Summary: [ICE] ADDITIONAL_REGISTER_NAMES for [YZ]MMs, regno>8
                    should be disable in 32-bit
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kyukhin at gcc dot gnu.org

Hello,

It seems like ADDITIONAL_REG_NAMES should be checked for given register
availability during compilation.

Here's example.
extern int i;                                                                  
                                      void foo ()
{
  register int mm_var asm ("xmm9") __attribute__((unused));
  i+=++mm_var;                                                                 
                                      }

Gives correct error:
$ ./build-x86_64-linux/prev-gcc/xgcc -B./build-x86_64-linux/prev-gcc
/export/users/kyukhin/gcc/git/gcc/gcc/testsuite/gcc.target/i386/avx512f-additional-reg-names.c
-S -m32 -mno-sse
/export/users/kyukhin/gcc/git/gcc/gcc/testsuite/gcc.target/i386/avx512f-additional-reg-names.c:
In function ‘foo’:
/export/users/kyukhin/gcc/git/gcc/gcc/testsuite/gcc.target/i386/avx512f-additional-reg-names.c:4:16:
error: invalid register name for ‘mm_var’
   register int mm_var asm ("xmm9") __attribute__((unused));

Replacing xmm to ymm:
extern int i;
void foo ()
{
  register int mm_var asm ("ymm9") __attribute__((unused));
  i+=++mm_var;
}

Gives ICE:
$ ./build-x86_64-linux/prev-gcc/xgcc -B./build-x86_64-linux/prev-gcc
/export/users/kyukhin/gcc/git/gcc/gcc/testsuite/gcc.target/i386/avx512f-additional-reg-names.c
-S -m32 -mno-sse
/export/users/kyukhin/gcc/git/gcc/gcc/testsuite/gcc.target/i386/avx512f-additional-reg-names.c:
In function ‘foo’:
/export/users/kyukhin/gcc/git/gcc/gcc/testsuite/gcc.target/i386/avx512f-additional-reg-names.c:6:1:
internal compiler error: Max. number of generated reload insns per insn is
achieved (90)

 }
 ^
Please submit a full bug report,

I suspect because no check against ADDITIONAL_REG_NAMES are performed.
Probably it should be updated in i386.c:ix86_conditional_register_usage ()
>From gcc-bugs-return-458343-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Aug 13 09:38:21 2014
Return-Path: <gcc-bugs-return-458343-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 9685 invoked by alias); 13 Aug 2014 09:38:18 -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 9662 invoked by uid 55); 13 Aug 2014 09:38:14 -0000
From: "thopre01 at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/62103] Incorrect folding of bitfield in a union on big endian targets
Date: Wed, 13 Aug 2014 09:38:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 4.8.3
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: thopre01 at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: thopre01 at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-62103-4-Y0QkRXlQc7@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-62103-4@http.gcc.gnu.org/bugzilla/>
References: <bug-62103-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/msg00840.txt.bz2
Content-length: 924

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

--- Comment #4 from thopre01 at gcc dot gnu.org ---
Author: thopre01
Date: Wed Aug 13 09:37:41 2014
New Revision: 213899

URL: https://gcc.gnu.org/viewcvs?rev!3899&root=gcc&view=rev
Log:
2014-08-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    Backport from mainline
    2014-08-12  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    PR middle-end/62103
    * gimple-fold.c (fold_ctor_reference): Don't fold in presence of
    bitfields, that is when size doesn't match the size of type or the
    size of the constructor.

    gcc/testsuite/
    PR middle-end/62103
    * gcc.c-torture/execute/bitfld-6.c: New test.

Added:
    branches/gcc-4_8-branch/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c
Modified:
    branches/gcc-4_8-branch/gcc/ChangeLog
    branches/gcc-4_8-branch/gcc/gimple-fold.c
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog


             reply	other threads:[~2014-08-13  9:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-13  9:26 kyukhin at gcc dot gnu.org [this message]
2014-09-30 16:04 ` [Bug target/62120] " tocarip 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-62120-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).