public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/94201] New: aarch64:ICE in tiny code model for ilp32
@ 2020-03-17  2:21 duanbo3 at huawei dot com
  2020-03-17  6:17 ` [Bug c/94201] " duanbo3 at huawei dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: duanbo3 at huawei dot com @ 2020-03-17  2:21 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94201
           Summary: aarch64:ICE in tiny code model for ilp32
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: duanbo3 at huawei dot com
  Target Milestone: ---
            Target: aarch64

Created attachment 48048
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48048&action=edit
mcmodel_tiny_for_ilp32.patch

hello
I find an ICE when testing GCC10.0 on aarch64 at -mabi=ilp32 -fPIC 
-mcmodel=tiny:

Simple test case
---
extern int bar (void *);
extern long long a; 

int
foo (void)
{
  a=1;
  return bar ((void *)bar);
}
---
GCC version:
gcc version 10.0.1 20200312 (experimental)

Runcommand:
gcc new_test.c -mabi=ilp32 -fPIC  -mcmodel=tiny  -S -o poc.s

Result:
./new_test.c: In function 'foo':
./new_test.c:14:1: error: unrecognizable insn:
(insn 11 10 12 2 (set (reg:SI 0 x0)
        (unspec:DI [
                (symbol_ref:SI ("bar") [flags 0x41] <function_decl
0xffffa0cb3b00 bar>)
            ] UNSPEC_GOTTINYPIC)) "./new_test.c":13:10 -1
     (expr_list:REG_EQUAL (symbol_ref:SI ("bar") [flags 0x41] <function_decl
0xffffa0cb3b00 bar>)
        (nil)))
during RTL pass: vregs
./new_test.c:14:1: internal compiler error: in extract_insn, at recog.c:2294
0x62858b _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        ../.././gcc/rtl-error.c:108
0x6285b7 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        ../.././gcc/rtl-error.c:116
0xc9aa7f extract_insn(rtx_insn*)
        ../.././gcc/recog.c:2294
0x9c8917 instantiate_virtual_regs_in_insn
        ../.././gcc/function.c:1607
0x9c8917 instantiate_virtual_regs
        ../.././gcc/function.c:1977
0x9c8917 execute
        ../.././gcc/function.c:2026

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

* [Bug c/94201] aarch64:ICE in tiny code model for ilp32
  2020-03-17  2:21 [Bug c/94201] New: aarch64:ICE in tiny code model for ilp32 duanbo3 at huawei dot com
@ 2020-03-17  6:17 ` duanbo3 at huawei dot com
  2020-03-17  8:18 ` marxin at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: duanbo3 at huawei dot com @ 2020-03-17  6:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Duanbo <duanbo3 at huawei dot com> ---
reviewing thread:
https://gcc.gnu.org/pipermail/gcc-patches/2020-March/542116.html

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

* [Bug c/94201] aarch64:ICE in tiny code model for ilp32
  2020-03-17  2:21 [Bug c/94201] New: aarch64:ICE in tiny code model for ilp32 duanbo3 at huawei dot com
  2020-03-17  6:17 ` [Bug c/94201] " duanbo3 at huawei dot com
@ 2020-03-17  8:18 ` marxin at gcc dot gnu.org
  2020-03-18 11:50 ` cvs-commit at gcc dot gnu.org
  2020-03-19  7:42 ` [Bug target/94201] " rsandifo at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-03-17  8:18 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-03-17
                 CC|                            |marxin at gcc dot gnu.org
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

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

* [Bug c/94201] aarch64:ICE in tiny code model for ilp32
  2020-03-17  2:21 [Bug c/94201] New: aarch64:ICE in tiny code model for ilp32 duanbo3 at huawei dot com
  2020-03-17  6:17 ` [Bug c/94201] " duanbo3 at huawei dot com
  2020-03-17  8:18 ` marxin at gcc dot gnu.org
@ 2020-03-18 11:50 ` cvs-commit at gcc dot gnu.org
  2020-03-19  7:42 ` [Bug target/94201] " rsandifo at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-03-18 11:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Sandiford <rsandifo@gcc.gnu.org>:

https://gcc.gnu.org/g:d91480dee934478063fe5945b73ff3c108e40a91

commit r10-7240-gd91480dee934478063fe5945b73ff3c108e40a91
Author: Duan bo <duanbo3@huawei.com>
Date:   Wed Mar 18 10:18:39 2020 +0000

    aarch64: Fix SYMBOL_TINY_GOT handling for ILP32 [PR94201]

    The SYMBOL_TINY_GOT case in aarch64_load_symref_appropriately was
    missing support for ILP32.  This caused an ICE on the testcase.

    2020-03-18  Duan bo  <duanbo3@huawei.com>

    gcc/
            PR target/94201
            * config/aarch64/aarch64.md (ldr_got_tiny): Delete.
            (@ldr_got_tiny_<mode>): New pattern.
            (ldr_got_tiny_sidi): Likewise.
            * config/aarch64/aarch64.c (aarch64_load_symref_appropriately): Use
            them to handle SYMBOL_TINY_GOT for ILP32.

    gcc/testsuite/
            PR target/94201
            * gcc.target/aarch64/pr94201.cï¼New test.

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

* [Bug target/94201] aarch64:ICE in tiny code model for ilp32
  2020-03-17  2:21 [Bug c/94201] New: aarch64:ICE in tiny code model for ilp32 duanbo3 at huawei dot com
                   ` (2 preceding siblings ...)
  2020-03-18 11:50 ` cvs-commit at gcc dot gnu.org
@ 2020-03-19  7:42 ` rsandifo at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2020-03-19  7:42 UTC (permalink / raw)
  To: gcc-bugs

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

rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rsandifo at gcc dot gnu.org
         Resolution|---                         |FIXED
          Component|c                           |target
             Status|NEW                         |RESOLVED

--- Comment #3 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Fixed on master.

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

end of thread, other threads:[~2020-03-19  7:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-17  2:21 [Bug c/94201] New: aarch64:ICE in tiny code model for ilp32 duanbo3 at huawei dot com
2020-03-17  6:17 ` [Bug c/94201] " duanbo3 at huawei dot com
2020-03-17  8:18 ` marxin at gcc dot gnu.org
2020-03-18 11:50 ` cvs-commit at gcc dot gnu.org
2020-03-19  7:42 ` [Bug target/94201] " rsandifo 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).