]> gcc.gnu.org Git - gcc.git/log
gcc.git
17 months agoFortran: improve checking of character length specification [PR96025]
Harald Anlauf [Mon, 20 Feb 2023 20:28:09 +0000 (21:28 +0100)]
Fortran: improve checking of character length specification [PR96025]

gcc/fortran/ChangeLog:

PR fortran/96025
* parse.c (check_function_result_typed): Improve type check of
specification expression for character length and return status.
(parse_spec): Use status from above.
* resolve.c (resolve_fntype): Prevent use of invalid specification
expression for character length.

gcc/testsuite/ChangeLog:

PR fortran/96025
* gfortran.dg/pr96025.f90: New test.

(cherry picked from commit 6c1b825b3d6499dfeacf7c79dcf4b56a393ac204)

17 months agoDaily bump.
GCC Administrator [Sun, 5 Mar 2023 00:19:19 +0000 (00:19 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Sat, 4 Mar 2023 00:19:01 +0000 (00:19 +0000)]
Daily bump.

17 months agos390: libatomic: Fix 16 byte atomic {cas,load,store}
Stefan Schulze Frielinghaus [Fri, 3 Mar 2023 16:13:20 +0000 (17:13 +0100)]
s390: libatomic: Fix 16 byte atomic {cas,load,store}

This is a follow-up to commit a4c6bd0821099f6b8c0f64a96ffd9d01a025c413
introducing a runtime check for alignment for 16 byte atomic
compare-exchange, load, and store.

libatomic/ChangeLog:

* config/s390/cas_n.c: New file.
* config/s390/load_n.c: New file.
* config/s390/store_n.c: New file.

(cherry picked from commit 9056d0df830c5a295d7594d517d409d10476990d)

17 months agod: Fix ICE on explicit immutable struct import [PR108877]
Iain Buclaw [Mon, 27 Feb 2023 19:46:18 +0000 (20:46 +0100)]
d: Fix ICE on explicit immutable struct import [PR108877]

Const and immutable types are built as variants of the type they are
derived from, and TYPE_STUB_DECL is not set for these variants.

PR d/108877

gcc/d/ChangeLog:

* imports.cc (ImportVisitor::visit (EnumDeclaration *)): Call
make_import on TYPE_MAIN_VARIANT.
(ImportVisitor::visit (AggregateDeclaration *)): Likewise.
(ImportVisitor::visit (ClassDeclaration *)): Likewise.

gcc/testsuite/ChangeLog:

* gdc.dg/imports/pr108877a.d: New test.
* gdc.dg/pr108877.d: New test.

(cherry picked from commit ce1cea3e22f58bbddde017f8a92e59bae8892339)

17 months agoDaily bump.
GCC Administrator [Fri, 3 Mar 2023 00:19:03 +0000 (00:19 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Thu, 2 Mar 2023 00:19:51 +0000 (00:19 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Wed, 1 Mar 2023 00:20:28 +0000 (00:20 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Tue, 28 Feb 2023 00:21:13 +0000 (00:21 +0000)]
Daily bump.

17 months agors6000/test: Adjust some test cases on partial vector [PR96373]
Kewen Lin [Tue, 14 Feb 2023 02:03:26 +0000 (20:03 -0600)]
rs6000/test: Adjust some test cases on partial vector [PR96373]

As Richard pointed out in [1] and the testing on Power10, the
proposed fix for PR96373 requires some updates on a few rs6000
test cases which adopt partial vector.  This patch is to fix
all of them with one extra option "-fno-trapping-math" as
Richard suggested.

Besides, the original test case also failed on Power10 without
Richard's proposed fix, this patch adds it together for a bit
better testing coverage.

[1] https://gcc.gnu.org/pipermail/gcc-patches/2023-January/610728.html

PR target/96373

gcc/testsuite/ChangeLog:

* gcc.target/powerpc/p9-vec-length-epil-1.c: Add -fno-trapping-math.
* gcc.target/powerpc/p9-vec-length-epil-2.c: Likewise.
* gcc.target/powerpc/p9-vec-length-epil-3.c: Likewise.
* gcc.target/powerpc/p9-vec-length-epil-4.c: Likewise.
* gcc.target/powerpc/p9-vec-length-epil-5.c: Likewise.
* gcc.target/powerpc/p9-vec-length-epil-6.c: Likewise.
* gcc.target/powerpc/p9-vec-length-epil-8.c: Likewise.
* gcc.target/powerpc/p9-vec-length-full-1.c: Likewise.
* gcc.target/powerpc/p9-vec-length-full-2.c: Likewise.
* gcc.target/powerpc/p9-vec-length-full-3.c: Likewise.
* gcc.target/powerpc/p9-vec-length-full-4.c: Likewise.
* gcc.target/powerpc/p9-vec-length-full-5.c: Likewise.
* gcc.target/powerpc/p9-vec-length-full-6.c: Likewise.
* gcc.target/powerpc/p9-vec-length-full-8.c: Likewise.
* gcc.target/powerpc/pr96373.c: New test.

(cherry picked from commit 4f5a1198065dc078f8099db628da7b06a2666f34)

17 months agoDaily bump.
GCC Administrator [Mon, 27 Feb 2023 00:19:45 +0000 (00:19 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Sun, 26 Feb 2023 00:20:22 +0000 (00:20 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Sat, 25 Feb 2023 00:20:15 +0000 (00:20 +0000)]
Daily bump.

17 months agoRTEMS: Tune multilib selection
Sebastian Huber [Wed, 22 Feb 2023 20:38:18 +0000 (21:38 +0100)]
RTEMS: Tune multilib selection

gcc/ChangeLog:

* config/riscv/t-rtems: Keep only -mcmodel=medany 64-bit multilibs.
Add non-compact 32-bit multilibs.

(cherry picked from commit 35a067020e41d97bc3be15b518b3dc2a64b4aae2)

17 months agoDaily bump.
GCC Administrator [Fri, 24 Feb 2023 00:20:15 +0000 (00:20 +0000)]
Daily bump.

17 months agolibstdc++: Simplify three helper functions into one
Matthias Kretz [Sat, 14 Jan 2023 22:32:38 +0000 (23:32 +0100)]
libstdc++: Simplify three helper functions into one

Broadcast is a very common function. This should reduce compile-time
effort.

Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:

PR libstdc++/108030
* include/experimental/bits/simd.h (__vector_broadcast):
Implement via __vector_broadcast_impl instead of
__call_with_n_evaluations + 2 lambdas.
(__vector_broadcast_impl): New.

(cherry picked from commit 2e29e2fbeb8936e5c85cefaf547cba42e17e137b)

17 months agolibstdc++: Fix -Wsign-compare issue
Matthias Kretz [Tue, 21 Feb 2023 09:31:55 +0000 (10:31 +0100)]
libstdc++: Fix -Wsign-compare issue

Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:

* include/experimental/bits/simd_builtin.h (_S_set): Compare as
int. The actual range of these indexes is very small.

(cherry picked from commit ffa39f7120f6e83a567d7a83ff4437f6b41036ea)

17 months agolibstdc++: Add missing constexpr on simd shift implementation
Matthias Kretz [Mon, 20 Feb 2023 16:35:59 +0000 (17:35 +0100)]
libstdc++: Add missing constexpr on simd shift implementation

Resolves -Wtautological-compare warnings about `if
(__builtin_is_constant_evaluated())` in the implementations of these
functions.

Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:

* include/experimental/bits/simd_x86.h (_S_bit_shift_left)
(_S_bit_shift_right): Declare constexpr. The implementation was
already expecting constexpr evaluation.

(cherry picked from commit fa37ac2b59ed1c379b35dbf9bd58f7849f9fd5b5)

17 months agolibstdc++: Fix uses of non-reserved names in simd header
Matthias Kretz [Thu, 16 Feb 2023 15:29:54 +0000 (16:29 +0100)]
libstdc++: Fix uses of non-reserved names in simd header

Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:

* include/experimental/bits/simd.h (__extract_part, split):
Use reserved name for template parameter.

(cherry picked from commit bb920f561e983c64d146f173dc4ebc098441a962)

17 months agoDaily bump.
GCC Administrator [Thu, 23 Feb 2023 00:20:49 +0000 (00:20 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Wed, 22 Feb 2023 00:21:22 +0000 (00:21 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Tue, 21 Feb 2023 00:20:40 +0000 (00:20 +0000)]
Daily bump.

17 months agoaarch64: Fix up bfmlal lane pattern [PR104921]
Alex Coplan [Mon, 6 Feb 2023 14:32:21 +0000 (14:32 +0000)]
aarch64: Fix up bfmlal lane pattern [PR104921]

As the testcase shows, this pattern had an incorrect constraint leading
to GCC's output getting rejected by the assembler.

This patch fixes the constraint accordingly.

The test is split into two: one that can run without bf16 support from
the assembler and another that checks that the output actually assembles
when such support is available.

gcc/ChangeLog:

PR target/104921
* config/aarch64/aarch64-simd.md (aarch64_bfmlal<bt>_lane<q>v4sf):
Use correct constraint for operand 3.

gcc/testsuite/ChangeLog:

PR target/104921
* gcc.target/aarch64/pr104921-1.c: New test.
* gcc.target/aarch64/pr104921-2.c: New test.
* gcc.target/aarch64/pr104921.x: Include file for new tests.

(cherry picked from commit 277e1f30a5e4e634304a7b8a532825119f0ea47f)

17 months agoDaily bump.
GCC Administrator [Mon, 20 Feb 2023 00:19:11 +0000 (00:19 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Sun, 19 Feb 2023 00:19:34 +0000 (00:19 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Sat, 18 Feb 2023 00:19:57 +0000 (00:19 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Fri, 17 Feb 2023 00:20:18 +0000 (00:20 +0000)]
Daily bump.

18 months agolibstdc++: Fix incorrect __builtin_is_constant_evaluated calls
Matthias Kretz [Thu, 2 Feb 2023 11:29:33 +0000 (12:29 +0100)]
libstdc++: Fix incorrect __builtin_is_constant_evaluated calls

Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:

* include/experimental/bits/simd_x86.h
(_SimdImplX86::_S_not_equal_to, _SimdImplX86::_S_less)
(_SimdImplX86::_S_less_equal): Do not call
__builtin_is_constant_evaluated in constexpr-if.

(cherry picked from commit 1fd3836463c65f695831ef04c7dbda1e7a1794ba)

18 months agolibstdc++: printf format string fix in testsuite
Matthias Kretz [Thu, 2 Feb 2023 11:28:39 +0000 (12:28 +0100)]
libstdc++: printf format string fix in testsuite

Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:

* testsuite/experimental/simd/tests/bits/verify.h
(verify::verify): Use %zx for size_t in format string.

(cherry picked from commit 07e4648b4ab86a76ab040ea18a756e388652c882)

18 months agolibstdc++: Ensure __builtin_constant_p isn't lost on the way
Matthias Kretz [Fri, 13 Jan 2023 15:20:36 +0000 (16:20 +0100)]
libstdc++: Ensure __builtin_constant_p isn't lost on the way

The more expensive code path should only be taken if it can be optimized
away.

Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:

* include/experimental/bits/simd.h
(_SimdWrapper::_M_is_constprop_none_of)
(_SimdWrapper::_M_is_constprop_all_of): Return false unless the
computed result still satisfies __builtin_constant_p.

(cherry picked from commit fea34ee491104f325682cc5fb75683b7d74a0a3b)

18 months agoDaily bump.
GCC Administrator [Thu, 16 Feb 2023 00:20:34 +0000 (00:20 +0000)]
Daily bump.

18 months agoFix PR target/90458
Eric Botcazou [Wed, 15 Feb 2023 22:32:12 +0000 (23:32 +0100)]
Fix PR target/90458

This is the incompatibility of -fstack-clash-protection with Windows SEH.
Now the Windows ports always enable TARGET_STACK_PROBE, which means that
the stack is always probed (out of line) so -fstack-clash-protection does
nothing more.

gcc/
PR target/90458
* config/i386/i386.c (ix86_compute_frame_layout): Disable the
effects of -fstack-clash-protection for TARGET_STACK_PROBE.
(ix86_expand_prologue): Likewise.

18 months agoDaily bump.
GCC Administrator [Wed, 15 Feb 2023 00:20:23 +0000 (00:20 +0000)]
Daily bump.

18 months agoc++: fix ICE in joust_maybe_elide_copy [PR106675]
Marek Polacek [Fri, 10 Feb 2023 22:26:57 +0000 (17:26 -0500)]
c++: fix ICE in joust_maybe_elide_copy [PR106675]

joust_maybe_elide_copy checks that the last conversion in the ICS for
the first argument is ck_ref_bind, which is reasonable, because we've
checked that we're dealing with a copy/move constructor.  But it can
also happen that we couldn't figure out which conversion function is
better to convert the argument, as in this testcase: joust couldn't
decide if we should go with

  operator foo &()

or

  operator foo const &()

so we get a ck_ambig, which then upsets joust_maybe_elide_copy.  Since
a ck_ambig can validly occur, I think we should just return early, as
in the patch below.

PR c++/106675

gcc/cp/ChangeLog:

* call.c (joust_maybe_elide_copy): Return false for ck_ambig.

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/overload-conv-5.C: New test.

(cherry picked from commit cce62625025380c2ea2a220deb10f8f355f83abf)

18 months agolibstdc++: Add missing free functions for atomic_flag [PR103934]
Thomas W Rodgers [Fri, 10 Feb 2023 17:35:11 +0000 (09:35 -0800)]
libstdc++: Add missing free functions for atomic_flag [PR103934]

This patch adds -
  atomic_flag_test
  atomic_flag_test_explicit

Which were missed when commit 491ba6 introduced C++20 atomic flag
test.

libstdc++-v3/ChangeLog:

PR libstdc++/103934
* include/std/atomic (atomic_flag_test): Add.
(atomic_flag_test_explicit): Add.
* testsuite/29_atomics/atomic_flag/test/explicit.cc: Add
test case to cover missing atomic_flag free functions.
* testsuite/29_atomics/atomic_flag/test/implicit.cc:
Likewise.

(cherry picked from commit a8d769045b43e8509490362865a85cb31a855ccf)

18 months agoDaily bump.
GCC Administrator [Tue, 14 Feb 2023 00:19:59 +0000 (00:19 +0000)]
Daily bump.

18 months agors6000: Teach rs6000_opaque_type_invalid_use_p about gcall [PR108348]
Kewen Lin [Wed, 18 Jan 2023 08:34:19 +0000 (02:34 -0600)]
rs6000: Teach rs6000_opaque_type_invalid_use_p about gcall [PR108348]

PR108348 shows one special case that MMA opaque types are
used in function arguments and treated as pass by reference,
it results in one copying from argument to a temp variable,
since this copying happens before rs6000_function_arg check,
it can cause ICE without MMA support then.  This patch is to
teach function rs6000_opaque_type_invalid_use_p to check if
any function argument in a gcall stmt has the invalid use of
MMA opaque types.

btw, I checked the handling on return value, it doesn't have
this kind of issue as its checking and error emission is quite
early, so this doesn't handle function return value.

PR target/108348

gcc/ChangeLog:

* config/rs6000/rs6000.c (rs6000_opaque_type_invalid_use_p): Add the
support for invalid uses of MMA opaque type in function arguments.

gcc/testsuite/ChangeLog:

* gcc.target/powerpc/pr108348-1.c: New test.
* gcc.target/powerpc/pr108348-2.c: New test.

(cherry picked from commit 5d9529687deb9ed009361a16c02a7f6c3e2ebbf3)

18 months agors6000: Teach rs6000_opaque_type_invalid_use_p about inline asm [PR108272]
Kewen Lin [Mon, 16 Jan 2023 08:15:39 +0000 (02:15 -0600)]
rs6000: Teach rs6000_opaque_type_invalid_use_p about inline asm [PR108272]

As PR108272 shows, there are some invalid uses of MMA opaque
types in inline asm statements.  This patch is to teach the
function rs6000_opaque_type_invalid_use_p for inline asm,
check and error any invalid use of MMA opaque types in input
and output operands.

PR target/108272

gcc/ChangeLog:

* config/rs6000/rs6000.c (rs6000_opaque_type_invalid_use_p): Add the
support for invalid uses in inline asm, factor out the checking and
erroring to lambda function check_and_error_invalid_use.

gcc/testsuite/ChangeLog:

* gcc.target/powerpc/pr108272-1.c: New test.
* gcc.target/powerpc/pr108272-2.c: New test.
* gcc.target/powerpc/pr108272-3.c: New test.
* gcc.target/powerpc/pr108272-4.c: New test.

(cherry picked from commit 074b0c03eabeb8e9c8de813c81bf87a1f88fdb65)

18 months agoDaily bump.
GCC Administrator [Mon, 13 Feb 2023 00:20:07 +0000 (00:20 +0000)]
Daily bump.

18 months agoDaily bump.
GCC Administrator [Sun, 12 Feb 2023 00:20:03 +0000 (00:20 +0000)]
Daily bump.

18 months agoDaily bump.
GCC Administrator [Sat, 11 Feb 2023 00:19:38 +0000 (00:19 +0000)]
Daily bump.

18 months agoFortran: error handling of global entity appearing in COMMON block [PR103259]
Steve Kargl [Tue, 7 Feb 2023 19:18:42 +0000 (20:18 +0100)]
Fortran: error handling of global entity appearing in COMMON block [PR103259]

gcc/fortran/ChangeLog:

PR fortran/103259
* resolve.c (resolve_common_vars): Avoid NULL pointer dereference
when a symbol's location is not set.

gcc/testsuite/ChangeLog:

PR fortran/103259
* gfortran.dg/pr103259.f90: New test.

(cherry picked from commit 7e9f20f5517429cfaadec14d6b04705e59078565)

18 months agoFortran: ASSOCIATE variables should not be TREE_STATIC [PR95107]
Harald Anlauf [Mon, 6 Feb 2023 19:59:51 +0000 (20:59 +0100)]
Fortran: ASSOCIATE variables should not be TREE_STATIC [PR95107]

gcc/fortran/ChangeLog:

PR fortran/95107
* trans-decl.c (gfc_finish_var_decl): With -fno-automatic, do not
make ASSOCIATE variables TREE_STATIC.

gcc/testsuite/ChangeLog:

PR fortran/95107
* gfortran.dg/save_7.f90: New test.

(cherry picked from commit c36f3da534e7f411c5bc48c5b6b660e238167480)

18 months agoFortran: error recovery on invalid array section [PR108609]
Harald Anlauf [Wed, 1 Feb 2023 20:01:32 +0000 (21:01 +0100)]
Fortran: error recovery on invalid array section [PR108609]

The testcase for PR108527 uncovered a latent issue with invalid array
sections that resulted in different paths being taken on different
architectures.  Detect the invalid array declaration for a clean recovery.

gcc/fortran/ChangeLog:

PR fortran/108609
* expr.c (find_array_section): Add check to prevent interpreting an
mpz non-integer constant as an integer.

gcc/testsuite/ChangeLog:

PR fortran/108609
* gfortran.dg/pr108527.f90: Adjust test pattern.

(cherry picked from commit 88a2a09dd4529107e7ef7a6e7ce43acf96457173)

18 months agoFortran: fix ICE in compare_bound_int [PR108527]
Harald Anlauf [Tue, 24 Jan 2023 21:36:25 +0000 (22:36 +0100)]
Fortran: fix ICE in compare_bound_int [PR108527]

gcc/fortran/ChangeLog:

PR fortran/108527
* resolve.c (compare_bound_int): Expression to compare must be of
type INTEGER.
(compare_bound_mpz_t): Likewise.
(check_dimension): Fix comment on checks applied to array section
and clean up associated logic.

gcc/testsuite/ChangeLog:

PR fortran/108527
* gfortran.dg/pr108527.f90: New test.

Co-authored-by: Steven G. Kargl <kargl@gcc.gnu.org>
(cherry picked from commit 22afa4947584c701633a79fd8750c9ceeaa96711)

18 months agoDaily bump.
GCC Administrator [Fri, 10 Feb 2023 00:19:38 +0000 (00:19 +0000)]
Daily bump.

18 months agoDaily bump.
GCC Administrator [Thu, 9 Feb 2023 00:20:01 +0000 (00:20 +0000)]
Daily bump.

18 months agoDaily bump.
GCC Administrator [Wed, 8 Feb 2023 00:19:20 +0000 (00:19 +0000)]
Daily bump.

18 months agotree-optimization/106809 - compile time hog in VN
Richard Biener [Fri, 2 Sep 2022 11:36:13 +0000 (13:36 +0200)]
tree-optimization/106809 - compile time hog in VN

The dominated_by_p_w_unex function is prone to high compile time.
With GCC 12 we introduced a VN run for uninit diagnostics which now
runs into a degenerate case with bison generated code.  Fortunately
this case is easy to fix with a simple extra check - a more
general fix needs more work.

PR tree-optimization/106809
* tree-ssa-sccvn.c (dominaged_by_p_w_unex): Check we have
more than one successor before doing extra work.

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

(cherry picked from commit be1b42de9c151d46c89f9a8f82d4c5839a19ea94)

18 months agoDaily bump.
GCC Administrator [Tue, 7 Feb 2023 00:20:06 +0000 (00:20 +0000)]
Daily bump.

18 months agoDaily bump.
GCC Administrator [Mon, 6 Feb 2023 00:19:23 +0000 (00:19 +0000)]
Daily bump.

18 months agoDaily bump.
GCC Administrator [Sun, 5 Feb 2023 00:19:57 +0000 (00:19 +0000)]
Daily bump.

18 months agoFortran: ICE in transformational_result [PR108529]
Harald Anlauf [Tue, 24 Jan 2023 20:39:43 +0000 (21:39 +0100)]
Fortran: ICE in transformational_result [PR108529]

gcc/fortran/ChangeLog:

PR fortran/108529
* simplify.c (simplify_transformation): Do not try to simplify
transformational intrinsic when the ARRAY argument has a NULL shape.

gcc/testsuite/ChangeLog:

PR fortran/108529
* gfortran.dg/pr108529.f90: New test.

(cherry picked from commit 6c96382eed96a9285611f2e3e2e59557094172b8)

18 months agoFortran: error recovery for bad initializers of implied-shape arrays [PR106209]
Harald Anlauf [Thu, 14 Jul 2022 20:24:55 +0000 (22:24 +0200)]
Fortran: error recovery for bad initializers of implied-shape arrays [PR106209]

gcc/fortran/ChangeLog:

PR fortran/106209
* decl.c (add_init_expr_to_sym): Handle bad initializers for
implied-shape arrays.

gcc/testsuite/ChangeLog:

PR fortran/106209
* gfortran.dg/pr106209.f90: New test.

Co-authored-by: Steven G. Kargl <kargl@gcc.gnu.org>
(cherry picked from commit 748f8a8b145dde59c7b63aa68b5a59515b7efc49)

18 months agoFortran: avoid ICE on invalid array subscript triplets [PR108501]
Harald Anlauf [Mon, 23 Jan 2023 20:19:03 +0000 (21:19 +0100)]
Fortran: avoid ICE on invalid array subscript triplets [PR108501]

gcc/fortran/ChangeLog:

PR fortran/108501
* interface.c (get_expr_storage_size): Check array subscript triplets
that we actually have integer values before trying to extract with
mpz_get_si.

gcc/testsuite/ChangeLog:

PR fortran/108501
* gfortran.dg/pr108501.f90: New test.

(cherry picked from commit 771d793df1622a476e1cf8d05f0a6aee350fa56b)

18 months agoFortran: fix NULL pointer dereference in gfc_check_dependency [PR108502]
Harald Anlauf [Mon, 23 Jan 2023 21:13:44 +0000 (22:13 +0100)]
Fortran: fix NULL pointer dereference in gfc_check_dependency [PR108502]

gcc/fortran/ChangeLog:

PR fortran/108502
* dependency.c (gfc_check_dependency): Prevent NULL pointer
dereference while recursively checking expressions.

gcc/testsuite/ChangeLog:

PR fortran/108502
* gfortran.dg/pr108502.f90: New test.

(cherry picked from commit 51767f31878a95161142254dca7119b409699670)

18 months agoFortran: fix ICE in get_expr_storage_size [PR108421]
Harald Anlauf [Mon, 16 Jan 2023 20:30:56 +0000 (21:30 +0100)]
Fortran: fix ICE in get_expr_storage_size [PR108421]

gcc/fortran/ChangeLog:

PR fortran/108421
* interface.c (get_expr_storage_size): Check that we actually have
an integer value before trying to extract it with mpz_get_si.

gcc/testsuite/ChangeLog:

PR fortran/108421
* gfortran.dg/pr108421.f90: New test.

(cherry picked from commit a75760374ee54768e5fd6a27080698bfbbd041ab)

18 months agoFortran: fix ICE in check_charlen_present [PR108420]
Harald Anlauf [Mon, 16 Jan 2023 20:41:09 +0000 (21:41 +0100)]
Fortran: fix ICE in check_charlen_present [PR108420]

gcc/fortran/ChangeLog:

PR fortran/108420
* iresolve.c (check_charlen_present): Preserve character length if
there is no array constructor.

gcc/testsuite/ChangeLog:

PR fortran/108420
* gfortran.dg/pr108420.f90: New test.

(cherry picked from commit e6669c0a50ed8aee9e5997d61e6271668d149218)

18 months agoFortran: diagnose USE associated symbols in COMMON blocks [PR108453]
Harald Anlauf [Sat, 28 Jan 2023 16:59:23 +0000 (17:59 +0100)]
Fortran: diagnose USE associated symbols in COMMON blocks [PR108453]

gcc/fortran/ChangeLog:

PR fortran/108453
* match.c (gfc_match_common): A USE associated name shall not appear
in a COMMON block (F2018:C8121).

gcc/testsuite/ChangeLog:

PR fortran/108453
* gfortran.dg/common_27.f90: New test.

(cherry picked from commit aba9ff8f30d4245294ea2583de1dc28f1c7ccf7b)

18 months agoDaily bump.
GCC Administrator [Sat, 4 Feb 2023 00:18:52 +0000 (00:18 +0000)]
Daily bump.

18 months agoDaily bump.
GCC Administrator [Fri, 3 Feb 2023 00:19:24 +0000 (00:19 +0000)]
Daily bump.

18 months agolibstdc++: Move closing brace outside #endif [PR104866]
Detlef Vollmann [Thu, 10 Mar 2022 16:57:25 +0000 (16:57 +0000)]
libstdc++: Move closing brace outside #endif [PR104866]

libstdc++-v3/ChangeLog:

PR libstdc++/104866
* include/bits/this_thread_sleep.h: Fix order of #endif and
closing brace of namespace.

(cherry picked from commit b5417a0ba7e26bec2abf05cad6c6ef840a9be41c)

18 months agoipa: Release body more carefully when removing nodes (PR 107944)
Martin Jambor [Thu, 2 Feb 2023 11:22:22 +0000 (12:22 +0100)]
ipa: Release body more carefully when removing nodes (PR 107944)

The code removing function bodies when the last call graph clone of a
node is removed is too aggressive when there are nodes up the
clone_of chain which still need them.  Fixed by expanding the check.

gcc/ChangeLog:

2023-01-18  Martin Jambor  <mjambor@suse.cz>

PR ipa/107944
* cgraph.c (cgraph_node::remove): Check whether nodes up the
lcone_of chain also do not need the body.

(cherry picked from commit db959e250077ae6b4fc08f53fb322719582c5de6)

18 months agoDaily bump.
GCC Administrator [Thu, 2 Feb 2023 00:20:46 +0000 (00:20 +0000)]
Daily bump.

18 months agoDaily bump.
GCC Administrator [Wed, 1 Feb 2023 00:20:52 +0000 (00:20 +0000)]
Daily bump.

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

18 months agoDaily bump.
GCC Administrator [Mon, 30 Jan 2023 00:20:10 +0000 (00:20 +0000)]
Daily bump.

18 months agoDaily bump.
GCC Administrator [Sun, 29 Jan 2023 00:20:59 +0000 (00:20 +0000)]
Daily bump.

18 months agoDaily bump.
GCC Administrator [Sat, 28 Jan 2023 00:20:26 +0000 (00:20 +0000)]
Daily bump.

18 months agoDaily bump.
GCC Administrator [Fri, 27 Jan 2023 00:21:01 +0000 (00:21 +0000)]
Daily bump.

18 months agopru: Fix CLZ expansion for QI and HI modes
Dimitar Dimitrov [Sat, 21 Jan 2023 16:10:59 +0000 (18:10 +0200)]
pru: Fix CLZ expansion for QI and HI modes

The recent gcc.dg/tree-ssa/clz-char.c test case failed for PRU target,
exposing a wrong code generation bug in the PRU backend.  The "clz"
pattern did not produce correct output for QI and HI input operand
modes.  SI mode is ok.

The "clz" pattern is expanded to an LMBD instruction to get the
left-most bit position having value "1".  In turn, to get the correct
"clz" value, that bit position must be subtracted from the MSB bit
position of the input operand.  The old behaviour of hard-coding 31
for MSB bit position is wrong.

The LMBD instruction returns 32 if input operand is zero, irrespective
of its register mode.  This maps nicely for SI mode, where the "clz"
pattern outputs -1.  It also leads to peculiar (but valid!) output
values from the "clz" pattern for QI and HI zero-valued inputs.

The corresponding commit in trunk contains two new test cases, which
have been removed here because they depend on r13-5195-g4798080d4a3530.
Regtested for pru-unknown-elf.

gcc/ChangeLog:

* config/pru/pru.h (CLZ_DEFINED_VALUE_AT_ZERO): Fix value for QI
and HI input modes.
* config/pru/pru.md (clz): Fix generated code for QI and HI
input modes.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
(cherry picked from commit c517295940a23db8ca165dfd5d0edea4457eda49)

18 months agorestrict gcc.dg/pr107554.c to 64bit platforms
Richard Biener [Mon, 14 Nov 2022 07:08:26 +0000 (08:08 +0100)]
restrict gcc.dg/pr107554.c to 64bit platforms

The following avoids exceeding the maximum object size on 32bit
platforms.

* gcc.dg/pr107554.c: Restrict to lp64.

(cherry picked from commit e7ebdf51ea514ad0b2272ecfa97d6ec72a527e40)

18 months agoDaily bump.
GCC Administrator [Thu, 26 Jan 2023 00:20:35 +0000 (00:20 +0000)]
Daily bump.

18 months agoaarch64: fix warning emission for ABI break since GCC 9.1
Christophe Lyon [Tue, 14 Jun 2022 21:08:33 +0000 (21:08 +0000)]
aarch64: fix warning emission for ABI break since GCC 9.1

While looking at PR 105549, which is about fixing the ABI break
introduced in GCC 9.1 in parameter alignment with bit-fields, we
noticed that the GCC 9.1 warning is not emitted in all the cases where
it should be.  This patch fixes that and the next patch in the series
fixes the GCC 9.1 break.

We split this into two patches since patch #2 introduces a new ABI
break starting with GCC 13.1.  This way, patch #1 can be back-ported
to release branches if needed to fix the GCC 9.1 warning issue.

The main idea is to add a new global boolean that indicates whether
we're expanding the start of a function, so that aarch64_layout_arg
can emit warnings for callees as well as callers.  This removes the
need for aarch64_function_arg_boundary to warn (with its incomplete
information).  However, in the first patch there are still cases where
we emit warnings were we should not; this is fixed in patch #2 where
we can distinguish between GCC 9.1 and GCC.13.1 ABI breaks properly.

The fix in aarch64_function_arg_boundary (replacing & with &&) looks
like an oversight of a previous commit in this area which changed
'abi_break' from a boolean to an integer.

We also take the opportunity to fix the comment above
aarch64_function_arg_alignment since the value of the abi_break
parameter was changed in a previous commit, no longer matching the
description.

2022-11-28  Christophe Lyon  <christophe.lyon@arm.com>
    Richard Sandiford  <richard.sandiford@arm.com>

gcc/ChangeLog:

* config/aarch64/aarch64.c (aarch64_function_arg_alignment): Fix
comment.
(aarch64_layout_arg): Factorize warning conditions.
(aarch64_function_arg_boundary): Fix typo.
* function.c (currently_expanding_function_start): New variable.
(expand_function_start): Handle
currently_expanding_function_start.
* function.h (currently_expanding_function_start): Declare.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/bitfield-abi-warning-align16-O2.c: New test.
* gcc.target/aarch64/bitfield-abi-warning-align16-O2-extra.c: New
test.
* gcc.target/aarch64/bitfield-abi-warning-align32-O2.c: New test.
* gcc.target/aarch64/bitfield-abi-warning-align32-O2-extra.c: New
test.
* gcc.target/aarch64/bitfield-abi-warning-align8-O2.c: New test.
* gcc.target/aarch64/bitfield-abi-warning.h: New test.
* g++.target/aarch64/bitfield-abi-warning-align16-O2.C: New test.
* g++.target/aarch64/bitfield-abi-warning-align16-O2-extra.C: New
test.
* g++.target/aarch64/bitfield-abi-warning-align32-O2.C: New test.
* g++.target/aarch64/bitfield-abi-warning-align32-O2-extra.C: New
test.
* g++.target/aarch64/bitfield-abi-warning-align8-O2.C: New test.
* g++.target/aarch64/bitfield-abi-warning.h: New test.

(cherry picked from commit 3df1a115be22caeab3ffe7afb12e71adb54ff132)

18 months agoDaily bump.
GCC Administrator [Wed, 25 Jan 2023 00:20:53 +0000 (00:20 +0000)]
Daily bump.

18 months agotree-optimization/107554 - fix ICE in stlen optimization
Richard Biener [Fri, 11 Nov 2022 13:28:52 +0000 (14:28 +0100)]
tree-optimization/107554 - fix ICE in stlen optimization

The following fixes a wrongly typed variable causing an ICE.

PR tree-optimization/107554
* tree-ssa-strlen.c (strlen_pass::count_nonzero_bytes):
Use unsigned HOST_WIDE_INT type for the strlen.

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

Co-Authored-By: Nikita Voronov <nik_1357@mail.ru>
(cherry picked from commit 81de4037454275f8ed6d858fbc129e832c6147ef)

18 months agotree-optimization/107323 - loop distribution partition ordering issue
Richard Biener [Fri, 21 Oct 2022 07:45:44 +0000 (09:45 +0200)]
tree-optimization/107323 - loop distribution partition ordering issue

The following reverts part of the PR94125 fix which causes us to
use a bogus partition ordering after applying versioning for
alias to the testcase in PR107323.  Instead PR94125 is fixed by
appropriately considering to be merged SCCs when skipping edges
we want to ignore because of the alias versioning.

PR tree-optimization/107323
* tree-loop-distribution.c (pg_unmark_merged_alias_ddrs):
New function.
(loop_distribution::break_alias_scc_partitions): Revert
postorder save/restore from the PR94125 fix.  Instead
make sure to not ignore edges from SCCs we are going to
merge.

* gcc.dg/tree-ssa/pr107323.c: New testcase.

(cherry picked from commit 09f9814dc02c161ed78604c6df70b19b596f7524)

18 months agotree-optimization/107254 - check and support live lanes from permutes
Richard Biener [Fri, 14 Oct 2022 09:14:59 +0000 (11:14 +0200)]
tree-optimization/107254 - check and support live lanes from permutes

The following fixes an omission from adding SLP permute nodes which
is live lanes originating from those.  We have to check that we
can extract the lane and have to actually code generate them.

PR tree-optimization/107254
* tree-vect-slp.c (vect_slp_analyze_node_operations_1):
For permutes also analyze live lanes.
(vect_schedule_slp_node): For permutes also code generate
live lane extracts.

* gfortran.dg/vect/pr107254.f90: New testcase.

(cherry picked from commit 9ed4a849afb5b18b462bea311e7eee454c2c9f68)

18 months agotree-optimization/107212 - SLP reduction of reduction paths
Richard Biener [Tue, 11 Oct 2022 09:34:55 +0000 (11:34 +0200)]
tree-optimization/107212 - SLP reduction of reduction paths

The following fixes an issue with how we handle epilogue generation
for SLP reductions of reduction paths where the actual live lanes
are not "canonical".  We need to make sure to identify all live
lanes as reductions and thus have to iterate over all participating
SLP lanes when walking the reduction SSA use-def chain.  Also the
previous attempt likely to mitigate such issue in
vectorizable_live_operation is misguided and has to be removed.

PR tree-optimization/107212
* tree-vect-loop.c (vectorizable_reduction): Make sure to
set STMT_VINFO_REDUC_DEF for all live lanes in a SLP
reduction.
(vectorizable_live_operation): Do not pun to the SLP
node representative for reduction epilogue generation.

* gcc.dg/vect/pr107212-1.c: New testcase.
* gcc.dg/vect/pr107212-2.c: Likewise.

(cherry picked from commit ee467644c53ee2f7d633a8e1f53603feafab4351)

18 months agodriver: fix environ corruption after putenv() [PR106624]
Sergei Trofimovich [Tue, 16 Aug 2022 11:35:07 +0000 (12:35 +0100)]
driver: fix environ corruption after putenv() [PR106624]

The bug appeared afte r13-2010-g1270ccda70ca09 "Factor out
jobserver_active_p" slightly changed `putenv()` use from allocating
to non-allocating:

    -xputenv (concat ("MAKEFLAGS=", dup, NULL));
    +xputenv (jinfo.skipped_makeflags.c_str ());

`xputenv()` (and `putenv()`) don't copy strings and only store the
pointer in the `environ` global table. As a result `environ` got
corrupted as soon as `jinfo.skipped_makeflags` store got deallocated.

This started causing bootstrap crashes in `execv()` calls:

    xgcc: fatal error: cannot execute '/build/build/./prev-gcc/collect2': execv: Bad address

The change restores memory allocation for `xputenv()` argument.

gcc/

PR driver/106624
* gcc.c (driver::detect_jobserver): Allocate storage xputenv()
argument using xstrdup().

(cherry picked from commit 2b403297b111c990c331b5bbb6165b061ad2259b)

18 months agoDaily bump.
GCC Administrator [Tue, 24 Jan 2023 00:20:23 +0000 (00:20 +0000)]
Daily bump.

18 months agoDaily bump.
GCC Administrator [Mon, 23 Jan 2023 00:19:53 +0000 (00:19 +0000)]
Daily bump.

18 months agoDaily bump.
GCC Administrator [Sun, 22 Jan 2023 00:20:11 +0000 (00:20 +0000)]
Daily bump.

18 months agoDaily bump.
GCC Administrator [Sat, 21 Jan 2023 00:19:32 +0000 (00:19 +0000)]
Daily bump.

18 months agoDaily bump.
GCC Administrator [Fri, 20 Jan 2023 00:19:54 +0000 (00:19 +0000)]
Daily bump.

18 months agoDaily bump.
GCC Administrator [Thu, 19 Jan 2023 00:20:03 +0000 (00:20 +0000)]
Daily bump.

18 months agolibstdc++: Unblock atomic wait on non-futex platforms [PR106183]
Jonathan Wakely [Thu, 28 Jul 2022 15:15:58 +0000 (16:15 +0100)]
libstdc++: Unblock atomic wait on non-futex platforms [PR106183]

When using a mutex and condition variable, the notifying thread needs to
increment _M_ver while holding the mutex lock, and the waiting thread
needs to re-check after locking the mutex. This avoids a missed
notification as described in the PR.

By moving the increment of _M_ver to the base _M_notify we can make the
use of the mutex local to the use of the condition variable, and
simplify the code a little. We can use a relaxed store because the mutex
already provides sequential consistency. Also we don't need to check
whether __addr == &_M_ver because we know that's always true for
platforms that use a condition variable, and so we also know that we
always need to use notify_all() not notify_one().

Reviewed-by: Thomas Rodgers <trodgers@redhat.com>
libstdc++-v3/ChangeLog:

PR libstdc++/106183
* include/bits/atomic_wait.h (__waiter_pool_base::_M_notify):
Move increment of _M_ver here.
[!_GLIBCXX_HAVE_PLATFORM_WAIT]: Lock mutex around increment.
Use relaxed memory order and always notify all waiters.
(__waiter_base::_M_do_wait) [!_GLIBCXX_HAVE_PLATFORM_WAIT]:
Check value again after locking mutex.
(__waiter_base::_M_notify): Remove increment of _M_ver.

(cherry picked from commit af98cb88eb4be6a1668ddf966e975149bf8610b1)

18 months agoDaily bump.
GCC Administrator [Wed, 18 Jan 2023 00:20:16 +0000 (00:20 +0000)]
Daily bump.

19 months agoDaily bump.
GCC Administrator [Tue, 17 Jan 2023 00:20:09 +0000 (00:20 +0000)]
Daily bump.

19 months agovarasm: Fix type confusion bug
Alex Coplan [Thu, 1 Dec 2022 17:36:02 +0000 (17:36 +0000)]
varasm: Fix type confusion bug

This patch fixes a type confusion bug in varasm.c:assemble_variable.
The problem is that the current code calls:

  sect = get_variable_section (decl, false);

and then accesses sect->named.name without checking whether the section
is in fact a named section. In the surrounding else clause, we only know
that SECTION_STYLE (sect) != SECTION_NOSWITCH, so it is possible that
the section is an unnamed section.

In practice, this means that we end up doing a wild string compare
between a function pointer and the string literal ".vtable_map_vars".
This is because sect->named.name aliases sect->unnamed.callback in the
section union.

This can be seen in GDB with a simple testcase such as "int x;".

This patch fixes the issue by checking the SECTION_STYLE of the section
is in fact SECTION_NAMED before trying to do the string comparison.

We drop the existing check of whether sect->named.name is non-NULL
because this should presumably always be the case for a named section.

gcc/ChangeLog:

* varasm.c (assemble_variable): Fix type confusion bug when
checking for ".vtable_map_vars" section.

(cherry picked from commit de144fdab17dbbb64ccb540056ab78b4ffb3fbbc)

19 months agoDaily bump.
GCC Administrator [Mon, 16 Jan 2023 00:20:19 +0000 (00:20 +0000)]
Daily bump.

19 months agoDaily bump.
GCC Administrator [Sun, 15 Jan 2023 00:20:02 +0000 (00:20 +0000)]
Daily bump.

19 months agoDaily bump.
GCC Administrator [Sat, 14 Jan 2023 00:19:38 +0000 (00:19 +0000)]
Daily bump.

19 months agoDaily bump.
GCC Administrator [Fri, 13 Jan 2023 00:20:28 +0000 (00:20 +0000)]
Daily bump.

19 months agoDaily bump.
GCC Administrator [Thu, 12 Jan 2023 00:24:14 +0000 (00:24 +0000)]
Daily bump.

19 months agoFix problematic interaction between bitfields, unions, SSO and SRA
Eric Botcazou [Wed, 11 Jan 2023 14:58:47 +0000 (15:58 +0100)]
Fix problematic interaction between bitfields, unions, SSO and SRA

The handling of bitfields by the SRA pass is peculiar and this must be taken
into account to support the scalar_storage_order attribute.

gcc/
PR tree-optimization/108199
* tree-sra.c (sra_modify_expr): Deal with reverse storage order
for bit-field references.

gcc/testsuite/
* gcc.dg/sso-17.c: New test.

19 months agoDaily bump.
GCC Administrator [Wed, 11 Jan 2023 00:20:31 +0000 (00:20 +0000)]
Daily bump.

19 months agoFix memory constraint on MVE v[ld/st][2/4] instructions [PR107714]
Stam Markianos-Wright [Fri, 30 Dec 2022 11:25:22 +0000 (11:25 +0000)]
Fix memory constraint on MVE v[ld/st][2/4] instructions [PR107714]

In the M-Class Arm-ARM:

https://developer.arm.com/documentation/ddi0553/bu/?lang=en

these MVE instructions only have '!' writeback variant and at:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107714

we found that the Um constraint would also allow through a
register offset writeback, resulting in an assembler error.

Here I have added a new constraint and predicate for these
instructions, which (uniquely, AFAICT), only support a `!` writeback
increment by the data size (inside the compiler this is a POST_INC).

No regressions in arm-none-eabi with MVE and MVE.FP.

gcc/ChangeLog:
PR target/107714
* config/arm/arm-protos.h (mve_struct_mem_operand): New protoype.
* config/arm/arm.c (mve_struct_mem_operand): New function.
* config/arm/constraints.md (Ug): New constraint.
* config/arm/mve.md (mve_vst4q<mode>): Change constraint.
(mve_vst2q<mode>): Likewise.
(mve_vld4q<mode>): Likewise.
(mve_vld2q<mode>): Likewise.
* config/arm/predicates.md (mve_struct_operand): New predicate.

gcc/testsuite/ChangeLog:
PR target/107714
* gcc.target/arm/mve/intrinsics/vldst24q_reg_offset.c: New test.

(cherry picked from commit 4269a6567eb991e6838f40bda5be9e3a7972530c)

19 months agoDaily bump.
GCC Administrator [Tue, 10 Jan 2023 00:21:05 +0000 (00:21 +0000)]
Daily bump.

19 months agoDaily bump.
GCC Administrator [Mon, 9 Jan 2023 00:20:24 +0000 (00:20 +0000)]
Daily bump.

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