Commit Graph

227919 Commits

Author SHA1 Message Date
GCC Administrator
17b211ff3a Daily bump. 2026-03-27 00:16:23 +00:00
Paul Thomas
9780a52dff Fortran: Minor PDT cleanup and fix in gfc_simplify_exp [PR115315]
2026-03-26  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
	PR fortran/115315
	* decl.cc (insert_parameter_exprs): Make strcmp condition more
	concise.
	(gfc_get_pdt_instance): Use gf_replace_expr where possible and
	use return value of gfc_simplify_expr. Correct error in which
	params->expr was being simplified instead of c2->initializer.
	* expr.cc (gfc_simplify_expr): If the substring 'start' value
	is less than zero, it is clearly out of range and so return
	false.

gcc/testsuite/
	PR fortran/115315
	* gfortran.dg/pdt_90.f03: New test.
2026-03-26 18:50:13 +00:00
Prathamesh Kulkarni
97682f93d7 libgomp: Update tests to initialize full_data to 0.
libgomp/ChangeLog:
	PR libgomp/124123
	* testsuite/libgomp.c/pr122314.c (test): Initialize full_data
	to 0.
	* testsuite/libgomp.c/pr122356.c: Likewise.

Signed-off-by: Prathamesh Kulkarni <prathameshk@nvidia.com>
2026-03-26 17:17:21 +00:00
Jakub Jelinek
aa45de0c31 testsuite: Fix up another tcl 9 compatibility problem
TCL 9 removed case command which has been deprecated before.
https://core.tcl-lang.org/tcl/wiki?name=Migrating+scripts+to+Tcl+9
says "Replace case with switch" and switch has been working in TCL 8
just fine.

2026-03-26  Jakub Jelinek  <jakub@redhat.com>

	* lib/mike-gcc.exp (postbase): Use switch instead of case for
	TCL 9 compatibility.
	* lib/mike-g++.exp (postbase): Likewise.
2026-03-26 18:11:06 +01:00
Michal Jires
5eed9f5ddd lto/124289 - Correctly handle toplevel asm with -flto-partition=cache
This patch adds create_asm_partitions to cache partitioning
to prevent issues with non-renameable symbols (while partition
joining) and static asm symbols (while partition splitting).

All other relevant partitionings use create_asm_partitions.
This was not used in cache partitioning, because toplevel asm
could be in principle special handled in cache partitioning
with marginally better results, but I never implemented it.

	lto/124289

gcc/lto/ChangeLog:

	* lto-partition.cc (enum map1to1_content): New.
	(map_1_to_1): Use map1to1_content.
	(lto_1_to_1_map): Likewise.
	(create_asm_partitions): Likewise.
	(lto_max_map): Likewise.
	(lto_cache_map): Use create_asm_partitions.

gcc/testsuite/ChangeLog:

	* gcc.dg/lto/toplevel-extended-asm-2_0.c: Add padding to asm label.
	* gcc.dg/lto/toplevel-extended-asm-2_1.c: Add padding to asm label.
2026-03-26 17:11:23 +01:00
Joseph Myers
da7f40611e Regenerate gcc.pot
* gcc.pot: Regenerate.
2026-03-26 15:08:27 +00:00
Marek Polacek
007969e776 c++/reflection: ICE with substitute and undeduced auto [PR123613]
In substitute7.C we have

  template <typename T, auto ... Vs>
  constexpr auto construct_from = T{Vs...}; // #1
  struct Inner {};
  struct Outer { Inner m; };
  constexpr auto r = substitute(^^construct_from,
                               { ^^Outer, ^^construct_from<Inner> });

which crashes because the auto in #1 hadn't been deduced when we
called eval_can_substitute -> lookup_template_variable when processing
the substitute call.  We can call mark_used to resolve this, because
it has:

  if (undeduced_auto_decl (decl))
    maybe_instantiate_decl (decl);

and to make the json-parser.C test work, we have to do something
similar in eval_substitute, otherwise we crash due to another
undeduced auto.

	PR c++/123613

gcc/cp/ChangeLog:

	* reflect.cc (get_reflection): Call mark_used.
	(eval_can_substitute): Don't resolve_nondeduced_context here.
	(eval_substitute): Call lookup_and_finish_template_variable instead
	of lookup_template_variable and finish_template_variable.

