https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98383
Bug ID: 98383 Summary: internal compiler error: in make_decl_rtl, at varasm.c:1342 Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: cebtenzzre at gmail dot com Target Milestone: --- Created attachment 49803 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49803&action=edit Preprocessed source that triggers the error g++ crashes with an internal compiler error while compiling a version of oneDNN used by ideep. Specifically, ref_shuffle.cpp at commit 7aed236906b1f7a05c0917e5257a1af05e9ff683 (https://github.com/oneapi-src/oneDNN/blob/7aed236906b1f7a05c0917e5257a1af05e9ff683/src/cpu/ref_shuffle.cpp). I have not attempted to compile the latest version of this file. Preprocessed source is gzipped and attached as ref_shuffle.ii.gz. -fopenmp is necessary to reproduce the crash. It occurs with -O1 (but not -O0, -O2, or -O3), with -fsanitize=address -O1 (same line in the error message), and with -fsanitize=address and either -O2 or -O3 (different line in the error message). Output: $ g++ -c ref_shuffle.ii -fopenmp -O1 during RTL pass: expand ../third_party/ideep/mkl-dnn/src/cpu/ref_shuffle.cpp: In function ‘_ZNK4dnnl4impl3cpu13ref_shuffle_tILi4EE8execute_IL17dnnl_format_tag_t112EEEvRKNS0_10exec_ctx_tE._omp_fn.0’: ../third_party/ideep/mkl-dnn/src/cpu/ref_shuffle.cpp:69:9: internal compiler error: in make_decl_rtl, at varasm.c:1342 69 | #pragma omp parallel for collapse(3) schedule(static) | ^~~ Please submit a full bug report, with preprocessed source if appropriate. See <https://bugs.archlinux.org/> for instructions. $ g++ -c ref_shuffle.ii -fopenmp -fsanitize=address -O2 during RTL pass: expand ../third_party/ideep/mkl-dnn/src/cpu/ref_shuffle.cpp: In function ‘_ZNK4dnnl4impl3cpu13ref_shuffle_tILi4EE8execute_IL17dnnl_format_tag_t112EEEvRKNS0_10exec_ctx_tE._omp_fn.0’: ../third_party/ideep/mkl-dnn/src/cpu/ref_shuffle.cpp:76:56: internal compiler error: in make_decl_rtl, at varasm.c:1342 76 | for (int cc = 0; cc < nstl::min(blksize, C - cb); ++cc) { | ~~^~~~ Please submit a full bug report, with preprocessed source if appropriate. See <https://bugs.archlinux.org/> for instructions. $ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d --with-isl --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-install-libiberty --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-libunwind-exceptions --disable-werror gdc_include_dir=/usr/include/dlang/gdc Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 10.2.0 (GCC)