]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
10 days agotestsuite: Require int32plus effective target for pr122925.c
Dimitar Dimitrov [Sun, 22 Mar 2026 09:12:09 +0000 (11:12 +0200)] 
testsuite: Require int32plus effective target for pr122925.c

The test case logic relies on the constant literal -4 being promoted to
32-bit int.  But on AVR and other targets with 16-bit int types, the
literal is promoted to 16-bit int, which changes the expression value
and ultimately failing the test:

  FAIL: gcc.dg/pr122925.c execution test

Fix by requiring an effective target with at least 32-bit ints.

gcc/testsuite/ChangeLog:

* gcc.dg/pr122925.c: Require int32plus effective target.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
10 days agoFix internal error on non-byte-sized reference in GIMPLE DSE
Eric Botcazou [Tue, 31 Mar 2026 16:42:19 +0000 (18:42 +0200)] 
Fix internal error on non-byte-sized reference in GIMPLE DSE

This is a regression present on all the active branches and a sibling of:
  https://gcc.gnu.org/pipermail/gcc-patches/2024-February/646628.html

during GIMPLE pass: dse
+===========================GNAT BUG DETECTED==============================+
| 16.0.1 20260331 (experimental) [master r16-8354-gbf6989de817]  GCC error:|
| in exact_div, at poly-int.h:2179                                         |
| Error detected around opt107.adb:26:11                                   |
| Compiling opt107.adb

At least one caller of compute_trims, namely maybe_trim_constructor_store,
expects ref->size to be a multiple of a byte for trimming, and that is most
probably the case for others in practice, from a cursory reading.  Therefore
the patch adds the same test on ref->size as the one added to ref->offset.

gcc/
* tree-ssa-dse.cc (compute_trims): Bail out if ref->size is not
byte aligned either.

gcc/testsuite/
* gnat.dg/opt107.adb: New test.
* gnat.dg/opt107_pkg.ads: New helper.

10 days agotestsuite: Add testcase for CWG3145 - Uniqueness of annotations
Jakub Jelinek [Tue, 31 Mar 2026 16:31:00 +0000 (18:31 +0200)] 
testsuite: Add testcase for CWG3145 - Uniqueness of annotations

We already implement this, so just adding a testcase for it.

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

* g++.dg/reflect/annotations16.C: New test.

10 days agotestsuite: i386: Fix gcc.dg/analyzer/null-deref-pr123981-1.c
Rainer Orth [Tue, 31 Mar 2026 15:31:34 +0000 (17:31 +0200)] 
testsuite: i386: Fix gcc.dg/analyzer/null-deref-pr123981-1.c

The gcc.dg/analyzer/null-deref-pr123981-1.c test FAILs on 64-bit x86
targets with -m32:

FAIL: gcc.dg/analyzer/null-deref-pr123981-1.c (test for excess errors)

gcc.dg/analyzer/null-deref-pr123981-1.c:10:3: error: implicit declaration of function '_writegsbase_u64' [-Wimplicit-function-declaration]
gcc.dg/analyzer/null-deref-pr123981-1.c:10:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

As always, restricting x86 tests by target triplet is wrong: instead of
target x86_64-*-* this needs to be x86 && lp64.

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

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

gcc/testsuite:
* gcc.dg/analyzer/null-deref-pr123981-1.c: Restrict to 64-bit x86.

10 days agolibphobos: Replace old alias declaration syntax for modern style
Iain Buclaw [Tue, 31 Mar 2026 14:17:33 +0000 (16:17 +0200)] 
libphobos: Replace old alias declaration syntax for modern style

10 days agod: Update copyright years of the dmd frontend
Iain Buclaw [Tue, 31 Mar 2026 14:11:50 +0000 (16:11 +0200)] 
d: Update copyright years of the dmd frontend

10 days agofortran: Give up reference factoring in case of shared tree [PR124661]
Mikael Morin [Tue, 31 Mar 2026 13:34:29 +0000 (15:34 +0200)] 
fortran: Give up reference factoring in case of shared tree [PR124661]

When we are about to create a variable to factor a subreference of an
array descriptor, check whether that subreference is shared with some of
the preliminary code and abort the factoring in that case.

In the example from the PR, the preliminary code contained bounds
checking code and the replacement of the subreferences by fresh
variables was causing those variables to be used before they were
defined in that bounds checking code.

PR fortran/121185
PR fortran/124661

gcc/fortran/ChangeLog:

* trans-array.cc (maybe_save_ref): New wrapper function around
save ref.
(set_factored_descriptor_value): Use the new wrapper function.
Add argument PRELIMINARY_CODE.
(gfc_conv_ss_descriptor): Update caller.

gcc/ChangeLog:

* tree-inline.cc (debug_find_tree, debug_find_tree_1): Move
and rename functions...
* tree.cc (find_tree, find_tree_1): ... here.
* tree-inline.h (debug_find_tree): Move renamed declaration...
* tree.h (find_tree): ... here.

gcc/testsuite/ChangeLog:

* gfortran.dg/bounds_check_28.f90: New test.

Co-authored-by: Christopher Albert <albert@tugraz.at>
10 days agox86: Call ix86_access_stack_p only for larger alignment
H.J. Lu [Sun, 29 Mar 2026 21:30:28 +0000 (14:30 -0700)] 
x86: Call ix86_access_stack_p only for larger alignment

ix86_access_stack_p can be quite expensive.  Don't check symbolic constant
load.  Instead, call ix86_access_stack_p only if an INSN needs alignment
> stack alignment.  This reduces the compile time of PR target/124684 from
185 seconds to 24 seconds.  The compile time of PR target/124165 test is
unchanged.

PR target/124165
PR target/124684
* config/i386/i386.cc (ix86_symbolic_const_load_p_1): Renamed to
...
(ix86_need_alignment_p_1): This.
(ix86_symbolic_const_load_p): Renamed to ...
(ix86_need_alignment_p): This.
(ix86_find_max_used_stack_alignment): Call ix86_access_stack_p
only if the INSN needs alignment > stack alignment.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
10 days agotestsuite: change from vect_float to vect_double for tests [PR124712]
Torbjörn SVENSSON [Tue, 31 Mar 2026 11:30:16 +0000 (13:30 +0200)] 
testsuite: change from vect_float to vect_double for tests [PR124712]

gcc/testsuite/ChangeLog:

PR target/124712
* gcc.dg/vect/vect-fmax-2.c: Changed effective target vect_float
to vect_double.
* gcc.dg/vect/vect-fmax-3.c: Likewise.
* gcc.dg/vect/vect-fmin-2.c: Likewise.
* gcc.dg/vect/vect-fmin-3.c: Likewise.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
10 days agoaarch64: Sync aarch64-sys-regs.def with Binutils
Srinath Parvathaneni [Tue, 31 Mar 2026 09:31:27 +0000 (10:31 +0100)] 
aarch64: Sync aarch64-sys-regs.def with Binutils

This patch incorporates changes to this file in Binutils
since October 2025. This file includes the new system
registers in the 2025 architecture extensions.

gcc/ChangeLog:

* config/aarch64/aarch64-sys-regs.def: Copy from Binutils.