gcc/testsuite/ChangeLog:

	* g++.dg/reflect/json-parser.C: New test.
	* g++.dg/reflect/substitute7.C: New test.
	* g++.dg/reflect/test.json: New test.

Reviewed-by: Jason Merrill <jason@redhat.com>
2026-03-26 09:33:21 -04:00
GCC Administrator
c6897e4c0a Daily bump. 2026-03-26 00:16:25 +00:00
Iain Sandoe
8b6e123e24 testsuite, c++: Skip contracts run tests for non-hosted.
These, in general, require hosted support.

gcc/testsuite/ChangeLog:

	* g++.dg/contracts/cpp26/basic.contract.eval.p11-observe.C: Skip
	for non-hosted.
	* g++.dg/contracts/cpp26/basic.contract.eval.p17-2.C: Likewise.
	* g++.dg/contracts/cpp26/basic.contract.eval.p17-3.C: Likewise.
	* g++.dg/contracts/cpp26/basic.contract.eval.p17-4.C: Likewise.
	* g++.dg/contracts/cpp26/basic.contract.eval.p17-5.C: Likewise.
	* g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF-post.C: Likewise.
	* g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF-pre.C: Likewise.
	* g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF2.C: Likewise.
	* g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF3.C: Likewise.
	* g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF4.C: Likewise.
	* g++.dg/contracts/cpp26/basic.contract.eval.p17.C: Likewise.
	* g++.dg/contracts/cpp26/basic.contract.eval.p4.C: Likewise.
	* g++.dg/contracts/cpp26/basic.contract.eval.p6.observe.C: Likewise.
	* g++.dg/contracts/cpp26/callerside-checks/callerside-checks-all.C: Likewise.
	* g++.dg/contracts/cpp26/callerside-checks/callerside-checks-none.C: Likewise.
	* g++.dg/contracts/cpp26/callerside-checks/callerside-checks-pre.C: Likewise.
	* g++.dg/contracts/cpp26/callerside-checks/freefunc-noexcept-post.C: Likewise.
	* g++.dg/contracts/cpp26/callerside-checks/freefunc-noexcept-pre.C: Likewise.
	* g++.dg/contracts/cpp26/contract-assert-run.C: Likewise.
	* g++.dg/contracts/cpp26/contract-violation-noexcept2.C: Likewise.
	* g++.dg/contracts/cpp26/debug-and-opt.C: Likewise.
	* g++.dg/contracts/cpp26/deferred1.C: Likewise.
	* g++.dg/contracts/cpp26/definition-checks/contract-assert-no-def-check.C: Likewise.
	* g++.dg/contracts/cpp26/dependent_contract.C: Likewise.
	* g++.dg/contracts/cpp26/empty-nt-param.C: Likewise.
	* g++.dg/contracts/cpp26/expr.prim.id.unqual.p7-3.C: Likewise.
	* g++.dg/contracts/cpp26/expr.prim.id.unqual.p7-4.C: Likewise.
	* g++.dg/contracts/cpp26/function-contract-specifier-seq.C: Likewise.
	* g++.dg/contracts/cpp26/name_mangling.C: Likewise.
	* g++.dg/contracts/cpp26/outline-checks/freefunc-noexcept-post.C: Likewise.
	* g++.dg/contracts/cpp26/outline-checks/freefunc-noexcept-pre.C: Likewise.
	* g++.dg/contracts/cpp26/outline-checks/func-noexcept-assert.C: Likewise.
	* g++.dg/contracts/cpp26/outline-checks/memberfunc-noexcept-post.C: Likewise.
	* g++.dg/contracts/cpp26/outline-checks/memberfunc-noexcept-pre.C: Likewise.
	* g++.dg/contracts/cpp26/src-loc-0.C: Likewise.
	* g++.dg/contracts/cpp26/src-loc-1.C: Likewise.
	* g++.dg/contracts/cpp26/src-loc-2.C: Likewise.
	* g++.dg/contracts/cpp26/throwing-violation-handler.cc: Likewise.
	* g++.dg/contracts/cpp26/vaargs.C: Likewise.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
2026-03-25 23:14:15 +00:00
Harald Anlauf
bbc4d2e15c Fortran: fix rank/shape check in interface checking [PR124567]
PR fortran/124567

gcc/fortran/ChangeLog:

	* interface.cc (gfc_check_dummy_characteristics): Split shape check
	into a separate check for rank and a check for shape, taking into
	account a corner case where the ambiguity between deferred shape
	and assumed shape has not been fully resolved at the time of
	checking.

