]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
3 years agolibstdc++: Add missing header to test
Jonathan Wakely [Fri, 1 Oct 2021 11:55:53 +0000 (12:55 +0100)] 
libstdc++: Add missing header to test

We need to include <iterator> (or one of the containers) to get a
definition for std::begin.

libstdc++-v3/ChangeLog:

* testsuite/25_algorithms/is_permutation/2.cc: Include <iterator>.

(cherry picked from commit 94311bf34704ebecf745043fe2df03df201052fe)

3 years agolibstdc++: Add self-merge check to std::forward_list::merge [PR103853]
Pavel I. Kryukov [Thu, 6 Jan 2022 12:32:36 +0000 (12:32 +0000)] 
libstdc++: Add self-merge check to std::forward_list::merge [PR103853]

This implements the proposed resolution of LWG 3088, so that x.merge(x)
is a no-op, consistent with std::list::merge.

Signed-off-by: Pavel I. Kryukov <pavel.kryukov@phystech.edu>
Co-authored-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

PR libstdc++/103853
* include/bits/forward_list.tcc (forward_list::merge): Check for
self-merge.
* testsuite/23_containers/forward_list/operations/merge.cc: New test.

(cherry picked from commit 52ebc2be0990d6d3a46bb716164f9cef6f661021)

3 years agolibstdc++: Initialize member in std::match_results [PR103549]
Jonathan Wakely [Sat, 4 Dec 2021 11:38:25 +0000 (11:38 +0000)] 
libstdc++: Initialize member in std::match_results [PR103549]

This fixes a -Wuninitialized warning for std::cmatch m1, m2; m1=m2;

Also name the template parameters in the forward declaration, to get rid
of the <template-parameter-1-1> noise in diagnostics.

libstdc++-v3/ChangeLog:

PR libstdc++/103549
* include/bits/regex.h (match_results): Give names to template
parameters in first declaration.
(match_results::_M_begin): Add default member-initializer.

(cherry picked from commit 87710ec7b213245ecb194b778e97ae3a6790394f)

3 years agolibstdc++: Fix example preprocessor command in FAQ [PR103877]
Jonathan Wakely [Tue, 4 Jan 2022 15:54:16 +0000 (15:54 +0000)] 
libstdc++: Fix example preprocessor command in FAQ [PR103877]

libstdc++-v3/ChangeLog:

PR libstdc++/103877
* doc/xml/faq.xml: Add '-x c++' to preprocessor command.
* doc/html/faq.html: Regenerate.

(cherry picked from commit cebe875f6f44b905a0d56a2007b5a638a33a893c)

3 years agolibstdc++: Rename non-reserved macros in config header [PR103650]
Jonathan Wakely [Mon, 17 Jan 2022 11:24:35 +0000 (11:24 +0000)] 
libstdc++: Rename non-reserved macros in config header [PR103650]

libstdc++-v3/ChangeLog:

PR libstdc++/103650
* include/Makefile.am: Rename LT_OBJDIR and STDC_HEADERS.
* include/Makefile.in: Regenerate.
* testsuite/17_intro/headers/c++1998/103650.cc: New test.

(cherry picked from commit fa092570fbaf3bb4202e518eb8beba146c464d9f)

3 years agolibstdc++: Fix mismatched noexcept-specifiers in Filesystem TS
Jonathan Wakely [Mon, 27 Sep 2021 21:07:12 +0000 (22:07 +0100)] 
libstdc++: Fix mismatched noexcept-specifiers in Filesystem TS

The copy_file fix should have been part of r12-7063-gda72e0fd20f87b.

The path::begin() fix should have been part of r12-3930-gf2b7f56a15d9cb.
Thanks to Timm Bäder for reporting this one.

libstdc++-v3/ChangeLog:

* include/experimental/bits/fs_fwd.h (copy_file): Remove
incorrect noexcept from declaration.
* include/experimental/bits/fs_path.h (path::begin, path::end):
Add noexcept to declarations, to match definitions.

