https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91885
Bug ID: 91885 Summary: ICE when compiling SPEC 2017 blender benchmark with -O3 -fprofile-generate Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: sje at gcc dot gnu.org Target Milestone: --- When compiling the SPEC 2017 526.blender_r benchmark for peak, the compilation that tries to generate profile information aborts with an ICE. This happens to me on an Aarch64 machine (ThunderX2) with -O3 -fprofile-generate. Below is a small testcase cutdown from blender that shows the ICE. % /extra/sellcey/gcc-tot/install/bin/gcc -O3 -fprofile-generate x.i during GIMPLE pass: vect x.i: In function 'IMB_indexer_open': x.i:18:20: internal compiler error: in execute_todo, at passes.c:2032 18 | struct anim_index *IMB_indexer_open(const char *name) { | ^~~~~~~~~~~~~~~~ 0xb87933 execute_todo ../../gcc/gcc/passes.c:2032 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. % cat x.i typedef signed long int __int64_t; typedef unsigned long int __uint64_t; typedef __int64_t int64_t; typedef __uint64_t uint64_t; inline void BLI_endian_switch_int64(int64_t *val) { uint64_t tval = *val; *val = ((tval >> 56)) | ((tval << 40) & 0x00ff000000000000ll) | ((tval << 24) & 0x0000ff0000000000ll) | ((tval << 8) & 0x000000ff00000000ll) | ((tval >> 8) & 0x00000000ff000000ll) | ((tval >> 24) & 0x0000000000ff0000ll) | ((tval >> 40) & 0x000000000000ff00ll) | ((tval << 56)); } typedef struct anim_index_entry { unsigned long long seek_pos_dts; unsigned long long pts; } anim_index_entry; extern struct anim_index_entry *MEM_callocN(int); struct anim_index { int num_entries; struct anim_index_entry *entries; }; struct anim_index *IMB_indexer_open(const char *name) { char header[13]; struct anim_index *idx; int i; idx->entries = MEM_callocN(8); if (((1 == 0) != (header[8] == 'V'))) { for (i = 0; i < idx->num_entries; i++) { BLI_endian_switch_int64((int64_t *)&idx->entries[i].seek_pos_dts); BLI_endian_switch_int64((int64_t *)&idx->entries[i].pts); } } }