gcc/testsuite/ChangeLog:

	* gfortran.dg/pr124567.f90: New test.
	* gfortran.dg/proc_decl_30.f90: Likewise.
2026-03-25 20:45:29 +01:00
Richard Biener
476d61a8cb gcov-profile/121074 - hold onto gcov file for less time
The following fixes the issue of two open gcov files at the
same time, one from -ftest-coverage, opened/closed by
coverage_init/finish and one from -fauto-profile, attempted
to be opened by pass_ipa_auto_profile.  The solution is
to open the coverage files only during pass_ipa_tree_profile.

	PR gcov-profile/121074
	* coverage.h (coverage_init_file): Declare.
	(coverage_finish_file): Likewise.
	* coverage.cc (coverage_init_file): New function, split
	out actual file opening and writing from ...
	(coverage_init): ... here.
	(coverage_finish_file): Likewise for file closing, from ...
	(coverage_finish): ... here.
	* tree-profile.cc (tree_profiling): Call coverage_init_file
	and coverage_finish_file here.
2026-03-25 17:09:41 +01:00
Richard Biener
415a00e0aa tree-optimization/124627 - inlining and elided debug stmts
When we fixup a noreturn call during inlining we can end up eliding
debug stmts, so we have to make sure to not re-instantiate SSA
operands on those later when processing all debug stmts.

	PR tree-optimization/124627
	* tree-inline.cc (copy_debug_stmts): Only copy debug
	stmts that are still in the IL.
2026-03-25 12:37:45 +01:00
Alexandre Oliva
aadc863a1f vxworks: fix gthr visibility issues
xtreme-header-8.C fails on VxWorks because various TU-local gthr
functions defined as static inline are referenced from libstdc++
symbols with global visibility.

C++ modules require those functions to be non-static inline, and other
gthr implementations adopt always_inline in C++.

Follow this practice in gthr-vxworks.h as well.


for  libgcc/ChangeLog

	* config/gthr-vxworks.h (__GTHREAD_ALWAYS_INLINE,
	__GTHREAD_INLINE): Copy from gthr-posix.h.  Replace static
	inline with __GTHREAD_INLINE.
2026-03-25 06:45:47 -03:00
Alexandre Oliva
e3419bfd79 testsuite: vxworks: gcov-32 misuses sigjmp_buf with setjmp
The test (presumably by mistake) calls setjmp with a sigjmp_buf.

Because of the sigsetjmp requirement, I'm replacing the setjmp call
with sigsetjmp, though the comments in the test explicitly mention
setjmp.


for  gcc/testsuite/ChangeLog

	* gcc.misc-tests/gcov-32.c: Replace mismatched setjmp call
	with sigsetjmp.
2026-03-25 06:45:43 -03:00
Alexandre Oliva
50689b4f43 testsuite: arm: pr115485 requires fpic
This C++ test uses -fPIE without checking for PIC support.  Add it.


for  gcc/testsuite/ChangeLog

	* g++.target/arm/pr115485.C: Require fpic.
2026-03-25 06:45:38 -03:00
Alexandre Oliva
9bdc45a302 [testsuite] [vxworks] add -gno-strict-dwarf to pr111409.c
The expected macro debug information is not issued with
-gstrict-dwarf, and ports such as vxworks default to that.  Allow
non-strict dwarf for the test.

pr115066.c needs the same problem adjustment.


for  gcc/testsuite/ChangeLog

	* gcc.dg/pr111409.c: Allow non-strict dwarf.
	* gcc.dg/pr115066.c: Likewise.
2026-03-25 06:45:35 -03:00
Alexandre Oliva
47d73858d1 testsuite: arm: add -mno-long-calls to epilog-1
ARM test epilog-1.c needs -mno-long-calls to match the expected asm
outputs on targets that default to -mlong-calls.


for  gcc/testsuite/ChangeLog

	* gcc.target/arm/epilog-1.c: Add -mno-long-calls.
2026-03-25 06:45:30 -03:00
Alexandre Oliva
9ae1494deb testsuite: vect: slp-mask-store-1 accesses past the end of flags
The loop invokes undefined behavior: the flags array runs 0..31, but
so does the iterator i, thus the accesses to pairs therein run 0..63.
If we're lucky we find all zeros and don't mess with anything else,
but if we find any nonzero out-of-range flags, we'll end up scribbling
out of range onto x, that runs 0..15.

