From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 129393858424; Sat, 24 Feb 2024 20:13:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 129393858424 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708805602; bh=8coUARrGysFG3RyBT6Ay1Sf96ToQe2aqQKwJ6ZAfD7c=; h=From:To:Subject:Date:From; b=a06TlUZFGBhApO2mQQM7jXu/VaIEYiVXmlSh0cKIJQ6+Y8mRRTjFLyYNeqAaECHOI 7o6eURnbU55MqjgN8fOgl+Dfhfyewa+2zs56L6O6rugsIiTZ8wt87cfKFy1N9aRHM1 HjIt79ts1DuBTi/87rhtub1Nk8FSO/UqesW0LMK4= From: "markmigm at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114091] New: gcc/config/aarch64/aarch64.cc has code requiring c++14 instead of c++11, so g++14 bootsrap fails in my example context Date: Sat, 24 Feb 2024 20:13:21 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: markmigm at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114091 Bug ID: 114091 Summary: gcc/config/aarch64/aarch64.cc has code requiring c++14 instead of c++11, so g++14 bootsrap fails in my example context Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: markmigm at gmail dot com Target Milestone: --- [I'm not sure where gcc/config/aarch64/aarch64.cc fits in the component alternatives. Feel free to correct that if I got it wrong.]=20 gcc bootstrap is based on c++11, which predates the constructors for pair being constexpr. The gcc/config/aarch64/aarch64.cc specific code can fail because of using pair constructors where constant expressions are required: /wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20240114/gcc/config/aarch64= /aarch64.cc:13095:50: error: constexpr variable 'tiles' must be initialized by a constant express= ion static constexpr std::pair tiles[] =3D { ^ ~ /wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20240114/gcc/config/aarch64= /aarch64.cc:13096:5: note: non-constexpr constructor 'pair' cannot be used i= n a constant expression { 0xff, 'b' }, ^ This stops the bootstrap in the example context. This is detected when clang is doing the bootstrapping on FreeBSD. For reference: c++ -std=3Dc++11 -fPIC -c -g -DIN_GCC -fno-strict-aliasing -fno-except= ions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-stri= ngs -Wcast-qual -Wno-format -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -fPIC -I. -I. -I/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20240114/gcc -I/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20240114/gcc/. -I/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20240114/gcc/../include=20 -I/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20240114/gcc/../libcpp/in= clude -I/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20240114/gcc/../libcody -I/usr/local/include=20 -I/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20240114/gcc/../libdecnum= ber -I/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20240114/gcc/../libdecnum= ber/bid -I../libdecnumber -I/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20240114/gcc/../libbacktr= ace=20 -DLIBICONV_PLUG -o aarch64.o -MT aarch64.o -MMD -MP -MF ./.deps/aarch64.TPo /wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20240114/gcc/config/aarch64= /aarch64.cc where clang used its libc++ (its a FreeBSD context): /usr/include/c++/v1/__utility/pair.h:225:5: note: declared here 225 | pair(_U1&& __u1, _U2&& __u2) | ^ having -std=3Dc++11 on the command line. That results in lack of constexpr status in libc++ . It would appear that until gcc bootstrap intends on being based on c++14 (or later) that the gcc/config/aarch64/aarch64.cc code reported is presuming a post-c++11 context when it should not be.=