]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
6 months agoZen5 tuning part 5: update instruction latencies in x86-tune-costs
Jan Hubicka [Wed, 4 Sep 2024 07:19:08 +0000 (09:19 +0200)] 
Zen5 tuning part 5: update instruction latencies in x86-tune-costs

there is nothing exciting in this patch.  I measured latencies and also compared
them with newly released optimization guide.  There are no dramatic changes
compared to zen4.  One interesting new bit is that addss is faster and can be
2 cycles when fed by another addss.

I also increased the large insn bound since decoders seems no longer require
instructions to be 8 bytes or less.

gcc/ChangeLog:

* config/i386/x86-tune-costs.h (znver5_cost): Update instruction
costs.

(cherry picked from commit 4292297a0f938ffc953422fa246ff00fe345fe3d)

6 months agoDaily bump.
GCC Administrator [Tue, 14 Jan 2025 00:20:26 +0000 (00:20 +0000)] 
Daily bump.

6 months agoFortran: Cray pointer comparison wrongly optimized away [PR106692]
Harald Anlauf [Thu, 2 Jan 2025 19:22:23 +0000 (20:22 +0100)] 
Fortran: Cray pointer comparison wrongly optimized away [PR106692]

PR fortran/106692

gcc/fortran/ChangeLog:

* trans-expr.cc (gfc_conv_expr_op): Inhibit excessive optimization
of Cray pointers by treating them as volatile in comparisons.

gcc/testsuite/ChangeLog:

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

(cherry picked from commit c7754a2fb2e60987524947fe189f3ffac035ea1d)

6 months agoDaily bump.
GCC Administrator [Mon, 13 Jan 2025 00:19:09 +0000 (00:19 +0000)] 
Daily bump.

6 months agoDaily bump.
GCC Administrator [Sun, 12 Jan 2025 00:19:38 +0000 (00:19 +0000)] 
Daily bump.

6 months agoDaily bump.
GCC Administrator [Sat, 11 Jan 2025 00:21:21 +0000 (00:21 +0000)] 
Daily bump.

6 months agotree-optimization/116057 - wrong code with CCP and vector CTORs
Richard Biener [Wed, 24 Jul 2024 11:16:35 +0000 (13:16 +0200)] 
tree-optimization/116057 - wrong code with CCP and vector CTORs

The following fixes an issue with CCPs likely_value when faced with
a vector CTOR containing undef SSA names and constants.  This should
be classified as CONSTANT and not UNDEFINED.

PR tree-optimization/116057
* tree-ssa-ccp.cc (likely_value): Also walk CTORs in stmt
operands to look for constants.

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

(cherry picked from commit 1ea551514b9c285d801ac5ab8d78b22483ff65af)

6 months agotree-optimization/115669 - fix SLP reduction association
Richard Biener [Thu, 27 Jun 2024 09:26:08 +0000 (11:26 +0200)] 
tree-optimization/115669 - fix SLP reduction association

The following avoids associating a reduction path as that might
get STMT_VINFO_REDUC_IDX out-of-sync with the SLP operand order.
This is a latent issue with SLP reductions but now easily exposed
as we're doing single-lane SLP reductions.

When we achieved SLP only we can move and update this meta-data.

PR tree-optimization/115669
* tree-vect-slp.cc (vect_build_slp_tree_2): Do not reassociate
chains that participate in a reduction.

* gcc.dg/vect/pr115669.c: New testcase.

(cherry picked from commit 7886830bb45c4f5dca0496d4deae9a45204d78f5)

6 months agotree-optimization/115646 - ICE with pow shrink-wrapping from bitfield
Richard Biener [Tue, 25 Jun 2024 14:13:02 +0000 (16:13 +0200)] 
tree-optimization/115646 - ICE with pow shrink-wrapping from bitfield

The following makes analysis and transform agree on constraints.

PR tree-optimization/115646
* tree-call-cdce.cc (check_pow): Check for bit_sz values
as allowed by transform.

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

(cherry picked from commit 453b1d291d1a0f89087ad91cf6b1bed1ec68eff3)

6 months agodoc: cpp: fix version test example syntax
Sam James [Wed, 1 Jan 2025 17:16:17 +0000 (17:16 +0000)] 
doc: cpp: fix version test example syntax

