]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
2 years agolibstdc++: eh_globals: gthreads: reset _S_init before deleting key
Alexandre Oliva [Wed, 22 Jun 2022 02:11:02 +0000 (23:11 -0300)] 
libstdc++: eh_globals: gthreads: reset _S_init before deleting key

Clear __eh_globals_init's _S_init in the dtor before deleting the
gthread key.

This ensures that, in case any code involved in deleting the key
interacts with eh_globals, the key that is being deleted won't be
used, and the non-thread-specific eh_globals fallback will.

for  libstdc++-v3/ChangeLog

* libsupc++/eh_globals.cc [!_GLIBCXX_HAVE_TLS]
(__eh_globals_init::~__eh_globals_init): Clear _S_init first.

(cherry picked from commit a33dda016e5acf9c6325ce8a72a1b0238130374e)

2 years agoRemove undefined behaviour from testscase.
Andrew MacLeod [Tue, 27 Sep 2022 22:42:33 +0000 (18:42 -0400)] 
Remove undefined behaviour from testscase.

There was a patch posted to remove the undefined behaviour from this
testcase, but it appear to never have been applied.

gcc/teststuite/
PR tree-optimization/102892
* gcc.dg/pr102892-1.c: Remove undefined behaviour.

2 years agors6000: Fix the condition with frame_pointer_needed_indeed [PR96072]
Kewen Lin [Mon, 26 Sep 2022 05:33:18 +0000 (00:33 -0500)] 
rs6000: Fix the condition with frame_pointer_needed_indeed [PR96072]

As PR96072 shows, the code adding REG_CFA_DEF_CFA reg note
makes one assumption that we have emitted one insn which
restores the frame pointer previously.  That part of code
was guarded with flag frame_pointer_needed before, it was
consistent, but it was replaced with flag
frame_pointer_needed_indeed since commit r10-7981.  It
caused ICE due to unexpected NULL insn.

PR target/96072

gcc/ChangeLog:

* config/rs6000/rs6000-logue.cc (rs6000_emit_epilogue): Update the
condition for adding REG_CFA_DEF_CFA reg note with
frame_pointer_needed_indeed.

gcc/testsuite/ChangeLog:

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

(cherry picked from commit 5be0950d22209f5ba69d244387228e12389a8470)

2 years agors6000: Fix condition of define_expand vec_shr_<mode> [PR100645]
Kewen Lin [Mon, 26 Sep 2022 03:01:50 +0000 (22:01 -0500)] 
rs6000: Fix condition of define_expand vec_shr_<mode> [PR100645]

PR100645 exposes one latent bug in define_expand vec_shr_<mode>
that the current condition TARGET_ALTIVEC is too loose.  The
mode iterator VEC_L contains a few modes, they are not always
supported as vector mode, VECTOR_UNIT_ALTIVEC_OR_VSX_P should
be used like some other VEC_L usages.

PR target/100645

gcc/ChangeLog:

* config/rs6000/vector.md (vec_shr_<mode>): Replace condition
TARGET_ALTIVEC with VECTOR_UNIT_ALTIVEC_OR_VSX_P.

gcc/testsuite/ChangeLog:

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

(cherry picked from commit bfad7069b74c97000b698191c1945f07a6192db5)

