[gcc r15-172] libgfortran: Fix libgfortran.so versioning on Solaris with subdirs
https://gcc.gnu.org/g:8daf4eb02a2e739d5c62b94528adfddaed506a0a commit r15-172-g8daf4eb02a2e739d5c62b94528adfddaed506a0a Author: Rainer Orth Date: Mon May 6 09:31:11 2024 +0200 libgfortran: Fix libgfortran.so versioning on Solaris with subdirs The move of libgfortran objects to subdirectories completely broke the creation of libgfortran.so on Solaris. Since the gfortran.ver-sun rule doesn't support that structure, no libtool objects are found, thus no symbols exported from libgfortran.so, causing every link to fail. This patch fixes this by allowing for the new structure. Tested on i386-pc-solaris2.11 and sparc-sun-solaris2.11. 2024-05-05 Rainer Orth libgfortran: * Makefile.am [LIBGFOR_USE_SYMVER_SUN] (gfortran.ver-sun): Handle objects in subdirs. * Makefile.in: Regenerate. Diff: --- libgfortran/Makefile.am | 2 +- libgfortran/Makefile.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libgfortran/Makefile.am b/libgfortran/Makefile.am index 8bef1729219..9e1d12f7546 100644 --- a/libgfortran/Makefile.am +++ b/libgfortran/Makefile.am @@ -29,7 +29,7 @@ gfortran.ver-sun : gfortran.ver \ $(libgfortran_la_OBJECTS) $(libgfortran_la_LIBADD) perl $(top_srcdir)/../contrib/make_sunver.pl \ gfortran.ver \ - $(libgfortran_la_OBJECTS:%.lo=.libs/%.o) \ + $(subst /,/.libs/,$(libgfortran_la_OBJECTS:.lo=.o)) \ `echo $(libgfortran_la_LIBADD) | \ sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \ > $@ || (rm -f $@ ; exit 1) diff --git a/libgfortran/Makefile.in b/libgfortran/Makefile.in index f4fe0ebc43e..ab10a476eae 100644 --- a/libgfortran/Makefile.in +++ b/libgfortran/Makefile.in @@ -4576,7 +4576,7 @@ uninstall-am: uninstall-cafexeclibLTLIBRARIES uninstall-gfor_cHEADERS \ @LIBGFOR_USE_SYMVER_SUN_TRUE@@LIBGFOR_USE_SYMVER_TRUE@ $(libgfortran_la_OBJECTS) $(libgfortran_la_LIBADD) @LIBGFOR_USE_SYMVER_SUN_TRUE@@LIBGFOR_USE_SYMVER_TRUE@ perl $(top_srcdir)/../contrib/make_sunver.pl \ @LIBGFOR_USE_SYMVER_SUN_TRUE@@LIBGFOR_USE_SYMVER_TRUE@ gfortran.ver \ -@LIBGFOR_USE_SYMVER_SUN_TRUE@@LIBGFOR_USE_SYMVER_TRUE@ $(libgfortran_la_OBJECTS:%.lo=.libs/%.o) \ +@LIBGFOR_USE_SYMVER_SUN_TRUE@@LIBGFOR_USE_SYMVER_TRUE@ $(subst /,/.libs/,$(libgfortran_la_OBJECTS:.lo=.o)) \ @LIBGFOR_USE_SYMVER_SUN_TRUE@@LIBGFOR_USE_SYMVER_TRUE@ `echo $(libgfortran_la_LIBADD) | \ @LIBGFOR_USE_SYMVER_SUN_TRUE@@LIBGFOR_USE_SYMVER_TRUE@ sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \ @LIBGFOR_USE_SYMVER_SUN_TRUE@@LIBGFOR_USE_SYMVER_TRUE@ > $@ || (rm -f $@ ; exit 1)
[gcc r14-10170] testsuite: c++: Skip g++.dg/analyzer on Solaris [PR111475]
https://gcc.gnu.org/g:c7b4305f9c0d23a9dfb2cf0855d345ff67e48732 commit r14-10170-gc7b4305f9c0d23a9dfb2cf0855d345ff67e48732 Author: Rainer Orth Date: Mon May 6 10:54:27 2024 +0200 testsuite: c++: Skip g++.dg/analyzer on Solaris [PR111475] Almost 1400 C++ analyzer tests FAIL on Solaris. The patch is too risky to apply so close to the GCC 14.1.0 release, so disable the tests on Solaris instead to reduce the noise. Tested on i386-pc-solaris2.11, sparc-sun-solaris2.11, and x86_64-pc-linux-gnu. 2024-05-05 Rainer Orth gcc/testsuite: PR analyzer/111475 * g++.dg/analyzer/analyzer.exp: Disable on *-*-solaris2.*. Diff: --- gcc/testsuite/g++.dg/analyzer/analyzer.exp | 5 + 1 file changed, 5 insertions(+) diff --git a/gcc/testsuite/g++.dg/analyzer/analyzer.exp b/gcc/testsuite/g++.dg/analyzer/analyzer.exp index 863c14de057..7bbafc5bdb4 100644 --- a/gcc/testsuite/g++.dg/analyzer/analyzer.exp +++ b/gcc/testsuite/g++.dg/analyzer/analyzer.exp @@ -24,6 +24,11 @@ if { ![check_effective_target_analyzer] } { return } +# Disable on Solaris until PR analyzer/111475 is fixed. +if { [istarget *-*-solaris2.*] } { +return +} + if [info exists DEFAULT_CXXFLAGS] then { set save_default_cxxflags $DEFAULT_CXXFLAGS }
[gcc r15-430] testsuite: c++: Allow for std::printf in g++.dg/modules/stdio-1_a.H [PR98529]
https://gcc.gnu.org/g:c4af8ebdb0318b5e9ed3dfdea5501a3260f3acea commit r15-430-gc4af8ebdb0318b5e9ed3dfdea5501a3260f3acea Author: Rainer Orth Date: Mon May 13 14:02:46 2024 +0200 testsuite: c++: Allow for std::printf in g++.dg/modules/stdio-1_a.H [PR98529] g++.dg/modules/stdio-1_a.H currently FAILs on Solaris: FAIL: g++.dg/modules/stdio-1_a.H -std=c++17 scan-lang-dump module "Depset:0 decl entity:[0-9]* function_decl:'::printf'" FAIL: g++.dg/modules/stdio-1_a.H -std=c++2a scan-lang-dump module "Depset:0 decl entity:[0-9]* function_decl:'::printf'" FAIL: g++.dg/modules/stdio-1_a.H -std=c++2b scan-lang-dump module "Depset:0 decl entity:[0-9]* function_decl:'::printf'" The problem is that the module file doesn't contain Depset:0 decl entity:95 function_decl:'::printf' as expected by the test, but Depset:0 decl entity:26 function_decl:'::std::printf' This happens because Solaris declares printf in namespace std as allowed by C++11, Annex D, D.5. This patch allows for both forms. Tested on i386-pc-solaris2.11, sparc-sun-solaris2.11, and x86_64-pc-linux-gnu. 2024-05-13 Rainer Orth gcc/testsuite: PR c++/98529 * g++.dg/modules/stdio-1_a.H (scan-lang-dump): Allow for ::std::printf. Diff: --- gcc/testsuite/g++.dg/modules/stdio-1_a.H | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/g++.dg/modules/stdio-1_a.H b/gcc/testsuite/g++.dg/modules/stdio-1_a.H index 9eda2331dd90..3089efdb28f1 100644 --- a/gcc/testsuite/g++.dg/modules/stdio-1_a.H +++ b/gcc/testsuite/g++.dg/modules/stdio-1_a.H @@ -10,5 +10,5 @@ #endif // There should be *lots* of depsets (209 for glibc today) // { dg-final { scan-lang-dump {Writing section:60 } module } } -// { dg-final { scan-lang-dump {Depset:0 decl entity:[0-9]* function_decl:'::printf'} module } } +// { dg-final { scan-lang-dump {Depset:0 decl entity:[0-9]* function_decl:'(::std)?::printf'} module } } // { dg-final { scan-lang-dump {Depset:1 binding namespace_decl:'::printf'} module } }
[gcc r15-486] testsuite: analyzer: Fix fd-glibc-byte-stream-connection-server.c on Solaris [PR107750]
https://gcc.gnu.org/g:f97d86f897bcf0ffda4d8d2e5b78a160e9ece140 commit r15-486-gf97d86f897bcf0ffda4d8d2e5b78a160e9ece140 Author: Rainer Orth Date: Tue May 14 16:23:14 2024 +0200 testsuite: analyzer: Fix fd-glibc-byte-stream-connection-server.c on Solaris [PR107750] gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c currently FAILs on Solaris: FAIL: gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c (test for excess errors) Excess errors: /vol/gcc/src/hg/master/local/gcc/testsuite/gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c:91:3: error: implicit declaration of function 'memset' [-Wimplicit-function-declaration] Solaris has but no declaration of memset. While one can argue that this should be fixed, it's easy enough to just include instead, which is what this patch does. Tested on i386-pc-solaris2.11 and i686-pc-linux-gnu. 2024-05-14 Rainer Orth gcc/testsuite: PR analyzer/107750 * gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c: Include . Diff: --- gcc/testsuite/gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c b/gcc/testsuite/gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c index f922a52238f9..71dbef6d6e77 100644 --- a/gcc/testsuite/gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c +++ b/gcc/testsuite/gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #if __has_include()
[gcc r15-509] testsuite: i386: Fix g++.target/i386/pr97054.C on Solaris
https://gcc.gnu.org/g:a0e9fde8766a5b5a28a76c3a6fb0276efa47cd6d commit r15-509-ga0e9fde8766a5b5a28a76c3a6fb0276efa47cd6d Author: Rainer Orth Date: Wed May 15 13:13:48 2024 +0200 testsuite: i386: Fix g++.target/i386/pr97054.C on Solaris g++.target/i386/pr97054.C currently FAILs on 64-bit Solaris/x86: FAIL: g++.target/i386/pr97054.C -std=gnu++14 (test for excess errors) UNRESOLVED: g++.target/i386/pr97054.C -std=gnu++14 compilation failed to produce executable FAIL: g++.target/i386/pr97054.C -std=gnu++17 (test for excess errors) UNRESOLVED: g++.target/i386/pr97054.C -std=gnu++17 compilation failed to produce executable FAIL: g++.target/i386/pr97054.C -std=gnu++2a (test for excess errors) UNRESOLVED: g++.target/i386/pr97054.C -std=gnu++2a compilation failed to produce executable FAIL: g++.target/i386/pr97054.C -std=gnu++98 (test for excess errors) UNRESOLVED: g++.target/i386/pr97054.C -std=gnu++98 compilation failed to produce executable Excess errors: /vol/gcc/src/hg/master/local/gcc/testsuite/g++.target/i386/pr97054.C:49:20: error: frame pointer required, but reserved Since Solaris/x86 defaults to -fno-omit-frame-pointer, this patch explicitly builds with -fomit-frame-pointer as is the default on other x86 targets. Tested on i386-pc-solaris2.11 (32 and 64-bit) and x86_64-pc-linux-gnu. 2024-05-15 Rainer Orth gcc/testsuite: * g++.target/i386/pr97054.C (dg-options): Add -fomit-frame-pointer. Diff: --- gcc/testsuite/g++.target/i386/pr97054.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/g++.target/i386/pr97054.C b/gcc/testsuite/g++.target/i386/pr97054.C index d0693af2a42c..b18ef2e46cae 100644 --- a/gcc/testsuite/g++.target/i386/pr97054.C +++ b/gcc/testsuite/g++.target/i386/pr97054.C @@ -1,6 +1,6 @@ // { dg-do run { target { ! ia32 } } } // { dg-require-effective-target fstack_protector } -// { dg-options "-O2 -fno-strict-aliasing -msse4.2 -mfpmath=sse -fPIC -fstack-protector-strong -O2" } +// { dg-options "-O2 -fno-strict-aliasing -msse4.2 -mfpmath=sse -fPIC -fstack-protector-strong -O2 -fomit-frame-pointer" } struct p2_icode *ipc; register int pars asm("r13");
[gcc r15-511] testsuite: Require lto-plugin in gcc.dg/ipa/ipa-icf-38.c [PR85656]
https://gcc.gnu.org/g:ff105c39bde43bdb57615e3a4c7af71fbef5f26e commit r15-511-gff105c39bde43bdb57615e3a4c7af71fbef5f26e Author: Rainer Orth Date: Wed May 15 13:23:08 2024 +0200 testsuite: Require lto-plugin in gcc.dg/ipa/ipa-icf-38.c [PR85656] gcc.dg/ipa/ipa-icf-38.c currently FAILs on Solaris (SPARC and x86, 32 and 64-bit): FAIL: gcc.dg/ipa/ipa-icf-38.c scan-ltrans-tree-dump-not optimized "Function bar" As it turns out, this only happens when the Solaris linker is used; with GNU ld the test PASSes just fine. In fact, that happens because gld supports the lto-plugin while ld does not: in a Solaris build with gld, the test FAILs the same way as with ld when -fno-use-linker-plugin is passed, so this patch requires linker_plugin. Tested on i386-pc-solaris2.11 (ld and gld) and x86_64-pc-linux-gnu. 2024-05-15 Rainer Orth gcc/testsuite: PR ipa/85656 * gcc.dg/ipa/ipa-icf-38.c: Require linker_plugin. Diff: --- gcc/testsuite/gcc.dg/ipa/ipa-icf-38.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-38.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-38.c index a8824d040e52..74b5e56f9180 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-38.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-38.c @@ -2,6 +2,7 @@ /* { dg-require-alias "" } */ /* { dg-options "-O2 -fdump-ipa-icf-optimized -flto -fdump-tree-optimized -fno-ipa-vrp" } */ /* { dg-require-effective-target lto } */ +/* { dg-require-effective-target linker_plugin } */ /* { dg-additional-sources "ipa-icf-38a.c" }*/ /* Based on ipa-icf-3.c. */
[gcc r15-3063] testsuite: i386: Fix g++.target/i386/pr116275-2.C on Solaris/x86
https://gcc.gnu.org/g:cc8fc9850d1a4b614da104cfecd4c2368ee03c98 commit r15-3063-gcc8fc9850d1a4b614da104cfecd4c2368ee03c98 Author: Rainer Orth Date: Wed Aug 21 10:04:07 2024 +0200 testsuite: i386: Fix g++.target/i386/pr116275-2.C on Solaris/x86 The new g++.target/i386/pr116275-2.C test FAILs on 32-bit Solaris/x86: FAIL: g++.target/i386/pr116275-2.C scan-assembler vpslld This happens because Solaris defaults to -mstackrealign, disabling -mstv. Fixed by disabling the former and enabling the latter. Tested on i386-pc-solaris2.11 and x86_64-pc-linux-gnu. 2024-08-20 Rainer Orth gcc/testsuite: * g++.target/i386/pr116275-2.C (dg-options): Add -mstv -mno-stackrealign. Diff: --- gcc/testsuite/g++.target/i386/pr116275-2.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/g++.target/i386/pr116275-2.C b/gcc/testsuite/g++.target/i386/pr116275-2.C index 98d3c19e59c8..9c571fda01f5 100644 --- a/gcc/testsuite/g++.target/i386/pr116275-2.C +++ b/gcc/testsuite/g++.target/i386/pr116275-2.C @@ -1,5 +1,5 @@ /* { dg-do compile { target ia32 } } */ -/* { dg-options "-O2 -mavx -mno-avx512vl -std=c++11" } */ +/* { dg-options "-O2 -mavx -mno-avx512vl -mstv -mno-stackrealign -std=c++11" } */ struct SymbolDesc push_back(SymbolDesc); struct SymbolDesc {
[gcc r15-1746] libffi: Fix 32-bit SPARC structure passing [PR115681]
https://gcc.gnu.org/g:61aa380bad45fb070379f259f7abc5e5f50c9009 commit r15-1746-g61aa380bad45fb070379f259f7abc5e5f50c9009 Author: Rainer Orth Date: Mon Jul 1 11:20:15 2024 +0200 libffi: Fix 32-bit SPARC structure passing [PR115681] The libffi.closures/single_entry_structs2.c test FAILs on 32-bit SPARC: FAIL: libffi.closures/single_entry_structs2.c -W -Wall -Wno-psabi -O0 execution test The issue has been reported, analyzed and fixed upstream: Several tests FAIL on 32-bit Solaris/SPARC https://github.com/libffi/libffi/issues/841 Therefore this patch imports the fix into the GCC tree. Tested on sparc-sun-solaris2.11. 2024-07-01 Rainer Orth libffi: PR libffi/115681 * src/sparc/ffi.c (ffi_call_int): Copy structure arguments to maintain call-by-value semantics. Diff: --- libffi/src/sparc/ffi.c | 16 1 file changed, 16 insertions(+) diff --git a/libffi/src/sparc/ffi.c b/libffi/src/sparc/ffi.c index 9e406d0af67..cf819ee6738 100644 --- a/libffi/src/sparc/ffi.c +++ b/libffi/src/sparc/ffi.c @@ -286,6 +286,8 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue, void *closure) { size_t bytes = cif->bytes; + size_t i, nargs = cif->nargs; + ffi_type **arg_types = cif->arg_types; FFI_ASSERT (cif->abi == FFI_V8); @@ -295,6 +297,20 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue, && (cif->flags & SPARC_FLAG_RET_MASK) == SPARC_RET_STRUCT) bytes += FFI_ALIGN (cif->rtype->size, 8); + /* If we have any structure arguments, make a copy so we are passing + by value. */ + for (i = 0; i < nargs; i++) +{ + ffi_type *at = arg_types[i]; + int size = at->size; + if (at->type == FFI_TYPE_STRUCT) +{ + char *argcopy = alloca (size); + memcpy (argcopy, avalue[i], size); + avalue[i] = argcopy; +} +} + ffi_call_v8(cif, fn, rvalue, avalue, -bytes, closure); }
[gcc r14-9427] testsuite: vect: Require vect_perm in several tests [PR114071, PR113557, PR96109]
https://gcc.gnu.org/g:96b63fa255e343bb9b3e7f77302213a91ce96293 commit r14-9427-g96b63fa255e343bb9b3e7f77302213a91ce96293 Author: Rainer Orth Date: Mon Mar 11 15:45:17 2024 +0100 testsuite: vect: Require vect_perm in several tests [PR114071, PR113557, PR96109] Several vectorization tests FAIL on 32 and 64-bit Solaris/SPARC: FAIL: gcc.dg/vect/pr37027.c -flto -ffat-lto-objects scan-tree-dump-times vect "vectorized 1 loops" 1 FAIL: gcc.dg/vect/pr37027.c -flto -ffat-lto-objects scan-tree-dump-times vect "vectorizing stmts using SLP" 1 FAIL: gcc.dg/vect/pr37027.c scan-tree-dump-times vect "vectorized 1 loops" 1 FAIL: gcc.dg/vect/pr37027.c scan-tree-dump-times vect "vectorizing stmts using SLP" 1 FAIL: gcc.dg/vect/pr67790.c -flto -ffat-lto-objects scan-tree-dump vect "vectorizing stmts using SLP" FAIL: gcc.dg/vect/pr67790.c scan-tree-dump vect "vectorizing stmts using SLP" FAIL: gcc.dg/vect/slp-47.c -flto -ffat-lto-objects scan-tree-dump-times vect "vectorizing stmts using SLP" 2 FAIL: gcc.dg/vect/slp-47.c scan-tree-dump-times vect "vectorizing stmts using SLP" 2 FAIL: gcc.dg/vect/slp-48.c -flto -ffat-lto-objects scan-tree-dump-times vect "vectorizing stmts using SLP" 2 FAIL: gcc.dg/vect/slp-48.c scan-tree-dump-times vect "vectorizing stmts using SLP" 2 FAIL: gcc.dg/vect/slp-reduc-1.c -flto -ffat-lto-objects scan-tree-dump-times vect "vectorized 1 loops" 1 FAIL: gcc.dg/vect/slp-reduc-1.c -flto -ffat-lto-objects scan-tree-dump-times vect "vectorizing stmts using SLP" 1 FAIL: gcc.dg/vect/slp-reduc-1.c scan-tree-dump-times vect "vectorized 1 loops" 1 FAIL: gcc.dg/vect/slp-reduc-1.c scan-tree-dump-times vect "vectorizing stmts using SLP" 1 FAIL: gcc.dg/vect/slp-reduc-2.c -flto -ffat-lto-objects scan-tree-dump-times vect "vectorized 1 loops" 1 FAIL: gcc.dg/vect/slp-reduc-2.c -flto -ffat-lto-objects scan-tree-dump-times vect "vectorizing stmts using SLP" 1 FAIL: gcc.dg/vect/slp-reduc-2.c scan-tree-dump-times vect "vectorized 1 loops" 1 FAIL: gcc.dg/vect/slp-reduc-2.c scan-tree-dump-times vect "vectorizing stmts using SLP" 1 FAIL: gcc.dg/vect/slp-reduc-7.c -flto -ffat-lto-objects scan-tree-dump-times vect "vectorized 1 loops" 1 FAIL: gcc.dg/vect/slp-reduc-7.c -flto -ffat-lto-objects scan-tree-dump-times vect "vectorizing stmts using SLP" 1 FAIL: gcc.dg/vect/slp-reduc-7.c scan-tree-dump-times vect "vectorized 1 loops" 1 FAIL: gcc.dg/vect/slp-reduc-7.c scan-tree-dump-times vect "vectorizing stmts using SLP" 1 FAIL: gcc.dg/vect/slp-reduc-8.c -flto -ffat-lto-objects scan-tree-dump vect "vectorized 1 loops" FAIL: gcc.dg/vect/slp-reduc-8.c scan-tree-dump vect "vectorized 1 loops" FAIL: gcc.dg/vect/vect-multi-peel-gaps.c -flto -ffat-lto-objects scan-tree-dump vect "LOOP VECTORIZED" FAIL: gcc.dg/vect/vect-multi-peel-gaps.c scan-tree-dump vect "LOOP VECTORIZED" The dumps show variations of /vol/gcc/src/hg/master/local/gcc/testsuite/gcc.dg/vect/pr37027.c:24:17: note: ==> examining statement: _4 = a[i_19].f2; /vol/gcc/src/hg/master/local/gcc/testsuite/gcc.dg/vect/pr37027.c:24:17: missed: unsupported vect permute { 1 0 3 2 5 4 } /vol/gcc/src/hg/master/local/gcc/testsuite/gcc.dg/vect/pr37027.c:24:17: missed: unsupported load permutation /vol/gcc/src/hg/master/local/gcc/testsuite/gcc.dg/vect/pr37027.c:27:17: missed: not vectorized: relevant stmt not supported: _4 = a[i_19].f2; so I think the tests should require vect_perm. This is what this patch does Tested on sparc-sun-solaris2.11 and i386-pc-solaris2.11. 2024-02-22 Rainer Orth gcc/testsuite: PR tree-optimization/114071 * gcc.dg/vect/pr37027.c: Require vect_perm. * gcc.dg/vect/pr67790.c: Likewise. * gcc.dg/vect/slp-reduc-1.c: Likewise. * gcc.dg/vect/slp-reduc-2.c: Likewise. * gcc.dg/vect/slp-reduc-7.c: Likewise. * gcc.dg/vect/slp-reduc-8.c: Likewise. PR tree-optimization/113557 * gcc.dg/vect/vect-multi-peel-gaps.c (scan-tree-dump): Also require vect_perm. PR testsuite/96109 * gcc.dg/vect/slp-47.c: Require vect_perm. * gcc.dg/vect/slp-48.c: Likewise. Diff: --- gcc/testsuite/gcc.dg/vect/pr37027.c | 1 + gcc/testsuite/gcc.dg/vect/pr67790.c | 1 + gcc/testsuite/gcc.dg/vect/slp-47.c | 1 + gcc/testsuite/gcc.dg/vect/slp-48.c | 1 + gcc/testsuite/gcc.dg/vect/slp-reduc-1.c | 1 + gcc/testsuite/gcc.dg/vect/slp-reduc-2.c | 1 + gcc/testsuite/gcc.dg/vect/slp-reduc-7.c | 1 + gcc/testsuite/gcc.dg/vect/slp-reduc-8.c | 1 + gcc/testsuite/gcc.dg/vect/vect-multi-peel-gaps.c | 2 +- 9 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/
[gcc r14-9428] testsuite: vect: Require vect_hw_misalign in gcc.dg/vect/vect-cost-model-1.c etc. [PR98238]
https://gcc.gnu.org/g:4e1fcf44bdc582e71408175d75e025f5be8b0e55 commit r14-9428-g4e1fcf44bdc582e71408175d75e025f5be8b0e55 Author: Rainer Orth Date: Mon Mar 11 15:46:30 2024 +0100 testsuite: vect: Require vect_hw_misalign in gcc.dg/vect/vect-cost-model-1.c etc. [PR98238] Several gcc.dg/vect/vect-cost-model-?.c tests FAIL on 32 and 64-bit Solaris/SPARC: FAIL: gcc.dg/vect/vect-cost-model-1.c -flto -ffat-lto-objects scan-tree-dump vect "LOOP VECTORIZED" FAIL: gcc.dg/vect/vect-cost-model-1.c scan-tree-dump vect "LOOP VECTORIZED" FAIL: gcc.dg/vect/vect-cost-model-3.c -flto -ffat-lto-objects scan-tree-dump vect "LOOP VECTORIZED" FAIL: gcc.dg/vect/vect-cost-model-3.c scan-tree-dump vect "LOOP VECTORIZED" FAIL: gcc.dg/vect/vect-cost-model-5.c -flto -ffat-lto-objects scan-tree-dump vect "LOOP VECTORIZED" FAIL: gcc.dg/vect/vect-cost-model-5.c scan-tree-dump vect "LOOP VECTORIZED" The dumps show /vol/gcc/src/hg/master/local/gcc/testsuite/gcc.dg/vect/vect-cost-model-1.c:7:30: note: ==> examining statement: _3 = *_2; /vol/gcc/src/hg/master/local/gcc/testsuite/gcc.dg/vect/vect-cost-model-1.c:7:30: missed: unsupported unaligned access /vol/gcc/src/hg/master/local/gcc/testsuite/gcc.dg/vect/vect-cost-model-1.c:8:6: missed: not vectorized: relevant stmt not supported: _3 = *_2; so I think the tests need to require vect_hw_misalign. This is what this patch does. Tested on sparc-sun-solaris2.11 and i386-pc-solaris2.11. 2024-02-22 Rainer Orth gcc/testsuite: PR tree-optimization/98238 * gcc.dg/vect/vect-cost-model-1.c (scan-tree-dump): Also require vect_hw_misalign. * gcc.dg/vect/vect-cost-model-3.c: Likewise. * gcc.dg/vect/vect-cost-model-5.c: Likewise. Diff: --- gcc/testsuite/gcc.dg/vect/vect-cost-model-1.c | 2 +- gcc/testsuite/gcc.dg/vect/vect-cost-model-3.c | 2 +- gcc/testsuite/gcc.dg/vect/vect-cost-model-5.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/testsuite/gcc.dg/vect/vect-cost-model-1.c b/gcc/testsuite/gcc.dg/vect/vect-cost-model-1.c index 0737da5d671..1457e8f3625 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-cost-model-1.c +++ b/gcc/testsuite/gcc.dg/vect/vect-cost-model-1.c @@ -8,4 +8,4 @@ f (int *x, int *y) x[i] += y[i]; } -/* { dg-final { scan-tree-dump {LOOP VECTORIZED} vect { target vect_int } } } */ +/* { dg-final { scan-tree-dump {LOOP VECTORIZED} vect { target { vect_int && vect_hw_misalign } } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-cost-model-3.c b/gcc/testsuite/gcc.dg/vect/vect-cost-model-3.c index d7c6cfd2049..fba18aae0cf 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-cost-model-3.c +++ b/gcc/testsuite/gcc.dg/vect/vect-cost-model-3.c @@ -8,4 +8,4 @@ f (int *restrict x, int *restrict y) x[i] += y[i]; } -/* { dg-final { scan-tree-dump {LOOP VECTORIZED} vect { target vect_int } } } */ +/* { dg-final { scan-tree-dump {LOOP VECTORIZED} vect { target { vect_int && vect_hw_misalign } } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-cost-model-5.c b/gcc/testsuite/gcc.dg/vect/vect-cost-model-5.c index 536ec0a3cda..b9d0ca47af2 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-cost-model-5.c +++ b/gcc/testsuite/gcc.dg/vect/vect-cost-model-5.c @@ -8,4 +8,4 @@ f (int *restrict x, int *restrict y) x[i] += y[i]; } -/* { dg-final { scan-tree-dump {LOOP VECTORIZED} vect { target vect_int } } } */ +/* { dg-final { scan-tree-dump {LOOP VECTORIZED} vect { target { vect_int && vect_hw_misalign } } } } */
[gcc r14-9611] testsuite: i386: Skip gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c etc. with Solaris as [PR114150]
https://gcc.gnu.org/g:3d406af2008a19914305966dddbc02ae980b8cd7 commit r14-9611-g3d406af2008a19914305966dddbc02ae980b8cd7 Author: Rainer Orth Date: Fri Mar 22 09:55:03 2024 +0100 testsuite: i386: Skip gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c etc. with Solaris as [PR114150] Two avx512cd tests FAIL to assemble with the Solaris/x86 assembler: FAIL: gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c (test for excess errors) UNRESOLVED: gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c compilation failed to produce executable FAIL: gcc.target/i386/avx512cd-vpbroadcastmw2d-2.c (test for excess errors) UNRESOLVED: gcc.target/i386/avx512cd-vpbroadcastmw2d-2.c compilation failed to produce executable Excess errors: Assembler: avx512cd-vpbroadcastmb2q-2.c "/var/tmp//ccs_9lod.s", line 42 : Invalid instruction argument Near line: "vpbroadcastmb2q %k0, %zmm0" Assembler: avx512cd-vpbroadcastmw2d-2.c "/var/tmp//ccevT6Rd.s", line 35 : Invalid instruction argument Near line: "vpbroadcastmw2d %k0, %zmm0" This seems to be an as bug, but given that this rarely if ever gets any fixes these days, this test just skips the affected tests. Adjuststing check_effective_target_avx512cd instead doesn't seem sensible since it would disable quite a number of working tests. Tested on i386-pc-solaris2.11 (as and gas) and x86_64-pc-linux-gnu. 2024-03-19 Rainer Orth gcc/testsuite: PR target/114150 * gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c: Skip on Solaris/x86 with as. * gcc.target/i386/avx512cd-vpbroadcastmw2d-2.c: Likewise. Diff: --- gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c | 1 + gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmw2d-2.c | 1 + 2 files changed, 2 insertions(+) diff --git a/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c b/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c index 2e0a082c13a..b2266beed68 100644 --- a/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c +++ b/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -mavx512cd" } */ /* { dg-require-effective-target avx512cd } */ +/* { dg-skip-if "PR target/114150" { *-*-solaris2.* && { ! gas } } } */ #define HAVE_512 #define AVX512CD diff --git a/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmw2d-2.c b/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmw2d-2.c index f4bd7e7a60e..56397646a27 100644 --- a/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmw2d-2.c +++ b/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmw2d-2.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -mavx512cd" } */ /* { dg-require-effective-target avx512cd } */ +/* { dg-skip-if "PR target/114150" { *-*-solaris2.* && { ! gas } } } */ #define HAVE_512 #define AVX512CD
[gcc r14-9612] testsuite: vect: Remove dg-final in gcc.dg/vect/bb-slp-32.c [PR96147]
https://gcc.gnu.org/g:644a7033cc09b79a5cfefe1fe9b307d835009b17 commit r14-9612-g644a7033cc09b79a5cfefe1fe9b307d835009b17 Author: Rainer Orth Date: Fri Mar 22 10:07:05 2024 +0100 testsuite: vect: Remove dg-final in gcc.dg/vect/bb-slp-32.c [PR96147] gcc.dg/vect/bb-slp-32.c currently XPASSes on 32 and 64-bit Solaris/SPARC: XPASS: gcc.dg/vect/bb-slp-32.c -flto -ffat-lto-objects scan-tree-dump slp2 "vectorization is not profitable" XPASS: gcc.dg/vect/bb-slp-32.c scan-tree-dump slp2 "vectorization is not profitable" Richard suggested to remove the dg-final, so this is what the patch does. Tested on sparc-sun-solaris2.11 and i386-pc-solaris2.11. 2024-03-19 Rainer Orth gcc/testsuite: PR tree-optimization/96147 * gcc.dg/vect/bb-slp-32.c (dg-final): Remove. Diff: --- gcc/testsuite/gcc.dg/vect/bb-slp-32.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-32.c b/gcc/testsuite/gcc.dg/vect/bb-slp-32.c index 84cc4370f09..f10442e6d56 100644 --- a/gcc/testsuite/gcc.dg/vect/bb-slp-32.c +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-32.c @@ -24,5 +24,3 @@ int foo (int *p, int a, int b) bar (x); return sum; } - -/* { dg-final { scan-tree-dump "vectorization is not profitable" "slp2" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
[gcc r14-9963] testsuite: i386: Restrict gcc.target/i386/fhardened-1.c etc. to Linux/GNU
https://gcc.gnu.org/g:7f4ba5480e0ee5c03317d24d3fa858c0966f3464 commit r14-9963-g7f4ba5480e0ee5c03317d24d3fa858c0966f3464 Author: Rainer Orth Date: Mon Apr 15 11:16:23 2024 +0200 testsuite: i386: Restrict gcc.target/i386/fhardened-1.c etc. to Linux/GNU The new gcc.target/i386/fhardened-1.c etc. tests FAIL on Solaris/x86 and Darwin/x86: FAIL: gcc.target/i386/fhardened-1.c (test for excess errors) FAIL: gcc.target/i386/fhardened-2.c (test for excess errors) Excess errors: cc1: warning: '-fhardened' not supported for this target Support for -fhardened is restricted to HAVE_FHARDENED_SUPPORT in toplev.cc (process_options) which again is only defined for linux*|gnu* targets in gcc/configure.ac. Accordingly, this patch restricts the tests to those two, as is already done in gcc.target/i386/cf_check-6.c. Tested on i386-pc-solaris2.11 and x86_64-pc-linux-gnu. 2024-04-15 Rainer Orth gcc/testsuite: * gcc.target/i386/fhardened-1.c: Restrict to Linux/GNU. * gcc.target/i386/fhardened-2.c: Likewise. Diff: --- gcc/testsuite/gcc.target/i386/fhardened-1.c | 1 + gcc/testsuite/gcc.target/i386/fhardened-2.c | 1 + 2 files changed, 2 insertions(+) diff --git a/gcc/testsuite/gcc.target/i386/fhardened-1.c b/gcc/testsuite/gcc.target/i386/fhardened-1.c index 55d1718ff55..f51820e285f 100644 --- a/gcc/testsuite/gcc.target/i386/fhardened-1.c +++ b/gcc/testsuite/gcc.target/i386/fhardened-1.c @@ -1,4 +1,5 @@ /* PR target/114606 */ +/* { dg-do compile { target *-*-linux* *-*-gnu* } } */ /* { dg-options "-fhardened -O2 -fcf-protection=none" } */ #ifdef __CET__ diff --git a/gcc/testsuite/gcc.target/i386/fhardened-2.c b/gcc/testsuite/gcc.target/i386/fhardened-2.c index 9b8c1381c19..ed2a6744921 100644 --- a/gcc/testsuite/gcc.target/i386/fhardened-2.c +++ b/gcc/testsuite/gcc.target/i386/fhardened-2.c @@ -1,4 +1,5 @@ /* PR target/114606 */ +/* { dg-do compile { target *-*-linux* *-*-gnu* } } */ /* { dg-options "-fhardened -O2" } */ #if __CET__ != 3
[gcc r13-8658] libstdc++: Update Solaris baselines for GCC 13.2
https://gcc.gnu.org/g:3e1ca512848994950cc0641986b6ec337df5765f commit r13-8658-g3e1ca512848994950cc0641986b6ec337df5765f Author: Rainer Orth Date: Mon Apr 29 14:30:35 2024 +0200 libstdc++: Update Solaris baselines for GCC 13.2 This patch updates the Solaris baselines for the GLIBCXX_3.4.32 version added in GCC 13.2. Tested on i386-pc-solaris2.11 and sparc-sun-solaris2.11 (32 and 64-bit each) on the gcc-13 branch and (together with the GLIBCXX_3.4.33 update) on both gcc-14 branch and trunk. 2024-04-28 Rainer Orth libstdc++-v3: * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate. * config/abi/post/i386-solaris/amd64/baseline_symbols.txt: Likewise. * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise. * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt: Likewise. Diff: --- libstdc++-v3/config/abi/post/i386-solaris/amd64/baseline_symbols.txt | 3 +++ libstdc++-v3/config/abi/post/i386-solaris/baseline_symbols.txt | 3 +++ libstdc++-v3/config/abi/post/sparc-solaris/baseline_symbols.txt| 3 +++ .../config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt | 3 +++ 4 files changed, 12 insertions(+) diff --git a/libstdc++-v3/config/abi/post/i386-solaris/amd64/baseline_symbols.txt b/libstdc++-v3/config/abi/post/i386-solaris/amd64/baseline_symbols.txt index 9ff4ca45eb5..bc1039a1c4d 100644 --- a/libstdc++-v3/config/abi/post/i386-solaris/amd64/baseline_symbols.txt +++ b/libstdc++-v3/config/abi/post/i386-solaris/amd64/baseline_symbols.txt @@ -3175,6 +3175,7 @@ FUNC:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@@GLIBCX FUNC:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm@@GLIBCXX_3.4.21 FUNC:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_S_compareEmm@@GLIBCXX_3.4.21 FUNC:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_capacityEm@@GLIBCXX_3.4.21 +FUNC:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_S_allocateERS3_m@@GLIBCXX_3.4.32 FUNC:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderC1EPcOS3_@@GLIBCXX_3.4.23 FUNC:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderC1EPcRKS3_@@GLIBCXX_3.4.21 FUNC:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderC2EPcOS3_@@GLIBCXX_3.4.23 @@ -3327,6 +3328,7 @@ FUNC:_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE10_M_disposeEv@@GLIBCX FUNC:_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE10_M_replaceEmmPKwm@@GLIBCXX_3.4.21 FUNC:_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE10_S_compareEmm@@GLIBCXX_3.4.21 FUNC:_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE11_M_capacityEm@@GLIBCXX_3.4.21 +FUNC:_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE11_S_allocateERS3_m@@GLIBCXX_3.4.32 FUNC:_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_Alloc_hiderC1EPwOS3_@@GLIBCXX_3.4.23 FUNC:_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_Alloc_hiderC1EPwRKS3_@@GLIBCXX_3.4.21 FUNC:_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_Alloc_hiderC2EPwOS3_@@GLIBCXX_3.4.23 @@ -4564,6 +4566,7 @@ OBJECT:0:GLIBCXX_3.4.29 OBJECT:0:GLIBCXX_3.4.3 OBJECT:0:GLIBCXX_3.4.30 OBJECT:0:GLIBCXX_3.4.31 +OBJECT:0:GLIBCXX_3.4.32 OBJECT:0:GLIBCXX_3.4.4 OBJECT:0:GLIBCXX_3.4.5 OBJECT:0:GLIBCXX_3.4.6 diff --git a/libstdc++-v3/config/abi/post/i386-solaris/baseline_symbols.txt b/libstdc++-v3/config/abi/post/i386-solaris/baseline_symbols.txt index 002c5f4d8ab..900cbeda39b 100644 --- a/libstdc++-v3/config/abi/post/i386-solaris/baseline_symbols.txt +++ b/libstdc++-v3/config/abi/post/i386-solaris/baseline_symbols.txt @@ -3175,6 +3175,7 @@ FUNC:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@@GLIBCX FUNC:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEjjPKcj@@GLIBCXX_3.4.21 FUNC:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_S_compareEjj@@GLIBCXX_3.4.21 FUNC:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_capacityEj@@GLIBCXX_3.4.21 +FUNC:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_S_allocateERS3_j@@GLIBCXX_3.4.32 FUNC:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderC1EPcOS3_@@GLIBCXX_3.4.23 FUNC:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderC1EPcRKS3_@@GLIBCXX_3.4.21 FUNC:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderC2EPcOS3_@@GLIBCXX_3.4.23 @@ -3327,6 +3328,7 @@ FUNC:_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE10_M_disposeEv@@GLIBCX FUNC:_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE10_M_replaceEjjPKwj@@GLIBCXX_3.4.21 FUNC:_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE10_S_compareEjj@@GLIBCXX_3.4.21 FUNC:_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE11_M_capacityEj@@GLIBCXX_3.4.21 +FUNC:_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE11_S_allocateERS3_j@@GLIBCXX_
[gcc r15-69] testsuite: gm2: Remove timeout overrides [PR114886]
https://gcc.gnu.org/g:aff63ac11099d100b6891f3bcc3dc6cbc4fad654 commit r15-69-gaff63ac11099d100b6891f3bcc3dc6cbc4fad654 Author: Rainer Orth Date: Tue Apr 30 13:49:28 2024 +0200 testsuite: gm2: Remove timeout overrides [PR114886] A large number of gm2 tests are timing out even on current Solaris/SPARC systems. As detailed in the PR, the problem is that the gm2 testsuite artificially lowers many timeouts way below the DejaGnu default of 300 seconds, often as short as 10 seconds. The problem lies both in the values (they may be appropriate for some targets, but too low for others, especially under high load) and the fact that it uses absolute values, overriding e.g. settings from a build-wide site.exp. Therefore this patch removes all those overrides, restoring the defaults. Tested on sparc-sun-solaris2.11 (where all the previous timeouts are gone) and i386-pc-solaris2.11. 2024-04-29 Rainer Orth gcc/testsuite: PR modula2/114886 * lib/gm2.exp: Don't load timeout-dg.exp. Don't set gm2_previous_timeout. Don't call dg-timeout. (gm2_push_timeout, gm2_pop_timeout): Remove. (gm2_init): Don't call dg-timeout. * lib/gm2-torture.exp: Don't load timeout-dg.exp. Don't set gm2_previous_timeout. Don't call dg-timeout. (gm2_push_timeout, gm2_pop_timeout): Remove. * gm2/coroutines/pim/run/pass/coroutines-pim-run-pass.exp: Don't load timeout-dg.exp. Don't call gm2_push_timeout, gm2_pop_timeout. * gm2/examples/map/pass/examples-map-pass.exp: Don't call gm2_push_timeout, gm2_pop_timeout. * gm2/iso/run/pass/iso-run-pass.exp: Don't load timeout-dg.exp. Don't call gm2_push_timeout, gm2_pop_timeout. * gm2/pimlib/base/run/pass/pimlib-base-run-pass.exp: Don't load timeout-dg.exp. Don't call gm2_push_timeout, gm2_pop_timeout. * gm2/projects/iso/run/pass/halma/projects-iso-run-pass-halma.exp: Don't call gm2_push_timeout, gm2_pop_timeout. * gm2/switches/whole-program/pass/run/switches-whole-program-pass-run.exp: Don't load timeout-dg.exp. Don't call gm2_push_timeout, gm2_pop_timeout. Diff: --- .../pim/run/pass/coroutines-pim-run-pass.exp | 7 - .../gm2/examples/map/pass/examples-map-pass.exp| 5 gcc/testsuite/gm2/iso/run/pass/iso-run-pass.exp| 6 .../pimlib/base/run/pass/pimlib-base-run-pass.exp | 6 .../run/pass/halma/projects-iso-run-pass-halma.exp | 7 - .../pass/run/switches-whole-program-pass-run.exp | 4 --- gcc/testsuite/lib/gm2-torture.exp | 28 -- gcc/testsuite/lib/gm2.exp | 34 -- 8 files changed, 97 deletions(-) diff --git a/gcc/testsuite/gm2/coroutines/pim/run/pass/coroutines-pim-run-pass.exp b/gcc/testsuite/gm2/coroutines/pim/run/pass/coroutines-pim-run-pass.exp index 6b3a8ebefe2..db2ba6314c1 100644 --- a/gcc/testsuite/gm2/coroutines/pim/run/pass/coroutines-pim-run-pass.exp +++ b/gcc/testsuite/gm2/coroutines/pim/run/pass/coroutines-pim-run-pass.exp @@ -24,16 +24,11 @@ if $tracelevel then { # load support procs load_lib gm2-torture.exp -load_lib timeout-dg.exp set gm2src ${srcdir}/../gm2 gm2_init_cor "" -# We should be able to compile, link or run in 20 seconds. -gm2_push_timeout 20 - - foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] { # If we're only testing specific files and this isn't one of them, skip it. if ![runtest_file_p $runtests $testcase] then { @@ -42,5 +37,3 @@ foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] { gm2-torture-execute $testcase "" "pass" } - -gm2_pop_timeout diff --git a/gcc/testsuite/gm2/examples/map/pass/examples-map-pass.exp b/gcc/testsuite/gm2/examples/map/pass/examples-map-pass.exp index 432518d7133..fabcf96f6d1 100644 --- a/gcc/testsuite/gm2/examples/map/pass/examples-map-pass.exp +++ b/gcc/testsuite/gm2/examples/map/pass/examples-map-pass.exp @@ -27,9 +27,6 @@ load_lib gm2-torture.exp gm2_init_pim "${srcdir}/${subdir}" -# We should be able to compile, link or run in 30 seconds. -gm2_push_timeout 30 - foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] { # If we're only testing specific files and this isn't one of them, skip it. if ![runtest_file_p $runtests $testcase] then { @@ -38,5 +35,3 @@ foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] { gm2-torture $testcase } - -gm2_pop_timeout diff --git a/gcc/testsuite/gm2/iso/run/pass/iso-run-pass.exp b/gcc/testsuite/gm2/iso/run/pass/iso-run-pass.exp index af387e54b24..2c79b69ab6a 100644 --- a/gcc/testsuite/gm2/iso/run/pass/iso-run-pass.exp +++ b/gcc/testsuite/gm2/iso/run/pass/iso-run-pass.exp @@ -23,14
[gcc r15-2812] ada: Fix s-taprop__solaris.adb compilation
https://gcc.gnu.org/g:82ed4d514329ed56077efda59a397784615e9c93 commit r15-2812-g82ed4d514329ed56077efda59a397784615e9c93 Author: Rainer Orth Date: Thu Aug 8 10:22:19 2024 +0200 ada: Fix s-taprop__solaris.adb compilation Solaris Ada bootstrap is broken as of 2024-08-06 with s-taprop.adb:1971:23: error: "int" is not visible s-taprop.adb:1971:23: error: multiple use clauses cause hiding s-taprop.adb:1971:23: error: hidden declaration at s-osinte.ads:51 s-taprop.adb:1971:23: error: hidden declaration at i-c.ads:62 because one instance of int isn't qualified. This patch fixes this. Bootstrapped without regressions on i386-pc-solaris2.11 and sparc-sun-solaris2.11. 2024-08-07 Rainer Orth gcc/ada: * libgnarl/s-taprop__solaris.adb (Set_Task_Affinity): Fully quality int. Diff: --- gcc/ada/libgnarl/s-taprop__solaris.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/libgnarl/s-taprop__solaris.adb b/gcc/ada/libgnarl/s-taprop__solaris.adb index 6d05e8db0041..c24925c93046 100644 --- a/gcc/ada/libgnarl/s-taprop__solaris.adb +++ b/gcc/ada/libgnarl/s-taprop__solaris.adb @@ -1968,7 +1968,7 @@ package body System.Task_Primitives.Operations is then declare CPU_Set : aliased psetid_t; -Result : int; +Result : Interfaces.C.int; begin Result := pset_create (CPU_Set'Access);
[gcc r15-767] testsuite: Allow for non-SECTION_MERGE systems in gcc.dg/pr115066.c [PR115066]
https://gcc.gnu.org/g:6c97934fde7caf483ffc5079eb8ca4af04354a2c commit r15-767-g6c97934fde7caf483ffc5079eb8ca4af04354a2c Author: Tom de Vries Date: Wed May 22 10:06:10 2024 +0200 testsuite: Allow for non-SECTION_MERGE systems in gcc.dg/pr115066.c [PR115066] gcc.dg/pr115066.c currently FAILs on Solaris/SPARC with the native as: FAIL: gcc.dg/pr115066.c scan-assembler .bytet0xbt# Define macro strx Instead of the expected .byte 0xb ! Define macro strx the assembler output contains .byte 0x1 ! Define macro Apparently this happens because the Solaris as/ld combo doesn't support SHF_MERGE. While I initially meant to just skip the test on sparc*-*-solaris2* && !gas, Tom suggested to allow for both forms instead, which is what his patch does. Tested on sparc-sun-solaris2.11 and i386-pc-solaris2.11 (as and gas each) and x86_64-pc-linux-gnu. 2024-05-21 Tom de Vries gcc/testsuite: PR debug/115066 * gcc.dg/pr115066.c (scan-assembler): Allow for alternative form of Define macro. Diff: --- gcc/testsuite/gcc.dg/pr115066.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.dg/pr115066.c b/gcc/testsuite/gcc.dg/pr115066.c index 780767ac295..aadc4900467 100644 --- a/gcc/testsuite/gcc.dg/pr115066.c +++ b/gcc/testsuite/gcc.dg/pr115066.c @@ -3,6 +3,6 @@ /* { dg-options "-gsplit-dwarf -g3 -dA -gdwarf-4" } */ /* { dg-final { scan-assembler-times {\.section\t"?\.debug_macro} 1 } } */ /* { dg-final { scan-assembler-not {\.byte\t0x5\t[^\n\r]* Define macro strp} } } */ -/* { dg-final { scan-assembler {\.byte\t0xb\t[^\n\r]* Define macro strx} } } */ +/* { dg-final { scan-assembler {\.byte\t0xb\t[^\n\r]* Define macro strx|\.byte\t0x1\t[^\n\r]* Define macro} } } */ #define foo 1
[gcc r15-789] testsuite: vect: Fix gcc.dg/vect/vect-pr111779.c on SPARC [PR114072]
https://gcc.gnu.org/g:fc5e109272977f0242a2ceee3a85765cdbed1993 commit r15-789-gfc5e109272977f0242a2ceee3a85765cdbed1993 Author: Rainer Orth Date: Thu May 23 09:53:45 2024 +0200 testsuite: vect: Fix gcc.dg/vect/vect-pr111779.c on SPARC [PR114072] gcc.dg/vect/vect-pr111779.c FAILs on 32 and 64-bit Solaris/SPARC: FAIL: gcc.dg/vect/vect-pr111779.c -flto -ffat-lto-objects scan-tree-dump vect "LOOP VECTORIZED" FAIL: gcc.dg/vect/vect-pr111779.c scan-tree-dump vect "LOOP VECTORIZED" This patch implements Richard's analysis from the PR, skipping the scan-tree-dump part for big-endian targets without vect_shift_char support. Tested on sparc-sun-solaris2.11 and i386-pc-solaris2.11 (32 and 64-bit each). 2024-05-22 Rainer Orth gcc/testsuite: PR tree-optimization/114072 * gcc.dg/vect/vect-pr111779.c (scan-tree-dump): Require vect_shift_char on big-endian targets. Diff: --- gcc/testsuite/gcc.dg/vect/vect-pr111779.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.dg/vect/vect-pr111779.c b/gcc/testsuite/gcc.dg/vect/vect-pr111779.c index 79b72aebc78..2400de10590 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-pr111779.c +++ b/gcc/testsuite/gcc.dg/vect/vect-pr111779.c @@ -53,4 +53,4 @@ main () return 0; } -/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target vect_int } } } */ +/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { vect_int && { le || { be && vect_shift_char } } } } } } */
[gcc r15-927] ggc: Reduce GGC_QUIRE_SIZE on Solaris/SPARC [PR115031]
https://gcc.gnu.org/g:32f99225bcaae9b792aec143239d17f2b7e2c54b commit r15-927-g32f99225bcaae9b792aec143239d17f2b7e2c54b Author: Rainer Orth Date: Thu May 30 15:00:59 2024 +0200 ggc: Reduce GGC_QUIRE_SIZE on Solaris/SPARC [PR115031] g++.dg/modules/pr99023_b.X currently FAILs on 32-bit Solaris/SPARC: FAIL: g++.dg/modules/pr99023_b.X -std=c++2a 1 blank line(s) in output FAIL: g++.dg/modules/pr99023_b.X -std=c++2a (test for excess errors) Excess errors: cc1plus: out of memory allocating 1048344 bytes after a total of 7913472 bytes It turns out that this exhaustion of the 32-bit address space happens due to a combination of three issues: * the SPARC pagesize of 8 kB, * ggc-page.cc's chunk size of 512 * pagesize, i.e. 4 MB, and * mmap adding two 8 kB unmapped red-zone pages to each mapping which result in the 4 MB mappings to actually consume 4.5 MB of address space. To avoid this, this patch reduces the chunk size so it remains at 4 MB even when combined with the red-zone pages, as recommended by mmap(2). Tested on sparc-sun-solaris2.11 and sparcv9-sun-solaris2.11. 2024-05-29 Rainer Orth gcc: PR c++/115031 * config/sparc/sol2.h (GGC_QUIRE_SIZE): Define as 510. Diff: --- gcc/config/sparc/sol2.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/config/sparc/sol2.h b/gcc/config/sparc/sol2.h index 552f58b2cc8..530e681aaee 100644 --- a/gcc/config/sparc/sol2.h +++ b/gcc/config/sparc/sol2.h @@ -38,6 +38,9 @@ along with GCC; see the file COPYING3. If not see #undef SPARC_DEFAULT_CMODEL #define SPARC_DEFAULT_CMODEL CM_MEDMID +/* Redue ggc-page.cc's chunk size to account for mmap red-zone pages. */ +#define GGC_QUIRE_SIZE 510 + /* Select a format to encode pointers in exception handling data. CODE is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is true if the symbol may be affected by dynamic relocations.
[gcc r15-937] testsuite: Adjust several dg-additional-files-options calls [PR115294]
https://gcc.gnu.org/g:7e322d576eb6a87607215196bec62d3348e65b0e commit r15-937-g7e322d576eb6a87607215196bec62d3348e65b0e Author: Rainer Orth Date: Fri May 31 09:29:38 2024 +0200 testsuite: Adjust several dg-additional-files-options calls [PR115294] A recent patch commit bdc264a16e327c63d133131a695a202fbbc0a6a0 Author: Alexandre Oliva Date: Thu May 30 02:06:48 2024 -0300 [testsuite] conditionalize dg-additional-sources on target and type added two additional args to dg-additional-files-options. Unfortunately, this completely broke several testsuites like ERROR: tcl error sourcing /vol/gcc/src/hg/master/local/libatomic/testsuite/../../gcc/testsuite/lib/gcc-dg.exp. wrong # args: should be "dg-additional-files-options options source dest type" since the patch forgot to adjust some of the callers. This patch fixes that. Tested on i386-pc-solaris2.11, sparc-sun-solaris2.11, and x86_64-pc-linux-gnu. 2024-05-31 Rainer Orth libatomic: PR testsuite/115294 * testsuite/lib/libatomic.exp (libatomic_target_compile): Pass new dg-additional-files-options args. libgomp: PR testsuite/115294 * testsuite/lib/libgomp.exp (libgomp_target_compile): Pass new dg-additional-files-options args. libitm: PR testsuite/115294 * testsuite/lib/libitm.exp (libitm_target_compile): Pass new dg-additional-files-options args. libphobos: PR testsuite/115294 * testsuite/lib/libphobos.exp (libphobos_target_compile): Pass new dg-additional-files-options args. libvtv: PR testsuite/115294 * testsuite/lib/libvtv.exp (libvtv_target_compile): Pass new dg-additional-files-options args. Diff: --- libatomic/testsuite/lib/libatomic.exp | 2 +- libgomp/testsuite/lib/libgomp.exp | 2 +- libitm/testsuite/lib/libitm.exp | 2 +- libphobos/testsuite/lib/libphobos.exp | 2 +- libvtv/testsuite/lib/libvtv.exp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libatomic/testsuite/lib/libatomic.exp b/libatomic/testsuite/lib/libatomic.exp index 432a67e12e9..ed6ba806732 100644 --- a/libatomic/testsuite/lib/libatomic.exp +++ b/libatomic/testsuite/lib/libatomic.exp @@ -214,7 +214,7 @@ proc libatomic_target_compile { source dest type options } { set options [concat "$ALWAYS_CFLAGS" $options] } -set options [dg-additional-files-options $options $source] +set options [dg-additional-files-options $options $source $dest $type] set result [target_compile $source $dest $type $options] diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp index cab926a798b..7c109262916 100644 --- a/libgomp/testsuite/lib/libgomp.exp +++ b/libgomp/testsuite/lib/libgomp.exp @@ -296,7 +296,7 @@ proc libgomp_target_compile { source dest type options } { set options [concat "$ALWAYS_CFLAGS" $options] } -set options [dg-additional-files-options $options $source] +set options [dg-additional-files-options $options $source $dest $type] set result [target_compile $source $dest $type $options] diff --git a/libitm/testsuite/lib/libitm.exp b/libitm/testsuite/lib/libitm.exp index 61bbfa0c923..3e60797c3e3 100644 --- a/libitm/testsuite/lib/libitm.exp +++ b/libitm/testsuite/lib/libitm.exp @@ -217,7 +217,7 @@ proc libitm_target_compile { source dest type options } { set options [concat "$ALWAYS_CFLAGS" $options] } -set options [dg-additional-files-options $options $source] +set options [dg-additional-files-options $options $source $dest $type] set result [target_compile $source $dest $type $options] diff --git a/libphobos/testsuite/lib/libphobos.exp b/libphobos/testsuite/lib/libphobos.exp index d4aa433ddc1..a4a2fe3d56d 100644 --- a/libphobos/testsuite/lib/libphobos.exp +++ b/libphobos/testsuite/lib/libphobos.exp @@ -281,7 +281,7 @@ proc libphobos_target_compile { source dest type options } { lappend options "compiler=$gdc_final" lappend options "timeout=[timeout_value]" -set options [dg-additional-files-options $options $source] +set options [dg-additional-files-options $options $source $dest $type] set comp_output [target_compile $source $dest $type $options] return $comp_output diff --git a/libvtv/testsuite/lib/libvtv.exp b/libvtv/testsuite/lib/libvtv.exp index 4b71c9ce7bc..bfd03d7d258 100644 --- a/libvtv/testsuite/lib/libvtv.exp +++ b/libvtv/testsuite/lib/libvtv.exp @@ -212,7 +212,7 @@ proc libvtv_target_compile { source dest type options } { set options [concat "$ALWAYS_CFLAGS" $options] } -set options [dg-additional-files-options $options $source] +set options [dg-additional-files-options $options $source $dest $t
[gcc r15-939] build: Include minor version in config.gcc unsupported message
https://gcc.gnu.org/g:37fafc63e732c51900d2d998b6df6433d9ca6e2f commit r15-939-g37fafc63e732c51900d2d998b6df6433d9ca6e2f Author: Rainer Orth Date: Fri May 31 11:29:19 2024 +0200 build: Include minor version in config.gcc unsupported message It has been pointed out to me that when moving Solaris 11.3 from config.gcc's obsolete to unsupported list, I'd forgotten to also move the minor version info, leading to confusing *** Configuration i386-pc-solaris2.11 not supported instead of the correct *** Configuration i386-pc-solaris2.11.3 not supported This patch fixes this oversight. Tested on i386-pc-solaris2.11 (11.3 and 11.4). 2024-05-30 Rainer Orth gcc: * config.gcc: Move ${target_min} from obsolete to unsupported message. Diff: --- gcc/config.gcc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index a37113bd00a..e500ba63e32 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -276,7 +276,7 @@ case ${target} in | nios2*-*-*\ ) if test "x$enable_obsolete" != xyes; then - echo "*** Configuration ${target}${target_min} is obsolete." >&2 + echo "*** Configuration ${target} is obsolete." >&2 echo "*** Specify --enable-obsolete to build it anyway." >&2 echo "*** Support will be REMOVED in the next major release of GCC," >&2 echo "*** unless a maintainer comes forward." >&2 @@ -328,7 +328,7 @@ case ${target}${target_min} in | *-*-sysv* \ | vax-*-vms* \ ) - echo "*** Configuration ${target} not supported" 1>&2 + echo "*** Configuration ${target}${target_min} not supported" 1>&2 exit 1 ;; esac
[gcc r15-987] testsuite: Require vect_shift in gcc.dg/vect/pr112325.c [PR115303]
https://gcc.gnu.org/g:2a616df8260aeabe00a28ea3870dba5577dbbe66 commit r15-987-g2a616df8260aeabe00a28ea3870dba5577dbbe66 Author: Rainer Orth Date: Mon Jun 3 10:39:34 2024 +0200 testsuite: Require vect_shift in gcc.dg/vect/pr112325.c [PR115303] The new gcc.dg/vect/pr112325.c test FAILs on Solaris/SPARC: FAIL: gcc.dg/vect/pr112325.c -flto -ffat-lto-objects scan-tree-dump-times vect "vectorized 1 loops" 1 FAIL: gcc.dg/vect/pr112325.c scan-tree-dump-times vect "vectorized 1 loops" 1 As analyzed in the PR, the test requires vect_shift, so this patch adds that requirement. Tested on i386-pc-solaris2.11 and sparc-sun-solaris2.11. 2024-06-03 Rainer Orth gcc/testsuite: PR tree-optimization/115303 * gcc.dg/vect/pr112325.c: Require vect_shift. Diff: --- gcc/testsuite/gcc.dg/vect/pr112325.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/testsuite/gcc.dg/vect/pr112325.c b/gcc/testsuite/gcc.dg/vect/pr112325.c index 71cf4099253..dea6cca3b86 100644 --- a/gcc/testsuite/gcc.dg/vect/pr112325.c +++ b/gcc/testsuite/gcc.dg/vect/pr112325.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O3 -funroll-loops -fdump-tree-vect-details" } */ /* { dg-require-effective-target vect_int } */ +/* { dg-require-effective-target vect_shift } */ /* { dg-additional-options "-mavx2" { target x86_64-*-* i?86-*-* } } */ typedef unsigned short ggml_fp16_t;
[gcc r15-1004] testsuite: analyzer: Skip tests with non-numeric macros on Solaris [PR107750]
https://gcc.gnu.org/g:09ae36461ed34f343f2d8299bad7e394cccf996e commit r15-1004-g09ae36461ed34f343f2d8299bad7e394cccf996e Author: Rainer Orth Date: Tue Jun 4 09:04:25 2024 +0200 testsuite: analyzer: Skip tests with non-numeric macros on Solaris [PR107750] A couple of gcc.dg/analyzer/fd-*.c tests still FAIL on Solaris. The reason is always the same: they use macros that don't expand to simple numbers, something which c/c-parser.cc (ana::c_translation_unit::consider_macro) cannot handle: * : * : To avoid the resulting noise, this patch skips the affected tests. Tested on i386-pc-solaris2.11, sparc-sun-solaris2.11, and x86_64-pc-linux-gnu. 2024-06-03 Rainer Orth gcc/testsuite: PR analyzer/107750 * gcc.dg/analyzer/fd-accept.c: Skip on *-*-solaris2*. * gcc.dg/analyzer/fd-access-mode-target-headers.c: Likewise. * gcc.dg/analyzer/fd-connect.c: Likewise. * gcc.dg/analyzer/fd-datagram-socket.c: Likewise. * gcc.dg/analyzer/fd-listen.c: Likewise. * gcc.dg/analyzer/fd-socket-misuse.c: Likewise. * gcc.dg/analyzer/fd-stream-socket-active-open.c: Likewise. * gcc.dg/analyzer/fd-stream-socket-passive-open.c: Likewise. * gcc.dg/analyzer/fd-stream-socket.c: Likewise. Diff: --- gcc/testsuite/gcc.dg/analyzer/fd-accept.c | 1 + gcc/testsuite/gcc.dg/analyzer/fd-access-mode-target-headers.c | 1 + gcc/testsuite/gcc.dg/analyzer/fd-connect.c| 1 + gcc/testsuite/gcc.dg/analyzer/fd-datagram-socket.c| 1 + gcc/testsuite/gcc.dg/analyzer/fd-listen.c | 1 + gcc/testsuite/gcc.dg/analyzer/fd-socket-misuse.c | 1 + gcc/testsuite/gcc.dg/analyzer/fd-stream-socket-active-open.c | 1 + gcc/testsuite/gcc.dg/analyzer/fd-stream-socket-passive-open.c | 1 + gcc/testsuite/gcc.dg/analyzer/fd-stream-socket.c | 1 + 9 files changed, 9 insertions(+) diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-accept.c b/gcc/testsuite/gcc.dg/analyzer/fd-accept.c index d07ab154d0f..5724a389e2e 100644 --- a/gcc/testsuite/gcc.dg/analyzer/fd-accept.c +++ b/gcc/testsuite/gcc.dg/analyzer/fd-accept.c @@ -1,5 +1,6 @@ /* { dg-require-effective-target sockets } */ /* { dg-skip-if "" { powerpc*-*-aix* } } */ +/* { dg-skip-if "PR analyzer/107750" { *-*-solaris2* } } */ #include #include diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-access-mode-target-headers.c b/gcc/testsuite/gcc.dg/analyzer/fd-access-mode-target-headers.c index 9fc32638a3d..1386ac2de1e 100644 --- a/gcc/testsuite/gcc.dg/analyzer/fd-access-mode-target-headers.c +++ b/gcc/testsuite/gcc.dg/analyzer/fd-access-mode-target-headers.c @@ -1,4 +1,5 @@ /* { dg-skip-if "" { { powerpc*-*-aix* avr-*-* *-*-vxworks* } || newlib } } */ +/* { dg-skip-if "PR analyzer/107750" { *-*-solaris2* } } */ #include #include diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-connect.c b/gcc/testsuite/gcc.dg/analyzer/fd-connect.c index 43e435eaf12..3fe99d9530c 100644 --- a/gcc/testsuite/gcc.dg/analyzer/fd-connect.c +++ b/gcc/testsuite/gcc.dg/analyzer/fd-connect.c @@ -1,5 +1,6 @@ /* { dg-require-effective-target sockets } */ /* { dg-skip-if "" { powerpc*-*-aix* } } */ +/* { dg-skip-if "PR analyzer/107750" { *-*-solaris2* } } */ #include #include diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-datagram-socket.c b/gcc/testsuite/gcc.dg/analyzer/fd-datagram-socket.c index 59e80c831e3..8d32e858111 100644 --- a/gcc/testsuite/gcc.dg/analyzer/fd-datagram-socket.c +++ b/gcc/testsuite/gcc.dg/analyzer/fd-datagram-socket.c @@ -1,5 +1,6 @@ /* { dg-require-effective-target sockets } */ /* { dg-skip-if "" { powerpc*-*-aix* } } */ +/* { dg-skip-if "PR analyzer/107750" { *-*-solaris2* } } */ #include #include diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-listen.c b/gcc/testsuite/gcc.dg/analyzer/fd-listen.c index 3ac7a990042..1444af72e3a 100644 --- a/gcc/testsuite/gcc.dg/analyzer/fd-listen.c +++ b/gcc/testsuite/gcc.dg/analyzer/fd-listen.c @@ -1,5 +1,6 @@ /* { dg-require-effective-target sockets } */ /* { dg-skip-if "" { powerpc*-*-aix* } } */ +/* { dg-skip-if "PR analyzer/107750" { *-*-solaris2* } } */ #include #include diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-socket-misuse.c b/gcc/testsuite/gcc.dg/analyzer/fd-socket-misuse.c index 914948644bb..8771c0cbe03 100644 --- a/gcc/testsuite/gcc.dg/analyzer/fd-socket-misuse.c +++ b/gcc/testsuite/gcc.dg/analyzer/fd-socket-misuse.c @@ -2,6 +2,7 @@ /* { dg-require-effective-target sockets } */ /* { dg-skip-if "" { powerpc*-*-aix* } } */ +/* { dg-skip-if "PR analyzer/107750" { *-*-solaris2* } } */ #include #include diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-stream-socket-active-open.c b/gcc/testsuite/gcc.dg/analyzer/fd-stream-socket-active-open.c index b39dbf85c3d..e8b01dd2985 100644 --- a/gcc/testsuite/gcc.dg/analyzer/fd-stream-socket-active-open.c ++
[gcc r14-10274] libstdc++: Build libbacktrace and 19_diagnostics/stacktrace with -funwind-tables [PR111641]
https://gcc.gnu.org/g:d92b508dd19daffedfc0fb02e5bfa710f2c397b0 commit r14-10274-gd92b508dd19daffedfc0fb02e5bfa710f2c397b0 Author: Rainer Orth Date: Wed May 29 10:08:07 2024 +0200 libstdc++: Build libbacktrace and 19_diagnostics/stacktrace with -funwind-tables [PR111641] Several of the 19_diagnostics/stacktrace tests FAIL on Solaris/SPARC (32 and 64-bit), Solaris/x86 (32-bit only), and several other targets: FAIL: 19_diagnostics/stacktrace/current.cc -std=gnu++23 execution test FAIL: 19_diagnostics/stacktrace/current.cc -std=gnu++26 execution test FAIL: 19_diagnostics/stacktrace/entry.cc -std=gnu++23 execution test FAIL: 19_diagnostics/stacktrace/entry.cc -std=gnu++26 execution test FAIL: 19_diagnostics/stacktrace/output.cc -std=gnu++23 execution test FAIL: 19_diagnostics/stacktrace/output.cc -std=gnu++26 execution test FAIL: 19_diagnostics/stacktrace/stacktrace.cc -std=gnu++23 execution test FAIL: 19_diagnostics/stacktrace/stacktrace.cc -std=gnu++26 execution test As it turns out, both the copy of libbacktrace in libstdc++ and the testcases proper need to compiled with -funwind-tables, as is done for libbacktrace itself. This isn't an issue on Linux/x86_64 and Solaris/amd64 since 64-bit x86 always defaults to -funwind-tables. 32-bit x86 does, too, when -fomit-frame-pointer is enabled as on Linux/i686, but unlike Solaris/i386. So this patch always enables the option both for the libbacktrace copy and the testcases. Tested on i386-pc-solaris2.11, sparc-sun-solaris2.11, and x86_64-pc-linux-gnu. 2024-05-23 Rainer Orth libstdc++-v3: PR libstdc++/111641 * src/libbacktrace/Makefile.am (AM_CFLAGS): Add -funwind-tables. * src/libbacktrace/Makefile.in: Regenerate. * testsuite/19_diagnostics/stacktrace/current.cc (dg-options): Add -funwind-tables. * testsuite/19_diagnostics/stacktrace/entry.cc: Likewise. * testsuite/19_diagnostics/stacktrace/hash.cc: Likewise. * testsuite/19_diagnostics/stacktrace/output.cc: Likewise. * testsuite/19_diagnostics/stacktrace/stacktrace.cc: Likewise. (cherry picked from commit a99ebb88f8f25e76ebed5afc22e64fa77a2f0d3f) Diff: --- libstdc++-v3/src/libbacktrace/Makefile.am | 2 +- libstdc++-v3/src/libbacktrace/Makefile.in | 2 +- libstdc++-v3/testsuite/19_diagnostics/stacktrace/current.cc| 2 +- libstdc++-v3/testsuite/19_diagnostics/stacktrace/entry.cc | 2 +- libstdc++-v3/testsuite/19_diagnostics/stacktrace/hash.cc | 2 +- libstdc++-v3/testsuite/19_diagnostics/stacktrace/output.cc | 2 +- libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libstdc++-v3/src/libbacktrace/Makefile.am b/libstdc++-v3/src/libbacktrace/Makefile.am index a2e78671259..82205db46de 100644 --- a/libstdc++-v3/src/libbacktrace/Makefile.am +++ b/libstdc++-v3/src/libbacktrace/Makefile.am @@ -51,7 +51,7 @@ C_WARN_FLAGS = $(WARN_FLAGS) -Wstrict-prototypes -Wmissing-prototypes -Wold-styl CXX_WARN_FLAGS = $(WARN_FLAGS) -Wno-unused-parameter AM_CFLAGS = \ $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \ - $(C_WARN_FLAGS) + $(C_WARN_FLAGS) -funwind-tables AM_CFLAGS += $(EXTRA_CFLAGS) AM_CXXFLAGS = \ $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \ diff --git a/libstdc++-v3/src/libbacktrace/Makefile.in b/libstdc++-v3/src/libbacktrace/Makefile.in index b5713b0c616..51c8092335a 100644 --- a/libstdc++-v3/src/libbacktrace/Makefile.in +++ b/libstdc++-v3/src/libbacktrace/Makefile.in @@ -473,7 +473,7 @@ libstdc___libbacktrace_la_CPPFLAGS = \ C_WARN_FLAGS = $(WARN_FLAGS) -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wno-unused-but-set-variable CXX_WARN_FLAGS = $(WARN_FLAGS) -Wno-unused-parameter AM_CFLAGS = $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \ - $(C_WARN_FLAGS) $(EXTRA_CFLAGS) + $(C_WARN_FLAGS) -funwind-tables $(EXTRA_CFLAGS) AM_CXXFLAGS = $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \ $(CXX_WARN_FLAGS) -fno-rtti -fno-exceptions $(EXTRA_CXXFLAGS) obj_prefix = std_stacktrace diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/current.cc b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/current.cc index b1af5f74fb2..cdebd5f1daa 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/current.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/current.cc @@ -1,4 +1,4 @@ -// { dg-options "-lstdc++exp" } +// { dg-options "-funwind-tables -lstdc++exp" } // { dg-do run { target c++23 } } // { dg-require-cpp-feature-test __cpp_lib_stacktrace } diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/entry.cc b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/entry.cc i
[gcc r14-10275] testsuite: gm2: Remove timeout overrides [PR114886]
https://gcc.gnu.org/g:e80523288c9967a5fa6d6e27609cc4b1f1aef8d4 commit r14-10275-ge80523288c9967a5fa6d6e27609cc4b1f1aef8d4 Author: Rainer Orth Date: Tue Apr 30 13:49:28 2024 +0200 testsuite: gm2: Remove timeout overrides [PR114886] A large number of gm2 tests are timing out even on current Solaris/SPARC systems. As detailed in the PR, the problem is that the gm2 testsuite artificially lowers many timeouts way below the DejaGnu default of 300 seconds, often as short as 10 seconds. The problem lies both in the values (they may be appropriate for some targets, but too low for others, especially under high load) and the fact that it uses absolute values, overriding e.g. settings from a build-wide site.exp. Therefore this patch removes all those overrides, restoring the defaults. Tested on sparc-sun-solaris2.11 (where all the previous timeouts are gone) and i386-pc-solaris2.11. 2024-04-29 Rainer Orth gcc/testsuite: PR modula2/114886 * lib/gm2.exp: Don't load timeout-dg.exp. Don't set gm2_previous_timeout. Don't call dg-timeout. (gm2_push_timeout, gm2_pop_timeout): Remove. (gm2_init): Don't call dg-timeout. * lib/gm2-torture.exp: Don't load timeout-dg.exp. Don't set gm2_previous_timeout. Don't call dg-timeout. (gm2_push_timeout, gm2_pop_timeout): Remove. * gm2/coroutines/pim/run/pass/coroutines-pim-run-pass.exp: Don't load timeout-dg.exp. Don't call gm2_push_timeout, gm2_pop_timeout. * gm2/examples/map/pass/examples-map-pass.exp: Don't call gm2_push_timeout, gm2_pop_timeout. * gm2/iso/run/pass/iso-run-pass.exp: Don't load timeout-dg.exp. Don't call gm2_push_timeout, gm2_pop_timeout. * gm2/pimlib/base/run/pass/pimlib-base-run-pass.exp: Don't load timeout-dg.exp. Don't call gm2_push_timeout, gm2_pop_timeout. * gm2/projects/iso/run/pass/halma/projects-iso-run-pass-halma.exp: Don't call gm2_push_timeout, gm2_pop_timeout. * gm2/switches/whole-program/pass/run/switches-whole-program-pass-run.exp: Don't load timeout-dg.exp. Don't call gm2_push_timeout, gm2_pop_timeout. (cherry picked from commit aff63ac11099d100b6891f3bcc3dc6cbc4fad654) Diff: --- .../pim/run/pass/coroutines-pim-run-pass.exp | 7 - .../gm2/examples/map/pass/examples-map-pass.exp| 5 gcc/testsuite/gm2/iso/run/pass/iso-run-pass.exp| 6 .../pimlib/base/run/pass/pimlib-base-run-pass.exp | 6 .../run/pass/halma/projects-iso-run-pass-halma.exp | 7 - .../pass/run/switches-whole-program-pass-run.exp | 4 --- gcc/testsuite/lib/gm2-torture.exp | 28 -- gcc/testsuite/lib/gm2.exp | 34 -- 8 files changed, 97 deletions(-) diff --git a/gcc/testsuite/gm2/coroutines/pim/run/pass/coroutines-pim-run-pass.exp b/gcc/testsuite/gm2/coroutines/pim/run/pass/coroutines-pim-run-pass.exp index 6b3a8ebefe2..db2ba6314c1 100644 --- a/gcc/testsuite/gm2/coroutines/pim/run/pass/coroutines-pim-run-pass.exp +++ b/gcc/testsuite/gm2/coroutines/pim/run/pass/coroutines-pim-run-pass.exp @@ -24,16 +24,11 @@ if $tracelevel then { # load support procs load_lib gm2-torture.exp -load_lib timeout-dg.exp set gm2src ${srcdir}/../gm2 gm2_init_cor "" -# We should be able to compile, link or run in 20 seconds. -gm2_push_timeout 20 - - foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] { # If we're only testing specific files and this isn't one of them, skip it. if ![runtest_file_p $runtests $testcase] then { @@ -42,5 +37,3 @@ foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] { gm2-torture-execute $testcase "" "pass" } - -gm2_pop_timeout diff --git a/gcc/testsuite/gm2/examples/map/pass/examples-map-pass.exp b/gcc/testsuite/gm2/examples/map/pass/examples-map-pass.exp index 432518d7133..fabcf96f6d1 100644 --- a/gcc/testsuite/gm2/examples/map/pass/examples-map-pass.exp +++ b/gcc/testsuite/gm2/examples/map/pass/examples-map-pass.exp @@ -27,9 +27,6 @@ load_lib gm2-torture.exp gm2_init_pim "${srcdir}/${subdir}" -# We should be able to compile, link or run in 30 seconds. -gm2_push_timeout 30 - foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] { # If we're only testing specific files and this isn't one of them, skip it. if ![runtest_file_p $runtests $testcase] then { @@ -38,5 +35,3 @@ foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] { gm2-torture $testcase } - -gm2_pop_timeout diff --git a/gcc/testsuite/gm2/iso/run/pass/iso-run-pass.exp b/gcc/testsuite/gm2/iso/run/pass/iso-run-pass.exp index af387e54b24..2c79b69ab6a 100644 --- a/gcc/testsuite/gm2/iso/run/pass
[gcc r15-1010] testsuite: i386: Require ifunc support in gcc.target/i386/avx10_1-25.c etc.
https://gcc.gnu.org/g:00fb385a25a7fbaa9c7060ddd5f41a8c3b1548d1 commit r15-1010-g00fb385a25a7fbaa9c7060ddd5f41a8c3b1548d1 Author: Rainer Orth Date: Tue Jun 4 13:33:46 2024 +0200 testsuite: i386: Require ifunc support in gcc.target/i386/avx10_1-25.c etc. Two new AVX10.1 tests FAIL on Solaris/x86: FAIL: gcc.target/i386/avx10_1-25.c (test for excess errors) FAIL: gcc.target/i386/avx10_1-26.c (test for excess errors) Excess errors: /vol/gcc/src/hg/master/local/gcc/testsuite/gcc.target/i386/avx10_1-25.c:6:9: error: the call requires 'ifunc', which is not supported by this target Fixed by requiring ifunc support. Tested on i386-pc-solaris2.11 and x86_64-pc-linux-gnu. 2024-06-04 Rainer Orth gcc/testsuite: * gcc.target/i386/avx10_1-25.c: Require ifunc support. * gcc.target/i386/avx10_1-26.c: Likewise. Diff: --- gcc/testsuite/gcc.target/i386/avx10_1-25.c | 1 + gcc/testsuite/gcc.target/i386/avx10_1-26.c | 1 + 2 files changed, 2 insertions(+) diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-25.c b/gcc/testsuite/gcc.target/i386/avx10_1-25.c index 73f1b724560..5bd2b88fb08 100644 --- a/gcc/testsuite/gcc.target/i386/avx10_1-25.c +++ b/gcc/testsuite/gcc.target/i386/avx10_1-25.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -mavx" } */ +/* { dg-require-ifunc "" } */ #include __attribute__((target_clones ("default","avx10.1-256"))) diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-26.c b/gcc/testsuite/gcc.target/i386/avx10_1-26.c index 514ab57a406..cf8c976e21f 100644 --- a/gcc/testsuite/gcc.target/i386/avx10_1-26.c +++ b/gcc/testsuite/gcc.target/i386/avx10_1-26.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -mavx512f" } */ +/* { dg-require-ifunc "" } */ #include __attribute__((target_clones ("default","avx10.1-512")))
[gcc r15-1091] testsuite: go: Require split-stack support for go.test/test/index0.go [PR87589]
https://gcc.gnu.org/g:9ab90fc627301b1701cf19bf4ca220f02a93d894 commit r15-1091-g9ab90fc627301b1701cf19bf4ca220f02a93d894 Author: Rainer Orth Date: Fri Jun 7 10:12:09 2024 +0200 testsuite: go: Require split-stack support for go.test/test/index0.go [PR87589] The index0-out.go test FAILs on Solaris (SPARC and x86, 32 and 64-bit), as well as several others: FAIL: ./index0-out.go execution, -O0 -g -fno-var-tracking-assignments The test SEGVs because it tries a stack acess way beyond the stack area. As Ian analyzed in the PR, the testcase currently requires split-stack support, so this patch requires just that. Tested on i386-pc-solaris2.11 and sparc-sun-solaris2.11. 2024-06-05 Rainer Orth gcc/testsuite: PR go/87589 * go.test/go-test.exp (go-gc-tests): Require split-stack support for index0.go. Diff: --- gcc/testsuite/go.test/go-test.exp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/go.test/go-test.exp b/gcc/testsuite/go.test/go-test.exp index 8fdc7b420be..98317380746 100644 --- a/gcc/testsuite/go.test/go-test.exp +++ b/gcc/testsuite/go.test/go-test.exp @@ -477,7 +477,8 @@ proc go-gc-tests { } { if { ( [file tail $test] == "select2.go" \ || [file tail $test] == "stack.go" \ || [file tail $test] == "peano.go" \ - || [file tail $test] == "nilptr2.go" ) \ + || [file tail $test] == "nilptr2.go" \ + || [file tail $test] == "index0.go" ) \ && ! [check_effective_target_split_stack] } { # These tests fails on targets without split stack. untested $name
[gcc r15-1092] go: Fix gccgo -v on Solaris with ld
https://gcc.gnu.org/g:9fff0be2f849b84e4c427bdd7a4716158b80a511 commit r15-1092-g9fff0be2f849b84e4c427bdd7a4716158b80a511 Author: Rainer Orth Date: Fri Jun 7 10:14:23 2024 +0200 go: Fix gccgo -v on Solaris with ld The Go testsuite's go.sum file ends in Couldn't determine version of /var/gcc/regression/master/11.4-gcc-64/build/gcc/gccgo on Solaris. It turns out this happens because gccgo -v is confused: [...] gcc version 15.0.0 20240531 (experimental) [master a0d60660f2aae2d79685f73d568facb2397582d8] (GCC) COMPILER_PATH=./:/usr/ccs/bin/ LIBRARY_PATH=./:/lib/amd64/:/usr/lib/amd64/:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-g1' '-B' './' '-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'a.' ./collect2 -V -M ./libgcc-unwind.map -Qy /usr/lib/amd64/crt1.o ./crtp.o /usr/lib/amd64/crti.o /usr/lib/amd64/values-Xa.o /usr/lib/amd64/values-xpg6.o ./crtbegin.o -L. -L/lib/amd64 -L/usr/lib/amd64 -t -lgcc_s -lgcc -lc -lgcc_s -lgcc ./crtend.o /usr/lib/amd64/crtn.o ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.3297 Undefined first referenced symbol in file main/usr/lib/amd64/crt1.o ld: fatal: symbol referencing errors collect2: error: ld returned 1 exit status trying to invoke the linker without adding any object file. This only happens when Solaris ld is in use. gccgo passes -t to the linker in that case, but does it unconditionally, even with -v. When configured to use GNU ld, gccgo -v is fine instead. This patch avoids this by restricting the -t to actually linking. Tested on i386-pc-solaris2.11 and sparc-sun-solaris2.11 (ld and gld). 2024-06-05 Rainer Orth gcc/go: * gospec.cc (lang_specific_driver) [TARGET_SOLARIS !USE_GLD]: Only add -t if linking. Diff: --- gcc/go/gospec.cc | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/go/gospec.cc b/gcc/go/gospec.cc index b866d47a942..a3da23dfa3a 100644 --- a/gcc/go/gospec.cc +++ b/gcc/go/gospec.cc @@ -443,8 +443,11 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options, using the GNU linker, the Solaris linker needs an option to not warn about this. Everything works without this option, but you get unsightly warnings at link time. */ - generate_option (OPT_Wl_, "-t", 1, CL_DRIVER, &new_decoded_options[j]); - j++; + if (library > 0) +{ + generate_option (OPT_Wl_, "-t", 1, CL_DRIVER, &new_decoded_options[j]); + j++; +} #endif *in_decoded_options_count = j;
[gcc r15-5501] i386: Remove workaround for Solaris ld 64-bit TLS IE limitation
https://gcc.gnu.org/g:086ee8d08669fe597e6c63a4e5489d2df7698ec8 commit r15-5501-g086ee8d08669fe597e6c63a4e5489d2df7698ec8 Author: Uros Bizjak Date: Wed Nov 20 12:57:25 2024 +0100 i386: Remove workaround for Solaris ld 64-bit TLS IE limitation As detailed in PR target/43309, the Solaris linker initially took the 64-bit x86 TLS IE code sequence literally, assuming that the spec only allowed %rax as target register. A workaround has been in place for more than a decade, but is no longer necessary. The bug had already been fixed for Solaris 11.1, while trunk requires Solaris 11.4. Uros pointed this out and suggested the attached patch. Bootstrapped without regressions on i386-pc-solaris2.11. 2024-10-15 Uros Bizjak gcc: * config/i386/i386.cc (legitimize_tls_address) : Remove 64-bit Solaris ld workaround. * config/i386/i386.md (UNSPEC_TLS_IE_SUN): Remove. (tls_initial_exec_64_sun): Remove. Diff: --- gcc/config/i386/i386.cc | 11 --- gcc/config/i386/i386.md | 17 - 2 files changed, 28 deletions(-) diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc index 9d3d8abf7803..c7e70c21999e 100644 --- a/gcc/config/i386/i386.cc +++ b/gcc/config/i386/i386.cc @@ -12320,17 +12320,6 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov) case TLS_MODEL_INITIAL_EXEC: if (TARGET_64BIT) { - if (TARGET_SUN_TLS && !TARGET_X32) - { - /* The Sun linker took the AMD64 TLS spec literally -and can only handle %rax as destination of the -initial executable code sequence. */ - - dest = gen_reg_rtx (DImode); - emit_insn (gen_tls_initial_exec_64_sun (dest, x)); - return dest; - } - /* Generate DImode references to avoid %fs:(%reg32) problems and linker IE->LE relaxation bug. */ tp_mode = DImode; diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index b2209492fa0e..1c1bf659fc25 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -93,7 +93,6 @@ UNSPEC_TLS_GD UNSPEC_TLS_LD_BASE UNSPEC_TLSDESC - UNSPEC_TLS_IE_SUN ;; Other random patterns UNSPEC_SCAS @@ -22876,22 +22875,6 @@ set_mem_addr_space (operands[2], as); }) -;; The Sun linker took the AMD64 TLS spec literally and can only handle -;; %rax as destination of the initial executable code sequence. -(define_insn "tls_initial_exec_64_sun" - [(set (match_operand:DI 0 "register_operand" "=a") - (unspec:DI -[(match_operand 1 "tls_symbolic_operand")] -UNSPEC_TLS_IE_SUN)) - (clobber (reg:CC FLAGS_REG))] - "TARGET_64BIT && TARGET_SUN_TLS" -{ - output_asm_insn -("mov{q}\t{%%fs:0, %0|%0, QWORD PTR fs:0}", operands); - return "add{q}\t{%a1@gottpoff(%%rip), %0|%0, %a1@gottpoff[rip]}"; -} - [(set_attr "type" "multi")]) - ;; GNU2 TLS patterns can be split. (define_expand "tls_dynamic_gnu2_32"
[gcc r15-5500] testsuite: i386: Fix gcc.target/i386/pr117232-1.c etc. with Solaris as
https://gcc.gnu.org/g:bf57f9b59904f517bced5307792358cc15c77f26 commit r15-5500-gbf57f9b59904f517bced5307792358cc15c77f26 Author: Rainer Orth Date: Wed Nov 20 12:54:22 2024 +0100 testsuite: i386: Fix gcc.target/i386/pr117232-1.c etc. with Solaris as Two tests FAIL on Solaris/x86 with the native assembler: FAIL: gcc.target/i386/pr117232-1.c scan-assembler-times (?n)cmovn?c 7 FAIL: gcc.target/i386/pr117232-apx-1.c scan-assembler-times (?n)cmovn?c 7 The problem is that as expects a slightly different insn syntax, e.g. cmovl.nc%esi, %eax instead of cmovnc %esi, %eax This patch allows for both forms. Tested on i386-pc-solaris2.11 (as and gas) and x86_64-pc-linux-gnu. 2024-11-15 Rainer Orth gcc/testsuite: * gcc.target/i386/pr117232-1.c (scan-assembler-times): Allow for cmovl.nc etc. * gcc.target/i386/pr117232-apx-1.c: Likewise. Diff: --- gcc/testsuite/gcc.target/i386/pr117232-1.c | 2 +- gcc/testsuite/gcc.target/i386/pr117232-apx-1.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.target/i386/pr117232-1.c b/gcc/testsuite/gcc.target/i386/pr117232-1.c index cd7f5d112a79..0cf1cad9069d 100644 --- a/gcc/testsuite/gcc.target/i386/pr117232-1.c +++ b/gcc/testsuite/gcc.target/i386/pr117232-1.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-mavx512bw -mavx512vl -mavx512dq -O2" } */ /* { dg-final { scan-assembler-times {(?n)kortest[bwqd]} 7 { target { ! ia32 } } } } */ -/* { dg-final { scan-assembler-times {(?n)cmovn?c} 7 { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-times {(?n)cmov([lq]\.)?n?c} 7 { target { ! ia32 } } } } */ #include int diff --git a/gcc/testsuite/gcc.target/i386/pr117232-apx-1.c b/gcc/testsuite/gcc.target/i386/pr117232-apx-1.c index e3571adf6dd2..57ac9b81dfda 100644 --- a/gcc/testsuite/gcc.target/i386/pr117232-apx-1.c +++ b/gcc/testsuite/gcc.target/i386/pr117232-apx-1.c @@ -1,7 +1,7 @@ /* { dg-do compile { target { ! ia32 } } } */ /* { dg-options "-mavx512bw -mavx512vl -mavx512dq -mapxf -O2" } */ /* { dg-final { scan-assembler-times {(?n)kortest[bwqd]} 7 } } */ -/* { dg-final { scan-assembler-times {(?n)cmovn?c} 7 } } */ +/* { dg-final { scan-assembler-times {(?n)cmov([lq]\.)?n?c} 7 } } */ #include
[gcc r15-7466] libphobos: Disable libphobos.phobos/std/concurrency.d on macOS 13+ [PR111628]
https://gcc.gnu.org/g:b7008552b493edaca6af041a18ff436c37f259bc commit r15-7466-gb7008552b493edaca6af041a18ff436c37f259bc Author: Rainer Orth Date: Tue Feb 11 09:41:18 2025 +0100 libphobos: Disable libphobos.phobos/std/concurrency.d on macOS 13+ [PR111628] The libphobos.phobos_shared/std/concurrency.d test just hangs on macOS 13 and beyond and isn't even termintated after the testsuite timeout is exceeded. Thus, more and more concurrency.exe processes keep accumulating, consuming CPU time for nothing. To avoid this, this patch skips the test on macOS 13+. The static test SEGVs immediately instead, but I'm skipping it too for symmetry. Tested on macOS 15 (where it becomes UNSUPPORTED) and 12 (where it still PASSes). I have no idea what happens on Darwin/arm64, so currently the skipping is restricted to Darwin/x86_64. 2025-02-10 Rainer Orth PR d/111628 * testsuite/libphobos.phobos/phobos.exp (libphobos_skip_tests): Add libphobos.phobos/std/concurrency.d on macOS 13+. * testsuite/libphobos.phobos_shared/phobos_shared.exp (libphobos_skip_tests): Likewise for libphobos.phobos_shared/std/concurrency.d Diff: --- libphobos/testsuite/libphobos.phobos/phobos.exp | 2 ++ libphobos/testsuite/libphobos.phobos_shared/phobos_shared.exp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/libphobos/testsuite/libphobos.phobos/phobos.exp b/libphobos/testsuite/libphobos.phobos/phobos.exp index 55622698f135..3e74078f1366 100644 --- a/libphobos/testsuite/libphobos.phobos/phobos.exp +++ b/libphobos/testsuite/libphobos.phobos/phobos.exp @@ -37,6 +37,8 @@ set libphobos_skip_tests { # Skip curl tests if library is not available { libphobos.phobos/etc/c/curl.d { ! libcurl_available } } { libphobos.phobos/std/net/curl.d { ! libcurl_available } } +# Skip concurrency.d test: SEGVs or hangs on macOS 13+ (PR d/111628). +{ libphobos.phobos/std/concurrency.d { x86_64-apple-darwin2[2-9]* } } } # Initialize dg. diff --git a/libphobos/testsuite/libphobos.phobos_shared/phobos_shared.exp b/libphobos/testsuite/libphobos.phobos_shared/phobos_shared.exp index 2940a663a803..54acea78a686 100644 --- a/libphobos/testsuite/libphobos.phobos_shared/phobos_shared.exp +++ b/libphobos/testsuite/libphobos.phobos_shared/phobos_shared.exp @@ -37,6 +37,8 @@ set libphobos_skip_tests { # Skip curl tests if library is not available { libphobos.phobos_shared/etc/c/curl.d { ! libcurl_available } } { libphobos.phobos_shared/std/net/curl.d { ! libcurl_available } } +# Skip concurrency.d test: SEGVs or hangs on macOS 13+ (PR d/111628). +{ libphobos.phobos_shared/std/concurrency.d { x86_64-apple-darwin2[2-9]* } } } # Initialize dg.
[gcc r15-5564] Use decl size in Solaris ASM_DECLARE_OBJECT_NAME [PR102296]
https://gcc.gnu.org/g:116b1c5489d12313f015c9ffd46b9394d559709d commit r15-5564-g116b1c5489d12313f015c9ffd46b9394d559709d Author: Rainer Orth Date: Thu Nov 21 13:41:19 2024 +0100 Use decl size in Solaris ASM_DECLARE_OBJECT_NAME [PR102296] Solaris has modified versions of ASM_DECLARE_OBJECT_NAME on both i386 and sparc. When commit ce597aedd79e646c4a5517505088d380239cbfa5 Author: Ilya Enkovich Date: Thu Aug 7 08:04:55 2014 + elfos.h (ASM_DECLARE_OBJECT_NAME): Use decl size instead of type size. was applied, those were missed. At the same time, the testcase was restricted to Linux though there's nothing Linux-specific in there, so the error remained undetected. This patch fixes the definitions to match elfos.h and enables the test on Solaris, too. Bootstrapped without regressions on i386-pc-solaris2.11 and sparc-sun-solaris2.11. 2024-11-19 Rainer Orth gcc/testsuite: PR target/102296 * gcc.target/i386/struct-size.c: Enable on *-*-solaris*. gcc: PR target/102296 * config/i386/sol2.h (ASM_DECLARE_OBJECT_NAME): Use decl size instead of type size. * config/sparc/sol2.h (ASM_DECLARE_OBJECT_NAME): Likewise. Diff: --- gcc/config/i386/sol2.h | 2 +- gcc/config/sparc/sol2.h | 2 +- gcc/testsuite/gcc.target/i386/struct-size.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/config/i386/sol2.h b/gcc/config/i386/sol2.h index f51fb2ef2f88..06d7ef05d450 100644 --- a/gcc/config/i386/sol2.h +++ b/gcc/config/i386/sol2.h @@ -179,7 +179,7 @@ along with GCC; see the file COPYING3. If not see && (DECL) && DECL_SIZE (DECL))\ { \ size_directive_output = 1;\ - size = int_size_in_bytes (TREE_TYPE (DECL)); \ + size = tree_to_uhwi (DECL_SIZE_UNIT (DECL)); \ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \ } \ \ diff --git a/gcc/config/sparc/sol2.h b/gcc/config/sparc/sol2.h index f0181d5914c8..f13235e786e5 100644 --- a/gcc/config/sparc/sol2.h +++ b/gcc/config/sparc/sol2.h @@ -377,7 +377,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); && (DECL) && DECL_SIZE (DECL))\ { \ size_directive_output = 1;\ - size = int_size_in_bytes (TREE_TYPE (DECL)); \ + size = tree_to_uhwi (DECL_SIZE_UNIT (DECL)); \ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \ } \ \ diff --git a/gcc/testsuite/gcc.target/i386/struct-size.c b/gcc/testsuite/gcc.target/i386/struct-size.c index d82d730afad4..486aa40bff54 100644 --- a/gcc/testsuite/gcc.target/i386/struct-size.c +++ b/gcc/testsuite/gcc.target/i386/struct-size.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target *-*-linux* } } */ +/* { dg-do compile { target *-*-linux* *-*-solaris* } } */ /* { dg-options "-Wno-pedantic" } */ struct S {
[gcc r15-5561] libgomp: testsuite: Fix libgomp.c/alloc-pinned-3.c etc. for C23 on non-Linux
https://gcc.gnu.org/g:0f7def85498ae0ad94f3aa3c2a7555ce9194f40c commit r15-5561-g0f7def85498ae0ad94f3aa3c2a7555ce9194f40c Author: Rainer Orth Date: Thu Nov 21 11:46:36 2024 +0100 libgomp: testsuite: Fix libgomp.c/alloc-pinned-3.c etc. for C23 on non-Linux Since the switch to a C23 default, three libgomp tests FAIL on Solaris: FAIL: libgomp.c/alloc-pinned-3.c (test for excess errors) UNRESOLVED: libgomp.c/alloc-pinned-3.c compilation failed to produce executable FAIL: libgomp.c/alloc-pinned-4.c (test for excess errors) UNRESOLVED: libgomp.c/alloc-pinned-4.c compilation failed to produce executable FAIL: libgomp.c/alloc-pinned-6.c (test for excess errors) UNRESOLVED: libgomp.c/alloc-pinned-6.c compilation failed to produce executable Excess errors: /vol/gcc/src/hg/master/local/libgomp/testsuite/libgomp.c/alloc-pinned-3.c:104:3: error: too many arguments to function 'set_pin_limit' Fixed by adding the missing size argument to the stub functions. Tested on i386-pc-solaris2.11 and sparc-sun-solaris2.11. 2024-11-20 Rainer Orth libgomp: * testsuite/libgomp.c/alloc-pinned-3.c [!__linux__] (set_pin_limit): Add size arg. * testsuite/libgomp.c/alloc-pinned-4.c [!__linux__] (set_pin_limit): Likewise. * testsuite/libgomp.c/alloc-pinned-6.c [!__linux__] (set_pin_limit): Likewise. Diff: --- libgomp/testsuite/libgomp.c/alloc-pinned-3.c | 2 +- libgomp/testsuite/libgomp.c/alloc-pinned-4.c | 2 +- libgomp/testsuite/libgomp.c/alloc-pinned-6.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libgomp/testsuite/libgomp.c/alloc-pinned-3.c b/libgomp/testsuite/libgomp.c/alloc-pinned-3.c index 53e4720cc9c1..11dc818d2a96 100644 --- a/libgomp/testsuite/libgomp.c/alloc-pinned-3.c +++ b/libgomp/testsuite/libgomp.c/alloc-pinned-3.c @@ -57,7 +57,7 @@ get_pinned_mem () } void -set_pin_limit () +set_pin_limit (int size) { } #endif diff --git a/libgomp/testsuite/libgomp.c/alloc-pinned-4.c b/libgomp/testsuite/libgomp.c/alloc-pinned-4.c index 9d850c23e4bb..2ecd01f02d56 100644 --- a/libgomp/testsuite/libgomp.c/alloc-pinned-4.c +++ b/libgomp/testsuite/libgomp.c/alloc-pinned-4.c @@ -57,7 +57,7 @@ get_pinned_mem () } void -set_pin_limit () +set_pin_limit (int size) { } #endif diff --git a/libgomp/testsuite/libgomp.c/alloc-pinned-6.c b/libgomp/testsuite/libgomp.c/alloc-pinned-6.c index 7ed68740ae6c..99f1269424fa 100644 --- a/libgomp/testsuite/libgomp.c/alloc-pinned-6.c +++ b/libgomp/testsuite/libgomp.c/alloc-pinned-6.c @@ -56,7 +56,7 @@ get_pinned_mem () } void -set_pin_limit () +set_pin_limit (int size) { } #endif
[gcc r15-7156] testsuite: i386: Adjust gcc.target/i386/cmov12.c for Sun as syntax
https://gcc.gnu.org/g:314d20bbefd098ff75b366b870ac8e33ad7711ca commit r15-7156-g314d20bbefd098ff75b366b870ac8e33ad7711ca Author: Rainer Orth Date: Thu Jan 23 11:28:15 2025 +0100 testsuite: i386: Adjust gcc.target/i386/cmov12.c for Sun as syntax The new gcc.target/i386/cmov12.c test FAILs on Solaris/x86 with the native as: FAIL: gcc.target/i386/cmov12.c scan-assembler-times cmovg 3 This happens because as uses a different syntax for cmov: --- cmov12.s.bu243 2025-01-21 16:55:27.038829605 +0100 +++ cmov12.s.bu243902025-01-21 16:55:44.565051230 +0100 @@ -41,9 +41,9 @@ leal1(%rdx), %ebp movl(%r11), %esi cmpl%eax, %esi - cmovg %ebp, %edx - cmovg %r11, %rcx - cmovg %esi, %eax + cmovl.g %ebp, %edx + cmovq.g %r11, %rcx + cmovl.g %esi, %eax The problem is even more prominent with the upcoming gas 2.44 which added support for the Sun as syntax on Solaris, which gcc/configure picks up. This patch allows for both forms. Tested on i386-pc-solaris2.11 and x86_64-pc-linux-gnu. 2025-01-22 Rainer Orth gcc/testsuite: * gcc.target/i386/cmov12.c (scan-assembler-times): Allow for cmovl.g etc. Diff: --- gcc/testsuite/gcc.target/i386/cmov12.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/i386/cmov12.c b/gcc/testsuite/gcc.target/i386/cmov12.c index 87de4f4117b8..3d8c358e7031 100644 --- a/gcc/testsuite/gcc.target/i386/cmov12.c +++ b/gcc/testsuite/gcc.target/i386/cmov12.c @@ -1,6 +1,6 @@ /* { dg-do compile { target { ! ia32 } } } */ /* { dg-options "-O2 -mavx2 -mtune=sapphirerapids" } */ -/* { dg-final { scan-assembler-times "cmovg" 3 } } */ +/* { dg-final { scan-assembler-times "cmov(\[lq\]\.)?g" 3 } } */ void foo(int *a, int n, int k) {
[gcc r15-7501] build: Remove HAVE_LD_EH_FRAME_CIEV3
https://gcc.gnu.org/g:7db94370a74481ad1db1f0a4dc4aa45fa464a02a commit r15-7501-g7db94370a74481ad1db1f0a4dc4aa45fa464a02a Author: Rainer Orth Date: Thu Feb 13 10:17:50 2025 +0100 build: Remove HAVE_LD_EH_FRAME_CIEV3 Old versions of Solaris ld and GNU ld didn't support CIEv3 in .eh_frame. To avoid this breaking the build [build] Default to DWARF 4 on Solaris if linker supports CIEv3 http://gcc.gnu.org/ml/gcc-patches/2013-03/msg00669.html checked for the necessary linker support, defaulting to DWARF-2 if necessary. Solaris ld was fixed in Solaris 11.1, GNU ld in binutils 2.16, so this is long obsolete and only used in Solaris code anyway. This patch thus removes both the configure check and solaris_override_options. Bootstrapped without regressions on i386-pc-solaris2.11 and sparc-sun-solaris2.11. 2025-02-12 Rainer Orth gcc: * configure.ac (gcc_cv_ld_eh_frame_ciev3): Remove. * configure, config.in: Regenerate. * config/sol2.cc (solaris_override_options): Remove. * config/sol2.h (SUBTARGET_OVERRIDE_OPTIONS): Remove. * config/sol2-protos.h (solaris_override_options): Remove. Diff: --- gcc/config.in| 6 -- gcc/config/sol2-protos.h | 1 - gcc/config/sol2.cc | 9 - gcc/config/sol2.h| 5 - gcc/configure| 40 gcc/configure.ac | 36 6 files changed, 97 deletions(-) diff --git a/gcc/config.in b/gcc/config.in index 3b06533c4829..45ae9fb222eb 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -1773,12 +1773,6 @@ #endif -/* Define 0/1 if your linker supports CIE v3 in .eh_frame. */ -#ifndef USED_FOR_TARGET -#undef HAVE_LD_EH_FRAME_CIEV3 -#endif - - /* Define if your linker supports .eh_frame_hdr. */ #undef HAVE_LD_EH_FRAME_HDR diff --git a/gcc/config/sol2-protos.h b/gcc/config/sol2-protos.h index 2462b475c7fc..70dd9583e6ce 100644 --- a/gcc/config/sol2-protos.h +++ b/gcc/config/sol2-protos.h @@ -24,7 +24,6 @@ extern void solaris_elf_asm_comdat_section (const char *, unsigned int, tree); extern void solaris_file_end (void); extern void solaris_insert_attributes (tree, tree *); extern void solaris_output_init_fini (FILE *, tree); -extern void solaris_override_options (void); /* In sol2-c.cc. */ extern void solaris_register_pragmas (void); diff --git a/gcc/config/sol2.cc b/gcc/config/sol2.cc index 9bd9722dff72..f46bcfaf0023 100644 --- a/gcc/config/sol2.cc +++ b/gcc/config/sol2.cc @@ -291,12 +291,3 @@ solaris_file_end (void) solaris_comdat_htab->traverse (NULL); } - -void -solaris_override_options (void) -{ - /* Older versions of Solaris ld cannot handle CIE version 3 in .eh_frame. - Don't emit DWARF3/4 unless specifically selected if so. */ - if (!HAVE_LD_EH_FRAME_CIEV3 && !OPTION_SET_P (dwarf_version)) -dwarf_version = 2; -} diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h index 9618b43c6178..2405c101aee3 100644 --- a/gcc/config/sol2.h +++ b/gcc/config/sol2.h @@ -119,11 +119,6 @@ along with GCC; see the file COPYING3. If not see TARGET_SUB_OS_CPP_BUILTINS(); \ } while (0) -#define SUBTARGET_OVERRIDE_OPTIONS \ - do { \ -solaris_override_options (); \ - } while (0) - #if DEFAULT_ARCH32_P #define MULTILIB_DEFAULTS { "m32" } #else diff --git a/gcc/configure b/gcc/configure index e36d1d91612a..69a9cf7af5f5 100755 --- a/gcc/configure +++ b/gcc/configure @@ -32335,46 +32335,6 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_eh_frame_hdr" >&5 $as_echo "$gcc_cv_ld_eh_frame_hdr" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker CIEv3 in .eh_frame support" >&5 -$as_echo_n "checking linker CIEv3 in .eh_frame support... " >&6; } -gcc_cv_ld_eh_frame_ciev3=no -if test $in_tree_ld = yes ; then - if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ - && test $in_tree_ld_is_elf = yes; then -gcc_cv_ld_eh_frame_ciev3=yes - fi -elif test x$gcc_cv_ld != x; then - if echo "$ld_ver" | grep GNU > /dev/null; then -gcc_cv_ld_eh_frame_ciev3=yes -if test 0"$ld_date" -lt 20040513; then - if test -n "$ld_date"; then - # If there was date string, but was earlier than 2004-05-13, fail - gcc_cv_ld_eh_frame_ciev3=no - elif test "$ld_vers_major" -lt 2; then - gcc_cv_ld_eh_frame_ciev3=no - elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then - gcc_cv_ld_eh_frame_ciev3=no - fi -fi - else -case "$target" in - *-*-solaris2*) -# Sun ld added support for CIE v3 in .eh_frame in Solaris 11.1. -if test "$ld_vers_major" -gt 1 || test "$ld_vers_minor" -ge 2324; then -
[gcc r15-7500] doc: Update install.texi for GCC 15 on Solaris
https://gcc.gnu.org/g:85b0a6e853aeda30acc1990c8bf13951c7e4da7d commit r15-7500-g85b0a6e853aeda30acc1990c8bf13951c7e4da7d Author: Rainer Orth Date: Thu Feb 13 09:59:43 2025 +0100 doc: Update install.texi for GCC 15 on Solaris Apart from minor updates, this patch is primarily an important caveat about binutils PR ld/32580, which has broken the binutils 2.44 ld on Solaris/x86. Tested on i386-pc-solaris2.11. 2025-02-11 Rainer Orth gcc: * doc/install.texi (Specific, *-*-solaris2*): Updates for newer Solaris 11.4 SRUs and binutils 2.44. Diff: --- gcc/doc/install.texi | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index bd7a38048eb3..08892c676e31 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -4840,7 +4840,7 @@ Support for Solaris 10 has been removed in GCC 10. Support for Solaris 9 has been removed in GCC 5. Support for Solaris 8 has been removed in GCC 4.8. Support for Solaris 7 has been removed in GCC 4.6. -Solaris 11.4 provides one or more of GCC 5, 7, 9, 10, 11, 12, and 13. +Solaris 11.4 provides one or more of GCC 5, 7, 9, 10, 11, 12, 13, and 14. You need to install the @code{system/header}, @code{system/linker}, and @code{developer/assembler} packages. @@ -4862,7 +4862,7 @@ conjunction with the Solaris linker. The GNU @command{as} versions included in Solaris 11.4, from GNU binutils 2.30.1 or newer (in @file{/usr/bin/gas} and @file{/usr/gnu/bin/as}), are known to work. The version from GNU -binutils 2.42 is known to work as well. Recent versions of the Solaris +binutils 2.44 is known to work as well. Recent versions of the Solaris assembler in @file{/usr/bin/as} work almost as well, though. To use GNU @command{as}, configure with the options @option{--with-gnu-as --with-as=@//usr/@/gnu/@/bin/@/as}. @@ -4870,9 +4870,12 @@ assembler in @file{/usr/bin/as} work almost as well, though. To use GNU For linking, the Solaris linker is preferred. If you want to use the GNU linker instead, the version in Solaris 11.4, from GNU binutils 2.30.1 or newer (in @file{/usr/gnu/bin/ld} and @file{/usr/bin/gld}), -works, as does the version from GNU binutils 2.42. However, it +works. However, it generally lacks platform specific features, so better stay with Solaris -@command{ld}. To use the LTO linker plugin +@command{ld}. When using the version from GNU binutils 2.44, there's +an important caveat: binutils @emph{must} be configured with +@code{CONFIG_SHELL=/bin/bash}, otherwise the linker's built-in linker +scripts get corrupted on x86. To use the LTO linker plugin (@option{-fuse-linker-plugin}) with GNU @command{ld}, GNU binutils @emph{must} be configured with @option{--enable-largefile}. To use Solaris @command{ld}, we recommend to configure with @@ -4894,7 +4897,7 @@ will be disabled if no appropriate version is found. Solaris work. In order to build the GNU Ada compiler, GNAT, a working GNAT is needed. -Since Solaris 11.4 SRU 39, GNAT 11, 12 or 13 is bundled in the +Since Solaris 11.4 SRU 39, GNAT 11, 12, 13 or 14 is bundled in the @code{developer/gcc/gcc-gnat} package. In order to build the GNU D compiler, GDC, a working @samp{libphobos} is
[gcc r15-8924] testsuite: i386: Require dfp support in gcc.target/i386/pr117946.c etc.
https://gcc.gnu.org/g:2b4122c4165e23365dfcacb7df3b59900fa8e644 commit r15-8924-g2b4122c4165e23365dfcacb7df3b59900fa8e644 Author: Rainer Orth Date: Wed Mar 26 11:46:57 2025 +0100 testsuite: i386: Require dfp support in gcc.target/i386/pr117946.c etc. Two tests FAIL on 64-bit Solaris/x86: FAIL: gcc.target/i386/pr117946.c (test for excess errors) FAIL: gcc.target/i386/pr118017.c (test for excess errors) The failure mode is the same in both cases: Excess errors: /vol/gcc/src/hg/master/local/gcc/testsuite/gcc.target/i386/pr117946.c:4:47: error: decimal floating-point not supported for this target Excess errors: /vol/gcc/src/hg/master/local/gcc/testsuite/gcc.target/i386/pr118017.c:6:47: error: decimal floating-point not supported for this target Fixed by requiring dfp support. Tested on i386-pc-solaris2.11 and x86_64-pc-linux-gnu. 2025-03-25 Rainer Orth gcc/testsuite: * gcc.target/i386/pr117946.c: Require dfp support. * gcc.target/i386/pr118017.c: Likewise. Use dg-require-effective-target for both this and int128. Diff: --- gcc/testsuite/gcc.target/i386/pr117946.c | 1 + gcc/testsuite/gcc.target/i386/pr118017.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/i386/pr117946.c b/gcc/testsuite/gcc.target/i386/pr117946.c index c4bf8254967c..b46921cedaa2 100644 --- a/gcc/testsuite/gcc.target/i386/pr117946.c +++ b/gcc/testsuite/gcc.target/i386/pr117946.c @@ -1,4 +1,5 @@ /* { dg-do compile { target { ! ia32 } } } */ +/* { dg-require-effective-target dfp } */ /* { dg-options "-O -favoid-store-forwarding -mavx10.1 -mprefer-avx128 --param=store-forwarding-max-distance=128 -Wno-psabi" } */ /* { dg-warning "'-mavx10.1' is aliased to 512 bit since GCC14.3 and GCC15.1 while '-mavx10.1-256' and '-mavx10.1-512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */ typedef __attribute__((__vector_size__ (64))) _Decimal32 V; diff --git a/gcc/testsuite/gcc.target/i386/pr118017.c b/gcc/testsuite/gcc.target/i386/pr118017.c index 28797a0ad73f..831ec6efb645 100644 --- a/gcc/testsuite/gcc.target/i386/pr118017.c +++ b/gcc/testsuite/gcc.target/i386/pr118017.c @@ -1,5 +1,7 @@ /* PR target/118017 */ -/* { dg-do compile { target int128 } } */ +/* { dg-do compile } */ +/* { dg-require-effective-target int128 } */ +/* { dg-require-effective-target dfp } */ /* { dg-options "-Og -frounding-math -mno-80387 -mno-mmx -Wno-psabi" } */ typedef __attribute__((__vector_size__ (64))) _Float128 F;
[gcc r15-8932] testsuite: i386: Fix c-c++-common/gomp/metadirective-device.c etc. with i?86 compiler
https://gcc.gnu.org/g:acc1ea0cbfb125658ca1d7488e5b1e5e3ae3dee2 commit r15-8932-gacc1ea0cbfb125658ca1d7488e5b1e5e3ae3dee2 Author: Rainer Orth Date: Wed Mar 26 14:52:19 2025 +0100 testsuite: i386: Fix c-c++-common/gomp/metadirective-device.c etc. with i?86 compiler Two new tests FAIL on both Solaris/x86 and Linux/i686 with a 32-bit-default compiler: FAIL: c-c++-common/gomp/metadirective-device.c -std=c++17 scan-tree-dump-not optimized "__builtin_GOMP_error" FAIL: c-c++-common/gomp/metadirective-device.c -std=c++26 scan-tree-dump-not optimized "__builtin_GOMP_error" FAIL: c-c++-common/gomp/metadirective-device.c -std=c++98 scan-tree-dump-not optimized "__builtin_GOMP_error" FAIL: c-c++-common/gomp/metadirective-target-device-1.c -std=c++17 scan-tree-dump-times optimized "GOMP_error" 0 FAIL: c-c++-common/gomp/metadirective-target-device-1.c -std=c++26 scan-tree-dump-times optimized "GOMP_error" 0 FAIL: c-c++-common/gomp/metadirective-target-device-1.c -std=c++98 scan-tree-dump-times optimized "GOMP_error" 0 FAIL: c-c++-common/gomp/metadirective-device.c scan-tree-dump-not optimized "__builtin_GOMP_error" FAIL: c-c++-common/gomp/metadirective-target-device-1.c scan-tree-dump-times optimized "GOMP_error" 0 They also FAIL on Linux/x86_64 with -mx32. The problem is two-fold: restricting a test to target x86_64-*-* is always wrong: an i?86-*-* compiler can produce 64-bit code with -m64 just as well, so it should always be both. In addition, the -mx32 failure shows that the test seems to be 64-bit only. To fix both issues, this patch uses the new x86 effective-target keyword and restricts the tests to lp64 instead of ! ia32. Tested on i386-pc-solaris2.11 and x86_64-pc-linux-gnu. 2025-03-25 Rainer Orth gcc/testsuite: * c-c++-common/gomp/metadirective-device.c (dg-additional-options): Use on all x86 targets. Restrict to lp64. * c-c++-common/gomp/metadirective-target-device-1.c: Likewise. Diff: --- gcc/testsuite/c-c++-common/gomp/metadirective-device.c | 2 +- gcc/testsuite/c-c++-common/gomp/metadirective-target-device-1.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/c-c++-common/gomp/metadirective-device.c b/gcc/testsuite/c-c++-common/gomp/metadirective-device.c index 380762477b07..d7f736d70b3e 100644 --- a/gcc/testsuite/c-c++-common/gomp/metadirective-device.c +++ b/gcc/testsuite/c-c++-common/gomp/metadirective-device.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-additional-options "-foffload=disable -fdump-tree-optimized" } */ -/* { dg-additional-options "-DDEVICE_ARCH=x86_64 -DDEVICE_ISA=sse -msse" { target { x86_64-*-* && { ! ia32 } } } } */ +/* { dg-additional-options "-DDEVICE_ARCH=x86_64 -DDEVICE_ISA=sse -msse" { target { x86 && lp64 } } } */ #include diff --git a/gcc/testsuite/c-c++-common/gomp/metadirective-target-device-1.c b/gcc/testsuite/c-c++-common/gomp/metadirective-target-device-1.c index 5d3a4c3ff9be..284f35f6d847 100644 --- a/gcc/testsuite/c-c++-common/gomp/metadirective-target-device-1.c +++ b/gcc/testsuite/c-c++-common/gomp/metadirective-target-device-1.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-additional-options "-fdump-tree-optimized" } */ -/* { dg-additional-options "-DDEVICE_ARCH=x86_64 -DDEVICE_ISA=mmx -mmmx" { target { x86_64-*-* && { ! ia32 } } } } */ +/* { dg-additional-options "-DDEVICE_ARCH=x86_64 -DDEVICE_ISA=mmx -mmmx" { target { x86 && lp64 } } } */ #include
[gcc r15-9411] libgcobol: Use strchr instead of index
https://gcc.gnu.org/g:45e93925beaf67ba99c67f78bd9771cacd316853 commit r15-9411-g45e93925beaf67ba99c67f78bd9771cacd316853 Author: Rainer Orth Date: Sun Apr 13 12:46:31 2025 +0200 libgcobol: Use strchr instead of index valconf.cc doesn't compile on Solaris: cobol/valconv.cc: In function ‘bool __gg__string_to_numeric_edited(char*, char*, int, int, const char*)’: cobol/valconv.cc:856:40: error: ‘index’ was not declared in this scope; did you mean ‘Rindex’? 856 | const char *decimal_location = index(dest, __gg__decimal_point); |^ |Rindex On Solaris, it's only declared in . While one could get that included, it's way easier to just use strchr as is already the case in other instances. Bootstrapped without regressions on amd64-pc-solaris2.11, sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu. 2025-04-08 Rainer Orth libgcobol: * valconv.cc (__gg__string_to_numeric_edited): Use strchr instead of index. Diff: --- libgcobol/valconv.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libgcobol/valconv.cc b/libgcobol/valconv.cc index 33d9a0dd1ffd..7e5830156c14 100644 --- a/libgcobol/valconv.cc +++ b/libgcobol/valconv.cc @@ -853,14 +853,14 @@ got_float: } else { -const char *decimal_location = index(dest, __gg__decimal_point); +const char *decimal_location = strchr(dest, __gg__decimal_point); if( !decimal_location ) { - decimal_location = index(dest, ascii_v); + decimal_location = strchr(dest, ascii_v); } if( !decimal_location ) { - decimal_location = index(dest, ascii_V); + decimal_location = strchr(dest, ascii_V); } if( !decimal_location ) {
[gcc r15-9412] cobol: Heed ASM_COMMENT_START
https://gcc.gnu.org/g:4b990a03bd4cd6cf13ae1b5ab6c965dadf404619 commit r15-9412-g4b990a03bd4cd6cf13ae1b5ab6c965dadf404619 Author: Rainer Orth Date: Sun Apr 13 12:50:19 2025 +0200 cobol: Heed ASM_COMMENT_START When building COBOL on Solaris/sparcv9 with the native assembler, many tests FAIL to assemble at -O0 like this: FAIL: cobol.dg/data1.cob -O0 (test for excess errors) Excess errors: /usr/ccs/bin/as: "/var/tmp//ccUduuqd.s", line 302: error: invalid character (0x50) /usr/ccs/bin/as: "/var/tmp//ccUduuqd.s", line 302: error: unknown opcode "PERFORM" /usr/ccs/bin/as: "/var/tmp//ccUduuqd.s", line 302: error: statement syntax The problem is that genapi.cc hardcodes # as assembler comment character, which isn't valid in general. Instead, this patch uses ASM_COMMENT_START. Bootstrapped without regressions on sparcv9-sun-solaris2.11, amd64-pc-solaris2.11, and x86_64-pc-linux-gnu. 2025-04-08 Rainer Orth gcc/cobol: * genapi.cc: Include target.h. (section_label): Use ASM_COMMENT_START. (paragraph_label): Likewise. (parser_perform): Likewise. (internal_perform_through): Likewise. (hijack_for_development): Likewise. Diff: --- gcc/cobol/genapi.cc | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/gcc/cobol/genapi.cc b/gcc/cobol/genapi.cc index 622387f01a5f..c8911f964d59 100644 --- a/gcc/cobol/genapi.cc +++ b/gcc/cobol/genapi.cc @@ -34,6 +34,7 @@ #include "tree-iterator.h" #include "stringpool.h" #include "diagnostic-core.h" +#include "target.h" #include "../../libgcobol/ec.h" #include "../../libgcobol/common-defs.h" @@ -2357,7 +2358,8 @@ section_label(struct cbl_proc_t *procedure) cbl_label_t *label = procedure->label; // The _initialize_program section isn't relevant. - char *psz = xasprintf("# SECTION %s in %s (%ld)", + char *psz = xasprintf("%s SECTION %s in %s (%ld)", +ASM_COMMENT_START, label->name, current_function->our_unmangled_name, deconflictor); @@ -2408,7 +2410,8 @@ paragraph_label(struct cbl_proc_t *procedure) char *psz1 = xasprintf( - "# PARAGRAPH %s of %s in %s (%ld)", + "%s PARAGRAPH %s of %s in %s (%ld)", + ASM_COMMENT_START, para_name ? para_name: "" , section_name ? section_name: "(null)" , current_function->our_unmangled_name ? current_function->our_unmangled_name: "" , @@ -3006,7 +3009,8 @@ parser_perform(cbl_label_t *label, bool suppress_nexting) para_name = label->name; sect_name = section_label->name; sprintf(ach, -"# PERFORM %s of %s of %s (%ld)", +"%s PERFORM %s of %s of %s (%ld)", +ASM_COMMENT_START, para_name, sect_name, program_name, @@ -3018,7 +3022,8 @@ parser_perform(cbl_label_t *label, bool suppress_nexting) { sect_name = label->name; sprintf(ach, -"# PERFORM %s of %s (%ld)", +"%s PERFORM %s of %s (%ld)", +ASM_COMMENT_START, sect_name, program_name, deconflictor); @@ -3170,8 +3175,8 @@ internal_perform_through( cbl_label_t *proc_1, pseudo_return_push(proc2, return_addr); // Create the code that will launch the first procedure - gg_insert_into_assembler("# PERFORM %s THROUGH %s", -proc_1->name, proc_2->name); + gg_insert_into_assembler("%s PERFORM %s THROUGH %s", +ASM_COMMENT_START, proc_1->name, proc_2->name); if( !suppress_nexting ) { @@ -13606,7 +13611,7 @@ hijack_for_development(const char *funcname) // Assume that funcname is lowercase with no hyphens enter_program_common(funcname, funcname); parser_display_literal("You have been hijacked by a program named \"dubner\""); - gg_insert_into_assembler("# HIJACKED DUBNER CODE START"); + gg_insert_into_assembler("%s HIJACKED DUBNER CODE START", ASM_COMMENT_START); for(int i=0; i<10; i++) { @@ -13619,7 +13624,7 @@ hijack_for_development(const char *funcname) NULL_TREE); } - gg_insert_into_assembler("# HIJACKED DUBNER CODE END"); + gg_insert_into_assembler("%s HIJACKED DUBNER CODE END", ASM_COMMENT_START); gg_return(0); }
[gcc r15-9569] cobol: Restrict COBOL to supported Linux arches [PR119217]
https://gcc.gnu.org/g:05941b93dfc19686d6b9c9ca5aecf3a6b28a15a5 commit r15-9569-g05941b93dfc19686d6b9c9ca5aecf3a6b28a15a5 Author: Rainer Orth Date: Tue Apr 22 13:47:17 2025 +0200 cobol: Restrict COBOL to supported Linux arches [PR119217] The COBOL frontend is currently built on all x86_64 and aarch64 hosts although the code contains some Linux/glibc specifics that break the build e.g. on Solaris/amd64. Tested on Linux/x86_64 and Solaris/amd64. 2025-03-17 Rainer Orth PR cobol/119217 * configure.ac: Restrict cobol to aarch64-*-linux*, x86_64-*-linux*. Fix indentation. * configure: Regenerate. (cherry picked from commit 6390fc86995fbd5239497cb9e1797a3af51d3936) Diff: --- configure| 19 --- configure.ac | 19 --- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/configure b/configure index bf574efd1d82..ebc44416b6c2 100755 --- a/configure +++ b/configure @@ -3571,31 +3571,28 @@ case ,${enable_languages}, in *,cobol,*) case ,${enable_languages}, in *,c++,*) - ;; +;; *) # We have an explicit cobol, but no c++. We need c++, because cobol # requires libstdc++ enable_languages="$enable_languages,c++" - ;; +;; esac ;; *) case "${target}" in - *-*-darwin*) -unsupported_languages="$unsupported_languages cobol" -;; - x86_64-*-*|aarch64-*-*) + aarch64-*-linux*|x86_64-*-linux*) ;; *-*-*) -unsupported_languages="$unsupported_languages cobol" -;; +unsupported_languages="$unsupported_languages cobol" +;; esac case "${host}" in - x86_64-*-*|aarch64-*-*) + aarch64-*-linux*|x86_64-*-linux*) ;; *-*-*) -unsupported_languages="$unsupported_languages cobol" -;; +unsupported_languages="$unsupported_languages cobol" +;; esac ;; esac diff --git a/configure.ac b/configure.ac index 3e120b027e99..730db3c14024 100644 --- a/configure.ac +++ b/configure.ac @@ -791,31 +791,28 @@ case ,${enable_languages}, in *,cobol,*) case ,${enable_languages}, in *,c++,*) - ;; +;; *) # We have an explicit cobol, but no c++. We need c++, because cobol # requires libstdc++ enable_languages="$enable_languages,c++" - ;; +;; esac ;; *) case "${target}" in - *-*-darwin*) -unsupported_languages="$unsupported_languages cobol" -;; - x86_64-*-*|aarch64-*-*) + aarch64-*-linux*|x86_64-*-linux*) ;; *-*-*) -unsupported_languages="$unsupported_languages cobol" -;; +unsupported_languages="$unsupported_languages cobol" +;; esac case "${host}" in - x86_64-*-*|aarch64-*-*) + aarch64-*-linux*|x86_64-*-linux*) ;; *-*-*) -unsupported_languages="$unsupported_languages cobol" -;; +unsupported_languages="$unsupported_languages cobol" +;; esac ;; esac
[gcc r16-81] cobol: Restrict COBOL to supported Linux arches [PR119217]
https://gcc.gnu.org/g:6390fc86995fbd5239497cb9e1797a3af51d3936 commit r16-81-g6390fc86995fbd5239497cb9e1797a3af51d3936 Author: Rainer Orth Date: Tue Apr 22 13:47:17 2025 +0200 cobol: Restrict COBOL to supported Linux arches [PR119217] The COBOL frontend is currently built on all x86_64 and aarch64 hosts although the code contains some Linux/glibc specifics that break the build e.g. on Solaris/amd64. Tested on Linux/x86_64 and Solaris/amd64. 2025-03-17 Rainer Orth PR cobol/119217 * configure.ac: Restrict cobol to aarch64-*-linux*, x86_64-*-linux*. Fix indentation. * configure: Regenerate. Diff: --- configure| 19 --- configure.ac | 19 --- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/configure b/configure index bf574efd1d82..ebc44416b6c2 100755 --- a/configure +++ b/configure @@ -3571,31 +3571,28 @@ case ,${enable_languages}, in *,cobol,*) case ,${enable_languages}, in *,c++,*) - ;; +;; *) # We have an explicit cobol, but no c++. We need c++, because cobol # requires libstdc++ enable_languages="$enable_languages,c++" - ;; +;; esac ;; *) case "${target}" in - *-*-darwin*) -unsupported_languages="$unsupported_languages cobol" -;; - x86_64-*-*|aarch64-*-*) + aarch64-*-linux*|x86_64-*-linux*) ;; *-*-*) -unsupported_languages="$unsupported_languages cobol" -;; +unsupported_languages="$unsupported_languages cobol" +;; esac case "${host}" in - x86_64-*-*|aarch64-*-*) + aarch64-*-linux*|x86_64-*-linux*) ;; *-*-*) -unsupported_languages="$unsupported_languages cobol" -;; +unsupported_languages="$unsupported_languages cobol" +;; esac ;; esac diff --git a/configure.ac b/configure.ac index 3e120b027e99..730db3c14024 100644 --- a/configure.ac +++ b/configure.ac @@ -791,31 +791,28 @@ case ,${enable_languages}, in *,cobol,*) case ,${enable_languages}, in *,c++,*) - ;; +;; *) # We have an explicit cobol, but no c++. We need c++, because cobol # requires libstdc++ enable_languages="$enable_languages,c++" - ;; +;; esac ;; *) case "${target}" in - *-*-darwin*) -unsupported_languages="$unsupported_languages cobol" -;; - x86_64-*-*|aarch64-*-*) + aarch64-*-linux*|x86_64-*-linux*) ;; *-*-*) -unsupported_languages="$unsupported_languages cobol" -;; +unsupported_languages="$unsupported_languages cobol" +;; esac case "${host}" in - x86_64-*-*|aarch64-*-*) + aarch64-*-linux*|x86_64-*-linux*) ;; *-*-*) -unsupported_languages="$unsupported_languages cobol" -;; +unsupported_languages="$unsupported_languages cobol" +;; esac ;; esac
[gcc r15-9565] libstdc++: Update Linux/sparc64 baselines for GCC 15.1
https://gcc.gnu.org/g:8e4665cf0f17e7c9fd9c6dd7432e0b91d8521c49 commit r15-9565-g8e4665cf0f17e7c9fd9c6dd7432e0b91d8521c49 Author: Rainer Orth Date: Tue Apr 22 11:38:19 2025 +0200 libstdc++: Update Linux/sparc64 baselines for GCC 15.1 The Linux/sparc64 libstdc++ baselines haven't been updated for years. This patch fixes that. Tested on sparc64-unknown-linux-gnu on both the gcc-15 branch and trunk. 2025-04-21 Rainer Orth libstdc++-v3: * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Regenerate. * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise. (cherry picked from commit 496b2ed86c41f50adac99e15c0d1a7c2d5428eba) Diff: --- .../post/sparc64-linux-gnu/32/baseline_symbols.txt | 214 +++- .../post/sparc64-linux-gnu/baseline_symbols.txt| 220 - 2 files changed, 432 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt b/libstdc++-v3/config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt index 94f5f5efaa59..689b11e4d9fc 100644 --- a/libstdc++-v3/config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt +++ b/libstdc++-v3/config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt @@ -199,6 +199,14 @@ FUNC:_ZNK11__gnu_debug16_Error_formatter17_M_get_max_lengthEv@@GLIBCXX_3.4.10 FUNC:_ZNK11__gnu_debug16_Error_formatter8_M_errorEv@@GLIBCXX_3.4 FUNC:_ZNK11__gnu_debug19_Safe_iterator_base11_M_singularEv@@GLIBCXX_3.4 FUNC:_ZNK11__gnu_debug19_Safe_iterator_base14_M_can_compareERKS0_@@GLIBCXX_3.4 +FUNC:_ZNKRSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4.29 +FUNC:_ZNKRSt7__cxx1115basic_stringbufIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4.29 +FUNC:_ZNKRSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4.29 +FUNC:_ZNKRSt7__cxx1118basic_stringstreamIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4.29 +FUNC:_ZNKRSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4.29 +FUNC:_ZNKRSt7__cxx1119basic_istringstreamIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4.29 +FUNC:_ZNKRSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4.29 +FUNC:_ZNKRSt7__cxx1119basic_ostringstreamIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4.29 FUNC:_ZNKSbIwSt11char_traitsIwESaIwEE11_M_disjunctEPKw@@GLIBCXX_3.4.5 FUNC:_ZNKSbIwSt11char_traitsIwESaIwEE11_M_disjunctEPKw@GLIBCXX_3.4 FUNC:_ZNKSbIwSt11char_traitsIwESaIwEE12find_last_ofEPKwj@@GLIBCXX_3.4 @@ -467,6 +475,7 @@ FUNC:_ZNKSt10moneypunctIwLb1EE8groupingEv@@GLIBCXX_3.4 FUNC:_ZNKSt10ostrstream5rdbufEv@@GLIBCXX_3.4 FUNC:_ZNKSt10ostrstream6pcountEv@@GLIBCXX_3.4 FUNC:_ZNKSt11__timepunctIcE15_M_am_pm_formatEPKc@@GLIBCXX_3.4 +FUNC:_ZNKSt11__timepunctIcE15_M_am_pm_formatEPPKc@@GLIBCXX_3.4.30 FUNC:_ZNKSt11__timepunctIcE15_M_date_formatsEPPKc@@GLIBCXX_3.4 FUNC:_ZNKSt11__timepunctIcE15_M_time_formatsEPPKc@@GLIBCXX_3.4 FUNC:_ZNKSt11__timepunctIcE19_M_days_abbreviatedEPPKc@@GLIBCXX_3.4 @@ -477,6 +486,7 @@ FUNC:_ZNKSt11__timepunctIcE7_M_daysEPPKc@@GLIBCXX_3.4 FUNC:_ZNKSt11__timepunctIcE8_M_am_pmEPPKc@@GLIBCXX_3.4 FUNC:_ZNKSt11__timepunctIcE9_M_monthsEPPKc@@GLIBCXX_3.4 FUNC:_ZNKSt11__timepunctIwE15_M_am_pm_formatEPKw@@GLIBCXX_3.4 +FUNC:_ZNKSt11__timepunctIwE15_M_am_pm_formatEPPKw@@GLIBCXX_3.4.30 FUNC:_ZNKSt11__timepunctIwE15_M_date_formatsEPPKw@@GLIBCXX_3.4 FUNC:_ZNKSt11__timepunctIwE15_M_time_formatsEPPKw@@GLIBCXX_3.4 FUNC:_ZNKSt11__timepunctIwE19_M_days_abbreviatedEPPKw@@GLIBCXX_3.4 @@ -487,7 +497,12 @@ FUNC:_ZNKSt11__timepunctIwE7_M_daysEPPKw@@GLIBCXX_3.4 FUNC:_ZNKSt11__timepunctIwE8_M_am_pmEPPKw@@GLIBCXX_3.4 FUNC:_ZNKSt11__timepunctIwE9_M_monthsEPPKw@@GLIBCXX_3.4 FUNC:_ZNKSt11logic_error4whatEv@@GLIBCXX_3.4 +FUNC:_ZNKSt12__basic_fileIcE13native_handleEv@@GLIBCXX_3.4.33 FUNC:_ZNKSt12__basic_fileIcE7is_openEv@@GLIBCXX_3.4 +FUNC:_ZNKSt12__shared_ptrINSt10filesystem28recursive_directory_iterator10_Dir_stackELN9__gnu_cxx12_Lock_policyE2EEcvbEv@@GLIBCXX_3.4.31 +FUNC:_ZNKSt12__shared_ptrINSt10filesystem4_DirELN9__gnu_cxx12_Lock_policyE2EEcvbEv@@GLIBCXX_3.4.31 +FUNC:_ZNKSt12__shared_ptrINSt10filesystem7__cxx1128recursive_directory_iterator10_Dir_stackELN9__gnu_cxx12_Lock_policyE2EEcvbEv@@GLIBCXX_3.4.31 +FUNC:_ZNKSt12__shared_ptrINSt10filesystem7__cxx114_DirELN9__gnu_cxx12_Lock_policyE2EEcvbEv@@GLIBCXX_3.4.31 FUNC:_ZNKSt12bad_weak_ptr4whatEv@@GLIBCXX_3.4.15 FUNC:_ZNKSt12future_error4whatEv@@GLIBCXX_3.4.14 FUNC:_ZNKSt12strstreambuf6pcountEv@@GLIBCXX_3.4 @@ -658,6 +673,13 @@ FUNC:_ZNKSt5ctypeIwE8do_widenEPKcS2_Pw@@GLIBCXX_3.4 FUNC:_ZNKSt5ctypeIwE8do_widenEc@@GLIBCXX_3.4 FUNC:_ZNKSt5ctypeIwE9do_narrowEPKwS2_cPc@@GLIBCXX_3.4 FUNC:_ZNKSt5ctypeIwE9do_narrowEwc@@GLIBCXX_3.4 +FUNC:_ZNKSt6chrono4tzdb11locate_zoneESt17basic_string_viewIcSt11char_traitsIcEE@@GLIBCXX_3.4.31 +FUNC:_ZNKSt6chrono4tzdb12current_zoneEv@@GLIBCXX_3.4.31 +FUNC:_ZNKSt6chrono9time_zone15_M_get_sys_infoENS_10time_pointI
[gcc r16-64] testsuite: Use sigsetjmp in gcc.misc-tests/gcov-31.c
https://gcc.gnu.org/g:ab41f146cf077b89cff8d86e2f698ed0fabd12d9 commit r16-64-gab41f146cf077b89cff8d86e2f698ed0fabd12d9 Author: Rainer Orth Date: Tue Apr 22 11:16:09 2025 +0200 testsuite: Use sigsetjmp in gcc.misc-tests/gcov-31.c The gcc.misc-tests/gcov-31.c test FAILs on Solaris and Darwin: FAIL: gcc.misc-tests/gcov-31.c (test for excess errors) Excess errors: /vol/gcc/src/hg/master/local/gcc/testsuite/gcc.misc-tests/gcov-31.c:23:5: error: implicit declaration of function '__sigsetjmp'; did you mean 'sigsetjmp'? [-Wimplicit-function-declaration] __sigsetjmp is a Linux/glibc implementation detail. Other tests just use sigsetjmp directly, so this patch follows suit. Tested on i386-pc-solaris2.11, sparc-sun-solaris2.11, x86_64-pc-linux-gnu, and x86_64-apple-darwin24.4.0. 2025-04-22 Rainer Orth gcc/testsuite: * gcc.misc-tests/gcov-31.c (run_pending_traps): Use sigsetjmp instead of __sigsetjmp. Diff: --- gcc/testsuite/gcc.misc-tests/gcov-31.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.misc-tests/gcov-31.c b/gcc/testsuite/gcc.misc-tests/gcov-31.c index 6c42d345abf1..5f060e980261 100644 --- a/gcc/testsuite/gcc.misc-tests/gcov-31.c +++ b/gcc/testsuite/gcc.misc-tests/gcov-31.c @@ -20,7 +20,7 @@ run_pending_traps () jump_to_top_level (2); for (sig = 1; sig < (64 + 1) ; sig++) -__sigsetjmp ((return_catch), 0); +sigsetjmp ((return_catch), 0); } /* Distilled from alsalib-1.2.11 pcm/pcm_route.c. */
[gcc r15-9562] testsuite: Use sigsetjmp in gcc.misc-tests/gcov-31.c
https://gcc.gnu.org/g:15dd2b595e6e150fc5fc31ba3fc27d471a1aa4f1 commit r15-9562-g15dd2b595e6e150fc5fc31ba3fc27d471a1aa4f1 Author: Rainer Orth Date: Tue Apr 22 11:16:09 2025 +0200 testsuite: Use sigsetjmp in gcc.misc-tests/gcov-31.c The gcc.misc-tests/gcov-31.c test FAILs on Solaris and Darwin: FAIL: gcc.misc-tests/gcov-31.c (test for excess errors) Excess errors: /vol/gcc/src/hg/master/local/gcc/testsuite/gcc.misc-tests/gcov-31.c:23:5: error: implicit declaration of function '__sigsetjmp'; did you mean 'sigsetjmp'? [-Wimplicit-function-declaration] __sigsetjmp is a Linux/glibc implementation detail. Other tests just use sigsetjmp directly, so this patch follows suit. Tested on i386-pc-solaris2.11, sparc-sun-solaris2.11, x86_64-pc-linux-gnu, and x86_64-apple-darwin24.4.0. 2025-04-22 Rainer Orth gcc/testsuite: * gcc.misc-tests/gcov-31.c (run_pending_traps): Use sigsetjmp instead of __sigsetjmp. (cherry picked from commit ab41f146cf077b89cff8d86e2f698ed0fabd12d9) Diff: --- gcc/testsuite/gcc.misc-tests/gcov-31.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.misc-tests/gcov-31.c b/gcc/testsuite/gcc.misc-tests/gcov-31.c index 6c42d345abf1..5f060e980261 100644 --- a/gcc/testsuite/gcc.misc-tests/gcov-31.c +++ b/gcc/testsuite/gcc.misc-tests/gcov-31.c @@ -20,7 +20,7 @@ run_pending_traps () jump_to_top_level (2); for (sig = 1; sig < (64 + 1) ; sig++) -__sigsetjmp ((return_catch), 0); +sigsetjmp ((return_catch), 0); } /* Distilled from alsalib-1.2.11 pcm/pcm_route.c. */
[gcc r16-96] testsuite: Skip g++.dg/eh/pr119507.C on Solaris/SPARC with as
https://gcc.gnu.org/g:0ccdedd571a54878df856948ee5d9cf5d28251dd commit r16-96-g0ccdedd571a54878df856948ee5d9cf5d28251dd Author: Rainer Orth Date: Wed Apr 23 13:09:40 2025 +0200 testsuite: Skip g++.dg/eh/pr119507.C on Solaris/SPARC with as The new g++.dg/eh/pr119507.C test FAILs on Solaris/SPARC with the native as: FAIL: g++.dg/eh/pr119507.C -std=gnu++17 scan-assembler-times .section[\\t ][^\\n]*.gcc_except_table._Z6comdatv 1 FAIL: g++.dg/eh/pr119507.C -std=gnu++17 scan-assembler-times .section[\\t ][^\\n]*.gcc_except_table._Z7comdat1v 1 FAIL: g++.dg/eh/pr119507.C -std=gnu++26 scan-assembler-times .section[\\t ][^\\n]*.gcc_except_table._Z6comdatv 1 FAIL: g++.dg/eh/pr119507.C -std=gnu++26 scan-assembler-times .section[\\t ][^\\n]*.gcc_except_table._Z7comdat1v 1 FAIL: g++.dg/eh/pr119507.C -std=gnu++98 scan-assembler-times .section[\\t ][^\\n]*.gcc_except_table._Z6comdatv 1 FAIL: g++.dg/eh/pr119507.C -std=gnu++98 scan-assembler-times .section[\\t ][^\\n]*.gcc_except_table._Z7comdat1v 1 This happens because the syntax for COMDAT sections is vastly different from the one used by gas. Rather than trying to handle this, this patch just skips the test. Tested on sparc-sun-solaris2.11 with both as and gas, i386-pc-solaris2.11, and x86_64-pc-linux-gnu. 2025-04-23 Rainer Orth gcc/testsuite: * g++.dg/eh/pr119507.C: Skip on sparc*-*-solaris2* && !gas. Diff: --- gcc/testsuite/g++.dg/eh/pr119507.C | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/testsuite/g++.dg/eh/pr119507.C b/gcc/testsuite/g++.dg/eh/pr119507.C index c68536ff671b..168779b96ca9 100644 --- a/gcc/testsuite/g++.dg/eh/pr119507.C +++ b/gcc/testsuite/g++.dg/eh/pr119507.C @@ -1,6 +1,8 @@ // { dg-do compile { target comdat_group } } // ARM EABI has its own exception handling data handling and does not use gcc_except_table // { dg-skip-if "!TARGET_EXCEPTION_DATA" { arm_eabi } } +// Solaris/SPARC as uses a widely different COMDAT section syntax. +// { dg-skip-if "Solaris/SPARC as syntax" { sparc*-*-solaris2* && { ! gas } } } // Force off function sections // Force on exceptions // { dg-options "-fno-function-sections -fexceptions" }
[gcc r15-9416] cobol: Avoid conflict with OVERFLOW in system headers [PR119217]
https://gcc.gnu.org/g:b0fb746bf2ff533eccf3a4ea7fbbc02a9a1f8b81 commit r15-9416-gb0fb746bf2ff533eccf3a4ea7fbbc02a9a1f8b81 Author: Rainer Orth Date: Sun Apr 13 22:48:44 2025 +0200 cobol: Avoid conflict with OVERFLOW in system headers [PR119217] parse.h causes the COBOL build to break on Solaris: cobol/parse.h:356:5: error: expected identifier before numeric constant 356 | OVERFLOW = 305,/* OVERFLOW */ | ^~~~ The problem is that has #define OVERFLOW3 To avoid the conflict, this patch renames OVERFLOW to OVERFLOW_kw, following existing praxis. Btw., token_names.h has a comment claiming // generated by ./token_names.h.gen ../../build/gcc/cobol/parse.h but there's no token_names.h.gen anywhere in the tree, so I've updated the file manually. Bootstrapped without regressions on amd64-pc-solaris2.11, sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu. 2025-04-08 Rainer Orth gcc/cobol: PR cobol/119217 * parse.y: Rename OVERFLOW to OVERFLOW_kw. Specify type name in %token directive. * scan.l: Likewise. * token_names.h: Regenerate. Co-Authored-By: Simon Sobisch Diff: --- gcc/cobol/parse.y | 12 ++-- gcc/cobol/scan.l| 6 +++--- gcc/cobol/token_names.h | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gcc/cobol/parse.y b/gcc/cobol/parse.y index d14cc3170b0e..55c26febe7eb 100644 --- a/gcc/cobol/parse.y +++ b/gcc/cobol/parse.y @@ -338,7 +338,7 @@ %token INVALID %token NUMBER NEGATIVE %token NUMSTR"numeric literal" -%token OVERFLOW +%token OVERFLOW_kw "OVERFLOW" %token COMPUTATIONAL %token PERFORM BACKWARD @@ -997,7 +997,7 @@ DELETE DISPLAY DIVIDE EVALUATE END EOP EXIT FILLER_kw GOBACK GOTO INITIALIZE INSPECT -MERGE MOVE MULTIPLY OPEN OVERFLOW PARAGRAPH PERFORM +MERGE MOVE MULTIPLY OPEN OVERFLOW_kw PARAGRAPH PERFORM READ RELEASE RETURN REWRITE SEARCH SET SELECT SORT SORT_MERGE STRING_kw STOP SUBTRACT START @@ -9488,7 +9488,7 @@ call_except:EXCEPTION std::swap($$.on_error, $$.not_error); } } -| OVERFLOW +| OVERFLOW_kw { $$.not_error = NULL; $$.on_error = label_add(LblArith, @@ -9496,7 +9496,7 @@ call_except:EXCEPTION if( !$$.on_error ) YYERROR; parser_call_exception( $$.on_error ); - assert( $1 == OVERFLOW || $1 == NOT ); + assert( $1 == OVERFLOW_kw || $1 == NOT ); if( $1 == NOT ) { std::swap($$.on_error, $$.not_error); } @@ -9751,7 +9751,7 @@ on_overflows: on_overflow[over] statements %prec ADD } ; -on_overflow:OVERFLOW +on_overflow:OVERFLOW_kw { $$.not_error = NULL; $$.on_error = label_add(LblString, @@ -9759,7 +9759,7 @@ on_overflow:OVERFLOW if( !$$.on_error ) YYERROR; parser_string_overflow( $$.on_error ); - assert( $1 == OVERFLOW || $1 == NOT ); + assert( $1 == OVERFLOW_kw || $1 == NOT ); if( $1 == NOT ) { std::swap($$.on_error, $$.not_error); } diff --git a/gcc/cobol/scan.l b/gcc/cobol/scan.l index 2cb7d3029f7c..e30634de9552 100644 --- a/gcc/cobol/scan.l +++ b/gcc/cobol/scan.l @@ -1543,9 +1543,9 @@ USE({SPC}FOR)?{ return USE; } NOT{SPC}(ON{SPC})?EXCEPTION { yylval.number = NOT; return EXCEPTION; } - (ON{SPC})?OVERFLOW { yylval.number = OVERFLOW; return OVERFLOW; } + (ON{SPC})?OVERFLOW { yylval.number = OVERFLOW_kw; return OVERFLOW_kw; } NOT{SPC}(ON{SPC})?OVERFLOW { - yylval.number = NOT; return OVERFLOW; } + yylval.number = NOT; return OVERFLOW_kw; } (AT{SPC})?END/[[:space:]]{ yylval.number = END; return END; } @@ -2312,7 +2312,7 @@ BASIS { yy_push_state(basis); return BASIS; } ORGANIZATION { return ORGANIZATION; } OTHER{ return OTHER; } OUTPUT { return OUTPUT; } - OVERFLOW { return OVERFLOW; } + OVERFLOW { return OVERFLOW_kw; } OVERRIDE { return OVERRIDE; } PACKED-DECIMAL { return PACKED_DECIMAL; } PAGE { return PAGE; } diff --git a/gcc/cobol/token_names.h b/gcc/cobol/
[gcc r15-9413] cobol: Avoid conflict with timespec_t in system headers [PR119217]
https://gcc.gnu.org/g:962c3d69f189f6fa451153faf3ce261c50d23d5a commit r15-9413-g962c3d69f189f6fa451153faf3ce261c50d23d5a Author: Rainer Orth Date: Sun Apr 13 12:53:54 2025 +0200 cobol: Avoid conflict with timespec_t in system headers [PR119217] util.cc doesn't compile on Solaris: /vol/gcc/src/hg/master/local/gcc/cobol/util.cc:2135:7: error: using typedef-name ‘timespec_t’ after ‘class’ 2135 | class timespec_t { | ^~ This happens because declares timespec_t itself. In fact, POSIX.1 reserves every *_t identifier, so this is benign. To avoid the problem, this patch renames the cobol timespec_t to cbl_timespec. Bootstrapped without regressions on amd64-pc-solaris2.11, sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu. 2025-04-08 Rainer Orth gcc/cobol: PR cobol/119217 * util.cc (class timespec_t): Rename to cbl_timespec. Diff: --- gcc/cobol/util.cc | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gcc/cobol/util.cc b/gcc/cobol/util.cc index f7b89b817ccc..f28fddf6c8f7 100644 --- a/gcc/cobol/util.cc +++ b/gcc/cobol/util.cc @@ -2099,20 +2099,20 @@ cobol_fileline_set( const char line[] ) { return file.name; } -class timespec_t { +class cbl_timespec { struct timespec now; public: - timespec_t() { + cbl_timespec() { clock_gettime(CLOCK_MONOTONIC, &now); } double ns() const { return now.tv_sec * 10 + now.tv_nsec; } - friend double operator-( const timespec_t& now, const timespec_t& then ); + friend double operator-( const cbl_timespec& now, const cbl_timespec& then ); }; double -operator-( const timespec_t& then, const timespec_t& now ) { +operator-( const cbl_timespec& then, const cbl_timespec& now ) { return (now.ns() - then.ns()) / 10; } @@ -2125,11 +2125,11 @@ parse_file( const char filename[] ) parser_enter_file(filename); - timespec_t start; + cbl_timespec start; int erc = yyparse(); - timespec_t finish; + cbl_timespec finish; double dt = finish - start; parser_leave_file();
[gcc r16-47] libgcobol: Check for struct tm tm_zone
https://gcc.gnu.org/g:a619a128c992b2121a862b8470960ae751d25db6 commit r16-47-ga619a128c992b2121a862b8470960ae751d25db6 Author: Rainer Orth Date: Mon Apr 21 15:59:14 2025 +0200 libgcobol: Check for struct tm tm_zone intrinsic.cc doesn't compile on Solaris: /vol/gcc/src/hg/master/cobol/libgcobol/intrinsic.cc: In function ‘void __gg__formatted_current_date(cblc_field_t*, cblc_field_t*, std::size_t, std::size_t)’: /vol/gcc/src/hg/master/cobol/libgcobol/intrinsic.cc:1480:6: error: ‘struct std::tm’ has no member named ‘tm_zone’; did you mean ‘tm_mon’? 1480 | tm.tm_zone = "GMT"; | ^~~ | tm_mon struct tm.tm_zone is new in POSIX.1-2024, thus cannot be assumed to be present universally. This patch checks for its presence and guards the use accordingly. Bootstrapped without regressions on amd64-pc-solaris2.11, sparcv9-sun-solaris2.11, and x86_64-pc-solaris2.11. 2025-04-08 Rainer Orth libgcobol: * configure.ac: Check for struct tm.tm_zone. * configure, config.h.in: Regenerate. * intrinsic.cc (__gg__formatted_current_date): Guard tm.tm_zone use with HAVE_STRUCT_TM_TM_ZONE. Diff: --- libgcobol/config.h.in | 3 ++ libgcobol/configure| 74 -- libgcobol/configure.ac | 3 ++ libgcobol/intrinsic.cc | 2 ++ 4 files changed, 80 insertions(+), 2 deletions(-) diff --git a/libgcobol/config.h.in b/libgcobol/config.h.in index 6a5327996167..fdf5e3e7dc1c 100644 --- a/libgcobol/config.h.in +++ b/libgcobol/config.h.in @@ -72,6 +72,9 @@ /* Define to 1 if you have the `strtof128' function. */ #undef HAVE_STRTOF128 +/* Define to 1 if `tm_zone' is a member of `struct tm'. */ +#undef HAVE_STRUCT_TM_TM_ZONE + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H diff --git a/libgcobol/configure b/libgcobol/configure index e83119d48f62..6821591852af 100755 --- a/libgcobol/configure +++ b/libgcobol/configure @@ -2449,6 +2449,63 @@ $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_func + +# ac_fn_cxx_check_member LINENO AGGR MEMBER VAR INCLUDES +# -- +# Tries to find if the field MEMBER exists in type AGGR, after including +# INCLUDES, setting cache variable VAR accordingly. +ac_fn_cxx_check_member () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if eval \${$4+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$4=yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$4=yes" +else + eval "$4=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$4 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_cxx_check_member cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. @@ -11693,7 +11750,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11696 "configure" +#line 11753 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11799,7 +11856,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11802 "configure" +#line 11859 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -17434,6 +17491,19 @@ $as_echo "#define USE_IEC_60559 1" >>confdefs.h +# struct tm tm_zone is a POSIX.1-2024 addition. +ac_fn_cxx_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include +" +if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_TM_TM_ZONE 1 +_ACEOF + + +fi + + if test "${multilib}" = "yes"; then multilib_arg="--enable-multilib" else diff --git a/libgcobol/configure.ac b/libgcobol/configure.ac index a1e95139299e..4bb690559ad9 100644 --- a/libgcobol/configure.ac +++ b/libgcobol/configure.ac @@ -231,6 +231,9 @@ elif test "${ENABLE_LIBQUADMATH_SUPPORT}" = "default" ; then fi LIBGCOBOL_CHECK_FLOAT128 +# struct tm tm_zone is a POSIX.1
[gcc r15-9174] testsuite: i386: Fix gcc.target/i386/pr82142?.c etc. on Solaris/x86
https://gcc.gnu.org/g:3f0d34f33d081680c2dca1c8792a9cd57a19148a commit r15-9174-g3f0d34f33d081680c2dca1c8792a9cd57a19148a Author: Rainer Orth Date: Thu Apr 3 08:52:47 2025 +0200 testsuite: i386: Fix gcc.target/i386/pr82142?.c etc. on Solaris/x86 Three tests FAIL on Solaris/x86 in similar ways: FAIL: gcc.target/i386/pr111673.c check-function-bodies advance FAIL: gcc.target/i386/pr82142a.c check-function-bodies assignzero FAIL: gcc.target/i386/pr82142b.c check-function-bodies assignzero All tests FAIL as is because they lack either or both of the .LFB0 label and the .cfi_startproc directive: * The 32-bit pr82142b.c test lacks both, whether as or gas is in use: as lacks full support for the cfi directives and the .LFB0 label is only emitted with -fasynchronous-unwind-tables. * The 64-bit tests pr111673.c and pr82142a.c already work with gas, but with as the cfi directives are again missing. In addition, the 32-bit test (pr82142b.c) still FAILs because 32-bit Solaris/x86 defaults to -mstackrealign. To fix all this, this patch adds -fasynchronous-unwind-tables -fdwarf2-cfi-asm to all tests to force the generation of both the .LFB0 label and .cfi_startproc (which is ok since they are compile tests). In addition, pr82142b.c is compiled with -mno-stackrealign to avoid platform differences. Tested on i386-pc-solaris2.11 and x86_64-pc-linux-gnu. 2025-03-25 Rainer Orth gcc/testsuite: * gcc.target/i386/pr111673.c (dg-options): Add -fasynchronous-unwind-tables -fdwarf2-cfi-asm. * gcc.target/i386/pr82142a.c: Likewise. * gcc.target/i386/pr82142b.c (dg-options): Add -mno-stackrealign -fasynchronous-unwind-tables -fdwarf2-cfi-asm. Diff: --- gcc/testsuite/gcc.target/i386/pr111673.c | 2 +- gcc/testsuite/gcc.target/i386/pr82142a.c | 2 +- gcc/testsuite/gcc.target/i386/pr82142b.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/testsuite/gcc.target/i386/pr111673.c b/gcc/testsuite/gcc.target/i386/pr111673.c index b9ceacf76512..0f08ba89ebda 100644 --- a/gcc/testsuite/gcc.target/i386/pr111673.c +++ b/gcc/testsuite/gcc.target/i386/pr111673.c @@ -1,5 +1,5 @@ /* { dg-do compile { target { ! ia32 } } } */ -/* { dg-options "-O2 -fdump-rtl-pro_and_epilogue" } */ +/* { dg-options "-O2 -fdump-rtl-pro_and_epilogue -fasynchronous-unwind-tables -fdwarf2-cfi-asm" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr82142a.c b/gcc/testsuite/gcc.target/i386/pr82142a.c index a40c038452cf..a536150267c5 100644 --- a/gcc/testsuite/gcc.target/i386/pr82142a.c +++ b/gcc/testsuite/gcc.target/i386/pr82142a.c @@ -1,5 +1,5 @@ /* { dg-do compile { target { ! ia32 } } } */ -/* { dg-options "-O2 -mno-avx -msse2" } */ +/* { dg-options "-O2 -mno-avx -msse2 -fasynchronous-unwind-tables -fdwarf2-cfi-asm" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^\t?\.} } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr82142b.c b/gcc/testsuite/gcc.target/i386/pr82142b.c index b1bf12d9a5b2..d18b7c466513 100644 --- a/gcc/testsuite/gcc.target/i386/pr82142b.c +++ b/gcc/testsuite/gcc.target/i386/pr82142b.c @@ -1,5 +1,5 @@ /* { dg-do compile { target ia32 } } */ -/* { dg-options "-O2 -mno-avx -msse2" } */ +/* { dg-options "-O2 -mno-avx -msse2 -mno-stackrealign -fasynchronous-unwind-tables -fdwarf2-cfi-asm" } */ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ /* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^\t?\.} } } */
[gcc r16-463] cobol: Don't require GLOB_BRACE etc. [PR119217]
https://gcc.gnu.org/g:aacaa3b13bca508cb6cb803d11cb942b2de8c0db commit r16-463-gaacaa3b13bca508cb6cb803d11cb942b2de8c0db Author: Rainer Orth Date: Thu May 8 09:21:45 2025 +0200 cobol: Don't require GLOB_BRACE etc. [PR119217] cdf-copy.cc doesn't compile on Solaris: /vol/gcc/src/hg/master/local/gcc/cobol/cdf-copy.cc: In member function ‘int copybook_elem_t::open_file(const char*, bool)’: /vol/gcc/src/hg/master/local/gcc/cobol/cdf-copy.cc:317:34: error: ‘GLOB_BRACE’ was not declared in this scope; did you mean ‘GLOB_ERR’? 317 | static int flags = GLOB_MARK | GLOB_BRACE | GLOB_TILDE; | ^~ | GLOB_ERR /vol/gcc/src/hg/master/local/gcc/cobol/cdf-copy.cc:317:47: error: ‘GLOB_TILDE’ was not declared in this scope 317 | static int flags = GLOB_MARK | GLOB_BRACE | GLOB_TILDE; | ^~ GLOB_BRACE and GLOB_TILDE are BSD extensions not in POSIX.1, thus missing on Solaris probably due to its System V heritage. This patch introduces fallback definitions to avoid this. Bootstrapped without regressions on amd64-pc-solaris2.11, sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu. 2025-04-08 Rainer Orth gcc/cobol: PR cobol/119217 * cdf-copy.cc (GLOB_BRACE): Define fallback. (GLOB_TILDE): Likewise. Diff: --- gcc/cobol/cdf-copy.cc | 10 ++ 1 file changed, 10 insertions(+) diff --git a/gcc/cobol/cdf-copy.cc b/gcc/cobol/cdf-copy.cc index 2e4bfb623d1e..059596c08f41 100644 --- a/gcc/cobol/cdf-copy.cc +++ b/gcc/cobol/cdf-copy.cc @@ -42,6 +42,16 @@ #include "util.h" #include "copybook.h" +// GLOB_BRACE and GLOB_TILDE are BSD extensions. Provide fallback definitions +// if necessary. +#ifndef GLOB_BRACE +#define GLOB_BRACE 0 +#endif + +#ifndef GLOB_TILDE +#define GLOB_TILDE 0 +#endif + #define COUNT_OF(X) (sizeof(X) / sizeof(X[0])) /*
[gcc r16-467] cobol: Initialize regmatch_t portably [PR119217]
https://gcc.gnu.org/g:12d6fa2a21140166181ae3be7711d60e62c569d7 commit r16-467-g12d6fa2a21140166181ae3be7711d60e62c569d7 Author: Rainer Orth Date: Thu May 8 09:29:56 2025 +0200 cobol: Initialize regmatch_t portably [PR119217] The dts.h initialization of regmatch_t currently breaks Solaris compilation: In file included from /vol/gcc/src/hg/master/local/gcc/cobol/lexio.h:208, from /vol/gcc/src/hg/master/local/gcc/cobol/lexio.cc:36: /vol/gcc/src/hg/master/local/gcc/cobol/dts.h: In constructor ‘dts::csub_match::csub_match(const char*)’: /vol/gcc/src/hg/master/local/gcc/cobol/dts.h:36:35: error: invalid conversion from ‘int’ to ‘const char*’ [-fpermissive] 36 | static regmatch_t empty = { -1, -1 }; | ^~ | | | int The problem is that Solaris regmatch_t has additional members before rm_so and rm_eo, as is always allowed by POSIX.1 typedef struct { const char *rm_sp, *rm_ep; /* Start pointer, end pointer */ regoff_trm_so, rm_eo; /* Start offset, end offset */ int rm_ss, rm_es; /* Used internally */ } regmatch_t; so the initialization doesn't do what it's supposed to do. Fixed by initializing the rm_so and rm_eo members explicitly. Bootstrapped without regressions on amd64-pc-solaris2.11, sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu. 2025-04-08 Rainer Orth gcc/cobol: PR cobol/119217 * dts.h (csub_match): Initialize rm_so, rm_eo fields explicitly. Diff: --- gcc/cobol/dts.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/cobol/dts.h b/gcc/cobol/dts.h index c345dc7e64ab..dfd7c4c24f71 100644 --- a/gcc/cobol/dts.h +++ b/gcc/cobol/dts.h @@ -33,7 +33,8 @@ namespace dts { : input(input) , first(NULL), second(NULL), matched(false) { - static regmatch_t empty = { -1, -1 }; + static regmatch_t empty; + empty.rm_so = empty.rm_eo = -1; regmatch_t& self(*this); self = empty; }
[gcc r16-469] cobol: Allow for undefined NAME_MAX [PR119217]
https://gcc.gnu.org/g:1df8fffba30bf4022dda762bf61acf16ac704c67 commit r16-469-g1df8fffba30bf4022dda762bf61acf16ac704c67 Author: Rainer Orth Date: Thu May 8 09:39:26 2025 +0200 cobol: Allow for undefined NAME_MAX [PR119217] All users of symbols.h fail to compile on Solaris: /vol/gcc/src/hg/master/local/gcc/cobol/symbols.h: At global scope: /vol/gcc/src/hg/master/local/gcc/cobol/symbols.h:1365:13: error: ‘NAME_MAX’ was not declared in this scope 1365 | char name[NAME_MAX]; | ^~~~ NAME_MAX being undefined is allowed by POSIX.1, actually: it's listed for under "Pathname Variable Values": A definition of one of the symbolic constants in the following list shall be omitted from the header on specific implementations where the corresponding value is equal to or greater than the stated minimum, but where the value can vary depending on the file to which it is applied. The actual value supported for a specific pathname shall be provided by the pathconf() function. As a hack, this patch provides a fallback definition to allow the build to finish. In fact it turned out that cbl_funtion_t.name isn't filename related and never set at all, so this patch serves as a mere stopgap fix to unbreak the build until a real solution can be figured out. Bootstrapped without regressions on amd64-pc-solaris2.11, sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu. 2025-04-08 Rainer Orth gcc/cobol: PR cobol/119217 * symbols.h (NAME_MAX): Define fallback. Diff: --- gcc/cobol/symbols.h | 5 + 1 file changed, 5 insertions(+) diff --git a/gcc/cobol/symbols.h b/gcc/cobol/symbols.h index adfa8d979b2f..50c5d48ff9f5 100644 --- a/gcc/cobol/symbols.h +++ b/gcc/cobol/symbols.h @@ -46,6 +46,11 @@ #include #include +// Provide fallback definition. +#ifndef NAME_MAX +#define NAME_MAX 255 +#endif + #define PICTURE_MAX 64 extern const char *numed_message;
[gcc r16-470] libgcobol: Heed --enable-libgcobol
https://gcc.gnu.org/g:fdd2374b87bd9d7f4c201c81875d77acaebb38cd commit r16-470-gfdd2374b87bd9d7f4c201c81875d77acaebb38cd Author: Rainer Orth Date: Thu May 8 09:42:42 2025 +0200 libgcobol: Heed --enable-libgcobol If some target isn't listed as supported in configure.tgt, --enable-libgcobol cannot override that. However, that's what should happen just like an explicit --enable-languages=cobol forces the frontend to be built. This patch, shamelessly adapted from libphobos, does just that. Tested on amd64-pc-solaris2.11, sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu. 2025-04-08 Rainer Orth libgcobol: * configure.ac: Handle --enable-libgcobol. Let it override LIBGCOBOL_SUPPORTED. * configure: Regenerate. Diff: --- libgcobol/configure| 26 +++--- libgcobol/configure.ac | 15 ++- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/libgcobol/configure b/libgcobol/configure index 06e7544822cb..5f319eedf538 100755 --- a/libgcobol/configure +++ b/libgcobol/configure @@ -788,6 +788,7 @@ enable_option_checking enable_multilib enable_maintainer_mode enable_silent_rules +enable_libgcobol enable_version_specific_runtime_libs enable_dependency_tracking enable_shared @@ -1438,6 +1439,7 @@ Optional Features: sometimes confusing) to the casual installer --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") + --enable-libgcobol Enable libgcobol --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory @@ -3723,6 +3725,16 @@ END fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-libgcobol" >&5 +$as_echo_n "checking for --enable-libgcobol... " >&6; } +# Check whether --enable-libgcobol was given. +if test "${enable_libgcobol+set}" = set; then : + enableval=$enable_libgcobol; +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_libgcobol" >&5 +$as_echo "$enable_libgcobol" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-version-specific-runtime-libs" >&5 $as_echo_n "checking for --enable-version-specific-runtime-libs... " >&6; } # Check whether --enable-version-specific-runtime-libs was given. @@ -11798,7 +11810,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11801 "configure" +#line 11813 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11904,7 +11916,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11907 "configure" +#line 11919 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -16795,6 +16807,14 @@ _ACEOF unset LIBGCOBOL_SUPPORTED . ${srcdir}/configure.tgt +# Decide if it's usable. +case $LIBGCOBOL_SUPPORTED:$enable_libgcobol in +*:no) use_libgcobol=no ;; +*:yes) use_libgcobol=yes ;; +yes:*) use_libgcobol=yes ;; +*:*) use_libgcobol=no ;; +esac + # - # __int128 support # - @@ -16887,7 +16907,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgcobol_cv_have_int128" >&5 $as_echo "$libgcobol_cv_have_int128" >&6; } - if test "x$LIBGCOBOL_SUPPORTED" = xyes && test "x$libgcobol_cv_have_int128" = xyes; then + if test "x$use_libgcobol" = xyes && test "x$libgcobol_cv_have_int128" = xyes; then BUILD_LIBGCOBOL_TRUE= BUILD_LIBGCOBOL_FALSE='#' else diff --git a/libgcobol/configure.ac b/libgcobol/configure.ac index e2547637209c..13326960515a 100644 --- a/libgcobol/configure.ac +++ b/libgcobol/configure.ac @@ -40,6 +40,11 @@ AM_MAINTAINER_MODE AM_INIT_AUTOMAKE([1.15.1 no-define foreign no-dist -Wall -Wno-portability]) +AC_MSG_CHECKING([for --enable-libgcobol]) +AC_ARG_ENABLE(libgcobol, + [AS_HELP_STRING([--enable-libgcobol], [Enable libgcobol])]) +AC_MSG_RESULT($enable_libgcobol) + AC_MSG_CHECKING([for --enable-version-specific-runtime-libs]) AC_ARG_ENABLE(version-specific-runtime-libs, AS_HELP_STRING([--enable-version-specific-runtime-libs], @@ -138,6 +143,14 @@ AC_CHECK_SIZEOF([void *]) unset LIBGCOBOL_SUPPORTED . ${srcdir}/configure.tgt +# Decide if it's usable. +case $LIBGCOBOL_SUPPORTED:$enable_libgcobol in +*:no) use_libgcobol=no ;; +*:yes) use_libgcobol=yes ;; +yes:*) use_libgcobol=yes ;; +*:*) use_libgcobol=no ;; +esac + # - # __int128 support # - @@ -164,7 +177,7 @@ AC_CACHE_CHECK([whether __int128 is supported], [libgcobol_cv_have_int128], libgcobol_cv_have_int128=no ])]) -AM_CONDITIONAL(BUILD_LIBGCOBOL, [test "x$LIBGCOBOL_SUPPORTED" = xyes && test "x$libgcobol_cv_have_int128" = xyes]) +AM_CONDITIONAL(BUILD_LIBGCOBOL, [test "x$use_libgcobol" = xyes
[gcc r16-588] libgcobol: Allow for lack of LOG_PERROR
https://gcc.gnu.org/g:90fee97d528e8447648c37f9df1daa3445e598bc commit r16-588-g90fee97d528e8447648c37f9df1daa3445e598bc Author: Rainer Orth Date: Tue May 13 09:43:48 2025 +0200 libgcobol: Allow for lack of LOG_PERROR The libgcobol build is broken again on Solaris: /vol/gcc/src/hg/master/local/libgcobol/libgcobol.cc: In function ‘void default_exception_handler(ec_type_t)’: /vol/gcc/src/hg/master/local/libgcobol/libgcobol.cc:11196:44: error: ‘LOG_PERROR’ was not declared in this scope; did you mean ‘LOG_ERR’? 11196 | static int priority = LOG_INFO, option = LOG_PERROR, facility = LOG_USER; |^~ |LOG_ERR /vol/gcc/src/hg/master/local/libgcobol/libgcobol.cc:11202:28: error: ‘facility’ was not declared in this scope 11202 | openlog(ident, option, facility); |^~~~ LOG_PERROR is a BSD extension not present on Solaris due to its System V heritage, and Linux syslog(3) documents: LOG_PERROR (Not in POSIX.1-2001 or POSIX.1-2008.) Also log the message to stderr. This patch provides a fallback definition, just the minimum to unbreak the build. Tested on amd64-pc-solaris2.11, sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu. 2025-05-12 Rainer Orth libgcobol: * libgcobol.cc [!LOG_PERROR] (LOG_PERROR): Provide fallback. Diff: --- libgcobol/libgcobol.cc | 5 + 1 file changed, 5 insertions(+) diff --git a/libgcobol/libgcobol.cc b/libgcobol/libgcobol.cc index 2de87cbfc487..56b1a7bf5876 100644 --- a/libgcobol/libgcobol.cc +++ b/libgcobol/libgcobol.cc @@ -75,6 +75,11 @@ #include "exceptl.h" +/* BSD extension. */ +#if !defined(LOG_PERROR) +#define LOG_PERROR 0 +#endif + #if !defined (HAVE_STRFROMF32) # if __FLT_MANT_DIG__ == 24 && __FLT_MAX_EXP__ == 128 static int
[gcc r16-850] doc: Fix implement-c.texi menu
https://gcc.gnu.org/g:57f6e6e25638a4f82083aa8f9fb2e258599bde99 commit r16-850-g57f6e6e25638a4f82083aa8f9fb2e258599bde99 Author: Rainer Orth Date: Fri May 23 19:40:16 2025 +0200 doc: Fix implement-c.texi menu commit fbb7f1cb5d3c8b7604e8f966e04330570de3e3ca Author: Joseph Myers Date: Thu May 22 21:39:37 2025 + c: Document C23 implementation-defined behavior broke bootstrap on Ubuntu 20.04 (which bundles makeinfo 6.7) and elsewhere with a local installation of makeinfo 6.6: gcc/doc/implement-c.texi:5: node `C Implementation' lacks menu item for `Constant expressions implementation' despite being its Up target gcc/doc/implement-c.texi:5: node `C Implementation' lacks menu item for `Types implementation' despite being its Up target Fixed by adding the missing menu entries. 2025-05-23 Rainer Orth gcc: * doc/implement-c.texi (C Implementation): Add missing menu items. Diff: --- gcc/doc/implement-c.texi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/doc/implement-c.texi b/gcc/doc/implement-c.texi index bdfb6342f0df..8f0c2ff4bf3c 100644 --- a/gcc/doc/implement-c.texi +++ b/gcc/doc/implement-c.texi @@ -30,10 +30,12 @@ a freestanding environment); refer to their documentation for details. * Characters implementation:: * Integers implementation:: * Floating point implementation:: +* Constant expressions implementation:: * Arrays and pointers implementation:: * Hints implementation:: * Structures unions enumerations and bit-fields implementation:: * Qualifiers implementation:: +* Types implementation:: * Declarators implementation:: * Statements implementation:: * Preprocessing directives implementation::