Bug 105215 - IA64: ICE on openssl-1.1.1n in create_block_for_bookkeeping, at sel-sched.cc:4549 -O3 -g3
Summary: IA64: ICE on openssl-1.1.1n in create_block_for_bookkeeping, at sel-sched.cc:...
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 12.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Keywords: ice-on-valid-code
Depends on:
Blocks: selective-scheduling
  Show dependency treegraph
Reported: 2022-04-11 07:24 UTC by Sergei Trofimovich
Modified: 2022-11-09 08:46 UTC (History)
2 users (show)

See Also:
Target: ia64-unknown-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2022-04-12 00:00:00


Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich 2022-04-11 07:24:54 UTC
Not sure yet if a regression or not. Also not sure if it's an ia64-specific failure of more generic problem. We have a few similar bugs on other targets.

Reduced reproducer:

int OPENSSL_sk_push();
void ERR_put_error();
typedef struct {
  int modified;
int sk_X509_REVOKED_push(int *sk) {
  int ptr = 0;
  return OPENSSL_sk_push(sk, ptr);
struct X509_crl_info_st {
  int *revoked;
} X509_CRL_add0_revoked_crl;
int X509_CRL_add0_revoked() {
  struct X509_crl_info_st *inf = &X509_CRL_add0_revoked_crl;
  if (inf->revoked == 0)
  if (inf->revoked == 0 || sk_X509_REVOKED_push(inf->revoked)) {
    ERR_put_error(0, 0, "");
    return 0;
  inf->enc.modified = 1;
  return 1;

$ ia64-unknown-linux-gnu-gcc -Wall -O3 -c x_crl.o.c -o bug.o -g2
during RTL pass: mach
x_crl.o.c: In function 'X509_CRL_add0_revoked':
x_crl.o.c:25:1: internal compiler error: in create_block_for_bookkeeping, at sel-sched.cc:4549
   25 | }
      | ^
0x684775 create_block_for_bookkeeping
0x684775 find_place_for_bookkeeping
0x684775 generate_bookkeeping_insn
0x684775 move_op_at_first_insn
0xdbb488 code_motion_path_driver
0xdbb856 code_motion_process_successors
0xdbb856 code_motion_path_driver
0xdbbf48 move_op
0xdbbf48 move_exprs_to_boundary
0xdbbf48 schedule_expr_on_boundary
0xdbf843 fill_insns
0xdbf843 schedule_on_fences
0xdbf843 sel_sched_region_2
0xdc0cc6 sel_sched_region_1
0xdc22fb sel_sched_region(int)
0xdc22fb sel_sched_region(int)
0xdc24d9 run_selective_scheduling()
0x1163d7c ia64_reorg
0xd8e909 execute

$ ia64-unknown-linux-gnu-gcc -v |& unnix
Using built-in specs.
Target: ia64-unknown-linux-gnu
Configured with:
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.1 20220410 (experimental) (GCC)
Comment 1 Martin Liška 2022-04-12 07:39:50 UTC
Started with my r12-4608-gb4702276615ff8. I'll take a look..
Comment 2 Martin Liška 2022-04-12 12:11:59 UTC
Ok, so it's something much older when one uses:

-O3 -fvar-tracking-assignments -gstatement-frontiers -c

can be seen at least with GCC 9.
Comment 3 Andrew Pinski 2022-11-09 05:57:54 UTC
This is not a dup of bug 85410 as there is no loop there.