Bug 118788 - [15 Regression] during IPA pass: static-var, ICE: qsort checking failed
Summary: [15 Regression] during IPA pass: static-var, ICE: qsort checking failed
Status: RESOLVED DUPLICATE of bug 113204
Alias: None
Product: gcc
Classification: Unclassified
Component: lto (show other bugs)
Version: 15.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-checking, lto
Depends on:
Blocks:
 
Reported: 2025-02-07 19:52 UTC by Matthias Klose
Modified: 2025-02-08 04:38 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Klose 2025-02-07 19:52:11 UTC
seen with trunk 20241218 and 20250203, bootstrapping the golang-1.23 package. Disabling LTO lets the package build.

            lto1: error: qsort comparator non-negative on sorted output: 10
            during IPA pass: static-var
            lto1: internal compiler error: qsort checking failed
            0x2d33d66 diagnostic_context::diagnostic_impl(rich_location*, diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag (*) [1], diagnostic_t)
            	???:0
            0x2d49d73 internal_error(char const*, ...)
            	???:0
            0x2d91253 gcc_sort_r(void*, unsigned long, unsigned long, int (*)(void const*, void const*, void*), void*)
            	???:0
            0x1346ab1 lto_output()
            	???:0
            0x13e1b4d ipa_write_optimization_summaries(lto_symtab_encoder_d*, bool)
            	???:0
            0xee508a lto_main()
            	???:0
            Please submit a full bug report, with preprocessed source (by using -freport-bug).
            Please include the complete backtrace with any bug report.
            See <file:///usr/share/doc/gcc-15/README.Bugs> for instructions.
            lto-wrapper: fatal error: gcc returned 1 exit status
            compilation terminated.
            /usr/bin/ld: error: lto-wrapper failed
            collect2: error: ld returned 1 exit status


complete build log at
https://launchpad.net/ubuntu/+archive/test-rebuild-20241218-plucky-gcc15/+build/29610190
Comment 1 Sam James 2025-02-07 19:53:23 UTC
This is a long-standing pain. Definitely not a regression, just shows up with checking (and IIRC needs lto).

*** This bug has been marked as a duplicate of bug 113204 ***