https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109482
Bug ID: 109482
Summary: experimental/net/internet/endpoint/cons.cc FAILs
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: ro at gcc dot gnu.org
Target Milestone: ---
Host: *-*-solaris2.11
Target: *-*-solaris2.11
Build: *-*-solaris2.11
Created attachment 54839
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54839&action=edit
32-bit i386-pc-solaris2.11 cons-cons.ii
Between 20230329 (b2f327b9be81326c9e59fc6da98074c909ac7408) and 20230330
(a23b33a1bdeff7bc2289d9ebb7cb7b7ec0a605f5), the
experimental/net/internet/endpoint/cons.cc test began to FAIL on Solaris
(11.3 and 11.4, SPARC and x86):
+FAIL: experimental/net/internet/endpoint/cons.cc (test for excess errors)
+UNRESOLVED: experimental/net/internet/endpoint/cons.cc compilation failed to
produce executable
The log shows
Excess errors:
/vol/gcc/src/hg/master/local/libstdc++-v3/testsuite/experimental/net/internet/endpoint/cons.cc:78:
error: non-constant condition for static assertion
/vol/gcc/src/hg/master/local/libstdc++-v3/testsuite/experimental/net/internet/endpoint/cons.cc:78:
error: accessing 'in_addr::<unnamed union>::S_addr' member instead of
initialized 'in_addr::<unnamed union>::S_un_b' member in constant expression
The full message is
/vol/gcc/src/hg/master/local/libstdc++-v3/testsuite/experimental/net/internet/endpoint/cons.cc:
In function 'int main()':
/vol/gcc/src/hg/master/local/libstdc++-v3/testsuite/experimental/net/internet/endpoint/cons.cc:78:
error: non-constant condition for static assertion
/vol/gcc/src/hg/master/local/libstdc++-v3/testsuite/experimental/net/internet/endpoint/cons.cc:78:
in 'constexpr' expansion of 'test_constexpr()'
/vol/gcc/src/hg/master/local/libstdc++-v3/testsuite/experimental/net/internet/endpoint/cons.cc:63:
in 'constexpr' expansion of 'test_default()'
/vol/gcc/src/hg/master/local/libstdc++-v3/testsuite/experimental/net/internet/endpoint/cons.cc:15:
in 'constexpr' expansion of
'std::experimental::net::v1::ip::basic_endpoint<_InternetProtocol>::address()
const [with _InternetProtocol = std::experimental::net::v1::ip::tcp]()'
/vol/gcc/src/hg/master/local/libstdc++-v3/testsuite/experimental/net/internet/endpoint/cons.cc:78:
error: accessing 'in_addr::<unnamed union>::S_addr' member instead of
initialized 'in_addr::<unnamed union>::S_un_b' member in constant expression
This is no doubt due to
commit e0d77144aaa56ee6e00fd0ba520b0a5c7e052423
Author: Jonathan Wakely <[email protected]>
Date: Wed Mar 22 17:00:11 2023 +0000
libstdc++: Fix constexpr functions in <experimental/internet>
but I don't know what's going on. I'm attaching the preprocessed testcase.