gcc/ChangeLog:

* doc/cpp.texi (Common Predefined Macros): Fix syntax.

6 months agoDaily bump.
GCC Administrator [Fri, 10 Jan 2025 00:20:08 +0000 (00:20 +0000)] 
Daily bump.

6 months agoDaily bump.
GCC Administrator [Thu, 9 Jan 2025 00:20:03 +0000 (00:20 +0000)] 
Daily bump.

6 months agoDaily bump.
GCC Administrator [Wed, 8 Jan 2025 00:20:50 +0000 (00:20 +0000)] 
Daily bump.

6 months agoZen5 tuning part 4: update reassocation width
Jan Hubicka [Tue, 3 Sep 2024 16:20:34 +0000 (18:20 +0200)] 
Zen5 tuning part 4: update reassocation width

Zen5 has 6 instead of 4 ALUs and the integer multiplication can now execute in
3 of them.  FP units can do 2 additions and 2 multiplications with latency 2
and 3.  This patch updates reassociation width accordingly.  This has potential
of increasing register pressure but unlike while benchmarking znver1 tuning
I did not noticed this actually causing problem on spec, so this patch bumps
up reassociation width to 6 for everything except for integer vectors, where
there are 4 units with typical latency of 1.

Bootstrapped/regtested x86_64-linux, comitted.

gcc/ChangeLog:

* config/i386/i386.cc (ix86_reassociation_width): Update for Znver5.
* config/i386/x86-tune-costs.h (znver5_costs): Update reassociation
widths.

(cherry picked from commit f0ab3de6ec0e3540f2e57f3f5628005f0a4e3fa5)

6 months agoZen5 tuning part 3: scheduler tweaks
Jan Hubicka [Tue, 3 Sep 2024 14:26:16 +0000 (16:26 +0200)] 
Zen5 tuning part 3: scheduler tweaks

this patch adds support for new fussion in znver5 documented in the
optimization manual:

   The Zen5 microarchitecture adds support to fuse reg-reg MOV Instructions
   with certain ALU instructions. The following conditions need to be met for
   fusion to happen:
     - The MOV should be reg-reg mov with Opcode 0x89 or 0x8B
     - The MOV is followed by an ALU instruction where the MOV and ALU destination register match.
     - The ALU instruction may source only registers or immediate data. There cannot be any memory source.
     - The ALU instruction sources either the source or dest of MOV instruction.
     - If ALU instruction has 2 reg sources, they should be different.
     - The following ALU instructions can fuse with an older qualified MOV instruction:
       ADD ADC AND XOR OP SUB SBB INC DEC NOT SAL / SHL SHR SAR
       (I assume OP is OR)

I also increased issue rate from 4 to 6.  Theoretically znver5 can do more, but
with our model we can't realy use it.
Increasing issue rate to 8 leads to infinite loop in scheduler.

Finally, I also enabled fuse_alu_and_branch since it is supported by
znver5 (I think by earlier zens too).

New fussion pattern moves quite few instructions around in common code:
@@ -2210,13 +2210,13 @@
        .cfi_offset 3, -32
        leaq    63(%rsi), %rbx
        movq    %rbx, %rbp
+       shrq    $6, %rbp
+       salq    $3, %rbp
        subq    $16, %rsp
        .cfi_def_cfa_offset 48
        movq    %rdi, %r12
-       shrq    $6, %rbp
-       movq    %rsi, 8(%rsp)
-       salq    $3, %rbp
        movq    %rbp, %rdi
+       movq    %rsi, 8(%rsp)
        call    _Znwm
        movq    8(%rsp), %rsi
        movl    $0, 8(%r12)
@@ -2224,8 +2224,8 @@
        movq    %rax, (%r12)
        movq    %rbp, 32(%r12)
        testq   %rsi, %rsi
-       movq    %rsi, %rdx
        cmovns  %rsi, %rbx
+       movq    %rsi, %rdx
        sarq    $63, %rdx
        shrq    $58, %rdx
        sarq    $6, %rbx
which should help decoder bandwidth and perhaps also cache, though I was not
able to measure off-noise effect on SPEC.

gcc/ChangeLog:

* config/i386/i386.h (TARGET_FUSE_MOV_AND_ALU): New tune.
* config/i386/x86-tune-sched.cc (ix86_issue_rate): Updat for znver5.
(ix86_adjust_cost): Add TODO about znver5 memory latency.
(ix86_fuse_mov_alu_p): New.
(ix86_macro_fusion_pair_p): Use it.
* config/i386/x86-tune.def (X86_TUNE_FUSE_ALU_AND_BRANCH): Add ZNVER5.
(X86_TUNE_FUSE_MOV_AND_ALU): New tune;

(cherry picked from commit e2125a600552bc6e0329e3f1224eea14804db8d3)

6 months agoDaily bump.
GCC Administrator [Tue, 7 Jan 2025 00:21:31 +0000 (00:21 +0000)] 
Daily bump.

6 months agoDaily bump.
GCC Administrator [Mon, 6 Jan 2025 00:19:13 +0000 (00:19 +0000)] 
Daily bump.

6 months agoAda: Fix build for dummy s-taprop
Estevan Castilho (Tevo) [Sat, 28 Dec 2024 20:37:37 +0000 (20:37 +0000)] 
Ada: Fix build for dummy s-taprop

gcc/ada
* libgnarl/s-taprop__dummy.adb: Remove use clause for
System.Parameters.
(Unlock): Remove Global_Lock formal parameter.
(Write_Lock): Likewise.

6 months agoada: Fix internal error on aggregate nested in container aggregate
Eric Botcazou [Wed, 6 Sep 2023 07:37:29 +0000 (09:37 +0200)] 
ada: Fix internal error on aggregate nested in container aggregate

This handles the case where a component association is present.

gcc/ada/
PR ada/118234
* exp_aggr.adb (Convert_To_Assignments): In the case of a
component association, call Is_Container_Aggregate on the parent's
parent.
(Expand_Array_Aggregate): Likewise.

6 months agoada: Fix internal error on aggregate within container aggregate
Eric Botcazou [Thu, 25 May 2023 22:09:14 +0000 (00:09 +0200)] 
ada: Fix internal error on aggregate within container aggregate

This just applies the same fix to Expand_Array_Aggregate as the one that was
recently applied to Convert_To_Assignments.

gcc/ada/
PR ada/118234
* exp_aggr.adb (Convert_To_Assignments): Tweak comment.
(Expand_Array_Aggregate): Do not delay the expansion if the parent
node is a container aggregate.

6 months agoada: Fix crash on vector initialization
Marc Poulhiès [Mon, 27 Mar 2023 14:47:04 +0000 (16:47 +0200)] 
ada: Fix crash on vector initialization