10 days agoaarch64: Add support for 2025 architecture feature options
Srinath Parvathaneni [Tue, 31 Mar 2026 09:31:17 +0000 (10:31 +0100)] 
aarch64: Add support for 2025 architecture feature options

This patch adds support for new -march feature options
corresponding to 2025 architecture extensions.

* +poe2
* +tlbid
* +tev
* +gcie
* +mpamv2
* +lscp
* +mops-go
* +sve2p3
* +sme2p3
* +f16f32dot
* +sve-b16mm
* +mtetc
* +f16f32mm
* +f16mm

gcc/ChangeLog:

* config/aarch64/aarch64-option-extensions.def (poe2):
New CLI extension option.
(tev): Likewise.
(tlbid): Likewise.
(gcie): Likewise.
(mpamv2): Likewise.
(lscp): Likewise.
(mops-go): Likewise.
(sve2p3): Likewise.
(sme2p3): Likewise.
(f16f32dot): Likewise.
(sve-b16mm): Likewise.
(mtetc): Likewise.
(f16f32mm): Likewise.
(f16mm): Likewise.

* doc/invoke.texi (poe2): Document option.
(tev): Likewise.
(tlbid): Likewise.
(gcie): Likewise.
(mpamv2): Likewise.
(lscp): Likewise.
(mops-go): Likewise.
(sve2p3): Likewise.
(sme2p3): Likewise.
(f16f32dot): Likewise.
(sve-b16mm): Likewise.
(mtetc): Likewise.
(f16f32mm): Likewise.
(f16mm): Likewise.

10 days agoAda: Fix compiler crash on nested reduce attribute
Eric Botcazou [Tue, 31 Mar 2026 07:50:11 +0000 (09:50 +0200)] 
Ada: Fix compiler crash on nested reduce attribute

This plugs a loophole in the resolution of reduction expressions, which
currently cannot be resolved when their immediate context is ambiguous,
for example in the case of a reduction expression nested in another one.

gcc/ada/
* sem_attr.adb (Analyze_Attribute) <Attribute_Reduce>: Rewrite the
analysis of a non-overloaded reducer.  Moreover, when both actuals
are overloaded, compute the set of possible interpretations.
(Resolve_Attribute) <Attribute_Reduce>: Streamline the processing.

gcc/testsuite/
* gnat.dg/reduce6.adb: New test.

10 days agoc++: Fix up eval_data_member_spec
Jakub Jelinek [Tue, 31 Mar 2026 08:16:14 +0000 (10:16 +0200)] 
c++: Fix up eval_data_member_spec

Ivan Lazaric reported privately a bug in eval_data_member_spec,
which I think can't be easily tested.

This is preceded by
          if (!cpp_translate_string (parse_in, &istr, &ostr,
                                     j == 2 ? CPP_STRING : CPP_UTF8STRING,
                                     true))
so for j == 2 it does reverse conversion from -fnarrow-character-set= to
SOURCE_CHARSET (typically UTF-8) and otherwise (j == 1) from
UTF-8 to SOURCE_CHARSET, but the messages of exceptions were reversed.

Now, unless SOURCE_CHARSET is UTF-EBCDIC on s390x-tpf (dunno if that works
at all, but in theory could) and there is some character only in UTF-8 and
not in UTF-EBCDIC, or there is some narrow character set supported by iconv
which has characters not represented in UTF-8 (am not aware of those),
then cpp_translate_string shouldn't fail, so the code in there is just
for a theoretical case.

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

* reflect.cc (eval_data_member_spec): Fix up check for diagnostics
when reverse conversion fails.

10 days agoLoongArch: fix build failure of loongarch32-*-elf* target
Wu Haotian [Sun, 29 Mar 2026 12:52:51 +0000 (20:52 +0800)] 
LoongArch: fix build failure of loongarch32-*-elf* target

Bare-metal LoongArch target triple loongarch*-*-elf* contains references
to "loongarch/linux.h" and "loongarch/t-linux", causing build failure for
GCC targeting loongarch32-*-elf*.

This commit removes the extra Linux references, and is tested by building
a cross compiler for the loongarch32-picolibc-elf target.

gcc/ChangeLog:

* config.gcc: removed linux.h and t-linux for loongarch*-*-elf* targets

Signed-off-by: Wu Haotian <rigoligo03@gmail.com>
10 days agotestsuite: x86: move alias-checks.C into vect
Alexandre Oliva [Tue, 31 Mar 2026 00:58:19 +0000 (21:58 -0300)] 
testsuite: x86: move alias-checks.C into vect

g++.dg/alias-checks.C requires vect_double outside vect.exp, where
-msse2 would have got enabled, but that effective_target is not
supposed to be used in such circumstances: it passes even when SSE2 is
disabled.  Without enabling SSE2, vectors of doubles aren't really
available, so we don't get the expected vectorizations and the test
fails.

Instead of adding machine-specific options to alias-checks.C, I'm
moving it under g++.dg/vect/ and renaming it so that it gets, and
doesn't override, the default vector options for each platform.

for  gcc/testsuite/ChangeLog

* g++.dg/alias-checks.C: Rename to...
* g++.dg/vect/vect-alias-checks.C: ... this.  Don't override
vector options.

10 days agotestsuite: x86: pr82142b.c needs -fomit-frame-pointer
Alexandre Oliva [Tue, 31 Mar 2026 00:58:14 +0000 (21:58 -0300)] 
testsuite: x86: pr82142b.c needs -fomit-frame-pointer

Without an explicit -fomit-frame-pointer, x86 builds that disable
frame pointer optimization by default don't get the expected function
body.

for  gcc/testsuite/ChangeLog

* gcc.target/i386/pr82142b.c: Add -fomit-frame-pointer.

10 days agotestsuite: x86: pr115397.c, pr118497 need fpic support
Alexandre Oliva [Tue, 31 Mar 2026 00:58:10 +0000 (21:58 -0300)] 
testsuite: x86: pr115397.c, pr118497 need fpic support

Here are fixes for two x86-specific testcase that uses PIC
compile-time options without requiring fpic.

for  gcc/testsuite/ChangeLog

* gcc.target/i386/pr115397.c: Require fpic.
* gcc.target/i386/pr118497.c: Likewise.

10 days agotestsuite: x86: part-vect-absnegbf.c requires runtime for -msse2
Alexandre Oliva [Tue, 31 Mar 2026 00:58:05 +0000 (21:58 -0300)] 
testsuite: x86: part-vect-absnegbf.c requires runtime for -msse2

Since this is an execution test, require sse2_runtime.

for  gcc/testsuite/ChangeLog

* gcc.target/i386/part-vect-absnegbf.c: Require sse2_runtime.

10 days agotestsuite: x86: bump unroll insn limit for pr83403-*.c
Alexandre Oliva [Tue, 31 Mar 2026 00:58:01 +0000 (21:58 -0300)] 
testsuite: x86: bump unroll insn limit for pr83403-*.c

Like rv32 and other targets, pr83403-[12].c need to bump
max-completely-peeled-insns to get the loops unrolled on x86 without
sse2 so as to enable the expected store motions.

for  gcc/testsuite/ChangeLog

