public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [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
@ 2024-02-24 20:13 markmigm at gmail dot com
2024-02-24 20:23 ` [Bug target/114091] " pinskia at gcc dot gnu.org
2024-02-24 20:32 ` markmigm at gmail dot com
0 siblings, 2 replies; 3+ messages in thread
From: markmigm at gmail dot com @ 2024-02-24 20:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114091
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.]
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 expression
static constexpr std::pair<unsigned int, char> tiles[] = {
^ ~
/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20240114/gcc/config/aarch64/aarch64.cc:13096:5:
note: non-constexpr constructor 'pair<int, char, nullptr>' cannot be used in 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=c++11 -fPIC -c -g -DIN_GCC -fno-strict-aliasing -fno-exceptions
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-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
-I/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20240114/gcc/../libcpp/include
-I/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20240114/gcc/../libcody
-I/usr/local/include
-I/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20240114/gcc/../libdecnumber
-I/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20240114/gcc/../libdecnumber/bid
-I../libdecnumber
-I/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20240114/gcc/../libbacktrace
-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=c++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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/114091] gcc/config/aarch64/aarch64.cc has code requiring c++14 instead of c++11, so g++14 bootsrap fails in my example context
2024-02-24 20:13 [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 markmigm at gmail dot com
@ 2024-02-24 20:23 ` pinskia at gcc dot gnu.org
2024-02-24 20:32 ` markmigm at gmail dot com
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-24 20:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114091
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This has already been fixed, over 2 weeks ago.
>20240114
You are using a GCC 14 snapshot from a month ago even. Please try a newer
snapshot before reporting a bug next time.
*** This bug has been marked as a duplicate of bug 113763 ***
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/114091] gcc/config/aarch64/aarch64.cc has code requiring c++14 instead of c++11, so g++14 bootsrap fails in my example context
2024-02-24 20:13 [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 markmigm at gmail dot com
2024-02-24 20:23 ` [Bug target/114091] " pinskia at gcc dot gnu.org
@ 2024-02-24 20:32 ` markmigm at gmail dot com
1 sibling, 0 replies; 3+ messages in thread
From: markmigm at gmail dot com @ 2024-02-24 20:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114091
--- Comment #2 from Mark Millard <markmigm at gmail dot com> ---
(In reply to Andrew Pinski from comment #1)
> This has already been fixed, over 2 weeks ago.
>
> >20240114
>
> You are using a GCC 14 snapshot from a month ago even. Please try a newer
> snapshot before reporting a bug next time.
>
> *** This bug has been marked as a duplicate of bug 113763 ***
Sorry. I was building a FreeBSD port and I'm not a port maintainer, much
less one for FreeBSD's lang/gcc14-devel .
I've sent the port maintainer a copy of your reply. Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-24 20:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-24 20:13 [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 markmigm at gmail dot com
2024-02-24 20:23 ` [Bug target/114091] " pinskia at gcc dot gnu.org
2024-02-24 20:32 ` markmigm at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).