Initializing a vector using

 Vec : V.Vector := [Some_Type'(Some_Abstract_Type with F => 0)];

may crash the compiler. The expander marks the N_Extension_Aggregate for
delayed expansion which never happens and incorrectly ends up in gigi.

The delayed expansion is needed for nested aggregates, which the
original code is testing for, but container aggregates are handled
differently.

Such assignments to container aggregates are later transformed into
procedure calls to the procedures named in the Aggregate aspect
definition, for which the delayed expansion is not required/expected.

gcc/ada/
PR ada/118234
* exp_aggr.adb (Convert_To_Assignments): Do not mark node for
delayed expansion if parent type has the Aggregate aspect.
* sem_util.adb (Is_Container_Aggregate): Move...
* sem_util.ads (Is_Container_Aggregate): ... here and make it
public.

6 months agoDaily bump.
GCC Administrator [Sun, 5 Jan 2025 00:19:05 +0000 (00:19 +0000)] 
Daily bump.

6 months agoDaily bump.
GCC Administrator [Sat, 4 Jan 2025 00:20:40 +0000 (00:20 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Fri, 3 Jan 2025 00:20:03 +0000 (00:20 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Thu, 2 Jan 2025 00:23:24 +0000 (00:23 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Wed, 1 Jan 2025 00:21:55 +0000 (00:21 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Tue, 31 Dec 2024 00:21:33 +0000 (00:21 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Mon, 30 Dec 2024 00:20:30 +0000 (00:20 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Sun, 29 Dec 2024 00:20:56 +0000 (00:20 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Sat, 28 Dec 2024 00:21:02 +0000 (00:21 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Fri, 27 Dec 2024 00:20:00 +0000 (00:20 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Thu, 26 Dec 2024 00:21:47 +0000 (00:21 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Wed, 25 Dec 2024 00:20:54 +0000 (00:20 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Tue, 24 Dec 2024 00:22:02 +0000 (00:22 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Mon, 23 Dec 2024 00:20:44 +0000 (00:20 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Sun, 22 Dec 2024 00:21:42 +0000 (00:21 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Sat, 21 Dec 2024 00:21:43 +0000 (00:21 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Fri, 20 Dec 2024 00:21:42 +0000 (00:21 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Thu, 19 Dec 2024 00:21:58 +0000 (00:21 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Wed, 18 Dec 2024 00:21:46 +0000 (00:21 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Tue, 17 Dec 2024 00:21:46 +0000 (00:21 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Mon, 16 Dec 2024 00:20:41 +0000 (00:20 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Sun, 15 Dec 2024 00:20:26 +0000 (00:20 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Sat, 14 Dec 2024 00:22:01 +0000 (00:22 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Fri, 13 Dec 2024 00:21:07 +0000 (00:21 +0000)] 
Daily bump.

7 months agoFix precondition failure with Ada.Numerics.Generic_Real_Arrays.Eigenvalues
Eric Botcazou [Thu, 12 Dec 2024 15:25:09 +0000 (16:25 +0100)] 
Fix precondition failure with Ada.Numerics.Generic_Real_Arrays.Eigenvalues

This fixes a precondition failure triggered when the Eigenvalues routine
of Ada.Numerics.Generic_Real_Arrays is instantiated with -gnata, beause
it calls Sort_Eigensystem on an empty vector.

gcc/ada
PR ada/117996
* libgnat/a-ngrear.adb (Jacobi): Remove default value for
Compute_Vectors formal parameter.
(Sort_Eigensystem): Add Compute_Vectors formal parameter.  Do not
modify the Vectors if Compute_Vectors is False.
(Eigensystem): Pass True as Compute_Vectors to Sort_Eigensystem.
(Eigenvalues): Pass False as Compute_Vectors to Sort_Eigensystem.

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

7 months agoDaily bump.
GCC Administrator [Thu, 12 Dec 2024 00:20:00 +0000 (00:20 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Wed, 11 Dec 2024 00:20:06 +0000 (00:20 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Tue, 10 Dec 2024 00:20:45 +0000 (00:20 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Mon, 9 Dec 2024 00:19:24 +0000 (00:19 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Sun, 8 Dec 2024 00:19:57 +0000 (00:19 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Sat, 7 Dec 2024 00:20:54 +0000 (00:20 +0000)] 
Daily bump.

7 months agoDaily bump.
GCC Administrator [Fri, 6 Dec 2024 00:20:44 +0000 (00:20 +0000)] 
Daily bump.

7 months agoAVR: target/64242 - Copy FP to a local reg in nonlocal_goto.
Georg-Johann Lay [Wed, 4 Dec 2024 19:56:50 +0000 (20:56 +0100)] 
AVR: target/64242 - Copy FP to a local reg in nonlocal_goto.

In nonlocal_goto sets, change hard_frame_pointer_rtx only after
emit_stack_restore() restored SP.  This is needed because SP
my be stored in some frame location.

gcc/
PR target/64242
* config/avr/avr.md (nonlocal_goto): Don't restore
hard_frame_pointer_rtx directly, but copy it to local
register, and only set hard_frame_pointer_rtx from it
after emit_stack_restore().

(cherry picked from commit f7b5527d1b48b33d8ab633c1e9dcb9883667492a)

7 months agoc++: Don't reject pointer to virtual method during constant evaluation [PR117615]
Simon Martin [Tue, 3 Dec 2024 13:30:43 +0000 (14:30 +0100)] 
c++: Don't reject pointer to virtual method during constant evaluation [PR117615]

We currently reject the following valid code:

=== cut here ===
struct Base {
    virtual void doit (int v) const {}
};
struct Derived : Base {
    void doit (int v) const {}
};
using fn_t = void (Base::*)(int) const;
struct Helper {
    fn_t mFn;
    constexpr Helper (auto && fn) : mFn(static_cast<fn_t>(fn)) {}
};
void foo () {
    constexpr Helper h (&Derived::doit);
}
=== cut here ===

The problem is that since r6-4014-gdcdbc004d531b4, &Derived::doit is
represented with an expression with type pointer to method and using an
INTEGER_CST (here 1), and that cxx_eval_constant_expression rejects any
such expression with a non-null INTEGER_CST.

This patch uses the same strategy as r12-4491-gf45610a45236e9 (fix for
PR c++/102786), and simply lets such expressions go through.

PR c++/117615

gcc/cp/ChangeLog:

* constexpr.cc (cxx_eval_constant_expression): Don't reject
INTEGER_CSTs with type POINTER_TYPE to METHOD_TYPE.

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/constexpr-virtual22.C: New test.

(cherry picked from commit 72a2380a306a1c3883cb7e4f99253522bc265af0)

7 months agoDaily bump.
GCC Administrator [Thu, 5 Dec 2024 00:22:28 +0000 (00:22 +0000)] 
Daily bump.

8 months agoDaily bump.
GCC Administrator [Wed, 4 Dec 2024 00:23:59 +0000 (00:23 +0000)] 
Daily bump.

8 months agoDaily bump.
GCC Administrator [Tue, 3 Dec 2024 00:22:55 +0000 (00:22 +0000)] 
Daily bump.

8 months agoarm, mve: Adding missing Runtime Library Exception to header files
Andre Vieira [Mon, 2 Dec 2024 13:35:03 +0000 (13:35 +0000)] 
arm, mve: Adding missing Runtime Library Exception to header files

Add missing Runtime Library Exception to mve header files to bring them into
line with other similar headers. Not adding it in the first place was an
oversight.

gcc/ChangeLog:

* config/arm/arm_mve.h: Add Runtime Library Exception.
* config/arm/arm_mve_types.h: Likewise.

(cherry picked from commit cde7ce0628f66a5d03cc97c70d4695e6f2acd4db)

8 months agoDaily bump.
GCC Administrator [Mon, 2 Dec 2024 00:21:00 +0000 (00:21 +0000)] 
Daily bump.

8 months agoDaily bump.
GCC Administrator [Sun, 1 Dec 2024 00:20:38 +0000 (00:20 +0000)] 
Daily bump.

8 months agoFortran: Fix failing character pointer fcn assignment [PR105054]
Paul Thomas [Wed, 13 Nov 2024 08:57:55 +0000 (08:57 +0000)] 
Fortran: Fix failing character pointer fcn assignment [PR105054]

2024-11-14  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/105054
* resolve.cc (get_temp_from_expr): If the pointer function has
a deferred character length, generate a new deferred charlen
for the temporary.

gcc/testsuite/
PR fortran/105054
* gfortran.dg/ptr_func_assign_6.f08: New test.

(cherry picked from commit f530a8c61383b174a476b64f46d56adeedf49dc4)

8 months agoDaily bump.
GCC Administrator [Sat, 30 Nov 2024 00:22:00 +0000 (00:22 +0000)] 
Daily bump.

8 months agoDaily bump.
GCC Administrator [Fri, 29 Nov 2024 00:21:42 +0000 (00:21 +0000)] 
Daily bump.

8 months agoDaily bump.
GCC Administrator [Thu, 28 Nov 2024 00:22:14 +0000 (00:22 +0000)] 
Daily bump.

8 months agotree-sra: Avoid SRAing arguments to a function returning_twice (PR 117142)
Martin Jambor [Fri, 15 Nov 2024 13:37:06 +0000 (14:37 +0100)] 
tree-sra: Avoid SRAing arguments to a function returning_twice (PR 117142)

This is a manual bacport of commit
29d8f1f0b7ad3c69b3bdb130325300d5f73aa784 which must be done slightly
elsewhere for gcc 13 and 12 because function
build_access_from_call_arg was added only in gcc 14.

But the gist of the patch is the same.  The commit message of the
original fix says:

PR 117142 shows that the current SRA probably never worked reliably
with arguments passed to a function returning twice, because it then
creates statements before the call which however needs to be at the
beginning of a basic block.

While it should be possible to make at least the case of passing
arguments by value work with SRA (the statements would need to be put
just on the non-abnormal edges leading to the BB), this would mean
large surgery of function sra_modify_expr and I guess the time would
better be spent re-organizing the whole pass.

gcc/ChangeLog:

2024-11-14  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/117142
* tree-sra.cc (scan_function): Disqualify any candidate passed to
a function returning twice.

gcc/testsuite/ChangeLog:

2024-11-14  Martin Jambor  <mjambor@suse.cz>

* gcc.dg/tree-ssa/pr117142.c: New test.

(cherry picked from commit 6244de432a5ba9807c6f0065e70a8025af7b1bd6)

8 months agoFortran: Partial reversion of r15-5083 [PR117763]
Paul Thomas [Tue, 26 Nov 2024 08:58:21 +0000 (08:58 +0000)] 
Fortran: Partial reversion of r15-5083 [PR117763]

2024-11-26  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/117763
* trans-array.cc (gfc_get_array_span): Guard against derefences
of 'expr'. Clean up some typos. Use 'gfc_get_vptr_from_expr'
for clarity and apply a functional reversion of last section
that deals with class dummies.

gcc/testsuite/
PR fortran/117763
* gfortran.dg/pr117763.f90: New test.

(cherry picked from commit 8278d9551df610179fca114808a7e6e62bab3d82)

8 months agoDaily bump.
GCC Administrator [Wed, 27 Nov 2024 00:21:35 +0000 (00:21 +0000)] 
Daily bump.

8 months agognat: fix lto-type-mismatch between C_Version_String and gnat_version_string [PR115917]
Arsen Arsenović [Thu, 15 Aug 2024 17:17:41 +0000 (19:17 +0200)] 
gnat: fix lto-type-mismatch between C_Version_String and gnat_version_string [PR115917]

gcc/ada/ChangeLog:

PR ada/115917
* gnatvsn.ads: Add note about the duplication of this value in
version.c.
* version.c (VER_LEN_MAX): Define to the same value as
Gnatvsn.Ver_Len_Max.
(gnat_version_string): Use VER_LEN_MAX as bound.

(cherry picked from commit 9cbcf8d1de159e6113fafb5dc2feb4a7e467a302)

8 months agoFix uninitialized operands[2] in vec_unpacks_hi_v4sf.
liuhongt [Fri, 22 Nov 2024 07:57:38 +0000 (23:57 -0800)] 
Fix uninitialized operands[2] in vec_unpacks_hi_v4sf.

It could cause weired spill in RA when register pressure is high.

gcc/ChangeLog:

PR target/117562
* config/i386/sse.md (vec_unpacks_hi_v4sf): Initialize
operands[2] with CONST0_RTX.

(cherry picked from commit ba4cf2e296d8d5950c3d356fa6b6efcad00d0189)

8 months agoDaily bump.
GCC Administrator [Tue, 26 Nov 2024 00:20:05 +0000 (00:20 +0000)] 
Daily bump.

8 months agoDaily bump.
GCC Administrator [Mon, 25 Nov 2024 00:20:04 +0000 (00:20 +0000)] 
Daily bump.

8 months agoDaily bump.
GCC Administrator [Sun, 24 Nov 2024 00:21:09 +0000 (00:21 +0000)] 
Daily bump.

8 months agoFortran: Fix elemental array refs in SELECT TYPE [PR109345]
Paul Thomas [Mon, 11 Nov 2024 12:21:57 +0000 (12:21 +0000)] 
Fortran: Fix elemental array refs in SELECT TYPE [PR109345]

2024-11-10  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/109345
* trans-array.cc (gfc_get_array_span): Unlimited polymorphic
expressions are now treated separately since the span need not
be the same as the element size.

gcc/testsuite/
PR fortran/109345
* gfortran.dg/character_workout_1.f90: Cut trailing whitespace.
* gfortran.dg/pr109345.f90: New test.

(cherry picked from commit e22d80d4f0f8d33f538c1a4bad07b2c819a6d55c)

8 months agoAVR: target/117744 - Fix asm for partial clobber of address reg,
Georg-Johann Lay [Sat, 23 Nov 2024 11:51:32 +0000 (12:51 +0100)] 
AVR: target/117744 - Fix asm for partial clobber of address reg,

gcc/
PR target/117744
* config/avr/avr.cc (out_movqi_r_mr): Fix code when a load
only partially clobbers an address register due to
changing the address register temporally to accommodate for
faked addressing modes.

(cherry picked from commit ee8e6784876aa050d2e01f54d1da4acf758b635a)

8 months agoDaily bump.
GCC Administrator [Sat, 23 Nov 2024 00:24:30 +0000 (00:24 +0000)] 
Daily bump.

8 months agoDaily bump.
GCC Administrator [Fri, 22 Nov 2024 00:22:04 +0000 (00:22 +0000)] 
Daily bump.

8 months agoDaily bump.
GCC Administrator [Thu, 21 Nov 2024 00:22:28 +0000 (00:22 +0000)] 
Daily bump.

8 months agoDaily bump.
GCC Administrator [Wed, 20 Nov 2024 00:21:13 +0000 (00:21 +0000)] 
Daily bump.

8 months agoi386: Enable *rsqrtsf2_sse without TARGET_SSE_MATH [PR117357]
Uros Bizjak [Mon, 18 Nov 2024 21:38:46 +0000 (22:38 +0100)] 
i386: Enable *rsqrtsf2_sse without TARGET_SSE_MATH [PR117357]

__builtin_ia32_rsqrtsf2 expander generates UNSPEC_RSQRT insn pattern
also when TARGET_SSE_MATH is not set.  Enable *rsqrtsf2_sse without
TARGET_SSE_MATH to avoid ICE with unrecognizable insn.

PR target/117357

gcc/ChangeLog:

* config/i386/i386.md (*rsqrtsf2_sse):
Also enable for !TARGET_SSE_MATH.

gcc/testsuite/ChangeLog:

* gcc.target/i386/pr117357.c: New test.

(cherry picked from commit 344356f781ddb7bf0abb11edf9bdd13f6802dea8)

8 months agoDaily bump.
GCC Administrator [Tue, 19 Nov 2024 00:20:33 +0000 (00:20 +0000)] 
Daily bump.

8 months agoAVR: target/117659 - Fix wrong code for u24 << 16.
Georg-Johann Lay [Mon, 18 Nov 2024 17:12:38 +0000 (18:12 +0100)] 
AVR: target/117659 - Fix wrong code for u24 << 16.

gcc/
PR target/117659
* config/avr/avr.cc (avr_out_ashlpsi3) [case 16]: Use %A1 as
input (instead of bogus %A0).

(cherry picked from commit bba27015f2815a8fa6fae46a29a70644e868341c)

8 months agoDaily bump.
GCC Administrator [Mon, 18 Nov 2024 00:21:34 +0000 (00:21 +0000)] 
Daily bump.

8 months agoDaily bump.
GCC Administrator [Sun, 17 Nov 2024 00:24:56 +0000 (00:24 +0000)] 
Daily bump.

8 months agoDaily bump.
GCC Administrator [Sat, 16 Nov 2024 00:20:38 +0000 (00:20 +0000)] 
Daily bump.

8 months agoDaily bump.
GCC Administrator [Fri, 15 Nov 2024 00:20:23 +0000 (00:20 +0000)] 
Daily bump.

8 months agoDaily bump.
GCC Administrator [Thu, 14 Nov 2024 17:21:45 +0000 (17:21 +0000)] 
Daily bump.

8 months agohppa: Remove inner `fix:SF/DF` from fixed-point patterns
John David Anglin [Wed, 13 Nov 2024 14:40:42 +0000 (09:40 -0500)] 
hppa: Remove inner `fix:SF/DF` from fixed-point patterns

2024-11-13  John David Anglin  <danglin@gcc.gnu.org>

gcc/ChangeLog:

PR target/117525
* config/pa/pa.md (fix_truncsfsi2): Remove inner `fix:SF`.
(fix_truncdfsi2, fix_truncsfdi2, fix_truncdfdi2,
fixuns_truncsfsi2, fixuns_truncdfsi2, fixuns_truncsfdi2,
fixuns_truncdfdi2): Likewise.

8 months agoi386: Zero extend 32-bit address to 64-bit with option -mx32 -maddress-mode=long...
Hu, Lin1 [Wed, 6 Nov 2024 07:42:13 +0000 (15:42 +0800)] 
i386: Zero extend 32-bit address to 64-bit with option -mx32 -maddress-mode=long. [PR 117418]

-maddress-mode=long let Pmode = DI_mode, so zero extend 32-bit address to
64-bit and uses a 64-bit register as a pointer for avoid raise an ICE.

gcc/ChangeLog:

PR target/117418
* config/i386/i386-expand.cc (ix86_expand_builtin): Convert
pointer's mode according to Pmode.

gcc/testsuite/ChangeLog:

PR target/117418
* gcc.target/i386/pr117418-1.c: New test.

(cherry picked from commit 2272cd2508f1854c880082f792de15e76ec09a99)

8 months agoDaily bump.
GCC Administrator [Wed, 13 Nov 2024 00:20:50 +0000 (00:20 +0000)] 
Daily bump.

8 months agohppa: Fix decrement_and_branch_until_zero constraint
John David Anglin [Tue, 12 Nov 2024 19:26:08 +0000 (14:26 -0500)] 
hppa: Fix decrement_and_branch_until_zero constraint

The third alternative for argument 4 needs to be an early clobber
constraint.  Noticed testing LRA.

2024-11-12  John David Anglin  <danglin@gcc.gnu.org>

gcc/ChangeLog:

* config/pa/pa.md (decrement_and_branch_until_zero): Fix
constraint.

8 months agoDaily bump.
GCC Administrator [Tue, 12 Nov 2024 00:21:19 +0000 (00:21 +0000)] 
Daily bump.

8 months agoDaily bump.
GCC Administrator [Mon, 11 Nov 2024 00:19:12 +0000 (00:19 +0000)] 
Daily bump.

8 months agoDaily bump.
GCC Administrator [Sun, 10 Nov 2024 00:19:35 +0000 (00:19 +0000)] 
Daily bump.

8 months agoDaily bump.
GCC Administrator [Sat, 9 Nov 2024 16:05:14 +0000 (16:05 +0000)] 
Daily bump.

8 months agoDaily bump.
GCC Administrator [Thu, 7 Nov 2024 00:20:45 +0000 (00:20 +0000)] 
Daily bump.

8 months agoDaily bump.
GCC Administrator [Wed, 6 Nov 2024 00:21:21 +0000 (00:21 +0000)] 
Daily bump.

8 months agoc++: Defer -fstrong-eval-order processing to template instantiation time [PR117158]
Simon Martin [Tue, 5 Nov 2024 09:07:42 +0000 (10:07 +0100)] 
c++: Defer -fstrong-eval-order processing to template instantiation time [PR117158]

Since r10-3793-g1a37b6d9a7e57c, we ICE upon the following valid code
with -std=c++17 and above

=== cut here ===
struct Base {
  unsigned int *intarray;
};
template <typename T> struct Sub : public Base {
  bool Get(int i) {
    return (Base::intarray[++i] == 0);
  }
};
=== cut here ===

The problem is that from c++17 on, we use -fstrong-eval-order and need
to wrap the array access expression into a SAVE_EXPR. We do so at
template declaration time, and end up calling contains_placeholder_p
with a SCOPE_REF, that it does not handle well.

This patch fixes this by deferring the wrapping into SAVE_EXPR to
instantiation time for templates, when the SCOPE_REF will have been
turned into a COMPONENT_REF.

PR c++/117158

gcc/cp/ChangeLog:

* typeck.cc (cp_build_array_ref): Only wrap array expression
into a SAVE_EXPR at template instantiation time.

gcc/testsuite/ChangeLog:

* g++.dg/cpp1z/eval-order13.C: New test.
* g++.dg/parse/crash77.C: New test.

(cherry picked from commit b1d92aeb8583c8d1491c97703680c5fb88ed1fe4)

8 months agoDaily bump.
GCC Administrator [Tue, 5 Nov 2024 00:21:42 +0000 (00:21 +0000)] 
Daily bump.

8 months agoDon't call invert on VARYING.
Andrew MacLeod [Mon, 4 Nov 2024 15:02:35 +0000 (10:02 -0500)] 
Don't call invert on VARYING.

When all cases go to one label and resul in a VARYING value, we can't
invert that value to remove all values from the default case. Simply
check for this case and set the default to UNDEFINED.

PR tree-optimization/117398
gcc/
* gimple-range-edge.cc (gimple_outgoing_range::calc_switch_ranges):
Check for VARYING and don't call invert () on it.

gcc/testsuite/
* gcc.dg/pr117398.c: New.