Surely the iterator wasn't meant to go up to 32.  If it goes up to 16,
as proposed herein, we only access flags in range, and since its
second half is all zeros, we only access x in range as well.


for  gcc/testsuite/ChangeLog

	* gcc.dg/vect/slp-mask-store-1.c (foo): Fix iteration range.
2026-03-25 06:45:25 -03:00
Alexandre Oliva
1826e69595 libstdc++-v3: testsuite: lengthen stop_request wait_until timeout
30_threads/condition_variable_any/stop_token/wait_on.cc's
test_wait_until occasionally fails on vxworks under very high load, in
a way that suggests wait_until times out before the main thread
requests it to stop.  Extend the timeouts to make more room for the
stop request.


for  libstdc++-v3/ChangeLog

	* testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc
	(test_wait_until): Extend the timeout for a stop request.
2026-03-25 06:45:19 -03:00
Alexandre Oliva
d24daecf24 [testsuite] require sysconf for vect-early-break_109-pr113588.c
The test calls sysconf but it doesn't require it as it should.

vect-early-break_130.c needs that treatment as well.


for  gcc/testsuite/ChangeLog

	* gcc.dg/vect/vect-early-break_109-pr113588.c: Require sysconf.
	* gcc.dg/vect/vect-early-break_130.c: Likewise.
2026-03-25 06:45:14 -03:00
Alexandre Oliva
e6a0e0a8a4 [testsuite] [ppc] expect vectorization in gen-vect-11c.c with lp64
The first loop in main gets stores "vectorized" on powerpc64 into
full-word stores, even without any vector instruction support, so the
test's expectation of no loop vectorization is not met.


for  gcc/testsuite/ChangeLog

	* gcc.dg/tree-ssa/gen-vect-11c.c: xfail the test for no
	vectorization on powerpc*-*-* && lp64.
2026-03-25 06:45:09 -03:00
Alexandre Oliva
77b0d38075 testsuite: vect: adjust vect-early-break_137-pr121190
The test needs to require sysconf for _SC_PAGESIZE, and it shouldn't
override the vect.exp-set vect-enabling options by using dg-options.


for  gcc/testsuite/ChangeLog

	* gcc.dg/vect/vect-early-break_137-pr121190.c: Require sysconf.
	Don't override vect.exp options.
2026-03-25 06:45:04 -03:00
Alexandre Oliva
fa47b64d6e testsuite: vxworks: xfail thread_local-order2 execution
VxWorks doesn't support __cxa_thread_atexit, so XFAIL the test that
relies on it for correct destruction order of thread-local objects.


for  gcc/testsuite/ChangeLog

	* g++.dg/tls/thread_local-order2.C: XFAIL on VxWorks.
2026-03-25 06:44:59 -03:00
Alexandre Oliva
f4fae14124 c++: arm -Wdeprecated fails for ctors
ARM requires C++ constructors to return the 'this' pointer.  Setting
that up disables warnings at the ctor location for Wuse_after_free.
Unfortunately, the nowarn_spec_t mapping maps both Wuse_after_free and
Wdeprecated_declaration to the same NW_OTHER catchall group, so we
don't get deprecation warnings for constructors, and libstdc++'s
20_util/pair/cons/99957.cc fails.

We may want to consider also explicitly mapping Wdeprecated and
Wdeprecated_declaration to another group, but this minimal change
appears to be enough.


for  gcc/ChangeLog

	* gcc-diagnostic-spec.cc (nowarn_spec_t::nowarn_spec_t): Map
	OPT_Wuse_after_free like OPT_Wuse_after_free_.
2026-03-25 06:44:55 -03:00
Paul Thomas
74732d7434 Fortran: Invalid error in bounds check of elemental dim [PR119273]
2026-03-25  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
	PR fortran/119273
	* trans-array.cc (expr_contains_impure_fcn): New function.
	(gfc_expr_contains_impure_fcn): New function calling above fcn.
	(array_bound_check_elemental): Add indexse pre-block to se pre.
	Warn if the index expression contains a function not declared
	to be pure.

gcc/testsuite/
	PR fortran/119273
	* gfortran.dg/pr119273.f90: New test.
