Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 934383 - sys-devel/gcc-14.1.1_p20240518: ICE compiling media-libs/flac-1.4.3
Summary: sys-devel/gcc-14.1.1_p20240518: ICE compiling media-libs/flac-1.4.3
Status: RESOLVED FIXED
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-06-15 23:31 UTC by Jack
Modified: 2024-06-24 21:39 UTC (History)
2 users (show)

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


Attachments
emerge --info (emerge.info,21.65 KB, text/plain)
2024-06-15 23:32 UTC, Jack
Details
build.log (build.log,43.28 KB, text/x-log)
2024-06-15 23:33 UTC, Jack
Details
preprocessed output (fixed_intrin_avx2.i.gz,143.07 KB, application/gzip)
2024-06-16 00:26 UTC, Jack
Details
expansion of march=native (march_native_expansion,15.22 KB, text/plain)
2024-06-16 00:37 UTC, Jack
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jack 2024-06-15 23:31:54 UTC
/var/tmp/portage/media-libs/flac-1.4.3/work/flac-1.4.3/src/libFLAC/fixed_intrin_avx2.c:57:10: internal compiler error: Segmentation fault
I'll attach emerge --info and build.log
This is on amd64.

Reproducible: Always

Steps to Reproduce:
1. emerge media-libs/flac-1.4.3 with gcc-14.1.1_p20240518
2.
3.
Actual Results:  
ICE

Expected Results:  
successful compile

Not sure to file against gcc-14 or flac.
Comment 1 Jack 2024-06-15 23:32:45 UTC
Created attachment 895891 [details]
emerge --info
Comment 2 Jack 2024-06-15 23:33:23 UTC
Created attachment 895892 [details]
build.log
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-15 23:37:56 UTC
Could you try follow https://wiki.gentoo.org/wiki/GCC_ICE_reporting_guide?

The most important parts I need are:
a) the preprocessed source (so fixed_intrin_avx2.i),
b) expanded -march=native

Thanks!
Comment 4 Jack 2024-06-16 00:08:29 UTC
I'll work on it, but I'll have to extract the exact file that fails from the full build.
Also, what's the best way to expand -march=native?

cpuid2cpuflags gives me
CPU_FLAGS_X86: aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3

but I'm not sure that's exactly what you want.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-16 00:09:10 UTC
(In reply to Jack from comment #4)
> I'll work on it, but I'll have to extract the exact file that fails from the
> full build.

Right, just make it fail, then cd into the build dir, run the failing command again with -save-temps appended.

> Also, what's the best way to expand -march=native?

https://wiki.gentoo.org/wiki/GCC_ICE_reporting_guide#Expand_-march.3Dnative.2C_exact_gcc_version_and_other_system-specific_options
Comment 6 Jack 2024-06-16 00:26:21 UTC
Created attachment 895893 [details]
preprocessed output
Comment 7 Jack 2024-06-16 00:37:22 UTC
Created attachment 895894 [details]
expansion of march=native

It has both methods listed at the link, but the latter is over twice the size of the former, even though it says it should minimize the diff.

Let me know if I can provide anything else.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-16 02:15:39 UTC
Reproduced and looking. Thanks!
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-16 02:16:01 UTC
$ gcc-14 -c a.i -march=znver1 -m32 -mfpmath=sse -O2
during GIMPLE pass: slp
/var/tmp/portage/media-libs/flac-1.4.3/work/flac-1.4.3/src/libFLAC/fixed_intrin_avx2.c: In function 'FLAC__fixed_compute_best_predictor_wide_intrin_avx2':
/var/tmp/portage/media-libs/flac-1.4.3/work/flac-1.4.3/src/libFLAC/fixed_intrin_avx2.c:57:10: internal compiler error: Segmentation fault
0x55ccfe748bc3 crash_signal
        /usr/src/debug/sys-devel/gcc-14.1.1_p20240608/gcc-14-20240608/gcc/toplev.cc:319
0x55ccfeaceb36 vect_schedule_slp_node
        /usr/src/debug/sys-devel/gcc-14.1.1_p20240608/gcc-14-20240608/gcc/tree-vect-slp.cc:9279
0x55ccfeae8643 vect_schedule_slp_node
        /usr/src/debug/sys-devel/gcc-14.1.1_p20240608/gcc-14-20240608/gcc/tree-vect-slp.cc:9248
0x55ccfeae8643 vect_schedule_scc
        /usr/src/debug/sys-devel/gcc-14.1.1_p20240608/gcc-14-20240608/gcc/tree-vect-slp.cc:9682
0x55ccfeae86a8 vect_schedule_scc
        /usr/src/debug/sys-devel/gcc-14.1.1_p20240608/gcc-14-20240608/gcc/tree-vect-slp.cc:9663
0x55ccfeae8e7a vect_schedule_slp(vec_info*, vec<_slp_instance*, va_heap, vl_ptr> const&)
        /usr/src/debug/sys-devel/gcc-14.1.1_p20240608/gcc-14-20240608/gcc/tree-vect-slp.cc:9827
0x55ccfeaebcc9 vect_slp_region
        /usr/src/debug/sys-devel/gcc-14.1.1_p20240608/gcc-14-20240608/gcc/tree-vect-slp.cc:7948
0x55ccfeaed54a vect_slp_bbs
        /usr/src/debug/sys-devel/gcc-14.1.1_p20240608/gcc-14-20240608/gcc/tree-vect-slp.cc:8048
0x55ccfeaedbea vect_slp_function(function*)
        /usr/src/debug/sys-devel/gcc-14.1.1_p20240608/gcc-14-20240608/gcc/tree-vect-slp.cc:8170
0x55ccfeaf9b75 execute
        /usr/src/debug/sys-devel/gcc-14.1.1_p20240608/gcc-14-20240608/gcc/tree-vectorizer.cc:1533
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.
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-16 02:29:01 UTC
Thanks! Reported upstream at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115508. Reducing it too.
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-21 14:09:13 UTC
It'll be fixed in the next 14 snapshot.
Comment 12 Larry the Git Cow gentoo-dev 2024-06-22 23:12:11 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43711137d90df5b496cc396b784c826b154b84db

commit 43711137d90df5b496cc396b784c826b154b84db
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-06-22 23:11:04 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-06-22 23:11:04 +0000

    sys-devel/gcc: add 14.1.1_p20240622
    
    Closes: https://bugs.gentoo.org/934383
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/gcc/Manifest                    |  1 +
 sys-devel/gcc/gcc-14.1.1_p20240622.ebuild | 56 +++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+)
Comment 13 Jack 2024-06-24 21:39:18 UTC
I confirm it works for me.  Thanks.