]> gcc.gnu.org Git - gcc.git/log
gcc.git
3 years agoDaily bump.
GCC Administrator [Fri, 26 Mar 2021 00:18:41 +0000 (00:18 +0000)]
Daily bump.

3 years agolibgomp HSA/GCN plugins: don't prepend the 'HSA_RUNTIME_LIB' path to 'libhsa-runtime6...
Thomas Schwinge [Thu, 25 Jun 2020 09:59:42 +0000 (11:59 +0200)]
libgomp HSA/GCN plugins: don't prepend the 'HSA_RUNTIME_LIB' path to 'libhsa-runtime64.so'

For unknown reasons, this had gotten added for the libgomp HSA plugin in commit
b8d89b03db5f212919e4571671ebb4f5f8b1e19d (r242749) "Remove build dependence on
HSA run-time", and later propagated into the GCN plugin.

libgomp/
* plugin/plugin-hsa.c (init_enviroment_variables): Don't prepend
the 'HSA_RUNTIME_LIB' path to 'libhsa-runtime64.so'.
* plugin/configfrag.ac (HSA_RUNTIME_LIB): Clean up.
* config.h.in: Regenerate.
* configure: Likewise.

(cherry picked from commit 7c1e856bedb4ae190c420ec2d2ca5e08730cf21d)

3 years agors6000: Correct Power8 cost of l2 cache size [PR97329]
Xionghu Luo [Thu, 25 Mar 2021 04:45:58 +0000 (23:45 -0500)]
rs6000: Correct Power8 cost of l2 cache size [PR97329]

This patch is a backport to gcc 9 from master.
L2 cache size for Power8 is 512kB, it was copied from Power7 before
public.  Tested no performance change for SPEC2017.

gcc/
2021-03-25  Xionghu Luo  <luoxhu@linux.ibm.com>

PR target/97329
* config/rs6000/rs6000.c (power8_costs): Change l2 cache
from 256 to 512.

(cherry picked from commit 08103e4d6ada9b57366f2df2a2b745babfab914c)

3 years agoDaily bump.
GCC Administrator [Thu, 25 Mar 2021 00:19:03 +0000 (00:19 +0000)]
Daily bump.

3 years agoFortran: Fix 'name' bound size [PR99688]
Tobias Burnus [Mon, 22 Mar 2021 08:49:48 +0000 (09:49 +0100)]
Fortran: Fix 'name' bound size [PR99688]

gcc/fortran/ChangeLog:

PR fortran/99688
* match.c (select_type_set_tmp, gfc_match_select_type) Fix 'name'
buffersize to avoid out of bounds.
* resolve.c (resolve_select_type): Likewise.

(cherry picked from commit 0e792ee11aa6ebb6f61e9ed33eb06e260f0ec703)

3 years agoDaily bump.
GCC Administrator [Wed, 24 Mar 2021 00:18:52 +0000 (00:18 +0000)]
Daily bump.

3 years agox86: Add __volatile__ to __cpuid and __cpuid_count
H.J. Lu [Mon, 22 Mar 2021 02:47:24 +0000 (19:47 -0700)]
x86: Add __volatile__ to __cpuid and __cpuid_count

Since CPUID instruction may return different values on hybrid core.
volatile is needed on asm statements in <cpuid.h>.

PR target/99704
* config/i386/cpuid.h (__cpuid): Add __volatile__.
(__cpuid_count): Likewise.

(cherry picked from commit 9c89c9e9c6b59260c7745c8714b69f94784a9c13)

3 years agoDaily bump.
GCC Administrator [Tue, 23 Mar 2021 00:18:52 +0000 (00:18 +0000)]
Daily bump.

3 years agoPR target/99702: Check RTL type before get value
Kito Cheng [Mon, 22 Mar 2021 08:32:45 +0000 (16:32 +0800)]
PR target/99702: Check RTL type before get value

gcc/ChangeLog:

PR target/99702
* config/riscv/riscv.c (riscv_expand_block_move): Get RTL value
after type checking.

gcc/testsuite/ChangeLog:

PR target/99702
* gcc.target/riscv/pr99702.c: New.

(cherry picked from commit 540dace2ed3949571f2ce6cb007354e69bda0cb2)

3 years agoDaily bump.
GCC Administrator [Mon, 22 Mar 2021 00:18:38 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 21 Mar 2021 00:18:33 +0000 (00:18 +0000)]
Daily bump.

3 years agoPR fortran/97491 - Wrong restriction for VALUE arguments of pure procedures
Harald Anlauf [Tue, 27 Oct 2020 19:25:23 +0000 (20:25 +0100)]
PR fortran/97491 - Wrong restriction for VALUE arguments of pure procedures

A dummy argument with the VALUE attribute may be redefined in a PURE or
ELEMENTAL procedure.  Adjust the associated purity check.

gcc/fortran/ChangeLog:

* resolve.c (gfc_impure_variable): A dummy argument with the VALUE
attribute may be redefined without making a procedure impure.

gcc/testsuite/ChangeLog:

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

(cherry picked from commit a764c40079a493826a3678174f908941a383644e)