2026-03-25 09:28:15 +00:00
Rainer Orth
e2d8051f40 i386: Fix gcc.target/i386/pr61599-1.c on Solaris/x86
The gcc.target/i386/pr61599-1.c test has been FAILing on Solaris/x86
with the native assembler for a long time:

FAIL: gcc.target/i386/pr61599-1.c (test for excess errors)
UNRESOLVED: gcc.target/i386/pr61599-1.c compilation failed to produce executable

Excess errors:
ld: fatal: relocation error: R_AMD64_PC32: file gcc/amd64/crtbegin.o: symbol completed.0: value 0xc01004b9 does not fit
ld: fatal: relocation error: R_AMD64_PC32: file gcc/amd64/crtbegin.o: symbol completed.0: value 0xc01004a7 does not fit

Looking closer, pr61599-1.o is 3.1 GB large with the native assembler.
Comparing the section headers between as and gas, one sees the difference:

With as there's

Section Header[3]:  sh_name: .lbss.a
    sh_addr:      0                   sh_flags:   [ SHF_WRITE SHF_ALLOC ]
    sh_size:      0x40000000          sh_type:    [ SHT_PROGBITS ]

while gas creates

Section Header[5]:  sh_name: .lbss.a
    sh_addr:      0                   sh_flags:   [ SHF_WRITE SHF_ALLOC SHF_AMD6
4_LARGE ]

    sh_size:      0x40000000          sh_type:    [ SHT_NOBITS ]

The use of SHT_PROGBITS by as is due to gcc not emitting @nobits for the
.lbss sections, so as uses the default section type:

	.section	.lbss.a,"aw"

For .bss, we get this instead:

	.section	.bss.a,"aw",@nobits

as usually doesn't care about section names, but relies on the compiler
to correctly emit section types and flags.

This happens because x86_64_elf_section_type_flags first calls
default_section_type_flags, which doesn't know about .lbss and sets
SECTION_NOTYPE.  When default_elf_asm_named_section later emits the
.section directive, @nobits is omitted even though SECTION_BSS has been
added by then.

To work around this, this patch clears SECTION_NOTYPE when SECTION_BSS
is set.

Similarly, the current assembler output relies on the assembler to set
the SHF_X86_64_LARGE section flag based on the section name.  While gcc
emits the necessary flag letter ('l' with gas, 'h' with Solaris as) for
plain .lbss sections, it fails to do so for .lbss.*.

This patch adresses this by moving the gas definition of
MACH_DEP_SECTION_ASM_FLAG to i386/x86_64.h so it's picked up by all
64-bit x86 targets.  It also extends ix86_in_large_data_p to also
consider .lbss.* etc. sections as large data sections, not just .lbss,
matching x86_64_elf_section_type_flags.

pr61599-1.o is identical without and with the section letter and section
type specifiec.

Bootstrapped without regressions on i386-pc-solaris2.11,
amd64-pc-solaris2.11, x86_64-pc-linux-gnu, and i686-pc-linux-gnu.

2026-03-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc:
	* config/i386/i386.cc (ix86_in_large_data_p): Check for .lbss etc.
	(x86_64_elf_section_type_flags): Clear SECTION_NOTYPE for .lbss etc.
	* config/i386/x86-64.h (MACH_DEP_SECTION_ASM_FLAG): Define.
	* config/i386/sol2.h [HAVE_SOLARIS_AS]
	(MACH_DEP_SECTION_ASM_FLAG): Redefine as 'h'.

	gcc/testsuite:
	* gcc.target/i386/pr61599-1.c (dg-options): Add -save-temps.
	(scan-assembler-times): Check for @nobits.
2026-03-25 09:44:54 +01:00
Kugan Vivekanandarajah
d7a1a13c72 [PATCH] Use next_speculative_call_target in get_next_speculative_id
This patch uses next_speculative_call_target in get_next_speculative_id
As the specualtive_id should be unique only within on speculative id
block.

gcc/ChangeLog:

	* cgraph.cc (cgraph_edge::get_next_speculative_id): Use
	next_speculative_call_target in get_next_speculative_id.

Signed-off-by: Kugan Vivekanandarajah <kvivekananda@nvidia.com>
2026-03-25 18:25:16 +11:00
GCC Administrator
d95716dac9 Daily bump. 2026-03-25 00:16:24 +00:00
Vladimir N. Makarov
4eef89cc39 [PR124572, LRA]: Deal with generation of reload insns during elimination
It was assumed that elimination in LRA does not generate new reload
insns.  In the testcase the elimination of SFP subreg generates reload
insn of the subreg and this insn is added at end of RTL code.  The insn
is also skipped for necessary processing.  This results in ICE.  The patch
checks creation of reloads insn during elimination, insert them in the right
place, and add them for later processing.