2 years agoDaily bump.
GCC Administrator [Wed, 19 Oct 2022 00:22:58 +0000 (00:22 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Tue, 18 Oct 2022 00:21:01 +0000 (00:21 +0000)] 
Daily bump.

2 years agoFix register count when not splitting Complex IEEE 128-bit args.
Pat Haugen [Tue, 17 May 2022 20:53:24 +0000 (15:53 -0500)] 
Fix register count when not splitting Complex IEEE 128-bit args.

For ABI_V4, we do not split complex args. This created a problem because
even though an arg would be passed in two VSX regs, we were only advancing the
function arg counter by one VSX register. Fixed with this patch.

PR target/99685

gcc/
* config/rs6000/rs6000-call.cc (rs6000_function_arg_advance_1): Bump
register count when not splitting IEEE 128-bit Complex.

(cherry picked from commit 2ee68beee709e48fce85b8892ff9985acc6a91a8)

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

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

2 years agotree-optimization/107160 - avoid reusing multiple accumulators
Richard Biener [Thu, 13 Oct 2022 12:24:05 +0000 (14:24 +0200)] 
tree-optimization/107160 - avoid reusing multiple accumulators

Epilogue vectorization is not set up to re-use a vectorized
accumulator consisting of more than one vector.  For non-SLP
we always reduce to a single but for SLP that isn't happening.
In such case we currenlty miscompile the epilog so avoid this.

PR tree-optimization/107160
* tree-vect-loop.cc (vect_create_epilog_for_reduction):
Do not register accumulator if we failed to reduce it
to a single vector.

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

(cherry picked from commit 5cbaf84c191b9a3e3cb26545c808d208bdbf2ab5)

2 years agotree-optimization/107107 - tail-merging VN wrong-code
Richard Biener [Thu, 6 Oct 2022 09:20:16 +0000 (11:20 +0200)] 
tree-optimization/107107 - tail-merging VN wrong-code

The following fixes an unintended(?) side-effect of the special
MODIFY_EXPR expression entries we add for tail-merging during VN.
We shouldn't value-number the virtual operand differently here.

PR tree-optimization/107107
* tree-ssa-sccvn.cc (visit_reference_op_store): Do not
affect value-numbering when doing the tail merging
MODIFY_EXPR lookup.

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

(cherry picked from commit 85333b9265720fc4e49397301cb16324d2b89aa7)

2 years agotree-optimization/106922 - extend same-val clobber FRE
Richard Biener [Fri, 23 Sep 2022 12:28:52 +0000 (14:28 +0200)] 
tree-optimization/106922 - extend same-val clobber FRE

The following extends the skipping of same valued stores to
handle an arbitrary number of them as long as they are from the
same value (which we now record).  That's an obvious extension
which allows to optimize the m_engaged member of std::optional
more reliably.

PR tree-optimization/106922
* tree-ssa-sccvn.cc (vn_reference_lookup_3): Allow
an arbitrary number of same valued skipped stores.

* g++.dg/torture/pr106922.C: New testcase.

(cherry picked from commit af611afe5fcc908a6678b5b205fb5af7d64fbcb2)

2 years agotestsuite: Fix up pr106922.C test
Jakub Jelinek [Fri, 23 Sep 2022 07:46:59 +0000 (09:46 +0200)] 
testsuite: Fix up pr106922.C test

On Thu, Sep 22, 2022 at 01:10:08PM +0200, Richard Biener via Gcc-patches wrote:
>       * g++.dg/tree-ssa/pr106922.C: Adjust.

> --- a/gcc/testsuite/g++.dg/tree-ssa/pr106922.C
> +++ b/gcc/testsuite/g++.dg/tree-ssa/pr106922.C
> @@ -87,5 +87,4 @@ void testfunctionfoo() {
>    }
>  }
>
> -// { dg-final { scan-tree-dump-times "Found fully redundant value" 4 "pre" { xfail { ! lp64 } } } }
> -// { dg-final { scan-tree-dump-not "m_initialized" "cddce3" { xfail { ! lp64 } } } }
> +// { dg-final { scan-tree-dump-not "m_initialized" "dce3" } }

I've noticed
+UNRESOLVED: g++.dg/tree-ssa/pr106922.C  -std=gnu++20  scan-tree-dump-not dce3 "m_initialized"
+UNRESOLVED: g++.dg/tree-ssa/pr106922.C  -std=gnu++2b  scan-tree-dump-not dce3 "m_initialized"
with this change, both on x86_64 and i686.
The dump is still cddce3, additionally as the last reference to the pre
dump is gone, not sure it is worth creating that dump.