* gcc.dg/tree-ssa/pr83403-1.c: Bump
max-completely-peeled-insns on x86.
* gcc.dg/tree-ssa/pr83403-2.c: Likewise.

10 days agotestsuite: select -mfpmath=sse for pr32964.c on x86
Alexandre Oliva [Tue, 31 Mar 2026 00:57:56 +0000 (21:57 -0300)] 
testsuite: select -mfpmath=sse for pr32964.c on x86

When using the 387 FPU, we don't perform the expected optimization of
unions to floats.  Setting -fexcess-precision=standard. doesn't fix it
for x86, but selecting -mfpmath=sse and forcing sse enabled does.

for  gcc/testsuite/ChangeLog

* gcc.dg/tree-ssa/pr32964.c: Select the SSE FPU on x86.

10 days agotestsuite: x86: enable sse2 for pr117888-2.c
Alexandre Oliva [Tue, 31 Mar 2026 00:57:52 +0000 (21:57 -0300)] 
testsuite: x86: enable sse2 for pr117888-2.c

Without SSE2, the loop is found too big to unroll, and we don't match
the expected pattern.  So enable sse2.

for  gcc/testsuite/ChangeLog

* gcc.dg/pr117888-2.c: Enable sse2.

10 days agotestsuite: drop loop optimizations in fstack-protector-strong.c
Alexandre Oliva [Tue, 31 Mar 2026 00:57:48 +0000 (21:57 -0300)] 
testsuite: drop loop optimizations in fstack-protector-strong.c

gcc.dg/fstack-protector-strong.c used to expect one stack_chk_fail per
function.  When vectorizer improvements caused foo2 to get vectorized
to the point of enabling the loop and the automatic array-containing
data structure to be optimized away entirely, it no longer required
stack protection, and the expected pattern count was decreased.

However, on platforms that don't or can't vectorize the loop, it isn't
optimized away, and then we find the wrong pattern count.

Reverse the decrease and disable optimizations of the loop that could
cause it to be optimized out, so that we get the originally-expected
stack protection everywhere.

for  gcc/testsuite/ChangeLog

* gcc.dg/fstack-protector-strong.c (foo2): Prevent loop
optimizations.  Expect stack protection again.

10 days agotestsuite: x86: pr115863-1.c should include stdint.h
Alexandre Oliva [Tue, 31 Mar 2026 00:57:44 +0000 (21:57 -0300)] 
testsuite: x86: pr115863-1.c should include stdint.h

stdint-gcc.h isn't necessarily installed by GCC or available from C
libraries.  VxWorks ports don't generally have such a header
available.  Include stdint.h instead.

for  gcc/testsuite/ChangeLog

* gcc.target/i386/pr115863-1.c: Include stdint.h.

10 days agotestsuite: x86: require fpic for lea-4.c and pr116587.c
Alexandre Oliva [Tue, 31 Mar 2026 00:57:38 +0000 (21:57 -0300)] 
testsuite: x86: require fpic for lea-4.c and pr116587.c

These two tests use -fPIE and -fPIC, respectively, without stating the
requirement for compile-time PIC support.

for  gcc/testsuite/ChangeLog

* gcc.target/i386/lea-4.c: Require fpic.
* gcc.target/i386/pr116587.c: Likewise.

10 days agotestsuite: analyzer: drop stderr from deref-before-check-2.c
Alexandre Oliva [Tue, 31 Mar 2026 00:57:34 +0000 (21:57 -0300)] 
testsuite: analyzer: drop stderr from deref-before-check-2.c

On some VxWorks targets, stderr is #defined to a function call, and
this confuses the analyzer in test_1, so we skip the warning.  That
appears to reveal a bug in the analyzer, but it doesn't seem to be
what the test was meant to test, so I'm dropping this unintended
feature from this testcase and filing PR124672 with a testcase to
reproduce it elsewhere.

for  gcc/testsuite/ChangeLog

* c-c++-common/analyzer/deref-before-check-2.c (test_1):
Drop stderr.

10 days agoDaily bump.
GCC Administrator [Tue, 31 Mar 2026 00:16:25 +0000 (00:16 +0000)] 
Daily bump.

10 days agoAdjust check for addressable misaligned stack argument
H.J. Lu [Fri, 27 Jun 2025 22:27:25 +0000 (06:27 +0800)] 
Adjust check for addressable misaligned stack argument

Adjust alignment check forcing a local copy if the argument on stack is
not aligned to its type and the current alignment, which is determined
by the backend, is less than MAX_SUPPORTED_STACK_ALIGNMENT when the
parameter has its address taken.

For x86, ignore argument passed on stack when updating stack alignment
since caller is responsible to align the outgoing stack for arguments
passed on stack.

gcc/

PR target/120839
PR middle-end/124671
* function.cc (assign_parm_adjust_stack_rtl): Get the parameter
as argument.  Adjust alignment check forcing a local copy.
(assign_parms): Adjust.
* config/i386/i386.cc (ix86_argument_passed_on_stack_p): New.
(ix86_update_stack_alignment): Ignore argument passed on stack.

gcc/testsuite/

PR target/120839
PR middle-end/124671
* gcc.dg/pr124671.c: New test.
* gcc.target/i386/pr120839-1a.c: Likewise.
* gcc.target/i386/pr120839-1b.c: Likewise.
* gcc.target/i386/pr120839-2.c: Likewise.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Co-Authored-By: Richard Biener <rguenther@suse.de>
10 days agofortran: Fix several issues with INQUIRE and unconnected units.
Jerry DeLisle [Mon, 30 Mar 2026 17:40:43 +0000 (10:40 -0700)] 
fortran: Fix several issues with INQUIRE and unconnected units.

PR libfortran/124543

libgfortran/ChangeLog:

* io/inquire.c (inquire_via_unit): Fix return value for
NAMED. Add check for ACTION. Fix return values for
ENCODING, PENDING, READ, WRITE, READWRITE.
(inquire_via_filename): Add checks for ACTION, DELIM,
ASYNCHRONOUS, and PENDING. Fix return value for
ENCODING.
* io/unix.c (inquire_access): Change return value from no
to unknown.

gcc/testsuite/ChangeLog:

* gfortran.dg/pr124543.f90: New test.

10 days agobpf: md: Enable zero_extend{hi,qi}di2 to generate wN regs ...
Vineet Gupta [Mon, 30 Mar 2026 20:15:04 +0000 (13:15 -0700)] 
bpf: md: Enable zero_extend{hi,qi}di2 to generate wN regs ...

... by adjusting the asm template reg string to 'W', similar to commit
gbd275e81812c for zero_extendsidi2. However unlike that change, this is
not a bug fix: zero_extendsidi2 relies on wN reg move to achieve the
32->64 semantics. A {8,16}->64 extension needs to be emulated anyways
by masking out extra bits so the reg used is not important.

However wN reg based codegen is still preferable in general:
 - It is easier on verifier as it has to track fewer bits and avoids
   corner case false positives.
 - Better native codegen as upper bits are guaranteed to be zero and can
   leverage target ISA mechanisms to achieve that mostly for free.
 - Better native codegen on 32-bit targets which need to use 2 regs for
   rN regs.

gcc/ChangeLog:

* config/bpf/bpf.md (zero_extendhidi2): Add alternates for
alu32 and use 'W' for reg operands.
(zero_extendqidi2): Ditto.

gcc/testsuite/ChangeLog:

* gcc.target/bpf/zero-ext.c: Add tests for {HI,QI}mode values.

Signed-off-by: Vineet Gupta <vineet.gupta@linux.dev>
11 days agofortran: Fix uint back to int [PR124666]
Jerry DeLisle [Mon, 30 Mar 2026 16:19:18 +0000 (09:19 -0700)] 
fortran: Fix uint back to int [PR124666]

PR fortran/124666

gcc/fortran/ChangeLog:

* io.cc: Change uint value back to int.

11 days agotestsuite: bpf: Add initial BPF runtime tests
Piyush Raj [Tue, 24 Feb 2026 20:17:54 +0000 (01:47 +0530)] 
testsuite: bpf: Add initial BPF runtime tests

This patch adds runtime tests for BPF target.
These tests are based on existing compile-time tests and depends on
bpf.exp baseboard
To run the testsuite:

  make check-gcc RUNTESTFLAGS="--target_board=bpf-vmtest bpf-torture.exp KERNEL_VERSION=6.15 LOG_LEVEL=ERROR"

Options:
KERNEL_VERSION (default: 6.15)
LOG_LEVEL (default: ERROR)
Note: VMTEST_DIR must be set in the environment.

See the bpf-vmtest-tool README for details.

gcc/testsuite/ChangeLog:

* gcc.target/bpf/torture/bpf-torture.exp: New testsuite.
* gcc.target/bpf/torture/invalid-memory-access.c: New test.
* gcc.target/bpf/torture/memcpy.c: New test.
* gcc.target/bpf/torture/memmove.c: New test.
* gcc.target/bpf/torture/memset.c: New test.
* gcc.target/bpf/torture/naked.c: New test.
* gcc.target/bpf/torture/nop.c: New test.
* gcc.target/bpf/torture/trace_openat.c: New test.

11 days agolibstdc++: Change atomic_ref::address return type to cv void*.
Tomasz Kamiński [Mon, 23 Mar 2026 20:25:58 +0000 (21:25 +0100)] 
libstdc++: Change atomic_ref::address return type to cv void*.

This implements with P3936R1 Safer atomic_ref::address with
the bump to __cpp_lib_atomic_ref feture test macro.

libstdc++-v3/ChangeLog:

* include/bits/atomic_base.h (__atomic_ref_base::_Address_return_t):
Define.
(__atomic_ref_base::address): Change return type to _Address_return_t.
* include/bits/version.def (atomic_ref): Bump to 202603.
* include/bits/version.h: Regenerate.
* testsuite/29_atomics/atomic_ref/address.cc: Update check for
return type.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
11 days agotree-optimization/124692 - update stmt before folding
Richard Biener [Mon, 30 Mar 2026 12:30:45 +0000 (14:30 +0200)] 
tree-optimization/124692 - update stmt before folding

The following makes sure SSA operands are up-to-date before folding.
Esp. when replace_uses_by is invoked from SCEV cprop which now has
ranger enabled we can otherwise end up ICEing where purpoted SSA
names now are constants.  This follows what forwprop does.

PR tree-optimization/124692
* tree-cfg.cc (replace_uses_by): Call update_stmt after
substitution and before folding.

* gcc.dg/torture/pr124692.c: New testcase.

11 days agoaarch64: mingw: Disable _Float128 emulation
Saurabh Jha [Mon, 9 Mar 2026 19:54:48 +0000 (19:54 +0000)] 
aarch64: mingw: Disable _Float128 emulation

The Windows ABI doesn't support _Float128:
https://learn.microsoft.com/en-us/cpp/build/ieee-floating-point-representation.

While it can be emulated for this target, the current implementation
prevents fortran from being built with this emulation.

This patch disables _Float128 emulation for aarch64-w64-mingw32 target.
This enables fortran to be built with no additional changes.

gcc/ChangeLog:

* config/aarch64/aarch64.cc
(aarch64_scalar_mode_supported_p): Only return true on TFmode if
TARGET_LONG_DOUBLE_128 is set.

libgcc/ChangeLog:
* config.host: Disable soft floating point.

Co-Authored-By: Evgeny Karpov <evgeny.karpov@arm.com>
11 days agotree-optimization/88576 - make -fno-math-errno not affect malloc
Richard Biener [Fri, 20 Mar 2026 17:35:33 +0000 (18:35 +0100)] 
tree-optimization/88576 - make -fno-math-errno not affect malloc

The following makes -fno-math-errno not affect non-math builtins.

PR tree-optimization/88576
* tree-ssa-alias.cc (check_fnspec): Remove flag_errno_math check.
* ipa-modref.cc (modref_access_analysis::process_fnspec):
Likewise.

* gcc.dg/pr88576.c: New testcase.

11 days agotree-optimization/124677 - wrong recurrence permute placement
Richard Biener [Mon, 30 Mar 2026 08:41:15 +0000 (10:41 +0200)] 
tree-optimization/124677 - wrong recurrence permute placement

When vectorizing a recurrence we have to skip inserted vector
stmts for the latch definition when finding the insertion point
for the permute.

PR tree-optimization/124677
* tree-vect-loop.cc (vectorizable_recurr): Skip vector
stmts for the def.

* gcc.dg/vect/vect-pr124677.c: New testcase.

11 days agofortran: Fix free-form mixed OpenACC/OpenMP continuation state
Christopher Albert [Sun, 22 Mar 2026 06:15:44 +0000 (07:15 +0100)] 
fortran: Fix free-form mixed OpenACC/OpenMP continuation state

Clear the opposite directive flag only for fresh free-form OpenMP/OpenACC
sentinel lines so continued directives do not leak OpenACC/OpenMP state into
the next independent directive.

PR fortran/108382
gcc/fortran/ChangeLog:

* scanner.cc (skip_free_oacc_sentinel): Clear openmp_flag only for
fresh OpenACC directive lines.
(skip_free_omp_sentinel): Clear openacc_flag only for fresh OpenMP
directive lines.

gcc/testsuite/ChangeLog:

* gfortran.dg/goacc/omp-108382.f90: New test.

Signed-off-by: Christopher Albert <albert@tugraz.at>
11 days agoc++, libstdc++: Implement P4156R0 - Rename meta::has_ellipsis_parameter to meta:...
Jakub Jelinek [Mon, 30 Mar 2026 10:02:47 +0000 (12:02 +0200)] 
c++, libstdc++: Implement P4156R0 - Rename meta::has_ellipsis_parameter to meta::is_vararg_function

Unhappy about the old and new names, as a function type is not a function,
but ces't la vie.

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

