https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71980
Bug ID: 71980 Summary: [5] libraw on x86_64-linux-musl causes ICE in vect_analyze_data_ref_accesses, at tree-vect-data-refs.c:2596 Product: gcc Version: 5.4.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: awilfox at adelielinux dot org Target Milestone: --- Hello. We are starting a new musl libc-based Linux distribution targeting desktops called Adélie Linux; our target is therefore x86_64-foxkit-linux-musl. We use the Gentoo and musl patchsets for GCC. I have also cherry-picked the fix for #71505 and applied it as an additional patch, since it seemed to have a very similar issue. Still, we are seeing the following output when attempting to build libraw-0.16.2: [ 42%] Building CXX object CMakeFiles/raw_r.dir/internal/demosaic_packs.cpp.o /usr/bin/x86_64-foxkit-linux-musl-g++ -DUSE_JPEG -DUSE_JPEG8 -DUSE_LCMS2 -Draw_r_EXPORTS -DNDEBUG -O2 -ggdb -march=nocona -mtune=core2 -fno-omit-frame-pointer -mfpmath=sse -fPIC -I/usr/src/media-libs/libraw-0.16.2/work/LibRaw-0.16.2-.default -I/usr/src/media-libs/libraw-0.16.2/work/LibRaw-0.16.2 -w -fPIC -O4 -o CMakeFiles/raw_r.dir/internal/demosaic_packs.cpp.o -c /usr/src/media-libs/libraw-0.16.2/work/LibRaw-0.16.2/internal/demosaic_packs.cpp /usr/src/media-libs/libraw-0.16.2/work/LibRaw-0.16.2/internal/./dcb_demosaicing.c: In member function ‘void LibRaw::dcb_nyquist()’: /usr/src/media-libs/libraw-0.16.2/work/LibRaw-0.16.2/internal/demosaic_packs.cpp:26:15: internal compiler error: in vect_analyze_data_ref_accesses, at tree-vect-data-refs.c:2596 #define CLASS LibRaw:: ^ /usr/src/media-libs/libraw-0.16.2/work/LibRaw-0.16.2/internal/./dcb_demosaicing.c:231:6: note: in expansion of macro ‘CLASS’ void CLASS dcb_nyquist() ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://bts.adelielinux.org/> for instructions. CMakeFiles/raw.dir/build.make:110: recipe for target 'CMakeFiles/raw.dir/internal/demosaic_packs.cpp.o' failed make[2]: *** [CMakeFiles/raw.dir/internal/demosaic_packs.cpp.o] Error 1 This also occurs on a vanilla 5.4.0, i.e. without any distro patches applied. I do realise that upstream really should not be using -O4. Adding "-fno-tree-loop-vectorize -fno-tree-slp-vectorize" allowed the build to continue. But since this is likely a bug anyway, I have filed it here. ciall ~ # gcc -v Using built-in specs. COLLECT_GCC=/usr/x86_64-foxkit-linux-musl/gcc-bin/5.4.0/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-foxkit-linux-musl/5.4.0/lto-wrapper Target: x86_64-foxkit-linux-musl Configured with: /var/tmp/portage/sys-devel/gcc-5.4.0-r1/work/gcc-5.4.0/configure --host=x86_64-foxkit-linux-musl --build=x86_64-foxkit-linux-musl --prefix=/usr --bindir=/usr/x86_64-foxkit-linux-musl/gcc-bin/5.4.0 --includedir=/usr/lib/gcc/x86_64-foxkit-linux-musl/5.4.0/include --datadir=/usr/share/gcc-data/x86_64-foxkit-linux-musl/5.4.0 --mandir=/usr/share/gcc-data/x86_64-foxkit-linux-musl/5.4.0/man --infodir=/usr/share/gcc-data/x86_64-foxkit-linux-musl/5.4.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-foxkit-linux-musl/5.4.0/include/g++-v5 --with-python-dir=/share/gcc-data/x86_64-foxkit-linux-musl/5.4.0/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=http://bts.adelielinux.org/ --with-pkgversion='Adélie 5.4.0-r1 p1.0, pie-0.6.5' --enable-libstdcxx-time --enable-shared --enable-threads=posix --disable-multilib --disable-altivec --disable-fixed-point --enable-targets=all --disable-libgcj --enable-libgomp --disable-libmudflap --enable-libssp --disable-libcilkrts --disable-libmpx --disable-vtable-verify --disable-libvtv --enable-lto --without-isl --disable-libsanitizer Thread model: posix gcc version 5.4.0 (Adélie 5.4.0-r1 p1.0, pie-0.6.5)