With the following patch, there aren't FAILs nor UNRESOLVED tests with
GXX_TESTSUITE_STDS=98,11,14,17,20,2b make check-g++ RUNTESTFLAGS="--target_board=unix\{-m32,-m64\} dg.exp='pr106922.C'"

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

PR tree-optimization/106922
* g++.dg/tree-ssa/pr106922.C: Scan in cddce3 dump rather than
dce3.  Remove -fdump-tree-pre-details from dg-options.

(cherry picked from commit a0de11d0d22054b6fd76a0730a3ec807542379d0)

2 years agotree-optimization/106922 - missed FRE/PRE
Richard Biener [Wed, 21 Sep 2022 11:52:56 +0000 (13:52 +0200)] 
tree-optimization/106922 - missed FRE/PRE

The following enhances the store-with-same-value trick in
vn_reference_lookup_3 by not only looking for

  a = val;
  *ptr = val;
  .. = a;

but also

  *ptr = val;
  other = x;
  .. = a;

where the earlier store is more than one hop away.  It does this
by queueing the actual value to compare until after the walk but
as disadvantage only allows a single such skipped store from a
constant value.

Unfortunately we cannot handle defs from non-constants this way
since we're prone to pick up values from the past loop iteration
this way and we have no good way to identify values that are
invariant in the currently iterated cycle.  That's why we keep
the single-hop lookup for those cases.  gcc.dg/tree-ssa/pr87126.c
would be a testcase that's un-XFAILed when we'd handle those
as well.

PR tree-optimization/106922
* tree-ssa-sccvn.cc (vn_walk_cb_data::same_val): New member.
(vn_walk_cb_data::finish): Perform delayed verification of
a skipped may-alias.
(vn_reference_lookup_pieces): Likewise.
(vn_reference_lookup): Likewise.
(vn_reference_lookup_3): When skipping stores of the same
value also handle constant stores that are more than a
single VDEF away by delaying the verification.

* gcc.dg/tree-ssa/ssa-fre-100.c: New testcase.
* g++.dg/tree-ssa/pr106922.C: Adjust.

(cherry picked from commit 9baee6181b4e427e0b5ba417e51424c15858dce7)

