https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98645
Bug ID: 98645 Summary: C++ modules support does not work on PowerPC with IEEE 128-bit long double Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: meissner at gcc dot gnu.org Target Milestone: --- I am tuning up the final patches for providing support to enable the PowerPC server compilers to change the default long double from using the IBM 128-bit double double format to IEEE 128-bit. When the default long double is IEEE 128-bit, the powerpc backend needs to create a new type (__ibm128) to allow access to the old IBM 128-bit format. It looks like the gcc/cp/module.cc code does not have a method of dealing with target specific floating point types. If you build a compiler with IEEE 128-bit long double default, the following tests now fail: $ make check-c++ RUNTESTFLAGS=modules.exp Running /home/meissner/fsf-src/trunk/gcc/testsuite/g++.dg/modules/modules.exp ... FAIL: g++.dg/modules/binding-1_a.H -std=c++17 (internal compiler error) FAIL: g++.dg/modules/binding-1_a.H -std=c++17 (test for excess errors) FAIL: g++.dg/modules/binding-1_a.H module-cmi (gcm.cache/home/meissner/fsf-src/trunk/gcc/testsuite/g++.dg/modules/binding-1_a.H.gcm) FAIL: g++.dg/modules/binding-1_b.H -std=c++17 (internal compiler error) FAIL: g++.dg/modules/binding-1_b.H -std=c++17 (test for excess errors) FAIL: g++.dg/modules/binding-1_b.H module-cmi (gcm.cache/home/meissner/fsf-src/trunk/gcc/testsuite/g++.dg/modules/binding-1_b.H.gcm) FAIL: g++.dg/modules/binding-1_c.C -std=c++17 (test for excess errors) FAIL: g++.dg/modules/binding-1_c.C module-cmi hello (gcm.cache/hello.gcm) FAIL: g++.dg/modules/binding-1_a.H -std=c++2a (internal compiler error) FAIL: g++.dg/modules/binding-1_a.H -std=c++2a (test for excess errors) FAIL: g++.dg/modules/binding-1_a.H module-cmi (gcm.cache/home/meissner/fsf-src/trunk/gcc/testsuite/g++.dg/modules/binding-1_a.H.gcm) FAIL: g++.dg/modules/binding-1_b.H -std=c++2a (internal compiler error) FAIL: g++.dg/modules/binding-1_b.H -std=c++2a (test for excess errors) FAIL: g++.dg/modules/binding-1_b.H module-cmi (gcm.cache/home/meissner/fsf-src/trunk/gcc/testsuite/g++.dg/modules/binding-1_b.H.gcm) FAIL: g++.dg/modules/binding-1_c.C -std=c++2a (test for excess errors) FAIL: g++.dg/modules/binding-1_c.C module-cmi hello (gcm.cache/hello.gcm) FAIL: g++.dg/modules/hello-1_a.C -std=c++17 (internal compiler error) FAIL: g++.dg/modules/hello-1_a.C -std=c++17 (test for excess errors) FAIL: g++.dg/modules/hello-1_a.C module-cmi hello (gcm.cache/hello.gcm) FAIL: g++.dg/modules/hello-1_b.C -std=c++17 (test for excess errors) FAIL: g++.dg/modules/hello-1_a.C -std=c++2a (internal compiler error) FAIL: g++.dg/modules/hello-1_a.C -std=c++2a (test for excess errors) FAIL: g++.dg/modules/hello-1_a.C module-cmi hello (gcm.cache/hello.gcm) FAIL: g++.dg/modules/hello-1_b.C -std=c++2a (test for excess errors) FAIL: g++.dg/modules/iostream-1_a.H -std=c++17 (internal compiler error) FAIL: g++.dg/modules/iostream-1_a.H -std=c++17 (test for excess errors) FAIL: g++.dg/modules/iostream-1_a.H module-cmi (gcm.cache/home/meissner/fsf-src/trunk/gcc/testsuite/g++.dg/modules/iostream-1_a.H.gcm) FAIL: g++.dg/modules/iostream-1_b.C -std=c++17 (test for excess errors) FAIL: g++.dg/modules/iostream-1_a.H -std=c++2a (internal compiler error) FAIL: g++.dg/modules/iostream-1_a.H module-cmi (gcm.cache/home/meissner/fsf-src/trunk/gcc/testsuite/g++.dg/modules/iostream-1_a.H.gcm) FAIL: g++.dg/modules/iostream-1_b.C -std=c++2a (test for excess errors) FAIL: g++.dg/modules/string-1_a.H -std=c++17 (internal compiler error) FAIL: g++.dg/modules/string-1_a.H -std=c++17 (test for excess errors) FAIL: g++.dg/modules/string-1_a.H module-cmi (gcm.cache/home/meissner/fsf-src/trunk/gcc/testsuite/g++.dg/modules/string-1_a.H.gcm) FAIL: g++.dg/modules/string-1_b.C -std=c++17 (test for excess errors) FAIL: g++.dg/modules/string-1_a.H -std=c++2a (internal compiler error) FAIL: g++.dg/modules/string-1_a.H -std=c++2a (test for excess errors) FAIL: g++.dg/modules/string-1_a.H module-cmi (gcm.cache/home/meissner/fsf-src/trunk/gcc/testsuite/g++.dg/modules/string-1_a.H.gcm) FAIL: g++.dg/modules/string-1_b.C -std=c++2a (test for excess errors) FAIL: g++.dg/modules/xtreme-header-1_a.H -std=c++17 (internal compiler error) FAIL: g++.dg/modules/xtreme-header-1_a.H -std=c++17 (test for excess errors) FAIL: g++.dg/modules/xtreme-header-1_a.H module-cmi (gcm.cache/home/meissner/fsf-src/trunk/gcc/testsuite/g++.dg/modules/xtreme-header-1_a.H.gcm) FAIL: g++.dg/modules/xtreme-header-1_b.C -std=c++17 (test for excess errors) FAIL: g++.dg/modules/xtreme-header-1_c.C -std=c++17 (test for excess errors) FAIL: g++.dg/modules/xtreme-header-1_a.H -std=c++2a (internal compiler error) FAIL: g++.dg/modules/xtreme-header-1_a.H -std=c++2a (test for excess errors) FAIL: g++.dg/modules/xtreme-header-1_a.H module-cmi (gcm.cache/home/meissner/fsf-src/trunk/gcc/testsuite/g++.dg/modules/xtreme-header-1_a.H.gcm) FAIL: g++.dg/modules/xtreme-header-1_b.C -std=c++2a (test for excess errors) FAIL: g++.dg/modules/xtreme-header-1_c.C -std=c++2a (test for excess errors) FAIL: g++.dg/modules/xtreme-header-2_a.H -std=c++17 (internal compiler error) FAIL: g++.dg/modules/xtreme-header-2_a.H -std=c++17 (test for excess errors) FAIL: g++.dg/modules/xtreme-header-2_a.H module-cmi (gcm.cache/home/meissner/fsf-src/trunk/gcc/testsuite/g++.dg/modules/xtreme-header-2_a.H.gcm) FAIL: g++.dg/modules/xtreme-header-2_b.C -std=c++17 (test for excess errors) FAIL: g++.dg/modules/xtreme-header-2_c.C -std=c++17 (test for excess errors) FAIL: g++.dg/modules/xtreme-header-2_a.H -std=c++2a (internal compiler error) FAIL: g++.dg/modules/xtreme-header-2_a.H -std=c++2a (test for excess errors) FAIL: g++.dg/modules/xtreme-header-2_a.H module-cmi (gcm.cache/home/meissner/fsf-src/trunk/gcc/testsuite/g++.dg/modules/xtreme-header-2_a.H.gcm) FAIL: g++.dg/modules/xtreme-header-2_b.C -std=c++2a (test for excess errors) FAIL: g++.dg/modules/xtreme-header-2_c.C -std=c++2a (test for excess errors) FAIL: g++.dg/modules/xtreme-header-3_a.H -std=c++17 (internal compiler error) FAIL: g++.dg/modules/xtreme-header-3_a.H -std=c++17 (test for excess errors) FAIL: g++.dg/modules/xtreme-header-3_a.H module-cmi (gcm.cache/home/meissner/fsf-src/trunk/gcc/testsuite/g++.dg/modules/xtreme-header-3_a.H.gcm) FAIL: g++.dg/modules/xtreme-header-3_b.C -std=c++17 (test for excess errors) FAIL: g++.dg/modules/xtreme-header-3_c.C -std=c++17 (test for excess errors) FAIL: g++.dg/modules/xtreme-header-3_a.H -std=c++2a (internal compiler error) FAIL: g++.dg/modules/xtreme-header-3_a.H -std=c++2a (test for excess errors) FAIL: g++.dg/modules/xtreme-header-3_a.H module-cmi (gcm.cache/home/meissner/fsf-src/trunk/gcc/testsuite/g++.dg/modules/xtreme-header-3_a.H.gcm) FAIL: g++.dg/modules/xtreme-header-3_b.C -std=c++2a (test for excess errors) FAIL: g++.dg/modules/xtreme-header-3_c.C -std=c++2a (test for excess errors) FAIL: g++.dg/modules/xtreme-header-4_a.H -std=c++17 (internal compiler error) FAIL: g++.dg/modules/xtreme-header-4_a.H -std=c++17 (test for excess errors) FAIL: g++.dg/modules/xtreme-header-4_a.H module-cmi (gcm.cache/home/meissner/fsf-src/trunk/gcc/testsuite/g++.dg/modules/xtreme-header-4_a.H.gcm) FAIL: g++.dg/modules/xtreme-header-4_b.C -std=c++17 (test for excess errors) FAIL: g++.dg/modules/xtreme-header-4_c.C -std=c++17 (test for excess errors) FAIL: g++.dg/modules/xtreme-header-4_a.H -std=c++2a (internal compiler error) FAIL: g++.dg/modules/xtreme-header-4_a.H -std=c++2a (test for excess errors) FAIL: g++.dg/modules/xtreme-header-4_a.H module-cmi (gcm.cache/home/meissner/fsf-src/trunk/gcc/testsuite/g++.dg/modules/xtreme-header-4_a.H.gcm) FAIL: g++.dg/modules/xtreme-header-4_b.C -std=c++2a (test for excess errors) FAIL: g++.dg/modules/xtreme-header-4_c.C -std=c++2a (test for excess errors) FAIL: g++.dg/modules/xtreme-header-5_a.H -std=c++17 (internal compiler error) FAIL: g++.dg/modules/xtreme-header-5_a.H -std=c++17 (test for excess errors) FAIL: g++.dg/modules/xtreme-header-5_a.H module-cmi (gcm.cache/home/meissner/fsf-src/trunk/gcc/testsuite/g++.dg/modules/xtreme-header-5_a.H.gcm) FAIL: g++.dg/modules/xtreme-header-5_b.C -std=c++17 (test for excess errors) FAIL: g++.dg/modules/xtreme-header-5_c.C -std=c++17 (test for excess errors) FAIL: g++.dg/modules/xtreme-header-5_a.H -std=c++2a (internal compiler error) FAIL: g++.dg/modules/xtreme-header-5_a.H -std=c++2a (test for excess errors) FAIL: g++.dg/modules/xtreme-header-5_a.H module-cmi (gcm.cache/home/meissner/fsf-src/trunk/gcc/testsuite/g++.dg/modules/xtreme-header-5_a.H.gcm) FAIL: g++.dg/modules/xtreme-header-5_b.C -std=c++2a (test for excess errors) FAIL: g++.dg/modules/xtreme-header-5_c.C -std=c++2a (test for excess errors) FAIL: g++.dg/modules/xtreme-header-6_a.H -std=c++2a (internal compiler error) FAIL: g++.dg/modules/xtreme-header-6_a.H -std=c++2a (test for excess errors) FAIL: g++.dg/modules/xtreme-header-6_a.H module-cmi (gcm.cache/home/meissner/fsf-src/trunk/gcc/testsuite/g++.dg/modules/xtreme-header-6_a.H.gcm) FAIL: g++.dg/modules/xtreme-header-6_b.C -std=c++2a (test for excess errors) FAIL: g++.dg/modules/xtreme-header-6_c.C -std=c++2a (test for excess errors) FAIL: g++.dg/modules/xtreme-header_a.H -std=c++17 (internal compiler error) FAIL: g++.dg/modules/xtreme-tr1_a.H -std=c++17 (test for excess errors) FAIL: g++.dg/modules/xtreme-tr1_a.H module-cmi (gcm.cache/home/meissner/fsf-src/trunk/gcc/testsuite/g++.dg/modules/xtreme-tr1_a.H.gcm) FAIL: g++.dg/modules/xtreme-tr1_b.C -std=c++17 (test for excess errors) FAIL: g++.dg/modules/xtreme-tr1_a.H -std=c++2a (internal compiler error) FAIL: g++.dg/modules/xtreme-tr1_a.H -std=c++2a (test for excess errors) FAIL: g++.dg/modules/xtreme-tr1_a.H module-cmi (gcm.cache/home/meissner/fsf-src/trunk/gcc/testsuite/g++.dg/modules/xtreme-tr1_a.H.gcm) FAIL: g++.dg/modules/xtreme-tr1_b.C -std=c++2a (test for excess errors) === g++ Summary === # of expected passes 4083 # of unexpected failures 111 # of expected failures 6 # of unresolved testcases 8 It looks like it is failing at gcc/cp/module.cc in two places because the switch statement did not have a case for REAL_TYPE: Line 8776 (in trees_out::type_node) and line 9288 (in trees_in::type_node). There are patches that will be needed for the full IEEE 128-bit long double support (for built-ins and Decimal/IEEE support), but the current code will show the problem. To configure the compiler, you will need GLIBC 2.32 or newer. I use the Advance Toolchain which provides GLIBC 2.32. I used the options: --with-long-double-format=ieee --with-native-system-header-dir=/opt/at14.0/include --with-advance-toolchain=at14.0 --disable-bootstrap