gcc/ChangeLog:

	PR rtl-optimization/124572
	* lra-eliminations.cc (lra_eliminate): Push new reload insns for
	eliminations in insns.

gcc/testsuite/ChangeLog:

	PR rtl-optimization/124572
	* gcc.target/aarch64/pr124572.c: New.
2026-03-24 15:54:57 -04:00
Rainer Orth
5cd3889135 testsuite: Only xfail g++.dg/coroutines/pr110872.C on 64-bit targets [PR124326]
The g++.dg/coroutines/pr110872.C test XPASSes on many 32-bit targets:

XPASS: g++.dg/coroutines/pr110872.C  -std=c++26 (internal compiler error)

Darwin/x86 is the exception where the test ICEs for both 32 and 64-bit.

Tested on i386-pc-solaris2.11, sparc-sun-solaris2.11,
x86_64-apple-darwin17.7.0, and x86_64-pc-linux-gnu.

2026-03-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc/testsuite:
	PR testsuite/124326
	* g++.dg/coroutines/pr110872.C (dg-ice): Restrict to 64-bit
	targets or Darwin.
2026-03-24 16:46:20 +01:00
Rainer Orth
6482929839 testsuite: Fix g++.dg/warn/Wstringop-overflow-6.C on Solaris [PR123135]
The g++.dg/warn/Wstringop-overflow-6.C test FAILs on Solaris:

FAIL: g++.dg/warn/Wstringop-overflow-6.C  -std=gnu++11 (test for excess errors)

with

Excess errors:
/usr/include/iso/math_c99.h:361: warning: ignoring '#pragma does_not_read_global_data ' [-Wunknown-pragmas]

and

/usr/include/errno.h:93: warning: ignoring '#pragma no_side_effect ' [-Wunknown-pragmas]

Those pragmas are specific to the Studio compilers but unrelated to the
testcase, so this patch disables the warnings on Solaris.

Tested on i386-pc-solaris2.11, sparc-sun-solaris2.11, and
x86_64-pc-linux-gnu.

2026-03-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc/testsuite:
	PR testsuite/123135
	* g++.dg/warn/Wstringop-overflow-6.C (dg-additional-options): Add
	-Wno-unknown-pragmas on Solaris.
2026-03-24 16:43:16 +01:00
Rainer Orth
14146f6a36 libgomp: Fix libgomp.fortran/uses_allocators-7.f90 [PR123177]
The libgomp.fortran/uses_allocators-7.f90 test has been UNRESOLVED from
the beginning:

UNRESOLVED: libgomp.fortran/uses_allocators-7.f90   -O  compilation failed to produce executable

The compilation is expected to fail, so this must be changed into a
compile test.

Tested on i386-pc-solaris2.11.

2026-03-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	libgomp:
	PR libgomp/123177
	* testsuite/libgomp.fortran/uses_allocators-7.f90: Change to
	compile test.
	(dg-message): Adjust line numbers.
	(dg-bogus): Likewise.
2026-03-24 16:40:12 +01:00
Torbjörn SVENSSON
ec6c374be2 testsuite: add -fno-short-enums to have predictable mangling
Without -fno-short-enums, some targets might have a different size for
enums than regular `int`, resulting in unpredictable name mangling.

gcc/testsuite/ChangeLog:

	* g++.dg/reflect/mangle1.C: Add -fno-short-enums.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
2026-03-24 14:52:32 +01:00
Torbjörn SVENSSON
56f8f66b1d testsuite: add require effective target fopenmp to modules/omp-4_*.C
gcc/testsuite/ChangeLog:

	* g++.dg/modules/omp-4_a.C: Add missing require effective target
	fopenmp.
	* g++.dg/modules/omp-4_b.C: Likewise.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
2026-03-24 14:52:32 +01:00
Christopher Bazley
366d97f942 doc: Fix 'RTL SSA Access Lists' description
In the 'RTL SSA Access Lists' subsection of
GCC's documentation, an example of code with
an 'if'...'else' structure is given. The
given list of the full list of accesses is
said to include "use of the ebb4's R phi
definition of R by B". That cannot be true
because B is in the first substatement of the
'if' statement, whereas ebb4 is the second
substatement. First and second substatements
are mutually exclusive: there is no path to
B that goes through the degenerate phi node
of ebb4.

