The GCC optimizer can generate symbols with non-zero offset from simple
if-statements. Bit zero is used for the Arm/Thumb state bit, so relocations
with offsets fail if it changes bit zero and the relocation forces bit zero
to true. The fix is to disable offsets on function pointer symbols.
gcc/
PR target/89222
* config/arm/arm.md (movsi): Use targetm.cannot_force_const_mem
to decide when to split off a non-zero offset from a symbol.
* config/arm/arm.c (arm_cannot_force_const_mem): Disallow offsets
in function symbols.
testsuite/
PR target/89222
* gcc.target/arm/pr89222.c: Add new test.
From-SVN: r273527
We currently use subst definitions to handle the different variants of shift
count operands. Unfortunately, in the vector shift pattern the shift count
operand is used directly. Without it being adjusted for the 'subst' variants the
displacement value is omitted resulting in a wrong shift count being applied.
This patch needs to be applied to older branches as well.
gcc/ChangeLog:
2019-07-15 Andreas Krebbel <krebbel@linux.ibm.com>
Backport from mainline
2019-07-01 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/vector.md: Fix shift count operand printing.
gcc/testsuite/ChangeLog:
2019-07-15 Andreas Krebbel <krebbel@linux.ibm.com>
Backport from mainline
2019-07-01 Andreas Krebbel <krebbel@linux.ibm.com>
* gcc.target/s390/vector/vec-shift-2.c: New test.
From-SVN: r273494
The gcc.c-torture/execute/builtins/lib directory contains a reimplementation
of many C library string functions, which causes non-trivial register allocation
bugs with LTO and static linked libraries. To fix this long-standing test issue,
turn off ipa-ra which avoids the register corruption across calls. All builtin
torture tests now pass on aarch64-none-elf. Committed as obvious.
See PR78529 for more details.
testsuite/
PR testsuite/78529
* gcc.c-torture/execute/builtins/builtins.exp: Add -fno-ipa-ra.
From-SVN: r273453
PR rtl-optimization/91136
* df-core.c (ACCESSING REFS): Fix typos in comment.
* resource.c (mark_target_live_reg): Add artificial defs that occur at
the beginning of the block to the initial set of live registers.
From-SVN: r273439
* gcc-interface/decl.c (set_nonaliased_component_on_array_type): Add
missing guard for the presence of TYPE_CANONICAL.
(set_reverse_storage_order_on_array_type): Likewise.
From-SVN: r272814
Backport from mainline
2019-05-28 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/90634
* include/experimental/bits/fs_path.h (path::path(path&&)): Only call
_M_split_cmpts() for a path with multiple components.
(path::_S_is_dir_sep()): Add missing 'static' keyword to function.
* src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
components and reserve space in vector. Return early when there is
only one component.
* testsuite/experimental/filesystem/path/construct/90634.cc: New test.
From-SVN: r272697
2019-06-21 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/90937
* trans-types.c (get_formal_from_actual_arglist): Get symbol from
current namespace so it will be freed later. If symbol is of type
character, get an empty character length.
2019-06-21 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/90937
* gfortran.dg/external_procedure_4.f90: New test.
From-SVN: r272566
2019-06-12 Thomas Koenig <tkoenig@gcc.gnu.org>
Tomáš Trnka <trnka@scm.com>
Backport from trunk
PR fortran/90744
* trans-types.c (get_formal_from_actual_arglist): Unset typespec
flags which make no sense for procedures without explicit
interface.
2019-06-12 Thomas Koenig <tkoenig@gcc.gnu.org>
Tomáš Trnka <trnka@scm.com>
Backport from trunk
PR fortran/90744
* gfortran.dg/deferred_character_33.f90: New test.
* gfortran.dg/deferred_character_33a.f90: New test.
Co-Authored-By: Tomáš Trnka <trnka@scm.com>
From-SVN: r272214