3 years agoDaily bump.
GCC Administrator [Sat, 20 Mar 2021 00:18:49 +0000 (00:18 +0000)]
Daily bump.

3 years agosubstitute @tie{} with a space for the man pages
Matthias Klose [Fri, 19 Mar 2021 10:03:02 +0000 (10:03 +0000)]
substitute @tie{} with a space for the man pages

contrib/

2021-03-19  Matthias Klose  <doko@ubuntu.com>

* texi2pod.pl: Substitute @tie{} with a space for the man pages.

(cherry picked from commit 3b0155305e5168b48d19f74e9bfcdf423a532ada)

3 years agoDaily bump.
GCC Administrator [Fri, 19 Mar 2021 00:18:39 +0000 (00:18 +0000)]
Daily bump.

3 years agoPR target/99314: Fix integer signedness issue for cpymem pattern expansion.
Sinan Lin [Thu, 4 Mar 2021 10:02:39 +0000 (18:02 +0800)]
PR target/99314: Fix integer signedness issue for cpymem pattern expansion.

Third operand of cpymem pattern is unsigned HOST_WIDE_INT, however we
are interpret that as signed HOST_WIDE_INT, that not a problem in
most case, but when the value is large than signed HOST_WIDE_INT, it
might screw up since we have using that value to calculate the buffer
size.

2021-03-05  Sinan Lin  <sinan@isrc.iscas.ac.cn>
    Kito Cheng  <kito.cheng@sifive.com>

gcc/ChangeLog:

* config/riscv/riscv.c (riscv_block_move_straight): Change type
to unsigned HOST_WIDE_INT for parameter and local variable with
HOST_WIDE_INT type.
(riscv_adjust_block_mem): Ditto.
(riscv_block_move_loop): Ditto.
(riscv_expand_block_move): Ditto.

(cherry picked from commit d9f0ade001533c9544bf2153b6baa8844ec0bee4)

3 years agoDaily bump.
GCC Administrator [Thu, 18 Mar 2021 00:18:43 +0000 (00:18 +0000)]
Daily bump.

3 years agoaarch64: Fix status return logic in RNG intrinsics
Kyrylo Tkachov [Wed, 17 Mar 2021 18:21:05 +0000 (18:21 +0000)]
aarch64: Fix status return logic in RNG intrinsics

There is a bug with the RNG intrinsics in their return code. The definition says:

"Stores a 64-bit random number into the object pointed to by the argument and returns zero.
If the implementation could not generate a random number within a reasonable period of time
the object pointed to by the input is set to zero and a non-zero value is returned."

This means we should be testing whether to return non-zero with:
CSET W0, EQ
rather than NE.

This patch fixes that.

gcc/ChangeLog:

* config/aarch64/aarch64-builtins.c (aarch64_expand_rng_builtin): Use EQ
to compare against CC_REG rather than NE.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/acle/rng_2.c: New test.

(cherry picked from commit f7581eb38eeaa8af64f3cdfe2faf764f5883f16f)

3 years agoipa: Fix resolving speculations through cgraph_edge::set_call_stmt
Martin Jambor [Wed, 17 Mar 2021 10:32:50 +0000 (11:32 +0100)]
ipa: Fix resolving speculations through cgraph_edge::set_call_stmt

In the PR 98078 testcase, speculative call-graph edges which were
created by IPA-CP are confirmed during inlining but
cgraph_edge::set_call_stmt does not take it very well.

The function enters the update_speculative branch and updates the
edges in the speculation bundle separately (by a recursive call), but
when it processes the first direct edge, most of the bundle actually
ceases to exist because it is devirtualized.  It nevertheless goes on
to attempt to update the indirect edge (that has just been removed),
which surprisingly gets as far as adding the edge to the
call_site_hash, the same devirtualized edge for the second time, and
that triggers an assert.

Fixed by this patch which makes the function aware that it is about to
resolve a speculation and do so instead of updating components of
speculation.  Also, it does so before dealing with the hash because
the speculation resolution code needs the hash to point to the first
speculative direct edge and also cleans the hash up by calling
update_call_stmt_hash_for_removing_direct_edge.

Bootstrapped and tested on x86_64-linux, also profile-LTO-bootstrapped
on the same system.

gcc/ChangeLog:

2021-01-20  Martin Jambor  <mjambor@suse.cz>

PR ipa/98078
* cgraph.c (cgraph_edge::set_call_stmt): Do not update all
corresponding speculative edges if we are about to resolve
speculation.  Make edge direct (and so resolve speculations) before
removing it from call_site_hash.
(cgraph_edge::make_direct): Relax the initial assert to allow calling
the function on speculative direct edges.

(cherry picked from commit b8188b7d7382e4a74af5dd6a125e76e8d43a68a5)

3 years agotree-optimization/98758 - fix integer arithmetic in data-ref analysis
Richard Biener [Wed, 20 Jan 2021 07:48:34 +0000 (08:48 +0100)]
tree-optimization/98758 - fix integer arithmetic in data-ref analysis

This fixes some int arithmetic issues and a bogus truncation.