2 years agoDaily bump.
GCC Administrator [Mon, 17 Oct 2022 00:20:47 +0000 (00:20 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 16 Oct 2022 00:19:58 +0000 (00:19 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sat, 15 Oct 2022 00:21:34 +0000 (00:21 +0000)] 
Daily bump.

2 years agoFix PR target/107248
Eric Botcazou [Fri, 14 Oct 2022 09:52:04 +0000 (11:52 +0200)] 
Fix PR target/107248

This is the infamous PR rtl-optimization/38644 rearing its ugly head for
leaf functions on SPARC more than a decade later...  Richard E.'s generic
solution has never been implemented so let's do as other RISC back-ends did.

gcc/
PR target/107248
* config/sparc/sparc.cc (sparc_expand_prologue): Emit a frame
blockage for leaf functions.
(sparc_flat_expand_prologue): Emit frame instead of full blockage.
(sparc_expand_epilogue): Emit a frame blockage for leaf functions.
(sparc_flat_expand_epilogue): Emit frame instead of full blockage.

2 years agoDaily bump.
GCC Administrator [Fri, 14 Oct 2022 00:20:52 +0000 (00:20 +0000)] 
Daily bump.

2 years agoc++: ICE with VEC_INIT_EXPR and defarg [PR106925]
Marek Polacek [Tue, 11 Oct 2022 18:16:54 +0000 (14:16 -0400)] 
c++: ICE with VEC_INIT_EXPR and defarg [PR106925]

Since r12-8066, in cxx_eval_vec_init we perform expand_vec_init_expr
while processing the default argument in this test.  At this point
start_preparsed_function hasn't yet set current_function_decl.
expand_vec_init_expr then leads to maybe_splice_retval_cleanup which
checks DECL_CONSTRUCTOR_P (current_function_decl) without checking that
c_f_d is non-null first.  It seems correct that c_f_d is null here, so
it seems to me that maybe_splice_retval_cleanup should check c_f_d as
in the following patch.

PR c++/106925

gcc/cp/ChangeLog:

* except.cc (maybe_splice_retval_cleanup): Check current_function_decl.
Make the bool const.

gcc/testsuite/ChangeLog:

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

(cherry picked from commit 3130e70dab1e64a7b014391fe941090d5f3b6b7d)

2 years agoinstall.texi: gcn - update llvm reqirements, gcn/nvptx - newlib use version
Tobias Burnus [Tue, 4 Oct 2022 09:49:18 +0000 (11:49 +0200)] 
install.texi: gcn - update llvm reqirements, gcn/nvptx - newlib use version

gcc/
* doc/install.texi (Specific): Add missing items to bullet list.
(amdgcn): Update LLVM requirements, use version not date for newlib.
(nvptx): Use version not git hash for newlib.

(cherry picked from commit e886ebd17965d78f609b62479f4f48085108389c)

2 years agoDaily bump.
GCC Administrator [Thu, 13 Oct 2022 00:22:46 +0000 (00:22 +0000)] 
Daily bump.

2 years agofortran: Move clobbers after evaluation of all arguments [PR106817]
Mikael Morin [Sat, 3 Sep 2022 09:58:47 +0000 (11:58 +0200)] 
fortran: Move clobbers after evaluation of all arguments [PR106817]

For actual arguments whose dummy is INTENT(OUT), we used to generate
clobbers on them at the same time we generated the argument reference
for the function call.  This was wrong if for an argument coming
later, the value expression was depending on the value of the just-
clobbered argument, and we passed an undefined value in that case.

With this change, clobbers are collected separatedly and appended
to the procedure call preliminary code after all the arguments have been
evaluated.

PR fortran/106817

gcc/fortran/ChangeLog:

* trans-expr.cc (gfc_conv_procedure_call): Collect all clobbers
to their own separate block.  Append the block of clobbers to
the procedure preliminary block after the argument evaluation
codes for all the arguments.

gcc/testsuite/ChangeLog:

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

(cherry picked from commit 29919bf3b6449bafd02e795abbb1966e3990c1fc)

2 years agofortran: Fix invalid function decl clobber ICE [PR105012]
Mikael Morin [Mon, 29 Aug 2022 09:19:29 +0000 (11:19 +0200)] 
fortran: Fix invalid function decl clobber ICE [PR105012]

The fortran frontend, as result symbol for a function without
declared result symbol, uses the function symbol itself.  This caused
an invalid clobber of a function decl to be emitted, leading to an
ICE, whereas the intended behaviour was to clobber the function result
variable.  This change fixes the problem by getting the decl from the
just-retrieved variable reference after the call to
gfc_conv_expr_reference, instead of copying it from the frontend symbol.

PR fortran/105012

gcc/fortran/ChangeLog:

* trans-expr.cc (gfc_conv_procedure_call): Retrieve variable
from the just calculated variable reference.

gcc/testsuite/ChangeLog:

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

(cherry picked from commit edaf1e005c90b311c39b46d85cea17befbece112)

2 years agofortran: Move the clobber generation code
Mikael Morin [Wed, 31 Aug 2022 09:00:45 +0000 (11:00 +0200)] 
fortran: Move the clobber generation code

This change inlines the clobber generation code from
gfc_conv_expr_reference to the single caller from where the add_clobber
flag can be true, and removes the add_clobber argument.

What motivates this is the standard making the procedure call a cause
for a variable to become undefined, which translates to a clobber
generation, so clobber generation should be closely related to procedure
call generation, whereas it is rather orthogonal to variable reference
generation.  Thus the generation of the clobber feels more appropriate
in gfc_conv_procedure_call than in gfc_conv_expr_reference.

Behaviour remains unchanged.

gcc/fortran/ChangeLog:

* trans.h (gfc_conv_expr_reference): Remove add_clobber
argument.
* trans-expr.cc (gfc_conv_expr_reference): Ditto. Inline code
depending on add_clobber and conditions controlling it ...
(gfc_conv_procedure_call): ... to here.

(cherry picked from commit 2b393f6f83903cb836676bbd042c1b99a6e7e6f7)

2 years agoDaily bump.
GCC Administrator [Wed, 12 Oct 2022 00:20:45 +0000 (00:20 +0000)] 
Daily bump.

2 years agoarm: Fix constant immediates predicates and constraints for some MVE builtins
Christophe Lyon [Fri, 9 Sep 2022 08:05:37 +0000 (08:05 +0000)] 
arm: Fix constant immediates predicates and constraints for some MVE builtins

Several MVE builtins incorrectly use the same predicate/constraint
pair for several modes, which does not match the specification.
This patch uses the appropriate iterator instead.

2022-09-06  Christophe Lyon  <christophe.lyon@arm.com>

gcc/
* config/arm/mve.md (mve_vqshluq_n_s<mode>): Use
MVE_pred/MVE_constraint instead of mve_imm_7/Ra.
(mve_vqshluq_m_n_s<mode>): Likewise.
(mve_vqrshrnbq_n_<supf><mode>): Use MVE_pred3/MVE_constraint3
instead of mve_imm_8/Rb.
(mve_vqrshrunbq_n_s<mode>): Likewise.
(mve_vqrshrntq_n_<supf><mode>): Likewise.
(mve_vqrshruntq_n_s<mode>): Likewise.
(mve_vrshrnbq_n_<supf><mode>): Likewise.
(mve_vrshrntq_n_<supf><mode>): Likewise.
(mve_vqrshrnbq_m_n_<supf><mode>): Likewise.
(mve_vqrshrntq_m_n_<supf><mode>): Likewise.
(mve_vrshrnbq_m_n_<supf><mode>): Likewise.
(mve_vrshrntq_m_n_<supf><mode>): Likewise.
(mve_vqrshrunbq_m_n_s<mode>): Likewise.
(mve_vsriq_n_<supf><mode): Use MVE_pred2/MVE_constraint2 instead
of mve_imm_selective_upto_8/Rg.
(mve_vsriq_m_n_<supf><mode>): Likewise.

(cherry-picked from c3fb6658c7670e446f2fd00984404d971e416b3c)

2 years agotree-optimization/106934 - avoid BIT_FIELD_REF of bitfields
Richard Biener [Wed, 14 Sep 2022 07:00:35 +0000 (09:00 +0200)] 
tree-optimization/106934 - avoid BIT_FIELD_REF of bitfields

The following avoids creating BIT_FIELD_REF of bitfields in
update-address-taken.  The patch doesn't implement punning to
a full precision integer type but leaves a comment according to
that.

PR tree-optimization/106934
* tree-ssa.cc (non_rewritable_mem_ref_base): Avoid BIT_FIELD_REFs
of bitfields.
(maybe_rewrite_mem_ref_base): Likewise.

* gfortran.dg/pr106934.f90: New testcase.

(cherry picked from commit 05f5c42cb42c5088187d44cc45a5f671d19ad8c5)

2 years agotree-optimization/106922 - PRE and virtual operand translation
Richard Biener [Thu, 15 Sep 2022 11:33:23 +0000 (13:33 +0200)] 
tree-optimization/106922 - PRE and virtual operand translation

PRE implicitely keeps virtual operands at the blocks incoming version
but the explicit updating point during PHI translation fails to trigger
when there are no PHIs at all in a block.  Later lazy updating then
fails because of a too lose block check.  A similar issues plagues
reference invalidation when checking the ANTIC_OUT to ANTIC_IN
translation.  The following fixes both and makes the lazy updating
work.

The diagnostic testcase unfortunately requires boost so the
testcase is the one I reduced for a missed optimization in PRE.
The testcase fails with -m32 on x86_64 because we optimize too
much before PRE which causes PRE to not trigger so we fail to
eliminate a full redundancy.  I'm going to open a separate bug
for this.  Hopefully the !lp64 selector is good enough.

PR tree-optimization/106922
* tree-ssa-pre.cc (translate_vuse_through_block): Only
keep the VUSE if its def dominates PHIBLOCK.
(prune_clobbered_mems): Rewrite logic so we check whether
a value dies in a block when the VUSE def doesn't dominate it.

* g++.dg/tree-ssa/pr106922.C: New testcase.

(cherry picked from commit 5edf02ed2b6de024f83a023d046a6a18f645bc83)

2 years agotree-optimization/106892 - avoid invalid pointer association in predcom
Richard Biener [Fri, 9 Sep 2022 10:06:38 +0000 (12:06 +0200)] 
tree-optimization/106892 - avoid invalid pointer association in predcom

When predictive commoning builds a reference for iteration N it
prematurely associates a constant offset into the MEM_REF offset
operand which can be invalid if the base pointer then points
outside of an object which alias-analysis does not consider valid.

PR tree-optimization/106892
* tree-predcom.cc (ref_at_iteration): Do not associate the
constant part of the offset into the MEM_REF offset
operand, across a non-zero offset.

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

(cherry picked from commit a8b0b13da7379feb31950a9d2ad74b98a29c547f)

2 years agotree-optimization/105937 - avoid uninit diagnostics crossing iterations
Richard Biener [Fri, 19 Aug 2022 12:12:52 +0000 (14:12 +0200)] 
tree-optimization/105937 - avoid uninit diagnostics crossing iterations

The following avoids adding PHIs to the worklist for uninit processing
if we reach them following backedges.  That confuses predicate analysis
because it assumes the use is happening in the same iteration as the the
definition.  For the testcase in the PR the situation is like

void foo (int val)
{
  int uninit;
  # val = PHI <..> (B)
  for (..)
    {
      if (..)
        {
          .. = val; (C)
          val = uninit;
        }
      # val = PHI <..> (A)
    }
}

and starting from (A) with 'uninit' as argument we arrive at (B)
and from there at (C).  Predicate analysis then tries to prove
the predicate of (B) (not the backedge) can prove that the
path from (B) to (C) is unreachable which isn't really what it
necessary - that's what we'd need to do when the preheader
edge of the loop were the edge with the uninitialized def.

So the following makes those cases intentionally false negatives.

PR tree-optimization/105937
* tree-ssa-uninit.cc (find_uninit_use): Do not queue PHIs
on backedges.
(execute_late_warn_uninitialized): Mark backedges.

* g++.dg/uninit-pr105937.C: New testcase.

(cherry picked from commit c77fae1ca796d6ea06d5cd437909905c3d3d771c)

2 years agoDaily bump.
GCC Administrator [Tue, 11 Oct 2022 00:20:28 +0000 (00:20 +0000)] 
Daily bump.

2 years agoAdd cpplib ro.po
Joseph Myers [Mon, 10 Oct 2022 23:00:18 +0000 (23:00 +0000)] 
Add cpplib ro.po

* ro.po: New.

2 years agoDaily bump.
GCC Administrator [Mon, 10 Oct 2022 00:20:14 +0000 (00:20 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 9 Oct 2022 00:21:33 +0000 (00:21 +0000)] 
Daily bump.

2 years agoFortran: Fix ICE and wrong code for assumed-rank arrays [PR100029, PR100040]
José Rui Faustino de Sousa [Sun, 25 Sep 2022 20:48:55 +0000 (22:48 +0200)] 
Fortran: Fix ICE and wrong code for assumed-rank arrays [PR100029, PR100040]

gcc/fortran/ChangeLog:

PR fortran/100040
PR fortran/100029
* trans-expr.cc (gfc_conv_class_to_class): Add code to have
assumed-rank arrays recognized as full arrays and fix the type
of the array assignment.
(gfc_conv_procedure_call): Change order of code blocks such that
the free of ALLOCATABLE dummy arguments with INTENT(OUT) occurs
first.

gcc/testsuite/ChangeLog:

PR fortran/100029
* gfortran.dg/PR100029.f90: New test.

PR fortran/100040
* gfortran.dg/PR100040.f90: New test.

(cherry picked from commit 5299155bb80e90df822e1eebc9f9a0c8e4505a46)

2 years agoDaily bump.
GCC Administrator [Sat, 8 Oct 2022 00:21:58 +0000 (00:21 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Fri, 7 Oct 2022 00:21:00 +0000 (00:21 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Thu, 6 Oct 2022 10:10:00 +0000 (10:10 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Wed, 5 Oct 2022 13:07:30 +0000 (13:07 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Tue, 4 Oct 2022 09:19:35 +0000 (09:19 +0000)] 
Daily bump.

2 years agogcc/config/t-i386: add build dependencies on i386-builtin-types.inc
Sergei Trofimovich [Fri, 16 Sep 2022 17:33:11 +0000 (18:33 +0100)] 
gcc/config/t-i386: add build dependencies on i386-builtin-types.inc

i386-builtin-types.inc is included indirectly via i386-builtins.h
into 4 files: i386.cc i386-builtins.cc i386-expand.cc i386-features.cc

Only i386.cc dependency was present in gcc/config/t-i386 makefile.

As a result parallel builds occasionally fail as:

    g++ ... -o i386-builtins.o ... ../../gcc-13-20220911/gcc/config/i386/i386-builtins.cc
    In file included from ../../gcc-13-20220911/gcc/config/i386/i386-builtins.cc:92:
    ../../gcc-13-20220911/gcc/config/i386/i386-builtins.h:25:10:
     fatal error: i386-builtin-types.inc: No such file or directory
       25 | #include "i386-builtin-types.inc"
          |          ^~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    make[3]: *** [../../gcc-13-20220911/gcc/config/i386/t-i386:54: i386-builtins.o]
      Error 1 shuffle=1663349189

gcc/
PR target/107064
* config/i386/t-i386: Add build-time dependencies against
i386-builtin-types.inc to i386-builtins.o, i386-expand.o,
i386-features.o.

(cherry picked from commit ef3165736d9daafba88adb2db65b2e8ebf0024ca)

2 years agoUpdate gcc sv.po
Joseph Myers [Mon, 3 Oct 2022 16:01:15 +0000 (16:01 +0000)] 
Update gcc sv.po

* sv.po: Update.

2 years agoDaily bump.
GCC Administrator [Mon, 3 Oct 2022 00:21:27 +0000 (00:21 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 2 Oct 2022 00:21:27 +0000 (00:21 +0000)] 
Daily bump.

2 years 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)

2 years 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)

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

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

2 years 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.

2 years 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)

2 years 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)

2 years 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)

2 years 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)

2 years 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)

2 years 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)

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

2 years 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)

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

2 years 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.

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

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

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

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

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

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

* fr.po: Update.

2 years 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)

2 years 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.

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

2 years 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)

2 years 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)

2 years 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)

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

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

2 years 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)

2 years 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)

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

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

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

2 years 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)

2 years 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)

2 years 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.

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

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

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

2 years 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

2 years 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

2 years 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)

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

2 years 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.

2 years 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.

2 years 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)

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

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

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

2 years 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)

2 years 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)

2 years 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)

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

2 years 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.