It looks as though D was intended, not B.

gcc/ChangeLog:

	* doc/rtl.texi: Fix example of the SSA form.
2026-03-24 12:16:42 +00:00
Alfie Richards
92d57f00ef vect: Move previously unreachable strided access guard.
Previously code for the error message about VMAT_ELEMENTWISE and
VMAT_STRIDED_SLP could never be reached because it was dominated by
the logic for the unsupported access type for masked load.

This change reverses the two checks so that the more specific case
comes first.

gcc/ChangeLog:

	* tree-vect-stmts.cc (vectorizable_load): Swap order of failure
	message checks.
2026-03-24 11:35:47 +00:00
Torbjörn SVENSSON
9873a35f52 testsuite: add require effective target fopenmp to pr124454-1.c
gcc/testsuite/ChangeLog:

	* gcc.dg/pr124454-1.c: Add missing require effective target
	fopenmp.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
2026-03-24 10:44:13 +01:00
Martin Uecker
c4fe970775 c: Mark derived types variably-modified after struct/union completion [PR123424]
When structure types are completed and are variably-modified, we
need to make sure that C_TYPE_VARIABLY_MODIFIED is updated also
for derived types.  For derived types which are not updated and
remain TYPE_STRUCTURAL_EQUALITY_P, we do recursion when checking
the bit instead.  This change then fixes also a weird corner
case when forming composite types of mutually recursively
defined types.

We do not update other structure or union type that end up
with variably modified pointers, as it is not clear this is
needed and also needs further analysis.

	PR c/123424

gcc/c/ChangeLog:
	* c-decl.cc (c_update_variably_modified): New function.
	(finish_struct): Call c_update_variably_modified.
	* c-tree.h (c_variably_modified_p): Recurse if necessary.
	* c-typeck.cc (c_verify_type): Update.
	(c_set_type_bits): Use c_variably_modified_p.
	(mark_decl_used): Dito.
	(build_function_call_vec): Dito.
	(c_build_qualified_type): Dito.
	* c-objc-common.cc (c_var_p): Dito.

gcc/testsuite/ChangeLog:
	* gcc.dg/gnu23-tag-composite-7.c: New test.
	* gcc.dg/gnu23-varmod-3.c: New test.
	* gcc.dg/pr123424.c: New test.
2026-03-24 06:52:40 +01:00
GCC Administrator
d3445c43b0 Daily bump. 2026-03-24 00:16:23 +00:00
Eric Botcazou
6513196ea1 Ada: Fix crash on instantiation in separate package body
This is an old regression present on all active branches for a quite unusual
setup where a generic package is declared and instantiated in a subunit, and
which comes from a thinko in the Has_Body.Find_Body routine of Sem_Elab.

gcc/ada/
	PR ada/124607
	* sem_elab.adb (Has_Body.Find_Body): Fix thinko.

gcc/testsuite/
	* gnat.dg/generic_inst20.ads, gnat.dg/generic_inst20.adb: New test.
	* gnat.dg/generic_inst20-sub.adb: New helper.
2026-03-23 22:05:12 +01:00
Eric Botcazou
2f430c7e1a Ada: Fix instantiation failure with formal array type after formal package
This comes from a confusion in the mapping maintained between formal and
actual parameters of the instantiation caused by the equivalent mapping
maintained for the instantiation of the formal package.  The change just
removes the offending lines, which do not seem to serve any useful purpose.

gcc/ada/
	PR ada/124606
	* sem_ch12.adb (Find_Actual_Type): Rename formal parameter.
	(Map_Formal_Package_Entities): Do not register base types.

gcc/testsuite/
	* gnat.dg/generic_inst19.adb: New test.
2026-03-23 22:05:11 +01:00
Joseph Myers
3024a5ded3 Update gcc sv.po
* sv.po: Update.
2026-03-23 20:36:32 +00:00
Stefan Weigl-Bosker
f7cf25774c gcc: Fix "uselful" and "directivers" typos in comment
gcc/ChangeLog:

	* omp-general.h: Fix typos.