(cherry picked from commit 944da70a5d1cdc5bd4327b2d32420f57b6883985)

3 years agolibstdc++: Fix incorrect IS number in doc comment
Jonathan Wakely [Thu, 14 Apr 2022 10:54:26 +0000 (11:54 +0100)] 
libstdc++: Fix incorrect IS number in doc comment

libstdc++-v3/ChangeLog:

* doc/xml/manual/intro.xml: Fix comment.

(cherry picked from commit 832fcbbc7311c706f81e85043b5721e5f16b0a16)

3 years agolibstdc++: Deprecate __gnu_cxx::rope::erase(size_type) [PR102048]
Jonathan Wakely [Thu, 21 Apr 2022 13:12:25 +0000 (14:12 +0100)] 
libstdc++: Deprecate __gnu_cxx::rope::erase(size_type) [PR102048]

This function is broken, and has been removed for GCC 11 and 12.
Deprecate it for GCC 10 and GCC 9.

libstdc++-v3/ChangeLog:

PR libstdc++/102048
* include/ext/rope (rope::erase(size_type)): Deprecate broken
function.

(cherry picked from commit 05ad54a8e67b31126351b9f15e1e42ac67650d6d)

3 years agofortran: Backport associate character length fixes [PR104228]
Mikael Morin [Fri, 28 Jan 2022 21:00:57 +0000 (22:00 +0100)] 
fortran: Backport associate character length fixes [PR104228]

Backport commits:
r12-7217-g57da34939703a6e6d3267a0d25d1fb9369d3ac0e
r12-7726-g907811ddc35da6c1701ed22355ece63a8c3ed7fb

--

fortran: Unshare associate var charlen [PR104228]

PR104228 showed that character lengths were shared between associate
variable and associate targets.  This is problematic when the associate
target is itself a variable and gets a variable to hold the length, as
the length variable is added (and all the variables following it in the chain)
to both the associate variable scope and the target variable scope.
This caused an ICE when compiling with -O0 -fsanitize=address.

This change forces the creation of a separate character length for the
associate variable.  It also forces the initialization of the character
length variable to avoid regressing associate_32 and associate_47 tests.

--

fortran: Separate associate character lengths earlier [PR104570]

This change workarounds an ICE in the evaluation of the character length
of an array expression referencing an associate variable; the code is
not prepared to see a non-scalar expression as it doesn’t initialize the
scalarizer.

Before this change, associate length symbols get a new gfc_charlen at
resolution stage to unshare them from the associate expression, so that
at translation stage it is a decl specific to the associate symbol that
is initialized, not the decl of some other symbol.  This
reinitialization of gfc_charlen happens after expressions referencing
the associate symbol have been parsed, so that those expressions retain
the original gfc_charlen they have copied from the symbol.
At translation stage, the gfc_charlen for the associate symbol is setup
with the decl holding the actual length value, but the expressions have
retained the original gfc_charlen without any decl.  So they need to
evaluate the character length, and this is where the ICE happens.

This change moves the reinitialization of gfc_charlen earlier at parsing
stage, so that at resolution stage the gfc_charlen can be retained as
it’s already not shared with any other symbol, and the expressions which
now share their gfc_charlen with the symbol are automatically updated
when the length decl is setup at translation stage.  There is no need
any more to evaluate the character length as it has all the required
information, and the ICE doesn’t happen.

The first resolve.c hunk is necessary to avoid regressing on the
associate_35.f90 testcase.

--

PR fortran/104228
PR fortran/104570

gcc/fortran/ChangeLog:

* parse.c (parse_associate): Use a new distinct gfc_charlen if
the copied type has one whose length is not known to be
constant.
* resolve.c (resolve_assoc_var): Also create a new character
length for non-dummy associate targets.  Reset charlen if it’s
shared with the associate target regardless of the expression
type.  Don’t reinitialize charlen if it’s deferred.
* trans-stmt.c (trans_associate_var): Initialize character
length even if no temporary is used for the associate variable.

gcc/testsuite/ChangeLog:

* gfortran.dg/asan_associate_58.f90: New test.
* gfortran.dg/asan_associate_59.f90: New test.
* gfortran.dg/associate_58.f90: New test.

(cherry picked from commit 4c8e037d32e91c0ec4ac577d1d0723ab9d6ec809)

3 years agoDaily bump.
GCC Administrator [Mon, 9 May 2022 00:19:28 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 8 May 2022 00:20:07 +0000 (00:20 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 7 May 2022 00:19:52 +0000 (00:19 +0000)] 
Daily bump.

3 years agotree-optimization/105070 - annotate bit cluster tests with locations
Richard Biener [Mon, 28 Mar 2022 08:07:53 +0000 (10:07 +0200)] 
tree-optimization/105070 - annotate bit cluster tests with locations

The following makes sure to annotate the tests generated by
switch lowering bit-clustering with locations which otherwise
can be completely lost even at -O0.

2022-03-28  Richard Biener  <rguenther@suse.de>

PR tree-optimization/105070
* tree-switch-conversion.h
(bit_test_cluster::hoist_edge_and_branch_if_true): Add location
argument.
* tree-switch-conversion.c
(bit_test_cluster::hoist_edge_and_branch_if_true): Annotate
cond with location.
(bit_test_cluster::emit): Annotate all generated expressions
with location.

(cherry picked from commit b285999440c000685c4e4dae9c2a9a8a8fe9e176)

3 years agodebug: fix switch lowering debug info
Tom de Vries [Fri, 5 Feb 2021 09:36:38 +0000 (10:36 +0100)] 
debug: fix switch lowering debug info

gcc/ChangeLog:

PR debug/98656
* tree-switch-conversion.c (jump_table_cluster::emit): Add loc
argument.
(bit_test_cluster::emit): Reuse location_t for newly created
gswitch statement.
(switch_decision_tree::try_switch_expansion): Preserve
location_t.
* tree-switch-conversion.h: Change function signatures.

(cherry picked from commit 4ede02a5f2af1205434f0e05aaaeff762b24e329)

3 years agomiddle-end/104786 - ICE with asm and VLA
Richard Biener [Wed, 9 Mar 2022 09:55:49 +0000 (10:55 +0100)] 
middle-end/104786 - ICE with asm and VLA

The following fixes an ICE observed with a MEM_REF allows_mem asm
operand referencing a VLA.  The following makes sure to not attempt
to go the temporary creation way when we cannot.

2022-03-09  Richard Biener  <rguenther@suse.de>

PR middle-end/104786
* cfgexpand.c (expand_asm_stmt): Do not generate a copy
for VLAs without an upper size bound.

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

(cherry picked from commit ba3ff5e35144e2afff4ccef4ccbbbbaba9870afb)

3 years agotree-optimization/103361 - fix unroll-and-jam direction vector handling
Richard Biener [Tue, 23 Nov 2021 09:11:41 +0000 (10:11 +0100)] 
tree-optimization/103361 - fix unroll-and-jam direction vector handling

This properly uses lambda_int instead of truncating the direction
vector to int which leads to false unexpected negative values.

2021-11-23  Richard Biener  <rguenther@suse.de>

PR tree-optimization/103361
* gimple-loop-jam.c (adjust_unroll_factor): Use lambda_int
for the dependence distance.
* tree-data-ref.c (print_lambda_vector): Properly print a lambda_int.

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

(cherry picked from commit 6cd440670078af89d82cbb67e01a5ecec8eec238)

3 years agomiddle-end/100786 - constant folding from incompatible alias
Richard Biener [Thu, 20 Jan 2022 13:25:51 +0000 (14:25 +0100)] 
middle-end/100786 - constant folding from incompatible alias

The following avoids us ICEing doing constant folding from variables
with aliases of different types.  The issue appears both in
folding and CCP and FRE can do more fancy stuff to still constant
fold cases where the load is smaller than the initializer so
defer it to there.

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

PR middle-end/100786
* gimple-fold.c (get_symbol_constant_value): Only return
values of compatible type to the symbol.

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

(cherry picked from commit 5c12507f5d0bc080e4f346af99824e039236e61c)

3 years agoDaily bump.
GCC Administrator [Fri, 6 May 2022 00:20:03 +0000 (00:20 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Thu, 5 May 2022 00:19:32 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Wed, 4 May 2022 00:20:17 +0000 (00:20 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 3 May 2022 00:19:33 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Mon, 2 May 2022 00:19:47 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 1 May 2022 00:19:33 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 30 Apr 2022 00:20:14 +0000 (00:20 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Fri, 29 Apr 2022 00:19:51 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Thu, 28 Apr 2022 00:19:13 +0000 (00:19 +0000)] 
Daily bump.

3 years agoAVX512F: Add missing macro for mask(z?)_scalf_s[sd] [PR 105339]
Hongyu Wang [Fri, 22 Apr 2022 06:42:30 +0000 (14:42 +0800)] 
AVX512F: Add missing macro for mask(z?)_scalf_s[sd] [PR 105339]

Add missing macro under O0 and adjust macro format for scalf
intrinsics.

gcc/ChangeLog:

PR target/105339
* config/i386/avx512fintrin.h (_mm512_scalef_round_pd):
Add parentheses for parameters and djust format.
(_mm512_mask_scalef_round_pd): Ditto.
(_mm512_maskz_scalef_round_pd): Ditto.
(_mm512_scalef_round_ps): Ditto.
(_mm512_mask_scalef_round_ps): Ditto.
(_mm512_maskz_scalef_round_ps): Ditto.
(_mm_scalef_round_sd): Use _mm_undefined_pd.
(_mm_scalef_round_ss): Use _mm_undefined_ps.
(_mm_mask_scalef_round_sd): New macro.
(_mm_mask_scalef_round_ss): Ditto.
(_mm_maskz_scalef_round_sd): Ditto.
(_mm_maskz_scalef_round_ss): Ditto.

gcc/testsuite/ChangeLog:

PR target/105339
* gcc.target/i386/sse-14.c: Add tests for new macro.

(cherry picked from commit 3c940d42701707559fabe49be99296f60fbc43e7)

3 years agoDaily bump.
GCC Administrator [Wed, 27 Apr 2022 00:19:24 +0000 (00:19 +0000)] 
Daily bump.

3 years agolibphobos: Give _Unwind_Exception an alignment that best resembles __attribute__...
Iain Buclaw [Sat, 25 Sep 2021 17:50:52 +0000 (19:50 +0200)] 
libphobos: Give _Unwind_Exception an alignment that best resembles __attribute__((aligned))

For interoperability with C++ EH, the alignment should match, otherwise
D may not be able to intercept exceptions thrown from C++.

libphobos/ChangeLog:

* libdruntime/gcc/unwind/generic.d (__aligned__): Define.
(_Unwind_Exception): Align struct to __aligned__.

(cherry picked from commit efa5449a094d3887e124d400ff0410af2c745b2d)

3 years agolibphobos: Don't call free on the TLS array in the emutls destroy function.
Iain Buclaw [Tue, 26 Apr 2022 13:10:09 +0000 (14:10 +0100)] 
libphobos: Don't call free on the TLS array in the emutls destroy function.

Fixes a segfault seen on Darwin when a GC scan is ran after a thread has
been destroyed.  As the global emutlsArrays hash still has a reference
to the array itself, and tries to iterate all elements.

Setting the length to zero frees all allocated elements in the array,
and ensures that it is skipped when the _d_emutls_scan is called.

libphobos/ChangeLog:

* libdruntime/gcc/emutls.d (emutlsDestroyThread): Clear the per-thread
TLS array, don't call free().

(cherry picked from commit 796b7cbac3d553a91d37c3961b9391fb7e19d0c6)

3 years agoDaily bump.
GCC Administrator [Tue, 26 Apr 2022 00:19:35 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Mon, 25 Apr 2022 00:19:23 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 24 Apr 2022 00:19:17 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 23 Apr 2022 00:19:30 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Fri, 22 Apr 2022 00:19:51 +0000 (00:19 +0000)] 
Daily bump.

3 years agofortran: Fix conv of UNION constructors [PR105310]
Fritz Reese [Tue, 19 Apr 2022 20:45:46 +0000 (16:45 -0400)] 
fortran: Fix conv of UNION constructors [PR105310]

This fixes an ICE when a UNION is the (1+8*2^n)-th field in a DEC
STRUCTURE when compiled with -finit-derived -finit-local-zero.
The problem was CONSTRUCTOR_APPEND_ELT from within gfc_conv_union_initializer
modified the vector pointer, but the pointer was passed by-value,
so the old pointer from the caller (gfc_conv_structure) pointed to freed
memory.

PR fortran/105310

gcc/fortran/ChangeLog:

* trans-expr.c (gfc_conv_union_initializer): Pass vec* by reference.

gcc/testsuite/ChangeLog:

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

(cherry picked from commit c049f638da4f7b32b11e4d895184e0960bae5291)

3 years agoDaily bump.
GCC Administrator [Thu, 21 Apr 2022 00:19:14 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Wed, 20 Apr 2022 00:19:11 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 19 Apr 2022 00:19:21 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Mon, 18 Apr 2022 00:19:24 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 17 Apr 2022 00:19:23 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 16 Apr 2022 00:19:32 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Fri, 15 Apr 2022 00:19:39 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Thu, 14 Apr 2022 00:20:05 +0000 (00:20 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Wed, 13 Apr 2022 00:19:21 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 12 Apr 2022 00:19:27 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Mon, 11 Apr 2022 00:19:09 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 10 Apr 2022 00:19:16 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 9 Apr 2022 00:19:35 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Fri, 8 Apr 2022 00:19:31 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Thu, 7 Apr 2022 00:19:42 +0000 (00:19 +0000)] 
Daily bump.

3 years agoarm: Fix ICEs with compare-and-swap and -march=armv8-m.base [PR99977]
Alex Coplan [Wed, 6 Apr 2022 10:16:10 +0000 (11:16 +0100)] 
arm: Fix ICEs with compare-and-swap and -march=armv8-m.base [PR99977]

The PR shows two ICEs with __sync_bool_compare_and_swap and
-mcpu=cortex-m23 (equivalently, -march=armv8-m.base): one in LRA and one
later on, after the CAS insn is split.

The LRA ICE occurs because the
@atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1 pattern attempts to tie
two output operands together (operands 0 and 1 in the third
alternative). LRA can't handle this, since it doesn't make sense for an
insn to assign to the same operand twice.

The later (post-splitting) ICE occurs because the expansion of the
cbranchsi4_scratch insn doesn't quite go according to plan. As it
stands, arm_split_compare_and_swap calls gen_cbranchsi4_scratch,
attempting to pass a register (neg_bval) to use as a scratch register.
However, since the RTL template has a match_scratch here,
gen_cbranchsi4_scratch ignores this argument and produces a scratch rtx.
Since this is all happening after RA, this is doomed to fail (and we get
an ICE about the insn not matching its constraints).

It seems that the motivation for the choice of constraints in the
atomic_compare_and_swap pattern comes from an attempt to satisfy the
constraints of the cbranchsi4_scratch insn. This insn requires the
scratch register to be the same as the input register in the case that
we use a larger negative immediate (one that satisfies J, but not L).

Of course, as noted above, LRA refuses to assign two output operands to
the same register, so this was never going to work.

The solution I'm proposing here is to collapse the alternatives to the
CAS insn (allowing the two output register operands to be matched to
different registers) and to ensure that the constraints for
cbranchsi4_scratch are met in arm_split_compare_and_swap. We do this by
inserting a move to ensure the source and destination registers match if
necessary (i.e. in the case of large negative immediates).

Another notable change here is that we only do:

  emit_move_insn (neg_bval, const1_rtx);

for non-negative immediates. This is because the ADDS instruction used in
the negative case suffices to leave a suitable value in neg_bval: if the
operands compare equal, we don't take the branch (so neg_bval will be
set by the load exclusive). Otherwise, the ADDS will leave a nonzero
value in neg_bval, which will correctly signal that the CAS has failed
when it is later negated.

gcc/ChangeLog:

PR target/99977
* config/arm/arm.c (arm_split_compare_and_swap): Fix up codegen
with negative immediates: ensure we expand cbranchsi4_scratch
correctly and ensure we satisfy its constraints.
* config/arm/sync.md
(@atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1): Don't
attempt to tie two output operands together with constraints;
collapse two alternatives.
(@atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): Likewise.
* config/arm/thumb1.md (cbranchsi4_neg_late): New.

gcc/testsuite/ChangeLog:

PR target/99977
* gcc.target/arm/pr99977.c: New test.

3 years agoDaily bump.
GCC Administrator [Wed, 6 Apr 2022 00:19:30 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 5 Apr 2022 00:19:29 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Mon, 4 Apr 2022 08:04:11 +0000 (08:04 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Fri, 1 Apr 2022 00:19:47 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Thu, 31 Mar 2022 00:19:20 +0000 (00:19 +0000)] 
Daily bump.

3 years agocplxlower: Avoid a transform when looking at a default definition
Martin Jambor [Wed, 30 Mar 2022 11:47:24 +0000 (13:47 +0200)] 
cplxlower: Avoid a transform when looking at a default definition

In PR 97456, IPA-SRA triggers a bug in tree-complex.c where it
converts:

 <bb 2>
   a$_M_value_21 = COMPLEX_EXPR <ISRA.18_10(D), ISRA.18_10(D)>;

(where ISRA.18 is IPA-SRA created PARM_DECL with DECL_IGNORED_P set,
which is why it only happens with IPA-SRA) into:

  <bb 2>
    a$_M_value_21 = COMPLEX_EXPR <a$_M_value$real_10(D), a$_M_value$real_10(D)>;

i.e. it replaces two uses of the parameter default-def with two
uninitialized default-defs of a new variable - all in hope to produce
code with better debug info.

This patch fixes it by avoiding the transform when the SSA_NAME to be
replaced is a default definition.

gcc/ChangeLog:

2020-10-19  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/97456
PR middle-end/105071
* tree-complex.c (set_component_ssa_name): Do not replace ignored decl
default definitions with new component vars.  Reorder if conditions.

gcc/testsuite/ChangeLog:

2020-10-19  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/97456
* gcc.dg/tree-ssa/pr97456.c: New test.

(cherry picked from commit 619f91eaa8c8a50f1f9d3e7b96ee837037f0e806)

3 years agoDaily bump.
GCC Administrator [Wed, 30 Mar 2022 00:19:52 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 29 Mar 2022 00:20:00 +0000 (00:20 +0000)] 
Daily bump.

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

3 years agoDaily bump.
GCC Administrator [Sun, 27 Mar 2022 00:19:40 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 26 Mar 2022 10:25:15 +0000 (10:25 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Fri, 25 Mar 2022 00:21:45 +0000 (00:21 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Thu, 24 Mar 2022 00:19:48 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Wed, 23 Mar 2022 00:19:46 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 22 Mar 2022 00:19:17 +0000 (00:19 +0000)] 
Daily bump.

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

3 years agoDaily bump.
GCC Administrator [Sun, 20 Mar 2022 00:19:05 +0000 (00:19 +0000)] 
Daily bump.

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

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

3 years agoDaily bump.
GCC Administrator [Thu, 17 Mar 2022 00:19:51 +0000 (00:19 +0000)] 
Daily bump.

3 years agotarget/104453 - guard call folding with NULL LHS
Richard Biener [Wed, 9 Feb 2022 07:48:35 +0000 (08:48 +0100)] 
target/104453 - guard call folding with NULL LHS

This guards shift builtin folding to do nothing when there is
no LHS, similar to what other foldings do.

2022-02-09  Richard Biener  <rguenther@suse.de>

PR target/104453
* config/i386/i386.c (ix86_gimple_fold_builtin): Guard shift
folding for NULL LHS.

* gcc.target/i386/pr104453.c: New testcase.

(cherry picked from commit 1c827873ed283df282f2df11dfe0ff607e07dab3)

3 years agoDaily bump.
GCC Administrator [Wed, 16 Mar 2022 00:19:33 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 15 Mar 2022 00:19:49 +0000 (00:19 +0000)] 
Daily bump.

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

3 years agoDaily bump.
GCC Administrator [Sun, 13 Mar 2022 00:19:10 +0000 (00:19 +0000)] 
Daily bump.

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

3 years agoDaily bump.
GCC Administrator [Fri, 11 Mar 2022 00:19:23 +0000 (00:19 +0000)] 
Daily bump.

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

3 years agoDaily bump.
GCC Administrator [Wed, 9 Mar 2022 00:19:17 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 8 Mar 2022 12:26:21 +0000 (12:26 +0000)] 
Daily bump.

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

3 years agoDaily bump.
GCC Administrator [Sun, 6 Mar 2022 00:19:07 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 5 Mar 2022 00:19:32 +0000 (00:19 +0000)] 
Daily bump.

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

3 years agoDaily bump.
GCC Administrator [Wed, 2 Mar 2022 00:19:20 +0000 (00:19 +0000)] 
Daily bump.

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

3 years agoDaily bump.
GCC Administrator [Mon, 28 Feb 2022 00:18:48 +0000 (00:18 +0000)] 
Daily bump.

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

3 years agoDaily bump.
GCC Administrator [Sat, 26 Feb 2022 00:19:11 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Fri, 25 Feb 2022 00:19:26 +0000 (00:19 +0000)] 
Daily bump.

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

3 years agoDaily bump.
GCC Administrator [Wed, 23 Feb 2022 00:19:15 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 22 Feb 2022 00:18:58 +0000 (00:18 +0000)] 
Daily bump.

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

3 years agoDaily bump.
GCC Administrator [Sun, 20 Feb 2022 00:19:04 +0000 (00:19 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 19 Feb 2022 00:19:22 +0000 (00:19 +0000)] 
Daily bump.

3 years agotree-optimization/97043 - fix latent wrong-code with SLP vectorization
Richard Biener [Mon, 14 Sep 2020 09:25:04 +0000 (11:25 +0200)] 
tree-optimization/97043 - fix latent wrong-code with SLP vectorization

When the unrolling decision comes late and would have prevented
eliding a SLP load permutation we can end up generating aligned
loads when the load is in fact unaligned.  Most of the time
alignment analysis figures out the load is in fact unaligned
but that cannot be relied upon.

The following removes the SLP load permutation eliding based on
the still premature vectorization factor.

2020-09-14  Richard Biener  <rguenther@suse.de>

PR tree-optimization/97043
* tree-vect-slp.c (vect_analyze_slp_instance): Do not
elide a load permutation if the current vectorization
factor is one.

(cherry picked from commit e93428a8b056aed83a7678d4dc8272131ab671ba)

3 years agotree-optimization/96522 - transfer of flow-sensitive info in copy_ref_info
Richard Biener [Thu, 27 Aug 2020 09:48:15 +0000 (11:48 +0200)] 
tree-optimization/96522 - transfer of flow-sensitive info in copy_ref_info

This removes the bogus tranfer of flow-sensitive info in copy_ref_info
plus fixes one oversight in FRE when flow-sensitive non-NULLness was added to
points-to info.

2020-08-27  Richard Biener  <rguenther@suse.de>

PR tree-optimization/96522
* tree-ssa-address.c (copy_ref_info): Reset flow-sensitive
info of the copied points-to.  Transfer bigger alignment
via the access type.
* tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt):
Reset all flow-sensitive info.

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

(cherry picked from commit eb68d9d828f94d28afa5900fbf3072bbcd64ba8a)