https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105215
Frank Scheiner <frank.scheiner at web dot de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frank.scheiner at web dot de --- Comment #4 from Frank Scheiner <frank.scheiner at web dot de> --- (In reply to Andrew Pinski from comment #3) > This is not a dup of bug 85410 as there is no loop there. This problem seems to be gone or hidden with gcc-15-20240630 ([1]): ``` $ md5sum reduced-reproducer.c 0b62444c75e58e96e1defd20de71f82a reduced-reproducer.c $ /opt/gcc-15-20240630-lra-nolibc/ia64-linux/bin/ia64-linux-gcc -std=gnu17 -Wall -O3 -c reduced-reproducer.c -o bug.o -g2 $ echo $? 0 $ /opt/gcc-15-20240630-nolibc/ia64-linux/bin/ia64-linux-gcc -std=gnu17 -Wall -O3 -c reduced-reproducer.c -o bug.o -g2 $ echo $? 0 ``` [1]: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=30ad2fafa9ab2497cc12df62a3240cff6ef25d00 Out of luck I still had cross-compilers from the previous snapshot (gcc-15-20240623 ([2])) installed, and with these, the problem is still present. Shown in the following is the stock version w/o LRA enabled, but the LRA enabled one yields the same (except a changed line number due to the LRA enablement): ``` $ /opt/gcc-15-20240623-nolibc/ia64-linux/bin/ia64-linux-gcc -std=gnu17 -Wall -O3 -c reduced-reproducer.c -o bug.o -g2 during RTL pass: mach reduced-reproducer.c: In function 'X509_CRL_add0_revoked': reduced-reproducer.c:24:1: internal compiler error: in create_block_for_bookkeeping, at sel-sched.cc:4557 24 | } | ^ 0x5f4493 create_block_for_bookkeeping /usr/src/gcc/gcc/sel-sched.cc:4557 0x5f4493 find_place_for_bookkeeping /usr/src/gcc/gcc/sel-sched.cc:4694 0x5f4493 generate_bookkeeping_insn /usr/src/gcc/gcc/sel-sched.cc:4794 0x5f4493 move_op_at_first_insn /usr/src/gcc/gcc/sel-sched.cc:6071 0xbc6545 code_motion_path_driver /usr/src/gcc/gcc/sel-sched.cc:6665 0xbc6936 code_motion_process_successors /usr/src/gcc/gcc/sel-sched.cc:6350 0xbc6936 code_motion_path_driver /usr/src/gcc/gcc/sel-sched.cc:6616 0xbc8adb move_op /usr/src/gcc/gcc/sel-sched.cc:6710 0xbc8adb move_exprs_to_boundary /usr/src/gcc/gcc/sel-sched.cc:5231 0xbc8adb schedule_expr_on_boundary /usr/src/gcc/gcc/sel-sched.cc:5444 0xbca9d7 fill_insns /usr/src/gcc/gcc/sel-sched.cc:5586 0xbca9d7 schedule_on_fences /usr/src/gcc/gcc/sel-sched.cc:7361 0xbca9d7 sel_sched_region_2 /usr/src/gcc/gcc/sel-sched.cc:7499 0xbcc17b sel_sched_region_1 /usr/src/gcc/gcc/sel-sched.cc:7541 0xbcdb0b sel_sched_region(int) /usr/src/gcc/gcc/sel-sched.cc:7642 0xbcdb0b sel_sched_region(int) /usr/src/gcc/gcc/sel-sched.cc:7627 0xbce2e1 run_selective_scheduling() /usr/src/gcc/gcc/sel-sched.cc:7728 0xf31e2e ia64_reorg /usr/src/gcc/gcc/config/ia64/ia64.cc:9870 0xb9fff9 execute /usr/src/gcc/gcc/reorg.cc:3931 ``` [2]: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=eb647daa87b466d0a71246fad302cd81bfce9be5 **** So some change between [2] and [1] possibly fixed that issue for ia64. @Andrew: Maybe you can already spot the related/most likely commit in that range? **** Going back to `-O2` with gcc-15-20240623 also makes it go away and I also didn't see any issue for the OpenSSL versions compiled for EPIC Slack, e.g. [3]. But this is understandable as Slackware (and hence EPIC Slack) compiles packages with `-O2` by default. I also believe T2 doesn't go beyond `-O2` for ia64 packages. [3]: https://ftp.machine-hall.org/pub/slackware/epic-slack-current/slackware64/n/openssl-3.5.1-ia64-1.txz **** Otherwise it's still present for me with: * GCC 12.4.0 * GCC 13.3.0 * GCC 14.2.0 ...cross-compilers and `-O3`. I haven't yet built any newer cross-compilers for these major versions and also didn't test them with `-O2`.