public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/94368] New: [9/10 Regression] ICE in final_scan_insn_1, at final.c:3074(error: could not split insn) on aarch64-linux-gnu
@ 2020-03-27 19:08 doko at debian dot org
  2020-03-29 15:06 ` [Bug rtl-optimization/94368] " marxin at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: doko at debian dot org @ 2020-03-27 19:08 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94368
           Summary: [9/10 Regression] ICE in final_scan_insn_1, at
                    final.c:3074(error: could not split insn) on
                    aarch64-linux-gnu
           Product: gcc
           Version: 9.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at debian dot org
  Target Milestone: ---

seen with gcc-9 branch 20200325, with -O1 on aarch64-linux-gnu.

$ cat partr.i
# 5 "" 3
b, c, d, e, f;
short g;
a() __attribute__((__const__));
h() {
i:
  for (;;) {
    __atomic_load_n(&e, d);
    long j = a(2) && __sync_val_compare_and_swap(&c, 0, j);
    b = 1;
    if (h == e)
      break;
  }
  __sync_val_compare_and_swap(&g, -1, f);
  goto i;
}

$ gcc-9 -c -O1 -Wall partr.i 
: In function ‘h’:
:19:1: error: could not split insn
(insn 51 49 110 (parallel [
            (set (reg:CC 66 cc)
                (unspec_volatile:CC [
                        (const_int 0 [0])
                    ] UNSPECV_ATOMIC_CMPSW))
            (set (reg:SI 1 x1 [125])
                (zero_extend:SI (mem/v:HI (reg/f:DI 27 x27 [132]) [-1  S2
A16])))
            (set (mem/v:HI (reg/f:DI 27 x27 [132]) [-1  S2 A16])
                (unspec_volatile:HI [
                        (const_int -1 [0xffffffffffffffff])
                        (reg:HI 0 x0 [orig:122 f ] [122])
                        (const_int 0 [0])
                        (const_int 32773 [0x8005]) repeated x2
                    ] UNSPECV_ATOMIC_CMPSW))
            (clobber (reg:SI 2 x2 [138]))
        ]) "":17:3 3636 {aarch64_compare_and_swaphi}
     (expr_list:REG_DEAD (reg:HI 0 x0 [orig:122 f ] [122])
        (expr_list:REG_UNUSED (reg:CC 66 cc)
            (expr_list:REG_UNUSED (reg:SI 2 x2 [138])
                (expr_list:REG_UNUSED (reg:SI 1 x1 [125])
                    (nil))))))
during RTL pass: final
:19:1: internal compiler error: in final_scan_insn_1, at final.c:3074
Please submit a full bug report,
with preprocessed source if appropriate.


$ gcc-10 -c -O1 -Wall partr.i 
: In function ‘h’:
:19:1: error: could not split insn
(insn 49 47 5 (parallel [
            (set (reg:CC 66 cc)
                (unspec_volatile:CC [
                        (const_int 0 [0])
                    ] UNSPECV_ATOMIC_CMPSW))
            (set (reg:SI 1 x1 [127])
                (zero_extend:SI (mem/v:HI (reg/f:DI 27 x27 [120]) [-1  S2
A16])))
            (set (mem/v:HI (reg/f:DI 27 x27 [120]) [-1  S2 A16])
                (unspec_volatile:HI [
                        (const_int -1 [0xffffffffffffffff])
                        (reg:HI 0 x0 [orig:124 f ] [124])
                        (const_int 0 [0])
                        (const_int 32773 [0x8005]) repeated x2
                    ] UNSPECV_ATOMIC_CMPSW))
            (clobber (reg:SI 2 x2 [137]))
        ]) "":17:3 3908 {aarch64_compare_and_swaphi}
     (expr_list:REG_DEAD (reg:HI 0 x0 [orig:124 f ] [124])
        (expr_list:REG_UNUSED (reg:CC 66 cc)
            (expr_list:REG_UNUSED (reg:SI 2 x2 [137])
                (expr_list:REG_UNUSED (reg:SI 1 x1 [127])
                    (nil))))))
during RTL pass: final
:19:1: internal compiler error: in final_scan_insn_1, at final.c:3073
0x60be4f _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        ../../src/gcc/rtl-error.c:108
0x8380bb final_scan_insn_1
        ../../src/gcc/final.c:3073
0x8382d3 final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*)
        ../../src/gcc/final.c:3152
0x8385a7 final_1
        ../../src/gcc/final.c:2020
0x838d23 rest_of_handle_final
        ../../src/gcc/final.c:4658
0x838d23 execute
        ../../src/gcc/final.c:4736
Please submit a full bug report,
with preprocessed source if appropriate.


this is a compiler with hardening flags enabled by default.

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

end of thread, other threads:[~2021-01-22 13:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-27 19:08 [Bug rtl-optimization/94368] New: [9/10 Regression] ICE in final_scan_insn_1, at final.c:3074(error: could not split insn) on aarch64-linux-gnu doko at debian dot org
2020-03-29 15:06 ` [Bug rtl-optimization/94368] " marxin at gcc dot gnu.org
2020-03-29 15:17 ` jakub at gcc dot gnu.org
2020-03-29 20:57 ` [Bug rtl-optimization/94368] [9/10 Regression] ICE in final_scan_insn_1, at final.c:3074(error: could not split insn) on aarch64-linux-gnu since r9-3744 jakub at gcc dot gnu.org
2020-03-30  7:53 ` rguenth at gcc dot gnu.org
2020-03-30  9:27 ` jakub at gcc dot gnu.org
2020-03-30 10:08 ` [Bug target/94368] " jakub at gcc dot gnu.org
2020-03-30 10:09 ` jakub at gcc dot gnu.org
2020-03-31  9:09 ` cvs-commit at gcc dot gnu.org
2020-03-31  9:11 ` [Bug target/94368] [9 " jakub at gcc dot gnu.org
2020-04-01 14:23 ` cvs-commit at gcc dot gnu.org
2020-04-22 16:09 ` cvs-commit at gcc dot gnu.org
2021-01-22 13:20 ` wilco 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).