Bug 99455 - internal compiler error: In function 'prb_reserve_in_last' in linux kernel
Summary: internal compiler error: In function 'prb_reserve_in_last' in linux kernel
Status: RESOLVED DUPLICATE of bug 99454
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 11.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2021-03-07 20:50 UTC by Khem Raj
Modified: 2021-05-30 20:34 UTC (History)
0 users

See Also:
Host: x86_64
Target: x86_64
Build: x86_64
Known to work: 10.2.0
Known to fail: 11.0
Last reconfirmed:


Attachments
testcase (140.64 KB, application/x-xz)
2021-03-08 19:26 UTC, Khem Raj
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Khem Raj 2021-03-07 20:50:36 UTC
compiling attached source with -Os causes the ICE, it works ok with -O1 or -O2

=========================
$ x86_64-yoe-linux-musl-gcc -Os b.c -c

b.c:21245:1: error: unrecognizable insn:
21245 | }
      | ^
(insn 58 57 446 6 (parallel [
            (asm_operands/v ("push %0 ; popf") ("") 0 [
                    (mem:DI (plus:DI (mem/c:DI (plus:DI (reg/f:DI 7 sp)
                                    (const_int 8 [0x8])) [27 %sfp+-72 S8 A64])
                            (const_int 8 [0x8])) [16 e_56(D)->irqflags+0 S8 A64])
                ]
                 [
                    (asm_input:DI ("g") b.c:9370)
                ]
                 [] b.c:9370)
            (clobber (mem:BLK (scratch) [0  A8]))
            (clobber (reg:CC 17 flags))
        ]) "b.c":9370:2 -1
     (nil))
during RTL pass: postreload
b.c:21245:1: internal compiler error: in extract_constrain_insn, at recog.c:2670
0x1564e08 internal_error(char const*, ...)
        ???:0
0x60277f fancy_abort(char const*, int, char const*)
        ???:0
0x5dddbe _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
        ???:0
0x5dddda _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        ???:0


==============================

gcc version 11.0.1 20210307 (experimental) (GCC)
Comment 1 Andrew Pinski 2021-03-07 21:00:12 UTC
Dup of bug 99422.

*** This bug has been marked as a duplicate of bug 99422 ***
Comment 2 Khem Raj 2021-03-08 19:25:32 UTC
This is still reproducing with gcc built after fix for #99422 went in.
Comment 3 Khem Raj 2021-03-08 19:26:41 UTC
Created attachment 50333 [details]
testcase
Comment 4 Andrew Pinski 2021-05-30 20:34:21 UTC
Dup of bug 99454.

*** This bug has been marked as a duplicate of bug 99454 ***