2021-01-20  Richard Biener  <rguenther@suse.de>

PR tree-optimization/98758
* tree-data-ref.c (int_divides_p): Use lambda_int arguments.
(lambda_matrix_right_hermite): Avoid undefinedness with
signed integer abs and multiplication.
(analyze_subscript_affine_affine): Use lambda_int.

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

(cherry picked from commit 85977f624a34eac309f9d77a58164553dfc82975)

3 years agotree-optimization/98282 - classify V_C_E<constant> as nary
Richard Biener [Mon, 4 Jan 2021 10:40:40 +0000 (11:40 +0100)]
tree-optimization/98282 - classify V_C_E<constant> as nary

This avoids running into memory reference code in compute_avail by
properly classifying unfolded reference trees on constants.

2021-01-04  Richard Biener  <rguenther@suse.de>

PR tree-optimization/98282
* tree-ssa-sccvn.c (vn_get_stmt_kind): Classify tcc_reference on
invariants as VN_NARY.

* g++.dg/opt/pr98282.C: New testcase.

(cherry picked from commit edb7dbc25de455300ce066a2ebe728256ea46e3a)

3 years agotree-optimization/98117 - fix range set by vectorization on niter IVs
Richard Biener [Mon, 7 Dec 2020 09:29:07 +0000 (10:29 +0100)]
tree-optimization/98117 - fix range set by vectorization on niter IVs

This avoids the degenerate case of a TYPE_MAX_VALUE latch iteration
count value causing wrong range info for the vector IV.  There's
still the case of VF == 1 where if we don't know whether we hit the
above case we cannot emit a range.

2020-12-07  Richard Biener  <rguenther@suse.de>

PR tree-optimization/98117
* tree-vect-loop-manip.c (vect_gen_vector_loop_niters):
Properly handle degenerate niter when setting the vector
loop IV range.

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

(cherry picked from commit 69894ce172412996c10c89838717980ede7c9003)

3 years agotree-optimization/93964 - adjust ISL code generation for pointer params
Richard Biener [Wed, 4 Mar 2020 09:40:32 +0000 (10:40 +0100)]
tree-optimization/93964 - adjust ISL code generation for pointer params

Pointers eventually need intermediate conversions in code generation.
Allowing them is much easier than fending them off since niter
and scev expansion easily drag those in.

2020-02-04  Richard Biener  <rguenther@suse.de>

PR tree-optimization/93964
* graphite-isl-ast-to-gimple.c
(gcc_expression_from_isl_ast_expr_id): Add intermediate
conversion for pointer to integer converts.
* graphite-scop-detection.c (assign_parameter_index_in_region):
Relax assert.

* gcc.dg/graphite/pr93964.c: New testcase.

(cherry picked from commit dca54007ebb5d49c3d6cea63ee87fd8f3ccb9ca5)

3 years agoDaily bump.
GCC Administrator [Wed, 17 Mar 2021 00:18:42 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 16 Mar 2021 10:57:50 +0000 (10:57 +0000)]
Daily bump.

3 years agoFortran: Fix problem with allocate initialization [PR99545].
Paul Thomas [Mon, 15 Mar 2021 09:32:52 +0000 (09:32 +0000)]
Fortran: Fix problem with allocate initialization [PR99545].

2021-03-15  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran/ChangeLog

PR fortran/99545
* trans-stmt.c (gfc_trans_allocate): Mark the initialization
assignment by setting init_flag.

gcc/testsuite/ChangeLog

PR fortran/99545
* gfortran.dg/pr99545.f90: New test.

(cherry picked from commit 21ced2776a117924e52f6aab8b41afb613fef0e7)

3 years agoDaily bump.
GCC Administrator [Mon, 15 Mar 2021 00:18:57 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 14 Mar 2021 00:18:37 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 13 Mar 2021 00:18:39 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Fri, 12 Mar 2021 00:18:49 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Thu, 11 Mar 2021 00:18:55 +0000 (00:18 +0000)]
Daily bump.

3 years agoFix Ada bootstrap on Cygwin64
Mikael Pettersson [Tue, 9 Mar 2021 15:58:56 +0000 (08:58 -0700)]
Fix Ada bootstrap on Cygwin64

gcc/ada/
PR bootstrap/94918
* raise-gcc.c: On Cygwin include mingw32.h to prevent
windows.h from including x86intrin.h or emmintrin.h.

3 years agoDaily bump.
GCC Administrator [Wed, 10 Mar 2021 00:19:06 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 9 Mar 2021 00:19:24 +0000 (00:19 +0000)]
Daily bump.

3 years agoruntime: cast SIGSTKSZ to uintptr
Ian Lance Taylor [Mon, 8 Mar 2021 23:24:06 +0000 (15:24 -0800)]
runtime: cast SIGSTKSZ to uintptr

PR go/99458
* libgo/runtime/proc.c: cast SIGSTKSZ to uintptr
In newer versions of glibc it is long, which causes a signed
comparison warning.

3 years agoDaily bump.
GCC Administrator [Mon, 8 Mar 2021 00:18:57 +0000 (00:18 +0000)]
Daily bump.