2026-03-23 18:18:22 +01:00
Richard Biener
d6f223ad41 tree-optimization/124599 - compile-time regression with PRE
The following fixes the reported compile-time regression after the
PRE change to properly track reference expressions in r16-8128-g5f1024922d3f67.
The issue is that the VN reference lookup code performs alias walks and
those are made quadratic for the transition from one VUSE to another
when that involves multiple translation steps.  The error was to make
the VUSE part of the expression, but it is really part of the value.
So the following patch reverts this change, fixing the issue.

	PR tree-optimization/124599
	* tree-ssa-pre.cc (compute_avail): Make the VUSE in the
	PRE reference expression part of the value again.
	(phi_translate_1): Likewise.
2026-03-23 12:46:40 +01:00
Jakub Jelinek
74f2bb6be7 configure: Further {gas,gnu_ld}{,_flag} fixes [PR124547]
Andreas mentioned in the PR that {gas,gnu_ld}_flag vars should be only
ever used in configure.ac before . config.gcc and I agree with that.
config.gcc initializes the {gas,gnu_ld} vars to {gas,gnu_ld}_flag, then
for some triplets has gas=yes and/or gnu_ld=yes and in some rare cases
(for targets which basically require people to use --with{,out}-gnu-{as,ld})
x$gas = xyes/x$gnu_ld = xyes/x$gas != xyes/x$gnu_ld != xyes tests.

So, the following patch uses just what comes up from config.gcc from that
point onward (so, the user requested setting (which can be now empty if
unknown) possibly overridden by triplet).  With the exception of solaris
(which does what it did before PR124547, i.e. always probe linker and
assembler) and the fallback case of checking gas/ld version if still unset
(but that in this patch only affects targets which don't override it
by triplet, i.e. targets which typically have a choice between GNU binutils
and some proprietary ones).

2026-03-23  Jakub Jelinek  <jakub@redhat.com>

	PR bootstrap/124547
	* configure.ac: After config.gcc inclusion use or set only gas instead
	of gas_flag and gnu_ld instead of gnu_ld_flag.
	* config.gcc: Document possibility of gas_flag or gnu_ld_flag being
	empty.
	* acinclude.m4 (gcc_GAS_FLAGS): Use gas instead of gas_flag.
	(gcc_AC_INITFINI_ARRAY): Likewise.  Use gnu_ld instead of gnu_ld_flag.
	* configure: Regenerate.
2026-03-23 12:10:02 +01:00
Jose E. Marchesi
eb50d28a93 a68: fix typo in ga8-coding-guidelines.texi
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>

gcc/algol68/ChangeLog

	* ga68-coding-guidelines.texi (Comments): Fix typo.
2026-03-23 01:29:45 +01:00
GCC Administrator
0c52fbc150 Daily bump. 2026-03-23 00:16:21 +00:00
Harald Anlauf
15bccf4412 fortran: Replace large structs as function parameters by references [PR124259]
Large structs passed by value as function parameters can be replaced by
const references to improve performance.

	PR fortran/124259

gcc/fortran/ChangeLog:

	* target-memory.cc (gfc_merge_initializers): Change struct
	gfc_typespec argument into a const reference.
	* target-memory.h (gfc_merge_initializers): Adjust prototype.
	* trans.cc (gfc_finalize_tree_expr): Change struct symbol_attribute
	argument into a const reference.
	* trans.h (gfc_finalize_tree_expr): Adjust prototype.
2026-03-22 22:08:38 +01:00
Christopher Albert
f57bcde859 libgfortran: Disable caf_shmem without usable process-shared pthreads [PR124512]
Use a compile-time usability probe for the process-shared pthread API
required by caf_shmem and only build libcaf_shmem when that probe succeeds.

caf_shmem needs process-shared pthread primitives that are visible through
the default pthread headers.  AX_PTHREAD already established the baseline
pthread flags; this additional check only verifies that the specific
process-shared API surface is usable for caf/shmem/thread_support.c.

	PR fortran/124512

libgfortran/ChangeLog:

	* Makefile.am: Adjust the dependencies.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: Add new check.

Signed-off-by: Christopher Albert <albert@tugraz.at>
2026-03-22 13:29:52 -07:00
Andrew Pinski
4ba320a814 x86/testsuite: Add testcase for eh and va_end [PR124597]
This adds the testcase for the eh edge removal with va_end folding.

	PR target/124597

gcc/testsuite/ChangeLog:

	* g++.target/pr124597.C: New test.

Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
2026-03-22 09:45:52 -07:00