gcc/cp/
* metafns.gperf (enum metafn_code): Remove
METAFN_HAS_ELLIPSIS_PARAMETER, add METAFN_IS_VARARG_FUNCTION.
(has_ellipsis_parameter): Remove.
(is_vararg_function): Add.
* reflect.cc (eval_has_ellipsis_parameter): Rename to ...
(eval_is_vararg_function): ... this.  Adjust function comment.
(process_metafunction): Handle METAFN_IS_VARARG_FUNCTION
instead of METAFN_HAS_ELLIPSIS_PARAMETER.
* metafns.h: Regenerate.
gcc/testsuite/
* g++.dg/reflect/has_ellipsis_parameter1.C: Rename to ...
* g++.dg/reflect/is_vararg_function1.C: this.  New test.  Rename
has_ellipsis_parameter to is_vararg_function everywhere.
libstdc++-v3/
* include/std/meta (has_ellipsis_parameter): Rename to ...
(is_vararg_function): ... this.  New declaration.
* src/c++23/std.cc.in: Remove std::meta::has_ellipsis_parameter
export, add std::meta::is_vararg_function export.

11 days agoaarch64, Darwin: Add Apple M5 cores
Francois-Xavier Coudert [Fri, 27 Mar 2026 17:51:32 +0000 (18:51 +0100)] 
aarch64, Darwin: Add Apple M5 cores

The values for chip IDs and the LITTLE.big variants have been confirmed
in the XNU sources (xnu/osfmk/arm/cpuid.h).

gcc/ChangeLog:

* config/aarch64/aarch64-cores.def (AARCH64_CORE): Add Apple M5
cores.
* config/aarch64/aarch64-tune.md: Regenerate.
* doc/invoke.texi: Add apple-m5 core to the ones listed
for arch and tune selections.

11 days agoarm: allow at least one insn when loading a constant [PR102309]
Torbjörn SVENSSON [Fri, 27 Mar 2026 13:55:27 +0000 (14:55 +0100)] 
arm: allow at least one insn when loading a constant [PR102309]

gcc/ChangeLog:

PR target/102309
* config/arm/arm.cc (arm_constant_limit): Allways allow at least
one insn when loading a constant.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
11 days agoDaily bump.
GCC Administrator [Mon, 30 Mar 2026 00:16:21 +0000 (00:16 +0000)] 
Daily bump.

11 days ago[RISC-V][PR target/124674] Define OImode in the usual way
Jeff Law [Sun, 29 Mar 2026 23:36:25 +0000 (17:36 -0600)] 
[RISC-V][PR target/124674] Define OImode in the usual way

This testcase tries to call build_nonstandard_integer_type for a 192-bit
precision type.  This eventually faults because we don't have a suitably wide
mode.

Somewhat surprisingly, the targets are responsible for defining OImode.  So
this adds it to the RISC-V port as well which trivially fixes the ICE.  The
test is limited to rv64 as rv32 doesn't support int128.  That could have been
handled with a target-supports selector just as easily.

Tested on riscv32-elf and riscv64-elf.  Both the BPI and Pioneer are
experiencing NVME drive failures, so no bootstraps until I figure that out.
Waiting on the pre-commit tester to do its thing before pushing

PR target/124674
gcc/
* config/riscv/riscv-modes.def: Create OImode.

gcc/testsuite
* gcc.target/riscv/pr124674.c: New test.

12 days agoDaily bump.
GCC Administrator [Sun, 29 Mar 2026 00:16:23 +0000 (00:16 +0000)] 
Daily bump.

12 days agotestsuite: d: Adjust test for d_runtime_has_std_library
Iain Buclaw [Sat, 28 Mar 2026 18:21:54 +0000 (19:21 +0100)] 
testsuite: d: Adjust test for d_runtime_has_std_library

The test for the D std library incorrectly returned true on targets
--with-libphobos-druntime-only=yes.

The function cos() is treated as an intrinsic, so always exists.

gcc/testsuite/ChangeLog:

* lib/target-supports.exp
(check_effective_target_d_runtime_has_std_library): Test for
acos rather than cos.

13 days agofortran: Fix [PR124666] [16 Regression] [UBSAN] io.cc:290:27: runtime error
Jerry DeLisle [Sat, 28 Mar 2026 17:53:55 +0000 (10:53 -0700)] 
fortran: Fix [PR124666] [16 Regression] [UBSAN] io.cc:290:27: runtime error

Simple an obvious fix to avoid integer overflow.

PR fortran/124666

gcc/fortran/ChangeLog:

* io.cc (format_lex): Use enclosing parens to subtract
before adding.

13 days agoFortran: Fix use-after-free in gfc_fixup_sibling_symbols [PR95879]
Paul Thomas [Sat, 28 Mar 2026 09:08:54 +0000 (09:08 +0000)] 
Fortran:  Fix use-after-free in gfc_fixup_sibling_symbols [PR95879]

2026-03-28  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/95879
* parse.cc (fixup_st_func_formals): New function to update
statement function formal argument lists referencing a symbol
about to be freed.
(gfc_fixup_sibling_symbols): Call fixup_st_func_formals before
gfc_release_symbol.

gcc/testsuite
PR fortran/95879
* gfortran.dg/pr95879.f90: New test.

13 days agoFortran: Avoid rollback ICE after invalid SELECT TYPE [PR84245]
Paul Thomas [Sat, 28 Mar 2026 07:23:01 +0000 (07:23 +0000)] 
Fortran: Avoid rollback ICE after invalid SELECT TYPE [PR84245]

2026-03-28  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/84245
* match.cc (gfc_match_select_type): Free the temporary namespace
only on MATCH_NO. Return immediately on MATCH_ERROR.

gcc/testsuite/ChangeLog:

* gfortran.dg/pr84245.f90: New test.

13 days agotestsuite: aarch64: skip erratas_opt_*.c on vxworks
Alexandre Oliva [Wed, 25 Mar 2026 18:05:49 +0000 (15:05 -0300)] 
testsuite: aarch64: skip erratas_opt_*.c on vxworks

VxWorks involves linking oddities in both kernel and rtp modes that
prevent the testcases for finding the expected outputs in the
erratas_opt_*.c testcases.  One of the modes doesn't even perform
final linking, so it's kind of hopeless.  Just skip them.

for  gcc/testsuite/ChangeLog

* gcc.target/aarch64/erratas_opt_0.c: Skip on VxWorks.
* gcc.target/aarch64/erratas_opt_1.c: Likewise.
* gcc.target/aarch64/erratas_opt_2.c: Likewise.
* gcc.target/aarch64/erratas_opt_3.c: Likewise.
* gcc.target/aarch64/erratas_opt_4.c: Likewise.
* gcc.target/aarch64/erratas_opt_5.c: Likewise.
* gcc.target/aarch64/erratas_opt_6.c: Likewise.
* gcc.target/aarch64/erratas_opt_7.c: Likewise.
* gcc.target/aarch64/erratas_opt_8.c: Likewise.
* gcc.target/aarch64/erratas_opt_9.c: Likewise.
* gcc.target/aarch64/erratas_opt_10.c: Likewise.
* gcc.target/aarch64/erratas_opt_11.c: Likewise.
* gcc.target/aarch64/erratas_opt_12.c: Likewise.
* gcc.target/aarch64/erratas_opt_13.c: Likewise.
* gcc.target/aarch64/erratas_opt_14.c: Likewise.
* gcc.target/aarch64/erratas_opt_15.c: Likewise.

13 days agotestsuite: aarch64: avoid stdint-gcc.h in crc-builtin-pmul64.c
Alexandre Oliva [Wed, 25 Mar 2026 18:05:33 +0000 (15:05 -0300)] 
testsuite: aarch64: avoid stdint-gcc.h in crc-builtin-pmul64.c