3 years agoPR libfortran/99218 - matmul on temporary array accesses invalid memory
Harald Anlauf [Fri, 5 Mar 2021 19:57:54 +0000 (20:57 +0100)]
PR libfortran/99218 - matmul on temporary array accesses invalid memory

Do not invoke tuned rank-2 times rank-2 matmul if rank(b) == 1.

libgfortran/ChangeLog:

PR libfortran/99218
* m4/matmul_internal.m4: Invoke tuned matmul only for rank(b)>1.
* generated/matmul_c10.c: Regenerated.
* generated/matmul_c16.c: Likewise.
* generated/matmul_c4.c: Likewise.
* generated/matmul_c8.c: Likewise.
* generated/matmul_i1.c: Likewise.
* generated/matmul_i16.c: Likewise.
* generated/matmul_i2.c: Likewise.
* generated/matmul_i4.c: Likewise.
* generated/matmul_i8.c: Likewise.
* generated/matmul_r10.c: Likewise.
* generated/matmul_r16.c: Likewise.
* generated/matmul_r4.c: Likewise.
* generated/matmul_r8.c: Likewise.
* generated/matmulavx128_c10.c: Likewise.
* generated/matmulavx128_c16.c: Likewise.
* generated/matmulavx128_c4.c: Likewise.
* generated/matmulavx128_c8.c: Likewise.
* generated/matmulavx128_i1.c: Likewise.
* generated/matmulavx128_i16.c: Likewise.
* generated/matmulavx128_i2.c: Likewise.
* generated/matmulavx128_i4.c: Likewise.
* generated/matmulavx128_i8.c: Likewise.
* generated/matmulavx128_r10.c: Likewise.
* generated/matmulavx128_r16.c: Likewise.
* generated/matmulavx128_r4.c: Likewise.
* generated/matmulavx128_r8.c: Likewise.

gcc/testsuite/ChangeLog:

PR libfortran/99218
* gfortran.dg/matmul_21.f90: New test.

(cherry picked from commit b1bee29167df6b0fbc9a4c8d06e2acbf3367af47)

3 years agoAdd mi_thunk support for vcalls on hppa.
John David Anglin [Sun, 7 Mar 2021 17:44:49 +0000 (17:44 +0000)]
Add mi_thunk support for vcalls on hppa.

gcc/ChangeLog:

PR target/85074
* config/pa/pa.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Define as
hook_bool_const_tree_hwi_hwi_const_tree_true.
(pa_asm_output_mi_thunk): Add support for nonzero vcall_offset.

3 years agoDaily bump.
GCC Administrator [Sun, 7 Mar 2021 00:18:44 +0000 (00:18 +0000)]
Daily bump.

3 years agoOpenACC: C/C++ - fix async parsing [PR99137]
Tobias Burnus [Fri, 5 Mar 2021 10:41:44 +0000 (11:41 +0100)]
OpenACC: C/C++ - fix async parsing [PR99137]

gcc/c/ChangeLog:

PR c/99137
* c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.

gcc/cp/ChangeLog:

PR c/99137
* parser.c (cp_parser_oacc_clause_async): Reject comma expressions.

gcc/testsuite/ChangeLog:

PR c/99137
* c-c++-common/goacc/asyncwait-1.c: Update dg-error; add
additional test.

(cherry picked from commit 6ddedd3efa3fe482f76a4037521a06b3ac9f2a8b)

3 years agoDaily bump.
GCC Administrator [Sat, 6 Mar 2021 00:19:01 +0000 (00:19 +0000)]
Daily bump.

3 years agoc++: Use c++2a in g++.dg/cpp2a/nontype-class-defarg1.C.
Marek Polacek [Fri, 5 Mar 2021 17:51:53 +0000 (12:51 -0500)]
c++: Use c++2a in g++.dg/cpp2a/nontype-class-defarg1.C.

GCC 9 doesn't have the "c++20" target yet.

* g++.dg/cpp2a/nontype-class-defarg1.C: Use target c++2a.

3 years agoFix build breakage with latest glibc release
Eric Botcazou [Fri, 5 Mar 2021 11:45:41 +0000 (12:45 +0100)]
Fix build breakage with latest glibc release

gcc/ada/
PR ada/99264
* init.c (__gnat_alternate_sta) [Linux]: Remove preprocessor test on
MINSIGSTKSZ and bump size to 32KB.
* libgnarl/s-osinte__linux.ads (Alternate_Stack_Size): Bump to 32KB.

3 years agoDaily bump.
GCC Administrator [Fri, 5 Mar 2021 00:18:39 +0000 (00:18 +0000)]
Daily bump.

3 years agoc++: Fix class NTTP constness handling [PR98810]
Jason Merrill [Thu, 25 Feb 2021 21:47:53 +0000 (16:47 -0500)]
c++: Fix class NTTP constness handling [PR98810]

Here, when substituting still-dependent args into an alias template, we see
a non-const type because the default argument is non-const, and is not a
template parm object because it's still dependent.

gcc/cp/ChangeLog:

PR c++/98810
* pt.c (tsubst_copy) [VIEW_CONVERT_EXPR]: Add const
to a class non-type template argument that needs it.

gcc/testsuite/ChangeLog:

PR c++/98810
* g++.dg/cpp2a/nontype-class-defarg1.C: New test.

3 years agoc++: C++17 and decltype of multi-operator expression [PR95675]
Jason Merrill [Wed, 3 Mar 2021 04:59:00 +0000 (23:59 -0500)]
c++: C++17 and decltype of multi-operator expression [PR95675]

A call that is the immediate operand of decltype has special semantics: no
temporary is produced, so it's OK for the return type to be e.g. incomplete.
But we were treating (e | f) the same way, which confused overload
resolution when we then tried to evaluate ... | g.

Fixed by making build_temp do what its name says, and force the C++17
temporary materialization conversion.

gcc/cp/ChangeLog:

PR c++/95675
* call.c (build_temp): Wrap a CALL_EXPR in a TARGET_EXPR
if it didn't get one before.

gcc/testsuite/ChangeLog:

PR c++/95675
* g++.dg/cpp0x/decltype-call5.C: New test.
* g++.dg/cpp0x/decltype-call6.C: New test.

3 years agoDaily bump.
GCC Administrator [Thu, 4 Mar 2021 00:19:04 +0000 (00:19 +0000)]
Daily bump.

3 years agod: Fix heap-buffer-overflow in checkModFileAlias [PR 99337]
Iain Buclaw [Wed, 3 Mar 2021 14:34:04 +0000 (15:34 +0100)]
d: Fix heap-buffer-overflow in checkModFileAlias [PR 99337]

The code wrongly assumed memcmp did not read past the mismatch.

gcc/d/ChangeLog:

PR d/99337
* dmd/dmodule.c (checkModFileAlias): Don't read past buffer in
  comparison.

(cherry picked from commit d6177870dd2696501e3b8d3930fd5549d4acaeae)

3 years agoFix ICE with pathologically large frames
Eric Botcazou [Wed, 3 Mar 2021 11:25:03 +0000 (12:25 +0100)]
Fix ICE with pathologically large frames

gcc/
PR target/99234
* config/i386/i386.c (ix86_compute_frame_layout): For a SEH target,
point back the hard frame pointer to its default location when the
frame is larger than SEH_MAX_FRAME_SIZE.

3 years agoDaily bump.
GCC Administrator [Wed, 3 Mar 2021 00:18:57 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 2 Mar 2021 00:18:43 +0000 (00:18 +0000)]
Daily bump.

3 years agoFix wrong result for 1.0/3.0 at -O2 -fno-omit-frame-pointer -frounding-math
Eric Botcazou [Mon, 1 Mar 2021 06:53:05 +0000 (07:53 +0100)]
Fix wrong result for 1.0/3.0 at -O2 -fno-omit-frame-pointer -frounding-math

This wrong-code PR for the C++ compiler on x86-64/Windows is a regression
in GCC 9 and later, but the underlying issue has probably been there since
SEH was implemented and is exposed by this comment in config/i386/winnt.c:

  /* SEH records saves relative to the "current" stack pointer, whether
     or not there's a frame pointer in place.  This tracks the current
     stack pointer offset from the CFA.  */
  HOST_WIDE_INT sp_offset;

That's not what the (current) Microsoft documentation says; instead it says:

  /* SEH records offsets relative to the lowest address of the fixed stack
     allocation.  If there is no frame pointer, these offsets are from the
     stack pointer; if there is a frame pointer, these offsets are from the
     value of the stack pointer when the frame pointer was established, i.e.
     the frame pointer minus the offset in the .seh_setframe directive.  */

That's why the implementation is correct only under the condition that the
frame pointer be established *after* the fixed stack allocation; as a matter
of fact, that's clearly the model underpinning SEH, but is the opposite of
what is done e.g. on Linux.

However the issue is mostly papered over in practice because:

  1. SEH forces use_fast_prologue_epilogue to false, which in turns forces
save_regs_using_mov to false, so the general regs are always pushed when
they need to be saved, which eliminates the offset computation for them.

  2. As soon as a frame is larger than 240 bytes, the frame pointer is fixed
arbitrarily to 128 bytes above the stack pointer, which of course requires
that it be established after the fixed stack allocation.

So you need a small frame clobbering one of the call-saved XMM registers in
order to generate wrong SEH unwind info.

The attached fix makes sure that the frame pointer is always established
after the fixed stack allocation by pointing it at or below the lowest used
register save area, i.e. the SSE save area, and removing the special early
saves in the prologue; the end result is a uniform prologue sequence for
SEH whatever the frame size.  And it avoids a discrepancy between cases
where the number of saved general regs is even and cases where it is odd.

gcc/
PR target/99234
* config/i386/i386.c (ix86_compute_frame_layout): For a SEH target,
point the hard frame pointer to the SSE register save area instead
of the general register save area.  Perform only minimal adjustment
for small frames if it is initially not correctly aligned.
(ix86_expand_prologue): Remove early saves for a SEH target.
* config/i386/winnt.c (struct seh_frame_state): Document constraint.
gcc/testsuite/
* g++.dg/eh/seh-xmm-unwind.C: New test.

