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

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).