Bug 111060 - [14 Regression] i686-linux bootstrap failure: i686-unknown-linux-gnu/libstdc++-v3/include/limits:1986:1: error: SSE register return with SSE2 disabled
Summary: [14 Regression] i686-linux bootstrap failure: i686-unknown-linux-gnu/libstdc+...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 14.0
: P3 normal
Target Milestone: 14.0
Assignee: Jonathan Wakely
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-18 09:37 UTC by Sergei Trofimovich
Modified: 2023-08-18 22:51 UTC (History)
2 users (show)

See Also:
Host:
Target: i686-*-*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2023-08-18 00:00:00


Attachments
Revert pre-C++23 support for 16-bit float types (1.17 KB, patch)
2023-08-18 12:48 UTC, Jonathan Wakely
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich 2023-08-18 09:37:34 UTC
Noticed bootstrap failure on r14-3320-g7f8d730a563983 today:

$ ~/dev/git/gcc/configure --build=i686-unknown-linux-gnu --host=i686-unknown-linux-gnu --target=i686-unknown-linux-gnu && make
...
/tmp/gb/./gcc/xgcc -shared-libgcc -B/tmp/gb/./gcc -nostdinc++ -L/tmp/gb/i686-unknown-linux-gnu/libstdc++-v3/src -L/tmp/gb/i686-unknown-linux-gnu/libstdc++-v3/src/.libs -L/tmp/gb/i686-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -B/usr/local/i686-unknown-linux-gnu/bin/ -B/usr/local/i686-unknown-linux-gnu/lib/ -isystem /usr/local/i686-unknown-linux-gnu/include -isystem /usr/local/i686-unknown-linux-gnu/sys-include   -fno-checking -x c++-header -nostdinc++ -g -O2 -D_GNU_SOURCE  -I/tmp/gb/i686-unknown-linux-gnu/libstdc++-v3/include/i686-unknown-linux-gnu -I/tmp/gb/i686-unknown-linux-gnu/libstdc++-v3/include -I/home/slyfox/dev/git/gcc/libstdc++-v3/libsupc++  -O2 -g -std=gnu++0x /home/slyfox/dev/git/gcc/libstdc++-v3/include/precompiled/stdc++.h \
-o i686-unknown-linux-gnu/bits/stdc++.h.gch/O2ggnu++0x.gch
In file included from /home/slyfox/dev/git/gcc/libstdc++-v3/include/precompiled/stdc++.h:55:
/tmp/gb/i686-unknown-linux-gnu/libstdc++-v3/include/limits: In static member function 'static constexpr _Float16 std::numeric_limits<_Float16>::min()':
/tmp/gb/i686-unknown-linux-gnu/libstdc++-v3/include/limits:1986:1: error: SSE register return with SSE2 disabled
Comment 1 Jonathan Wakely 2023-08-18 11:39:07 UTC
Ah, looks like the 16-bit types still need to be enabled conditionally.
Comment 2 Jonathan Wakely 2023-08-18 12:48:34 UTC
Created attachment 55756 [details]
Revert pre-C++23 support for 16-bit float types

I'll test this patch as soon as I can get an i686 system set up.
Comment 3 Sergei Trofimovich 2023-08-18 14:38:11 UTC
The patch fixed gcc buid on i686-linux for me. Thank you!
Comment 4 GCC Commits 2023-08-18 22:49:56 UTC
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:

https://gcc.gnu.org/g:27d0cfcb2b33de07351d9cb26f62d04d7416716c

commit r14-3329-g27d0cfcb2b33de07351d9cb26f62d04d7416716c
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Aug 18 13:10:15 2023 +0100

    libstdc++: Revert pre-C++23 support for 16-bit float types [PR111060]
    
    In r14-3304-g1a566fddea212a and r14-3305-g6cf214b4fc97f5 I tried to
    enable std::format for 16-bit float types before C++23. This causes
    errors for targets where the types are defined but can't actually be
    used, e.g. i686 without sse2.
    
    Make the std::numeric_limits and std::formatter specializations for
    _Float16 and __bfloat16_t depend on the __STDCPP_FLOAT16_T__ and
    __STDCPP_BFLOAT16_T__ macros again, so they're only defined for C++23
    when the type is fully supported. This is OK because the main point of
    my earlier commits was to add better support for _Float32 and _Float64.
    It seems fine for the new 16-bit types to only be supported for C++23,
    as they were never present before GCC 13 anyway.
    
    libstdc++-v3/ChangeLog:
    
            PR target/111060
            * include/std/format (formatter): Only define specializations
            for 16-bit floating-point types for C++23.
            * include/std/limits (numeric_limits): Likewise.
Comment 5 Jonathan Wakely 2023-08-18 22:51:09 UTC
Fixed, thanks for the report.