3 years agoDaily bump.
GCC Administrator [Mon, 1 Mar 2021 00:19:00 +0000 (00:19 +0000)]
Daily bump.

3 years agoc++: Fix attr-lambda3.C
Jason Merrill [Sun, 28 Feb 2021 14:17:10 +0000 (09:17 -0500)]
c++: Fix attr-lambda3.C

Some testcase for a change I was testing had an unnecessary ; at the end of
a line that caused a test failure on the 10 branch, so I mistakenly removed
it from this one.  Oops.

gcc/testsuite/ChangeLog:

* g++.dg/ext/attr-lambda3.C: Add missing ;

3 years agoDaily bump.
GCC Administrator [Sun, 28 Feb 2021 00:18:35 +0000 (00:18 +0000)]
Daily bump.

3 years agoc++: Allow GNU attributes before lambda -> [PR90333]
Jason Merrill [Fri, 26 Feb 2021 10:45:02 +0000 (05:45 -0500)]
c++: Allow GNU attributes before lambda -> [PR90333]

In my 9.3/10 patch for 90333 I allowed attributes between [] and (), and
after the trailing return type, but not in the place that GCC 8 expected
them, and we've gotten several bug reports about that.  So let's allow them
there, as well.

gcc/cp/ChangeLog:

PR c++/90333
* parser.c (cp_parser_lambda_declarator_opt): Accept GNU attributes
between () and ->.

gcc/testsuite/ChangeLog:

PR c++/90333
* g++.dg/ext/attr-lambda3.C: New test.

3 years agoDaily bump.
GCC Administrator [Sat, 27 Feb 2021 00:18:38 +0000 (00:18 +0000)]
Daily bump.

3 years agoPR fortran/93340 - fix missed substring simplifications
Harald Anlauf [Thu, 14 Jan 2021 19:25:33 +0000 (20:25 +0100)]
PR fortran/93340 - fix missed substring simplifications

Substrings were not reduced early enough for use in initializations,
such as DATA statements.  Add an early simplification for substrings
with constant starting and ending points.

gcc/fortran/ChangeLog:

* gfortran.h (gfc_resolve_substring): Add prototype.
* primary.c (match_string_constant): Simplify substrings with
constant starting and ending points.
* resolve.c: Rename resolve_substring to gfc_resolve_substring.
(gfc_resolve_ref): Use renamed function gfc_resolve_substring.

gcc/testsuite/ChangeLog:

* substr_10.f90: New test.
* substr_9.f90: New test.

(cherry picked from commit bdd1b1f55529da00b867ef05a53a08fbfc3d1c2e)

3 years agoDaily bump.
GCC Administrator [Fri, 26 Feb 2021 00:18:48 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Thu, 25 Feb 2021 00:18:38 +0000 (00:18 +0000)]
Daily bump.

3 years agoFortran: Fix for class defined operators [PR99124].
Paul Thomas [Tue, 23 Feb 2021 19:29:04 +0000 (19:29 +0000)]
Fortran: Fix for class defined operators [PR99124].

2021-02-23  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/99124
* resolve.c (resolve_fl_procedure): Include class results in
the test for F2018, C15100.
* trans-array.c (get_class_info_from_ss): Do not use the saved
descriptor to obtain the class expression for variables. Use
gfc_get_class_from_expr instead.

gcc/testsuite/
PR fortran/99124
* gfortran.dg/class_defined_operator_2.f03 : New test.
* gfortran.dg/elemental_result_2.f90 : New test.
* gfortran.dg/class_assign_4.f90: Correct the non-conforming
elemental function with an allocatable result with an operator
interface with array dummies and result.

(cherry picked from commit 29a5298955f777c539c628f51e78b75d8e586c44)

3 years agoDaily bump.
GCC Administrator [Wed, 24 Feb 2021 00:18:42 +0000 (00:18 +0000)]
Daily bump.

3 years agoPR fortran/99169 - Do not clobber allocatable intent(out) dummy argument
Harald Anlauf [Sun, 21 Feb 2021 20:44:24 +0000 (21:44 +0100)]
PR fortran/99169 - Do not clobber allocatable intent(out) dummy argument

gcc/fortran/ChangeLog:

* trans-expr.c (gfc_conv_procedure_call): Do not add clobber to
allocatable intent(out) argument.

gcc/testsuite/ChangeLog:

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

(cherry picked from commit 2df374b337a5f6cf5528e91718e4e12e4006b7ae)

3 years agoaarch64: Add cpu cost tables for A64FX
Qian Jianhua [Tue, 23 Feb 2021 02:29:19 +0000 (10:29 +0800)]
aarch64: Add cpu cost tables for A64FX

This is a backport of adding cost tables for A64FX.

2021-02-23 Qian Jianhua <qianjh@cn.fujitsu.com>

gcc/ChangeLog:

* config/aarch64/aarch64-cost-tables.h (a64fx_extra_costs): New.
* config/aarch64/aarch64.c (a64fx_addrcost_table): New.
(a64fx_regmove_cost, a64fx_vector_cost): New.
(a64fx_tunings): Use the new added cost tables.

(cherry picked from commit 041f720c821d394896c0e58a1c9b756fe9c82322)

3 years agoDaily bump.
GCC Administrator [Tue, 23 Feb 2021 00:18:49 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Mon, 22 Feb 2021 00:18:26 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 21 Feb 2021 00:18:28 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 20 Feb 2021 00:18:36 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Fri, 19 Feb 2021 00:18:31 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Thu, 18 Feb 2021 00:18:37 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Wed, 17 Feb 2021 00:18:30 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 16 Feb 2021 00:18:49 +0000 (00:18 +0000)]
Daily bump.

3 years agoFix cast in df_worklist_dataflow_doublequeue
Eric Botcazou [Mon, 15 Feb 2021 09:41:44 +0000 (10:41 +0100)]
Fix cast in df_worklist_dataflow_doublequeue

The existing cast to float gives weird results in the RTL dump files
on x86 when the compiler is configured -with-fpmath=sse.

gcc/
* df-core.c (df_worklist_dataflow_doublequeue): Use proper cast.

3 years agoDaily bump.
GCC Administrator [Mon, 15 Feb 2021 00:18:35 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 14 Feb 2021 00:18:39 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 13 Feb 2021 00:18:45 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Fri, 12 Feb 2021 00:18:41 +0000 (00:18 +0000)]
Daily bump.

3 years agoFix -freorder-blocks-and-partition glitch with Windows SEH
Eric Botcazou [Thu, 11 Feb 2021 23:16:49 +0000 (00:16 +0100)]
Fix -freorder-blocks-and-partition glitch with Windows SEH

Since GCC 8, the -freorder-blocks-and-partition pass can split a function
into hot and cold parts, thus generating 2 CIEs for a single function in
DWARF for exception purposes and doing an equivalent trick for Windows SEH.

Now the Windows system unwinder is picky when it comes to the boundary
between an active EH region and the end of the function and, therefore,
a nop may need to be added in specific cases.

gcc/
* config/i386/winnt.c (i386_pe_seh_unwind_emit): When switching to
the cold section, emit a nop before the directive if the previous
active instruction can throw.

3 years agoFortran: Fix ICE after error regression [PR99060].
Paul Thomas [Thu, 11 Feb 2021 10:38:23 +0000 (10:38 +0000)]
Fortran: Fix ICE after error regression [PR99060].

2021-02-11  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/99060
* primary.c (gfc_match_varspec): Test for non-null 'previous'
before using its name in the error message.

gcc/testsuite/
PR fortran/99060
* gfortran.dg/pr99060.f90: New test.

(cherry picked from commit 5ee5415af8691640b0f7a5332b78d04ba309f4f0)

3 years agoDaily bump.
GCC Administrator [Thu, 11 Feb 2021 00:18:57 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Wed, 10 Feb 2021 00:18:49 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 9 Feb 2021 00:18:46 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Mon, 8 Feb 2021 00:18:57 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 7 Feb 2021 00:19:01 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 6 Feb 2021 00:18:52 +0000 (00:18 +0000)]
Daily bump.

3 years agoBackport fix for PR/tree-optimization/97236 - fix bad use of VMAT_CONTIGUOUS
Matthias Klose [Tue, 6 Oct 2020 11:41:37 +0000 (13:41 +0200)]
Backport fix for PR/tree-optimization/97236 - fix bad use of VMAT_CONTIGUOUS

This avoids using VMAT_CONTIGUOUS with single-element interleaving
when using V1mode vectors.  Instead keep VMAT_ELEMENTWISE but
continue to avoid load-lanes and gathers.

2020-10-01  Richard Biener  <rguenther@suse.de>

PR tree-optimization/97236
* tree-vect-stmts.c (get_group_load_store_type): Keep
VMAT_ELEMENTWISE for single-element vectors.

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

(cherry picked from commit 1ab88985631dd2c5a5e3b5c0dce47cf8b6ed2f82)

3 years agoDaily bump.
GCC Administrator [Fri, 5 Feb 2021 00:18:39 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Thu, 4 Feb 2021 00:18:45 +0000 (00:18 +0000)]
Daily bump.

3 years agoFix regression with partial rep clause on variant record type
Eric Botcazou [Wed, 3 Feb 2021 10:38:04 +0000 (11:38 +0100)]
Fix regression with partial rep clause on variant record type

It can yield an incorrect layout when there is a partial representation
clause on a discriminated record type with a variant part.

gcc/ada/
* gcc-interface/decl.c (components_to_record): If the first component
with rep clause is the _Parent field with variable size, temporarily
set it aside when computing the internal layout of the REP part again.
* gcc-interface/utils.c (finish_record_type): Revert to taking the
maximum when merging sizes for all record types with rep clause.
(merge_sizes): Put SPECIAL parameter last and adjust recursive calls.

