]> gcc.gnu.org Git - gcc.git/log
gcc.git
19 months agoDaily bump.
GCC Administrator [Sun, 2 Oct 2022 00:21:27 +0000 (00:21 +0000)]
Daily bump.

19 months agoFortran: Fix automatic reallocation inside select rank [PR100103]
José Rui Faustino de Sousa [Wed, 21 Sep 2022 20:55:02 +0000 (22:55 +0200)]
Fortran: Fix automatic reallocation inside select rank [PR100103]

gcc/fortran/ChangeLog:

PR fortran/100103
* trans-array.cc (gfc_is_reallocatable_lhs): Add select rank
temporary associate names as possible targets of automatic
reallocation.

gcc/testsuite/ChangeLog:

PR fortran/100103
* gfortran.dg/PR100103.f90: New test.

(cherry picked from commit 12b537b9b7fd50f4b2fbfcb7ccf45f8d66085577)

19 months agoFortran: Fix function attributes [PR100132]
José Rui Faustino de Sousa [Mon, 19 Sep 2022 20:00:45 +0000 (22:00 +0200)]
Fortran: Fix function attributes [PR100132]

gcc/fortran/ChangeLog:

PR fortran/100132
* trans-types.cc (create_fn_spec): Fix function attributes when
passing polymorphic pointers.

gcc/testsuite/ChangeLog:

PR fortran/100132
* gfortran.dg/PR100132.f90: New test.

(cherry picked from commit be60aa5b608b5f09fadfeff852a46589ac311a42)

19 months agoDaily bump.
GCC Administrator [Sat, 1 Oct 2022 00:22:50 +0000 (00:22 +0000)]
Daily bump.

19 months agoDaily bump.
GCC Administrator [Fri, 30 Sep 2022 00:22:49 +0000 (00:22 +0000)]
Daily bump.

19 months agoc++: fix triviality of class with unsatisfied op=
Jason Merrill [Thu, 29 Sep 2022 17:45:02 +0000 (13:45 -0400)]
c++: fix triviality of class with unsatisfied op=

cxx20_pair is trivially copyable because it has a trivial copy constructor
and only a deleted copy assignment operator; the non-triviality of the
unsatisfied copy assignment overload is not considered.

gcc/cp/ChangeLog:

* class.cc (check_methods): Call constraints_satisfied_p.

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/cond-triv3.C: New test.

19 months agoFortran: error recovery while simplifying intrinsic UNPACK [PR107054]
Harald Anlauf [Tue, 27 Sep 2022 18:54:28 +0000 (20:54 +0200)]
Fortran: error recovery while simplifying intrinsic UNPACK [PR107054]

gcc/fortran/ChangeLog:

PR fortran/107054
* simplify.cc (gfc_simplify_unpack): Replace assert by condition
that terminates simplification when there are not enough elements
in the constructor of argument VECTOR.

gcc/testsuite/ChangeLog:

PR fortran/107054
* gfortran.dg/pr107054.f90: New test.

(cherry picked from commit 78bc6497fc61bbdacfb416ee0246a775360d9af6)

19 months agoFortran: fix ICE in generate_coarray_sym_init [PR82868]
Harald Anlauf [Wed, 21 Sep 2022 17:55:30 +0000 (19:55 +0200)]
Fortran: fix ICE in generate_coarray_sym_init [PR82868]

gcc/fortran/ChangeLog:

PR fortran/82868
* trans-decl.cc (generate_coarray_sym_init): Skip symbol
if attr.associate_var.

gcc/testsuite/ChangeLog:

PR fortran/82868
* gfortran.dg/associate_26a.f90: New test.

(cherry picked from commit bc71318a91286b5f00e88f07aab818ac82510692)

19 months agoFortran: NULL pointer dereference in invalid simplification [PR106985]
Harald Anlauf [Tue, 20 Sep 2022 20:23:43 +0000 (22:23 +0200)]
Fortran: NULL pointer dereference in invalid simplification [PR106985]

gcc/fortran/ChangeLog:

PR fortran/106985
* expr.cc (gfc_simplify_expr): Avoid NULL pointer dereference.

gcc/testsuite/ChangeLog:

PR fortran/106985
* gfortran.dg/pr106985.f90: New test.

(cherry picked from commit 8dbb15bc2d019488240c1e69d93121b0347ac092)

19 months agoi386: Mark XMM4-XMM6 as clobbered by encodekey128/encodekey256
H.J. Lu [Tue, 27 Sep 2022 23:19:11 +0000 (16:19 -0700)]
i386: Mark XMM4-XMM6 as clobbered by encodekey128/encodekey256

encodekey128 and encodekey256 operations clear XMM4-XMM6.  But it is
documented that XMM4-XMM6 are reserved for future usages and software
should not rely upon them being zeroed.  Change encodekey128 and
encodekey256 to clobber XMM4-XMM6.

gcc/

PR target/107061
* config/i386/predicates.md (encodekey128_operation): Check
XMM4-XMM6 as clobbered.
(encodekey256_operation): Likewise.
* config/i386/sse.md (encodekey128u32): Clobber XMM4-XMM6.
(encodekey256u32): Likewise.

gcc/testsuite/

PR target/107061
* gcc.target/i386/keylocker-encodekey128.c: Don't check
XMM4-XMM6.
* gcc.target/i386/keylocker-encodekey256.c: Likewise.

(cherry picked from commit db288230db55dc1ff626f46c708b555847013a41)

19 months agolibstdc++: Disable volatile-qualified std::bind for C++20
Jonathan Wakely [Wed, 28 Sep 2022 11:39:41 +0000 (12:39 +0100)]
libstdc++: Disable volatile-qualified std::bind for C++20

LWG 2487 added a precondition to std::bind for C++17, making
volatile-qualified uses undefined. We still support it, but with a
deprecated warning.

P1065R2 made it explicitly ill-formed for C++20, so we should no longer
accept it as deprecated. This implements that change.

libstdc++-v3/ChangeLog:

* doc/xml/manual/evolution.xml: Document std::bind API
changes.
* doc/xml/manual/intro.xml: Document LWG 2487 status.
* doc/xml/manual/using.xml: Clarify default value of
_GLIBCXX_USE_DEPRECATED.
* doc/html/*: Regenerate.
* include/std/functional (_Bind::operator()(Args&&...) volatile)
(_Bind::operator()(Args&&...) const volatile)
(_Bind_result::operator()(Args&&...) volatile)
(_Bind_result::operator()(Args&&...) const volatile): Replace
with deleted overload for C++20 and later.
* testsuite/20_util/bind/cv_quals.cc: Check for deprecated
warnings in C++17.
* testsuite/20_util/bind/cv_quals_2.cc: Likewise, and check for
ill-formed in C++20.

(cherry picked from commit d01f112de4a54db6d2abef836e6dff3a08167389)

19 months agoOpenACC: Fix reduction tree-sharing issue [PR106982]
Tobias Burnus [Mon, 26 Sep 2022 10:45:28 +0000 (12:45 +0200)]
OpenACC: Fix reduction tree-sharing issue [PR106982]

The tree for var == incoming == outgound was
'MEM <double[5]> [(double *)&reduced]' which caused the ICE
"incorrect sharing of tree nodes".

PR middle-end/106982

gcc/ChangeLog:

* omp-low.cc (lower_oacc_reductions): Add some unshare_expr.

gcc/testsuite/ChangeLog:

* c-c++-common/goacc/reduction-7.c: New test.
* c-c++-common/goacc/reduction-8.c: New test.

(cherry picked from commit d3df98807b58df186061ad52ff87cc09ba593e9b)

19 months agoDaily bump.
GCC Administrator [Thu, 29 Sep 2022 00:22:00 +0000 (00:22 +0000)]
Daily bump.

19 months agoaarch64: Add Arm Neoverse V2 support
Kyrylo Tkachov [Fri, 23 Sep 2022 11:12:29 +0000 (12:12 +0100)]
aarch64: Add Arm Neoverse V2 support

This patch adds -mcpu/-mtune support for the Arm Neoverse V2 core.
This updates the internal references to "demeter", but leaves "demeter" as an
accepted value to -mcpu/-mtune as it appears in the released GCC 12 series.

Bootstrapped and tested on aarch64-none-linux-gnu.

gcc/ChangeLog:

* config/aarch64/aarch64-cores.def (neoverse-v2): New entry.
(demeter): Update tunings to neoversev2.
* config/aarch64/aarch64-tune.md: Regenerate.
* config/aarch64/aarch64.cc (demeter_addrcost_table): Rename to
neoversev2_addrcost_table.
(demeter_regmove_cost): Rename to neoversev2_addrcost_table.
(demeter_advsimd_vector_cost): Rename to neoversev2_advsimd_vector_cost.
(demeter_sve_vector_cost): Rename to neoversev2_sve_vector_cost.
(demeter_scalar_issue_info): Rename to neoversev2_scalar_issue_info.
(demeter_advsimd_issue_info): Rename to neoversev2_advsimd_issue_info.
(demeter_sve_issue_info): Rename to neoversev2_sve_issue_info.
(demeter_vec_issue_info): Rename to neoversev2_vec_issue_info.
Update references to above.
(demeter_vector_cost): Rename to neoversev2_vector_cost.
(demeter_tunings): Rename to neoversev2_tunings.
(aarch64_vec_op_count::rename_cycles_per_iter): Use
neoversev2_sve_issue_info instead of demeter_sve_issue_info.
* doc/invoke.texi (AArch64 Options): Document neoverse-v2.

(cherry picked from commit 14d4b4fb12041dde1511262b926662929196c3fe)

19 months agoDaily bump.
GCC Administrator [Wed, 28 Sep 2022 00:21:00 +0000 (00:21 +0000)]
Daily bump.

19 months agoc-family: Drop nothrow from c_keywords
Marek Polacek [Tue, 27 Sep 2022 14:40:09 +0000 (10:40 -0400)]
c-family: Drop nothrow from c_keywords

As discussed in
<https://gcc.gnu.org/pipermail/gcc-patches/2022-September/602337.html>.

gcc/c-family/ChangeLog:

* c-format.cc (c_keywords): Drop nothrow.

19 months agoDaily bump.
GCC Administrator [Tue, 27 Sep 2022 00:22:34 +0000 (00:22 +0000)]
Daily bump.

19 months agoDaily bump.
GCC Administrator [Mon, 26 Sep 2022 00:21:08 +0000 (00:21 +0000)]
Daily bump.

19 months agoDaily bump.
GCC Administrator [Sun, 25 Sep 2022 00:22:36 +0000 (00:22 +0000)]
Daily bump.

19 months agoDaily bump.
GCC Administrator [Sat, 24 Sep 2022 00:21:40 +0000 (00:21 +0000)]
Daily bump.

19 months agoDaily bump.
GCC Administrator [Fri, 23 Sep 2022 00:22:05 +0000 (00:22 +0000)]
Daily bump.

19 months agoUpdate gcc fr.po
Joseph Myers [Thu, 22 Sep 2022 21:57:58 +0000 (21:57 +0000)]
Update gcc fr.po

* fr.po: Update.

19 months agoFortran: error recovery on invalid ARRAY argument to FINDLOC [PR106986]
Harald Anlauf [Tue, 20 Sep 2022 20:41:48 +0000 (22:41 +0200)]
Fortran: error recovery on invalid ARRAY argument to FINDLOC [PR106986]

gcc/fortran/ChangeLog:

PR fortran/106986
* simplify.cc (gfc_simplify_findloc): Do not try to simplify
intrinsic FINDLOC when the ARRAY argument has a NULL shape.

gcc/testsuite/ChangeLog:

PR fortran/106986
* gfortran.dg/pr106986.f90: New test.

(cherry picked from commit 5976fbf9d5dd9542fcb82eebb2185886fd52d000)

19 months agoi386: Add syscall to enable AMX for latest kernels
Haochen Jiang [Thu, 16 Jun 2022 07:15:53 +0000 (00:15 -0700)]
i386: Add syscall to enable AMX for latest kernels

gcc/testsuite/ChangeLog:

* gcc.target/i386/amx-check.h (request_perm_xtile_data):
New function to check if AMX is usable and enable AMX.
(main): Run test if AMX is usable.

19 months agoDaily bump.
GCC Administrator [Thu, 22 Sep 2022 00:23:47 +0000 (00:23 +0000)]
Daily bump.

19 months agoaarch64: Fix GTY markup for arm_sve.h [PR106491]
Richard Sandiford [Wed, 21 Sep 2022 08:30:31 +0000 (09:30 +0100)]
aarch64: Fix GTY markup for arm_sve.h [PR106491]

It turns out that GTY(()) markers in definitions like:

  GTY(()) tree scalar_types[NUM_VECTOR_TYPES];

are not effective and are silently ignored.  The GTY(()) has
to come after an extern or static.

The externs associated with the SVE ACLE GTY variables are in
aarch64-sve-builtins.h.  This file is not in tm_include_list because
we don't want every target-facing file to include it.  It therefore
isn't in the list of GC header files either.

In this case that's a blessing in disguise, since the variables
belong to a namespace and gengtype doesn't understand namespaces.
I think the fix is instead to add an extra extern before each
variable declaration, similarly to varasm.cc and vtable-verify.cc.
(This works due to a "using namespace" at the end of the file.)

gcc/
PR target/106491
* config/aarch64/aarch64-sve-builtins.cc (scalar_types)
(acle_vector_types, acle_svpattern, acle_svprfop): Add GTY
markup to (new) extern declarations instead of to the main
definition.

(cherry picked from commit 6bf5a704d36243c4c04b17a9408ebe881beb0051)

19 months agors6000: Fix the check of bif argument number [PR104482]
Kewen Lin [Tue, 13 Sep 2022 09:14:23 +0000 (04:14 -0500)]
rs6000: Fix the check of bif argument number [PR104482]

As PR104482 shown, it's one regression about the handlings when
the argument number is more than the one of built-in function
prototype.  The new bif support only catches the case that the
argument number is less than the one of function prototype, but
it misses the case that the argument number is more than the one
of function prototype.  Because it uses "n != expected_args",
n is updated in

   for (n = 0; !VOID_TYPE_P (TREE_VALUE (fnargs)) && n < nargs;
        fnargs = TREE_CHAIN (fnargs), n++)

, it's restricted to be less than or equal to expected_args with
the guard !VOID_TYPE_P (TREE_VALUE (fnargs)), so it's wrong.

The fix is to use nargs instead, also move the checking hunk's
location ahead to avoid useless further scanning when the counts
mismatch.

PR target/104482

gcc/ChangeLog:

* config/rs6000/rs6000-c.cc (altivec_resolve_overloaded_builtin): Fix
the equality check for argument number, and move this hunk ahead.

gcc/testsuite/ChangeLog:

* gcc.target/powerpc/pr104482.c: New test.

(cherry picked from commit 38db48346cc045ed5656233c42d01d6d06bffc35)

19 months agors6000: Handle unresolved overloaded builtin [PR105485]
Kewen.Lin [Tue, 13 Sep 2022 09:13:59 +0000 (04:13 -0500)]
rs6000: Handle unresolved overloaded builtin [PR105485]

PR105485 exposes that new builtin function framework doesn't handle
unresolved overloaded builtin function well.  With new builtin
function support, we don't have builtin info for any overloaded
rs6000_gen_builtins enum, since they are expected to be resolved to
one specific instance.  So when function rs6000_gimple_fold_builtin
faces one unresolved overloaded builtin, the access for builtin info
becomes out of bound and gets ICE then.

We should not try to fold one unresolved overloaded builtin there
and as the previous support we should emit one error message during
expansion phase like "unresolved overload for builtin ...".

PR target/105485

gcc/ChangeLog:

* config/rs6000/rs6000-builtin.cc (rs6000_gimple_fold_builtin): Add
the handling for unresolved overloaded builtin function.
(rs6000_expand_builtin): Likewise.

gcc/testsuite/ChangeLog:

* g++.target/powerpc/pr105485.C: New test.

(cherry picked from commit 94504c9ae157db937a2e62d533a36d56598f3c09)

19 months agoDaily bump.
GCC Administrator [Wed, 21 Sep 2022 00:23:23 +0000 (00:23 +0000)]
Daily bump.

19 months agoDaily bump.
GCC Administrator [Tue, 20 Sep 2022 00:22:15 +0000 (00:22 +0000)]
Daily bump.

19 months agoc: Stray inform note with -Waddress [PR106947]
Marek Polacek [Mon, 19 Sep 2022 18:12:55 +0000 (14:12 -0400)]
c: Stray inform note with -Waddress [PR106947]

A trivial fix for maybe_warn_for_null_address where we print an
inform note without first checking the return value of a warning
call.

PR c/106947

gcc/c/ChangeLog:

* c-typeck.cc (maybe_warn_for_null_address): Don't emit stray
notes.

gcc/testsuite/ChangeLog:

* c-c++-common/Waddress-7.c: New test.

(cherry picked from commit 2d9429d5c0f86f588bdfd85bb9e236d2be367d3f)

19 months agoFix PR target/99184: Wrong cast from double to 16-bit and 32-bit ints
Georg-Johann Lay [Mon, 19 Sep 2022 07:46:58 +0000 (09:46 +0200)]
Fix PR target/99184: Wrong cast from double to 16-bit and 32-bit ints

this patch fixed PR target/99184 which incorrectly rounded during 64-bit
(long) double to 16-bit and 32-bit integers.

The patch just removes the respective roundings from
libf7-asm.sx::to_integer and ::to_unsigned.  Luckily, LibF7 does nowhere
use respective functions internally, the only user is in libf7.c::f7_exp

which reads

   f7_round (qq, qq);
   int16_t q = f7_get_s16 (qq);

so that f7_get_s16() operates on an already rounded value, and therefore
this code works unaltered with or without rounding in to_integer.

PR target/99184
libgcc/config/avr/libf7/
* libf7-asm.sx (to_integer, to_unsigned): Don't round 16-bit
and 32-bit integers.

(cherry picked from commit 0b5b8ac5cb7fe92dd17ae8bd7de84640daa59e84)

19 months agoDaily bump.
GCC Administrator [Mon, 19 Sep 2022 00:22:34 +0000 (00:22 +0000)]
Daily bump.

19 months agoDaily bump.
GCC Administrator [Sun, 18 Sep 2022 00:21:23 +0000 (00:21 +0000)]
Daily bump.

19 months agoDaily bump.
GCC Administrator [Sat, 17 Sep 2022 00:23:09 +0000 (00:23 +0000)]
Daily bump.

19 months agoFortran: catch NULL pointer dereferences while simplifying PACK [PR106857]
Harald Anlauf [Thu, 15 Sep 2022 20:39:24 +0000 (22:39 +0200)]
Fortran: catch NULL pointer dereferences while simplifying PACK [PR106857]

gcc/fortran/ChangeLog:

PR fortran/106857
* simplify.cc (gfc_simplify_pack): Check for NULL pointer dereferences
while walking through constructors (error recovery).

gcc/testsuite/ChangeLog:

PR fortran/106857
* gfortran.dg/pr106857.f90: New test.

(cherry picked from commit 2b75d5f533b9d6b39f4055949aff64ed0d22dd24)

19 months agoFortran: Fix ICE with automatic reallocation [PR100245]
José Rui Faustino de Sousa [Fri, 2 Sep 2022 19:35:22 +0000 (21:35 +0200)]
Fortran: Fix ICE with automatic reallocation [PR100245]

gcc/fortran/ChangeLog:

PR fortran/100245
* trans-expr.cc (trans_class_assignment): Add if clause to handle
derived type in the LHS.

gcc/testsuite/ChangeLog:

PR fortran/100245
* gfortran.dg/PR100245.f90: New test.

(cherry picked from commit 504424f33771be0405454e7845219d5df1bb88bb)

19 months agolibstdc++: Document new libstdc++.so symbol version
Jonathan Wakely [Fri, 16 Sep 2022 09:16:04 +0000 (10:16 +0100)]
libstdc++: Document new libstdc++.so symbol version

libstdc++-v3/ChangeLog:

* doc/xml/manual/abi.xml: Document GLIBCXX_3.4.30 version.
* doc/html/manual/abi.html: Regenerate.

19 months agoDaily bump.
GCC Administrator [Fri, 16 Sep 2022 00:21:27 +0000 (00:21 +0000)]
Daily bump.

19 months agoDaily bump.
GCC Administrator [Thu, 15 Sep 2022 00:23:33 +0000 (00:23 +0000)]
Daily bump.

19 months agoDaily bump.
GCC Administrator [Wed, 14 Sep 2022 00:23:00 +0000 (00:23 +0000)]
Daily bump.

19 months agolibgo: make runtime.Version return a meaningful string
Ian Lance Taylor [Tue, 13 Sep 2022 20:11:17 +0000 (13:11 -0700)]
libgo: make runtime.Version return a meaningful string

For golang/go#51850
Fixes PR go/106747

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/414734

19 months agoruntime: ignore __morestack function in runtime.Callers
Ian Lance Taylor [Tue, 13 Sep 2022 17:33:20 +0000 (10:33 -0700)]
runtime: ignore __morestack function in runtime.Callers

Backport from trunk.

We were ignoring all functions starting with "__morestack_", but not
the function "__morestack" itself.  Without this change, some tests
such as recover.go started failing recently, though I'm not sure
exactly what changed.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/427935

19 months agors6000/test: Fix empty TU in some cases of effective targets [PR106345]
Kewen Lin [Wed, 7 Sep 2022 01:37:57 +0000 (20:37 -0500)]
rs6000/test: Fix empty TU in some cases of effective targets [PR106345]

As the failure of test case gcc.target/powerpc/pr92398.p9-.c in
PR106345 shows, some test sources for some powerpc effective
targets use empty translation unit wrongly.  The test sources
could go with options like "-ansi -pedantic-errors", then those
effective target checkings will fail unexpectedly with the
error messages like:

  error: ISO C forbids an empty translation unit [-Wpedantic]

This patch is to fix empty TUs with one dummy function definition
accordingly.

PR testsuite/106345

gcc/testsuite/ChangeLog:

* lib/target-supports.exp (check_effective_target_powerpc_sqrt): Add
a function definition to avoid pedwarn about empty translation unit.
(check_effective_target_has_arch_pwr5): Likewise.
(check_effective_target_has_arch_pwr6): Likewise.
(check_effective_target_has_arch_pwr7): Likewise.
(check_effective_target_has_arch_pwr8): Likewise.
(check_effective_target_has_arch_pwr9): Likewise.
(check_effective_target_has_arch_pwr10): Likewise.
(check_effective_target_has_arch_ppc64): Likewise.
(check_effective_target_ppc_float128): Likewise.
(check_effective_target_ppc_float128_insns): Likewise.
(check_effective_target_powerpc_vsx): Likewise.

(cherry picked from commit 7a43e52a48b6403a99d3e8ab3105869b4b3c081e)

19 months agoDaily bump.
GCC Administrator [Tue, 13 Sep 2022 00:22:42 +0000 (00:22 +0000)]
Daily bump.

19 months agoc++: cast to array of unknown bound [PR93259]
Jason Merrill [Mon, 12 Sep 2022 18:14:24 +0000 (14:14 -0400)]
c++: cast to array of unknown bound [PR93259]

We already know to treat a variable of array-of-unknown-bound type as
dependent, we should do the same for arr{}.

PR c++/93259

gcc/cp/ChangeLog:

* pt.cc (type_dependent_expression_p): Treat a compound
literal of array-of-unknown-bound type like a variable.

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/initlist-array17.C: New test.

19 months agoc++: auto member function and auto variable [PR106893]
Jason Merrill [Mon, 12 Sep 2022 17:47:34 +0000 (13:47 -0400)]
c++: auto member function and auto variable [PR106893]

As with PR105623, we need to call mark_single_function sooner to
resolve the type of a BASELINK.

PR c++/106893
PR c++/90451

gcc/cp/ChangeLog:

* decl.cc (cp_finish_decl): Call mark_single_function.

gcc/testsuite/ChangeLog:

* g++.dg/cpp1y/auto-fn65.C: New test.

19 months agolibstdc++: Add already-accepted <ranges> testcase [PR106320]
Patrick Palka [Mon, 12 Sep 2022 19:05:04 +0000 (15:05 -0400)]
libstdc++: Add already-accepted <ranges> testcase [PR106320]

Although PR106320 affected only the 10 and 11 branches, and the testcase
from there is already correctly accepted on trunk and the 12 branch, we
still should add the testcase to trunk/12 too for inter-branch consistency.

PR libstdc++/106320

libstdc++-v3/ChangeLog:

* testsuite/std/ranges/adaptors/join.cc (test13): New test.

(cherry picked from commit db19cfdac8ede93172aecc58612171c239c993ad)

19 months agoDaily bump.
GCC Administrator [Mon, 12 Sep 2022 00:21:14 +0000 (00:21 +0000)]
Daily bump.

19 months agoDaily bump.
GCC Administrator [Sun, 11 Sep 2022 00:21:06 +0000 (00:21 +0000)]
Daily bump.

19 months agoDaily bump.
GCC Administrator [Sat, 10 Sep 2022 00:21:31 +0000 (00:21 +0000)]
Daily bump.

19 months agotree-optimization/106860 - fix profile scaling in split_loop
Richard Biener [Wed, 7 Sep 2022 08:44:33 +0000 (10:44 +0200)]
tree-optimization/106860 - fix profile scaling in split_loop

The following fixes a mistake in loop splitting which assumes loop
latches have a single predecessor and that edge is from the exit
test.  Instead work from the single exit edge we have to find the
edge towards the latch.

PR tree-optimization/106860
* tree-ssa-loop-split.cc (split_loop): Find the exit to
latch edge from the loop exit edge instead of from the
latch.  Verify we're going to find it.

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

(cherry picked from commit 0386609923577e07354ee63754795b2f729e7e00)

19 months agotree-optimization/106841 - gather and hybrid SLP
Richard Biener [Tue, 6 Sep 2022 08:08:44 +0000 (10:08 +0200)]
tree-optimization/106841 - gather and hybrid SLP

Hybrid SLP detection currently fails to consider a not direct
offset operand of a scatter/gather operation.  The following fixes
this.

PR tree-optimization/106841
* tree-vect-slp.cc (vect_detect_hybrid_slp): Also process
scatter/gather offset.

* g++.dg/vect/pr106841.cc: New testcase.

(cherry picked from commit e33e61d417eb5e981bb7d709f8681a2f55ed518a)

19 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.cc (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)

19 months agoDaily bump.
GCC Administrator [Fri, 9 Sep 2022 00:22:17 +0000 (00:22 +0000)]
Daily bump.

19 months agoRTEMS: Add -mvrsave multilibs
Sebastian Huber [Thu, 1 Sep 2022 08:22:47 +0000 (10:22 +0200)]
RTEMS: Add -mvrsave multilibs

gcc/ChangeLog:

* config/rs6000/rtems.h (CPP_OS_DEFAULT_SPEC): Define __PPC_VRSAVE__ if
-mvrsave is present.
* config/rs6000/t-rtems: Add -mvrsave multilib variants for
-mcpu=e6500.

19 months agoDaily bump.
GCC Administrator [Thu, 8 Sep 2022 00:22:43 +0000 (00:22 +0000)]
Daily bump.

19 months agolibstdc++: Fix for explicit copy ctors in <thread> and <future> [PR106695]
Jonathan Wakely [Mon, 22 Aug 2022 14:42:17 +0000 (15:42 +0100)]
libstdc++: Fix for explicit copy ctors in <thread> and <future> [PR106695]

When I changed std::thread and std::async to avoid unnecessary move
construction of temporaries, I introduced a regression where types with
an explicit copy constructor could not be passed to std::thread or
std::async. The fix is to add a constructor instead of using aggregate
initialization of an unnamed temporary.

libstdc++-v3/ChangeLog:

PR libstdc++/106695
* include/bits/std_thread.h (thread::_State_impl): Forward
individual arguments to _Invoker constructor.
(thread::_Invoker): Add constructor. Delete copies.
* include/std/future (__future_base::_Deferred_state): Forward
individual arguments to _Invoker constructor.
(__future_base::_Async_state_impl): Likewise.
* testsuite/30_threads/async/106695.cc: New test.
* testsuite/30_threads/thread/106695.cc: New test.

(cherry picked from commit 5abe0657553580bd1b7488dd84d55138a8d9f23c)

19 months agolibstdc++: Check for overflow in regex back-reference [PR106607]
Jonathan Wakely [Mon, 22 Aug 2022 14:16:16 +0000 (15:16 +0100)]
libstdc++: Check for overflow in regex back-reference [PR106607]

Currently we fail to notice integer overflow when parsing a
back-reference expression, or when converting the parsed result from
long to int. This changes the result to be int, so no conversion is
needed, and uses the overflow-checking built-ins to detect an
out-of-range back-reference.

libstdc++-v3/ChangeLog:

PR libstdc++/106607
* include/bits/regex_compiler.tcc (_Compiler::_M_cur_int_value):
Use built-ins to check for integer overflow in back-reference
number.
* testsuite/28_regex/basic_regex/106607.cc: New test.

(cherry picked from commit 1b09eea33f2bf9d1eae73b25cc25efb05ea1dc3f)

19 months agoDaily bump.
GCC Administrator [Wed, 7 Sep 2022 00:21:15 +0000 (00:21 +0000)]
Daily bump.

19 months agoDaily bump.
GCC Administrator [Tue, 6 Sep 2022 00:20:21 +0000 (00:20 +0000)]
Daily bump.

19 months agoFortran: Fix ICE with -fcheck=pointer [PR100136]
José Rui Faustino de Sousa [Sun, 4 Sep 2022 19:53:09 +0000 (21:53 +0200)]
Fortran: Fix ICE with -fcheck=pointer [PR100136]

gcc/fortran/ChangeLog:

PR fortran/100136
* trans-expr.cc (gfc_conv_procedure_call): Add handling of pointer
expressions.

gcc/testsuite/ChangeLog:

PR fortran/100136
* gfortran.dg/PR100136.f90: New test.

(cherry picked from commit 20d30e737ad79dc36817e59f1676aa8bc0c6b325)

20 months agoDaily bump.
GCC Administrator [Mon, 5 Sep 2022 00:20:45 +0000 (00:20 +0000)]
Daily bump.

20 months agoDaily bump.
GCC Administrator [Sun, 4 Sep 2022 00:20:49 +0000 (00:20 +0000)]
Daily bump.

20 months agors6000: Don't ICE when we disassemble an MMA variable [PR101322]
Peter Bergner [Thu, 1 Sep 2022 02:14:36 +0000 (21:14 -0500)]
rs6000: Don't ICE when we disassemble an MMA variable [PR101322]

When we expand an MMA disassemble built-in with C++ using a pointer that
is cast to a valid MMA type, the type isn't passed down to the expand
machinery and we end up using the base type of the pointer which leads to
an ICE.  This patch enforces we always use the correct MMA type regardless
of the pointer type being used.

2022-08-31  Peter Bergner  <bergner@linux.ibm.com>

gcc/
PR target/101322
* config/rs6000/rs6000-builtin.cc (rs6000_gimple_fold_mma_builtin):
Enforce the use of a valid MMA pointer type.

gcc/testsuite/
PR target/101322
* g++.target/powerpc/pr101322.C: New test.

(cherry picked from commit 2985049049f12b0aa3366ca244d387820385b9e8)

20 months agoDaily bump.
GCC Administrator [Sat, 3 Sep 2022 00:20:51 +0000 (00:20 +0000)]
Daily bump.

20 months agocselib: add function to check if SET is redundant [PR106187]
Richard Earnshaw [Wed, 3 Aug 2022 09:01:51 +0000 (10:01 +0100)]
cselib: add function to check if SET is redundant [PR106187]

A SET operation that writes memory may have the same value as an
earlier store but if the alias sets of the new and earlier store do
not conflict then the set is not truly redundant.  This can happen,
for example, if objects of different types share a stack slot.

To fix this we define a new function in cselib that first checks for
equality and if that is successful then finds the earlier store in the
value history and checks the alias sets.

The routine is used in two places elsewhere in the compiler:
cfgcleanup and postreload.

gcc/ChangeLog:

PR rtl-optimization/106187
* alias.h (mems_same_for_tbaa_p): Declare.
* alias.cc (mems_same_for_tbaa_p): New function.
* dse.cc (record_store): Use it instead of open-coding
alias check.
* cselib.h (cselib_redundant_set_p): Declare.
* cselib.cc: Include alias.h
(cselib_redundant_set_p): New function.
* cfgcleanup.cc: (mark_effect): Use cselib_redundant_set_p instead
of rtx_equal_for_cselib_p.
* postreload.cc (reload_cse_simplify): Use cselib_redundant_set_p.
(reload_cse_noop_set_p): Delete.

(cherry picked from commit 64ce76d940501cb04d14a0d36752b4f93473531c)

20 months agoarm: correctly handle misaligned MEMs on MVE [PR105463]
Richard Earnshaw [Wed, 11 May 2022 12:08:40 +0000 (13:08 +0100)]
arm: correctly handle misaligned MEMs on MVE [PR105463]

Vector operations in MVE must be aligned to the element size, so if we
are asked for a misaligned move in a wider mode we must recast it to a
form suitable for the known alignment (larger elements have better
address offset ranges, so there is some advantage to using wider
element sizes if possible).  Whilst fixing this, also rework the
predicates used for validating operands - the Neon predicates are
not right for MVE.

gcc/ChangeLog:

PR target/105463
* config/arm/mve.md (*movmisalign<mode>_mve_store): Use
mve_memory_operand.
(*movmisalign<mode>_mve_load): Likewise.
* config/arm/vec-common.md (movmisalign<mode>): Convert to generator
form...
(@movmisalign<mode>): ... thus.  Use generic predicates and then
rework operands if they are not valid.  For MVE rework to a
narrower element size if the alignment is not high enough.

(cherry picked from commit 6a116728e27c4da65d84483c0e75561a7479d4d5)

20 months agoAArch64: Fix bootstrap failure due to dump_printf_loc format attribute uses [PR106782]
Tamar Christina [Thu, 1 Sep 2022 21:04:57 +0000 (22:04 +0100)]
AArch64: Fix bootstrap failure due to dump_printf_loc format attribute uses [PR106782]

This fixes the bootstrap failure on AArch64 following -Werror=format by
correcting the print format modifiers in the backend.

gcc/ChangeLog:

PR other/106782
* config/aarch64/aarch64.cc
(aarch64_vector_costs::prefer_unrolled_loop): Replace %u with
HOST_WIDE_INT_PRINT_UNSIGNED.

(cherry picked from commit b98c5262d02c13cdbbf3b985859b436adec94d90)

20 months agoDaily bump.
GCC Administrator [Fri, 2 Sep 2022 00:19:58 +0000 (00:19 +0000)]
Daily bump.

20 months agoFix up dump_printf_loc format attribute and adjust uses [PR106782]
Jakub Jelinek [Thu, 1 Sep 2022 09:07:44 +0000 (11:07 +0200)]
Fix up dump_printf_loc format attribute and adjust uses [PR106782]

As discussed on IRC, the r13-2299-g68c61c2daa1f bug only got missed
because dump_printf_loc had incorrect format attribute and therefore
almost no -Wformat=* checking was performed on it.
3, 0 are suitable for function with (whatever, whatever, const char *, va_list)
arguments, not for (whatever, whatever, const char *, ...), that one should
use 3, 4.

There are 3 spots where the mismatch was worse though, two using %u or %d
for unsigned HOST_WIDE_INT argument and one %T for enum argument (promoted
to int) and this backport just fixes those spots.

2022-09-01  Jakub Jelinek  <jakub@redhat.com>

PR other/106782
* tree-vect-slp.cc (vect_print_slp_tree): Use
HOST_WIDE_INT_PRINT_UNSIGNED instead of %u.
* tree-vect-loop.cc (vect_estimate_min_profitable_iters): Use
HOST_WIDE_INT_PRINT_UNSIGNED instead of %d.
* tree-vect-slp-patterns.cc (vect_pattern_validate_optab): Use %G
instead of %T and STMT_VINFO_STMT (SLP_TREE_REPRESENTATIVE (node))
instead of SLP_TREE_DEF_TYPE (node).

(cherry picked from commit 953e08fde44a596e4ec2491efd15cd645e1ddc48)

20 months agoDaily bump.
GCC Administrator [Thu, 1 Sep 2022 00:20:56 +0000 (00:20 +0000)]
Daily bump.

20 months agoDaily bump.
GCC Administrator [Wed, 31 Aug 2022 00:19:54 +0000 (00:19 +0000)]
Daily bump.

20 months agoUpdate gcc sv.po
Joseph Myers [Tue, 30 Aug 2022 22:04:53 +0000 (22:04 +0000)]
Update gcc sv.po

* sv.po: Update.

20 months agoFortran/OpenMP: Fix strictly structured blocks parsing
Tobias Burnus [Thu, 25 Aug 2022 06:34:03 +0000 (08:34 +0200)]
Fortran/OpenMP: Fix strictly structured blocks parsing

gcc/fortran/ChangeLog:

* parse.cc (parse_omp_structured_block): When parsing strictly
structured blocks, issue an error if the end-directive comes
before the 'end block'.

gcc/testsuite/ChangeLog:

* gfortran.dg/gomp/strictly-structured-block-4.f90: New test.

(cherry picked from commit 33f24eb58748e9db7c827662753757c5c2217eb4)

20 months agoc++: __has_builtin gives the wrong answer [PR106759]
Marek Polacek [Mon, 29 Aug 2022 20:54:05 +0000 (16:54 -0400)]
c++: __has_builtin gives the wrong answer [PR106759]

We've supported __is_nothrow_constructible since r11-4386, but
names_builtin_p didn't know about it, so it gave the wrong answer for
 #if __has_builtin(__is_nothrow_constructible)
 ...
 #endif

I've tested all C++-only built-ins and only two were missing.

PR c++/106759

gcc/cp/ChangeLog:

* cp-objcp-common.cc (names_builtin_p): Handle RID_IS_NOTHROW_ASSIGNABLE
and RID_IS_NOTHROW_CONSTRUCTIBLE.

gcc/testsuite/ChangeLog:

* g++.dg/ext/has-builtin-1.C: New test.

(cherry picked from commit fe915f35b7d8dc768a2b977c09aa02f933e1d1e9)

20 months agosve: Fix fcmuo combine patterns [PR106524]
Tamar Christina [Fri, 12 Aug 2022 11:28:41 +0000 (12:28 +0100)]
sve: Fix fcmuo combine patterns [PR106524]

There's no encoding for fcmuo with zero.  This restricts the combine patterns
from accepting zero registers.

gcc/ChangeLog:

PR target/106524
* config/aarch64/aarch64-sve.md (*fcmuo<mode>_nor_combine,
*fcmuo<mode>_bic_combine): Don't accept comparisons against zero.

gcc/testsuite/ChangeLog:

PR target/106524
* gcc.target/aarch64/sve/pr106524.c: New test.

(cherry picked from commit f4ff20d464f90c85919ce2e7fa63e204dcda4e40)

20 months agoDaily bump.
GCC Administrator [Tue, 30 Aug 2022 00:20:18 +0000 (00:20 +0000)]
Daily bump.

20 months agors6000: Allow conversions of MMA pointer types [PR106017]
Peter Bergner [Sun, 28 Aug 2022 00:44:16 +0000 (19:44 -0500)]
rs6000: Allow conversions of MMA pointer types [PR106017]

GCC incorrectly disables conversions between MMA pointer types, which
are allowed with clang.  The original intent was to disable conversions
between MMA types and other other types, but pointer conversions should
have been allowed.  The fix is to just remove the MMA pointer conversion
handling code altogether.

gcc/
PR target/106017
* config/rs6000/rs6000.cc (rs6000_invalid_conversion): Remove handling
of MMA pointer conversions.

gcc/testsuite/
PR target/106017
* gcc.target/powerpc/pr106017.c: New test.

(cherry picked from commit 1ae1325f24cea1698b56e4299d95446a1f7b90a2)

20 months agox86: Cast stride to __PTRDIFF_TYPE__ in AMX intrinsics
H.J. Lu [Thu, 18 Aug 2022 21:17:33 +0000 (14:17 -0700)]
x86: Cast stride to __PTRDIFF_TYPE__ in AMX intrinsics

On 64-bit Windows, long is 32 bits and can't be used as stride in memory
operand when base is a pointer which is 64 bits.  Cast stride to
__PTRDIFF_TYPE__, instead of long.

PR target/106714
* config/i386/amxtileintrin.h (_tile_loadd_internal): Cast to
__PTRDIFF_TYPE__.
(_tile_stream_loadd_internal): Likewise.
(_tile_stored_internal): Likewise.

(cherry picked from commit aeb9b58225916bc84a0cd02c6fc77bbb92167e53)

20 months agofortran: Expand ieee_arithmetic module's ieee_value inline [PR106579]
Jakub Jelinek [Fri, 26 Aug 2022 07:56:19 +0000 (09:56 +0200)]
fortran: Expand ieee_arithmetic module's ieee_value inline [PR106579]

The following patch expands IEEE_VALUE function inline in the FE,
but only for the powerpc64le-linux IEEE quad real(kind=16) case.

2022-08-26  Jakub Jelinek  <jakub@redhat.com>

PR fortran/106579
* trans-intrinsic.cc: Include realmpfr.h.
(conv_intrinsic_ieee_value): New function.
(gfc_conv_ieee_arithmetic_function): Handle ieee_value.

(cherry picked from commit 0c2d6aa1be2ea85e751852834986ae52d58134d3)

20 months agofortran: Expand ieee_arithmetic module's ieee_class inline [PR106579]
Jakub Jelinek [Fri, 26 Aug 2022 07:52:02 +0000 (09:52 +0200)]
fortran: Expand ieee_arithmetic module's ieee_class inline [PR106579]

The following patch expands IEEE_CLASS inline in the FE but only for the
powerpc64le-linux IEEE quad real(kind=16), using the __builtin_fpclassify
builtin and explicit check of the MSB mantissa bit in place of missing
__builtin_signbit builtin.

2022-08-26  Jakub Jelinek  <jakub@redhat.com>

PR fortran/106579
gcc/fortran/
* f95-lang.cc (gfc_init_builtin_functions): Initialize
BUILT_IN_FPCLASSIFY.
* libgfortran.h (IEEE_OTHER_VALUE, IEEE_SIGNALING_NAN,
IEEE_QUIET_NAN, IEEE_NEGATIVE_INF, IEEE_NEGATIVE_NORMAL,
IEEE_NEGATIVE_DENORMAL, IEEE_NEGATIVE_SUBNORMAL,
IEEE_NEGATIVE_ZERO, IEEE_POSITIVE_ZERO, IEEE_POSITIVE_DENORMAL,
IEEE_POSITIVE_SUBNORMAL, IEEE_POSITIVE_NORMAL, IEEE_POSITIVE_INF):
New enum.
* trans-intrinsic.cc (conv_intrinsic_ieee_class): New function.
(gfc_conv_ieee_arithmetic_function): Handle ieee_class.
libgfortran/
* ieee/ieee_helper.c (IEEE_OTHER_VALUE, IEEE_SIGNALING_NAN,
IEEE_QUIET_NAN, IEEE_NEGATIVE_INF, IEEE_NEGATIVE_NORMAL,
IEEE_NEGATIVE_DENORMAL, IEEE_NEGATIVE_SUBNORMAL,
IEEE_NEGATIVE_ZERO, IEEE_POSITIVE_ZERO, IEEE_POSITIVE_DENORMAL,
IEEE_POSITIVE_SUBNORMAL, IEEE_POSITIVE_NORMAL, IEEE_POSITIVE_INF):
Move to gcc/fortran/libgfortran.h.

(cherry picked from commit db630423a97ec6690a8eb0e5c3cb186c91e3740d)

20 months agoi386: Fix up mode iterators that weren't expanded [PR106721]
Jakub Jelinek [Wed, 24 Aug 2022 07:57:09 +0000 (09:57 +0200)]
i386: Fix up mode iterators that weren't expanded [PR106721]

Currently, when md file reader sees <something> and something is valid mode
(or code) attribute but which doesn't include case for the current mode
(or code), it just keeps the <something> untouched.
I went through all cases matching <[a-zA-Z] in tmp-mddump.md after make mddump.
One of the cases was related to the V*HF mode additions and there was one typo.

2022-08-24  Jakub Jelinek  <jakub@redhat.com>

PR target/106721
* config/i386/sse.md (i128vldq): Add V16HF entry.
(avx512er_vmrcp28<mode><mask_name><round_saeonly_name>): Fix typo,
mask_opernad3 -> mask_operand3.

(cherry picked from commit 846e5c009e360f0c4fe58ff0d3aee03ebe3ca1a9)

20 months agoc++: Implement P2327R1 - De-deprecating volatile compound operations
Jakub Jelinek [Tue, 16 Aug 2022 11:15:32 +0000 (13:15 +0200)]
c++: Implement P2327R1 - De-deprecating volatile compound operations

From what I can see, this has been voted in as a DR and as it means
we warn less often than before in -std={gnu,c}++2{0,3} modes or with
-Wvolatile, I wonder if it shouldn't be backported to affected release
branches as well.

2022-08-16  Jakub Jelinek  <jakub@redhat.com>

* typeck.cc (cp_build_modify_expr): Implement
P2327R1 - De-deprecating volatile compound operations.  Don't warn
for |=, &= or ^= with volatile lhs.
* expr.cc (mark_use) <case MODIFY_EXPR>: Adjust warning wording,
leave out simple.

* g++.dg/cpp2a/volatile1.C: Adjust for de-deprecation of volatile
compound |=, &= and ^= operations.
* g++.dg/cpp2a/volatile3.C: Likewise.
* g++.dg/cpp2a/volatile5.C: Likewise.

(cherry picked from commit 6e790ca4615443fa395ac5cdba1ab6c87810985c)

20 months agoifcvt: Fix up noce_convert_multiple_sets [PR106590]
Jakub Jelinek [Mon, 15 Aug 2022 11:56:57 +0000 (13:56 +0200)]
ifcvt: Fix up noce_convert_multiple_sets [PR106590]

The following testcase is miscompiled on x86_64-linux.
The problem is in the noce_convert_multiple_sets optimization.
We essentially have:
if (g == 1)
  {
    g = 1;
    f = 23;
  }
else
  {
    g = 2;
    f = 20;
  }
and for each insn try to create a conditional move sequence.
There is code to detect overlap with the regs used in the condition
and the destinations, so we actually try to construct:
tmp_g = g == 1 ? 1 : 2;
f = g == 1 ? 23 : 20;
g = tmp_g;
which is fine.  But, we actually try to create two different
conditional move sequences in each case, seq1 with the whole
(eq (reg/v:HI 82 [ g ]) (const_int 1 [0x1]))
condition and seq2 with cc_cmp
(eq (reg:CCZ 17 flags) (const_int 0 [0]))
to rely on the earlier present comparison.  In each case, we
compare the rtx costs and choose the cheaper sequence (seq1 if both
have the same cost).
The problem is that with the skylake tuning,
tmp_g = g == 1 ? 1 : 2;
is actually expanded as
tmp_g = (g == 1) + 1;
in seq1 (which clobbers (reg 17 flags)) and as a cmov in seq2
(which doesn't).  The tuning says both have the same cost, so we
pick seq1.  Next we check sequences for
f = g == 1 ? 23 : 20; and here the seq2 cmov is cheaper, but it
uses (reg 17 flags) which has been clobbered earlier.

The following patch fixes that by detecting if we in the chosen
sequence clobber some register mentioned in cc_cmp or rev_cc_cmp,
and if yes, arranges for only seq1 (i.e. sequences that emit the
comparison itself) to be used after that.

2022-08-15  Jakub Jelinek  <jakub@redhat.com>

PR rtl-optimization/106590
* ifcvt.cc (check_for_cc_cmp_clobbers): New function.
(noce_convert_multiple_sets_1): If SEQ sets or clobbers any regs
mentioned in cc_cmp or rev_cc_cmp, don't consider seq2 for any
further conditional moves.

* gcc.dg/torture/pr106590.c: New test.

(cherry picked from commit 3a74a7bf62f47ed0d19866576378724be932ee17)

20 months agoDaily bump.
GCC Administrator [Mon, 29 Aug 2022 00:19:40 +0000 (00:19 +0000)]
Daily bump.

20 months agoDaily bump.
GCC Administrator [Sun, 28 Aug 2022 00:19:37 +0000 (00:19 +0000)]
Daily bump.

20 months agoDaily bump.
GCC Administrator [Sat, 27 Aug 2022 00:20:00 +0000 (00:20 +0000)]
Daily bump.

20 months agoFortran: improve error recovery while simplifying size of bad array [PR103694]
Harald Anlauf [Tue, 23 Aug 2022 20:16:14 +0000 (22:16 +0200)]
Fortran: improve error recovery while simplifying size of bad array [PR103694]

gcc/fortran/ChangeLog:

PR fortran/103694
* simplify.cc (simplify_size): The size expression of an array cannot
be simplified if an error occurs while resolving the array spec.

gcc/testsuite/ChangeLog:

PR fortran/103694
* gfortran.dg/pr103694.f90: New test.

(cherry picked from commit 55d8c5409325001c89c35c3d04d425dec9127146)

20 months agoDon't gimple fold ymm-version vblendvpd/vblendvps/vpblendvb w/o TARGET_AVX2
liuhongt [Mon, 22 Aug 2022 02:41:16 +0000 (10:41 +0800)]
Don't gimple fold ymm-version vblendvpd/vblendvps/vpblendvb w/o TARGET_AVX2

Since 256-bit vector integer comparison is under TARGET_AVX2,
and gimple folding for vblendvpd/vblendvps/vpblendvb relies on that.
Restrict gimple fold condition to TARGET_AVX2.

gcc/ChangeLog:

PR target/106704
* config/i386/i386-builtin.def (BDESC): Add
CODE_FOR_avx_blendvpd256/CODE_FOR_avx_blendvps256 to
corresponding builtins.
* config/i386/i386.cc (ix86_gimple_fold_builtin):
Don't fold IX86_BUILTIN_PBLENDVB256, IX86_BUILTIN_BLENDVPS256,
IX86_BUILTIN_BLENDVPD256 w/o TARGET_AVX2.

gcc/testsuite/ChangeLog:

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

20 months agoDaily bump.
GCC Administrator [Fri, 26 Aug 2022 00:19:49 +0000 (00:19 +0000)]
Daily bump.

20 months agoLoongArch: Fix pr106459 by use HWIT instead of 1UL.
Chenghua Xu [Wed, 24 Aug 2022 07:34:07 +0000 (15:34 +0800)]
LoongArch: Fix pr106459 by use HWIT instead of 1UL.

gcc/ChangeLog:

PR target/106459
* config/loongarch/loongarch.cc (loongarch_build_integer):
Use HOST_WIDE_INT.
* config/loongarch/loongarch.h (IMM_REACH): Likewise.
(HWIT_1U): New Defined.
(LU12I_OPERAND): Use HOST_WIDE_INT.
(LU32I_OPERAND): Likewise.
(LU52I_OPERAND): Likewise.
(HWIT_UC_0xFFF): Likwise.

gcc/testsuite/ChangeLog:

* gcc.target/loongarch/pr106459.c: New test.

(cherry picked from commit b169b67d7dafe2b786f87c31d6b2efc603fd880c)

20 months agoDaily bump.
GCC Administrator [Thu, 25 Aug 2022 00:19:50 +0000 (00:19 +0000)]
Daily bump.

20 months agolibstdc++: Fix visit<void>(v) for non-void visitors [PR106589]
Jonathan Wakely [Tue, 23 Aug 2022 14:46:16 +0000 (15:46 +0100)]
libstdc++: Fix visit<void>(v) for non-void visitors [PR106589]

The optimization for the common case of std::visit forgot to handle the
edge case of passing zero variants to a non-void visitor and converting
the result to void.

libstdc++-v3/ChangeLog:

PR libstdc++/106589
* include/std/variant (__do_visit): Handle is_void<R> for zero
argument case.
* testsuite/20_util/variant/visit_r.cc: Check std::visit<void>(v).

(cherry picked from commit e85bb1881e57e53306ede2a15f30d06480d69886)

20 months agovect: Don't allow vect_emulated_vector_p type in vectorizable_call [PR106322]
Kewen Lin [Tue, 16 Aug 2022 05:18:51 +0000 (00:18 -0500)]
vect: Don't allow vect_emulated_vector_p type in vectorizable_call [PR106322]

As PR106322 shows, in some cases for some vector type whose
TYPE_MODE is a scalar integral mode instead of a vector mode,
it's possible to obtain wrong target support information when
querying with the scalar integral mode.  For example, for the
test case in PR106322, on ppc64 32bit vectorizer gets vector
type "vector(2) short unsigned int" for scalar type "short
unsigned int", its mode is SImode instead of V2HImode.  The
target support querying checks umul_highpart optab with SImode
and considers it's supported, then vectorizer further generates
.MULH IFN call for that vector type.  Unfortunately it's wrong
to use SImode support for that vector type multiply highpart
here.

This patch is to teach vectorizable_call analysis not to allow
vect_emulated_vector_p type for both vectype_in and vectype_out
as Richi suggested.

PR tree-optimization/106322

gcc/ChangeLog:

* tree-vect-stmts.cc (vectorizable_call): Don't allow
vect_emulated_vector_p type for both vectype_in and vectype_out.

gcc/testsuite/ChangeLog:

* gcc.target/i386/pr106322.c: New test.
* gcc.target/powerpc/pr106322.c: New test.

(cherry picked from commit 5239e2bd48fb1e6a1d1b06a1bac49bee0a742e98)

20 months agors6000: Adjust mov optabs for opaque modes [PR103353]
Kewen.Lin [Tue, 16 Aug 2022 05:24:07 +0000 (00:24 -0500)]
rs6000: Adjust mov optabs for opaque modes [PR103353]

As PR103353 shows, we may want to continue to expand built-in
function __builtin_vsx_lxvp, even if we have already emitted
error messages about some missing required conditions.  As
shown in that PR, without one explicit mov optab on OOmode
provided, it would call emit_move_insn recursively.

So this patch is to allow the mov pattern to be generated during
expanding phase if compiler has already seen errors.

PR target/103353

gcc/ChangeLog:

* config/rs6000/mma.md (define_expand movoo): Move TARGET_MMA condition
check to preparation statements and add handlings for !TARGET_MMA.
(define_expand movxo): Likewise.

gcc/testsuite/ChangeLog:

* gcc.target/powerpc/pr103353.c: New test.

(cherry picked from commit 9367e3a65f874dffc8f8a3b6760e77fd9ed67117)

20 months agoDaily bump.
GCC Administrator [Wed, 24 Aug 2022 00:20:08 +0000 (00:20 +0000)]
Daily bump.

20 months agolibstdc++: Document linker option for C++23 <stacktrace> [PR105678]
Jonathan Wakely [Mon, 22 Aug 2022 16:24:27 +0000 (17:24 +0100)]
libstdc++: Document linker option for C++23 <stacktrace> [PR105678]

libstdc++-v3/ChangeLog:

PR libstdc++/105678
* doc/xml/manual/using.xml: Document -lstdc++_libbacktrace
requirement for using std::stacktrace. Also adjust -frtti and
-fexceptions to document non-default (i.e. negative) forms.
* doc/html/*: Regenerate.

(cherry picked from commit cc4fa7a210b638d6a46f14dab17f2361389d18e1)

20 months agoUpdate gcc .po files
Joseph Myers [Tue, 23 Aug 2022 19:19:54 +0000 (19:19 +0000)]
Update gcc .po files

* be.po, da.po, de.po, el.po, es.po, fi.po, fr.po, hr.po, id.po,
ja.po, nl.po, ru.po, sr.po, sv.po, tr.po, uk.po, vi.po, zh_CN.po,
zh_TW.po: Update.

20 months agogcn/mkoffload: Cleanup temporary dbgobj file
Tobias Burnus [Tue, 23 Aug 2022 09:35:01 +0000 (11:35 +0200)]
gcn/mkoffload: Cleanup temporary dbgobj file

The file (suffix ".mkoffload.dbg.o") used to save the dbgobj data
data has to be passed to maybe_unlink for cleanup or -v -save-temps stderr
diagnostic. That was missed before.

This is a partial backport of commit r13-2125, "mkoffload: Cleanup
temporary omp_requires_file", only for GCN's mkoffload and its dbgobj
file as 'omp requires' is not supported on GCC 12 and, hence,
omp_requires_file does not exist on this branch.

gcc/ChangeLog:

* config/gcn/mkoffload.cc (main): Add dbgobj to files_to_cleanup.

(cherry picked from commit 713ec97e593bd4d9915a13bc4047f064fec0e24a)

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