Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 931771 - sys-devel/gcc-13.2.1_p20240510 with USE="lto" fails with internal compiler error at native_encode_rtx
Summary: sys-devel/gcc-13.2.1_p20240510 with USE="lto" fails with internal compiler er...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-11 18:43 UTC by Jon Daniel
Modified: 2024-05-17 12:39 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info.gz,7.78 KB, application/gzip)
2024-05-12 08:52 UTC, Jon Daniel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Daniel 2024-05-11 18:43:43 UTC
emerge -v gcc:13 with USE="lto" fails with internal compiler error

Reproducible: Always

Steps to Reproduce:
1. emerge -v gcc:13
Actual Results:  
/var/tmp/portage/sys-devel/gcc-13.2.1_p20240510/work/gcc-13-20240510/gcc/expmed.cc:1798:19: note: ‘MEM[(struct scalar_int_mode *)&imode]’ was declared here
 1798 |   scalar_int_mode imode;
      |                   ^
lto1: internal compiler error: in native_encode_rtx, at simplify-rtx.cc:6959
0x1cf78f5 diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char const*, __va_list_tag (*) [1], diagnostic_t)
        ???:0
0x1cf7d53 internal_error(char const*, ...)
        ???:0
0x6a6e0a fancy_abort(char const*, int, char const*)
        ???:0
0x67e62b native_encode_rtx(machine_mode, rtx_def*, vec<unsigned char, va_heap, vl_ptr>&, unsigned int, unsigned int) [clone .cold]
        ???:0
0xffd539 optimize_constant_pool(rtx_constant_pool*)
        ???:0
0x10059ff output_shared_constant_pool()
        ???:0
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
make[4]: *** [/var/tmp/portage/sys-devel/gcc-13.2.1_p20240510/temp/ccrDg6yB.mk:92: /var/tmp/portage/sys-devel/gcc-13.2.1_p20240510/temp/ccn3MP3a.ltrans30.ltrans.o] Error 1
make[4]: *** Waiting for unfinished jobs....
^[[01m^[[Klto-wrapper:^[[m^[[K ^[[01;31m^[[Kfatal error: ^[[m^[[Kmake returned 2 exit status
compilation terminated.
/usr/x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[3]: *** [/var/tmp/portage/sys-devel/gcc-13.2.1_p20240510/work/gcc-13-20240510/gcc/objc/Make-lang.in:78: cc1obj] Error 1
make[3]: *** Waiting for unfinished jobs....


Expected Results:  
Sucessful emerge
Comment 1 Jon Daniel 2024-05-11 18:44:53 UTC
Current gcc -v is:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/13/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-13.2.1_p20240503/work/gcc-13-20240503/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/13 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/13/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/13 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/13/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/13/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13 --disable-silent-rules --disable-dependency-tracking --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/13/python --enable-objc-gc --enable-languages=c,c++,d,go,objc,obj-c++,fortran,ada,m2 --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --disable-libunwind-exceptions --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 13.2.1_p20240503 p15' --with-gcc-major-version-only --enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-fixed-point --enable-targets=all --enable-libgomp --disable-libssp --disable-libada --enable-cet --disable-systemtap --disable-valgrind-annotations --enable-vtable-verify --with-zstd --with-isl --disable-isl-version-check --enable-default-pie --enable-default-ssp --disable-fixincludes --with-build-config='bootstrap-O3 bootstrap-lto bootstrap-cet'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.2.1 20240503 (Gentoo 13.2.1_p20240503 p15)
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-05-11 18:46:07 UTC
Please include the tarball the GCC ebuild makes on failure, and emerge --info.

If you're willing, please try to follow https://wiki.gentoo.org/wiki/Gcc-ICE-reporting-guide.

First, try run the failing command manually, then try get preprocessed source and share it here.
Comment 3 Jon Daniel 2024-05-12 08:52:27 UTC
Created attachment 892771 [details]
emerge --info
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-05-12 21:26:40 UTC
No tarball?
Comment 5 Jon Daniel 2024-05-16 13:18:43 UTC
Nope not yet, I accidently removed the /var/tmp/portage/ files.
sys-devel/gcc-14.1.1_p20240511-r1 compiles without the error.
Comment 6 Jon Daniel 2024-05-17 12:39:15 UTC
Compiling gcc:13 with gcc:14 selected succeeds therefore the error is not reproducable and/or a sporadic concurrent race condition.