3 years agoAssorted LTO fixes for Ada
Eric Botcazou [Wed, 3 Feb 2021 10:11:26 +0000 (11:11 +0100)]
Assorted LTO fixes for Ada

This polishes a few rough edges visible in LTO mode.

gcc/ada/
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Make the
two fields of the fat pointer type addressable, and do not make the
template type read-only.
<E_Record_Type>: If the type has discriminants mark it as may_alias.
* gcc-interface/utils.c (make_dummy_type): Likewise.
(build_dummy_unc_pointer_types): Likewise.

3 years agoarm: Fix up neon_vector_mem_operand [PR97528]
Jakub Jelinek [Fri, 20 Nov 2020 11:26:58 +0000 (12:26 +0100)]
arm: Fix up neon_vector_mem_operand [PR97528]

The documentation for POST_MODIFY says:
   Currently, the compiler can only handle second operands of the
   form (plus (reg) (reg)) and (plus (reg) (const_int)), where
   the first operand of the PLUS has to be the same register as
   the first operand of the *_MODIFY.
The following testcase ICEs, because combine just attempts to simplify
things and ends up with
(post_modify (reg1) (plus (mult (reg2) (const_int 4)) (reg1))
but the target predicates accept it, because they only verify
that POST_MODIFY's second operand is PLUS and the second operand
of the PLUS is a REG.

The following patch fixes this by performing further verification that
the POST_MODIFY is in the form it should be.

2020-11-20  Jakub Jelinek  <jakub@redhat.com>

PR target/97528
* config/arm/arm.c (neon_vector_mem_operand): For POST_MODIFY, require
first POST_MODIFY operand is a REG and is equal to the first operand
of PLUS.

* gcc.target/arm/pr97528.c: New test.

(cherry picked from commit 410b8f6f41920dad200cd709f9f3de8b840a995c)

3 years agoDaily bump.
GCC Administrator [Wed, 3 Feb 2021 00:18:45 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 2 Feb 2021 12:49:43 +0000 (12:49 +0000)]
Daily bump.

3 years agod: Fix junk in generated symbol on powerpc64-*-* [PR98921]
Iain Buclaw [Mon, 1 Feb 2021 23:52:49 +0000 (00:52 +0100)]
d: Fix junk in generated symbol on powerpc64-*-* [PR98921]

This adds a special formatter to OutBuffer to handle formatted printing
of integers, a common case.  The replacement is faster and safer.

In dmangle.c, it also gets rid of a number of problematic casts, as seen
on powerpc64 targets.

gcc/d/ChangeLog:

PR d/98921
* dmd/dmangle.c (Mangler::visit (TypeSArray *)): Use buf->print
  to format integer value.
(Mangler::visit (TypeIdentifier *)): Likewise.
(Mangler::toBuffer): Likewise.
(Mangler::visit (IntegerExp *)): Likewise.
(Mangler::visit (StringExp *)): Likewise.
(Mangler::visit (ArrayLiteralExp *)): Likewise.
(Mangler::visit (AssocArrayLiteralExp *)): Likewise.
(Mangler::visit (StructLiteralExp *)): Likewise.
* dmd/root/outbuffer.c (OutBuffer::print): New function.
* dmd/root/outbuffer.h (OutBuffer::print): Declare.

(cherry picked from commit 6a481021a65d6237b0c509a76fcd9c1f32c4558e)

3 years agoDaily bump.
GCC Administrator [Mon, 1 Feb 2021 00:18:29 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 31 Jan 2021 00:18:28 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 30 Jan 2021 00:18:48 +0000 (00:18 +0000)]
Daily bump.

3 years agoc++: Fix list-init of array of no-copy type [PR63707]
Jason Merrill [Fri, 15 Jan 2021 16:42:00 +0000 (11:42 -0500)]
c++: Fix list-init of array of no-copy type [PR63707]

build_vec_init_elt models initialization from some arbitrary object of the
type, i.e. copy, but in the case of list-initialization we don't do a copy
from the elements, we initialize them directly.

gcc/cp/ChangeLog:

PR c++/63707
* tree.c (build_vec_init_expr): Don't call build_vec_init_elt
if we got a CONSTRUCTOR.

gcc/testsuite/ChangeLog:

PR c++/63707
* g++.dg/cpp0x/initlist-array13.C: New test.

3 years agotree-optimization/97627 - Avoid computing niters for fake edges
Richard Biener [Fri, 29 Jan 2021 10:17:42 +0000 (11:17 +0100)]
tree-optimization/97627 - Avoid computing niters for fake edges

This avoids computing niters information for fake edges.

2021-01-29  Bin Cheng  <bin.cheng@linux.alibaba.com>
    Richard Biener  <rguenther@suse.de>

PR tree-optimization/97627
* tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
Do not analyze fake edges.

* g++.dg/pr97627.C: New testcase.

(cherry picked from commit 3976b2701b826569ffcd90877d94095def507e3f)

3 years agoDaily bump.
GCC Administrator [Fri, 29 Jan 2021 00:18:39 +0000 (00:18 +0000)]
Daily bump.

This page took 0.09405 seconds and 5 git commands to generate.