Though gcc most often installs a stdint-gcc.h, that's not necessarily
the case, and it isn't the case for sure when targeting vxworks.

The file history doesn't justify the oddity, so I'm assuming it was a
mistake.

for  gcc/testsuite/ChangeLog

* gcc.target/aarch64/crc-builtin-pmul64.c: Include stdint.h.

13 days agotestsuite: negated triplets need blank separators
Alexandre Oliva [Wed, 25 Mar 2026 18:05:14 +0000 (15:05 -0300)] 
testsuite: negated triplets need blank separators

!a-b-c is not the same as ! a-b-c.  In !a-b-c, the '!' is part of the
triplet that istarget attempts to match.  Fix all occurrences, except
for gcc.dg/vect/vect-93.c, that is taken care of separately.

for  gcc/testsuite/ChangeLog

* gcc.dg/debug/btf/btf-variables-5.c: Separate ! from triplet.
* gcc.dg/hoist-register-pressure-1.c: Likewise.
* gcc.dg/hoist-register-pressure-2.c: Likewise.
* gcc.dg/hoist-register-pressure-3.c: Likewise.
* gcc.target/powerpc/safe-indirect-jump-1.c: Likewise.
* gfortran.dg/gomp/declare-variant-14.f90: Likewise.

13 days agolibgcc: vxworks: work around warnings promoted to errors on aarch64
Alexandre Oliva [Wed, 25 Mar 2026 18:04:53 +0000 (15:04 -0300)] 
libgcc: vxworks: work around warnings promoted to errors on aarch64

In RTP mode, defining TLS_DELETE_HOOK_ARG as NULL AKA 0 elicits a
warning, that casting it to TASK_ID avoids.

objLibP.h defines an inline function that, depending on the
configuration, will have unused parameters.  Allow warnings about
them.

vxTas calls are supposed to take __vx_tas_t, but upon passing it that
on aarch64, we get warnings about discarding volatile qualifiers, that
not even explicit type casts avoid.  So, allow the warnings.

for  libgcc/ChangeLog

* config/gthr-vxworks-tls.c (TLS_DELETE_HOOK_ARG): Type-cast
NULL constant to avoid warning.
* config/t-vxworks (LIBGCC2_CFLAGS): Tolerate unused-parameter
and discarded-qualifiers errors.

13 days agolibstdc++: simd: allow x86 -mlong-double-64
Alexandre Oliva [Mon, 23 Mar 2026 01:32:55 +0000 (22:32 -0300)] 
libstdc++: simd: allow x86 -mlong-double-64

On a target that defaults to -mlong-double-64 -msse,
standard_abi_usable.cc and other tests fail to compile because of the
assert that rejects long double.  As on ppc, we can trivially make
things work for -mlong-double-64.

for  libstdc++-v3/ChangeLog

* include/experimental/bits/simd.h (__intrinsic_type): Accept
64-bit long doubles on x86 SSE.

13 days agoDaily bump.
GCC Administrator [Sat, 28 Mar 2026 00:16:25 +0000 (00:16 +0000)] 
Daily bump.

13 days agobpf: md: fix zero_extendsidi2 reg->reg codegen [PR124670]
Vineet Gupta [Thu, 26 Mar 2026 18:01:24 +0000 (11:01 -0700)] 
bpf: md: fix zero_extendsidi2 reg->reg codegen [PR124670]

Currently the following RTL for zero extension

| (insn 8 7 9 (set (reg:DI 0 %r0 [25])
|        (zero_extend:DI (reg:SI 0 %r0 [24])))  {zero_extendsidi2}
|     (nil))

generates

|   r0 = r0

which is just a 64-bit copy and doesn't clear the upper 32-bits as
semantically required by the pattern.

The issue is pattern's asm template missing ‘w’/'W' causing bpf_print_register ()
to only emit 'r' regs. Using ‘W’ in template generates correct code.

|   w0 = w0

Note that 'W specifier ignores the RTL mode and unconditionally emits
the 'w' reg which might feel like creating a potential future bug.
However for this insn, it is correct/completely safe as follows:
 - 'W1' for src operand: src operand has a SI mode in pattern.
 - 'W0' for dst: Technically dst is DI, but the upper 32-bits of output
   have to be 0 due to zero-extension, thus a 'w' reg is OK.

For selftests this is a wash, except for some spurious changes.

PR target/124670

gcc/ChangeLog:

* config/bpf/bpf.md (zero_extendsidi2): Use 'W' in asm template.

gcc/testsuite/ChangeLog:

* gcc.target/bpf/zero-ext.c: New test.

Signed-off-by: Vineet Gupta <vineet.gupta@linux.dev>
13 days agoFortran: Fix ICE in interface mapping with assumed rank [PR102619]
Paul Thomas [Fri, 27 Mar 2026 22:47:41 +0000 (22:47 +0000)] 
Fortran: Fix ICE in interface mapping with assumed rank [PR102619]

2026-03-27  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/102619
* trans-expr.cc (gfc_get_interface_mapping_array): Add argument
'assumed_rank_formal', which if true returns the descriptor in
'ifm'.
(gfc_add_interface_mapping): Detect an assumed rank formal arg
of a non-intrinsic function to set 'assumed_rank_formal' and
pass the descriptor to gfc_get_interface_mapping_array.

gcc/testsuite/
PR fortran/102619
* gfortran.dg/pr102619.f90: New test.

13 days agoAda: Lift restriction on structural generic instantiation of subprograms
Eric Botcazou [Fri, 27 Mar 2026 20:09:53 +0000 (21:09 +0100)] 
Ada: Lift restriction on structural generic instantiation of subprograms

When an entity of a library-level package is used as actual in an attempted
structural instantiation of a library-level generic unit in the package, an
error is given since the structural instance is a library unit with circular
semantic dependence on the package.

This change lifts the restriction for generic subprograms by demoting the
structural instance into a local instance in this case, which means that
several instances might end up being present in a single partition, unless
the optimizer is run on the entire partition, for example by means of LTO.

gcc/ada/
* sem_ch12.adb (Analyze_Structural_Associations): Create a local
instance instead of a structural instance when a local entity of
a library-level package is used in a subprogram instantiation.

13 days agoFortran: fix array bounds violation in min_max_args [PR124656]
Harald Anlauf [Fri, 27 Mar 2026 19:51:20 +0000 (20:51 +0100)] 
Fortran: fix array bounds violation in min_max_args [PR124656]

PR fortran/124656

gcc/fortran/ChangeLog:

* check.cc (min_max_args): Fix array index used for registering
labeled arguments of the MIN/MAX intrinsics for subsequent
duplicate label checks.

13 days agoFortran: several small fixes in gfc_simplify_eoshift [PR124631]
Harald Anlauf [Thu, 26 Mar 2026 20:35:11 +0000 (21:35 +0100)] 
Fortran: several small fixes in gfc_simplify_eoshift [PR124631]

PR fortran/124631

gcc/fortran/ChangeLog:

* simplify.cc (gfc_simplify_eoshift): Initialize sstride[0] to
prevent pointer arithmetic with undefined offset.  Fix several
frontend memleaks.

2 weeks agoAda: Fix overriding indicator wrongly rejected on protected procedure
Eric Botcazou [Fri, 27 Mar 2026 17:38:09 +0000 (18:38 +0100)] 
Ada: Fix overriding indicator wrongly rejected on protected procedure

The case itself is fairly pathological (and very likely not human made), but
it's a clear incentive to get rid of an old kludge in generic instantiation,
whereby the full view of a type is forced on nodes in the generic unit even
though only the partial declaration is visible to them.

gcc/ada/
PR ada/124596
* sem_ch12.ads (Check_Private_View): Move around.
* sem_ch12.adb (Check_Private_View): Retrieve the partial view
by means of a call to Incomplete_Or_Partial_View.
(Save_Global_References.Set_Global_Type): Do not force the full
view of a type when only the partial declaration is visible.
* sem_res.adb (Resolve_Actuals.Insert_Default): Remove obsolete
code coping with the above kludge.

gcc/testsuite/
* gnat.dg/generic_inst21.adb: New test.

2 weeks agolibgomp: fix omp_target_is_present and omp_get_mapped_ptr
Tobias Burnus [Fri, 27 Mar 2026 16:54:00 +0000 (17:54 +0100)] 
libgomp: fix omp_target_is_present and omp_get_mapped_ptr

There were a few minor issues with the two routines, partially because of
not handling corner cases and partially some clarifications are only in
newer versions of the spec.

In particular, for omp_target_is_present
* NULL pointer aren't regarded as present
* For (unified-)shared memory, claiming that something has always corresponding
  storage is wrong - it mostly never has. (but it is omp_target_is_accessible).
* Even with shared memory, 'declare target' usually has device memory. For
  'link' it is made to point to the host, i.e. it is not mapped, all others
  are still mapped. (With 'requires self_mapping', 'enter' should also not be
  mapped (and turned internally to 'link'), only 'local' needs to be mapped.)

For omp_get_mapped_ptr
* For NULL we can return NULL early also for devices.
* For shared memory, we shouldn't touch link (it is not counting as mapped);
  hence return NULL for it.

The documentation was updated add some missing cross references as the more
useful ones were missing.  Additionally, the description for the two modified
routines has been updated.

libgomp/ChangeLog:

* target.c (omp_target_is_present, omp_get_mapped_ptr): Update handling
for nullptr and shared-memory devices.
* libgomp.texi (omp_target_is_present, omp_get_mapped_ptr): Update
description, add see-also @refs.
(omp_target_is_accessible, omp_target_associate_ptr): Add see-also
@refs.
* testsuite/libgomp.c/omp_target_is_present.c: New test.
* testsuite/libgomp.c/omp_target_is_present-2.c: New test.

2 weeks agoregcprop: Return early in maybe_mode_change for unorder modes [PR124649]
Andrew Pinski [Thu, 26 Mar 2026 20:21:01 +0000 (13:21 -0700)] 
regcprop: Return early in maybe_mode_change for unorder modes [PR124649]

Like r16-727-g2ec5082dd24cef but the call to partial_subreg_p happens
in a later place, maybe_mode_change.
For this example we have VNx4QImode and DImode which are not ordered.

Bootstrapped and tested on aarch64-linux-gnu.

PR rtl-optimization/124649

gcc/ChangeLog:

* regcprop.cc (maybe_mode_change): Return early
for unordered modes.

gcc/testsuite/ChangeLog:

* gcc.dg/torture/pr124649-1.c: New test.

Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
2 weeks agolibstdc++: Delete superseded comment
Nathan Myers [Fri, 27 Mar 2026 15:37:39 +0000 (11:37 -0400)] 
libstdc++: Delete superseded comment

A comment referring to nothing remained in a patch.

libstdc++-v3/ChangeLog:
* include/bits/stl_tree.h: Delete comment.

2 weeks agoFortran: Fix ICE with allocation of scalar pointer entity [PR114021]
Paul Thomas [Fri, 27 Mar 2026 10:50:39 +0000 (10:50 +0000)] 
Fortran: Fix ICE with allocation of scalar pointer entity [PR114021]

2026-03-27  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/114021
* symbol.cc (gfc_get_unique_symtree): If the namespace argument
is NULL, allocate a new symtree and provide it with the unique
name.
* trans-expr.cc (trans_scalar_assign): In the deep copy of a
derived type with allocatable components, fix the rhs value if
it is not a constant or a variable.
* trans-stmt.cc (gfc_trans_allocate): Do not deallocate
allocatable components of a source that is not a variable and
is a pointer. If the DECL_NAME or its IDENTIFIER_POINTER are
null,use gfc_get_unique_symtree with NULL namespace to obtain a
symtree for the assignment.

gcc/testsuite/
PR fortran/114021
* gfortran.dg/pr114021.f90: New test.

2 weeks agoRISC-V: Allow all vector modes during builtin registration. [PR124613]
Robin Dapp [Tue, 24 Mar 2026 09:58:14 +0000 (10:58 +0100)] 
RISC-V: Allow all vector modes during builtin registration. [PR124613]

In r16-7312-gecc37444062b40 we allowed all vector modes for the
any_target hook.  Since then we would ICE in gcc.target/riscv/pr122051.c
as emit_move_multi_word would choose a fractional vector mode.

This patch disallows fractional vector modes for xtheadvector in
riscv_vector_mode_supported_p but makes an exception for builtin
registration (through a global variable).  During registration we
need to have all modes available in order to maintain the registration
order for LTO streaming.

PR target/124613

gcc/ChangeLog:

* config/riscv/riscv-vector-builtins.cc (rvv_switcher::rvv_switcher):
Add riscv_registering_builtins.
(rvv_switcher::~rvv_switcher): Set riscv_registering_builtins to
false.
* config/riscv/riscv.cc (riscv_vector_mode_supported_p): Use
riscv_registering_builtins.
* config/riscv/riscv.h: Declare.

2 weeks agodebug/124644 - duplicate DW_AT_artificial attribute
Richard Biener [Thu, 26 Mar 2026 14:09:53 +0000 (15:09 +0100)] 
debug/124644 - duplicate DW_AT_artificial attribute

We can attempt to add DW_AT_artificial because of two reasons,
because of DECL_ARTIFICIAL on the decl and because of the
artificial function attribute which is attempted when marking
a decl DIE for inlining.  The following guards the latter,
avoiding an ICE with checking enabled.

PR debug/124644
* dwarf2out.cc (dwarf2out_abstract_function): Only
add DW_AT_artificial if the decl isn't DECL_ARTIFICIAL.

* g++.dg/debug/pr124644.C: New testcase.

2 weeks agoAdd topics/*.h to installed header files
Torbjörn SVENSSON [Tue, 24 Mar 2026 16:33:23 +0000 (17:33 +0100)] 
Add topics/*.h to installed header files

Install topics/*.h header files to allow progress_notifications_plugin.cc
to properly build when testing out of build tree.

gcc/ChangeLog:

* Makefile.in: (PLUGIN_HEADERS): Add $(srcdir)/topics/*.h.
(install-plugin): Preserve directory structure for topics
headers.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
2 weeks agoFortran: Add testcase [PR101281]
Paul Thomas [Fri, 27 Mar 2026 07:27:09 +0000 (07:27 +0000)] 
Fortran: Add testcase [PR101281]

2026-03-27  Paul Thomas  <pault@gcc.gnu.org>

gcc/testsuite/ChangeLog:

PR fortran/101281
* gfortran.dg/pr101281.f90: New test.

2 weeks agoDaily bump.
GCC Administrator [Fri, 27 Mar 2026 00:16:23 +0000 (00:16 +0000)] 
Daily bump.

2 weeks agoFortran: Minor PDT cleanup and fix in gfc_simplify_exp [PR115315]
Paul Thomas [Thu, 26 Mar 2026 18:50:13 +0000 (18:50 +0000)] 
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.

2 weeks agolibgomp: Update tests to initialize full_data to 0.
Prathamesh Kulkarni [Thu, 26 Mar 2026 17:09:08 +0000 (17:09 +0000)] 
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>
2 weeks agotestsuite: Fix up another tcl 9 compatibility problem
Jakub Jelinek [Thu, 26 Mar 2026 17:11:06 +0000 (18:11 +0100)] 
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.

2 weeks agolto/124289 - Correctly handle toplevel asm with -flto-partition=cache
Michal Jires [Thu, 5 Mar 2026 09:03:21 +0000 (10:03 +0100)] 
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.

2 weeks agoRegenerate gcc.pot
Joseph Myers [Thu, 26 Mar 2026 15:08:27 +0000 (15:08 +0000)] 
Regenerate gcc.pot

* gcc.pot: Regenerate.

2 weeks agoc++/reflection: ICE with substitute and undeduced auto [PR123613]
Marek Polacek [Thu, 19 Mar 2026 17:10:38 +0000 (13:10 -0400)] 
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>
2 weeks agoDaily bump.
GCC Administrator [Thu, 26 Mar 2026 00:16:25 +0000 (00:16 +0000)] 
Daily bump.

2 weeks agotestsuite, c++: Skip contracts run tests for non-hosted.
Iain Sandoe [Sat, 31 Jan 2026 20:45:23 +0000 (20:45 +0000)] 
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>
2 weeks agoFortran: fix rank/shape check in interface checking [PR124567]
Harald Anlauf [Tue, 24 Mar 2026 21:04:29 +0000 (22:04 +0100)] 
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.

2 weeks agogcov-profile/121074 - hold onto gcov file for less time
Richard Biener [Wed, 25 Mar 2026 13:40:59 +0000 (14:40 +0100)] 
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.

2 weeks agotree-optimization/124627 - inlining and elided debug stmts
Richard Biener [Wed, 25 Mar 2026 08:40:56 +0000 (09:40 +0100)] 
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.

2 weeks agovxworks: fix gthr visibility issues
Alexandre Oliva [Wed, 25 Mar 2026 09:45:47 +0000 (06:45 -0300)] 
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.

2 weeks agotestsuite: vxworks: gcov-32 misuses sigjmp_buf with setjmp
Alexandre Oliva [Wed, 25 Mar 2026 09:45:43 +0000 (06:45 -0300)] 
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.

2 weeks agotestsuite: arm: pr115485 requires fpic
Alexandre Oliva [Wed, 25 Mar 2026 09:45:38 +0000 (06:45 -0300)] 
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.

2 weeks ago[testsuite] [vxworks] add -gno-strict-dwarf to pr111409.c
Alexandre Oliva [Wed, 25 Mar 2026 09:45:35 +0000 (06:45 -0300)] 
[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.

2 weeks agotestsuite: arm: add -mno-long-calls to epilog-1
Alexandre Oliva [Wed, 25 Mar 2026 09:45:30 +0000 (06:45 -0300)] 
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.

2 weeks agotestsuite: vect: slp-mask-store-1 accesses past the end of flags
Alexandre Oliva [Wed, 25 Mar 2026 09:45:25 +0000 (06:45 -0300)] 
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.

2 weeks agolibstdc++-v3: testsuite: lengthen stop_request wait_until timeout
Alexandre Oliva [Wed, 25 Mar 2026 09:45:19 +0000 (06:45 -0300)] 
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.

2 weeks ago[testsuite] require sysconf for vect-early-break_109-pr113588.c
Alexandre Oliva [Wed, 25 Mar 2026 09:45:14 +0000 (06:45 -0300)] 
[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.

2 weeks ago[testsuite] [ppc] expect vectorization in gen-vect-11c.c with lp64
Alexandre Oliva [Wed, 25 Mar 2026 09:45:09 +0000 (06:45 -0300)] 
[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.

2 weeks agotestsuite: vect: adjust vect-early-break_137-pr121190
Alexandre Oliva [Wed, 25 Mar 2026 09:45:04 +0000 (06:45 -0300)] 
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.

2 weeks agotestsuite: vxworks: xfail thread_local-order2 execution
Alexandre Oliva [Wed, 25 Mar 2026 09:44:59 +0000 (06:44 -0300)] 
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.

2 weeks agoc++: arm -Wdeprecated fails for ctors
Alexandre Oliva [Wed, 25 Mar 2026 09:44:55 +0000 (06:44 -0300)] 
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_.

2 weeks agoFortran: Invalid error in bounds check of elemental dim [PR119273]
Paul Thomas [Wed, 25 Mar 2026 09:28:15 +0000 (09:28 +0000)] 
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.

2 weeks agoi386: Fix gcc.target/i386/pr61599-1.c on Solaris/x86
Rainer Orth [Wed, 25 Mar 2026 08:44:54 +0000 (09:44 +0100)] 
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.

2 weeks ago[PATCH] Use next_speculative_call_target in get_next_speculative_id
Kugan Vivekanandarajah [Wed, 25 Mar 2026 07:25:16 +0000 (18:25 +1100)] 
[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>
2 weeks agoDaily bump.
GCC Administrator [Wed, 25 Mar 2026 00:16:24 +0000 (00:16 +0000)] 
Daily bump.

2 weeks ago[PR124572, LRA]: Deal with generation of reload insns during elimination
Vladimir N. Makarov [Tue, 24 Mar 2026 13:05:59 +0000 (09:05 -0400)] 
[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.

2 weeks agotestsuite: Only xfail g++.dg/coroutines/pr110872.C on 64-bit targets [PR124326]
Rainer Orth [Tue, 24 Mar 2026 15:46:20 +0000 (16:46 +0100)] 
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.

2 weeks agotestsuite: Fix g++.dg/warn/Wstringop-overflow-6.C on Solaris [PR123135]
Rainer Orth [Tue, 24 Mar 2026 15:43:16 +0000 (16:43 +0100)] 
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.

2 weeks agolibgomp: Fix libgomp.fortran/uses_allocators-7.f90 [PR123177]
Rainer Orth [Tue, 24 Mar 2026 15:40:12 +0000 (16:40 +0100)] 
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.

2 weeks agotestsuite: add -fno-short-enums to have predictable mangling
Torbjörn SVENSSON [Tue, 24 Mar 2026 12:31:42 +0000 (13:31 +0100)] 
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>