The solution for initialising global TLS variables does not apply
to platforms using emulated TLS. XFAIL the test for this on Darwin.
2019-11-03 Iain Sandoe <iain@sandoe.co.uk>
PR c++/79274
* g++.dg/tls/pr77285-2.C: XFAIL test for Darwin.
From-SVN: r277751
This test fails on Darwin because it requires alias support, so
add the relevant dg-requires.
gcc/testsuite/
2019-11-02 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-06-13 Iain Sandoe <iain@sandoe.co.uk>
* gcc.dg/pr90760.c: Require alias support.
From-SVN: r277745
We applied a conservative, but fairly large, hammer to fix PR71767.
However, ideally, we want minimise the number of symbols visible to
ld64 and to match the cases emitted by clang (since that's what ld64
is expecting). Now we've improved the handling of indirections, we
can make the indirection symbols local when they are in the regular
non-lazy symbol pointers section. We will continue to make any
indirections in the data section visible (since right now we have no
way to track if a given symbol follows a weak global).
This change makes no difference to handling of labels for constants
(to be revised in a future patch).
There's a mechanical change to a number of tests (allowing 'l' or 'L'
as the indirection symbol prefix).
gcc/
2019-11-01 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-10-13 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c (machopic_indirection_name): Rework the
function to emit linker-visible symbols only for indirections
in the data section. Clean up the code and update comments.
gcc/testsuite/
2019-11-01 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-10-13 Iain Sandoe <iain@sandoe.co.uk>
* gcc.target/i386/indirect-thunk-1.c: Allow 'l' or 'L' in
indirection label prefix, for Darwin.
* gcc.target/i386/indirect-thunk-2.c: Likewise.
* gcc.target/i386/indirect-thunk-3.c: Likewise.
* gcc.target/i386/indirect-thunk-4.c: Likewise.
* gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
* gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
* gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
* gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
* gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
* gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
* gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
* gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
* gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
* gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
* gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
* gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
* gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
* gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
* gcc.target/i386/pr32219-2.c: Likewise.
* gcc.target/i386/pr32219-3.c: Likewise.
* gcc.target/i386/pr32219-4.c: Likewise.
* gcc.target/i386/pr32219-7.c: Likewise.
* gcc.target/i386/pr32219-8.c: Likewise.
* gcc.target/i386/ret-thunk-14.c: Likewise.
* gcc.target/i386/ret-thunk-15.c: Likewise.
* gcc.target/i386/ret-thunk-9.c: Likewise.
From-SVN: r277727
This fixes build errors when used with newer GCC and corrects a mistake
in the checking of ABI versions.
276768 We were missing a check for the case that user's ABI was > 2 and the
codegen was for 64 bit.
276635 Fix some format-related build warnings.
This fixes two error messages to avoid punctuation and contracted
negations.
gcc/
2019-11-01 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-10-09 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c (darwin_override_options): Make the check for
Objective-C ABI version more specific for 64bit code.
Backport from mainline
2019-10-06 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c (darwin_override_options): Adjust objective-c
ABI version error messages to avoid punctuation and contracted
negations.
From-SVN: r277726
The library handling and some of the options for creating the crts for
the older PPC Darwin versions had bit-rotted somewhat. This adjusts the
build criteria for the crts to avoid newer ld64 versions warnings about
mismatches in build and object versions.
Added to some of the comments that it's documented why the specs are as
they are.
gcc/
2019-11-01 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-07-03 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.h (REAL_LIBGCC_SPEC): Adjust for earlier Darwin.
(STARTFILE_SPEC): Split crt3 into a separate spec.
(DARWIN_EXTRA_SPECS): Add crt2 and crt3 spec.
(DARWIN_CRT2_SPEC): New.
(DARWIN_CRT3_SPEC): New.
(MIN_LD64_OMIT_STUBS): Revise to 62.1.
* config/rs6000/darwin.h (DARWIN_CRT2_SPEC): Revise conditions.
(DARWIN_CRT3_SPEC): New.
libgcc/
2019-11-01 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-07-03 Iain Sandoe <iain@sandoe.co.uk>
* config.host (powerpc-*-darwin*,powerpc64-*-darwin*): Revise crt
list.
* config/rs6000/t-darwin: Build crt3_2 for older systems. Revise
mmacosx-version-min for crts to run across all system versions.
* config/rs6000/t-darwin64 (LIB2ADD): Remove.
* config/t-darwin: Revise mmacosx-version-min for crts to run across
system versions >= 10.4.
From-SVN: r277725
272660
We have been including this in libgcc, which means that we have to append
-lgcc even when using shared libgcc. In preparation for revision of libgcc
split this into an endfile.
272759 Correct whitespace in specs.
gcc/
2019-11-01 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-06-27 Iain Sandoe <iain@sandoe.co.uk>
* config/rs6000/darwin.h (ENDFILE_SPEC): Correct whitespace in the
spec.
Backport from mainline
2019-06-25 Iain Sandoe <iain@sandoe.co.uk>
* config/rs6000/darwin.h (ENDFILE_SPEC): New.
libgcc/
2019-11-01 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-06-25 Iain Sandoe <iain@sandoe.co.uk>
* config.host: Add libef_ppc.a to the extra files for powerpc-darwin.
* config/rs6000/t-darwin: (PPC_ENDFILE_SRC, PPC_ENDFILE_OBJS): New.
Build objects for the out of line save/restore register functions
so that they can be used for any supported Darwin version.
* config/t-darwin: Default the build Darwin version to Darwin8
(MacOS 10.4).
From-SVN: r277724
For very old toolchains, the compiler generated extra symbols that mark the
start of each FDE. We no longer need this (since xcode 3 era) - so, for
compatibility with newer linkers, omit this when it is not required.
Since we have detection of the linker version, we can use that directly to
determine if support is needed.
gcc/
2019-11-01 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-06-18 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c (darwin_emit_unwind_label): New default to false.
(darwin_override_options): Set darwin_emit_unwind_label as needed.
From-SVN: r277722
272356 For very old toolchains, the compiler generated pic symbol stubs that
provide the necessary indirections. We no longer need this (since xcode
3 era) and it's more efficient for the linker to make one stub when it
knows a symbol is needed that for us to emit them speculatively in every
object.
Our current codegen is making the assumption that a specific OS version
uses a specific linker version - and therefore the presence of support
could be based on the target OS rev. Of course, that's way too simplistic
(most likely bogus for cross-toolchains) and we want to make things explict.
Since we have detection of the linker version, we can use that directly
(A config test for support for stub-less linking might also be feasible
but much more involved).
Finally, should the user wish to generate code that caters for export to
use in an environment with an older toolchain, the generation of stubs
can be forced from the command line.
In addition to the points above, branch islanding and a long branch opt
for PowerPC Darwin has become conflated with the emission of these stubs.
274379 There is no need to distinguish PIC/non-PIC symbol stubs.
So we can use a single flag for both.
gcc/
2019-11-01 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-08-13 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c (machopic_indirect_call_target): Rename symbol stub
flag.
(darwin_override_options): Likewise.
* config/darwin.h: Likewise.
* config/darwin.opt: Likewise.
* config/i386/i386.c (output_pic_addr_const): Likewise.
* config/rs6000/darwin.h: Likewise.
* config/rs6000/rs6000.c (rs6000_call_darwin_1): Likewise.
* config/i386/darwin.h (TARGET_MACHO_PICSYM_STUBS): Rename to ...
... this TARGET_MACHO_SYMBOL_STUBS.
(FUNCTION_PROFILER):Likewise.
* config/i386/i386.h: Likewise.
Backport from mainline
2019-06-16 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c (machopic_indirect_call_target): Use renamed
darwin_picsymbol_stubs to decide on output.
(darwin_override_options): Handle darwin_picsymbol_stubs.
* config/darwin.h (MIN_LD64_OMIT_STUBS): New.
(LD64_VERSION): Revise default.
* config/darwin.opt: (mpic-symbol-stubs): New option.
(darwin_picsymbol_stubs): New variable.
* config/i386/darwin.h (TARGET_MACHO_BRANCH_ISLANDS):
rename to TARGET_MACHO_PICSYM_STUBS.
* config/i386/i386.c (output_pic_addr_const): Likewise.
* config/i386/i386.h Likewise.
* config/rs6000/darwin.h: Likewise.
* config/rs6000/rs6000.c (rs6000_call_darwin_1): Use renamed
darwin_picsymbol_stubs.
gcc/testsuite/
2019-11-01 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-08-13 Iain Sandoe <iain@sandoe.co.uk>
* obj-c++.dg/stubify-1.mm: Rename symbol stub option.
* obj-c++.dg/stubify-2.mm: Likewise.
* objc.dg/stubify-1.m: Likewise.
* objc.dg/stubify-2.m: Likewise.
From-SVN: r277721
This is primarily in order to improve testsuite coverage, we might elect
to prune the list at some point.
gcc/
2019-11-01 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-06-28 Iain Sandoe <iain@sandoe.co.uk>
* config.gcc (powerpc-*-darwin*, powerpc64-*-darwin*): Remove
override on extra_headers.
From-SVN: r277720
The default for the kernel is soft-float, however a user writing a kernel
extension might want to make use of hard float. This aligns GCC with the
system tools and makes ' -mkernel -mhard-float ' work as expected.
gcc/
2019-11-01 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-06-27 Iain Sandoe <iain@sandoe.co.uk>
* config/rs6000/rs6000.c (darwin_rs6000_override_options): Honour
user-specified float mode choice for kernel mode code.
From-SVN: r277718
For compatibility with other members of the port.
Note, that we do not handle the longcall attribute, since longcall
is not required/used on current Darwin.
gcc/
2019-11-01 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-06-23 Iain Sandoe <iain@sandoe.co.uk>
* config/rs6000/darwin.h: Handle GCC target pragma.
From-SVN: r277717
If we build Darwin with a modern assembler, then it might well
recognise insns that cannot be used on current Darwin systems.
The patch augments the tests for feature support for VSX,
power8 and power9 to exclude Darwin even if the assembler can
handle the instructions.
gcc/testsuite/
2019-11-01 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-05-15 Iain Sandoe <iain@sandoe.co.uk>
* lib/target-supports.exp
(check_effective_target_powerpc_p8vector_ok): No support for Darwin.
(check_effective_target_powerpc_p9vector_ok): Likewise.
(check_effective_target_powerpc_float128_sw_ok): Likewise.
(check_effective_target_powerpc_float128_hw_ok): Likewise.
(check_effective_target_powerpc_vsx_ok): Likewise.
* gcc.target/powerpc/bfp/bfp.exp: Don't try to run this for Darwin.
* gcc.target/powerpc/dfp/dfp.exp: Likewise.
From-SVN: r277716
The current Darwin load/store lo_sum patterns have neither predicate nor
constraint. This means that most parts of the backend, which rely on
recog() to validate the rtx, can produce invalid combinations/selections.
For 32bit cases this isn't a problem since we can load/store to unaligned
addresses using D-mode insns.
Conversely, for 64bit instructions that use DS mode, this can manifest as
assemble errors (for an assembler that checks the LO14 relocations), or as
crashes caused by wrong offsets (or worse, wrong content for the two LSBs).
What we want to check for Y on Darwin is:
- that the alignment of the Symbols' target is sufficient for DS mode
- that the offset is suitable for DS mode.
(while looking through the Mach-O PIC unspecs).
So, the patch removes the Darwin-specific lo_sum patterns (we begin using
the movdi_internal64 patterns). We also we need to extend the handling of the
mem_operand_gpr constraint to allow looking through Mach-O PIC UNSPECs in
the lo_sum cases.
2019-10-29 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-10-17 Iain Sandoe <iain@sandoe.co.uk>
PR target/65342
* config/rs6000/darwin.md (movdi_low, movsi_low_st): Delete.
(movdi_low_st): Delete.
* config/rs6000/rs6000.c
(darwin_rs6000_legitimate_lo_sum_const_p): New.
(mem_operand_gpr): Validate Mach-O LO_SUM cases separately.
* config/rs6000/rs6000.md (movsi_low): Delete.
From-SVN: r277590
When we're using the LLVM-based assembler (the default on modern Darwin)
the ordering of stubs and non-lazy symbol pointers is important.
Interleaving the output (current GCC behaviour) leads to crashes which
prevents us from building code with symbol stubs.
To resolve this, we order the output of stubs and symbol indirections:
1. Any indirections in the data section
2. Symbol stubs.
3. Non-lazy symbol pointers.
At present, we still emit LTO sections after these.
2019-10-29 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-10-12 Iain Sandoe <iain@sandoe.co.uk>
PR target/67183
* config/darwin.c (machopic_indirection): New field to flag
non-lazy-symbol-pointers in the data section.
(machopic_indirection_name): Compute if an indirection should
appear in the data section.
(machopic_output_data_section_indirection): New callback split
from machopic_output_indirection.
(machopic_output_stub_indirection): Likewise.
(machopic_output_indirection): Retain the code for non-lazy
symbol pointers in their regular section.
(machopic_finish): Use the new callbacks to order the indirection
output.
From-SVN: r277587
This is a combined set of 5 patches that allows us to fix PRs 65342
and 67183.
276924 Make machopic_finish() static.
276767 Set a SYMBOL flag for indirections.
We are able to treat these specially where needed in legitimate address
tests (specifically, they are guaranteed to be pointer-aligned).
276708 Compute and cache indirection rules.
This caches a check for the requirement to indirect a symbol in the Darwin
ABI, and uses it where needed. We also ensure that we place the indirection
pointers into the non-lazy symbol pointers section. Other placements have
occurred with various platform toolchains - but these seem to have been
unintentional so we match current platform toolchains.
276675 Consider visibility in indirections.
For weak, hidden vars the indirection should just be as normal, that
is that the indirections for such symbols should appear in the non-lazy
symbol pointers table, not in the .data section.
276674 Initial tidy of Mach-O symbol handling.
We want to improve the detection and caching of symbol-properties
so that (a) we can make the compiler's output match the platform
norms (b) we can improve efficiency by checking flags instead of
inspecting strings. (c) The fix for PR71767 was a largish hammer
and we want to reduce the number of symbols that are made linker-
visible.
This first patch is largely typographical changes with no functional
difference intended:
- Tries to ensure that there's no overlap between the symbols used in
the Mach-O case and those declared in the i386 or rs6000 port trees.
- Some improvement to comments.
- Makes the naming of the symbol flags consistent with other uses.
- Provides a predicate macro for each use.
2019-10-29 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-10-12 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin-protos.h (machopic_finish): Delete.
* config/darwin.c (machopic_finish): Make static.
Backport from mainline
2019-10-09 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c (machopic_indirect_data_reference): Set flag to
indicate that the new symbol is an indirection.
(machopic_indirect_call_target): Likewise.
* config/darwin.h (MACHO_SYMBOL_FLAG_INDIRECTION): New.
(MACHO_SYMBOL_INDIRECTION_P): New.
(MACHO_SYMBOL_FLAG_STATIC): Adjust bit number.
Backport from mainline
2019-10-08 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c (machopic_indirect_data_reference): Check for
required indirections before making direct access to defined
values.
(machopic_output_indirection): Place the indirected pointes for
required indirections into the non-lazy symbol pointers section.
(darwin_encode_section_info):
* config/darwin.h (MACHO_SYMBOL_FLAG_MUST_INDIRECT): New.
(MACHO_SYMBOL_MUST_INDIRECT_P): New.
Backport from mainline
2019-10-07 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c (machopic_output_indirection): Don't put
hidden symbol indirections into the .data section, use the
non-lazy symbol pointers section as normal.
(darwin_encode_section_info): Record if a symbol is hidden.
* config/darwin.h (MACHO_SYMBOL_FLAG_HIDDEN_VIS): New.
(MACHO_SYMBOL_HIDDEN_VIS_P): New.
Backport from mainline
2019-10-07 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c (machopic_symbol_defined_p): Use symbol flag
predicates instead of accessing bits directly.
(machopic_indirect_call_target): Likewise.
(machopic_output_indirection): Likewise.
(darwin_encode_section_info): Improve description. Use renamed
symbol flags. Use predicate macros for variables and functions.
* config/darwin.h:
Rename MACHO_SYMBOL_VARIABLE to MACHO_SYMBOL_FLAG_VARIABLE.
Rename MACHO_SYMBOL_DEFINED to MACHO_SYMBOL_FLAG_DEFINED.
Rename MACHO_SYMBOL_STATIC to MACHO_SYMBOL_FLAG_STATIC.
(MACHO_SYMBOL_VARIABLE_P): New.
(MACHO_SYMBOL_DEFINED_P):New.
(MACHO_SYMBOL_STATIC_P): New.
* config/i386/darwin.h (MACHO_SYMBOL_FLAG_VARIABLE): Delete.
(SYMBOL_FLAG_SUBT_DEP): New.
* config/rs6000/darwin.h (SYMBOL_FLAG_SUBT_DEP): New.
From-SVN: r277586
As fallout from 19315, which is not fixed on this branch, the presence
of an unused static variable causes a 'promotion' of that to extern.
This produces wrong code on Darwin when Mach-O PIC is in use (m32 X86
and all PPC). So skip this unconditionally, as noted in the PR trail,
the usefulness of the test is questionable anyway.
gcc/testsuite/
2019-10-29 Iain Sandoe <iain@sandoe.co.uk>
* gcc.c-torture/compile/pr72802.c: Skip for Darwin.
From-SVN: r277585
Darwin's linker doesn't like text section relocations (they require special
enabling). The Fortran FE, at least, seems to generate cases where the
initialiser for a pointer constant can need a relocation. We can handle
this by special-casing SECCAT_RODATA when the relocation is present by
placing the constant in the .const_data section.
2019-10-29 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-10-05 Iain Sandoe <iain@sandoe.co.uk>
PR target/59888
* config/darwin.c (darwin_rodata_section): Add relocation flag,
choose const_data section for constants with relocations.
(machopic_select_section): Pass relocation flag to
darwin_rodata_section ().
From-SVN: r277584
Some changes were missed here in the transition to LRA. The Darwin
archs are all using LRA now, testing for reload is not correct.
2019-10-18 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-09-21 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c (machopic_legitimize_pic_address): Check
for lra, rather than reload.
From-SVN: r277583
For compatibility with xcrun and the behaviour of the clang driver, make use
of the setting of the SDKROOT environment variable when it is available.
This applies to both finding headers and libraries (i.e. it is also passed to
ld64).
Priority:
1. User's command-line specified --sysroot= or -isysroot.
2. The SDKROOT variable when set, and validated.
3. Any sysroot provided by --with-sysroot= configuration parameter.
SDKROOT is checked thus:
1. Presence.
2. That it starts with / (i.e. 'absolute').
3. That it is not / only (since that's the default).
4. That it is readable by the process executing the driver.
This is pretty much the same rule set as used by the clang driver.
NOTE: (3) might turn out to be overly restrictive in the case that we
have configured with --with-sysroot= and then we want to run on a system
with an installation of the headers/libraries in /. We can revisit this
if that turns out to be an important use-case.
So one can do:
xcrun --sdk macosx /path/to/gcc ....
and that provides the SDK path as the sysroot to GCC as expected.
CAVEAT: An unfortunate effect of the fact that gcc (and g++) are
executables in the Xcode installation, which are found ahead of any such
named in the $PATH
PATH=/path/to/gcc/install:$PATH
xcrun --sdk macosx gcc ....
does *not* work, instead that executes the clang from the xcode/commmand
line tools installation.
PATH=/path/to/gcc/install:$PATH
xcrun --sdk macosx x64_64-apple-darwinXX-gcc ...
does work as expected, however.
2019-10-29 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-10-03 Iain Sandoe <iain@sandoe.co.uk>
PR target/87243
* config/darwin-driver.c (maybe_get_sysroot_from_sdkroot): New.
(darwin_driver_init): Use the sysroot provided by SDKROOT when that
is available and the user has not set one on the command line.
From-SVN: r277582
pie, no-pie and rdynamic are driver options, we can process them in the
relevant place and drop them once dealt with. There's no need to generate
a new header to process the no_compact_unwind which is applied on the
basis of the target system.
Support for the -pie, -no_pie and -no_compact_unwind options should ideally
be checked at configure time, however the status quo is to assert that linkers
capable of targeting the relevant systems support these options (i.e. we trust
that the user doesn't attempt to configure inappropriately).
TODO: check the availability of the linker opts in configure rather than
trusting to the user.
This will fix the fail of pie-7.c, which is a result of failing to handle the
no-pie driver option.
2019-10-29 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-07-03 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.h (DRIVER_SELF_SPECS): Remove the linker cases.
(RDYNAMIC): Rename to, DARWIN_RDYNAMIC.
(DARWIN_PIE_SPEC, DARWIN_NOPIE_SPEC): Adjust to remove the Xlinker
clauses.
(LINK_COMMAND_SPEC_A): Add DARWIN_RDYNAMIC, DARWIN_PIE_SPEC and
DARWIN_NOPIE_SPEC.
Backport from mainline
2019-06-19 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.h (DRIVER_SELF_SPECS): Add RDYNAMIC, DARWIN_PIE_SPEC
and DARWIN_NOPIE_SPEC.
(RDYNAMIC): New, modified from DARWIN_EXPORT_DYNAMIC.
(DARWIN_PIE_SPEC): Collate from darwin.h and darwin9.h.
(DARWIN_NOPIE_SPEC): Collate from darwin10.h.
(DARWIN_NOCOMPACT_UNWIND): New from darwin10.h
(DARWIN_EXPORT_DYNAMIC): Delete.
* config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Move no_compact_unwind
and pie options processing to darwin.h.
* config/darwin9.h (DARWIN_PIE_SPEC): Move pie processing to darwin.h
From-SVN: r277581
2019-10-27 Paul Thomas <pault@gcc.gnu.org>
Backport from mainline
PR fortran/86248
* resolve.c (flag_fn_result_spec): Correct a typo before the
function declaration.
* trans-decl.c (gfc_sym_identifier): Boost the length of 'name'
to allow for all variants. Simplify the code by using a pointer
to the symbol's proc_name and taking the return out of each of
the conditional branches. Allow symbols with fn_result_spec set
that do not come from a procedure namespace and have a module
name to go through the non-fn_result_spec branch.
2019-10-27 Paul Thomas <pault@gcc.gnu.org>
Backport from mainline
PR fortran/86248
* gfortran.dg/char_result_19.f90 : New test.
* gfortran.dg/char_result_mod_19.f90 : Module for the new test.
From-SVN: r277488
There are some cases in which the value for the max skip to a p2align
directive can be negative. The older assembler (and GAS) just ignores
these cases but newer tools produce an error. To preserve behaviour,
we avoid emitting out of range values.
2019-10-26 Iain Sandoe <iain@sandoe.co.uk>
* config/rs6000/darwin.h (ASM_OUTPUT_MAX_SKIP_ALIGN):Guard
against out of range max skip or log values.
From-SVN: r277471
This patch fixes a problem with the thumb1 prologue code where the link
register could be unconditionally used as a scratch register even if the
return value was still live at the end of the prologue.
Additionally, the patch improves the code generated when we are not
using many low call-saved registers to make use of any unused call
clobbered registers to help with the saving of high registers that
cannot be pushed directly (quite rare in normal code as the register
allocator correctly prefers low registers).
2019-05-08 Mihail Ionescu <mihail.ionescu@arm.com>
Richard Earnshaw <rearnsha@arm.com>
gcc:
PR target/88167
* config/arm/arm.c (thumb1_prologue_unused_call_clobbered_lo_regs): New
function.
(thumb1_epilogue_unused_call_clobbered_lo_regs): New function.
(thumb1_compute_save_core_reg_mask): Don't force a spare work
register if both the epilogue and prologue can use call-clobbered
regs.
(thumb1_unexpanded_epilogue): Use
thumb1_epilogue_unused_call_clobbered_lo_regs. Reverse the logic for
picking temporaries for restoring high regs to match that of the
prologue where possible.
(thumb1_expand_prologue): Add any usable call-clobbered low registers to
the list of work registers. Detect if the return address is still live
at the end of the prologue and avoid using it for a work register if so.
If the return address is not live, add LR to the list of pushable regs
after the first pass.
gcc/testsuite:
PR target/88167
* gcc.target/arm/pr88167-1.c: New test.
* gcc.target/arm/pr88167-2.c: New test.
From-SVN: r277454
OS X 10.15 adds aligned_alloc but it has the same restriction as the AIX
version, namely that alignments smaller than sizeof(void*) are not
supported.
Backport from mainline
2019-10-18 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/92143
* libsupc++/new_opa.cc (operator new) [__APPLE__]: Increase alignment
to at least sizeof(void*).
From-SVN: r277414
Also remove the creation of the html/ext sub-directory, which has been
unused since revision r245258.
Backport from mainline
2019-10-08 Jonathan Wakely <jwakely@redhat.com>
* doc/Makefile.am (doc-html-docbook-regenerate): New target.
(${docbook_outdir}/html): Do not create unused 'html/ext' directory.
* doc/Makefile.in: Regenerate.
* doc/xml/manual/documentation_hacking.xml: Document new target.
* doc/html/*: Regenerate.
From-SVN: r277413
2019-10-24 Richard Biener <rguenther@suse.de>
Backport from mainline
2019-10-17 Richard Biener <rguenther@suse.de>
PR debug/91887
* dwarf2out.c (gen_formal_parameter_die): Also try to match
context_die against a DW_TAG_GNU_formal_parameter_pack parent.
* g++.dg/debug/dwarf2/pr91887.C: New testcase.
2019-09-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/91812
* tree-ssa-phiprop.c (propagate_with_phi): Do not replace
volatile loads.
* gcc.dg/torture/pr91812.c: New testcase.
From-SVN: r277370
PR tree-optimization/92131
* tree-vrp.c (extract_range_from_plus_minus_expr): If the resulting
range would be symbolic, drop to varying for any explicit overflow
in the constant part or if neither range is a singleton.
From-SVN: r277331
2019-10-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/69455
* trans-decl.c (generate_local_decl): Avoid misconstructed
intrinsic modules in a BLOCK construct.
2019-10-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/69455
* gfortran.dg/pr69455_1.f90: New test.
* gfortran.dg/pr69455_2.f90: Ditto.
From-SVN: r277193
Armv6 has support for unaligned accesses to memory. However, the
thumb1 code patterns were trying to use the 32-bit code constraints.
One failure mode from this was that the patterns are designed to be
compatible with conditional execution and this was then causing an
assert in the compiler.
The unaligned_loadhis pattern is only used for expanding extv, which
in turn is only enabled for systems supporting thumb2. Given that
there is no simple expansion for a thumb1 sign-extending load (the
instruction has no immediate offset form and requires two registers in
the address) it seems simpler to just disable this for thumb1.
Fixed thusly:
Backport from trunk:
2019-05-03 Richard Earnshaw <rearnsha@arm.com>
PR target/89400
* config/arm/arm.md (unaligned_loadsi): Add variant for thumb1.
Restrict 'all' variant to 32-bit configurations.
(unaligned_loadhiu): Likewise.
(unaligned_storehi): Likewise.
(unaligned_storesi): Likewise.
(unaligned_loadhis): Disable when compiling for thumb1.
From-SVN: r277125
2019-10-17 Bill Schmidt <wschmidt@linux.ibm.com>
Backport from mainline
2019-10-15 Bill Schmidt <wschmidt@linux.ibm.com>
PR target/92093
* gcc.target/powerpc/pr91275.c: Fix type and endian issues.
From-SVN: r277119
Backport from mainline
2019-10-08 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
* config.gcc: Move -L usage from LINK_OS_EXTRA_SPEC32 and
LINK_OS_EXTRA_SPEC64 to MD_STARTFILE_PREFIX and
MD_STARTFILE_PREFIX_1 when using --with-advance-toolchain.
From-SVN: r277072
gcc/
Backport from mainline
2019-10-10 Oleg Endo <olegendo@gcc.gnu.org>
PR target/88630
* config/sh/sh.h (TARGET_FPU_SH4_300): New macro.
* config/sh/sh.c (sh_option_override): Enable fsca and fsrra insns
also for TARGET_FPU_SH4_300.
(sh_emit_mode_set): Check for TARGET_FPU_SH4_300 instead of
TARGET_SH4_300.
* config/sh/sh.md (toggle_pr): Add TARGET_FPU_SH4_300 condition.
(negsf2): Expand to either negsf2_fpscr or negsf2_no_fpscr.
(*negsf2_i): Split into ...
(negsf2_fpscr, negsf2_no_fpscr): ... these new patterns.
(abssf2): Expand to either abssf2_fpsc or abssf2_no_fpsc.
(**abssf2_i): Split into ...
(abssf2_fpscr, abssf2_no_fpscr): ... these new patterns.
(negdf2): Expand to either negdf2_fpscr or negdf2_no_fpscr.
(*negdf2_i): Split into ...
(negdf2_fpscr, negdf2_no_fpscr): ... these new patterns.
(absdf2): Expand to either absdf2_fpscr or absdf2_no_fpsc.
(**abssf2_i): Split into ...
(absdf2_fpscr, absdf2_no_fpscr): ... these new patterns.
From-SVN: r276877
* gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Really test the
sign of the value when deciding to build a NEGATE_EXPR.
<PLUS_EXPR>: Remove redundant line.
<BIT_AND_EXPR>: Do the negation here.
From-SVN: r276869
As part of the backport for pr82920, the following three testcases
that are only present on the 7 and 8 branch, also needed amendment.
2019-09-28 Iain Sandoe <iain@sandoe.co.uk>
PR target/82920
* gcc.target/i386/indirect-thunk-bnd-1.c: Adjust scan-asms for Darwin,
do not use -fno-pic on Darwin.
* gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
* gcc.target/i386/ret-thunk-25.c: Skip for Darwin, which has a
different ABI for returning this category of complex value.
From-SVN: r276259
Darwin doesn't support mx32, and some tests were
failing because it was trying to do them. When we
disable this it turns out that quite a few tests
requiring mx32 support were not guarded.
gcc/
2019-09-28 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-05-12 Iain Sandoe <iain@sandoe.co.uk>
PR target/82920
* config/i386/darwin.h (CC1_SPEC): Report -mx32 as an error for
Darwin.
gcc/testsuite/
2019-09-28 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-05-14 Iain Sandoe <iain@sandoe.co.uk>
PR target/82920
* gcc.target/i386/pr52146.c: Require effective target x32.
* gcc.target/i386/pr52698.c: Likewise.
* gcc.target/i386/pr52857-1.c: Likewise.
* gcc.target/i386/pr52857-2.c: Likewise.
* gcc.target/i386/pr52876.c: Likewise.
* gcc.target/i386/pr53698.c: Likewise.
* gcc.target/i386/pr54157.c: Likewise.
* gcc.target/i386/pr55049-1.c: Likewise.
* gcc.target/i386/pr55093.c: Likewise.
* gcc.target/i386/pr55116-1.c: Likewise.
* gcc.target/i386/pr55116-2.c: Likewise.
* gcc.target/i386/pr55597.c: Likewise.
* gcc.target/i386/pr59929.c: Likewise.
* gcc.target/i386/pr66470.c: Likewise.
From-SVN: r276258
libitm/
2019-09-28 Oleg Endo <olegendo@gcc.gnu.org>
Backport from mainline
2018-08-03 Sergei Trofimovich <slyfox@gentoo.org>
PR target/86712
* config/sh/sjlj.S: Adjust to use PIC vs normal code to avoid
absolute relocation in a shared library.
From-SVN: r276247
This adds RejectNegative in a number of places it was needed,
reorders the opts into two groups (one general and one driver-only).
We also add a minimal description to each opt, and note some that
are now obsolete. The only functional change is to permit
-mtarget-linker= as an alias of -mtarget-linker.
This fixes the Darwin part of PR89327
2019-09-27 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-06-16 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.opt (prebind, noprebind, seglinkedit,
noseglinkedit): Add RejectNegative.
Backport from mainline
2019-06-14 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.opt: Add RejectNegative where needed, reorder
and add minimal functional descriptions.
From-SVN: r276195
* gcc-interface/trans.c (Attribute_to_gnu): Test Can_Use_Internal_Rep
on the underlying type of the node.
(Call_to_gnu): Likewise with the type of the prefix.
From-SVN: r276044
Stack pointer adjustment code in prologue missed a case of no
callee-saved registers and a stack frame size bigger than 128 bytes.
Handle that case.
This fixes the following gcc tests with call0 ABI:
gcc.c-torture/execute/stdarg-2.c
gcc.dg/torture/pr55882.c
gcc.dg/torture/pr57569.c
gcc/
2019-09-23 Max Filippov <jcmvbkbc@gmail.com>
Backport from mainline
2019-06-18 Max Filippov <jcmvbkbc@gmail.com>
* config/xtensa/xtensa.c (xtensa_expand_prologue): Add stack
pointer adjustment for the case of no callee-saved registers and
stack frame bigger than 128 bytes.
From-SVN: r276039
Fix PR88751
This patch implements a small improvement for the heuristic in lra
which decides when it has to activate the simpler register allocation
algorithm.
gcc/ChangeLog:
2019-09-20 Andreas Krebbel <krebbel@linux.ibm.com>
Backport from mainline
2019-06-06 Andreas Krebbel <krebbel@linux.ibm.com>
PR rtl-optimization/88751
* ira.c (ira): Use the number of the actually referenced registers
when calculating the threshold.
From-SVN: r275993
This test fails for Darwin m32 because it's scanning for absence
of an instruction that's validly used in PIC code. Fixed, in this
case, by using non-PIC codegen.
2019-09-17 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-06-13 Iain Sandoe <iain@sandoe.co.uk>
* g++.dg/pr71694.C: Use non-PIC codegen for Darwin m32.
From-SVN: r275801
For the test to succeed there needs to be some header that is to be found in
the 'expected' place i.e. <sysroot>/usr/include/. It's important that it is
not the name of a header for which fixincludes have been applied, since such
headers will be found in the gcc include-fixed dir and, in general, reference
additional headers. The dummy sysroot will prevent the additional headers
from being found, resulting in a failed test. The fix is to use a header name
that isn't expected to be present in a real sysroot.
2019-09-16 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-06-24 Iain Sandoe <iain@sandoe.co.uk>
* gcc.dg/cpp/isysroot-1.c: Use <example.h> as the test header.
* gcc.dg/cpp/usr/include/stdio.h: Rename...
* gcc.dg/cpp/usr/include/example.h: ... to this.
From-SVN: r275742
2019-09-15 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/91557
* trans-decl.c (generate_local_decl): Do not warn if the symbol
is artificial.
* trans-types.c (get_formal_from_actual_arglist): Set artificial
attribute on dummy arguments.
2019-09-15 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/91557
* gfortran.dg/warn_unused_dummy_argument_5.f90: New test.
From-SVN: r275737
The syntax-1.mm test line numbering is differnent on 7 (and earlier)
branches, so the test needs a minor update for the PR90709 workaround.
2019-09-15 Iain Sandoe <iain@sandoe.co.uk>
* obj-c++.dg/syntax-error-1.mm: Adjust line number in dg-error.
From-SVN: r275725
Since we cannot parse the current NeXT headers, because of PR90709 and its
dependents, we have a large amount of testsuite noise for Darwin platforms.
In order to restore the usefulness of the testsuite, we are going add headers
without the modern syntax elements that trigger the bug, and use these for
test runs on newer Darwin.
The headers are imported from GNUStep, with some local modifications to make
sure that __BLOCKS__ is honoured as a gate for Apple-style blocks closures.
CF-CFString.h, F-NS*.h are proxy headers that use the installed CoreFoundation
or Foundation headers on systems <= Darwin12 and the GNUStep headers for newer.
Use the CF-CFString.h, F-NS*.h proxy headers where needed in the objective-c
testsuite. Make minor adjustments to tests as required, providing that those
do not alter the test intent.
2019-09-15 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-06-15 Iain Sandoe <iain@sandoe.co.uk>
PR objc/90709
* obj-c++.dg/proto-lossage-7.mm: Use proxy headers.
* obj-c++.dg/strings/const-cfstring-2.mm: Likewise.
* obj-c++.dg/strings/const-cfstring-5.mm: Likewise
* obj-c++.dg/strings/const-str-12.mm: Likewise.
* obj-c++.dg/syntax-error-1.mm: Likewise.
* obj-c++.dg/torture/strings/const-cfstring-1.mm: Likewise.
* obj-c++.dg/torture/strings/const-str-10.mm: Likewise.
* obj-c++.dg/torture/strings/const-str-11.mm: Likewise.
* obj-c++.dg/torture/strings/const-str-9.mm: Likewise.
* obj-c++.dg/cxx-ivars-3.mm: Skip on later Darwin, where the 10.4 API
in no longer supported, also on m64 where there's no meaning to it.
* obj-c++.dg/isa-field-1.mm: Suppress unwanted warning, add comment why.
* obj-c++.dg/objc-gc-3.mm: Skip for Darwin > 16, the API use is an error
there.
* obj-c++.dg/qual-types-1.mm: Prune a spurious l64 warning.
* obj-c++.dg/stubify-1.mm: Tidy up after better compiler warnings.
* obj-c++.dg/stubify-2.mm: Likewise.
* obj-c++.dg/try-catch-1.mm: Likewise.
* obj-c++.dg/try-catch-3.mm: Likewise.
Backport from mainline.
2019-06-15 Iain Sandoe <iain@sandoe.co.uk>
PR objc/90709
* objc.dg/encode-7-next-64bit.m: Use proxy headers.
* objc.dg/image-info.m: Likewise.
* objc.dg/method-6.m: Likewise.
* objc.dg/no-extra-load.m: Likewise.
* objc.dg/objc-foreach-4.m: Likewise.
* objc.dg/objc-foreach-5.m: Likewise.
* objc.dg/proto-lossage-7.m: Likewise.
* objc.dg/strings/const-cfstring-2.m: Likewise.
* objc.dg/strings/const-cfstring-5.m: Likewise.
* objc.dg/strings/const-str-12b.m: Likewise.
* objc.dg/symtab-1.m: Likewise.
* objc.dg/torture/strings/const-cfstring-1.m: Likewise.
* objc.dg/torture/strings/const-str-10.m: Likewise.
* objc.dg/torture/strings/const-str-11.m: Likewise.
* objc.dg/torture/strings/const-str-9.m: Likewise.
* objc.dg/zero-link-1.m: Likewise.
* objc.dg/zero-link-2.m: Likewise.
* objc.dg/zero-link-3.m: Likewise.
* objc.dg/isa-field-1.m: Suppress unwanted warning, add comment why.
* objc.dg/headers.m: XFAIL for Darwin14-19.
* objc.dg/objc-gc-4.m: Skip for Darwin > 16, the API use is an error
there.
Backport from mainline.
2019-06-15 Iain Sandoe <iain@sandoe.co.uk>
PR objc/90709
* objc-obj-c++-shared/CF-CFString.h: New.
* objc-obj-c++-shared/F-NSArray.h: New.
* objc-obj-c++-shared/F-NSAutoreleasePool.h: New.
* objc-obj-c++-shared/F-NSObject.h: New.
* objc-obj-c++-shared/F-NSString.h: New.
* objc-obj-c++-shared/F-NSValue.h: New.
* objc-obj-c++-shared/GNUStep/CoreFoundation/CFArray.h: New.
* objc-obj-c++-shared/GNUStep/CoreFoundation/CFAvailability.h: New.
* objc-obj-c++-shared/GNUStep/CoreFoundation/CFBase.h: New.
* objc-obj-c++-shared/GNUStep/CoreFoundation/CFCharacterSet.h: New.
* objc-obj-c++-shared/GNUStep/CoreFoundation/CFData.h: New.
* objc-obj-c++-shared/GNUStep/CoreFoundation/CFDictionary.h: New.
* objc-obj-c++-shared/GNUStep/CoreFoundation/CFLocale.h: New.
* objc-obj-c++-shared/GNUStep/CoreFoundation/CFString.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSArray.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSAutoreleasePool.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSDate.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSEnumerator.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSGeometry.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSObjCRuntime.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSObject.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSRange.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSString.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSValue.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSZone.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/GNUstep.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/GSBlocks.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/GSConfig.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/GSObjCRuntime.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/GSVersionMacros.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/NSArray+GNUstepBase.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/NSMutableString+GNUstepBase.h:
New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/NSNumber+GNUstepBase.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/NSObject+GNUstepBase.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/NSString+GNUstepBase.h: New.
From-SVN: r275724
Newer OS versions (10.14+) do not provide some of the CRTs that are used
for older ones (e.g. 10.5), and thus link tests that specify targeting
such a revision fail. We retain the testing of the correct defined OS
version number but switch to compile-only testing for these two tests.
2019-09-13 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-06-13 Iain Sandoe <iain@sandoe.co.uk>
* gcc.dg/darwin-minversion-1.c: Use compile rather than link/run.
From-SVN: r275705
Darwin has a .align taking a power of 2 by default, so that some
tests expecting a byte count are failing, fixed by adjusting the
scan-asms. We also avoid the ABI-mandated indirection for common
and PIC extras for m32 (by adjusting compile options).
2019-09-12 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-05-27 Iain Sandoe <iain@sandoe.co.uk>
* gcc.target/i386/pr22076.c: Adjust options to
match codegen expected by the scan-asms.
From-SVN: r275690
2019-09-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/91686
Backport from mainline
* trans-expr.c (gfc_trans_assignment_1): Copy and paste section
handling the rse.pre block from mainline.
2019-09-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/91686
* gfortran.dg/pr91686.f90 : New test.
From-SVN: r275681
PR rtl-optimization/89795
* rtlanal.c (nonzero_bits1) <SUBREG>: Do not propagate results from
inner REGs to paradoxical SUBREGs if WORD_REGISTER_OPERATIONS is set.
From-SVN: r275638
Darwin requires PIC code in order to support PIE; amend the test scan-asms
to match this.
2019-09-10 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-05-26 Iain Sandoe <iain@sandoe.co.uk>
* gcc.target/i386/pr39013-1.c: Adjust scan-asms for PIE to
account for PIC code on Darwin.
* gcc.target/i386/pr39013-2.c: Likewise.
* gcc.target/i386/pr64317.c: Likewise.
From-SVN: r275612
Darwin uses a different spelling for popcnt (popcnt instead of popcntw).
Check for this in the test.
2019-09-10 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-05-25 Iain Sandoe <iain@sandoe.co.uk>
* gcc.target/i386/pr59874-3.c: Use the spelling of popcnt
expected for Darwin.
From-SVN: r275610
The testcase is failing to instrument part of the source because of a bug
in the ordering of static DTORs. It seems unlikely that this is generically
fixable in the toolchain (and given that it's likely to be a dynamic loader
change would not be expected to be applied retrospectively to OS versions
that are out of support). To avoid the testsuite noise, xfail the count lines
that don't match (we can adjust the xfails as/when the upstream bug is fixed).
dejagnu xfails do not seem to work when embedded in a line like:
~Test (void) { .... /* count(1) { xfail ... } */ }
the closing brace seems to confuse the parser. The solution is to exapnd the
text onto three lines.
2019-09-09 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-07-25 Iain Sandoe <iain@sandoe.co.uk>
PR gcov-profile/91087
* g++.dg/gcov/pr16855.C: Xfail the count lines for the DTORs and the
"final" line for the failure summaries. Adjust source layout so that
dejagnu xfail expressions work.
From-SVN: r275547
This test currently fails on Darwin, because the port inlines fn2 for
both PIC (and non-pic for m32). Fixed by adjusting the target condition.
2019-09-09 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-06-11 Iain Sandoe <iain@sandoe.co.uk>
PR testsuite/65364
* gcc.dg/uninit-19.c (fn1): Adjust target condition for Darwin.
(fn2): Likewise.
From-SVN: r275546
Some of the i386.exp tests fail on Darwin because their scan-asm
match strings are too general. In some cases the strings also match
instances in the .file and size directives or in comment output. This
makes the match strings more specific.
2019-09-09 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-05-24 Iain Sandoe <iain@sandoe.co.uk>
* gcc.target/i386/pr66819-3.c: Specifically, check that there is no
call to "bar".
* gcc.target/i386/pr66819-4.c: Likewise.
From-SVN: r275545
A couple of the i386.exp tests fail because the label spelling
used is different between ELF and Mach-O targets. Adjusted here.
2019-09-09 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-05-24 Iain Sandoe <iain@sandoe.co.uk>
* gcc.target/i386/pr67985-2.c: Adjust label checks for
Darwin.
* gcc.target/i386/pr77881.c: Likewise.
From-SVN: r275543
Some of the i386.exp target tests cannot pass on Darwin because
either the port doesn't support a feature, or the ABI demands
sufficiently different codegen that matching the output with
scan-asms would require a different test. Skip these.
2019-09-09 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-05-24 Iain Sandoe <iain@sandoe.co.uk>
* gcc.target/i386/pr70738-7.c: Skip for Darwin.
* gcc.target/i386/pr24414.c: Likewise.
From-SVN: r275542
PR target/87853
* config/i386/emmintrin.h (_mm_cmpeq_epi8): Use casts to __v16qi
instead of __v16qs.
* gcc.target/i386/pr87853.c: New test.
From-SVN: r275516
PR target/91704
* config/i386/avxintrin.h (__v32qs): New typedef.
* config/i386/avx2intrin.h (_mm256_cmpgt_epi8): Use casts to __v32qs
instead of __v32qi.
* gcc.target/i386/pr91704.c: New test.
From-SVN: r275515
We don't have support for -mcmodel={medium, large, kernel} so don't
expect tests for those things to work.
For now mark them as xfail where possible and skip where that isn't.
These changes will be logged onto the PR and therefore can be backed
out when the facility is implemented.
2019-09-08 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-06-01 Iain Sandoe <iain@sandoe.co.uk>
PR target/90698
* gcc.target/i386/pr49866.c: XFAIL for Darwin.
* gcc.target/i386/pr63538.c: Likewise.
* gcc.target/i386/pr61599-1.c: Skip for Darwin.
From-SVN: r275496
These tests had started to XPASS on pic targets where the codegen
is now as expected.
2019-09-08 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-05-23 Iain Sandoe <iain@sandoe.co.uk>
PR rtl-optimisation/64895
* gcc.target/i386/fuse-caller-save-rec.c: Remove XFAILs.
* gcc.target/i386/fuse-caller-save.c: Likewise.
* gcc.target/i386/fuse-caller-save-xmm.c: Adjust tests for
PIC cases, remove XFAILs.
From-SVN: r275495
The c-c++-common tests fail (or XPASS depending on which) on Darwin
because if doesn't emit a.ident marker. For X86 Darwin, this is a
trivial oversight; the assembler supports the directive. We can
therefore use the default target hook there.
2019-09-08 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
* config/i386/darwin.h (TARGET_ASM_OUTPUT_IDENT): New.
From-SVN: r275494
On PPC, Darwin uses the same code as other parts of the port
2019-09-06 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-07-02 Iain Sandoe <iain@sandoe.co.uk>
* system-darwin-ppc.ads: Set Stack_Check_Probes True for
PPC Darwin.
From-SVN: r275471
Gnatlink has code that checks for duplicate '-shared-libgcc’ switches (but not
duplicate ‘static-libgcc’) and also pushes ’static-libgcc' onto the link line for
targets that default to static linking, provided '-shared-libgcc' is not present.
For targets that should use a shared libgcc we need the same process to be
applied (in inverse), in the event that they do not default to providing the
shared flag implicitly.
So this adds the complementary set of tests for the shared case and pushes
the shared flag as needed. As a minor tidy-up there’s no need push duplicates
of the libgcc switch onto the link line when one has already been seen (given by
the user).
The patch does not alter any of the platform defaults for static/shared libgcc,
but it ensures that the intent of the link is explicit.
2019-09-06 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-06-30 Iain Sandoe <iain@sandoe.co.uk>
* gnatlink.adb (Link_Step): Push -shared-libgcc explicitly, when it
is the target default (unless overidden by the static flag).
When the user has put an instance of shared/static-libgcc do not push
a duplicate of this.
From-SVN: r275470
The test can't succeed on 32b powerpc Darwin since the
ABI demands a different result to the tested one. (So XFAIL it).
2019-09-06 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-05-22 Iain Sandoe <iain@sandoe.co.uk>
PR testsuite/27221
* g++.dg/ext/alignof2.C: XFAIL for 32bit Darwin.
From-SVN: r275469
These tests require specific scan-asms in some cases because
of the different codegen for Dawin. Added some explanations
too.
2019-09-06 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-05-21 Iain Sandoe <iain@sandoe.co.uk>
PR testsuite/67958
* gcc.target/i386/pr32219-1.c: Adjust scan-asms for Darwin, comment
the differences.
* gcc.target/i386/pr32219-2.c: Likewise.
* gcc.target/i386/pr32219-3.c: Likewise.
* gcc.target/i386/pr32219-4.c: Likewise.
* gcc.target/i386/pr32219-5.c: Likewise.
* gcc.target/i386/pr32219-6.c: Likewise.
* gcc.target/i386/pr32219-7.c: Likewise.
* gcc.target/i386/pr32219-8.c: Likewise.
From-SVN: r275468
This is a testcase failing because one part of the codegen is
(correctly) generating the scan-asm-not signature.
Fixed by altering the build options.
2019-09-06 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-05-21 Iain Sandoe <iain@sandoe.co.uk>
PR target/63891
* gcc.dg/darwin-weakimport-3.c: Adjust options and explain
the reasons.
From-SVN: r275467
Darwin doesn't emit a .file directive by default
and one of the scan-asm hits for ELF targets comes from
this directive. Adjust for Darwin and explain.
2019-09-06 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-05-20 Iain Sandoe <iain@sandoe.co.uk>
PR testsuite/58321
* gcc.target/i386/memcpy-strategy-3.c: Adjust count for Darwin and
add a comment as to the reason for the difference.
* gcc.target/i386/memset-strategy-1.c: Likewise.
From-SVN: r275466
This fixes a number of testcases that expect use of .p2align, which
was somehow omitted from the darwin X86 port (but is available in all
assemblers used with it).
2019-09-06 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-05-31 Iain Sandoe <iain@sandoe.co.uk>
* config/i386/darwin.h (ASM_OUTPUT_MAX_SKIP_ALIGN): New.
From-SVN: r275465
The test fails if the assembler doesn't support stabs.
2019-09-05 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-07-13 Iain Sandoe <iain@sandoe.co.uk>
* gcc.target/powerpc/stabs-attrib-vect-darwin.c: Require stabs
support.
From-SVN: r275440
The -mno-speculate-indirect-jumps functionality is not implemented for
Darwin.
2019-09-05 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-06-24 Iain Sandoe <iain@sandoe.co.uk>
* gcc.target/powerpc/safe-indirect-jump-1.c: Skip for Darwin.
* gcc.target/powerpc/safe-indirect-jump-7.c: Likewise.
From-SVN: r275439
This cannot pass for current Darwin, since it requires VSX and we
don't have any hardware supporting that. Add a dg-requires clause
for this.
2019-09-05 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-06-23 Iain Sandoe <iain@sandoe.co.uk>
* gcc.target/powerpc/builtins-2.c: Require VSX hardware support.
From-SVN: r275438
Darwin (unlike most of the members of the PowerPC port family)
defaults to signed chars, so the test was failing to compile with
a "mismatched parameters" error.
2019-09-05 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-06-23 Iain Sandoe <iain@sandoe.co.uk>
* gcc.target/powerpc/pr80125.c (foo): Use an unsigned char
vector explicitly for the vec_perm.
From-SVN: r275437
Firstly, we adjust the test conditions to use non-PIC code for Darwin.
Secondly, we have to account for out-of-line GPR restores which gives
a false positive on one of the scan-assembler-not. Lastly, we make the
test a bit more specific for Darwin - that it looks for absence of
branches to local labels.
2019-09-05 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-06-23 Iain Sandoe <iain@sandoe.co.uk>
* gcc.target/powerpc/pr71785.c: For Darwin, make test non-PIC,
expect the out-of-line GPR restore, and test specifically for
absence of branches to local labels.
From-SVN: r275436
The two tests use decimal floating point, add the relevant dg-requires
so that they are unsupported on platforms without DFP.
2019-09-05 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-06-22 Iain Sandoe <iain@sandoe.co.uk>
* gcc.target/powerpc/pr64205.c: Require effective target dfp.
* gcc.target/powerpc/pr79909.c: Likewise.
From-SVN: r275435
This test is failing because of a pedantic warning that is unrelated to the
purpose of the test. Fixed by suppressing that warning.
2019-09-05 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-06-22 Iain Sandoe <iain@sandoe.co.uk>
* gcc.target/powerpc/darwin-bool-1.c: Suppress the pedantic
warning about _Bool.
From-SVN: r275434
This test needs the cpu and machine asserts to be implemented
which hadn't been done for PPC Darwin. We also need to emit
__PPC__ for 32/64b and __PPC64__, __powerpc64__ (64bit) as per
the other members of the PowerPC port.
2019-08-27 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-08-18 Iain Sandoe <iain@sandoe.co.uk>
* config/rs6000/darwin.h (TARGET_OS_CPP_BUILTINS): Add asserts
for cpu and machine. Factor 64/32b builtins.
2019-09-05 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-08-18 Iain Sandoe <iain@sandoe.co.uk>
* config/rs6000/darwin.h (TARGET_OS_CPP_BUILTINS): Add asserts
for cpu and machine. Factor 64/32b builtins.
Backport from mainline
2019-06-23 Iain Sandoe <iain@sandoe.co.uk>
* config/rs6000/darwin.h: (__PPC__, __PPC64__): New.
From-SVN: r275433
When we are parsing a source file, the very first token might
be a PRAGMA_GCC_PCH_PREPROCESS. This indicates that we are going
read in a PCH file (named as the value of the pragma). If we don't
see this pragma, then we know that it's OK to release any resources
that the host might have set aside for the PCH file.
There is a thinko in the current implementation, in that the decision
to release resources is happening unconditionally right after the first
token is extracted but before it's been checked or acted upon.
This leads to the pch bug on Darwin, because we actually do release
resources - which are subsequently (reasonably) assumed to be available
when reading a PCH file. We then get random crashes or hangs depending
on the interaction between unmmap and malloc.
The bug is present everywhere but doesn't show on (say) Linux, since
the release of PCH resources is a NOP there.
This effects all the c-family front ends, because they all use
c_lex_with_flags () to implement this.
The solution is to check for the PRAGMA_GCC_PCH_PREPROCESS and only call
c_common_no_more_pch () when that is not the first token.
A secondary effect of the collection is that the name of the PCH file
can be collected during the ggc_pch_read() reset of state. Therefore
we should issue any diagnostic that might name the file before the
collections are triggered.
gcc/
2019-09-05 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
PR pch/61250
* ggc-page.c (ggc_pch_read): Read the ggc_pch_ondisk structure
and issue any diagnostics needed before collecting the pre-PCH
state.
gcc/c-family/
2019-09-05 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
PR pch/61250
* c-lex.c (c_lex_with_flags): Don't call
c_common_no_more_pch () from here.
gcc/c
2019-09-05 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
PR pch/61250
* c-parser.c (c_parse_file): Call c_common_no_more_pch ()
after determining that the first token is not
PRAGMA_GCC_PCH_PREPROCESS.
gcc/cp/
2019-09-05 Iain Sandoe <iain@sandoe.co.uk>
Backported from mainline
2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
PR pch/61250
* parser.c (cp_parser_initial_pragma): Call c_common_no_more_pch ()
after determining that the first token is not
PRAGMA_GCC_PCH_PREPROCESS.
From-SVN: r275431
Without this the tests fail to build.
2019-09-05 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-05-10 Iain Sandoe <iain@sandoe.co.uk>
* gcc.target/x86_64/abi/avx512f/abi-avx512f.exp: Darwin is
now tested.
* gcc.target/x86_64/abi/avx512f/asm-support-darwin.s: New.
From-SVN: r275430
This is about 32/64b host and multilib support across the range of Darwin
systems.
Prior to Darwin8 (OS X 10.4), the toolchains support only PowerPC and only 32b.
On Darwin8 it is possible to target a 64b multilib, but with support limited
to a few of the main libraries on the system (not a recommended configuration).
From Darwin9 to Darwin17 (OSX 10.5 to 10.13) it is possible to have either
32 or 64b hosted toolchains, with support for a 64 or 32b multilib respectively.
On Darwin9 the kernel is 32b, but with support for 64b executables, so it's
conventional to build a 32b host toolchain supporting a 64b multilib. However
this is not enforced (merely a convention).
There is also some platform hardware supporting Darwin10/11 which is only 32b
and for which the same situation applies. However, from Darwin10 to Darwin17,
the majority of platform hardware supports a 64b kernel and it's conventional
to build a 64b host toolchain with support for a 32b multilib.
On/from Darwin18 (OS X 10.14), the development headers (in the SDK) no longer
expose the interfaces for the 32b multilib support (although sufficient runtime
support remains installed that the testsuite can be run for a 32b multilib).
The PR is raised against this latter situation since the absence of exposed
interfaces causes a 'default' bootstrap fail regardless of the availability of
the runtimes. Given the number of permutations, I felt it warranted a general
solution, especially since the current scheme of target headers and t-make
fragments has become somewhat messy.
The changes here enforce the single 32b PowerPC multilib for Darwin < 8 and the
single X86 64b multilib for Darwin >= 18. This means that there is no longer
any need to configure Darwin18+ '--disable-multilib', but also that if you want
to use the ability to continue to test the compiler's 32b multilib there, you
need to make a configuration targeting an earlier OS version (and using the
SDK from that).
2019-09-05 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-07-24 Iain Sandoe <iain@sandoe.co.uk>
PR bootstrap/87030
* config/i386/darwin.h (REAL_LIBGCC_SPEC): Revert change from r273749.
PR bootstrap/87030
* config/i386/darwin.h (REAL_LIBGCC_SPEC): Move from here...
* config/i386/darwin32-biarch.h .. to here.
* config/i386/darwin64-biarch.h: Adjust comments.
* config/rs6000/darwin32-biarch.h: Likewise.
* config/rs6000/darwin64-biarch.h: Likewise.
* config.gcc: Missed commit from r273746
(*-*-darwin*): Don't include CPU t-darwin here.
(i[34567]86-*-darwin*): Adjust to use biarch files. Produce
an error message if i686-darwin configuration is attempted for
Darwin >= 18.
Backport from mainline
2019-07-23 Iain Sandoe <iain@sandoe.co.uk>
PR bootstrap/87030
* config.gcc (*-*-darwin*): Don't include CPU t-darwin here.
(i[34567]86-*-darwin*): Adjust to use biarch files. Produce
an error message if i686-darwin configuration is attempted for
Darwin >= 18.
(x86_64-*-darwin*): Switch to single multilib for Darwin >= 18.
(powerpc-*-darwin*): Use biarch files where needed.
(powerpc64-*-darwin*): Likewise.
* config/i386/darwin.h (REAL_LIBGCC_SPEC): Move to new biarch file.
(DARWIN_ARCH_SPEC, DARWIN_SUBARCH_SPEC): Revise for default single
arch case.
* config/i386/darwin32-biarch.h: New.
* config/i386/darwin64.h: Rename.
* gcc/config/i386/darwin64-biarch.h: To this.
* config/i386/t-darwin: Rename.
* gcc/config/i386/t-darwin32-biarch: To this.
* config/i386/t-darwin64: Rename.
* gcc/config/i386/t-darwin64-biarch: To this.
* config/rs6000/darwin32-biarch.h: New.
* config/rs6000/darwin64.h: Rename.
* config/rs6000/darwin64-biarch.h: To this.
(DARWIN_ARCH_SPEC, DARWIN_SUBARCH_SPEC): Revise for default single
arch case.
* config/rs6000/t-darwin8: Rename.
* config/rs6000/t-darwin32-biarch: To this.
* config/rs6000/t-darwin64 Rename.
* config/rs6000/t-darwin64-biarch: To this.
From-SVN: r275429
This is primarily about fixing a number of testsuite fails, it
implements the parsing of 'instancetype' but doesn't alter the
code gen (relative to using id in the same position). It is
part of the work-arounds for PR90709.
gcc/objc/
2019-09-05 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-05-18 Iain Sandoe <iain@sandoe.co.uk>
* objc/objc-act.h (OCTI_INSTANCE_TYPE, OCTI_INSTANCETYPE_NAME): New.
(objc_global_trees): Add instance type and name.
(INSTANCE_TYPEDEF_NAME): New.
* objc/objc-act.c (synth_module_prologue): Build decls for
objc_instancetype_type and objc_instancetype_name.
gcc/testsuite/
2019-09-05 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-05-18 Iain Sandoe <iain@sandoe.co.uk>
* objc.dg/instancetype-0.m: New.
From-SVN: r275428
2019-09-05 Richard Biener <rguenther@suse.de>
* lto-streamer.h (LTO_minor_version): Bump.
Backport from mainline
2019-05-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/90328
* tree-data-ref.h (dr_may_alias_p): Pass in the actual loop nest.
* tree-data-ref.c (dr_may_alias_p): Check whether the clique
is valid in the loop nest before using it.
(initialize_data_dependence_relation): Adjust.
* graphite-scop-detection.c (build_alias_set): Pass the SCOP enclosing
loop as loop-nest to dr_may_alias_p.
* gcc.dg/torture/pr90328.c: New testcase.
2019-03-08 Richard Biener <rguenther@suse.de>
PR middle-end/89578
* cfgloop.h (struct loop): Add owned_clique field.
* cfgloopmanip.c (copy_loop_info): Copy it.
* tree-cfg.c (gimple_duplicate_bb): Do not remap owned_clique
cliques.
* tree-inline.c (copy_loops): Remap owned_clique.
* lto-streamer-in.c (input_cfg): Stream owned_clique.
* lto-streamer-out.c (output_cfg): Likewise.
2019-02-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/87609
* tree-cfg.c (gimple_duplicate_bb): Only remap inlined cliques.
2019-02-22 Richard Biener <rguenther@suse.de>
PR middle-end/87609
* cfghooks.h (dependence_hash): New typedef.
(struct copy_bb_data): New type.
(cfg_hooks::duplicate_block): Adjust to take a copy_bb_data argument.
(duplicate_block): Likewise.
* cfghooks.c (duplicate_block): Pass down copy_bb_data.
(copy_bbs): Create and pass down copy_bb_data.
* cfgrtl.c (cfg_layout_duplicate_bb): Adjust.
(rtl_duplicate_bb): Likewise.
* tree-cfg.c (gimple_duplicate_bb): If the copy_bb_data arg is not NULL
remap dependence info.
* gcc.dg/torture/restrict-7.c: New testcase.
2019-02-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/87609
* tree-core.h (tree_base): Document special clique values.
* tree-inline.c (remap_dependence_clique): Do not use the
special clique value of one.
(maybe_set_dependence_info): Use clique one.
(clear_dependence_clique): New callback.
(compute_dependence_clique): Clear clique one from all refs
before assigning it (again).
From-SVN: r275405
Final check on PCI options; for Darwin these are not dependent on the PIE
ones, although PIE does require PIC to support it. Specifically, for Darwin,
'-fPIC -fno-PIE' should result in the same as '-fno-PIE -fPIC'.
This is a workaround for the situation in which a 'stock-built' GCC is
unable to bootstrap m32 Darwin unless it's done '-mdynamic-no-pic'. So
this fixes a bootstrap fail in that case.
2019-09-04 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-07-07 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c (darwin_override_options): Make a final check on PIC
options.
From-SVN: r275386
Fix wrong code.
Symbol stubs are needed only for m32 PPC, code and that is handled in
rs6000.c.
Symbol stubs should never have been generated for any X86 kernel-mode
case.
2019-09-04 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-07-07 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c (darwin_override_options): Don't jam symbol stubs
on for kernel code.
From-SVN: r275385
Fix wrong codegen; the 'native' tools do no emit the longcall in this
position.
2019-09-04 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-06-27 Iain Sandoe <iain@sandoe.co.uk>
* config/rs6000/rs6000.c (darwin_rs6000_override_options): Do not
use longcall for 64b code.
From-SVN: r275384
Fix bootstrap fail when building for 10.4.
When libgcc is built on Darwin, it is usually built for the earliest potential
target (Darwin8, 10.4). Build for that revision default to assuming that the
processor might be G3 (without vector ops) and there is an outlined function
used for save/restore that checks whether the processor is G3 or G4+ at run-
time. However, the unwinder itself needs to be built with the assumption of
vector usage so that the relevant outlined functions are called.
2019-09-04 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-06-06 Iain Sandoe <iain@sandoe.co.uk>
* config/rs6000/t-darwin: Ensure that the unwinder is built with
altivec enabled.
From-SVN: r275383
Backport Improve processing of macosx-version-min=
For PR target/63810 some improvements were made in the parsing of
the version string at the point it's used to define the built-in
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__. This is fine, but the
specs processing also uses the version, and specs version-compare
doesn't like leading zeros on components. This means that while we
succeed in processing -mmacosx-version-min=010.00002.000099 on compile
lines, it fails for any other line that uses the value as part of a spec
(in particular, link lines fail).
To fix this, we need to apply a bit of clean-up to the version that's
presented to the driver, and push that back into the command line opts.
The value can come from four places:
1. User-entered on the command line
2. User-entered as MACOSX_DEPLOYMENT_TARGET= environment var.
3. Absent those two
3a For self-hosting systems, look-up from the kernel
3b For cross-compilers, as a default supplied at configure time.
We apply the clean-up to all 4 (although it shouldn't really be needed
for the cases under 3).
We also supply a test-case that adapts to the target-version of the
system, so that the link requirements are met by the SDK in use (if you
try to link i686-darwin9 on an x86-64-darwin18 SDK, it will fail).
gcc/
2019-09-04 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-06-19 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin-driver.c (darwin_driver_init): Fix off-by-one errors
in computing the number of options to be moved.
Backport from mainline
2019-06-13 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin-driver.c (validate_macosx_version_min): New.
(darwin_default_min_version): Cleanup and validate supplied version.
(darwin_driver_init): Likewise and push cleaned version into opts.
gcc/testsuite/
2019-09-04 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-06-13 Iain Sandoe <iain@sandoe.co.uk>
* gcc.dg/darwin-minversion-link.c: New test.
From-SVN: r275382
There is no reasonable chance that the SDKs in question will be re-
issued, so the only viable solution is a fixincludes.
2019-09-04 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-08-18 C.G. Dogan <gcc+cgdogan.00@gmail.com>
Iain Sandoe <iain@sandoe.co.uk>
PR target/83531
* inclhack.def (darwin_api_availability): New; strip leading
underscores from API_XXXX defines.
* fixincl.x: Regenerate.
* tests/base/os/availability.h: New file.
From-SVN: r275381
Darwin has had long long functions for some considerable time and these are
exposed in Darwin8 and Darwin11+ headers. However, for some reason it was
elected to hide them behind __STRICT_ANSI__ and __STDC_VERSION__ on Darwin9
and Darwin10. This is a problem for G++/libstdc++ that expects the functions
to be available for strict ansi (-std=c++14, for example) and without
defining __STDC_VERSION__. The fix here follows the pattern used in
Darwin11+ headers where the functions may be explicitly hidden by defining
__DARWIN_NO_LONG_LONG.
2019-09-04 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-06-21 Iain Sandoe <iain@sandoe.co.uk>
* inclhack.def: Replace the complex test using __STRICT_ANSI__ and
__STDC_VERSION__ with a test using __DARWIN_NO_LONG_LONG.
Ensure that the top level math.h uses <> to wrap included headers
rather than "".
* fixincl.x: Regenerated.
* tests/base/architecture/ppc/math.h: Update test to include the
__DARWIN_NO_LONG_LONG case.
From-SVN: r275379
There are two issues with the Darwin14 (SDK) headers in which unguarded
advanced syntax elements causes any code including these headers to fail.
This fixes build fails on Darwin14 systems.
2019-09-04 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-06-21 Iain Sandoe <iain@sandoe.co.uk>
* inclhack.def: Guard __has_attribute and __has_extension in
os/base.h.
Guard Apple blocks syntax in dispatch/object.h.
* fixincl.x: Regenerate.
* tests/base/dispatch/object.h: New file.
* tests/base/os/base.h: New file.
From-SVN: r275378
2019-09-04 Richard Biener <rguenther@suse.de>
Backport from mainline
2019-03-26 Bin Cheng <bin.cheng@linux.alibaba.com>
PR tree-optimization/81740
* tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
In case of outer loop vectorization, check for backward dependence
at the inner loop if outer loop dependence is reversed.
* gcc.dg/vect/pr81740-1.c: New testcase.
* gcc.dg/vect/pr81740-2.c: Likewise.
From-SVN: r275372
2019-09-04 Richard Biener <rguenther@suse.de>
Backport from mainline
2018-11-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/88149
* tree-vect-slp.c (vect_slp_analyze_node_operations): Detect
the case where there are two different def types for the
same operand at different operand position in the same stmt.
* g++.dg/torture/pr88149.C: New testcase.
From-SVN: r275370
2019-09-04 Richard Biener <rguenther@suse.de>
Backport from mainline
2019-04-09 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-data-refs.c (vect_get_smallest_scalar_type): Always
use gimple_expr_type for load and store calls. Skip over the
condition argument in a conditional internal function.
Protect use of TREE_INT_CST_LOW.
2019-04-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/90006
* tree-vect-data-refs.c (vect_get_smallest_scalar_type): Handle
calls like lrint.
* gcc.dg/vect/bb-slp-pr90006.c: New testcase.
2019-03-14 Richard Biener <rguenther@suse.de>
PR middle-end/89698
* fold-const.c (operand_equal_p): For INDIRECT_REF check
that the access types are similar.
* g++.dg/torture/pr89698.C: New testcase.
2019-01-18 Richard Biener <rguenther@suse.de>
PR tree-optimization/88903
* tree-vect-stmts.c (vectorizable_shift): Verify we see all
scalar stmts a SLP shift amount is composed of when detecting
shifts by scalars.
* gcc.dg/vect/pr88903-1.c: New testcase.
* gcc.dg/vect/pr88903-2.c: Likewise.
2018-12-11 Richard Biener <rguenther@suse.de>
PR middle-end/88448
PR middle-end/88415
* tree-complex.c (update_complex_assignment): Properly transfer
or clean EH info around gimple_assign_set_rhs_with_ops.
* gcc.dg/gomp/pr88415.c: New testcase.
2018-11-15 Richard Biener <rguenther@suse.de>
PR tree-optimization/88030
* tree-complex.c (need_eh_cleanup): New global.
(update_complex_assignment): Mark blocks that need EH update.
(expand_complex_comparison): Likewise.
(tree_lower_complex): Allocate and deallocate need_eh_cleanup,
perform EH cleanup and schedule CFG cleanup if that did anything.
* gcc.dg/tsan/pr88030.c: New testcase.
2018-11-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/87929
* tree-complex.c (expand_complex_comparison): Clean EH.
* gcc.dg/pr87929.c: New testcase.
2017-07-25 Eric Botcazou <ebotcazou@adacore.com>
* gimple.c (gimple_assign_set_rhs_with_ops): Do not ask gsi_replace
to update EH info here.
From-SVN: r275366
Darwin is able to use two runtimes for objective-c; the
default is its native NeXT runtime, but also it can build
code using the gnu-runtime. In order to do this, we have to
be able to find the gnu-runtime headers (which are installed
into the compiler's tree).
The process to do this was erroneously prepending the sysroot
to this when a sysroot is in force. The gnu-runtime headers have
never been installed in a Darwin (MacOS) SDK so we must make
sure that they are found local to the compiler.
2019-09-03 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-05-18 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin-c.c (darwin_register_objc_includes): Do not
prepend the sysroot when building gnu-runtime header search
paths.
From-SVN: r275350
We were emitting the directives to switch, but not recording the change
in varasm. This means that subsequent switches might be omitted (since
varasm incorrectly concludes that the wrong section is current).
2019-09-03 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-05-18 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c (darwin_file_end): Use switch_to_section ()
instead of direct output of the asm.
From-SVN: r275349
The asm file fails to build if we use a modern assembler
which checks that the machine is consistent with the
filetype. Fixed by adjusting in a similar manner to
other assembler.
2019-09-03 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-05-12 Iain Sandoe <iain@sandoe.co.uk>
* config/rs6000/darwin-vecsave.S: Set .machine appropriately.
From-SVN: r275348
These had been changed in gcc/gcc.c without being synchronised
to config/darwin.h leading to some fails.
2019-09-03 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.h (LINK_COMMAND_SPEC_A): Update lto options
to match gcc/gcc.c.
From-SVN: r275347
2019-09-02 Richard Biener <rguenther@suse.de>
Backport from mainline
2019-03-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/89710
* tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Use
safe_dyn_cast.
* gcc.dg/torture/pr89710.c: New testcase.
2019-03-14 Richard Biener <rguenther@suse.de>
PR middle-end/89572
* tree-scalar-evolution.c (get_loop_exit_condition): Use
safe_dyn_cast.
* tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables):
Use gimple_location_safe.
* gcc.dg/torture/pr89572.c: New testcase.
2019-02-18 Richard Biener <rguenther@suse.de>
PR tree-optimization/89296
* tree-ssa-loop-ch.c (ch_base::copy_headers): Restrict setting
of no-warning flag to cases that might emit the bogus warning.
* gcc.dg/uninit-pr89296.c: New testcase.
2019-02-21 Richard Biener <rguenther@suse.de>
PR middle-end/89392
cp/
* vtable-class-hierarchy.c (vtv_generate_init_routine): Do not
make symtab process new functions here.
2019-01-31 Richard Biener <rguenther@suse.de>
PR tree-optimization/89135
* tree-ssa-phiprop.c (pass_phiprop::execute): Skip blocks
with abnormal preds.
* gcc.dg/torture/pr89135.c: New testcase.
From-SVN: r275319
2019-09-02 Richard Biener <rguenther@suse.de>
Backport from mainline
2019-07-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/91200
* tree-ssa-phiopt.c (cond_store_replacement): Check we have
no PHI nodes in middle-bb.
* gcc.dg/torture/pr91200.c: New testcase.
2019-07-15 Richard Biener <rguenther@suse.de>
PR middle-end/91162
* tree-cfg.c (move_block_to_fn): When releasing a virtual PHI
node make sure to replace all uses with something valid.
* gcc.dg/autopar/pr91162.c: New testcase.
2019-07-11 Richard Biener <rguenther@suse.de>
PR middle-end/91131
* gimplify.c (gimplify_compound_literal_expr): Force a temporary
when the object is volatile and we have not cleared it even though
there are no nonzero elements.
* gcc.target/i386/pr91131.c: New testcase.
2019-07-10 Richard Biener <rguenther@suse.de>
PR tree-optimization/91126
* tree-ssa-sccvn.c (n_walk_cb_data::push_partial_def): Adjust
native encoding offset for BYTES_BIG_ENDIAN.
(vn_reference_lookup_3): Likewise.
* gcc.dg/torture/pr91126.c: New testcase.
2019-07-10 Richard Biener <rguenther@suse.de>
PR tree-optimization/91126
* tree-ssa-sccvn.c (vn_reference_lookup_3): Adjust
native encoding offset for BYTES_BIG_ENDIAN.
* gcc.dg/torture/pr91126.c: New testcase.
2019-04-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/90278
* tree-ssa-forwprop.c (pass_forwprop::execute): Transfer/clean
EH on comparison simplification.
* gcc.dg/torture/pr90278.c: New testcase.
2019-04-11 Richard Biener <rguenther@suse.de>
PR tree-optimization/90020
* tree-ssa-sccvn.c (vn_reference_may_trap): New function.
* tree-ssa-sccvn.h (vn_reference_may_trap): Declare.
* tree-ssa-pre.c (compute_avail): Use it to not put
possibly trapping references after a call that might not
return into EXP_GEN.
* gcse.c (compute_hash_table_work): Do not elide
marking a block containing a call if the call might not
return.
* gcc.dg/torture/pr90020.c: New testcase.
From-SVN: r275317
* testsuite/20_util/unique_ptr/assign/48635_neg.cc: Replace dg-error
with dg-prune-output for enable_if failure.
* testsuite/20_util/unique_ptr/cons/cv_qual_neg.cc: Add
dg-prune-output for enable_if failure.
Backport from mainline
2019-07-31 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/91308
* include/bits/unique_ptr.h (unique_ptr::__safe_conversion_up): Remove
constraints on deleter that should only apply to the constructor.
(unique_ptr<T[], D>::__safe_conversion_up): Likewise.
(unique_ptr<T[], D>::unique_ptr(unique_ptr<U, D>&&)): Restore
constraints on deleter here.
* testsuite/20_util/unique_ptr/assign/91308.cc: New test.
From-SVN: r275311
The recursive_init_error class is defined in a header, with an inline
constructor, but the definition of the vtable and destructor are not
exported from the shared library. With -fkeep-inline-functions the
constructor gets emitted in user code, and requires the (non-exported)
vtable. This fails to link.
As far as I can tell, the recursive_init_error class definition was
moved into <cxxabi.h> so it could be documented with Doxygen, not for
any technical reason. But now it's there (and documented), somebody
could be relying on it, by catching that type and possibly performing
derived-to-base conversions to the std::exception base class. So the
conservative fix is to leave the class definition in the header but make
the constructor non-inline. This still allows the type to be caught and
still defines its base class.
Backport from mainline
2019-07-29 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/51333
* libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define
constructor inline.
* libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define
constructor.
* testsuite/18_support/51333.cc: New test.
From-SVN: r275309
Backport from mainline
2019-06-07 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/90770
* src/Makefile.am (stamp-debug): Also test for missing makefile.
* src/Makefile.in: Regenerate.
From-SVN: r275308
Backport from mainline
2019-05-21 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
Backport from mainline
2019-06-20 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
C++17 working draft.
Backport from mainline
2019-05-23 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/status_cxx2017.xml: Add feature test macro for
P0040R3.
* doc/html/*: Regenerate.
From-SVN: r275307
Backport from mainline
2019-07-18 Bin Cheng <bin.linux@linux.alibaba.com>
PR tree-optimization/91137
* tree-ssa-loop-ivopts.c (struct ivopts_data): New field.
(tree_ssa_iv_optimize_init, alloc_iv, tree_ssa_iv_optimize_finalize):
Init, use and fini the above new field.
(determine_base_object_1): New function.
(determine_base_object): Reimplement using walk_tree.
2019-07-18 Bin Cheng <bin.linux@linux.alibaba.com>
PR tree-optimization/91137
* gcc.c-torture/execute/pr91137.c: New test.
From-SVN: r275304
Apparently I didn't properly test the testcase backport to GCC 8 and
GCC 7. This makes it not fail there.
PR target/91481
* gcc.target/powerpc/darn-3.c: Fix testcase.
From-SVN: r275245
2019-08-30 Richard Biener <rguenther@suse.de>
Backport from mainline
2019-05-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/90637
* tree-ssa-sink.c (statement_sink_location): Honor the
computed sink location for single-uses.
* gcc.dg/gomp/pr90637.c: New testcase.
2019-06-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/90930
* tree-ssa-reassoc.c (rewrite_expr_tree_parallel): Set visited
flag on new stmts to avoid re-processing them.
2019-05-15 Richard Biener <rguenther@suse.de>
PR c/90474
* c-common.c (c_common_mark_addressable_vec): Also mark
a COMPOUND_LITERAL_EXPR_DECL addressable similar to
c_mark_addressable.
2019-04-25 Richard Biener <rguenther@suse.de>
PR middle-end/90194
* match.pd: Add pattern to simplify view-conversion of an
empty constructor.
* g++.dg/torture/pr90194.C: New testcase.
2019-04-24 Richard Biener <rguenther@suse.de>
PR middle-end/90213
* gimple-fold.c (fold_const_aggregate_ref_1): Do multiplication
by size and BITS_PER_UNIT on poly-wide-ints.
2019-04-15 Richard Biener <rguenther@suse.de>
PR tree-optimization/90071
* tree-ssa-reassoc.c (init_range_entry): Do not pick up
abnormal operands from def stmts.
* gcc.dg/torture/pr90071.c: New testcase.
2019-03-13 Richard Biener <rguenther@suse.de>
PR middle-end/89677
* tree-scalar-evolution.c (simplify_peeled_chrec): Do not
throw FP expressions at tree-affine.
* gcc.dg/torture/pr89677.c: New testcase.
From-SVN: r275208
Backport from trunk
2019-08-22 Segher Boessenkool <segher@kernel.crashing.org>
PR target/91481
* config/rs6000/rs6000.md (unspec): Delete UNSPEC_DARN, UNSPEC_DARN_32,
and UNSPEC_DARN_RAW.
(unspecv): New enumerator values UNSPECV_DARN, UNSPECV_DARN_32, and
UNSPECV_DARN_RAW.
(darn_32): Use an unspec_volatile, and UNSPECV_DARN_32.
(darn_raw): Use an unspec_volatile, and UNSPECV_DARN_RAW.
(darn): Use an unspec_volatile, and UNSPECV_DARN.
From-SVN: r275185
Backported from mainline
2019-07-30 Jakub Jelinek <jakub@redhat.com>
PR target/91150
* config/i386/i386.c (expand_vec_perm_blend): Change mask type
from unsigned to unsigned HOST_WIDE_INT. For E_V64QImode cast
comparison to unsigned HOST_WIDE_INT before shifting it left.
* gcc.target/i386/avx512bw-pr91150.c: New test.
From-SVN: r275164
Backported from mainline
2019-07-04 Jakub Jelinek <jakub@redhat.com>
PR middle-end/78884
* gimplify.c (struct gimplify_omp_ctx): Add add_safelen1 member.
(gimplify_bind_expr): If seeing TREE_ADDRESSABLE VLA inside of simd
loop body, set ctx->add_safelen1 instead of making it GOVD_PRIVATE.
(gimplify_adjust_omp_clauses): Add safelen (1) clause if
ctx->add_safelen1 is set.
* gcc.dg/gomp/pr78884.c: New test.
From-SVN: r275163
Backported from mainline
2019-07-04 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/90756
* explow.c (promote_ssa_mode): Always use TYPE_MODE, don't bypass it
for VECTOR_TYPE_P.
* gcc.dg/pr90756.c: New test.
From-SVN: r275162
Backported from mainline
2019-06-25 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/90954
* c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
to SAVE_EXPR in first operand of a COMPOUND_EXPR.
* c-c++-common/gomp/pr90954.c: New test.
From-SVN: r275161
Backported from mainline
2019-06-12 Jakub Jelinek <jakub@redhat.com>
PR c/90760
* symtab.c (symtab_node::set_section): Allow being called on aliases
as long as they aren't analyzed yet.
* gcc.dg/pr90760.c: New test.
From-SVN: r275159
Backported from mainline
2019-05-24 Jakub Jelinek <jakub@redhat.com>
PR libgomp/90585
* plugin/plugin-hsa.c (print_kernel_dispatch, run_kernel): Use PRIu64
macro instead of "lu".
(release_kernel_dispatch): Likewise. Cast shadow->debug to uintptr_t
before casting to void *.
From-SVN: r275158
Backported from mainline
2019-04-19 Jakub Jelinek <jakub@redhat.com>
PR middle-end/90139
* tree-outof-ssa.c (get_temp_reg): If reg_mode is BLKmode, return
assign_temp instead of gen_reg_rtx.
* gcc.c-torture/compile/pr90139.c: New test.
From-SVN: r275156
Backported from mainline
2019-06-11 Jakub Jelinek <jakub@redhat.com>
PR target/90811
* config/nvptx/nvptx.c (nvptx_output_softstack_switch): Use and.b%d
instead of and.u%d.
* testsuite/libgomp.c/pr90811.c: New test.
From-SVN: r275155
Backported from mainline
2019-05-30 Jakub Jelinek <jakub@redhat.com>
* lang.opt (ftail-call-workaround=): Fix a typo - lenghts to lengths.
From-SVN: r275154
Backported from mainline
2019-05-29 Jakub Jelinek <jakub@redhat.com>
PR fortran/90329
* lto-streamer.h (LTO_minor_version): Bump to 1.
Backported from mainline
2019-05-16 Jakub Jelinek <jakub@redhat.com>
PR fortran/90329
* tree-core.h (struct tree_decl_common): Document
decl_nonshareable_flag for PARM_DECLs.
* tree.h (DECL_HIDDEN_STRING_LENGTH): Define.
* calls.c (expand_call): Don't try tail call if caller
has any DECL_HIDDEN_STRING_LENGTH PARM_DECLs that are or might be
passed on the stack and callee needs to pass any arguments on the
stack.
* tree-streamer-in.c (unpack_ts_decl_common_value_fields): Use
else if instead of series of mutually exclusive ifs. Handle
DECL_HIDDEN_STRING_LENGTH for PARM_DECLs.
* tree-streamer-out.c (pack_ts_decl_common_value_fields): Likewise.
* lang.opt (fbroken-callers): Remove.
(ftail-call-workaround, ftail-call-workaround=): New options.
* gfortran.h (struct gfc_namespace): Add implicit_interface_calls.
* interface.c (gfc_procedure_use): Set implicit_interface_calls
for calls to implicit interface procedures.
* trans-decl.c (create_function_arglist): Use flag_tail_call_workaround
instead of flag_broken_callers. If it is not 2, also require
sym->ns->implicit_interface_calls.
* invoke.texi (fbroken-callers): Remove documentation.
(ftail-call-workaround, ftail-call-workaround=): Document.
2019-05-19 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/90329
* invoke.texi: Document -fbroken-callers.
* lang.opt: Add -fbroken-callers.
* trans-decl.c (create_function_arglist): Only set
DECL_HIDDEN_STRING_LENGTH if flag_broken_callers is set.
2019-05-16 Jakub Jelinek <jakub@redhat.com>
PR fortran/90329
* trans-decl.c (create_function_arglist): Set
DECL_HIDDEN_STRING_LENGTH on hidden string length PARM_DECLs if
len is constant.
From-SVN: r275153
Backported from mainline
2019-04-24 Jakub Jelinek <jakub@redhat.com>
PR target/90187
* config/i386/i386.c (ix86_expand_sse_fp_minmax): Force if_true into
a register if both if_true and if_false are MEMs.
* g++.dg/opt/pr90187.C: New test.
From-SVN: r275152
Backported from mainline
2019-04-24 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/90208
* tree-cfg.c (remove_bb): Move forced labels from removed bbs
after labels of new_bb, not before them.
* gcc.dg/tsan/pr90208-2.c: New test.
From-SVN: r275151
Backported from mainline
2019-04-19 Jakub Jelinek <jakub@redhat.com>
PR c++/90108
* c-decl.c (merge_decls): If remove is main variant and
DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
variant that has newdecl as TYPE_NAME if any.
* decl.c (duplicate_decls): If remove is main variant and
DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
variant that has newdecl as TYPE_NAME if any.
* c-c++-common/pr90108.c: New test.
From-SVN: r275150
Backported from mainline
2019-04-16 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/90082
* dce.c (can_delete_call): New function.
(deletable_insn_p, mark_insn): Use it.
* gcc.dg/pr90082.c: New test.
From-SVN: r275149
Backported from mainline
2019-04-16 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/90090
* tree-ssa-math-opts.c (is_division_by): Ignore divisions that can
throw internally.
* g++.dg/opt/pr90090.C: New test.
From-SVN: r275148
Backported from mainline
2019-04-12 Jakub Jelinek <jakub@redhat.com>
PR c/89933
* c-decl.c (merge_decls): When newdecl's type is its main variant,
don't try to remove it from the variant list, but instead assert
it has no variants.
* decl.c (duplicate_decls): When newdecl's type is its main variant,
don't try to remove it from the variant list, but instead assert
it has no variants.
* c-c++-common/pr89933.c: New test.
From-SVN: r275147
Backported from mainline
2019-04-09 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/89998
* gimple-ssa-sprintf.c (try_substitute_return_value): Use lhs type
instead of integer_type_node if possible, don't add ranges if return
type is not compatible with int.
* gimple-fold.c (gimple_fold_builtin_sprintf,
gimple_fold_builtin_snprintf): Use lhs type instead of hardcoded
integer_type_node.
* gcc.c-torture/compile/pr89998-1.c: New test.
* gcc.c-torture/compile/pr89998-2.c: New test.
From-SVN: r275146
Backported from mainline
2019-03-29 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/89869
* typeck.c: Include gimplify.h.
(cp_build_modify_expr) <case COND_EXPR>: Unshare rhs before using it
for second time. Formatting fixes.
* g++.dg/ubsan/vptr-14.C: New test.
From-SVN: r275145
Backported from mainline
2019-03-29 Jakub Jelinek <jakub@redhat.com>
PR c/89872
* gimplify.c (gimplify_compound_literal_expr): Don't optimize a
non-addressable complit into its initializer if it is volatile.
* gcc.dg/tree-ssa/pr89872.c: New test.
From-SVN: r275144
Backported from mainline
2019-03-26 Jakub Jelinek <jakub@redhat.com>
PR c++/89796
* semantics.c (finish_omp_atomic): Add warning_sentinel for
-Wunused-value around finish_expr_stmt call.
* g++.dg/gomp/pr89796.C: New test.
* gcc.dg/gomp/pr89796.c: New test.
From-SVN: r275142
Backported from mainline
2019-03-21 Jakub Jelinek <jakub@redhat.com>
PR c++/89767
* parser.c (cp_parser_lambda_introducer): Add ids and first_capture_id
variables, check for duplicates in this function.
* lambda.c (add_capture): Don't check for duplicates nor use
IDENTIFIER_MARKED.
(register_capture_members): Don't clear IDENTIFIER_MARKED here.
* g++.dg/cpp1y/lambda-init18.C: New test.
* g++.dg/cpp1y/lambda-init19.C: New test.
* g++.dg/cpp1y/pr89767.C: New test.
From-SVN: r275139
Backported from mainline
2019-03-19 Jakub Jelinek <jakub@redhat.com>
PR target/89726
* config/i386/i386.c (ix86_expand_floorceildf_32): In ceil
compensation use x2 += 1 instead of x2 -= -1 and when honoring
signed zeros, do another copysign after the compensation.
* gcc.target/i386/fpprec-1.c (x): Add 6 new constants.
(expect_round, expect_rint, expect_floor, expect_ceil, expect_trunc):
Add expected results for them.
From-SVN: r275135
Backported from mainline
2019-03-19 Jakub Jelinek <jakub@redhat.com>
PR c/89734
* c-decl.c (grokdeclarator): Call c_build_qualified_type on function
return type even if quals_used is 0. Formatting fixes.
* gcc.dg/pr89734.c: New test.
From-SVN: r275134
Backported from mainline
2019-03-15 Jakub Jelinek <jakub@redhat.com>
PR debug/89704
* dwarf2out.c (add_const_value_attribute): Return false for MINUS,
SIGN_EXTEND and ZERO_EXTEND.
* gcc.dg/debug/pr89704.c: New test.
From-SVN: r275133
Backported from mainline
2019-03-14 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/89679
* expmed.c (expand_mult_const): Don't add a REG_EQUAL note if it
would contain a paradoxical SUBREG.
* gcc.dg/pr89679.c: New test.
From-SVN: r275132
Backported from mainline
2019-03-14 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/89703
* tree-ssa-strlen.c (valid_builtin_call): Punt if stmt call types
aren't compatible also with builtin_decl_explicit. Check pure
or non-pure status of BUILT_IN_STR{{,N}CMP,N{LEN,{CAT,CPY}{,_CHK}}}
and BUILT_IN_STPNCPY{,_CHK}.
* gcc.c-torture/compile/pr89703-1.c: New test.
* gcc.c-torture/compile/pr89703-2.c: New test.
From-SVN: r275131
Backported from mainline
2019-03-11 Jakub Jelinek <jakub@redhat.com>
PR fortran/89651
* trans-openmp.c (gfc_omp_clause_default_ctor): Set TREE_NO_WARNING
on decl if adding COND_EXPR for allocatable.
(gfc_omp_clause_copy_ctor): Set TREE_NO_WARNING on dest.
* gfortran.dg/gomp/pr89651.f90: New test.
From-SVN: r275127
Backported from mainline
2019-03-09 Jakub Jelinek <jakub@redhat.com>
PR c/88568
* tree.c (handle_dll_attribute): Don't clear TREE_STATIC for
dllimport on VAR_DECLs with RECORD_TYPE or UNION_TYPE DECL_CONTEXT.
* g++.dg/other/pr88568.C: New test.
From-SVN: r275126
Backported from mainline
2019-03-05 Jakub Jelinek <jakub@redhat.com>
PR target/89587
* config/rs6000/t-linux (MULTIARCH_DIRNAME): Set to non-empty only
if_multiarch.
From-SVN: r275123
Backported from mainline
2019-03-05 Jakub Jelinek <jakub@redhat.com>
PR middle-end/89590
* builtins.c (maybe_emit_free_warning): Punt if free doesn't have
exactly one argument.
* gcc.dg/pr89590.c: New test.
From-SVN: r275122
Backported from mainline
2019-02-28 Jakub Jelinek <jakub@redhat.com>
PR c/89521
* gcc.dg/pr89521-1.c: New test.
* gcc.dg/pr89521-2.c: New test.
From-SVN: r275121
Backported from mainline
2019-02-28 Jakub Jelinek <jakub@redhat.com>
PR c/89520
* convert.c (convert_to_real_1, convert_to_integer_1): Punt for
builtins if they don't have a single scalar floating point argument.
Formatting fixes.
* gcc.dg/pr89520-1.c: New test.
* gcc.dg/pr89520-2.c: New test.
From-SVN: r275120
Backported from mainline
2019-02-20 Jakub Jelinek <jakub@redhat.com>
PR middle-end/89412
* expr.c (expand_assignment): If result is a MEM, use change_address
instead of simplify_gen_subreg.
* gcc.c-torture/compile/pr89412.c: New test.
From-SVN: r275118
Backported from mainline
2019-02-20 Jakub Jelinek <jakub@redhat.com>
David Malcolm <dmalcolm@redhat.com>
PR middle-end/89091
* fold-const.c (decode_field_reference): Return NULL_TREE if
lang_hooks.types.type_for_size returns NULL. Check it before
overwriting *exp_. Use return NULL_TREE instead of return 0.
* gcc.dg/torture/pr89091.c: New test.
From-SVN: r275117
Backported from mainline
2019-02-20 Jakub Jelinek <jakub@redhat.com>
PR middle-end/88074
PR middle-end/89415
* toplev.c (do_compile): Double the emin/emax exponents to workaround
buggy mpc_norm.
2019-02-19 Richard Biener <rguenther@suse.de>
PR middle-end/88074
* toplev.c (do_compile): Initialize mpfr's exponent range
based on available float modes.
2019-02-20 Jakub Jelinek <jakub@redhat.com>
PR middle-end/88074
PR middle-end/89415
* gcc.dg/pr88074-2.c: New test.
2019-02-19 Richard Biener <rguenther@suse.de>
PR middle-end/88074
* gcc.dg/pr88074.c: New testcase.
From-SVN: r275116
Backported from mainline
2019-02-18 Jakub Jelinek <jakub@redhat.com>
PR target/89361
* config/s390/s390.c (s390_indirect_branch_attrvalue,
s390_indirect_branch_settings): Define unconditionally.
(s390_set_current_function): Likewise, but guard the whole body except
the s390_indirect_branch_settings call with
#if S390_USE_TARGET_ATTRIBUTE.
(TARGET_SET_CURRENT_FUNCTION): Redefine unconditionally.
From-SVN: r275115
Backported from mainline
2019-02-19 Jakub Jelinek <jakub@redhat.com>
PR middle-end/89303
* g++.dg/torture/pr89303.C: Move everything from std namespace to my
namespace.
From-SVN: r275114
Backported from mainline
2019-02-15 Richard Biener <rguenther@suse.de>
Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/89278
* tree-loop-distribution.c: Include tree-eh.h.
(generate_memset_builtin, generate_memcpy_builtin): Call
rewrite_to_non_trapping_overflow on builtin->size before passing it
to force_gimple_operand_gsi.
* gcc.dg/pr89278.c: New test.
From-SVN: r275113
Backported from mainline
2019-02-14 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/89354
* combine.c (make_extraction): Punt if extraction_mode is narrower
than len bits.
* gcc.dg/pr89354.c: New test.
From-SVN: r275111
Backported from mainline
2019-02-14 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/89314
* fold-const.c (fold_binary_loc): Cast strlen argument to
const char * before dereferencing it. Formatting fixes.
* gcc.dg/pr89314.c: New test.
From-SVN: r275110
Backported from mainline
2019-02-13 Jakub Jelinek <jakub@redhat.com>
PR middle-end/89303
* tree-ssa-structalias.c (set_uids_in_ptset): Or in vi->is_heap_var
into pt->vars_contains_escaped_heap instead of setting
pt->vars_contains_escaped_heap to it.
2019-02-13 Jonathan Wakely <jwakely@redhat.com>
Jakub Jelinek <jakub@redhat.com>
PR middle-end/89303
* g++.dg/torture/pr89303.C: New test.
From-SVN: r275109
Backported from mainline
2019-02-13 Jakub Jelinek <jakub@redhat.com>
PR middle-end/89281
* optabs.c (prepare_cmp_insn): Use UINTVAL (size) instead of
INTVAL (size), compare it to GET_MODE_MASK instead of
1 << GET_MODE_BITSIZE.
From-SVN: r275108
Backported from mainline
2019-02-09 Jakub Jelinek <jakub@redhat.com>
PR middle-end/89246
* config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
If !node->definition and TYPE_ARG_TYPES is non-NULL, use
TYPE_ARG_TYPES instead of DECL_ARGUMENTS.
* gcc.dg/gomp/pr89246-1.c: New test.
* gcc.dg/gomp/pr89246-2.c: New test.
From-SVN: r275107
Backported from mainline
2019-01-16 David Malcolm <dmalcolm@redhat.com>
PR target/88861
* combine.c (delete_noop_moves): Convert to "bool" return,
returning true if any edges are eliminated.
(combine_instructions): Also return true if delete_noop_moves
returns true.
* g++.dg/opt/pr89188.C: Include ../torture/pr88861.C.
2019-01-16 David Malcolm <dmalcolm@redhat.com>
PR target/88861
* g++.dg/torture/pr88861.C: New test.
From-SVN: r275106
Backported from mainline
2019-02-08 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/89234
* except.c (copy_reg_eh_region_note_forward): Return if note_or_insn
is a NOTE, CODE_LABEL etc. - rtx_insn * other than INSN_P.
(copy_reg_eh_region_note_backward): Likewise.
* g++.dg/ubsan/pr89234.C: New test.
From-SVN: r275105
Backported from mainline
2019-02-05 Jakub Jelinek <jakub@redhat.com>
PR c++/89187
* optimize.c (maybe_thunk_body): Clear TREE_ADDRESSABLE on
PARM_DECLs of the thunk.
* lambda.c (maybe_add_lambda_conv_op): Likewise.
* g++.dg/opt/pr89187.C: New test.
From-SVN: r275104
Backported from mainline
2019-02-05 Jakub Jelinek <jakub@redhat.com>
PR target/89188
* dce.c (delete_unmarked_insns): Don't remove no-op moves if they
can throw, non-call exceptions are enabled and we can't delete
dead exceptions or alter cfg. Set must_clean if
delete_insn_and_edges returns true, don't set it blindly for calls.
* g++.dg/opt/pr89188.C: New test.
From-SVN: r275101
Backported from mainline
2019-02-05 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/89195
* combine.c (make_extraction): For MEMs, don't extract bytes outside
of the original MEM.
* gcc.c-torture/execute/pr89195.c: New test.
From-SVN: r275099
Backported from mainline
2019-02-05 Jakub Jelinek <jakub@redhat.com>
PR target/89186
* optabs.c (prepare_cmp_insn): Pass x and y to
emit_block_comp_via_libcall rather than XEXP (x, 0) and XEXP (y, 0).
* g++.dg/ext/vector36.C: New test.
From-SVN: r275098
Backported from mainline
2019-02-02 Jakub Jelinek <jakub@redhat.com>
PR middle-end/87887
* config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
Punt with warning on aggregate return or argument types. Ignore
type/mode checking for uniform arguments.
* gcc.dg/gomp/pr87887-1.c: New test.
* gcc.dg/gomp/pr87887-2.c: New test.
From-SVN: r275097
Backported from mainline
2019-02-01 Jakub Jelinek <jakub@redhat.com>
PR fortran/83246
PR fortran/89084
* trans-decl.c (generate_local_decl): Add referenced FL_PARAMETERs
if sym->ns->construct_entities rather than if
sym->ns->parent->code->op == EXEC_BLOCK.
* gfortran.dg/pr89084.f90: New test.
* gfortran.dg/lto/pr89084_0.f90: New test.
* gfortran.dg/pr83246.f90: New test.
From-SVN: r275096
Backported from mainline
2019-02-01 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/88107
* tree-cfg.c (find_outermost_region_in_block): Add ALL argument,
instead of assertion that eh_region_outermost is non-NULL, if it
is NULL, set *ALL to true and return NULL.
(move_sese_region_to_fn): Adjust caller, if all is set, call
duplicate_eh_regions with NULL region.
* gcc.dg/gomp/pr88107.c: New test.
From-SVN: r275095
Backported from mainline
2019-01-28 Jakub Jelinek <jakub@redhat.com>
PR middle-end/89002
* gimplify.c (gimplify_omp_for): When adding OMP_CLAUSE_*_GIMPLE_SEQ
for lastprivate/linear IV, push gimplify context around gimplify_assign
and, if it needed any temporaries, pop it into a gimple bind around the
sequence.
* testsuite/libgomp.c/pr89002.c: New test.
From-SVN: r275093
Backported from mainline
2019-01-27 Jakub Jelinek <jakub@redhat.com>
PR target/87214
* config/i386/sse.md
(<mask_codefor>avx512dq_shuf_<shuffletype>64x2_1<mask_name>,
avx512f_shuf_<shuffletype>64x2_1<mask_name>): Ensure the
first constants in pairs are multiples of 2. Formatting fixes.
(avx512vl_shuf_<shuffletype>32x4_1<mask_name>,
avx512vl_shuf_<shuffletype>32x4_1<mask_name>): Ensure the
first constants in each quadruple are multiples of 4. Formatting fixes.
* gcc.target/i386/avx512vl-pr87214-1.c: New test.
* gcc.target/i386/avx512vl-pr87214-2.c: New test.
From-SVN: r275092
Backported from mainline
2019-01-24 Jakub Jelinek <jakub@redhat.com>
PR c++/88976
* semantics.c (finish_omp_cancel): Use maybe_convert_cond when not in
template or build_x_binary_op otherwise.
* c-c++-common/gomp/cancel-2.c: New test.
* gcc.dg/gomp/cancel-1.c: New test.
* g++.dg/gomp/cancel-1.C: New test.
* g++.dg/gomp/cancel-2.C: New test.
* g++.dg/gomp/cancel-3.C: New test.
From-SVN: r275091
Backported from mainline
2019-01-21 Jakub Jelinek <jakub@redhat.com>
PR c++/88949
* optimize.c (cxx_copy_decl): New function.
(clone_body): Use it instead of copy_decl_no_change.
* g++.dg/gomp/pr88949.C: New test.
From-SVN: r275089
Backported from mainline
2019-01-19 Jakub Jelinek <jakub@redhat.com>
PR fortran/88902
* trans-decl.c (gfc_get_symbol_decl): Don't add length to function
or parent function if it has been added there already.
* gfortran.dg/pr88902.f90: New test.
From-SVN: r275088
Backported from mainline
2019-01-17 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/88870
* dce.c (deletable_insn_p): Never delete const/pure calls that can
throw if we can't alter the cfg or delete dead exceptions.
(mark_insn): Don't call find_call_stack_args for such calls.
* gcc.dg/pr88870.c: New test.
From-SVN: r275087
Backported from mainline
2019-01-05 Jakub Jelinek <jakub@redhat.com>
PR middle-end/82564
PR target/88620
* expr.c (expand_assignment): For calls returning VLA structures
if to_rtx is not a MEM, force it into a stack temporary.
* gcc.dg/nested-func-12.c: New test.
* gcc.c-torture/compile/pr82564.c: New test.
From-SVN: r275085
Backported from mainline
2019-01-04 Jakub Jelinek <jakub@redhat.com>
PR target/88594
* config/i386/i386.c (ix86_expand_divmod_libfunc): Use mode instead
of GET_MODE (opN) as modes of the libcall arguments.
* gcc.dg/pr88594.c: New test.
From-SVN: r275084
Backported from mainline
2019-01-03 Jakub Jelinek <jakub@redhat.com>
PR debug/88644
* dwarf2out.c (modified_type_die): If type is equal to sizetype,
change it to qualified_type.
* gcc.dg/debug/dwarf2/pr88644.c: New test.
2019-01-03 Iain Sandoe <iain@sandoe.co.uk>
* gcc.dg/pubtypes-2.c: Adjust expected pubtypes length.
* gcc.dg/pubtypes-3.c: Likewise.
* gcc.dg/pubtypes-4.c: Likewise.
From-SVN: r275083
Backported from mainline
2018-12-21 Jakub Jelinek <jakub@redhat.com>
PR middle-end/85594
PR middle-end/88553
* omp-expand.c (extract_omp_for_update_vars): Regimplify the condition
if needed.
(expand_omp_for_generic): Don't clobber t temporary for ordered loops.
* gcc.dg/gomp/pr85594.c: New test.
* gcc.dg/gomp/pr88553.c: New test.
From-SVN: r275082
Backported from mainline
2018-12-21 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/88563
* expr.c (expand_expr_real_2) <case WIDEN_MULT_EXPR>: Swap innermode
and mode arguments to convert_modes. Likewise swap mode and word_mode
arguments. Handle both arguments with VOIDmode before convert_modes
of one of them. Formatting fixes.
* gcc.dg/pr88563.c: New test.
From-SVN: r275081
Backported from mainline
2018-12-13 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/88470
* cfgcleanup.c (outgoing_edges_match): If the function is
shrink-wrapped and bb1 ends with a JUMP_INSN with a single fake
edge to EXIT, return false.
* gcc.target/i386/pr88470.c: New test.
From-SVN: r275080
Backported from mainline
2018-12-13 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/88416
* valtrack.c (cleanup_auto_inc_dec): Handle pre/post-inc/dec/modify
even if !AUTO_INC_DEC.
* gcc.target/i386/pr88416.c: New test.
From-SVN: r275079
Backported from mainline
2018-12-07 Jakub Jelinek <jakub@redhat.com>
PR c++/86669
* call.c (make_temporary_var_for_ref_to_temp): Call pushdecl even for
automatic vars.
* g++.dg/cpp0x/initlist105.C: New test.
* g++.dg/cpp0x/initlist106.C: New test.
* g++.dg/other/pr86669.C: New test.
From-SVN: r275078
Backported from mainline
2018-12-07 Jakub Jelinek <jakub@redhat.com>
PR fortran/88377
* trans-openmp.c (gfc_omp_clause_default_ctor,
gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
gfc_omp_clause_linear_ctor, gfc_omp_clause_dtor): Only consider
GFC_DECL_GET_SCALAR_ALLOCATABLE vars as scalar allocatables if they
have pointer type.
* gfortran.dg/gomp/pr88377.f90: New test.
From-SVN: r275076
Backported from mainline
2018-12-04 Jakub Jelinek <jakub@redhat.com>
PR c++/88103
* typeck.c (build_class_member_access_expr): If unary_complex_lvalue
turned xvalue_p into non-xvalue_p, call move on it.
* g++.dg/cpp0x/rv-cond3.C: New test.
From-SVN: r275074
Backported from mainline
2018-12-03 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/71109
* gcc.c-torture/compile/pr71109.c: New test.
From-SVN: r275073
Backported from mainline
2018-11-27 Jakub Jelinek <jakub@redhat.com>
PR c++/88181
* class.c (fixup_attribute_variants): Also propagate TYPE_PACKED
to variants.
* g++.dg/debug/pr88181.C: New test.
From-SVN: r275071
Backported from mainline
2018-11-20 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/87895
* omp-simd-clone.c (ipa_simd_modify_function_body): When removing
or replacing GIMPLE_RETURN, set EDGE_FALLTHRU on the edge to EXIT.
(simd_clone_adjust): Don't set EDGE_FALLTHRU here. In a loop that
redirects edges to EXIT to edges to incr_bb, iterate while EXIT
has any preds and always use EDGE_PRED (, 0).
* gcc.dg/gomp/pr87895-1.c: New test.
* gcc.dg/gomp/pr87895-2.c: New test.
* gcc.dg/gomp/pr87895-3.c: New test.
From-SVN: r275070
Backported from mainline
2018-10-25 Jakub Jelinek <jakub@redhat.com>
PR fortran/87725
* openmp.c (gfc_match_omp_clauses): Parse simd, monotonic and
nonmonotonic modifiers regardless of if they have been parsed
already or if the opposite one has. Fix up check whether
comma after modifier should be parsed.
(resolve_omp_clauses): Diagnose schedule modifier restrictions.
* c-c++-common/gomp/schedule-modifiers-1.c (bar): Separate modifier
from kind with a colon rather than comma.
* gfortran.dg/gomp/schedule-modifiers-1.f90: New test.
* gfortran.dg/gomp/schedule-modifiers-2.f90: New test.
From-SVN: r275067
Backported from mainline
2018-10-19 Jakub Jelinek <jakub@redhat.com>
PR middle-end/85488
PR middle-end/87649
* omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
depend closely nested inside of loop with ordered clause with
a parameter.
* c-c++-common/gomp/doacross-2.c: New test.
* c-c++-common/gomp/sink-3.c: Expect another error during error
recovery.
From-SVN: r275065
2019-08-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/91510
Backport from mainline
2017-09-26 Martin Jambor <mjambor@suse.cz>
* tree-sra.c (compare_access_positions): Put integral types first,
stabilize sorting of integral types, remove conditions putting
non-full-precision integers last.
(sort_and_splice_var_accesses): Disable scalarization if a
non-integert would be represented by a non-full-precision integer.
From-SVN: r274798
2019-08-03 Thomas Koenig <tkoenig@gcc.gnu.org>
Paul Thomas <pault@gcc.gnu.org>
Backport from trunk
PR fortran/90786
PR fortran/90813
* trans-expr.c (pointer_assignment_is_proc_pointer) Remove as
it is very simple and only called from one place.
(gfc_trans_pointer_assignment): Rename non_proc_pointer_assign
as non_proc_ptr_assign. Assign to it directly, rather than call
to above, deleted function and use gfc_expr_attr instead of
only checking the reference chain.
* trans-decl.c (sym_identifier): New function.
(mangled_identifier): New function, doing most of the work
of gfc_sym_mangled_identifier.
(gfc_sym_mangled_identifier): Use mangled_identifier. Add mangled
identifier to global symbol table.
(get_proc_pointer_decl): Use backend decl from global identifier
if present.
2019-08-03 Thomas Koenig <tkoenig@gcc.gnu.org>
Paul Thomas <pault@gcc.gnu.org>
Backport from trunk
PR fortran/90786
PR fortran/90813
* gfortran.dg/proc_ptr_51.f90: New test.
Co-Authored-By: Paul Thomas <pault@gcc.gnu.org>
From-SVN: r274038
2019-07-22 Martin Liska <mliska@suse.cz>
Backport from mainline
2019-07-22 Martin Liska <mliska@suse.cz>
PR driver/91172
* opts-common.c (decode_cmdline_option): Decode
argument of -Werror and check it for a wrong language.
* opts-global.c (complain_wrong_lang): Remove such case.
2019-07-22 Martin Liska <mliska@suse.cz>
Backport from mainline
2019-07-22 Martin Liska <mliska@suse.cz>
PR driver/91172
* gcc.dg/pr91172.c: New test.
From-SVN: r273666
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
2019-06-03 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-05-11 Iain Sandoe <iain@sandoe.co.uk>
PR bootstrap/89864
* inclhack.def (darwin_ucred__Atomic): Do not supply test_text
for wrap fixes.
* fixincl.x: Regenerated.
Backport from mainline.
2019-04-18 Erik Schnetter <schnetter@gmail.com>
Jakub Jelinek <jakub@redhat.com>
Iain Sandoe <iain@sandoe.co.uk>
PR bootstrap/89864
* inclhack.def (darwin_ucred__Atomic): New, work around _Atomic keyword
use in headers included by C++.
* fixincl.x: Regenerated.
From-SVN: r271881
2019-05-28 Martin Liska <mliska@suse.cz>
Backport from mainline
2019-02-28 John David Anglin <danglin@gcc.gnu.org>
PR testsuite/89441
* g++.dg/ipa/pr89009.C: Update symbol visibility.
From-SVN: r271698
2019-05-28 Martin Liska <mliska@suse.cz>
Backport from mainline
2019-02-11 Martin Liska <mliska@suse.cz>
PR ipa/89009
* g++.dg/ipa/pr89009.C: New test.
From-SVN: r271697
PR target/90530
* config/pa/pa.c (pa_cannot_change_mode_class): Accept mode changes
from DImode to SImode in floating-point registers on 64-bit target.
* config/pa/pa.md (umulsidi3): Change nonimmediate_operand to
register_operand in xmpyu patterns.
From-SVN: r271614
Certain broken versions of xsltproc ignore the --nonet option and will
attempt to fetch the docbook stylesheet from the WWW when it isn't in
the local XML catalog.
This patch checks for the local stylesheet directory first, and doesn't
use xsltproc if no local stylesheets are found. Checking for the local
directory is done using xmlcatalog if available, only checking the
hardcoded list of directories if xmlcatalog fails. The right directory
for Suse is added to the hardcoded list.
This should avoid doing an xsltproc check that would need to download
the stylesheet, so no network connection is made even if a broken
xsltproc is present.
Backport from mainline
2019-02-27 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/89466
* acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
stylesheet directories before check for xsltproc. Try to use
xmlcatalog to find local stylesheet directory before trying hardcoded
paths. Add path used by suse to hardcoded paths. Adjust xsltproc
check to look for the same stylesheet as doc/Makefile.am uses. Don't
use xsltproc if xmlcatalog fails to find a local stylesheet.
* configure.ac: Check for xmlcatalog.
* Makefile.in: Regenerate.
* configure: Likewise.
* doc/Makefile.in: Likewise.
* include/Makefile.in: Likewise.
* libsupc++/Makefile.in: Likewise.
* po/Makefile.in: Likewise.
* python/Makefile.in: Likewise.
* src/Makefile.in: Likewise.
* src/c++11/Makefile.in: Likewise.
* src/c++17/Makefile.in: Likewise.
* src/c++98/Makefile.in: Likewise.
* src/filesystem/Makefile.in: Likewise.
* testsuite/Makefile.in: Likewise.
From-SVN: r271570
Backport from mainline
2019-01-22 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/88740
* testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
write to stderr instead of using printf.
From-SVN: r271569
It's possible for the function pointer comparison to fail even though
the type is correct, because the function could be defined multiple
times with different addresses when shared libraries are in use.
Retain the function pointer check for the common case where the check
succeeds, but compare typeinfo (if RTTI is enabled) if the first check
fails.
Backport from mainline
2019-05-23 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/any (__any_caster): Use RTTI if comparing
addresses fails, to support non-unique addresses in shared libraries.
* include/std/any (__any_caster): Likewise.
* testsuite/experimental/any/misc/any_cast_neg.cc: Use 0 for dg-error
line number.
From-SVN: r271566
Backport from mainline
2019-04-24 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/90220 (partial)
* include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
not attempt ill-formed static_cast to pointers to non-object types.
* testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
function types.
Backport from mainline
2019-04-24 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/90220
* include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
Avoid a runtime check for types that can never be stored in std::any.
* testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
array types.
Backport from mainline
2019-05-23 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/90220
* include/experimental/any (__any_caster): Constrain to only be
callable for object types. Use remove_cv_t instead of decay_t.
If the type decays or isn't copy constructible, compare the manager
function to a dummy specialization.
(__any_caster): Add overload constrained for non-object types.
(any::_Manager_internal<_Op>): Add dummy specialization.
* testsuite/experimental/any/misc/any_cast.cc: Test function types
and array types.
From-SVN: r271565
gcc/ChangeLog:
2019-05-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
Backport from mainline.
2019-05-07 Kelvin Nilsen <kelvin@gcc.gnu.org>
PR target/89765
* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
In handling of ALTIVEC_BUILTIN_VEC_INSERT, use modular arithmetic
to compute vector element selector for both constant and variable
operands.
gcc/testsuite/ChangeLog:
2019-05-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
Backport from mainline.
2019-05-07 Kelvin Nilsen <kelvin@gcc.gnu.org>
PR target/89765
* gcc.target/powerpc/pr89765-mc.c: New test.
* gcc.target/powerpc/vsx-builtin-10c.c: New test.
* gcc.target/powerpc/vsx-builtin-10d.c: New test.
* gcc.target/powerpc/vsx-builtin-11c.c: New test.
* gcc.target/powerpc/vsx-builtin-11d.c: New test.
* gcc.target/powerpc/vsx-builtin-12c.c: New test.
* gcc.target/powerpc/vsx-builtin-12d.c: New test.
* gcc.target/powerpc/vsx-builtin-13c.c: New test.
* gcc.target/powerpc/vsx-builtin-13d.c: New test.
* gcc.target/powerpc/vsx-builtin-14c.c: New test.
* gcc.target/powerpc/vsx-builtin-14d.c: New test.
* gcc.target/powerpc/vsx-builtin-15c.c: New test.
* gcc.target/powerpc/vsx-builtin-15d.c: New test.
* gcc.target/powerpc/vsx-builtin-16c.c: New test.
* gcc.target/powerpc/vsx-builtin-16d.c: New test.
* gcc.target/powerpc/vsx-builtin-17c.c: New test.
* gcc.target/powerpc/vsx-builtin-17d.c: New test.
* gcc.target/powerpc/vsx-builtin-18c.c: New test.
* gcc.target/powerpc/vsx-builtin-18d.c: New test.
* gcc.target/powerpc/vsx-builtin-19c.c: New test.
* gcc.target/powerpc/vsx-builtin-19d.c: New test.
* gcc.target/powerpc/vsx-builtin-20c.c: New test.
* gcc.target/powerpc/vsx-builtin-20d.c: New test.
* gcc.target/powerpc/vsx-builtin-9c.c: New test.
* gcc.target/powerpc/vsx-builtin-9d.c: New test.
From-SVN: r271436
Account for Cortex-M3 Errata 602117. The -mfix-cortex-m3-ldrd option is
enabled by default, if -mcpu=cortex-m3 is used.
gcc/
* config/arm/t-rtems: Replace -march=armv7-m multilibs with
-mcpu=cortex-m3 and -mcpu=cortex-m4 multilibs.
From-SVN: r271148
While testing the fix I also discovered that operator== assumes the
elements are comparable with operator!= which is not required.
Backport from mainline
2019-04-17 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/90105
* include/bits/forward_list.tcc (operator==): Do not use operator!= to
compare elements.
(forward_list<T, A>::sort(Comp)): When elements are equal take the one
earlier in the list, so that sort is stable.
* testsuite/23_containers/forward_list/operations/90105.cc: New test.
* testsuite/23_containers/forward_list/comparable.cc: Test with
types that meet the minimum EqualityComparable and LessThanComparable
requirements. Remove irrelevant comment.
From-SVN: r271010
Backport from mainline
2019-03-11 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/89629
* libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
Use correct type for len_aligned.
* testsuite/20_util/hash/89629.cc: New test.
From-SVN: r271009
The testcase was failing because we were trying to access
TREE_INT_CST_ELT (x, 1) of a 128-bit integer that was small enough
to need only a single element.
2019-05-07 Richard Sandiford <richard.sandiford@arm.com>
gcc/
Backport from mainline:
2019-01-25 Richard Sandiford <richard.sandiford@arm.com>
PR middle-end/89037
* varasm.c (output_constructor_bitfield): Use wi::extract_uhwi
instead of accessing TREE_INT_CST_ELT directly.
gcc/testsuite/
Backport from mainline:
2019-01-25 Richard Sandiford <richard.sandiford@arm.com>
PR middle-end/89037
* gcc.dg/pr89037.c: New test.
From-SVN: r270936
2019-05-05 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/90344
* frontend-passes.c (create_var): Bring into sync with gcc 8.
2019-05-05 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/90344
* gfortran.dg/pr90344.f90: New test
From-SVN: r270883
This keeps coming up repeatedly and the ACLE has finally added
__ARM_FEATURE_ATOMICS for the LSE feature in GCC. This is now part of
the latest ACLE release
(https://developer.arm.com/docs/101028/latest/5-feature-test-macros)
I know it's late for GCC-9 but this is a simple macro which need not
wait for another year.
Ok for trunk and to backport to all release branches ?
Tested with a simple build and a smoke test.
Backport from mainline.
PR target/86538
* config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Define
__ARM_FEATURE_ATOMICS
From-SVN: r270770
This patch is to fix the ICE caused by expand pattern of copysignf
builtin. This is a back port to r267019 of trunk.
gcc:
2019-04-30 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
PR target/90075
* config/aarch64/iterators.md (V_INT_EQUIV): Add mode for
integer equivalent of floating point values.
Backport from mainline
2018-12-11 Richard Earnshaw <Richard.Earnshaw@arm.com>
PR target/37369
* config/aarch64/iterators.md (sizem1): Add sizes for
SFmode and DFmode.
(Vbtype): Add SFmode mapping.
* config/aarch64/aarch64.md (copysigndf3, copysignsf3): Delete.
(copysign<GPF:mode>3): New expand pattern.
(copysign<GPF:mode>3_insn): New insn pattern.
testsuite:
2019-04-30 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
PR target/90075
* gcc.target/aarch64/pr90075.c: New test.
From-SVN: r270684
gcc/testsuite/ChangeLog:
2019-04-25 Xiong Hu Luo <luoxhu@linux.ibm.com>
* gcc.target/powerpc/vsx-vector-6.p8.c: Fix failure caused by typo.
From-SVN: r270565
gcc/ChangeLog:
2019-04-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
Backport from mainline
2019-03-15 Kelvin Nilsen <kelvin@gcc.gnu.org>
PR target/87532
* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
When handling vec_extract, use modular arithmetic to allow
constant selectors greater than vector length.
* config/rs6000/rs6000.c (rs6000_expand_vector_extract): Allow
V1TImode vectors to have constant selector values greater than 0.
Use modular arithmetic to compute vector index.
(rs6000_split_vec_extract_var): Use modular arithmetic to compute
index for in-memory vectors. Correct code generation for
in-register vectors. Use inner mode of vector rather than mode of
destination for move instruction.
(altivec_expand_vec_ext_builtin): Use modular arithmetic to
compute index.
2019-04-12 Kelvin Nilsen <kelvin@gcc.gnu.org>
PR target/87532
* config/rs6000/vsx.md (*vsx_extract_<mode>_<VS_scalar>mode_var):
Use QI inner mode with V16QI vector mode.
gcc/testsuite/ChangeLog:
2019-04-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
Backport from mainline
2019-03-15 Kelvin Nilsen <kelvin@gcc.gnu.org>
PR target/87532
* gcc.target/powerpc/pr87532-mc.c: New test.
* gcc.target/powerpc/pr87532.c: New test.
* gcc.target/powerpc/vec-extract-v16qiu-v2.h: New test.
* gcc.target/powerpc/vec-extract-v16qiu-v2a.c: New test.
* gcc.target/powerpc/vec-extract-v16qiu-v2b.c: New test.
* gcc.target/powerpc/vsx-builtin-10a.c: New test.
* gcc.target/powerpc/vsx-builtin-10b.c: New test.
* gcc.target/powerpc/vsx-builtin-11a.c: New test.
* gcc.target/powerpc/vsx-builtin-11b.c: New test.
* gcc.target/powerpc/vsx-builtin-12a.c: New test.
* gcc.target/powerpc/vsx-builtin-12b.c: New test.
* gcc.target/powerpc/vsx-builtin-13a.c: New test.
* gcc.target/powerpc/vsx-builtin-13b.c: New test.
* gcc.target/powerpc/vsx-builtin-14a.c: New test.
* gcc.target/powerpc/vsx-builtin-14b.c: New test.
* gcc.target/powerpc/vsx-builtin-15a.c: New test.
* gcc.target/powerpc/vsx-builtin-15b.c: New test.
* gcc.target/powerpc/vsx-builtin-16a.c: New test.
* gcc.target/powerpc/vsx-builtin-16b.c: New test.
* gcc.target/powerpc/vsx-builtin-17a.c: New test.
* gcc.target/powerpc/vsx-builtin-17b.c: New test.
* gcc.target/powerpc/vsx-builtin-18a.c: New test.
* gcc.target/powerpc/vsx-builtin-18b.c: New test.
* gcc.target/powerpc/vsx-builtin-19a.c: New test.
* gcc.target/powerpc/vsx-builtin-19b.c: New test.
* gcc.target/powerpc/vsx-builtin-20a.c: New test.
* gcc.target/powerpc/vsx-builtin-20b.c: New test.
* gcc.target/powerpc/vsx-builtin-9a.c: New test.
* gcc.target/powerpc/vsx-builtin-9b.c: New test.
2019-03-19 Kelvin Nilsen <kelvin@gcc.gnu.org>
PR target/89736
* gcc.target/powerpc/pr87532-mc.c: Modify dejagnu directives to
restrict this test to vsx targets.
From-SVN: r270493
These patches are followed changes for r255555 on testcases
vsx-vector-6*.c. Backport them to update file names and fix regressions
for GCC7 on power9.
See e.g. https://gcc.gnu.org/ml/gcc-testresults/2019-04/msg00159.html
for the failures this patch fixes; the patch is for GCC 7.
gcc/ChangeLog:
2019-04-19 Xiong Hu Luo <luoxhu@linux.ibm.com>
Backport from trunk
2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
* doc/sourcebuild.texi (Endianness): New subsubsection.
gcc/testsuite/ChangeLog:
2019-04-19 Xiong Hu Luo <luoxhu@linux.ibm.com>
Backport from trunk
2018-02-07 Will Schmidt <will_schmidt@vnet.ibm.com>
* gcc.target/powerpc/vsx-vector-6-le.c: Update CPU target.
* gcc.target/powerpc/vsx-vector-6-le.p9.c: New.
Backport from trunk
2018-05-04 Carl Love <cel@us.ibm.com>
* gcc.target/powerpc/vsx-vector-6.h (foo): Add test for vec_max,
vec_trunc.
* gcc.target/powerpc/vsx-vector-6-le.c (dg-final): Update xvcmpeqdp,
xvcmpgtdp, xvcmpgedp counts. Add xxsel counts.
* gcc.target/powerpc/vsx-vector-6-be.c (dg-final): Update xvcmpgtdp,
xvcmpgedp counts. Add xxsel counts.
Backport from trunk
2018-05-16 Carl Love <cel@us.ibm.com>
* gcc.target/powerpc/vsx-vector-6-be.c: Remove file.
* gcc.target/powerpc/vsx-vector-6-be.p7.c: New test file.
* gcc.target/powerpc/vsx-vector-6-be.p8.c: New test file.
* gcc.target/powerpc/vsx-vector-6-le.c (dg-final): Update counts for
xvcmpeqdp., xvcmpgtdp., xvcmpgedp., xxlxor, xvrdpi.
Backport from trunk
2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
* lib/target-supports.exp (check_effective_target_be): New.
(check_effective_target_le): New.
Backport from trunk
2018-06-01 Carl Love <cel@us.ibm.com>
* gcc.target/powerpc/altivec-7-be.c: Delete file.
* gcc.target/powerpc/altivec-7-le.c: Delete file.
* gcc.target/powerpc/vsx-7-be.c: Remove file.
Backport from trunk
2018-06-01 Carl Love <cel@us.ibm.com>
Commit 260294 on 2018-05-16 by Carl Love was supposed to add the
following files.
* gcc.target/powerpc/vsx-vector-6-be.p7.c: New test file.
* gcc.target/powerpc/vsx-vector-6-be.p8.c: New test file.
Backport from trunk
2018-06-08 Carl Love <cel@us.ibm.com>
* gcc.target/powerpc/vsx-vector-6-be.p7.c: Rename this file to
vsx-vector-6.p7.c.
* gcc.target/powerpc/vsx-vector-6-le.p9.c: Rename this file to
vsx-vector-6.p9.c.
* gcc.target/powerpc/vsx-vector-6-be.p8.c: Move instruction counts
for BE system that are different then for an LE system from this file
into vsx-vector-6-le.c using be target qualifier. Remove this file.
* gcc.target/powerpc/vsx-vector-6-le.c: Add le qualifiers as needed for
the various instruction counts. Rename file to vsx-vector-6.p8.c.
Backport from trunk
2019-02-06 Bill Seurer <seurer@linux.vnet.ibm.com>
* gcc.target/powerpc/vsx-vector-6.p7.c: Update instruction
counts and target.
* gcc.target/powerpc/vsx-vector-6.p8.c: Update instruction
counts and target.
* gcc.target/powerpc/vsx-vector-6.p9.c: Update instruction
counts and target.
From-SVN: r270452
2019-04-14 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87352
Backport from trunk
* gfortran.h (gfc_component): Add finalized field.
* class.c (finalize_component): If the component is already
finalized, return early. Set component->finalized on exit.
2019-04-14 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/87352
* gfortran.dg/finalize_28.f90: Adjust count of __builtin_free.
* gfortran.dg/finalize_34.f90: New test.
From-SVN: r270352
2019-04-11 Martin Liska <mliska@suse.cz>
Backport from mainline
2019-03-08 Martin Liska <mliska@suse.cz>
PR target/86952
* config/i386/i386.c (ix86_option_override_internal): Disable
jump tables when retpolines are used.
2019-04-11 Martin Liska <mliska@suse.cz>
Backport from mainline
2019-03-08 Martin Liska <mliska@suse.cz>
PR target/86952
* gcc.target/i386/pr86952.c: New test.
* gcc.target/i386/indirect-thunk-7.c: Use jump tables to match
scanned pattern.
* gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
From-SVN: r270277
2019-04-10 Harald Anlauf <anlauf@gmx.de>
Backport from trunk
PR fortran/89904
* check.c (gfc_check_transfer): Reject procedures as actual
arguments for SOURCE and MOLD of TRANSFER intrinsic.
PR fortran/89904
* gfortran.dg/pr85797.f90: Adjust testcase.
From-SVN: r270268
The "*neon_mov<mode>" patterns for 128 bit sized quantities uses the "Dn"
constraint to match vmov.f32 and vmov.i<vec-width> patterns.
This constraint boils down to using the `neon_immediate_valid` function.
Once the constraint has matched, the output C statement asserts that function
passes.
The output C statement calls `neon_immediate_valid` with the mode taken from the
iterator, while the constraint takes the mode from the operand.
This can cause a discrepency when the operand is a CONST_INT, as the constraint
passes VOIDmode which `neon_immediate_valid` treats as DImode, while the C
statement passes the mode of the iterator which can be TImode.
When this happens, the `neon_immediate_valid` can fail in the second call (if
e.g. the CONST_INT is a valid immediate in DImode but not TImode) which would
trigger the assertion.
The testcase added with this patch triggers this when compiled with an arm cross
compiler using the command line below.
gcc -march=armv8-a -c neon-immediate-timode.c -O1 -mfloat-abi=hard -mfpu=neon-fp-armv8
This patch splits the original "Dn" constraint into three new constraints, "DN"
for TImode CONST_INT, "Dn" for DImode CONST_INT, and "Dm" for CONST_VECTOR.
Splitting things up this way requires using one extra alternative in the
"*neon_mov<mode>" patterns, but makes it clear from the constraint what mode is
being used.
We also remove the behaviour of treating VOIDmode as DImode in
`neon_valid_immediate` since the original "Dn" constraint was the only place
that functionality was used. VOIDmode is now never passed to that function.
An assertion has been added to the function to ensure this problem is caught
earlier on.
bootstrapped and regtested on arm-none-linux-gnueabihf
gcc/ChangeLog:
2019-04-10 Matthew Malcomson <matthew.malcomson@arm.com>
PR target/90024
* config/arm/arm.c (neon_valid_immediate): Disallow VOIDmode parameter.
* config/arm/constraints.md (Dm, DN, Dn): Split previous Dn constraint
into three.
* config/arm/neon.md (*neon_mov<mode>): Account for TImode and DImode
differences directly.
(*smax<mode>3_neon, vashl<mode>3, vashr<mode>3_imm): Use Dm constraint.
gcc/testsuite/ChangeLog:
2019-04-10 Matthew Malcomson <matthew.malcomson@arm.com>
PR target/90024
* gcc.dg/torture/neon-immediate-timode.c: New test.
From-SVN: r270253
Backport from mainline
2019-02-19 Eric Botcazou <ebotcazou@adacore.com>
* rtlanal.c (get_initial_register_offset): Fall back to the estimate
as long as the epilogue isn't completed.
From-SVN: r270183
2019-04-03 Richard Biener <rguenther@suse.de>
PR lto/89896
* lto-wrapper.c (run_gcc): Avoid implicit rules making
the all target phony.
From-SVN: r270114
2019-03-28 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-11-05 Martin Liska <mliska@suse.cz>
PR web/87829
* doc/invoke.texi: Remove options that are
not disabled with -Os.
From-SVN: r269987
2019-02-26 Richard Biener <rguenther@suse.de>
Backport from mainline
2019-02-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/89253
* tree-ssa-loop-split.c (tree_ssa_split_loops): Check we can
duplicate the loop.
* gfortran.dg/pr89253.f: New testcase.
2019-02-08 Richard Biener <rguenther@suse.de>
PR middle-end/89223
* tree-data-ref.c (initialize_matrix_A): Fail if constant
doesn't fit in HWI.
(analyze_subscript_affine_affine): Handle failure from
initialize_matrix_A.
* gcc.dg/torture/pr89223.c: New testcase.
2019-01-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/88739
* tree-ssa-sccvn.c (vn_reference_lookup_3): Avoid generating
BIT_FIELD_REFs of non-mode-precision integral operands.
* gcc.c-torture/execute/pr88739.c: New test.
From-SVN: r269942
2019-03-26 Richard Biener <rguenther@suse.de>
Backport from mainline
2019-01-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/86554
* tree-ssa-sccvn.c (visit_nary_op): When value-numbering to
expressions with different overflow behavior make sure there's an
available expression on the path.
* gcc.dg/torture/pr86554-1.c: New testcase.
* gcc.dg/torture/pr86554-2.c: Likewise.
2018-11-20 Richard Biener <rguenther@suse.de>
PR tree-optimization/88105
* tree-ssa-dom.c (pass_dominator::execute): Do not walk
backedges.
* gcc.dg/gomp/pr88105.c: New testcase.
2018-03-08 Richard Biener <rguenther@suse.de>
PR middle-end/84552
* tree-scalar-evolution.c: Include tree-into-ssa.h.
(follow_copies_to_constant): Do not follow SSA names registered
for update.
* gcc.dg/graphite/pr84552.c: New testcase.
From-SVN: r269939
2019-03-23 Thomas Koenig <tkoeng@gcc.gnu.org>
PR fortran/68009
Backport from trunk
* iresolve.c: Include trans.h.
(gfc_resolve_fe_runtine_error): Set backend_decl on
resolved_sym.
From-SVN: r269890
In the same 'runtest' instance, 'global' variables persist from one '*.exp'
file to another.
All other '*.exp' files are using " -pedantic-errors" instead of the empty
string as the default for 'DEFAULT_FFLAGS'. Thus this setting of
'DEFAULT_FFLAGS' is not idempotent, depends on whether
'gfortran.dg/ieee/ieee.exp', or an other defining '*.exp' file is executed
first.
gcc/testsuite/
PR fortran/29383
* gfortran.dg/ieee/ieee.exp (DEFAULT_FFLAGS): Set the same as in
other '*.exp' files.
trunk r269845
From-SVN: r269847
2019-03-21 Bill Schmidt <wschmidt@linux.ibm.com>
* config/rs6000/rs6000.c (rs6000_analyze_swaps): Rebuild
ud- and du-chains between phases.
From-SVN: r269843
2019-03-17 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/84394
Backport from trunk
* symbol.c (gfc_add_subroutine): If we are encountering a
subrtoutine within a BLOCK DATA and the name starts with an
underscore, do not check.
2019-03-17 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/84394
Backport from trunk
* gfortran.dg/blockdata_11.f90: New test.
From-SVN: r269741
32-bit indices in VSIB address are sign-extended to 64 bits. In x32,
when 32-bit indices are used as addresses, like in
vgatherdps %ymm7, 0(,%ymm9,1), %ymm6
32-bit indices, 0xf7fa3010, is sign-extended to 0xfffffffff7fa3010 which
is invalid address. Add addr32 prefix to UNSPEC_VSIBADDR instructions
for x32 if there is no base register nor symbol.
This fixes 175.vpr and 254.gap in SPEC CPU 2000 on x32 with
-Ofast -funroll-loops -march=haswell
gcc/
Backport from mainline
2019-03-14 H.J. Lu <hongjiu.lu@intel.com>
PR target/89523
* config/i386/i386.c (ix86_print_operand): Handle 'M' to add
addr32 prefix to VSIB address for X32.
* config/i386/sse.md (*avx512pf_gatherpf<mode>sf_mask): Prepend
"%M2" to opcode.
(*avx512pf_gatherpf<mode>df_mask): Likewise.
(*avx512pf_scatterpf<mode>sf_mask): Likewise.
(*avx512pf_scatterpf<mode>df_mask): Likewise.
(*avx2_gathersi<mode>): Prepend "%M3" to opcode.
(*avx2_gathersi<mode>_2): Prepend "%M2" to opcode.
(*avx2_gatherdi<mode>): Prepend "%M3" to opcode.
(*avx2_gatherdi<mode>_2): Prepend "%M2" to opcode.
(*avx2_gatherdi<mode>_3): Prepend "%M3" to opcode.
(*avx2_gatherdi<mode>_4): Prepend "%M2" to opcode.`
(*avx512f_gathersi<mode>): Prepend "%M4" to opcode.
(*avx512f_gathersi<mode>_2): Prepend "%M3" to opcode.
(*avx512f_gatherdi<mode>): Prepend "%M4" to opcode.
(*avx512f_gatherdi<mode>_2): Prepend "%M3" to opcode.
(*avx512f_scattersi<mode>): Prepend "%M0" to opcode.
(*avx512f_scatterdi<mode>): Likewise.
gcc/testsuite/
Backport from mainline
2019-03-14 H.J. Lu <hongjiu.lu@intel.com>
PR target/89523
* gcc.target/i386/pr89523-1a.c: New test.
* gcc.target/i386/pr89523-1b.c: Likewise.
* gcc.target/i386/pr89523-2.c: Likewise.
* gcc.target/i386/pr89523-3.c: Likewise.
* gcc.target/i386/pr89523-4.c: Likewise.
* gcc.target/i386/pr89523-5.c: Likewise.
* gcc.target/i386/pr89523-6.c: Likewise.
* gcc.target/i386/pr89523-7.c: Likewise.
* gcc.target/i386/pr89523-8.c: Likewise.
* gcc.target/i386/pr89523-9.c: Likewise.
From-SVN: r269739
2019-03-16 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/66089
Backport from trunk
* trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
Return false if a scalar tempoary is needed.
(gfc_walk_variable_expr): Fix up class refs.
2019-03-16 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/66089
Backport from trunk
* gfortran.dg/dependency_53.f90: New test.
* gfortran.dg/assumed_type_2.f90: Adapted tree dumps.
* gfortran.dg/no_arg_check_2.f90: Likewise.
From-SVN: r269725
2019-03-16 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/66695
PR fortran/77746
PR fortran/79485
Backport from trunk
* gfortran.h (gfc_symbol): Add bind_c component.
(gfc_get_gsymbol): Add argument bind_c.
* decl.c (add_global_entry): Add bind_c argument to
gfc_get_symbol.
* parse.c (parse_block_data): Likewise.
(parse_module): Likewise.
(add_global_procedure): Likewise.
(add_global_program): Likewise.
* resolve.c (resolve_common_blocks): Likewise.
(resolve_global_procedure): Likewise.
(gfc_verify_binding_labels): Likewise.
* symbol.c (gfc_get_gsymbol): Add argument bind_c. Set bind_c
in gsym.
* trans-decl.c (gfc_get_module_backend_decl): Add bind_c argument
to gfc_get_symbol.
(gfc_get_extern_function_decl): If the sym has a binding label
and it cannot be found in the global symbol tabel, it is the wrong
one and vice versa.
2019-03-16 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/66695
PR fortran/77746
PR fortran/79485
Backport from trunk
* gfortran.dg/binding_label_tests_30.f90: New test.
* gfortran.dg/binding_label_tests_31.f90: New test.
* gfortran.dg/binding_label_tests_32.f90: New test.
* gfortran.dg/binding_label_tests_33.f90: New test.
From-SVN: r269723
2019-03-14 Martin Jambor <mjambor@suse.cz>
Backport from mainline
2019-03-07 Martin Jambor <mjambor@suse.cz>
PR lto/87525
* ipa-cp.c (perform_estimation_of_a_value): Account zero time benefit
for extern inline functions.
testsuite/
* gcc.dg/ipa/ipcp-5.c: New test.
From-SVN: r269688
2019-03-14 Richard Biener <rguenther@suse.de>
Backport from mainline
2018-02-16 Jakub Jelinek <jakub@redhat.com>
PR target/84272
* config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
Use ++iter rather than iter++ for std::list iterators.
(func_fma_steering::dfs): Likewise. Don't delete nodes right away,
defer deleting them until all nodes in the forest are processed. Do
free even leaf nodes. Change to_process into auto_vec.
* g++.dg/opt/pr84272.C: New test.
From-SVN: r269676
2019-03-13 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87673
Backport from trunk
* match.c (gfc_match_type_spec): Remove call to
gfc_resolve_expr for character length.
2019-03-13 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87673
Backport from trunk
* gfortran.dg/charlen_17.f90: New test.
From-SVN: r269666
2019-03-11 Martin Liska <mliska@suse.cz>
Backport from mainline
2019-02-18 Martin Liska <mliska@suse.cz>
PR c++/89383
* line-map.c (linemap_line_start): Use 1UL in order
to not overflow.
From-SVN: r269577
2019-03-11 Martin Liska <mliska@suse.cz>
Backport from mainline
2019-02-11 David Malcolm <dmalcolm@redhat.com>
PR lto/88147
* input.c (selftest::test_line_offset_overflow): New selftest.
(selftest::input_c_tests): Call it.
2019-03-11 Martin Liska <mliska@suse.cz>
Backport from mainline
2019-02-11 Martin Liska <mliska@suse.cz>
PR lto/88147
* line-map.c (linemap_line_start): Don't reuse the existing line
map if the line offset is sufficiently large to cause overflow
when computing location_t values.
From-SVN: r269576
2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/71544
Backport from trunk
* trans-types.c (gfc_typenode_for_spec) Set ts->is_c_interop of
C_PTR and C_FUNPTR.
(create_fn_spec): Mark argument as escaping if ts->is_c_interop is set.
2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/71544
Backport from trunk
* gfortran.dg/c_ptr_tests_19.f90: New test.
From-SVN: r269552
2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/87734
Backort from trunk
* symbol.c (gfc_add_procedure): Only throw an error if the
procedure has not been declared either PUBLIC or PRIVATE.
* resolve.c (is_illegal_recursion): Remove an assert().
2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87734
Backport from trunk
* gfortran.dg/public_private_module_10.f90: New test.
Co-Authored-By: Steven G. Kargl <kargl@gcc.gnu.org>
From-SVN: r269550
Backport r268834 of "Add support for the vec_sbox_be, vec_cipher_be etc."
from mainline to gcc-7-branch.
gcc/ChangeLog:
2019-03-07 Xiong Hu Luo <luoxhu@linux.ibm.com>
Backport of r268834 from mainline to gcc-7-branch.
2019-02-13 Xiong Hu Luo <luoxhu@linux.vnet.ibm.com>
* config/rs6000/altivec.h (vec_sbox_be, vec_cipher_be,
vec_cipherlast_be, vec_ncipher_be, vec_ncipherlast_be): New #defines.
* config/rs6000/crypto.md (CR_vqdi): New define_mode_iterator.
(crypto_vsbox_<mode>, crypto_<CR_insn>_<mode>): New define_insns.
* config/rs6000/rs6000-builtin.def (VSBOX_BE): New BU_CRYPTO_1.
(VCIPHER_BE, VCIPHERLAST_BE, VNCIPHER_BE, VNCIPHERLAST_BE):
New BU_CRYPTO_2.
* config/rs6000/rs6000.c (builtin_function_type)
<CRYPTO_BUILTIN_VSBOX_BE, CRYPTO_BUILTIN_VCIPHER_BE,
CRYPTO_BUILTIN_VCIPHERLAST_BE, CRYPTO_BUILTIN_VNCIPHER_BE,
CRYPTO_BUILTIN_VNCIPHERLAST_BE>: New switch options.
* doc/extend.texi (vec_sbox_be, vec_cipher_be, vec_cipherlast_be,
vec_ncipher_be, vec_ncipherlast_be): New builtin functions.
gcc/testsuite/ChangeLog:
2019-03-07 Xiong Hu Luo <luoxhu@linux.ibm.com>
Backport of r268834 from mainline to gcc-7-branch.
2019-01-23 Xiong Hu Luo <luoxhu@linux.vnet.ibm.com>
* gcc.target/powerpc/crypto-builtin-1.c
(crypto1_be, crypto2_be, crypto3_be, crypto4_be, crypto5_be):
New testcases.
From-SVN: r269450
2019-03-06 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/72714
Backport from trunk
* resolve.c (resolve_allocate_expr): Add some tests for coarrays.
2019-03-06 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/72714
Backport from trunk
* gfortran.dg/coarray_allocate_11.f90: New test.
From-SVN: r269441
2019-03-03 Harald Anlauf <anlauf@gmx.de>
Steven G. Kargl <kargl@gcc.gnu.org>
Backport from trunk
PR fortran/77583
* symbol.c (check_conflict): Check for valid procedure name
passed to error reporting routine.
PR fortran/77583
* gfortran.dg/pr77583.f90: New test.
Co-Authored-By: Steven G. Kargl <kargl@gcc.gnu.org>
From-SVN: r269355
2019-03-03 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87689
Backport from trunk
* trans-decl.c (gfc_get_extern_function_decl): Add argument
actual_args and pass it through to gfc_get_function_type.
* trans-expr.c (conv_function_val): Add argument actual_args
and pass it on to gfc_get_extern_function_decl.
(conv_procedure_call): Pass actual arguments to conv_function_val.
* trans-types.c (get_formal_from_actual_arglist): New function.
(gfc_get_function_type): Add argument actual_args. Generate
formal args from actual args if necessary.
* trans-types.h (gfc_get_function_type): Add optional argument.
* trans.h (gfc_get_extern_function_decl): Add optional argument.
2019-03-03 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87689
Backport from trunk
* gfortran.dg/lto/20091028-1_0.f90: Add -Wno-lto-type-mismatch to
options.
* gfortran.dg/lto/20091028-2_0.f90: Likewise.
* gfortran.dg/lto/pr87689_0.f: New file.
* gfortran.dg/lto/pr87689_1.f: New file.
* gfortran.dg/altreturn_9_0.f90: New file.
* gfortran.dg/altreturn_9_1.f90: New file.
From-SVN: r269350
PR ada/81956
Backport from mainline
2017-09-06 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_Call_Helper): Do not optimize calls to
null procedures when GNAT coverage is used, so that their (empty)
bodies are properly covered.
2017-09-06 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_Call_Helper): Replace call to null
procedure by a single null statement, after evaluating the
actuals that require it.
From-SVN: r269205
2019-02-23 Paul Thomas <pault@gcc.gnu.org>
Backport from trunk
PR fortran/88117
* resolve.c (deferred_op_assign): Return if the lhs expression
has the pointer attribute.
2019-02-23 Paul Thomas <pault@gcc.gnu.org>
Backport from trunk
PR fortran/88117
* gfortran.dg/deferred_character_32.f90 : New test
From-SVN: r269163
2019-02-23 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/71066
Backport from trunk
* trans-decl.c (generate_coarray_sym_init): For an array
constructor in a DATA statement of a coarray variable, set the
rank to 1 to avoid confusion later on. If the constructor
contains only one value, use that for initiailizig.
2019-02-23 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/71066
Backport from trunk
* gfortran.dg/coarray_data_1.f90: New test.
From-SVN: r269155
PR libstdc++/89446
* include/bits/char_traits.h (__constant_char_array): Check index is
in range before dereferencing.
* testsuite/21_strings/basic_string_view/operators/char/89446.cc:
New test.
From-SVN: r269143
2019-02-15 Martin Liska <mliska@suse.cz>
Backport from mainline
2019-02-14 Martin Liska <mliska@suse.cz>
PR rtl-optimization/89242
* dce.c (delete_unmarked_insns): Call free_dominance_info we
process a transformation.
2019-02-15 Martin Liska <mliska@suse.cz>
Backport from mainline
2019-02-14 Martin Liska <mliska@suse.cz>
PR rtl-optimization/89242
* g++.dg/pr89242.C: New test.
From-SVN: r268938
2019-02-15 Martin Liska <mliska@suse.cz>
Backport from mainline
2019-02-11 Martin Liska <mliska@suse.cz>
PR ipa/89009
* ipa-cp.c (build_toporder_info): Remove usage of a param.
* ipa-inline.c (inline_small_functions): Likewise.
* ipa-pure-const.c (propagate_pure_const): Likewise.
(propagate_nothrow): Likewise.
* ipa-reference.c (propagate): Likewise.
* ipa-utils.c (struct searchc_env): Remove unused field.
(searchc): Always search across AVAIL_INTERPOSABLE.
(ipa_reduced_postorder): Always allow AVAIL_INTERPOSABLE as
the only called IPA pure const can properly not propagate
across interposable boundary.
* ipa-utils.h (ipa_reduced_postorder): Remove param.
2019-02-15 Martin Liska <mliska@suse.cz>
Backport from mainline
2019-02-11 Martin Liska <mliska@suse.cz>
PR ipa/89009
* g++.dg/ipa/pr89009.C: New test.
From-SVN: r268937
Backport from mainline.
2019-01-10 Stefan Agner <stefan@agner.ch>
PR target/88648
* config/arm/arm.c (arm_option_override_internal): Force
opts->x_inline_asm_unified to true only if TARGET_THUMB2_P.
* gcc.target/arm/pr88648-asm-syntax-unified.c: Add test to
check if -masm-syntax-unified gets applied properly.
From-SVN: r268765
2019-02-10 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/71723
Backport from trunk
* expr.c (gfc_check_assign): Add argument is_init_expr. If we are
looking at an init expression, issue error if the target is not a
TARGET and we are not looking at a procedure pointer.
* gfortran.h (gfc_check_assign): Add optional argument
is_init_expr.
2019-02-10 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/71723
Backport from trunk
* gfortran.dg/pointer_init_2.f90: Adjust error messages.
* gfortran.dg/pointer_init_6.f90: Likewise.
* gfortran.dg/pointer_init_9.f90: New test.
From-SVN: r268751
* gcc-interface/trans.c (Regular_Loop_to_gnu): Replace tests on
individual flag_unswitch_loops and flag_tree_loop_vectorize switches
with test on global optimize switch.
(Raise_Error_to_gnu): Likewise.
From-SVN: r268673
Backport from mainline
2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (annotate_value): Tidy up.
<INTEGER_CST>: Set TCODE instead of recursing.
<COMPONENT_REF>: Set TCODE instead of calling Create_Node manually.
<MULT_EXPR, PLUS_EXPR>: Fold conversions into inner operations.
<BIT_AND_EXPR>: Adjust.
<CALL_EXPR>: Do not fall through.
From-SVN: r268598
* config/i386/i386.c (ix86_expand_prologue): Emit a memory blockage
after restoring registers saved to allocate the frame on Windows.
From-SVN: r268595
2019-02-05 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/67679
Backport from trunk
* trans-array.c (gfc_array_allocate): For setting the bounds on
the new array, add a condition for a not previously allocated
variable.
2019-02-05 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/67679
Backport from trunk
* gfortran.dg/warn_undefined_1.f90: New test.
* gfortran.dg/coarray_lock_7.f90: Fix patterns in test.
From-SVN: r268560
gcc/ChangeLog:
2019-02-05 Andreas Krebbel <krebbel@linux.ibm.com>
Backport from mainline
2019-02-05 Andreas Krebbel <krebbel@linux.ibm.com>
PR target/88856
* config/s390/s390.md: Remove load and test FP splitter.
From-SVN: r268552
2019-02-03 Paul Thomas <pault@gcc.gnu.org>
Backport from trunk
PR fortran/88393
* trans-expr.c (gfc_conv_procedure_call): For derived entities,
passed in parentheses to class formals, invert the order of
copying allocatable components to taking the _data of the
class expression.
2019-02-03 Paul Thomas <pault@gcc.gnu.org>
Backport from trunk
PR fortran/88393
* gfortran.dg/alloc_comp_assign_16.f03 : New test.
From-SVN: r268501
2019-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/88298
Backport from trunk
* arith.c (gfc_int2int): Do not warn if src->do_not_warn is set.
* gfortran.h (gfc_expr): Add flag do_not_warn.
* intrinsic.c (gfc_convert_type_warn): Set expr->do_not_warn if
no warning is desired.
2019-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/88298
Backport from trunk
* gfortran.dg/warn_conversion_10.f90: New test.
From-SVN: r268479
2019-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/57048
Backport from trunk
* interface.c (gfc_compare_types): If a derived type and an
integer both have a derived type, and they are identical,
this is a C binding type and compares equal.
2019-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/57048
Backport from trunk
* gfortran.dg/c_funptr_1.f90: New file.
* gfortran.dg/c_funptr_1_mod.f90: New file.
From-SVN: r268478
2018-01-31 Bill Schmidt <wschmidt@linux.ibm.com>
Backport from mainline
2018-01-31 Bill Schmidt <wschmidt@linux.ibm.com>
PR tree-optimization/89008
* gimple-ssa-strength-reduction.c (slsr_process_mul): Don't
process anything of the form X * 0.
From-SVN: r268431
2019-01-31 Richard Biener <rguenther@suse.de>
Backport from mainline
2019-01-31 Richard Biener <rguenther@suse.de>
PR rtl-optimization/89115
* lra.c (lra_rtx_hash): Properly hash CONST_INT values.
2019-01-30 Richard Biener <rguenther@suse.de>
PR rtl-optimization/89115
* opts.c (default_options_optimization): Reduce
PARAM_MAX_DSE_ACTIVE_LOCAL_STORES by a factor of 10 at -O1.
Make PARAM_LOOP_INVARIANT_MAX_BBS_IN_LOOP reduction relative
to the default.
From-SVN: r268418
2019-01-30 Kewen Lin <linkw@gcc.gnu.org>
Backport from mainline.
gcc/
2019-01-17 Kewen Lin <linkw@gcc.gnu.org>
* doc/extend.texi: Add four new prototypes for vec_ld and seven new
prototypes for vec_st.
* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add entries
for scalar address type variants of altivec_vec_ld/altivec_vec_st,
mainly on signed/unsigned long long and double.
gcc/testsuite/
2019-01-20 Kewen Lin <linkw@gcc.gnu.org>
* gcc.target/powerpc/altivec_vld_vst_addr.c: Remove, split into
altivec_vld_vst_addr-1.c and altivec_vld_vst_addr-2.c.
* gcc.target/powerpc/altivec_vld_vst_addr-1.c: New test.
* gcc.target/powerpc/altivec_vld_vst_addr-2.c: Ditto.
2019-01-17 Kewen Lin <linkw@gcc.gnu.org>
* gcc.target/powerpc/altivec_vld_vst_addr.c: New test.
From-SVN: r268383
2019-01-27 Paul Thomas <pault@gcc.gnu.org>
Backport from trunk
PR fortran/56386
PR fortran/58906
PR fortran/77385
PR fortran/80260
PR fortran/82077
* resolve.c (resolve_variable): Fix up expressions with array
associate names, where the parser did not detect that this is
array and there was no array part_ref in the expression.
* trans-expr.c (gfc_find_and_cut_at_last_class_ref): base_expr
should be a copy of e and not the initialization expr.
2019-01-27 Paul Thomas <pault@gcc.gnu.org>
Backport from trunk
PR fortran/56386
PR fortran/58906
PR fortran/77385
* gfortran.dg/associate_44.f90 : New test.
PR fortran/80260
* gfortran.dg/select_type_45.f90 : New test.
PR fortran/82077
* gfortran.dg/select_type_46.f90 : New test.
From-SVN: r268317
* gcc-interface/decl.c (array_type_has_nonaliased_component): Return
the same value for every dimension of a multidimensional array type.
From-SVN: r268316
PR target/88948
* rtl.h (prepare_copy_insn): New prototype.
* gcse.c (prepare_copy_insn): New function, split out from
process_insert_insn.
(process_insert_insn): Use prepare_copy_insn.
* store-motion.c (replace_store_insn): Use prepare_copy_insn
instead of gen_move_insn.
testsuite/ChangeLog:
PR target/88948
* gcc.target/i386/pr88948.c: New test.
From-SVN: r268312
* gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Use
DECL_SIZE_UNIT instead of TYPE_SIZE_UNIT for the size to be assigned
by a call to memset if the LHS is a DECL.
From-SVN: r268298
* gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Use test on
the sign bit instead of on the sign of the value.
<PLUS_EXPR>: Turn addition of negative constant into subtraction.
<BIT_AND_EXPR>: Simplify.
From-SVN: r268288
2019-01-24 Richard Biener <rguenther@suse.de>
Backport from mainline
2019-01-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/89008
* tree-ssa-reassoc.c (eliminate_using_constants): For * 0 do
not leave another stray operand.
* gcc.dg/torture/pr89008.c: New testcase.
From-SVN: r268235
Bugs 88720 and 88726 report issues where a function is declared inline
in an inner scope, resulting in spurious diagnostics about it being
declared but never defined when that scope is left (possibly in some
cases also wrongly referring to the function as a nested function).
These are regressions that were introduced with the support for C99
inline semantics in 4.3 (they don't appear with 4.2; it's possible
some aspects of the bugs might have been introduced later than 4.3).
For the case of functions being wrongly referred to as nested,
DECL_EXTERNAL was not the right condition for a function being
non-nested; TREE_PUBLIC is appropriate for the case of non-nested
functions with external linkage, while !b->nested means this is the
outermost scope in which the function was declared and so avoids
catching the case of a file-scope static being redeclared inline
inside a function.
For the non-nested, external-linkage case, the code attempts to avoid
duplicate diagnostics by diagnosing only when scope != external_scope,
but actually scope == external_scope is more appropriate, as it's only
when the file and external scopes are popped that the code can
actually tell whether a function ended up being defined, and all such
functions will appear in the (GCC-internal) external scope.
Bootstrapped with no regressions on x86_64-pc-linux-gnu.
gcc/c:
Backport from mainline
2019-01-07 Joseph Myers <joseph@codesourcery.com>
PR c/88720
PR c/88726
* c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
whether a function is nested, not DECL_EXTERNAL. Diagnose inline
functions declared but never defined only for external scope, not
for other scopes.
gcc/testsuite:
Backport from mainline
2019-01-07 Joseph Myers <joseph@codesourcery.com>
PR c/88720
PR c/88726
* gcc.dg/inline-40.c, gcc.dg/inline-41.c: New tests.
From-SVN: r267987
2019-01-16 Martin Jambor <mjambor@suse.cz>
Backported from mainline
2018-12-10 Martin Jambor <mjambor@suse.cz>
PR ipa/88214
* ipa-prop.c (determine_locally_known_aggregate_parts): Make sure
we check pointers against pointers.
testsuite/
* gcc.dg/ipa/pr88214.c: New test.
From-SVN: r267975
2019-01-15 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/81849
* resolve.c (resolve_symbol): Host associated varaibles can appear
in the specification statement of a RESULT array.
2019-01-15 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/81849
* gfortran.dg/pr81849.f90: New test.
From-SVN: r267952
2019-01-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/88776
* io/list_read.c (namelist_read): Use nml_err_ret path on read error
not based on stdin_unit.
* io/open.c (newunit): Free format buffer if the unit specified is for
stdin, stdout, or stderr.
* gfortran.dg/namelist_96.f90: New test.
From-SVN: r267911
2019-01-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/35031
* decl.c (gfc_match_entry): Check for F2018:C1546. Fix nearby
mis-indentation.
2019-01-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/35031
* gfortran.dg/pr35031.f90: new test.
From-SVN: r267874
PR target/84010
* config/sparc/sparc.c (sparc_legitimize_tls_address): Only use Pmode
consistently in TLS address generation and adjust code to the renaming
of patterns. Mark calls to __tls_get_addr as const.
* config/sparc/sparc.md (tgd_hi22): Turn into...
(tgd_hi22<P:mode>): ...this and use Pmode throughout.
(tgd_lo10): Turn into...
(tgd_lo10<P:mode>): ...this and use Pmode throughout.
(tgd_add32): Merge into...
(tgd_add64): Likewise.
(tgd_add<P:mode>): ...this and use Pmode throughout.
(tldm_hi22): Turn into...
(tldm_hi22<P:mode>): ...this and use Pmode throughout.
(tldm_lo10): Turn into...
(tldm_lo10<P:mode>): ...this and use Pmode throughout.
(tldm_add32): Merge into...
(tldm_add64): Likewise.
(tldm_add<P:mode>): ...this and use Pmode throughout.
(tldm_call32): Merge into...
(tldm_call64): Likewise.
(tldm_call<P:mode>): ...this and use Pmode throughout.
(tldo_hix22): Turn into...
(tldo_hix22<P:mode>): ...this and use Pmode throughout.
(tldo_lox10): Turn into...
(tldo_lox10<P:mode>): ...this and use Pmode throughout.
(tldo_add32): Merge into...
(tldo_add64): Likewise.
(tldo_add<P:mode>): ...this and use Pmode throughout.
(tie_hi22): Turn into...
(tie_hi22<P:mode>): ...this and use Pmode throughout.
(tie_lo10): Turn into...
(tie_lo10<P:mode>): ...this and use Pmode throughout.
(tie_ld64): Use DImode throughout.
(tie_add32): Merge into...
(tie_add64): Likewise.
(tie_add<P:mode>): ...this and use Pmode throughout.
(tle_hix22_sp32): Merge into...
(tle_hix22_sp64): Likewise.
(tle_hix22<P:mode>): ...this and use Pmode throughout.
(tle_lox22_sp32): Merge into...
(tle_lox22_sp64): Likewise.
(tle_lox22<P:mode>): ...this and use Pmode throughout.
(*tldo_ldub_sp32): Merge into...
(*tldo_ldub_sp64): Likewise.
(*tldo_ldub<P:mode>): ...this and use Pmode throughout.
(*tldo_ldub1_sp32): Merge into...
(*tldo_ldub1_sp64): Likewise.
(*tldo_ldub1<P:mode>): ...this and use Pmode throughout.
(*tldo_ldub2_sp32): Merge into...
(*tldo_ldub2_sp64): Likewise.
(*tldo_ldub2<P:mode>): ...this and use Pmode throughout.
(*tldo_ldsb1_sp32): Merge into...
(*tldo_ldsb1_sp64): Likewise.
(*tldo_ldsb1<P:mode>): ...this and use Pmode throughout.
(*tldo_ldsb2_sp32): Merge into...
(*tldo_ldsb2_sp64): Likewise.
(*tldo_ldsb2<P:mode>): ...this and use Pmode throughout.
(*tldo_ldub3_sp64): Use DImode throughout.
(*tldo_ldsb3_sp64): Likewise.
(*tldo_lduh_sp32): Merge into...
(*tldo_lduh_sp64): Likewise.
(*tldo_lduh<P:mode>): ...this and use Pmode throughout.
(*tldo_lduh1_sp32): Merge into...
(*tldo_lduh1_sp64): Likewise.
(*tldo_lduh1<P:mode>): ...this and use Pmode throughout.
(*tldo_ldsh1_sp32): Merge into...
(*tldo_ldsh1_sp64): Likewise.
(*tldo_ldsh1<P:mode>): ...this and use Pmode throughout.
(*tldo_lduh2_sp64): Use DImode throughout.
(*tldo_ldsh2_sp64): Likewise.
(*tldo_lduw_sp32): Merge into...
(*tldo_lduw_sp64): Likewise.
(*tldo_lduw<P:mode>): ...this and use Pmode throughout.
(*tldo_lduw1_sp64): Use DImode throughout.
(*tldo_ldsw1_sp64): Likewise.
(*tldo_ldx_sp64): Likewise.
(*tldo_stb_sp32): Merge into...
(*tldo_stb_sp64): Likewise.
(*tldo_stb<P:mode>): ...this and use Pmode throughout.
(*tldo_sth_sp32): Merge into...
(*tldo_sth_sp64): Likewise.
(*tldo_sth<P:mode>): ...this and use Pmode throughout.
(*tldo_stw_sp32): Merge into...
(*tldo_stw_sp64): Likewise.
(*tldo_stw<P:mode>): ...this and use Pmode throughout.
(*tldo_stx_sp64): Use DImode throughout.
Co-Authored-By: James Clarke <jrtc27@jrtc27.com>
From-SVN: r267773
causes problems with soft-fp in GLIBC, see pr comment 11
2019-01-03 Iain Sandoe <iain@sandoe.co.uk>
revert:
2018-12-30 Iain Sandoe <iain@sandoe.co.uk>
backport from mainline.
2018-12-12 Segher Boessenkool <segher@kernel.crashing.org>
Iain Sandoe <iain@sandoe.co.uk>
PR target/88343
* config/rs6000/rs6000.c (save_reg_p): Do not save the picbase reg
unless it has been used.
(first_reg_to_save): Remove dead code.
From-SVN: r267542
2018-12-30 Iain Sandoe <iain@sandoe.co.uk>
backport from mainline.
2018-12-12 Segher Boessenkool <segher@kernel.crashing.org>
Iain Sandoe <iain@sandoe.co.uk>
PR target/88343
* config/rs6000/rs6000.c (save_reg_p): Do not save the picbase reg
unless it has been used.
(first_reg_to_save): Remove dead code.
From-SVN: r267477
2018-12-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/82550
* trans_decl.c (gfc_get_symbol_decl): Procedure symbols that
have the 'used_in_submodule' attribute should be processed by
'gfc_get_extern_function_decl'.
2018-12-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/82550
* gfortran.dg/submodule_30.f08 : New test.
From-SVN: r267466
2018-12-24 Iain Sandoe <iain@sandoe.co.uk>
* adaint.c [__APPLE__] (__gnat_lwp_self): Ensure that the system
interface used is available on the target.
From-SVN: r267410
This was optional in SUSv6 and isn't implemented on Darwin.
2018-12-24 Iain Sandoe <iain@sandoe.co.uk>
2018-08-16 Iain Sandoe <iain@sandoe.co.uk>
* g++.dg/torture/pr44295.C : Skip for Darwin.
From-SVN: r267405
2018-12-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/77703
* resolve.c (get_temp_from_expr): Use the string length of
constant character expressions.
2018-12-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/77703
* gfortran.dg/ptr_func_assign_5.f08 : New test.
From-SVN: r267383
2018-12-22 Steven G . Kargl <kargl@gcc.gnu.org>
PR fortran/85798
* decl.c (gfc_match_data): If a component of a derived type entity
appears in data statement, check that does not have the allocatable
attribute.
2018-12-22 Steven G . Kargl <kargl@gcc.gnu.org>
PR fortran/85798
* gfortran.dg/pr85798.f90: New test.
From-SVN: r267362
2018-12-21 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88169
* module.c (mio_namelist): Remove an error condition/message that
is contrary to the Fortran standard.
2018-12-21 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88169
* gfortran.dg/pr88169_1.f90: new test.
* gfortran.dg/pr88169_2.f90: Ditto.
* gfortran.dg/pr88169_3.f90: Ditto.
From-SVN: r267354
2018-12-19 Bill Schmidt <wschmidt@linux.ibm.com>
Backport from mainline
2018-12-18 Bill Schmidt <wschmidt@linux.ibm.com>
* doc/extend.texi (PowerPC Altivec/VSX Built-in Functions):
Describe when a typedef name can be used as the type specifier for
a vector type, and when it cannot.
From-SVN: r267284
2018-12-15 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88138
* decl.c (variable_decl): Check that a derived isn't being assigned
an incompatible entity in an initialization.
2018-12-15 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88138
* gfortran.dg/pr88138.f90: new test.
From-SVN: r267180
libitm/
Backport from mainline
2018-12-13 Peter Bergner <bergner@linux.ibm.com>
* config/powerpc/target.h (htm_available): Add support for
PPC_FEATURE2_HTM_NO_SUSPEND. Use __builtin_cpu_supports if available.
From-SVN: r267103
The (unsigned) long int to double vector conversion instructions
expect 2 immediate parameters. One for the inexact suppression
control and another one for the rounding mode. However, the
vec_double builtin has just the vector source operand. The 2
addtional operands need to be added with an intermediate expander.
The expanders were already there but unfortunately not wired up
correctly to the builtin.
gcc/ChangeLog:
2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
Backport from mainline
2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390-builtins.def (s390_vec_double_s64): Map to
s390_vec_double_s64 instead of s390_vcdgb.
(s390_vec_double_u64): Map to s390_vec_double_u64 instead of
s390_vcdlgb.
gcc/testsuite/ChangeLog:
2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
Backport from mainline
2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
* gcc.target/s390/zvector/vec-double-1.c: New test.
* gcc.target/s390/zvector/vec-double-2.c: New test.
From-SVN: r267088
gcc/
Backport from mainline
2018-12-07 Peter Bergner <bergner@linux.ibm.com>
PR target/87496
* config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
-mabi=ieeelongdouble and -mabi=ibmlongdouble without -mlong-double-128.
Do not error for -mabi=ibmlongdouble and no ISA 2.06 support.
* doc/invoke.texi: Document -mabi=ibmlongdouble and -mabi=ieeelongdouble
require -mlong-double-128.
gcc/testsuite/
Backport from mainline
2018-12-07 Peter Bergner <bergner@linux.ibm.com>
PR target/87496
* gcc.target/powerpc/pr87496-1.c: New test.
* gcc.target/powerpc/pr87496-2.c: New test.
* gcc.target/powerpc/pr87496-3.c: New test.
From-SVN: r267062
2018-12-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88155
* primary.c (gfc_match_structure_constructor): Set the locus of
an expression to avoid a NULL pointer dereference.
2018-12-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88155
* gfortran.dg/pr70870_1.f90: Update testcase to use -std=gnu.
* gfortran.dg/pr88155.f90: New test.
From-SVN: r267043
2018-12-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88249
* gfortran.h: Update prototype for gfc_resolve_filepos().
* io.c (gfc_resolve_filepos): Check for UNIT number if ERR= is present.
Use passed in locus for error message.
* resolve.c (gfc_resolve_code): Pass locus in gfc_resolve_filepos()
call.
2018-12-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88249
* gfortran.dg/pr88249.f90: New test.
From-SVN: r267037
2018-12-10 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88269
* io.c (io_constraint): Update macro. If locus line buffer is NULL,
use gfc_current_locus in error messages.
(check_io_constraints): Catch missing IO UNIT in write and read
statements. io_constraint macro is incompatible here.
2018-12-10 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88269
* gfortran.dg/pr88269.f90: New test.
From-SVN: r266962
2018-12-09 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88205
* io.c (gfc_match_open): Move NEWUNIT checks to after STATUS checks.
2018-12-09 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88205
* gfortran.dg/pr88205.f90: New unit.
From-SVN: r266941
2018-12-09 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88206
* match.c (gfc_match_type_spec): REAL can be an intrinsic function.
2018-12-09 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88206
* gfortran.dg/pr88206.f90: New test.
From-SVN: r266934
2018-12-09 Fritz Reese <fritzoreese@gmail.com>
PR fortran/88228
* resolve.c (resolve_operator): Do not call resolve_function.
Break like other cases.
2018-12-09 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88228
* gfortran.dg/pr88228.f90: New test.
From-SVN: r266928
From backtrace.h for backtrace_create_state:
Calling this function allocates resources that can not be freed.
There is no backtrace_free_state function. The state is used to
cache information that is expensive to recompute. Programs are
expected to call this function at most once and to save the return
value for all later calls to backtrace functions.
So instead of calling backtrace_create_state every time we wish to
show a backtrace, do it once and store the result in a static
variable. libbacktrace allows multiple threads to access the state,
so no need to use TLS, but use atomic load/store to access the static
variable.
Regtested on x86_64-pc-linux-gnu.
libgfortran/ChangeLog:
2018-12-06 Janne Blomqvist <jb@gcc.gnu.org>
Backport from trunk
PR libfortran/88137
* runtime/backtrace.c (show_backtrace): Store backtrace state in a
static variable, initialize once.
From-SVN: r266858
2018-11-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/79351
* tree-ssa-sccvn.c (vn_reference_lookup_3): For assignments from
empty CONSTRUCTORs ensure the store is at a constant position.
* gcc.dg/torture/pr79351.c: New testcase.
From-SVN: r266556
2018-11-26 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
PR bootstrap/81033
PR target/81733
PR target/52795
* gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
(dwarf2out_switch_text_section): Generate a local label for the second
function sub-section and apply it as the second FDE start label.
* gcc/final.c (final_scan_insn_1): Emit second FDE label after the second
sub-section start.
From-SVN: r266478
PR c++/84281
2018-02-12 Richard Biener <rguenther@suse.de>
* constexpr.c (cxx_eval_vec_init_1): Use a RANGE_EXPR to compact
uniform constructors and delay allocating them fully.
From-SVN: r266469
My patch of 2016-08-26 to avoid calling a trivial default constructor
introduced TARGET_EXPRs initialized with void_node to express trivial
initialization. But when this shows up in a VEC_INIT_EXPR, we weren't
prepared to handle it. Fixed by handling it explicitly in
cxx_eval_vec_init_1.
* constexpr.c (cxx_eval_vec_init_1): Handle trivial initialization.
From-SVN: r266468
The flogr instruction uses a 64 bit register pair target operand. In
the RTX we model this as a write to a TImode register. Unfortunately
the RTX's being assigned to the two parts of the target operand were
swapped. This is no problem if in the end the flogr instruction will
be emitted since the instruction still does what the clzdi expander
expects. However, a problem arises when the RTX is used to optimize
CLZ for a constant input operand. Even then it matters only if the
expression couldn't be folded on tree level already.
In the testcase this happened thanks to loop unrolling on RTL level.
The iteration variable is used as an argument to the clz
builtin. Due to the loop unrolling it becomes a constant and after
folding the broken RTX leads to a wrong assumption.
gcc/ChangeLog:
2018-11-26 Andreas Krebbel <krebbel@linux.ibm.com>
Backport from mainline
2018-11-20 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390.md ("clztidi2"): Swap the RTX's written to the
DImode parts of the target operand.
gcc/testsuite/ChangeLog:
2018-11-26 Andreas Krebbel <krebbel@linux.ibm.com>
Backport from mainline
2018-11-20 Andreas Krebbel <krebbel@linux.ibm.com>
* gcc.target/s390/flogr-1.c: New test.
From-SVN: r266466
2018-11-26 Richard Biener <rguenther@suse.de>
Backport from mainline
2018-10-15 Richard Biener <rguenther@suse.de>
PR middle-end/87610
* tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
(visit_loadstore): When a used restrict tag escaped verify that
the points-to solution of "other" pointers do not include
escaped.
(compute_dependence_clique): If a used restrict tag escaped
communicated that down to visit_loadstore.
* gcc.dg/torture/restrict-6.c: New testcase.
2018-10-25 Richard Biener <rguenther@suse.de>
PR tree-optimization/87665
PR tree-optimization/87745
* tree-vectorizer.h (get_earlier_stmt): Remove.
(get_later_stmt): Pick up UID from the original non-pattern stmt.
* gfortran.dg/20181025-1.f: New testcase.
2018-10-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/87665
* tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
to reflect reality.
* gcc.dg/torture/pr87665.c: New testcase.
From-SVN: r266460
2018-11-25 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/88073
* frontend-passes.c (combine_array_constructor): Do not do
anything if in a WHERE statement.
2018-11-25 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/88073
* gfortran.dg/where_7.f90: New test.
From-SVN: r266437
2018-11-24 Paul Thomas <pault@gcc.gnu.org>
PR fortran/88143
* resolve.c (resolve_variable): Check for associate names with
NULL target.
2018-11-24 Paul Thomas <pault@gcc.gnu.org>
PR fortran/88143
* gfortran.dg/associate_46.f90: New test.
From-SVN: r266431
Backport from mainline
2018-11-21 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/85925
* gcc.c-torture/execute/20181120-1.c: Require effective target
int32plus.
(u): New variable.
(main): Compare d against u.f1 rather than 0x101. Use 0x4030201
instead of 0x10101.
From-SVN: r266384
2018-11-22 Tom de Vries <tdevries@suse.de>
backport from trunk:
2017-11-19 Tom de Vries <tom@codesourcery.com>
PR target/82961
* vmsdbgout.c (vmsdbgout_early_finish): New function.
(vmsdbg_debug_hooks): Set early_finish field to vmsdbgout_early_finish.
From-SVN: r266375
2018-11-21 Mihail Ionescu <mihail.ionescu@arm.com>
gcc/
PR target/87867
Backport from mainiline
2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
* config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
(arm32_output_mi_thunk): Deal with long calls.
gcc/testsuite/
PR target/87867
Backport from mainiline
2018-09-17 Eric Botcazou <ebotcazou@adacore.com>
* g++.dg/other/thunk2a.C: New test.
* g++.dg/other/thunk2b.C: Likewise.
From-SVN: r266348
2018-11-20 Richard Biener <rguenther@suse.de>
Backport from mainline
2018-03-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/84777
* tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
force-vectorize loops ignore whether we are optimizing for size.
2018-01-26 Richard Biener <rguenther@suse.de>
PR rtl-optimization/84003
* dse.c (record_store): Only record redundant stores when
the earlier store aliases at least all accesses the later one does.
* g++.dg/torture/pr77745.C: Mark foo noinline to trigger
latent bug in DSE if NOINLINE is appropriately defined.
* g++.dg/torture/pr77745-2.C: New testcase including pr77745.C
and defining NOINLINE.
From-SVN: r266318
* gcc-interface/misc.c (gnat_init_gcc_eh): Do not override the switch
-fnon-call-exceptions passed on the command line in -gnatp mode.
From-SVN: r266178
* gcc-interface/misc.c (gnat_init_gcc_eh): Set -fnon-call-exceptions
for the runtime on platforms where System.Machine_Overflow is true.
From-SVN: r266059
Backport from mainline
2018-11-04 Uros Bizjak <ubizjak@gmail.com>
PR middle-end/58372
* cfgexpand.c (pass_expand::execute): Move the call to
finish_eh_generation in front of the call to expand_stack_alignment.
testsuite/ChangeLog:
Backport from mainline
2018-11-04 Uros Bizjak <ubizjak@gmail.com>
PR middle-end/58372
* g++.dg/pr58372.C: New test.
From-SVN: r266015
* fe.h (Suppress_Checks): Declare.
* gcc-interface/misc.c (gnat_init_gcc_eh): Set -fnon-call-exceptions
only if checks are not suppressed and -faggressive-loop-optimizations
only if they are.
* gcc-interface/trans.c (struct loop_info_d): Remove has_checks and
warned_aggressive_loop_optimizations fields.
(gigi): Do not clear warn_aggressive_loop_optimizations here.
(Raise_Error_to_gnu): Do not set has_checks.
(gnat_to_gnu) <N_Indexed_Component>: Remove support for aggressive
loop optimizations.
From-SVN: r265923
xtensa-uclinux uses bFLT executable file format that cannot relocate
fields representing offsets from data to code. C++ objects built as PIC
use offsets to encode FDE structures. As a result C++ exception handling
doesn't work correctly on xtensa-uclinux. Don't use PIC by default on
xtensa-uclinux.
gcc/
2018-11-07 Max Filippov <jcmvbkbc@gmail.com>
Backport from mainline
2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
* config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
From-SVN: r265889
The introduction of the empty __pair_base base class for PR 86751
changed the layout of std::pair<std::pair<...>, ...>. The outer pair and
its first member both have a base class of the same type, which cannot
exist at the same address. This causes the first member to be at a
non-zero offset.
The solution is to make the base class depend on the template
parameters, so that each pair type has a different base class type,
which allows the base classes of the outer pair and its first member to
have the same address.
PR libstdc++/87822
* include/bits/stl_pair.h (__pair_base): Change to class template.
(pair): Make base class type depend on template parameters.
* testsuite/20_util/pair/87822.cc: New test.
From-SVN: r265683
[gcc]
2018-10-26 Bill Schmidt <wschmidt@linux.ibm.com>
Backport from mainline
2018-10-19 Bill Schmidt <wschmidt@linux.ibm.com>
PR tree-optimization/87473
* gimple-ssa-strength-reduction.c (record_phi_increments): For
phi arguments identical to the base expression of the phi
candidate, record a phi-adjust increment of zero minus the index
expression of the hidden basis.
(phi_incr_cost): For phi arguments identical to the base
expression of the phi candidate, the difference to compare against
the increment is zero minus the index expression of the hidden
basis, and there is no potential savings from replacing the (phi)
statement.
(ncd_with_phi): For phi arguments identical to the base expression
of the phi candidate, the difference to compare against the
increment is zero minus the index expression of the hidden basis.
(all_phi_incrs_profitable): For phi arguments identical to the
base expression of the phi candidate, the increment to be checked
for profitability is zero minus the index expression of the hidden
basis.
[gcc/testsuite]
2018-10-26 Bill Schmidt <wschmidt@linux.ibm.com>
Backport from mainline
2018-10-19 Bill Schmidt <wschmidt@linux.ibm.com>
PR tree-optimization/87473
* gcc.c-torture/compile/pr87473.c: New file.
From-SVN: r265547
The move constructor for the SSO string uses assign(const basic_string&)
when either:
(1) the source string is "local" and so the contents of the small string
buffer need to be copied, or
(2) the allocator does not propagate and is_always_equal is false.
Case (1) is suboptimal, because the assign member is not noexcept and
the compiler isn't smart enough to see it won't actually throw in this
case. This causes extra code in the move assignment operator so that any
exception will be turned into a call to std::terminate. This can be
fixed by copying small strings inline instead of calling assign.
Case (2) is a bug, because the specific instances of the allocators
could be equal even if is_always_equal is false. This can result in an
unnecessary deep copy (and potentially-throwing allocation) when the
storage should be moved. This can be fixed by simply checking if the
allocators are equal.
PR libstdc++/87749
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
(basic_string::operator=(basic_string&&)): For short strings copy the
buffer inline. Only fall back to using assign(const basic_string&) to
do a deep copy when reallocation is needed.
* testsuite/21_strings/basic_string/modifiers/assign/char/87749.cc:
New test.
* testsuite/21_strings/basic_string/modifiers/assign/char/
move_assign_optim.cc: New test.
* testsuite/21_strings/basic_string/modifiers/assign/wchar_t/87749.cc:
New test.
* testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
move_assign_optim.cc: New test.
From-SVN: r265497
Using a delegating constructor to implement these constructors means
that they instantiate the destructor, which requires the element_type to
be complete. In C++11 and C++14 they were specified to be delegating,
but that was changed as part of LWG 2801 so in C++17 they don't require
a complete type (as was intended all along).
PR libstdc++/87704
* include/bits/unique_ptr.h (unique_ptr::unique_ptr(nullptr_t)): Do
not delegate to default constructor.
(unique_ptr<T[], D>::unique_ptr(nullptr_t)): Likewise.
* testsuite/20_util/unique_ptr/cons/incomplete.cc: New test.
From-SVN: r265429
Consider test.C compiled at -O0 -g:
...
class string {
public:
string (const char *p) { this->p = p ; }
string (const string &s) { this->p = s.p; }
private:
const char *p;
};
class foo {
public:
foo (string dir_hint) {}
};
int
main (void)
{
std::string s = "This is just a string";
foo bar(s);
return 0;
}
...
When parsing foo::foo, the dir_hint parameter gets a DECL_ARG_TYPE of
'struct string & restrict'. Then during finish_struct, we call
clone_constructors_and_destructors and create clones for foo::foo, and
set the DECL_ARG_TYPE in the same way.
Later on, during finish_function, cp_genericize is called for the original
foo::foo, which sets the type of parm dir_hint to DECL_ARG_TYPE, and sets
DECL_BY_REFERENCE of dir_hint to 1.
After that, during maybe_clone_body update_cloned_parm is called with:
...
(gdb) call debug_generic_expr (parm.typed.type)
struct string & restrict
(gdb) call debug_generic_expr (cloned_parm.typed.type)
struct string
...
The type of the cloned_parm is then set to the type of parm, but
DECL_BY_REFERENCE is not set.
When doing cp_genericize for the clone later on,
TREE_ADDRESSABLE (TREE_TYPE ()) is no longer true for the updated type for
the parm, so DECL_BY_REFERENCE is not set there either.
The missing DECL_BY_REFERENCE on cloned_parm causes incorrect debug info to be
generated.
This patch fixes the problem by copying DECL_BY_REFERENCE in update_cloned_parm.
Bootstrapped and reg-tested on x86_64.
2018-10-23 Tom de Vries <tdevries@suse.de>
backport from trunk:
2018-07-31 Tom de Vries <tdevries@suse.de>
PR debug/86687
* optimize.c (update_cloned_parm): Copy DECL_BY_REFERENCE.
* g++.dg/guality/pr86687.C: New test.
From-SVN: r265427
* gcc-interface/utils.c (unchecked_convert): Use local variables for
the biased and reverse SSO attributes of both types.
Further extend the processing of integral types in the presence of
reverse SSO to all scalar types.
From-SVN: r265383
gcc/ChangeLog:
2018-10-19 Andreas Krebbel <krebbel@linux.ibm.com>
Backport from mainline
2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390.c (s390_expand_vec_init): Force vector element
into reg if it isn't a general operand.
gcc/testsuite/ChangeLog:
2018-10-19 Andreas Krebbel <krebbel@linux.ibm.com>
Backport from mainline
2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
* g++.dg/vec-init-1.C: New test.
From-SVN: r265309
Use the value of the first element as the initial value of the
__valarray_sum accumulator. Value-initialization might not create the
additive identity for the value type.
PR libstdc++/87641
* include/bits/valarray_array.h (__valarray_sum): Use first element
to initialize accumulator instead of value-initializing it.
* testsuite/26_numerics/valarray/87641.cc: New test.
From-SVN: r265285
PR middle-end/87623
* fold-const.c (fold_truth_andor_1): If the right side is not constant,
bail out if both sides do not have the same storage order.
From-SVN: r265244
As mentioned in PR87511, the shift used in aarch64_mask_and_shift_for_ubfiz_p
should be evaluated as a HOST_WIDE_INT rather than int.
Backported from mainline
gcc/
PR target/87511
* config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
Use HOST_WIDE_INT_1U for shift.
testsuite/
PR target/87511
* gcc.target/aarch64/pr87511.c: Add new test.
From-SVN: r265195
Glibc changed the it_IT locales to use thousands separators,
invalidating this test. Use nl_NL instead, as Dutch only uses grouping
for money not numbers.
* testsuite/22_locale/numpunct/members/char/3.cc: Adjust test to
account for change to glibc it_IT localedata (glibc bz#10797).
From-SVN: r265167
Backported from mainline
2018-10-10 Jakub Jelinek <jakub@redhat.com>
PR target/87550
* config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
to special_args set.
* gcc.target/i386/pr87550.c: New test.
From-SVN: r265112
Backported from mainline
2018-09-12 Jakub Jelinek <jakub@redhat.com>
PR middle-end/87248
* fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
BIT_AND_EXPR's second operand is a power of two. Formatting fix.
* c-c++-common/torture/pr87248.c: New test.
From-SVN: r265111
Backported from mainline
2018-07-24 Jakub Jelinek <jakub@redhat.com>
PR middle-end/86627
* expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
and abs_d == d, do the power of two handling if profitable.
* gcc.target/i386/pr86627.c: New test.
From-SVN: r265109
Backported from mainline
2018-07-17 Jakub Jelinek <jakub@redhat.com>
PR middle-end/86542
* omp-low.c (create_task_copyfn): Copy over also fields corresponding
to _looptemp_ clauses, other than the first two.
* testsuite/libgomp.c++/pr86542.C: New test.
From-SVN: r265108
Backported from mainline
2018-07-17 Jakub Jelinek <jakub@redhat.com>
PR middle-end/86539
* gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
and cond temporaries don't have reference type if iterator has
pointer type. For init use &for_pre_body instead of pre_p if
for_pre_body is non-empty.
* testsuite/libgomp.c++/pr86539.C: New test.
From-SVN: r265107
Backported from mainline
2018-07-10 Jakub Jelinek <jakub@redhat.com>
PR fortran/86421
* module.c (omp_declare_simd_clauses): Add LINEAR with _REF, _VAL and
_UVAL suffixes.
(mio_omp_declare_simd): Save and restore ref, val and uval modifiers
on linear clauses. Initialize n->where to gfc_current_locus.
* gfortran.dg/vect/pr86421.f90: New test.
From-SVN: r265106
Backported from mainline
2018-07-26 Jakub Jelinek <jakub@redhat.com>
PR middle-end/86660
* omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
declare target to variables if they have always,{to,from,tofrom} map
kinds.
* testsuite/libgomp.c/pr86660.c: New test.
From-SVN: r265105
Backported from mainline
2018-07-16 Jakub Jelinek <jakub@redhat.com>
PR c++/3698
PR c++/86208
* cp-gimplify.c (cp_genericize_r): When using extern_decl_map, or
in TREE_USED flag from stmt to h->to.
* g++.dg/opt/pr3698.C: New test.
From-SVN: r265103
2018-10-12 Richard Biener <rguenther@suse.de>
Backport from mainline
2018-08-23 Richard Biener <rguenther@suse.de>
PR middle-end/87024
* tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
calls.
* gcc.dg/pr87024.c: New testcase.
2018-08-17 Richard Biener <rguenther@suse.de>
PR middle-end/86505
* tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
across a va-arg-pack using call adjust its return value accordingly.
* gcc.dg/torture/pr86505.c: New testcase.
From-SVN: r265100
The solution for PR 77537 causes ambiguities due to the extra copy
assignment operator taking a __nonesuch_no_braces parameter. By making
the base class non-assignable we don't need the extra deleted overload
in std::pair. The copy assignment operator will be implicitly deleted
(and the move assignment operator not declared) as needed. Without the
additional user-provided operator in std::pair the ambiguity is avoided.
Backport from mainline
2018-07-31 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/86751
* include/bits/stl_pair.h (__pair_base): New class with deleted copy
assignment operator.
(pair): Derive from __pair_base.
(pair::operator=): Remove deleted overload.
* python/libstdcxx/v6/printers.py (StdPairPrinter): New pretty printer
so that new base class isn't shown in GDB.
* testsuite/20_util/pair/86751.cc: New test.
* testsuite/20_util/pair/ref_assign.cc: New test.
From-SVN: r265096
C++14 simplified the specification of the generic insert function
templates to be equivalent to calling emplace (or emplace_hint).
Defining them in terms of emplace takes care of the problems described
in PR 78595, ensuring a single conversion to value_type is done at the
right time.
Backport from mainline
2018-09-03 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/78595
* include/bits/stl_map.h (map::insert(_Pair&&))
(map::insert(const_iterator, _Pair&&)): Do emplace instead of insert.
* include/bits/stl_multimap.h (multimap::insert(_Pair&&))
(multimap::insert(const_iterator, _Pair&&)): Likewise.
* include/bits/unordered_map.h (unordered_map::insert(_Pair&&))
(unordered_map::insert(const_iterator, _Pair&&))
(unordered_multimap::insert(_Pair&&))
(unordered_multimap::insert(const_iterator, _Pair&&)): Likewise.
* include/std/type_traits (__enable_if_t): Define for C++11.
* testsuite/23_containers/map/modifiers/insert/78595.cc: New test.
* testsuite/23_containers/multimap/modifiers/insert/78595.cc: New test.
* testsuite/23_containers/unordered_map/modifiers/78595.cc: New test.
* testsuite/23_containers/unordered_multimap/modifiers/78595.cc: New
test.
From-SVN: r265095
Backport from mainline
2018-08-30 Jonathan Wakely <jwakely@redhat.com>
* include/ext/pointer.h (_Pointer_adapter): Define operators for
pointer arithmetic using long long offsets.
* testsuite/ext/ext_pointer/1.cc: Test pointer arithmetic using
long long values.
From-SVN: r265094
The typedefs in <experimental/regex> and <experimental/string> don't
need to be in the __cxx11 namespace, because they are only aliases and
so will have the same mangled name as the underlying types.
Backport from mainline
2018-08-23 Jonathan Wakely <jwakely@redhat.com>
* testsuite/21_strings/basic_string/init-list.cc:
Require cxx11-abi.
* testsuite/experimental/polymorphic_allocator/pmr_typedefs_match.cc:
Likewise.
* testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
Likewise.
Backport from mainline
2018-08-22 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/87061
* include/experimental/regex [!_GLIBCXX_USE_CXX11_ABI]
(experimental::pmr::match_results, experimental::pmr::cmatch)
(experimental::pmr::smatch, experimental::pmr::wcmatch)
(experimental::pmr::wsmatch): Do not declare for gcc4-compatible ABI,
because COW strings don't support C++11 allocator model.
* include/experimental/string [!_GLIBCXX_USE_CXX11_ABI]
(experimental::pmr::basic_string, experimental::pmr::string)
(experimental::pmr::u16string, experimental::pmr::u32string)
(experimental::pmr::wstring): Likewise.
Backport from mainline
2018-08-15 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/regex: Remove begin/end macros for namespace.
* include/experimental/string: Likewise.
* testsuite/experimental/polymorphic_allocator/pmr_typedefs_deque.cc:
New test.
* testsuite/experimental/polymorphic_allocator/
pmr_typedefs_forward_list.cc: New test.
* testsuite/experimental/polymorphic_allocator/pmr_typedefs_list.cc:
New test.
* testsuite/experimental/polymorphic_allocator/pmr_typedefs_map.cc:
New test.
* testsuite/experimental/polymorphic_allocator/pmr_typedefs_match.cc:
New test.
* testsuite/experimental/polymorphic_allocator/
pmr_typedefs_multimap.cc: New test.
* testsuite/experimental/polymorphic_allocator/
pmr_typedefs_multiset.cc: New test.
* testsuite/experimental/polymorphic_allocator/pmr_typedefs_set.cc:
New test.
* testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
New test.
* testsuite/experimental/polymorphic_allocator/
pmr_typedefs_unordered_map.cc: New test.
* testsuite/experimental/polymorphic_allocator/
pmr_typedefs_unordered_multimap.cc: New test.
* testsuite/experimental/polymorphic_allocator/
pmr_typedefs_unordered_multiset.cc: New test.
* testsuite/experimental/polymorphic_allocator/
pmr_typedefs_unordered_set.cc: New test.
* testsuite/experimental/polymorphic_allocator/pmr_typedefs_vector.cc:
New test.
From-SVN: r265093
Construct the program-wide resource objects using placement new. This
means they have dynamic storage duration and won't be destroyed during
termination.
Backport from mainline
2018-07-24 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/70966
* include/experimental/memory_resource (__get_default_resource): Use
placement new to create an object with dynamic storage duration.
Backport from mainline
2018-06-20 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/70966
* include/experimental/memory_resource (__resource_adaptor_imp): Add
static assertions to enforce requirements on pointer types.
(__resource_adaptor_imp::get_allocator()): Add noexcept.
(new_delete_resource, null_memory_resource): Return address of an
object with dynamic storage duration.
(__null_memory_resource): Remove.
* testsuite/experimental/memory_resource/70966.cc: New.
From-SVN: r265092
When passing and returning BLKmode values in 2 integer registers, use
1 TImode register instead of 2 DImode registers. Otherwise, V1TImode
may be used to move and store such BLKmode values, which prevent RTL
optimizations.
gcc/
Backport from mainline
PR target/87370
* config/i386/i386.c (construct_container): Use TImode for
BLKmode values in 2 integer registers.
gcc/testsuite/
Backport from mainline
PR target/87370
* gcc.target/i386/pr87370.c: New test.
From-SVN: r264989
<https://gcc.gnu.org/ml/libstdc++/2016-08/msg00006.html> arranged for
libstdc++ tests to use -fno-show-column by default, but only for
build-tree testing. This patch adds it to the options used for
installed testing as well.
Tested with installed testing for a cross to x86_64-linux-gnu, where
it fixes various test failures.
Backport from mainline
2018-10-02 Joseph Myers <joseph@codesourcery.com>
* testsuite/lib/libstdc++.exp (libstdc++_init): Use
-fno-show-column in default cxxflags.
From-SVN: r264953
Define _mm512_mask3_fmaddsub_round_pd with
__builtin_ia32_vfmaddsubpd512_mask, instead of
__builtin_ia32_vfmaddpd512_mask.
Backport from mainline
PR target/87517
* config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
Defined with __builtin_ia32_vfmaddsubpd512_mask.
From-SVN: r264937
Backport from mainline
2018-10-08 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/87538
* include/std/functional (_Not_fn::operator()): Check value of
__is_nothrow_invocable as well.
* testsuite/20_util/function_objects/not_fn/87538.cc: New test.
* testsuite/experimental/functional/87538.cc: New test.
From-SVN: r264926
Backport from mainline
2018-09-28 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
(GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
From-SVN: r264826
The changes to invoke.texi in r242433 left some unwanted spaces that
texi2pod.pl interprets as verbatim formatting. There are also some
grammatical errors due to the removal of references to GCJ, where the
G++ driver is referred to in the plural.
PR other/87353
* doc/invoke.texi (Link Options): Fix formatting and grammar.
From-SVN: r264810
PR target/87467
* config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
__m512d type for __A argument rather than __m512.
* gcc.target/i386/avx512f-abspd-1.c (SIZE): Divide by two.
(CALC): Use double instead of float.
(TEST): Adjust to test _mm512_abs_pd and _mm512_mask_abs_pd rather than
_mm512_abs_ps and _mm512_mask_abs_ps.
From-SVN: r264714
2018-09-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/87284
* trans-expr.c (gfc_trans_class_init_assign): Access to
to array elements of the dynamic type requires that the array
reference be added to the class expression and not the _data
component, unlike scalar expressions.
2018-09-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/87284
* gfortran.dg/allocate_with_mold_2.f90: New test.
From-SVN: r264288
Backport from mainline
2018-07-31 Eric Botcazou <ebotcazou@adacore.com>
* s-osinte-solaris.ads (upad64_t): New private type.
(mutex_t): Use it for 'lock' and 'data' components.
(cond_t): Likewise for 'data' and use single 'flags' component.
From-SVN: r264266
2018-09-12 Segher Boessenkool <segher@kernel.crashing.org>
Backport from trunk
2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
PR target/86989
* config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
the TOC register.
From-SVN: r264247
According to IEEE 754 2008 4.3 'Rounding-direction attributes' the
rounding mode of the target format needs to be used. By not setting
the value so far we have always used the DFP rounding mode.
gcc/ChangeLog:
2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
Backport from mainline
2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
constants.
("trunc<BFP:mode><DFP_ALL:mode>2")
("trunc<DFP_ALL:mode><BFP:mode>2")
("extend<BFP:mode><DFP_ALL:mode>2")
("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
according to the target operand type.
gcc/testsuite/ChangeLog:
2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
Backport from mainline
2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
* gcc.target/s390/dfp_to_bfp_rounding.c: New test.
From-SVN: r264236
2018-09-07 Janus Weil <janus@gcc.gnu.org>
Backported from trunk
PR fortran/86116
* interface.c (compare_type): Remove a CLASS/TYPE check.
(compare_type_characteristics): New function that behaves like the old
'compare_type'.
(gfc_check_dummy_characteristics, gfc_check_result_characteristics):
Call 'compare_type_characteristics' instead of 'compare_type'.
2018-09-07 Janus Weil <janus@gcc.gnu.org>
Backported from trunk
PR fortran/86116
* gfortran.dg/generic_34.f90: New test case.
From-SVN: r264161
NAND is ~(a1 & a2), but xtensa_expand_atomic does ~a1 & a2.
That fixes libatomic tests atomic-op-{1,2}.
gcc/
2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
Backport from mainline
2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
* config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
XOR operations in NAND case.
From-SVN: r264090
2018-09-03 Tom de Vries <tdevries@suse.de>
backport from trunk:
2018-06-21 Tom de Vries <tdevries@suse.de>
PR tree-optimization/85859
* tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
test with comment from bb_no_side_effects_p.
* gcc.dg/pr85859.c: New test.
From-SVN: r264054
On x86, return address is always popped in word_mode. eh_return needs
to put EH return address in word_mode on stack.
gcc/
Backport from mainline
PR target/87014
* config/i386/i386.md (eh_return): Always update EH return
address in word_mode.
gcc/testsuite/
Backport from mainline
PR target/87014
* g++.dg/torture/pr87014.C: New file.
From-SVN: r263744
clock_gettime is not available on some baremetal targets
and may require -lrt on some non-linux targets.
gcc/testsuite/ChangeLog:
Backport from mainline
2018-08-21 Szabolcs Nagy <szabolcs.nagy@arm.com>
* g++.dg/torture/pr86763.C: Restrict to *-*-linux*.
From-SVN: r263701
Backport from mainline
2018-08-11 John David Anglin <danglin@gcc.gnu.org>
gcc
* config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
Update comment for atomic instructions.
(atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
Remove.
(atomic_loaddi): Revise fence expansion to only emit fence prior to
load for __ATOMIC_SEQ_CST model.
(atomic_loaddi_1): Remove float register target.
(atomic_storedi): Handle CONST_INT values.
(atomic_storedi_1): Remove float register source. Add special case
for zero value.
(memory_barrier): New expander and insn.
libgcc
* config/pa/linux-atomic.c: Update comment.
(FETCH_AND_OP_2, OP_AND_FETCH_2, FETCH_AND_OP_WORD, OP_AND_FETCH_WORD,
COMPARE_AND_SWAP_2, __sync_val_compare_and_swap_4,
SYNC_LOCK_TEST_AND_SET_2, __sync_lock_test_and_set_4): Use
__ATOMIC_RELAXED for atomic loads.
(SYNC_LOCK_RELEASE_1): New define. Use __sync_synchronize() and
unordered store to release lock.
(__sync_lock_release_8): Likewise.
(SYNC_LOCK_RELEASE_2): Remove define.
From-SVN: r263638
2018-08-17 Richard Biener <rguenther@suse.de>
Backport from mainline
2018-08-02 Richard Biener <rguenther@suse.de>
PR c++/86763
* class.c (layout_class_type): Copy TYPE_TYPELESS_STORAGE
to the CLASSTYPE_AS_BASE.
* g++.dg/torture/pr86763.C: New testcase.
From-SVN: r263621
This reverts commit r263463 / b7edd52337828cc46e469bca12f58288795b78d5
because aligned_alloc is not defined for baremetal newlib targets, see
https://gcc.gnu.org/ml/libstdc++/2018-08/msg00065.html
Revert
2018-08-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
PR target/85904
* configure.ac: Define HAVE_ALIGNED_ALLOC if building for
Newlib.
* configure: Regenerate.
From-SVN: r263518
Backport from mainline
2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/85645
* regrename.c (build_def_use): Also kill the chains that include the
destination of a REG_CFA_REGISTER note.
PR rtl-optimization/85645
* regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
insn that has a REG_CFA_REGISTER note.
From-SVN: r263509
Backport from mainline
2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
PR target/86197
* config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
ieee128 argument takes up only one (vector) register, not two (floating
point) registers.
From-SVN: r263477
While building for Newlib, some configure checks must be hard coded.
The aligned_alloc() is supported since 2015 in Newlib.
libstdc++-v3/
PR target/85904
* configure.ac: Define HAVE_ALIGNED_ALLOC if building for
Newlib.
* configure: Regenerate.
From-SVN: r263463
If configure fails to detect aligned_alloc we will try to define our
own in new_opa.cc but that could clash with the libc version in
<stdlib.h>. Use a namespace to keep them distinct.
* libsupc++/new_opa.cc (aligned_alloc): Declare inside namespace to
avoid clashing with an ::aligned_alloc function that was not detected
by configure.
From-SVN: r263426
The empty reps and the I/O functions do not need to be implicitly
instantiated to enable assertions, so declare the explicit
instantiations when _GLIBCXX_EXTERN_TEMPLATE == -1 (i.e. when
_GLIBCXX_ASSERTIONS is defined).
Backport from mainline
2018-06-27 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/86138
* include/bits/basic_string.tcc: [_GLIBCXX_EXTERN_TEMPLATE < 0]
Declare explicit instantiations of COW empty reps and I/O functions.
From-SVN: r263383
Backport from mainline
2018-05-08 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/85672
* include/Makefile.am [!ENABLE_FLOAT128]: Change c++config.h entry
to #undef _GLIBCXX_USE_FLOAT128 instead of defining it to zero.
* include/Makefile.in: Regenerate.
* include/bits/c++config (_GLIBCXX_USE_FLOAT128): Move definition
within conditional block.
Backport from mainline
2018-05-01 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
PR libstdc++/84654
* acinclude.m4: Set ENABLE_FLOAT128 instead of _GLIBCXX_USE_FLOAT128.
* config.h.in: Remove references to _GLIBCXX_USE_FLOAT128.
* configure: Regenerate.
* include/Makefile.am: Replace the value of _GLIBCXX_USE_FLOAT128
based on ENABLE_FLOAT128.
* include/Makefile.in: Regenerate.
* include/bits/c++config: Define _GLIBCXX_USE_FLOAT128.
[!defined(__FLOAT128__) && !defined(__SIZEOF_FLOAT128__)]: Undefine
_GLIBCXX_USE_FLOAT128.
From-SVN: r263382
Instead of repeating all the old headers for every new standard I've
changed the docs to only list the new headers for each standard.
Backport from mainline
2018-07-31 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/test.xml: Improve documentation on writing tests for
newer standards.
* doc/xml/manual/using.xml: Document all headers for C++11 and later.
* doc/html/*: Regenerate.
From-SVN: r263378
Backport from mainline
2018-08-03 Jonathan Wakely <jwakely@redhat.com>
* src/c++11/system_error.cc
(system_error_category::default_error_condition): Add workaround for
ENOTEMPTY and EEXIST having the same value on AIX.
* testsuite/19_diagnostics/error_category/system_category.cc: Add
extra testcases for EDOM, EILSEQ, ERANGE, EEXIST and ENOTEMPTY.
Backport from mainline
2018-08-01 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/60555
* src/c++11/system_error.cc
(system_error_category::default_error_condition): New override to
check for POSIX errno values.
* testsuite/19_diagnostics/error_category/generic_category.cc: New
* testsuite/19_diagnostics/error_category/system_category.cc: New
test.
From-SVN: r263377
Solaris memalign requires alignment to be at least sizeof(int), so
increase it as needed.
Also move the check for valid alignments from the fallback
implementation of aligned_alloc into operator new, as it's required for
all of aligned_alloc, memalign, posix_memalign and __aligned_malloc.
Backport from mainline
2018-08-07 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/86861
* libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] (aligned_alloc):
Replace macro with inline function.
[__sun]: Increase alignment to meet memalign precondition.
[!HAVE__ALIGNED_MALLOC && !HAVE_POSIX_MEMALIGN && !HAVE_MEMALIGN]
(aligned_alloc): Move check for valid alignment to operator new.
Remove redundant check for non-zero size, it's enforced by the caller.
(operator new): Move check for valid alignment here. Use
__builtin_expect on check for zero size.
From-SVN: r263376
On AIX 7.2.0.0 aligned_alloc incorrectly requires the alignment to be a
multiple of sizeof(void*).
This adds a workaround to the operator new overload taking an alignment
value, to increase the alignment (and size) if needed.
Backport from mainline
2018-07-30 Jonathan Wakely <jwakely@redhat.com>
* libsupc++/new_opa.cc (operator new(size_t, align_val_t)): Add
workaround for aligned_alloc bug on AIX.
* testsuite/18_support/new_aligned.cc: New test.
From-SVN: r263375
Backport from mainline
2018-05-19 Jonathan Wakely <jwakely@redhat.com>
* src/c++11/codecvt.cc (__codecvt_utf8_base<wchar_t>::do_in)
[__SIZEOF_WCHAR_T__==2 && __BYTE_ORDER__!=__ORDER_BIG_ENDIAN__]: Set
little_endian element in bitmask.
* testsuite/22_locale/codecvt/codecvt_utf8/69703.cc: Run all tests.
* testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: New.
From-SVN: r263373
2018-08-02 Jozef Lawrynowicz <jozef.l@mittosystems.com>
Backport from mainline
2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
PR middle-end/86705
* gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
requested variable alignment.
(expand_one_ssa_partition): Likewise.
(expand_one_var): Likewise.
From-SVN: r263277
2018-08-01 Richard Biener <rguenther@suse.de>
PR bootstrap/86724
* graphite.h: Include isl/id.h and isl/space.h to allow build
with ISL 0.20.
From-SVN: r263195
* gcc-interface/decl.c (choices_to_gnu): Rename parameters. Deal with
an operand of Character type. Factor out range generation to the end.
Check that the bounds are literals and convert them to the type of the
operand before building the ranges.
* gcc-interface/utils.c (make_dummy_type): Minor tweak.
(make_packable_type): Propagate TYPE_DEBUG_TYPE.
(maybe_pad_type): Likewise.
From-SVN: r262814
2018-07-16 Fritz Reese <fritzoreese@gmail.com>
gcc/testsuite/ChangeLog:
PR fortran/83184
Backport from trunk.
* gfortran.dg/assumed_rank_14.f90: New testcase.
* gfortran.dg/assumed_rank_15.f90: New testcase.
* gfortran.dg/dec_structure_8.f90: Update error messages.
* gfortran.dg/dec_structure_23.f90: Update error messages.
gcc/fortran/ChangeLog:
PR fortran/83184
Backport from trunk.
* decl.c (match_old_style_init): Initialize locus of variable expr when
creating a data variable.
(match_clist_expr): Verify array is explicit shape/size before
attempting to allocate constant array constructor.
From-SVN: r262759
2018-07-16 Fritz Reese <fritzoreese@gmail.com>
gcc/testsuite/ChangeLog:
Backport from trunk:
PR fortran/83183
PR fortran/86325
* gfortran.dg/init_flag_18.f90: New testcase.
* gfortran.dg/init_flag_19.f03: New testcase.
gcc/fortran/ChangeLog:
Backport from trunk:
PR fortran/86417
* module.c (mio_component): Set component->loc when loading from module.
PR fortran/83183
PR fortran/86325
* expr.c (class_allocatable, class_pointer, comp_allocatable,
comp_pointer): New helpers.
(component_initializer): Generate EXPR_NULL for allocatable or pointer
components. Do not generate initializers for components within BT_CLASS.
Do not assign to comp->initializer.
(gfc_generate_initializer): Use new helpers; move code to generate
EXPR_NULL for class allocatable components into component_initializer().
From-SVN: r262751
2018-07-10 Carl Love <cel@us.ibm.com>
Backport from mainline
2017-09-07 Carl Love <cel@us.ibm.com>
* config/rs6000/vsx.md (define_insn "*stxvl"): Add missing argument to
the sldi instruction.
From-SVN: r262541
The create_dir helper was calling the throwing form of
filesystem::is_directory instead of passing the error_code argument.
Since std::filesystem::create_directory(const path&, error_code&) is
noexcept, it would call std::terminate if an error occurred in
is_directory.
Passing the error_code also takes care of clearing it in the case where
is_directory returns true.
Backport from mainline
2018-03-09 Jonathan Wakely <jwakely@redhat.com>
src/filesystem/ops.cc (create_dir): Pass error_code to is_directory.
From-SVN: r262413
There is no need to use an allocator of the correct value_type when
calling allocator_traits::construct and allocator_traits::destroy. The
existing node allocator can be used, instead of constructing a new
allocator object every time.
There's also no benefit to using __gnu_cxx::__alloc_traits instead of
std::allocator_traits to get the pointer and const_pointer types.
std::forward_list is only available for C++11 and later, when
std::allocator_traits is available too.
Backport from mainline
2018-06-13 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/86127
* include/bits/forward_list.h (_Fwd_list_base::_Tp_alloc_type): Remove
unused typedef.
(_Fwd_list_base::_M_create_node, _Fwd_list_base::_M_erase_after):
Use node allocator to create and destroy elements.
(forward_list::_Tp_alloc_type): Remove unused typedef.
(forward_list::_Alloc_traits): Use allocator_traits instead of
__gnu_cxx::__alloc_traits.
* include/bits/forward_list.tcc (_Fwd_list_base::_M_erase_after):
Use node allocator to create and destroy elements.
From-SVN: r262411
Backport from mainline
2018-04-05 Jonathan Wakely <jwakely@redhat.com>
* include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Qualify
__get calls to avoid ADL and avoid ambiguity due to Clang bug.
From-SVN: r262408
In C++11 and C++14 any odr-use of these constants requires a definition
at namespace-scope. In C++17 they are implicitly inline and so the
namespace-scope redeclarations are redundant (and allowing them is
deprecated).
Backport from mainline
2018-05-18 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/85098
* include/bits/regex.h [__cplusplus < 201703L] (basic_regex::icase)
(basic_regex::nosubs, basic_regex::optimize, basic_regex::collate)
(basic_regex::ECMAScript, basic_regex::basic, basic_regex::extended)
(basic_regex::awk, basic_regex::grep, basic_regex::egrep): Add
definitions.
* include/bits/regex_automaton.h (_NFA::_M_insert_state): Adjust
whitespace.
* testsuite/28_regex/basic_regex/85098.cc: New
From-SVN: r262405
By performing the /= operation on a named local variable instead of a
temporary the copy made for the return value can be elided.
Backport from mainline
2018-05-07 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/85671
* include/experimental/bits/fs_path.h (operator/): Likewise.
From-SVN: r262404
Construct new elements before moving existing ones, so that if a default
constructor throws, the existing elements are not left in a moved-from
state.
Backport from mainline
2018-06-14 Daniel Trebbien <dtrebbien@gmail.com>
Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/83982
* include/bits/vector.tcc (vector::_M_default_append(size_type)):
Default-construct new elements before moving existing ones.
* testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc:
New.
From-SVN: r262403
2018-07-03 Paul Thomas <pault@gcc.gnu.org>
PR fortran/82969
PR fortran/86242
* trans-array.c (structure_alloc_comps): Do not explicitly copy
procedure pointer components.
2018-07-03 Paul Thomas <pault@gcc.gnu.org>
PR fortran/82969
PR fortran/86242
* gfortran.dg/proc_ptr_50.f90: New test.
From-SVN: r262331
PR go/86331
os: check return value as well as error from waitid
https://gcc.gnu.org/PR86331 indicates that if a signal handler runs it
is possible for syscall.Syscall6 to return a non-zero errno value even
if no error occurs. That is a problem in general, but this fix will
let us work around the general problem for the specific case of
calling waitid.
Reviewed-on: https://go-review.googlesource.com/121595
From-SVN: r262315
2018-06-29 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
* lex.c (search_line_fast): Remove illegal coercion of an
unaligned pointer value to vector pointer type and replace with
use of __builtin_vec_vsx_ld () built-in function, which operates
on unaligned pointer values.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@261621 138bc75d-0d04-0410-961f-82ee72b054a4
From-SVN: r262243
gcc/ChangeLog:
2018-06-26 Kelvin Nilsen <kelvin@gcc.gnu.org>
Backported from mainline
2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
behavior of vec_packsu (vector unsigned long long, vector unsigned
long long) to match behavior of vec_packs with same signature.
gcc/testsuite/ChangeLog:
2018-06-26 Kelvin Nilsen <kelvin@gcc.gnu.org>
Backported from mainline
2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
* gcc.target/powerpc/builtins-1.c: Add dg directives to scan
for vpkudus.
From-SVN: r262164
When building with --with-tune=zEC12 and calling the resulting gcc
with --march=z13 (no extra -mtune), the binary would unexpectedly be compiled
with -march=z13 -mtune=zEC12. This patch avoids using the default tune
parameter if -march is specified as argument but the user can still
explicitly state -march=z13 -mtune=zEC12.
gcc/ChangeLog:
2018-06-26 Robin Dapp <rdapp@linux.ibm.com>
* config/s390/s390.h (enum processor_flags): Do not use
default tune parameter when -march was specified.
From-SVN: r262145
PR target/86314
* config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
Check reg_overlap_mentioned_p in addition to reg_set_p with the same
operands.
* gcc.dg/pr86314.c: New test.
From-SVN: r262144
2018-06-25 Michael Meissner <meissner@linux.vnet.ibm.com>
Back port from trunk
2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/85424
* config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
where the inputs overlap with the output.
From-SVN: r262122
PR target/84786
* config/i386/sse.md (vshift_count): New mode attr.
(<shift_insn><mode>3<mask_name>): Use <vshift_count>N instead of vN
as last operand's constraint for VI2_AVX2_AVX512BW shifts. Use YvN
instead of vN as last operand's constraint for VI48_AVX2 shifts.
* gcc.target/i386/avx512f-pr84786-3.c: New test.
From-SVN: r262014
2018-06-25 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83118
Back port from trunk
* resolve.c (resolve_ordinary_assign): Force the creation of a
vtable for assignment of non-polymorphic expressions to an
unlimited polymorphic object.
* trans-array.c (gfc_alloc_allocatable_for_assignment): Use the
size of the rhs type for such assignments. Set the dtype, _len
and vptrs appropriately.
* trans-expr.c (gfc_trans_assignment): Force the use of the
_copy function for these assignments.
2018-06-25 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83118
Back port from trunk
* gfortran.dg/unlimited_polymorphic_30.f03: New test.
From-SVN: r262005
Backport trunk r261064.
2018-06-23 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
PR tree-optimization/85989
* gimple-ssa-backprop.c (backprop::m_visited_phis): New member
variable.
(backprop::intersect_uses): Check it when deciding whether this
is a backedge reference.
(backprop::process_block): Add each phi to m_visited_phis
after visiting it, then clear it at the end.
gcc/testsuite/
PR tree-optimization/85989
* gcc.dg/torture/pr85989.c: New test.
From-SVN: r261984
Backported from mainline
2018-06-20 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/86231
* tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
anti-range don't overwrite *vr0min before using it to compute *vr0max.
* gcc.dg/tree-ssa/vrp119.c: New test.
* gcc.c-torture/execute/pr86231.c: New test.
From-SVN: r261969
Backported from mainline
2018-06-15 Jakub Jelinek <jakub@redhat.com>
PR middle-end/85878
* expr.c (expand_assignment): Only call store_expr for halves if the
mode is the same.
* gfortran.fortran-torture/compile/pr85878.f90: New test.
From-SVN: r261968
Backported from mainline
2018-06-14 Jakub Jelinek <jakub@redhat.com>
PR target/85945
* lower-subreg.c (find_decomposable_subregs): Don't decompose float
subregs of multi-word pseudos unless the float mode has word size.
* gcc.c-torture/compile/pr85945.c: New test.
From-SVN: r261967
Backported from mainline
2018-05-29 Jakub Jelinek <jakub@redhat.com>
PR c++/85952
* init.c (build_aggr_init): For structured binding initialized from
array call mark_rvalue_use on the initializer.
* g++.dg/warn/Wunused-var-33.C: New test.
From-SVN: r261965
Backported from mainline
2018-05-11 Jakub Jelinek <jakub@redhat.com>
PR c/85696
* c-omp.c (c_omp_predetermined_sharing): Return
OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
* c-typeck.c (c_finish_omp_clauses): Don't use
c_omp_predetermined_sharing, instead just check TREE_READONLY.
* cp-tree.h (cxx_omp_predetermined_sharing_1): New prototype.
* cp-gimplify.c (cxx_omp_predetermined_sharing): New wrapper around
cxx_omp_predetermined_sharing_1. Rename old function to ...
(cxx_omp_predetermined_sharing_1): ... this.
* semantics.c (finish_omp_clauses): Use cxx_omp_predetermined_sharing_1
instead of cxx_omp_predetermined_sharing.
* c-c++-common/gomp/pr85696.c: New test.
From-SVN: r261964
Backported from mainline
2018-05-11 Jakub Jelinek <jakub@redhat.com>
PR c/85696
* c-omp.c (c_omp_predetermined_sharing): Return
OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
* c-typeck.c (c_finish_omp_clauses): Don't use
c_omp_predetermined_sharing, instead just check TREE_READONLY.
* cp-tree.h (cxx_omp_predetermined_sharing_1): New prototype.
* cp-gimplify.c (cxx_omp_predetermined_sharing): New wrapper around
cxx_omp_predetermined_sharing_1. Rename old function to ...
(cxx_omp_predetermined_sharing_1): ... this.
* semantics.c (finish_omp_clauses): Use cxx_omp_predetermined_sharing_1
instead of cxx_omp_predetermined_sharing.
* c-c++-common/gomp/pr85696.c: New test.
From-SVN: r261963
Backported from mainline
2018-06-22 Jakub Jelinek <jakub@redhat.com>
PR c++/85662
* g++.dg/ext/offsetof3.C: New test.
2018-05-10 Jakub Jelinek <jakub@redhat.com>
PR c++/85662
* c-common.h (fold_offsetof_1): Removed.
(fold_offsetof): Add TYPE argument defaulted to size_type_node and
CTX argument defaulted to ERROR_MARK.
* c-common.c (fold_offsetof_1): Renamed to ...
(fold_offsetof): ... this. Remove wrapper function. Add TYPE
argument, convert the pointer constant to TYPE and use size_binop
with PLUS_EXPR instead of fold_build_pointer_plus if type is not
a pointer type. Adjust recursive calls.
* c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
fold_convert_loc.
* c-typeck.c (build_unary_op): Use fold_offsetof rather than
fold_offsetof_1, pass argtype as TYPE to it and drop the
fold_convert_loc.
* cp-gimplify.c (cp_fold): Use fold_offsetof rather than
fold_offsetof_1, pass TREE_TYPE (x) as TYPE to it and drop the
fold_convert.
* g++.dg/ext/offsetof2.C: New test.
From-SVN: r261962
Backported from mainline
2018-05-06 Jakub Jelinek <jakub@redhat.com>
PR c++/85659
* cfgexpand.c (expand_asm_stmt): Don't create a temporary if
the type is addressable. Don't force op into register if it has
BLKmode.
* g++.dg/ext/asm14.C: New test.
* g++.dg/ext/asm15.C: New test.
* g++.dg/ext/asm16.C: New test.
From-SVN: r261961
Backported from mainline
2018-05-01 Jakub Jelinek <jakub@redhat.com>
PR web/85578
* doc/install.texi2html: Replace _002d with - and _002a with * in
generated html files using sed.
From-SVN: r261960
Backported from mainline
2018-04-27 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/85529
* tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
zero extension or masking of the MSB bit.
(optimize_range_tests): Add FIRST_BB argument, pass it through
to optimize_range_tests_var_bound.
(maybe_optimize_range_tests, reassociate_bb): Adjust
optimize_range_tests callers.
* gcc.c-torture/execute/pr85529-1.c: New test.
* gcc.c-torture/execute/pr85529-2.c: New test.
* gcc.dg/pr85529.c: New test.
From-SVN: r261959
Backported from mainline
2018-04-19 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/85446
* match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
the integral and pointer types to have the same precision.
From-SVN: r261958
2018-06-22 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
2018-04-18 David Malcolm <dmalcolm@redhat.com>
PR jit/85384
* acx.m4 (GCC_BASE_VER): Remove \$\$ from sed expression.
* configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
by using gcc_base_ver to generate a gcc_driver_version, and use
it when generating GCC_DRIVER_NAME.
* configure: Regenerate.
* configure: Regenerate.
From-SVN: r261957
Backported from mainline
2018-04-18 Jakub Jelinek <jakub@redhat.com>
PR c++/84463
* typeck.c (cp_build_addr_expr_1): Move handling of offsetof-like
tricks from here to ...
* cp-gimplify.c (cp_fold) <case ADDR_EXPR>: ... here. Only use it
if INDIRECT_REF's operand is INTEGER_CST cast to pointer type.
* g++.dg/cpp0x/constexpr-nullptr-1.C: Add -O1 to dg-options.
* g++.dg/cpp0x/constexpr-nullptr-2.C: Expect different diagnostics
in two cases. Uncomment two other tests and add expected dg-error for
them.
* g++.dg/init/struct2.C: Cast to int rather than long to avoid
-Wnarrowing diagnostics on some targets for c++11.
* g++.dg/parse/array-size2.C: Remove xfail.
* g++.dg/cpp0x/constexpr-84463.C: New test.
From-SVN: r261956
Backported from mainline
2018-04-17 Jakub Jelinek <jakub@redhat.com>
PR target/85430
* config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
* gcc.dg/pr85430.c: New test.
From-SVN: r261954
Backported from mainline
2018-04-10 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/85300
* combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
simplify_unary_operation fails.
* gcc.dg/pr85300.c: New test.
From-SVN: r261953
Backported from mainline
2018-04-07 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/85257
* fold-const.c (native_encode_vector): If not all elts could fit
and off is -1, return 0 rather than offset.
* tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
(offset - offset2) / BITS_PER_UNIT as 4th argument to
native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
adjust buffer in native_interpret_expr call.
* gcc.dg/pr85257.c: New test.
From-SVN: r261951
Backported from mainline
2018-04-06 Jakub Jelinek <jakub@redhat.com>
PR debug/85252
* dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
* gcc.dg/debug/pr85252.c: New test.
From-SVN: r261950
Backported from mainline
2018-04-06 Jakub Jelinek <jakub@redhat.com>
PR c++/85210
* pt.c (tsubst_decomp_names): Return error_mark_node and assert
errorcount is set if tsubst doesn't return a VAR_DECL.
* g++.dg/cpp1z/decomp42.C: New test.
From-SVN: r261949
Backported from mainline
2018-04-05 Jakub Jelinek <jakub@redhat.com>
PR c++/85208
* decl.c (start_decl): For DECL_DECOMPOSITION_P decls, don't call
maybe_apply_pragma_weak here...
(cp_maybe_mangle_decomp): ... but call it here instead.
* g++.dg/cpp1z/decomp41.C: New test.
From-SVN: r261948
Backported from mainline
2018-04-04 Jakub Jelinek <jakub@redhat.com>
PR inline-asm/85172
* constexpr.c (cxx_eval_builtin_function_call): For calls to
builtin_valid_in_constant_expr_p functions, don't call
cxx_eval_constant_expression if argument is not
potential_constant_expression.
* g++.dg/ext/builtin13.C: New test.
* g++.dg/ext/atomic-4.C: New test.
From-SVN: r261947
Backported from mainline
2018-04-03 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/85167
* shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
bb_defs if *split_p, instead preinitialize it to NULL.
* gcc.dg/pr85167.c: New test.
From-SVN: r261946
Backported from mainline
2018-04-03 Jakub Jelinek <jakub@redhat.com>
PR c++/85147
* pt.c (fixed_parameter_pack_p_1): Punt if parm is error_mark_node.
* g++.dg/cpp0x/pr85147.C: New test.
From-SVN: r261945
Backported from mainline
2018-04-03 Jakub Jelinek <jakub@redhat.com>
PR c++/85140
* name-lookup.c (handle_namespace_attrs): Return early if attributes
is error_mark_node.
* g++.dg/cpp0x/gen-attrs-64.C: New test.
From-SVN: r261944
Backported from mainline
2018-03-30 Jakub Jelinek <jakub@redhat.com>
PR c++/84791
* semantics.c (finish_omp_reduction_clause): If
OMP_CLAUSE_REDUCTION_PLACEHOLDER is error_mark_node, return true
even if processing_template_decl.
* g++.dg/gomp/pr84791.C: New test.
From-SVN: r261943
Backported from mainline
2018-03-27 Jakub Jelinek <jakub@redhat.com>
PR c++/85076
* tree.c (cp_build_reference_type): If to_type is error_mark_node,
return it right away.
* g++.dg/cpp1y/pr85076.C: New test.
From-SVN: r261941
Backported from mainline
2018-03-27 Jakub Jelinek <jakub@redhat.com>
PR c++/85068
* class.c (update_vtable_entry_for_fn): Don't ICE if base_binfo
is NULL. Assert if thunk_binfo is NULL then errorcount is non-zero.
* g++.dg/inherit/covariant22.C: New test.
From-SVN: r261940
Backported from mainline
2018-03-23 Jakub Jelinek <jakub@redhat.com>
PR inline-asm/85022
* emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
known size by default.
From-SVN: r261939
Backported from mainline
2018-03-23 Jakub Jelinek <jakub@redhat.com>
PR inline-asm/85022
* alias.c (write_dependence_p): Don't require for x_canonicalized
non-VOIDmode if x has VOIDmode.
* c-c++-common/torture/pr85022.c: New test.
From-SVN: r261937
Backported from mainline
2018-03-22 Jakub Jelinek <jakub@redhat.com>
PR inline-asm/84941
* function.c (match_asm_constraints_1): Don't do the optimization
if input isn't a REG, SUBREG, MEM or constant.
* gcc.dg/pr84941.c: New test.
From-SVN: r261936
Backported from mainline
2018-03-21 Jakub Jelinek <jakub@redhat.com>
PR c/84999
* c-typeck.c (build_binary_op): If c_common_type_for_size fails when
building vector comparison, diagnose it and return error_mark_node.
* c-c++-common/pr84999.c: New test.
From-SVN: r261934
Backported from mainline
2018-03-21 Jakub Jelinek <jakub@redhat.com>
PR c++/84961
* cp-tree.h (genericize_compound_lvalue): Declare.
* typeck.c (genericize_compound_lvalue): New function.
(unary_complex_lvalue, cp_build_modify_expr): Use it.
* semantics.c (finish_asm_stmt): Replace MODIFY_EXPR, PREINCREMENT_EXPR
and PREDECREMENT_EXPR in output and "m" constrained input operands with
COMPOUND_EXPR. Call cxx_mark_addressable on the rightmost
COMPOUND_EXPR operand.
* c-c++-common/pr43690.c: Don't expect errors on "m" (--x) and
"m" (++x) in C++.
* g++.dg/torture/pr84961-1.C: New test.
* g++.dg/torture/pr84961-2.C: New test.
From-SVN: r261933
Backported from mainline
2018-03-20 Jakub Jelinek <jakub@redhat.com>
PR debug/84875
* dce.c (delete_unmarked_insns): Don't remove frame related noop moves
holding REG_CFA_RESTORE notes, instead turn them into a USE.
* gcc.dg/pr84875.c: New test.
From-SVN: r261932
Backported from mainline
2018-03-20 Jakub Jelinek <jakub@redhat.com>
PR c/84953
* builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
instead of TREE_TYPE (s1) for the return value.
* gcc.dg/pr84953.c: New test.
From-SVN: r261931
Backported from mainline
2018-03-22 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/85018
* dwarf2asm.c (dw2_output_indirect_constant_1): Set
DECL_INITIAL (decl) to decl at the end.
* varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
adjust the comment.
2018-03-20 Jakub Jelinek <jakub@redhat.com>
PR target/84990
* dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
flag_section_anchors.
* varasm.c (use_blocks_for_decl_p): Remove hack for
dw2_force_const_mem.
2018-03-19 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/78651
* dwarf2asm.c: Include fold-const.c.
(dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
of decl rather than decl itself.
2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
PR sanitizer/78651
* dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
calling assemble_variable.
* g++.dg/asan/pr78651.C: New test.
From-SVN: r261930
Backported from mainline
2018-03-16 Jakub Jelinek <jakub@redhat.com>
PR target/84899
* postreload.c (reload_combine_recognize_pattern): Perform
INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
truncate_int_for_mode the result for the destination's mode.
* gcc.dg/pr84899.c: New test.
From-SVN: r261929
Backported from mainline
2018-03-16 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/84841
* tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
1 << 3.
(FLOAT_ONE_CONST_TYPE): Define.
(constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
(sort_by_operand_rank): Put entries with higher constant_type last
rather than first to match comments.
* gcc.dg/pr84841.c: New test.
From-SVN: r261927
Backported from mainline
2018-03-16 Jakub Jelinek <jakub@redhat.com>
PR c++/84874
* decl.c (reshape_init_class): Don't assert d->cur->index == field
if d->cur->index is a FIELD_DECL, instead set field to d->cur->index.
* g++.dg/cpp1z/desig7.C: New test.
From-SVN: r261926
Backported from mainline
2018-03-15 Jakub Jelinek <jakub@redhat.com>
PR c++/79085
* calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
check and use address of target always.
* g++.dg/opt/pr79085.C: New test.
From-SVN: r261925
Backported from mainline
2018-03-15 Jakub Jelinek <jakub@redhat.com>
PR c++/84222
* cp-tree.h (cp_warn_deprecated_use): Declare.
* tree.c (cp_warn_deprecated_use): New function.
* typeck2.c (build_functional_cast): Use it.
* decl.c (grokparms): Likewise.
(grokdeclarator): Likewise. Temporarily push nested class scope
around grokparms call for out of class member definitions.
* g++.dg/warn/deprecated.C (T::member3): Change dg-warning to dg-bogus.
* g++.dg/warn/deprecated-6.C (T::member3): Likewise.
* g++.dg/warn/deprecated-13.C: New test.
From-SVN: r261924
Backported from mainline
2018-03-15 Jakub Jelinek <jakub@redhat.com>
PR target/84860
* optabs.c (emit_conditional_move): Pass address of cmode's copy
rather than address of cmode as last argument to prepare_cmp_insn.
* gcc.c-torture/compile/pr84860.c: New test.
From-SVN: r261923
Backported from mainline
2018-03-15 Jakub Jelinek <jakub@redhat.com>
PR c/84853
* c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
INTEGER_TYPE element type.
* gcc.dg/pr84853.c: New test.
From-SVN: r261922
Backported from mainline
2018-03-13 Jakub Jelinek <jakub@redhat.com>
PR middle-end/84834
* match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
integer_pow2p@2 and test integer_pow2p in condition.
(A < 0 ? C : 0): Similarly for @1.
* gcc.dg/pr84834.c: New test.
From-SVN: r261921
Backported from mainline
2018-03-13 Jakub Jelinek <jakub@redhat.com>
PR target/84786
* config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
on the last operand.
* gcc.target/i386/avx512f-pr84786-1.c: New test.
* gcc.target/i386/avx512f-pr84786-2.c: New test.
From-SVN: r261919
Backported from mainline
2018-03-09 Jakub Jelinek <jakub@redhat.com>
PR target/84772
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
* gcc.dg/pr84772.c: New test.
From-SVN: r261918
Backported from mainline
2018-03-09 Jason Merrill <jason@redhat.com>
Jakub Jelinek <jakub@redhat.com>
PR c++/84076
* call.c (convert_arg_to_ellipsis): Instead of cp_build_addr_expr
build ADDR_EXPR with REFERENCE_TYPE.
(build_over_call): For purposes of check_function_arguments, if
argarray[j] is ADDR_EXPR with REFERENCE_TYPE created above, use
its operand rather than the argument itself.
* g++.dg/warn/Wformat-2.C: New test.
From-SVN: r261917
Backported from mainline
2018-03-09 Jakub Jelinek <jakub@redhat.com>
PR c++/84767
* tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
decl, use remap_type if we want to use the type.
* g++.dg/ext/vla18.C: New test.
From-SVN: r261916
Backported from mainline
2018-03-08 Jason Merrill <jason@redhat.com>
Jakub Jelinek <jakub@redhat.com>
PR c++/80598
* call.c (build_over_call): In templates set TREE_USED (first_fn) when
not calling mark_used for the benefit of -Wunused-function warning.
* g++.dg/warn/Wunused-function4.C: New test.
From-SVN: r261915
Backported from mainline
2018-03-08 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/84739
* tree-tailcall.c (find_tail_calls): Check call arguments against
DECL_ARGUMENTS (current_function_decl) rather than
DECL_ARGUMENTS (func) when checking for tail recursion.
* gcc.dg/pr84739.c: New test.
From-SVN: r261914
Backported from mainline
2018-03-05 Jakub Jelinek <jakub@redhat.com>
PR target/84700
* combine.c (combine_simplify_rtx): Don't try to simplify if
if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
are equal to x.
* gcc.target/powerpc/pr84700.c: New test.
From-SVN: r261913
Backported from mainline
2018-03-02 Jakub Jelinek <jakub@redhat.com>
PR c++/84662
* pt.c (tsubst_copy_and_build) <case TEMPLATE_ID_EXPR>: Use
RETURN instead of return.
<case POINTER_PLUS_EXPR>: Likewise.
<case CONVERT_EXPR>: If op0 is error_mark_node, just return
it instead of wrapping it into CONVERT_EXPR.
* g++.dg/cpp1y/pr84662.C: New test.
From-SVN: r261912
The explicit instantiation declarations for std::basic_string are
disabled for C++17 (and later) so that basic_string symbols get
implicitly instantiated in every translation unit that needs them. On
targets that don't support STB_GNU_UNIQUE this leads to multiple copies
of the empty rep symbol for COW strings. In order to detect whether a
COW string needs to deallocate its storage it compares the address with
the empty rep. When there are multiple copies of the empty rep object
the address is not unique, and so string destructors try to delete the
empty rep, which crashes.
In order to guarantee uniqueness of the _S_empty_rep_storage symbol this
patch adds an explicit instantiation declaration for just that symbol.
This means the other symbols are still implicitly instantiated in C++17
code, but for the empty rep the definition in the library gets used.
Separately, there is no need for C++17 code to implicitly instantiate
the I/O functions for strings, so this also restores the explicit
instantiation declarations for those functions.
Backport from mainline
2018-06-22 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/86138
* include/bits/basic_string.tcc:
[__cplusplus > 201402 && !_GLIBCXX_USE_CXX11_ABI]
(basic_string<char>::_Rep::_S_empty_rep_storage)
(basic_string<wchar_t>::_Rep::_S_empty_rep_storage): Add explicit
instantiation declarations.
[__cplusplus > 201402] (operator>>, operator<<, getline): Re-enable
explicit instantiation declarations.
* testsuite/21_strings/basic_string/cons/char/86138.cc: New.
* testsuite/21_strings/basic_string/cons/wchar_t/86138.cc: New.
From-SVN: r261907
gcc/
2018-06-22 Andre Vieira <andre.simoesdiasvieira@arm.com>
Backport from mainline
2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
* config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
__typeof__.
(cmse_check_pointed_object): Likewise.
gcc/testsuite/
2018-06-22 Andre Vieira <andre.simoesdiasvieira@arm.com>
Backport from mainline
2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
* gcc.target/arm/cmse/cmse-1c99.c: New test.
From-SVN: r261900
Add multilib variants for -march=rv64imafd, e.g. to support the BOOMv2 core.
Add -mcmodel=medany as a variant of the 64-bit multilibs for RTEMS. The
rationale for this change is that several existing RISC-V chips map the
RAM at 0x80000000. In RTEMS, we do not use virtual memory, so
applications will run at this location which is outside the +-2GiB range
in a 64-bit configuration.
gcc/
* config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
multilibs for *-*-rtems*.
* config/riscv/t-rtems: New file.
From-SVN: r261838
The issue is caused by reordering of stack pointer update after stack
space allocation with instructions that write to the allocated stack
space. In windowed ABI register spill area for the previous call frame
is located just below the stack pointer and may be reloaded back into
the register file on movsp.
Implement allocate_stack pattern for windowed ABI configuration and
insert an instruction that prevents reordering of frame memory access
and stack pointer update.
gcc/
2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
Backport from mainline
2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
* config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
constant.
(allocate_stack, frame_blockage, *frame_blockage): New patterns.
From-SVN: r261764
This header was needed for the declaration of std::terminate but the
calls to it were removed in r242401.
* include/std/utility: Remove unused <exception> header.
From-SVN: r261752
gcc/ChangeLog:
PR middle-end/82063
* calls.c (alloc_max_size): Correct a logic error/typo.
Treat excessive arguments as infinite. Warn for invalid arguments.
* doc/invoke.texi (-Walloc-size-larger-than): Update.
gcc/testsuite/ChangeLog:
PR middle-end/82063
* gcc.dg/Walloc-size-larger-than-1.c: New test.
* gcc.dg/Walloc-size-larger-than-10.c: New test.
* gcc.dg/Walloc-size-larger-than-11.c: New test.
* gcc.dg/Walloc-size-larger-than-12.c: New test.
* gcc.dg/Walloc-size-larger-than-13.c: New test.
* gcc.dg/Walloc-size-larger-than-14.c: New test.
* gcc.dg/Walloc-size-larger-than-15.c: New test.
* gcc.dg/Walloc-size-larger-than-16.c: New test.
* gcc.dg/Walloc-size-larger-than-2.c: New test.
* gcc.dg/Walloc-size-larger-than-3.c: New test.
* gcc.dg/Walloc-size-larger-than-4.c: New test.
* gcc.dg/Walloc-size-larger-than-5.c: New test.
* gcc.dg/Walloc-size-larger-than-6.c: New test.
* gcc.dg/Walloc-size-larger-than-7.c: New test.
* gcc.dg/Walloc-size-larger-than-8.c: New test.
* gcc.dg/Walloc-size-larger-than-9.c: New test.
* gcc.dg/Walloc-size-larger-than.c: New test.
From-SVN: r261720
Common systems like glibc and FreeBSD define int32_t to int. This means
a lot of third party code works well in these cases:
#include <stdint.h>
void f(int32_t);
void f(int);
void g(int32_t *);
void h(void)
{
int i;
g(&i);
}
On RTEMS you got however in C
test.c:5:6: error: conflicting types for 'f'
void f(int);
^
test.c:3:6: note: previous declaration of 'f' was here
void f(int32_t);
^
test.c: In function 'h':
test.c:12:4: warning: passing argument 1 of 'g' from incompatible
pointer type [-Wincompatible-pointer-types]
g(&i);
^
test.c:7:6: note: expected 'int32_t * {aka long int *}' but argument
is of type 'int *' void g(int32_t *);
and C++
test.c: In function 'void h()':
test.c:12:4: error: invalid conversion from 'int*' to 'int32_t* {aka
long int*}' [-fpermissive]
g(&i);
^~
test.c:7:6: note: initializing argument 1 of 'void g(int32_t*)'
void g(int32_t *);
^
This was due to a Newlib speciality which uses long for int32_t if long
is a 32-bit type. To ease the use of third party software in RTEMS we
override this Newlib option now and use int for int32_t if int is a
32-bit type.
gcc/
* config/rtems.h (STDINT_LONG32): Define.
From-SVN: r261584
* gcc-interface/ada-tree.h (TYPE_RETURN_BY_DIRECT_REF_P): Change from
using TYPE_LANG_FLAG_4 to using TYPE_LANG_FLAG_0.
(TYPE_ALIGN_OK): Move around.
(TYPE_PADDING_FOR_COMPONENT): Remove superfluous parentheses.
* gcc-interface/decl.c (change_qualified_type): Move to...
(gnat_to_gnu_entity): Adjust comment.
* gcc-interface/gigi.h (change_qualified_type): ...here; make inline.
(ceil_pow2): Use ceil_log2.
* gcc-interface/utils.c (finish_subprog_decl): Add couple of comments
and do not set TREE_SIDE_EFFECTS.
(handle_noreturn_attribute): Use change_qualified_type.
From-SVN: r261488
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Do not get
the expression of a dispatch table that is not being defined.
<E_Record_Subtype>: Remove obsolete kludge.
From-SVN: r261485
2018-06-02 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: If this is
not a definition, retrieve the expression only if it's a compile-time
known value if we are just annotating types.
* gcc-interface/utils.c (convert): Do not try to upcast properly for a
conversion between tagged types in type_annotate_only mode.
From-SVN: r261482
Backport from mainline
2018-06-11 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Reuse the
existing fields of a dummy fat pointer type, if any. Clear the
TYPE_DECL_SUPPRESS_DEBUG on the fat pointer type after completing it.
From-SVN: r261478
2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/38351
* resolve.c (resolve_operator): Provide better error message for
derived type entity used in an binary intrinsic numeric operator.
2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/38351
* gfortran.dg/pr38351.f90: New test.
* gfortran.dg/typebound_operator_4.f03: Adjust for new error message.
From-SVN: r261376
2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/63514
* symbol.c (gfc_add_volatile): Enforce F2008:C1282 and F2018:C1588.
2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/63514
* gfortran.dg/pr63514.f90: New test.
From-SVN: r261375
2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/78278
* data.c (gfc_assign_data_value): Re-arrange code to allow for
an error for double initialization of CHARACTER entities.
2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/78278
* gfortran.dg/data_bounds_1.f90: Add -std=gnu option.
* gfortran.dg/data_char_1.f90: Ditto.
* gfortran.dg/pr78571.f90: Ditto.
* gfortran.dg/pr78278.f90: New test.
From-SVN: r261374
2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85138
PR fortran/85996
PR fortran/86051
* decl.c (gfc_match_char_spec): Use private namespace in attempt to
reduce a charlen to a constant.
2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85138
PR fortran/85996
PR fortran/86051
* gfortran.dg/pr85138_1.f90: New test.
* gfortran.dg/pr85138_2.f90: Ditto.
* gfortran.dg/pr85996.f90: Ditto.
From-SVN: r261371
2018-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/86045
Backport from trunk.
* simplify.c (gfc_simplify_mod): Re-arrange code to test whether
'P' is zero and issue an error if it is.
2018-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/86045
Backport from trunk.
* gfortran.dg/pr86045.f90: New test.
From-SVN: r261291
2018-06-07 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/85641
Backport from trunk.
* frontend-passes.c (is_fe_temp): Add prototype.
(realloc_string_callback): Early return for frontend-generated
temporary.
2018-06-07 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/85641
Backport from trunk.
* gfortran.dg/realloc_on_assign_30.f90: New test.
From-SVN: r261289
Backport from mainline
2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
PR target/63177
* /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
Don't handle -mcpu=power8 if -mpower9-vector is also used.
From-SVN: r261276
2018-06-07 Richard Biener <rguenther@suse.de>
Backport from mainline
2018-03-19 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/84761
* sanitizer_common/sanitizer_linux_libcdep.cc (__GLIBC_PREREQ):
Define if not defined.
(DL_INTERNAL_FUNCTION): Don't define.
(InitTlsSize): For __i386__ if not compiled against glibc 2.27+
determine at runtime whether to use regparm(3), stdcall calling
convention for older glibcs or normal calling convention for
newer glibcs for call to _dl_get_tls_static_info.
From-SVN: r261272
2018-06-07 Richard Biener <rguenther@suse.de>
Backport from mainline
2018-05-04 Richard Biener <rguenther@suse.de>
PR middle-end/85588
* fold-const.c (negate_expr_p): Restrict negation of operand
zero of a division to when we know that can happen without
overflow.
(fold_negate_expr_1): Likewise.
* gcc.dg/torture/pr85588.c: New testcase.
* gcc.dg/torture/pr57656.c: Use dg-additional-options.
2018-05-02 Richard Biener <rguenther@suse.de>
PR middle-end/85567
* gimplify.c (gimplify_save_expr): When in SSA form allow
SAVE_EXPRs to compute to SSA vars.
* gcc.dg/torture/pr85567.c: New testcase.
2018-05-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/85597
* tree-vect-stmts.c (vectorizable_operation): For ternary SLP
do not use split vect_get_vec_defs call but call vect_get_slp_defs
directly.
* gcc.dg/vect/pr85597.c: New testcase.
From-SVN: r261269
The builtin was accidentally defined to have an integer return value.
Fixed with the attached patch.
gcc/ChangeLog:
2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
Backport from mainline
2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390-builtin-types.def: Add void function type.
* config/s390/s390-builtins.def: Use the function type for the
tbeginc builtin.
gcc/testsuite/ChangeLog:
2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
Backport from mainline
2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
* gcc.target/s390/htm-builtins-compile-4.c: New test.
From-SVN: r261190
* gcc-interface/ada-tree.h (TYPE_PADDING_FOR_COMPONENT): New macro.
* gcc-interface/decl.c (gnat_to_gnu_component_type): Cache the padding
type built for an aliased component with variable size.
From-SVN: r261108
Backport from mainline
2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Call_to_gnu): If this is a function call and
there is no target, also create a temporary for the return value for
an allocator if the type is an unconstrained record type with default
discriminant.
From-SVN: r261104
2018-06-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Backport from trunk.
PR libgfortran/85840
* io/write.c (write_float_0, write_real, write_real_g0,
write_complex): Use separate local variables for the float
string length.
From-SVN: r261077
2018-06-01 Bill Schmidt <wschmidt@linux.ibm.com>
PR tree-optimization/85712
Backport from mainline:
2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
PR tree-optimization/85712
* gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
first_interp field.
(alloc_cand_and_find_basis): Initialize first_interp field.
(slsr_process_mul): Modify first_interp field.
(slsr_process_add): Likewise.
(slsr_process_cast): Modify first_interp field for each new
interpretation.
(slsr_process_copy): Likewise.
(dump_candidate): Dump first_interp field.
(replace_mult_candidate): Process all interpretations, not just
subsequent ones.
(replace_rhs_if_not_dup): Likewise.
(replace_one_candidate): Likewise.
Backport from mainline:
2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
PR tree-optimization/85712
* gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
this candidate has already been replaced in-situ by a copy.
From-SVN: r261066
2018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85543
Backport from trunk
* resolve.c (update_current_proc_array_outer_dependency): Avoid NULL
pointer dereference.
2018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85543
Backport from trunk
* gfortran.dg/pr85543.f90: New test.
From-SVN: r260774
2018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85779
Backport from trunk
* decl.c (gfc_match_derived_decl): Fix NULL point dereference.
2018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85779
Backport from trunk
* gfortran.dg/pr85779_1.f90: New test.
* gfortran.dg/pr85779_2.f90: Ditto.
* gfortran.dg/pr85779_3.f90: Ditto.
From-SVN: r260773
2018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85780
Backport from trunk
* resolve.c (resolve_fl_procedure): Avoid NULL dereference.
2018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85780
Backport from trunk
* gfortran.dg/pr85780.f90: New test.
From-SVN: r260771
2018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85895
Backport from trunk
* resolve.c (resolve_sync): Resolve expression before checking for
an error.
2018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85895
Backport from trunk
* gfortran.dg/coarray_3.f90: Fix invalid testcase.
* gfortran.dg/pr85895.f90: New test.
From-SVN: r260770
Cherry-pick compiler-rt revision 333213:
<sys/ustat.h> has been removed from glibc 2.28 by:
commit cf2478d53ad7071e84c724a986b56fe17f4f4ca7
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Sun Mar 18 11:28:59 2018 +0800
Deprecate ustat syscall interface
This patch uses pre-computed size of struct ustat for Linux.
PR sanitizer/85835
* sanitizer_common/sanitizer_platform_limits_posix.cc: Don't
include <sys/ustat.h> for Linux.
(SIZEOF_STRUCT_USTAT): New.
(struct_ustat_sz): Use SIZEOF_STRUCT_USTAT for Linux.
From-SVN: r260688
2018-05-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/80657
Backport from trunk
* resolve.c (flag_fn_result_spec): Use the 'sym' argument to
test for self refs to the function result in the character len
expression. If a self reference is found, emit an error and
return true.
(resolve_fntype): Use the function symbol in the calls to the
above.
2018-05-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/80657
Backport from trunk
* gfortran.dg/char_result_18.f90: New test.
From-SVN: r260424
2018-05-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/82275
Backport from trunk
* match.c (gfc_match_type_spec): Go through the array ref and
decrement 'rank' for every dimension that is an element.
2018-05-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/82275
Backport from trunk
* gfortran.dg/select_type_42.f90: New test.
From-SVN: r260423
2018-05-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/82923
PR fortran/66694
PR fortran/82617
* trans-array.c (gfc_alloc_allocatable_for_assignment): Set the
charlen backend_decl of the rhs expr to ss->info->string_length
so that the value in the current scope is used.
2018-05-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/82923
* gfortran.dg/allocate_assumed_charlen_4.f90: New test. Note
that the patch fixes PR66694 & PR82617, although the testcases
are not explicitly included.
From-SVN: r260399
PR libstdc++/85812
* libsupc++/cxxabi_init_exception.h (__cxa_free_exception): Declare.
* libsupc++/exception_ptr.h (make_exception_ptr) [__cpp_exceptions]:
Refactor to separate non-throwing and throwing implementations.
[__cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI]: Deallocate the memory
if constructing the object throws.
From-SVN: r260331
2018-05-17 Martin Jambor <mjambor@suse.cz>
Backport from mainline
2018-05-11 Martin Jambor <mjambor@suse.cz>
PR ipa/85655
* ipa-cp.c (intersect_with_plats): Check that the lattice contains
single const.
From-SVN: r260320
2018-05-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83149
Backport from trunk
* trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
before accessing its components.
* trans-types.c (gfc_sym_type): If a character result has null
backend_decl, try the procedure symbol..
2018-05-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83149
Backport from trunk
* gfortran.dg/pr83149_1.f90: New test.
* gfortran.dg/pr83149.f90: Additional source for previous.
* gfortran.dg/pr83149_b.f90: New test.
* gfortran.dg/pr83149_a.f90: Additional source for previous.
From-SVN: r260285
2018-16-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83898
Backport from trunk
* trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
for characters.
2018-16-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83898
Backport from trunk
* gfortran.dg/associate_33.f03 : New test.
From-SVN: r260282
2018-05-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/84546
Backport from trunk
* trans-array.c (structure_alloc_comps): Make sure that the
vptr is copied and that the unlimited polymorphic _len is used
to compute the size to be allocated.
(build_array_ref): Set the 'unlimited' argument false in the
call to gfc_get_class_array_ref.
* trans-expr.c (gfc_get_class_array_ref): If unlimited, use the
unlimited polymorphic _len for the offset to the element.
(gfc_copy_class_to_class): Set the new 'unlimited' argument.
* trans.h : Add the boolean 'unlimited' to the prototype.
2018-05-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/84546
Backport from trunk
* gfortran.dg/unlimited_polymorphic_29.f90 : New test.
From-SVN: r260281
PR libstdc++/82966
* include/bits/node_handle.h (_Node_handle_common::_M_swap): Use value
instead of type.
* testsuite/23_containers/set/modifiers/node_swap.cc: New.
From-SVN: r260242
2018-05-12 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85542
Backport from trunk
* expr.c (check_inquiry): Avoid NULL pointer dereference.
2018-05-12 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85542
Backport from trunk
* gfortran.dg/pr85542.f90: New test.
From-SVN: r260197
2018-05-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/68846
PR fortran/70864
Backport from trunk
* resolve.c (get_temp_from_expr): The temporary must not have
dummy or intent attributes.
2018-05-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/68846
Backport from trunk
* gfortran.dg/temporary_3.f90 : New test.
PR fortran/70864
Backport from trunk
* gfortran.dg/temporary_2.f90 : New test.
From-SVN: r260195
2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/70870
Backport from trunk
* data.c (gfc_assign_data_value): Check that a data object does
not also have default initialization.
2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/70870
Backport from trunk
* gfortran.dg/pr70870_1.f90: New test.
From-SVN: r260176
2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85521
Backport from trunk
* array.c (gfc_resolve_character_array_constructor): Substrings
with upper bound smaller than lower bound are zero length strings.
2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85521
Backport from trunk
* gfortran.dg/pr85521_1.f90: New test.
* gfortran.dg/pr85521_2.f90: New test.
From-SVN: r260175
2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85687
Backport from trunk
* check.c (gfc_check_rank): Check that the argument is a data object.
2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85687
Backport from trunk
* gfortran.dg/pr85687.f90: new test.
From-SVN: r260174
* doc/xml/faq.xml: Link to C++17 status. Add note to outdated answer.
* doc/xml/manual/debug_mode.xml: Add array and forward_list to list
of C++11 containers with Debug Mode support.
* doc/xml/manual/using.xml: Document Dual ABI for ios_base::failure.
* doc/html/*: Regenerate.
From-SVN: r260131
* decl2.c (determine_visibility): Don't mess with template arguments
from the containing scope.
(vague_linkage_p): Check DECL_ABSTRACT_P before looking at a 'tor
thunk.
From-SVN: r260069
2018-05-07 Edward Smith-Rowland <3dw4rd@verizon.net>
Jonathan Wakely <jwakely@redhat.com>
Backport from mainline
2018-05-07 Edward Smith-Rowland <3dw4rd@verizon.net>
PR libstdc++/80506
* include/bits/random.tcc (gamma_distribution::operator()): Fix magic
number used in loop condition.
(gamma_distribution::__generate_impl()): Ditto.
Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>
From-SVN: r260006
gcc/fortran/ChangeLog:
2018-05-06 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/85507
Backport from trunk.
* dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
introduced by r259385.
* trans-intrinsic.c (conv_caf_send): Always report a dependency for
same variables in coarray assignments.
gcc/testsuite/ChangeLog:
2018-05-06 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/85507
Backport from trunk
* gfortran.dg/coarray_dependency_1.f90: New test.
* gfortran.dg/coarray_lib_comm_1.f90: Fix counting caf-expressions.
From-SVN: r259977
On 32-bit targets any values over 4GB would wrap and produce the wrong
result.
PR libstdc++/85632 use uintmax_t for arithmetic
* src/filesystem/ops.cc (experimental::filesystem::space): Perform
arithmetic in result type.
* testsuite/experimental/filesystem/operations/space.cc: New.
From-SVN: r259909
2018-05-01 Tom de Vries <tom@codesourcery.com>
backport from trunk:
2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
Tom de Vries <tom@codesourcery.com>
PR middle-end/84955
* omp-expand.c (expand_oacc_for): Add dummy false branch for
tiled basic blocks without omp continue statements.
* testsuite/libgomp.oacc-c-c++-common/pr84955.c: New test.
* testsuite/libgomp.oacc-fortran/pr84955.f90: New test.
From-SVN: r259795
2018-04-30 Edward Smith-Rowland <3dw4rd@verizon.net>
PR libstdc++/pr66689 - comp_ellint_3 and ellint_3 return garbage values
* include/tr1/ell_integral.tcc: Correct the nu sign convention
in ellint_3 and comp_ellint_3.
* testsuite/tr1/5_numerical_facilities/special_functions/
06_comp_ellint_3/check_value.cc: Regen with correct values.
* testsuite/tr1/5_numerical_facilities/special_functions/
14_ellint_3/check_value.cc: Ditto.
* testsuite/special_functions/06_comp_ellint_3/check_value.cc: Ditto.
* testsuite/special_functions/13_ellint_3/check_value.cc: Ditto.
* testsuite/special_functions/06_comp_ellint_3/pr66689.cc: New.
* testsuite/special_functions/13_ellint_3/pr66689.cc: New.
* testsuite/tr1/5_numerical_facilities/special_functions/
06_comp_ellint_3/pr66689.cc: New.
* testsuite/tr1/5_numerical_facilities/special_functions/
14_ellint_3/pr66689.cc: New.
2018-04-30 Edward Smith-Rowland <3dw4rd@verizon.net>
PR libstdc++/68397 std::tr1::expint fails ... long double arguments.
* include/tr1/exp_integral.tcc: Increase iteration limits.
* testsuite/tr1/5_numerical_facilities/special_functions/15_expint/
pr68397.cc: New test.
* testsuite/special_functions/14_expint/pr68397.cc: New test.
svn commit \ --This line, and those below, will be ignored--
ChangeLog \ M ChangeLog M include/tr1/ell_integral.tcc A testsuite/special_functions/06_comp_ellint_3/pr66689.cc A
testsuite/special_functions/13_ellint_3/pr66689.cc A testsuite/tr1/5_numerical_facilities/special_functions/06_comp_ellint_3/pr66689.cc A
testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/pr66689.cc M testsuite/special_functions/06_comp_ellint_3/check_value.cc M
testsuite/special_functions/13_ellint_3/check_value.cc M testsuite/tr1/5_numerical_facilities/special_functions/06_comp_ellint_3/check_value.cc M
testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/check_value.cc M include/tr1/exp_integral.tcc A
testsuite/special_functions/14_expint/pr68397.cc A testsuite/tr1/5_numerical_facilities/special_functions/15_expint/pr68397.cc
include/tr1/ell_integral.tcc \
testsuite/special_functions/06_comp_ellint_3/pr66689.cc \
testsuite/special_functions/13_ellint_3/pr66689.cc \
testsuite/tr1/5_numerical_facilities/special_functions/06_comp_ellint_3/pr66689.cc \
testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/pr66689.cc \
testsuite/special_functions/06_comp_ellint_3/check_value.cc \
testsuite/special_functions/13_ellint_3/check_value.cc \
testsuite/tr1/5_numerical_facilities/special_functions/06_comp_ellint_3/check_value.cc \
testsuite/tr1/5_numerical_facilities/special_functio
From-SVN: r259777
gcc/fortran/ChangeLog:
2018-04-28 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/81773
PR fortran/83606
Backport from trunk
* dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
during dependency computation. They define no data dependency.
* trans-array.c (conv_array_index_offset): The stride can not be set
here, prevent fail.
* trans-intrinsic.c (conv_caf_send): Add creation of temporary array
for caf_get's result and copying to the array with vectorial
indexing.
gcc/testsuite/ChangeLog:
2018-04-28 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/81773
PR fortran/83606
Backport from trunk
* gfortran.dg/coarray/get_to_indexed_array_1.f90: New test.
* gfortran.dg/coarray/get_to_indirect_array.f90: New test.
From-SVN: r259742
2018-04-26 Richard Biener <rguenther@suse.de>
Backport from mainline
2018-04-09 Richard Biener <rguenther@suse.de>
PR tree-optimization/85284
* tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
Only use the niter constraining form of simple_iv when the exit
is always executed.
* gcc.dg/torture/pr85284.c: New testcase.
2018-04-06 Richard Biener <rguenther@suse.de>
PR middle-end/85244
* tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
after seeing a component reference with an adjacent field. Treat
refs to arrays at struct end of external decls similar to
refs to unconstrained commons.
* gcc.dg/torture/pr85244-1.c: New testcase.
* gcc.dg/torture/pr85244-2.c: Likewise.
2018-04-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/85168
* tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
propagating abnormals.
* gcc.dg/torture/pr85168.c: New testcase.
2018-03-16 Richard Biener <rguenther@suse.de>
PR c/84873
* c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
unshare the possibly folded expression.
2018-03-15 Richard Biener <rguenther@suse.de>
PR c/84873
* c-gimplify.c (c_gimplify_expr): Do not fold expressions.
* c-c++-common/pr84873.c: New testcase.
From-SVN: r259670
2018-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85520
* decl.c (gfc_match_char_spec): Check for negative length and set to 0.
2018-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85520
* gfortran.dg/pr85520.f90: New test.
From-SVN: r259624
2018-04-24 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-04-19 Martin Liska <mliska@suse.cz>
* lto-symtab.c (lto_symtab_resolve_symbols): Do not bail out
for multiple PREVAILING_DEF_IRONLY for common symbols.
From-SVN: r259605
2018-04-24 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-04-18 Bill Seurer <seurer@linux.vnet.ibm.com>
PR sanitizer/85389
* asan/asan_allocator.h (kAllocatorSpace): For __powerpc64__ change
from 0xa0000000000ULL to ~(uptr)0.
From-SVN: r259604
2018-04-24 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-04-17 Martin Liska <mliska@suse.cz>
PR lto/85405
* ipa-devirt.c (odr_types_equivalent_p): Remove trailing
in message, remote space in between '_G' and '('.
From-SVN: r259603
2018-04-24 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-04-10 Martin Liska <mliska@suse.cz>
PR lto/85248
* lto-symtab.c (lto_symtab_merge_p): Do not check for
TREE_VALUES of error attributes.
From-SVN: r259601
2018-04-24 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-04-10 Richard Biener <rguenther@suse.de>
Martin Liska <mliska@suse.cz>
PR lto/85248
* lto-symtab.c (lto_symtab_merge_p): Handle noreturn attribute.
2018-04-24 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-04-10 Jakub Jelinek <jakub@redhat.com>
PR lto/85248
* gcc.dg/lto/pr85248_0.c: New test.
* gcc.dg/lto/pr85248_1.c: New test.
From-SVN: r259600
2018-04-24 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-03-28 Jakub Jelinek <jakub@redhat.com>
Martin Liska <mliska@suse.cz>
PR sanitizer/85081
* gimplify.c (asan_poison_variable): Don't do the check for
gimplify_omp_ctxp here.
(gimplify_decl_expr): Do it here.
(gimplify_target_expr): Likewise.
2018-04-24 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-03-28 Jakub Jelinek <jakub@redhat.com>
Martin Liska <mliska@suse.cz>
PR sanitizer/85081
* g++.dg/asan/pr85081.C: New test.
From-SVN: r259599
2018-04-24 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-03-21 Martin Liska <mliska@suse.cz>
PR ipa/84963
* ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
not intended return statement.
2018-04-24 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-03-21 Martin Liska <mliska@suse.cz>
PR ipa/84963
* gfortran.dg/goacc/pr84963.f90: New test.
From-SVN: r259598
2018-04-24 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-03-13 Martin Liska <mliska@suse.cz>
PR ipa/84658.
* (sem_item_optimizer::sem_item_optimizer): Initialize new
vector.
(sem_item_optimizer::~sem_item_optimizer): Release it.
(sem_item_optimizer::merge_classes): Register variable aliases.
(sem_item_optimizer::fixup_pt_set): New function.
(sem_item_optimizer::fixup_points_to_sets): Likewise.
* ipa-icf.h: Declare new variables and functions.
2018-04-24 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-03-13 Martin Liska <mliska@suse.cz>
PR ipa/84658.
* g++.dg/ipa/pr84658.C: New test.
From-SVN: r259597
2018-04-23 Aaron Sawdey <acsawdey@linux.ibm.com>
Backport from mainline
2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
PR target/83660
* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
vec_extract expression as having side effects to make sure it gets
a cleanup point.
2018-04-23 Aaron Sawdey <acsawdey@linux.ibm.com>
Backport from mainline
2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
PR target/83660
* gcc.target/powerpc/pr83660.C: New test.
From-SVN: r259590
PR middle-end/85496
* expr.c (store_field): In the bitfield case, if the value comes from
a function call and is returned in registers by means of a PARALLEL,
do not change the mode of the temporary unless BLKmode and VOIDmode.
From-SVN: r259576
Backport from mainline
2018-04-05 Ville Voutilainen <ville.voutilainen@gmail.com>
Implement P0961
* decl.c (get_tuple_decomp_init): Check the templatedness
of a member get.
From-SVN: r259561
gcc/
Backport from mainline
2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
PR target/83969
* config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
Add strict argument and use it.
(rs6000_split_multireg_move): Update for new strict argument.
(mem_operand_gpr): Disallow all non-offsettable addresses.
* config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
gcc/testsuite/
PR target/85436
* go.dg/pr85436.go: New test.
Backport from mainline
2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
PR target/83969
* gcc.target/powerpc/pr83969.c: New test.
From-SVN: r259520
The fix for PR c++/69733 caused a regression for conversion operators
with redundant cv-qualifiers, changing an incorrect location to an
unknown location. This restores it to the incorrect location (as was
already done on trunk by the fix for PR c++/65775).
gcc/cp:
PR c++/85464 - missing location for -Wignored-qualifiers diagnostic
* decl.c (grokdeclarator): If declspecs->locations[ds_type_spec]
is UNKNOWN_LOCATION fall back to input_location.
gcc/testsuite:
PR c++/85464 - missing location for -Wignored-qualifiers diagnostic
* g++.dg/diagnostic/pr85464.C: New.
From-SVN: r259499
2018-04-18 Jonathan Wakely <jwakely@redhat.com>
Jakub Jelinek <jakub@redhat.com>
PR libstdc++/85442
* src/c++11/Makefile.am: Don't generate debuginfo again for
cxx11-ios_failure-lt.s and cxx11-ios_failure.s files.
* src/c++11/Makefile.in: Regenerate.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r259468
Instruction pattern for setting the FPSCR expects the input value to be
in a register. However, __builtin_arm_set_fpscr expander does not ensure
that this is the case and as a result GCC ICEs when the builtin is
called with a constant literal.
This commit fixes the builtin to force the input value into a register.
It also remove the unneeded volatile in the existing fpscr test and
fixes the function prototype.
2018-04-18 Thomas Preud'homme <thomas.preudhomme@arm.com>
Backport from mainline
2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
gcc/
PR target/85261
* config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
into register.
gcc/testsuite/
PR target/85261
* gcc.target/arm/fpscr.c: Add call to __builtin_arm_set_fpscr with
literal value. Expect 2 MCR instruction. Fix function prototype.
Remove volatile keyword.
From-SVN: r259465
* src/c++11/Makefile.am: Rewrite sed rule to be less fragile and to
handle mangled names starting with double underscores on darwin.
* src/c++11/Makefile.in: Regenerate.
From-SVN: r259372
Define a new exception type derived from std::ios::failure[abi:cxx11]
which also aggregates an object of the gcc4-compatible ios::failure
type. Make __throw_ios_failure throw this new type for iostream errors
that raise exceptions. Provide custom type info for the new type so that
it can be caught by handlers for the gcc4-compatible ios::failure type
as well as handlers for ios::failure[abi:cxx11] and its bases.
Backport from mainline
2018-04-10 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/85222
* src/c++11/Makefile.am [ENABLE_DUAL_ABI]: Add special rules for
cxx11-ios_failure.cc to rewrite type info for __ios_failure.
* src/c++11/Makefile.in: Regenerate.
* src/c++11/cxx11-ios_failure.cc (__ios_failure, __iosfail_type_info):
New types.
[_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
* src/c++11/ios.cc (__throw_ios_failure): Remove definition.
(_GLIBCXX_USE_CXX11_ABI): Don't define here.
* src/c++98/ios_failure.cc (__construct_ios_failure)
(__destroy_ios_failure, is_ios_failure_handler): New functions.
[!_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
* testsuite/27_io/ios_base/failure/dual_abi.cc: New.
* testsuite/27_io/basic_ios/copyfmt/char/1.cc: Revert changes to
handler types, to always catch std::ios_base::failure.
* testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
* testsuite/27_io/basic_istream/extractors_arithmetic/char/
exceptions_failbit.cc: Likewise.
* testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
exceptions_failbit.cc: Likewise.
* testsuite/27_io/basic_istream/extractors_other/char/
exceptions_null.cc: Likewise.
* testsuite/27_io/basic_istream/extractors_other/wchar_t/
exceptions_null.cc: Likewise.
* testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
* testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
* testsuite/27_io/basic_ostream/inserters_other/char/
exceptions_null.cc: Likewise.
* testsuite/27_io/basic_ostream/inserters_other/wchar_t/
exceptions_null.cc: Likewise.
* testsuite/27_io/ios_base/storage/2.cc: Likewise.
From-SVN: r259352
The $(GNATLIBCFLAGS) are already included in $(GNATLIBCFLAGS_FOR_C).
We must call the C compiler with the right machine flags. So, add
$(GNATLIBCFLAGS_FOR_C) to $(OSCONS_EXTRACT). For example, on a bi-arch
compiler supporting 32-bit and 64-bit instruction sets we pick otherwise
only one variant due to a missing -m32 or -m64 flag.
gcc/ada
* gcc-interface/Makefile.in (OSCONS_CPP): Remove redundant
$(GNATLIBCFLAGS).
(OSCONS_EXTRACT): Add $(GNATLIBCFLAGS_FOR_C).
From-SVN: r259343
The CFI magic we emit as part of the indirect branch thunks in order to
have somewhat sane unwind information must not be emitted with
-fno-dwarf2-cfi-asm.
gcc/ChangeLog:
2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Backport from mainline
2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/s390.c (s390_output_indirect_thunk_function): Check
also for flag_dwarf2_cfi_asm.
gcc/testsuite/ChangeLog:
2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Backport from mainline
2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* gcc.target/s390/nobp-no-dwarf2-cfi.c: New test.
From-SVN: r259341
__builtin_cmse_nonsecure_caller implementation returns true in almost
all cases due to 2 separate bugs:
* gen_addsi is used instead of gen_andsi to retrieve the lsb
* the lsb boolean value is not negated but the specification [1] says
the intrinsic should return true for a nonsecure caller and a
nonsecure caller is characterized with LR's lsb being 0
This was not caught due to (1) lack of runtime test and (2) the existing
RTL scan not taking into account that '.' matches newline in Tcl regular
expressions.
This commit fixes the implementation issues and improves testing of
cmse_nonsecure_caller by (1) adding a runtime test for the secure caller
case and (2) looking for an SET insn of an AND expression in the right
function. This leaves the nonsecure caller case only partly tested
since the exact value being AND and the negation are not covered by the
scan and the existing test infrastructure does not allow 2 separate
compilation and link to be performed. It is enough though to catch the
current incorrect behavior.
The commit also reorganize the scan directives in cmse-1.c to more
easily identify what function they are intended to test in the file.
2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
Backport from mainline
2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
gcc/
PR target/85203
* config/arm/arm-builtins.c (arm_expand_builtin): Change
expansion to perform a bitwise AND of the argument followed by a
boolean negation of the result.
gcc/testsuite/
PR target/85203
* gcc.target/arm/cmse/cmse-1.c: Tighten cmse_nonsecure_caller RTL scan
to match a single insn of the baz function. Move scan directives at
the end of the file below the functions they are trying to test for
better readability.
* gcc.target/arm/cmse/cmse-16.c: New testcase.
From-SVN: r259309
gcc/
Backport from mainline
2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
PR rtl-optimization/84878
* ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
the basic block. Assert the use reference is not artificial and that
it has an associated insn.
gcc/testsuite/
Backport from mainline
2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
PR rtl-optimization/84878
* gcc.target/powerpc/pr84878.c: New test.
From-SVN: r259103
* config/i386/i386.c (emit_i387_cw_initialization): Always use logic
instructions when changing rounding bits to preserve precision bits
in the x87 control word.
From-SVN: r259055
Backport from mainline
2018-02-08 Peter Bergner <bergner@vnet.ibm.com>
PR target/81143
* gcc.target/powerpc/pr79799-2.c: Use __LITTLE_ENDIAN__.
From-SVN: r259011
Backport from mainline
2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
PR target/80546
* config/rs6000/vsx.md (??r): New mode attribute.
(*vsx_mov<mode>_64bit): Use it.
(*vsx_mov<mode>_32bit): Likewise.
From-SVN: r259009
Enable AVX and AVX512 features only if their states are supported by
OSXSAVE.
Backport from mainline
PR target/85100
* config/i386/cpuinfo.c (XCR_XFEATURE_ENABLED_MASK): New.
(XSTATE_FP): Likewise.
(XSTATE_SSE): Likewise.
(XSTATE_YMM): Likewise.
(XSTATE_OPMASK): Likewise.
(XSTATE_ZMM): Likewise.
(XSTATE_HI_ZMM): Likewise.
(XCR_AVX_ENABLED_MASK): Likewise.
(XCR_AVX512F_ENABLED_MASK): Likewise.
(get_available_features): Enable AVX and AVX512 features only
if their states are supported by OSXSAVE.
From-SVN: r259006
Backport from mainline
2018-03-23 Ville Voutilainen <ville.voutilainen@gmail.com>
Implement P0962
* parser.c (cp_parser_perform_range_for_lookup): Change
the condition for deciding whether to use members.
From-SVN: r258955
arm-linux-gnueabihf
This patch backports r258777 and r258805 to gcc-7-branch
and gcc-6-branch. The same ICE occurs in both the branches with
-fstack-check. Thus the test case directive has been changed.
The discussion on the patch that went into trunk is:
https://gcc.gnu.org/ml/gcc-patches/2018-03/msg01120.html
ChangeLog entries:
*** gcc/ChangeLog ***
2018-03-29 Sudakshina Das <sudi.das@arm.com>
Backport from mainline
2018-03-22 Sudakshina Das <sudi.das@arm.com>
PR target/84826
* config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
* config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
re-computing once computed.
(arm_expand_prologue): Compute machine->static_chain_stack_bytes.
(arm_init_machine_status): Initialize
machine->static_chain_stack_bytes.
*** gcc/testsuite/ChangeLog ***
2018-03-29 Sudakshina Das <sudi.das@arm.com>
* gcc.target/arm/pr84826.c: Change dg-option to -fstack-check.
Backport from mainline
2018-03-23 Sudakshina Das <sudi.das@arm.com>
PR target/84826
* gcc.target/arm/pr84826.c: Add dg directive.
Backport from mainline
2018-03-22 Sudakshina Das <sudi.das@arm.com>
PR target/84826
* gcc.target/arm/pr84826.c: New test.
From-SVN: r258948
gcc/testsuite/ChangeLog:
2018-03-28 Carl Love <cel@us.ibm.com>
* gcc.target/powerpc/crypto-builtin-1-runnable: Add
p8vector_hw to dg-do run.
From-SVN: r258937
2018-03-28 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/85084
Backport from trunk.
* frontend-passes.c (gfc_run_passes): Do not run front-end
optimizations if a previous error occurred.
2018-03-28 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/85084
Backport from trunk.
* gfortran.dg/matmul_rank_1.f90: New test.
From-SVN: r258926
This adds a new option -mreadonly-in-sdata (on by default) that
controls whether readonly data can be put in sdata. (For EABI this
does nothing, readonly data is put in sdata2 as usual).
Backport from mainline
2018-03-08 Segher Boessenkool <segher@kernel.crashing.org>
PR target/82411
* config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
readonly data in sdata, if that is disabled.
* config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
* doc/invoke.texi (RS/6000 and PowerPC Options): Document
-mreadonly-in-sdata option.
Backport from mainline
2018-03-08 Segher Boessenkool <segher@kernel.crashing.org>
PR target/82411
* gcc.target/powerpc/ppc-sdata-2.c: Skip if -mno-readonly-in-sdata.
From-SVN: r258907
This is a backport of r258677 and r258723 of trunk.
*** gcc/ChangeLog ***
2018-03-27 Sudakshina Das <sudi.das@arm.com>
Backport from mainline:
2018-03-20 Sudakshina Das <sudi.das@arm.com>
PR target/82989
* config/arm/neon.md (ashldi3_neon): Update ?s for constraints
to favor GPR over NEON registers.
(<shift>di3_neon): Likewise.
*** gcc/testsuite/ChangeLog ***
2018-03-27 Sudakshina Das <sudi.das@arm.com>
Backport from mainline:
2018-03-20 Sudakshina Das <sudi.das@arm.com>
PR target/82989
* gcc.target/arm/pr82989.c: New test.
Backport from mainline:
2018-03-21 Sudakshina Das <sudi.das@arm.com>
PR target/82989
* gcc.target/arm/pr82989.c: Change dg scan-assembly directives.
From-SVN: r258883
gcc/ChangeLog:
2018-03-23 Carl Love <cel@us.ibm.com>
Backport from mainline:
2018-03-14 Carl Love <cel@us.ibm.com>
* config/rs6000/r6000.c (rtx_is_swappable_p): Add case UNSPEC_VPERMXOR.
gcc/testsuite/ChangeLog:
2018-03-23 Carl Love <cel@us.ibm.com>
* gcc.target/powerpc/crypto-builtin-1-runnable.c: New test file.
From-SVN: r258815
* constexpr.c (cxx_eval_bare_aggregate): Update constructor's flags
even when we replace an element.
* g++.dg/cpp0x/nsdmi14.C: New test.
* g++.dg/cpp1y/nsdmi-aggr10.C: New test.
From-SVN: r258772
PR c++/84854
* semantics.c (finish_if_stmt_cond): Check if the type of the condition
is boolean.
* g++.dg/cpp1z/constexpr-if13.C: New test.
From-SVN: r258770
2018-03-22 Tom de Vries <tom@codesourcery.com>
backport from trunk:
2018-03-22 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/84956
* tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
bb_has_abnormal_pred.
* gcc.dg/pr84956.c: New test.
From-SVN: r258759
2018-03-20 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85001
* interface.c (symbol_rank): Remove bogus null pointer check that
crept in when translating a ternary operator into an if-else
constructor.
2018-03-20 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85001
* gfortran.dg/interface_41.f90: New test.
From-SVN: r258699
2018-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/84931
Backport from trunk
* simplify.c (gfc_convert_constant): Correctly handle iterators
for type conversion.
2018-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/84931
Backport from trunk
* gfortran.dg/array_constructor_52.f90: New test.
From-SVN: r258666
2018-03-19 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/77414
* decl.c (get_proc_name): Check for a subroutine re-defined in
the contain portion of a subroutine. Change language of existing
error message to better describe the issue. While here fix whitespace
issues.
2018-03-19 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/77414
* gfortran.dg/pr77414.f90: New test.
* gfortran.dg/internal_references_1.f90: Adjust error message.
From-SVN: r258654
2018-03-19 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/65453
* decl.c (get_proc_name): Catch clash between a procedure statement
and a contained subprogram
2018-03-19 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/65453
* gfortran.dg/pr65453.f90: New test.
From-SVN: r258652
Function return thunks shouldn't be aliased to indirect branch thunks
since indirect branch thunks are placed in COMDAT section and a COMDAT
section with indirect branch may not have function return thunk. This
patch generates function return thunks directly.
gcc/
Backport from mainline
2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
PR target/84574
* config/i386/i386.c (indirect_thunk_needed): Update comments.
(indirect_thunk_bnd_needed): Likewise.
(indirect_thunks_used): Likewise.
(indirect_thunks_bnd_used): Likewise.
(indirect_return_needed): New.
(indirect_return_bnd_needed): Likewise.
(output_indirect_thunk_function): Add a bool argument for
function return.
(output_indirect_thunk_function): Don't generate alias for
function return thunk.
(ix86_code_end): Call output_indirect_thunk_function to generate
function return thunks.
(ix86_output_function_return): Set indirect_return_bnd_needed
and indirect_return_needed instead of indirect_thunk_bnd_needed
and indirect_thunk_needed.
gcc/testsuite/
Backport from mainline
2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
PR target/84574
* gcc.target/i386/ret-thunk-9.c: Expect __x86_return_thunk
label instead of __x86_indirect_thunk label.
From-SVN: r258647
2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/78741
* decl.c (get_proc_name): Check for clash of entry name with
subroutine name.
2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/78741
* gfortran.dg/pr78741.f90: New test.
From-SVN: r258583
2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/78741
* decl.c (get_proc_name): Check for clash of entry name with
subroutine name.
2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/78741
* gfortran.dg/pr78741.f90: New test.
From-SVN: r258582
GCC 6 and 7 would vectorise:
void
f (unsigned long incx, unsigned long incy,
float *restrict dx, float *restrict dy)
{
unsigned long ix = 0, iy = 0;
for (unsigned long i = 0; i < 512; ++i)
{
dy[iy] += dx[ix];
ix += incx;
iy += incy;
}
}
without first proving that incy is nonzero. This is a regression from
GCC 5. It was fixed on trunk in r256644, which versioned the loop based
on whether incy is zero, but that's obviously too invasive to backport.
This patch instead bails out for possibly-zero steps in the place that
trunk would try a check for zeroness.
Also, the patch makes vect_analyze_data_ref_access check safelen
as well as force_vectorize.
2018-03-12 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
PR tree-optimization/84485
* tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Return
true for zero dependence distances if the step might be zero,
and if there is no metadata that guarantees correctness.
(vect_analyze_data_ref_access): Check safelen as well as
force_vectorize.
gcc/testsuite/
PR tree-optimization/84485
* gcc.dg/vect/pr84485.c: New test.
From-SVN: r258450
Backport from mainline
2018-02-14 John David Anglin <danglin@gcc.gnu.org>
PR target/83984
* config/pa/pa.md: Load address of PIC label using the linkage table
if the label is nonlocal.
From-SVN: r258432
Backport from mainline
2018-03-06 John David Anglin <danglin@gcc.gnu.org>
* config/pa/fptr.c (_dl_read_access_allowed): New.
(__canonicalize_funcptr_for_compare): Use it.
From-SVN: r258430
Backport from mainline
2018-03-06 John David Anglin <danglin@gcc.gnu.org>
* config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
sprint_ul.
(ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
(ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
* config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
From-SVN: r258428
2018-03-10 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/84734
* arith.c (check_result, eval_intrinsic): If result overflows, pass
the expression up the chain instead of a NULL pointer.
2018-03-10 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/84734
* gfortran.dg/pr84734.f90: New test.
From-SVN: r258417
The compiler builtin will use the hardware instruction cdsg if the
memory operand is properly aligned and will fall back to the
library call otherwise.
In case the compiler for one part is able to detect that the
location is aligned and fails to do so for another usage of the hw
instruction and the sw fall back would be mixed on the same memory
location. To avoid this the library fall back also has to use the
hardware instruction if possible.
libatomic/ChangeLog:
2018-03-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Backport from mainline
2018-03-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/exch_n.c: New file.
* configure.tgt: Add the config directory for s390.
From-SVN: r258385
2018-03-08 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/64124
PR fortran/70409
* decl.c (gfc_match_char_spec): Try to reduce a charlen to a constant.
2018-03-08 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/64124
PR fortran/70409
* gfortran.dg/pr64124.f90: New tests.
* gfortran.dg/pr70409.f90: New tests.
From-SVN: r258367
Backport from mainline
2018-02-07 Georg-Johann Lay <avr@gjlay.de>
PR target/84209
* config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
* config/avr/avr.md: Only post-reload split REG-REG moves if
either register is GENERAL_REG_P.
From-SVN: r258315
gcc/ChangeLog
2018-03-06 Carl Love <cel@us.ibm.com>
Backport from mainline
2/16/18 commit 257748 Carl Love <cel@us.ibm.com>
* config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
* config/rs6000/rs6000-builtin.def: Remove macro expansion for
VINSERT4B_DI and VINSERT4B.
* config/rs6000/rs6000.c: Remove case statements for
P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
and P9V_BUILTIN_VEC_VINSERT4B.
* config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
* config/rs6000/vsx.md: Remove define_expand vinsert4b,
define_insn *vinsert4b_internal, define_insn "*vinsert4b_di_internal.
* doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
vec_insert4b.
gcc/testsuite/ChangeLog
2018-03-06 Carl Love <cel@us.ibm.com>
Backport from mainline
2/16/18 commit 257748 Carl Love <cel@us.ibm.com>
* gcc.target/powerpc/p9-vinsert4b-1.c: Remove test file for non-ABI
tests.
* gcc.target/powerpc/p9-vinsert4b-2.c: Remove test file for non-ABI
tests.
From-SVN: r258306
2018-03-06 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-02-05 Martin Liska <mliska@suse.cz>
PR gcov-profile/83879
* doc/gcov.texi: Document necessity of --dynamic-list-data when
using dlopen functionality.
From-SVN: r258296
2018-03-06 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-01-23 Martin Liska <mliska@suse.cz>
PR lto/81440
* lto-symtab.c (lto_symtab_merge): Handle and do not warn about
trailing arrays at the end of a struct.
2018-03-06 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-01-23 Martin Liska <mliska@suse.cz>
PR lto/81440
* gcc.dg/lto/pr81440.h: New test.
* gcc.dg/lto/pr81440_0.c: New test.
* gcc.dg/lto/pr81440_1.c: New test.
From-SVN: r258295
2018-03-06 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-12-19 Martin Liska <mliska@suse.cz>
PR rtl-optimization/82675
* loop-unroll.c (unroll_loop_constant_iterations): Allocate one
more element in sbitmap.
From-SVN: r258294
2018-03-06 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-04-27 Martin Liska <mliska@suse.cz>
PR testsuite/79455
* c-c++-common/tsan/race_on_mutex.c: Make the scanned pattern
more generic.
From-SVN: r258293
2018-03-06 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-03-05 Martin Liska <mliska@suse.cz>
* ipa-utils.c (ipa_merge_profiles): Do not merge alias or
a function without profile.
From-SVN: r258292
2018-03-06 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-02-21 Jan Hubicka <hubicka@ucw.cz>
PR c/84229
* ipa-cp.c (determine_versionability): Do not version functions caling
va_arg_pack.
From-SVN: r258290
2018-03-06 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-02-08 Jan Hubicka <hubicka@ucw.cz>
PR ipa/81360
* cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
* symtab.c: Include builtins.h
(symtab_node::output_to_lto_symbol_table_p): Move here
from lto-streamer-out.c:output_symbol_p.
* lto-streamer-out.c (write_symbol): Turn early exit to assert.
(output_symbol_p): Move all logic to symtab.c
(produce_symtab): Update.
2018-03-06 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-02-08 Jan Hubicka <hubicka@ucw.cz>
PR ipa/81360
* lto.c (unify_scc): Register prevailing trees, not trees to be freed.
(read_cgraph_and_symbols): Use
symtab_node::output_to_lto_symbol_table_p.
From-SVN: r258289
2018-03-06 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-01-30 Jan Hubicka <hubicka@ucw.cz>
PR lto/81004
* lto.c: Include builtins.h
(register_resolution): Merge resolutions in case trees was
merged across units.
(lto_maybe_register_decl): Break out from ...
(lto_read_decls): ... here.
(unify_scc): Also register decls here.
(read_cgraph_and_symbols): Sanity check that all resolutions was
read.
From-SVN: r258287
2018-03-06 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-02-02 Eric Botcazou <ebotcazou@adacore.com>
PR lto/83954
* lto-symtab.c (warn_type_compatibility_p): Do not recurse into the
component type of array types with non-aliased component.
From-SVN: r258286
2018-03-06 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-01-30 Jan Hubicka <hubicka@ucw.cz>
PR lto/83954
* lto-symtab.c (warn_type_compatibility_p): Silence false positive
for type match warning on arrays of pointers.
2018-03-06 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-01-30 Jan Hubicka <hubicka@ucw.cz>
PR lto/83954
* gcc.dg/lto/pr83954.h: New testcase.
* gcc.dg/lto/pr83954_0.c: New testcase.
* gcc.dg/lto/pr83954_1.c: New testcase.
From-SVN: r258285
2018-03-06 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-10-13 Jan Hubicka <hubicka@ucw.cz>
* lto-lang.c (lto_post_options): Clean shlib flag when not doing PIC.
From-SVN: r258284
2018-03-06 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/56667
* primary.c (match_sym_complex_part): Give the matcher for an implied
do-loop a chance to run.
2018-03-06 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/56667
* gfortran.dg/implied_do_2.f90: New test.
* gfortran.dg/coarray_8.f90: Update for new error message.
From-SVN: r258282
gcc/
Backport from mainline
2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
PR target/81572
* lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
* lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
LRA_UNKNOWN_ALT.
* lra-constraints.c (curr_insn_transform): Set up
LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
LRA_UNKNOWN_ALT.
(remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
* lra-eliminations.c (spill_pseudos): Ditto.
(process_insn_for_elimination): Ditto.
* lra-lives.c (reg_early_clobber_p): Use the new macros.
* lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
LRA_NON_CLOBBERED_ALT.
gcc/testsuite/
Backport from mainline
2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
PR target/81572
* gcc.target/powerpc/pr81572.c: New.
From-SVN: r258280
* gcc-interface/trans.c (convert_with_check): Fix typo in the condition
guarding the overflow check emitted for the upper bound of a floating-
point conversion.
From-SVN: r258278
2018-03-06 Richard Biener <rguenther@suse.de>
Backport from mainline
2018-03-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/84486
* tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
When inserting a __builtin_assume_aligned call set the LHS
SSA name alignment info accordingly.
2018-02-28 Richard Biener <rguenther@suse.de>
PR middle-end/84607
* genmatch.c (capture_info::walk_match): Do not mark
captured expressions without operands as expr_p given
they act more like predicates and should be subject to
"lost tail" side-effect preserving.
* gcc.dg/pr84607.c: New testcase.
From-SVN: r258274
2018-03-04 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83076
* resolve.c (resolve_fl_derived0): Add caf_token fields for
allocatable and pointer scalars, when -fcoarray selected.
* trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
field as well as the backend_decl.
(gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
derived types that are not vtypes. Components with caf_token
attribute are pvoid types. For a component requiring it, find
the caf_token field and have the component token field point to
its backend_decl.
PR fortran/83319
*trans-types.c (gfc_get_array_descriptor_base): Add the token
field to the descriptor even when codimen not set.
2018-03-04 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83076
* gfortran.dg/coarray_45.f90 : New test.
PR fortran/83319
* gfortran.dg/coarray_46.f90 : New test.
From-SVN: r258233
2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/51434
* simplify.c (gfc_simplify_transfer): Resolve mold.
2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/51434
* gfortran.dg/pr51434.f90: New test.
From-SVN: r258222
2018-03-03 Paul Thomas <pault@gcc.gnu.org>
PR fortran/80965
* resolve.c (build_loc_call): Change symtree name from 'loc' to
'_loc'.
2018-03-03 Paul Thomas <pault@gcc.gnu.org>
PR fortran/80965
* gfortran.dg/select_type_41.f90: New test.
From-SVN: r258213
2018-03-03 Paul Thomas <pault@gcc.gnu.org>
PR fortran/78990
* expr.c (gfc_is_class_array_function): Renamed from
'gfc_is_alloc_class_array_function' and modified to return true
for pointers as well as allocatable results.
* gfortran.h : Change of name for prototype of above function.
* trans-array.c (gfc_add_loop_ss_code): Force finalization of
class array results.
(build_class_array_ref): Change assertion into a condition.
(build_class_array_ref): Set the se class_vptr for class array
function results.
(gfc_walk_function_expr): Reference gfc_is_class_array_function
as above.
* trans-decl.c (get_proc_result): Move it up before
gfc_trans_deferred_vars.
(gfc_trans_deferred_vars): Nullify explicit return class arrays
on entry.
* trans-expr.c (gfc_conv_class_to_class): Allow conversion of
class array functions that have an se class_vptr and use it
for the result vptr.
(gfc_conv_subref_array_arg): Rename reference to the above
function.
(gfc_conv_procedure_call): Ditto. Add the se pre block to the
loop pre block before the function is evaluated. Do not
finalize class pointer results.
(arrayfunc_assign_needs_temporary, gfc_trans_assignment_1) More
renamed references.
* trans-intrinsic.c (gfc_conv_intrinsic_size): Ditto.
2018-03-03 Paul Thomas <pault@gcc.gnu.org>
PR fortran/78990
* gfortran.dg/class_67.f90: New test.
From-SVN: r258212
Backported from mainline
2018-03-02 Jakub Jelinek <jakub@redhat.com>
Richard Biener <rguenther@suse.de>
PR ipa/84628
* expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
for error or warning attributes if CALL_FROM_THUNK_P is set.
Formatting fixes.
* gcc.dg/pr84628.c: New test.
From-SVN: r258208
Backported from mainline
2018-03-02 Jakub Jelinek <jakub@redhat.com>
PR inline-asm/84625
* config/i386/i386.c (ix86_print_operand): Use conditional
output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
zero vector.
* gcc.target/i386/pr84625.c: New test.
From-SVN: r258207
Backported from mainline
2018-02-26 Jakub Jelinek <jakub@redhat.com>
PR c++/84558
* constexpr.c (cxx_eval_vec_init_1): For reuse, treat NULL eltinit like
a valid constant initializer. Formatting fixes.
* g++.dg/cpp1y/pr84558.C: New test.
From-SVN: r258205
Backported from mainline
2018-02-26 Jakub Jelinek <jakub@redhat.com>
PR c++/84556
* g++.dg/gomp/pr84556.C: New test.
* g++.dg/vect/pr84556.cc: New test.
From-SVN: r258203
Backported from mainline
2018-02-23 Jakub Jelinek <jakub@redhat.com>
* ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
p->max as pointers rather than using iterative_hash_expr.
From-SVN: r258202
Backported from mainline
2018-02-22 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/84503
* gcc.dg/pr84503-1.c: New test.
* gcc.dg/pr84503-2.c: New test.
2017-11-10 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/82916
* gimple-ssa-store-merging.c
(pass_store_merging::terminate_all_aliasing_chains): For
gimple_store_p stmts also call refs_output_dependent_p.
* gcc.dg/pr82916.c: New test.
From-SVN: r258201
Backported from mainline
2018-02-20 Jakub Jelinek <jakub@redhat.com>
PR c++/84445
* class.c (fixed_type_or_null) <case CALL_EXPR>: Only test
TREE_HAS_CONSTRUCTOR if instance is not an internal function call.
* g++.dg/cpp1z/launder7.C: New test.
From-SVN: r258200
Backported from mainline
2018-02-20 Jakub Jelinek <jakub@redhat.com>
PR c++/84449
* tree.c (bot_manip): If build_cplus_new or break_out_target_exprs
returns error_mark_node, return it immediately.
(break_out_target_exprs): If cp_walk_tree with bot_manip returns
error_mark_node, return error_mark_node.
* g++.dg/cpp0x/constexpr-84449.C: New test.
From-SVN: r258199
Backported from mainline
2018-02-19 Jakub Jelinek <jakub@redhat.com>
PR c++/84444
* builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
is ADDR_EXPR.
* g++.dg/cpp1z/launder8.C: New test.
From-SVN: r258198
Backported from mainline
2018-02-19 Jakub Jelinek <jakub@redhat.com>
PR c++/84448
* parser.c (cp_parser_binary_expression): For no_toplevel_fold_p, if
either operand is error_mark_node, set current.lhs to that instead of
creating a binary op with error_mark_node operands.
* g++.dg/gomp/pr84448.C: New test.
From-SVN: r258197
Backported from mainline
2018-02-16 Jakub Jelinek <jakub@redhat.com>
PR fortran/84418
* trans-openmp.c (gfc_trans_omp_clauses): For OMP_CLAUSE_LINEAR_REF
kind set OMP_CLAUSE_LINEAR_STEP to TYPE_SIZE_UNIT times last_step.
* libgomp.fortran/pr84418-1.f90: New test.
* libgomp.fortran/pr84418-2.f90: New test.
From-SVN: r258193
Backported from mainline
2018-02-16 Marek Polacek <polacek@redhat.com>
Jakub Jelinek <jakub@redhat.com>
PR c++/84192
* constexpr.c (cxx_eval_constant_expression) <case RETURN_EXPR>: Don't
set *jump_target to anything if jump_target is NULL.
* g++.dg/cpp1y/constexpr-84192.C: New test.
From-SVN: r258192
Backported from mainline
2018-02-13 Jakub Jelinek <jakub@redhat.com>
PR c/82210
* stor-layout.c (place_field): For variable length fields, adjust
offset_align afterwards not just based on the field's alignment,
but also on the size.
* gcc.c-torture/execute/pr82210.c: New test.
From-SVN: r258191
Backported from mainline
2018-02-12 Jakub Jelinek <jakub@redhat.com>
PR c++/84341
* parser.c (cp_parser_binary_expression): Use build_min instead of
build2_loc to build the no_toplevel_fold_p toplevel binary expression.
* c-c++-common/gomp/pr84341.c: New test.
From-SVN: r258190
Backported from mainline
2018-02-09 Marek Polacek <polacek@redhat.com>
Jakub Jelinek <jakub@redhat.com>
PR c++/83659
* fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
Formatting fixes. Verify first that tree_fits_shwi_p (op01).
Sync some changes from cxx_fold_indirect_ref.
* constexpr.c (cxx_fold_indirect_ref): Sync some changes from
fold_indirect_ref_1. Verify first that tree_fits_shwi_p (op01).
Formatting fixes.
* g++.dg/torture/pr83659.C: New test.
From-SVN: r258186
Backported from mainline
2018-02-07 Jakub Jelinek <jakub@redhat.com>
PR c++/84082
* parser.c (cp_parser_dot_deref_incomplete): New function.
(cp_parser_postfix_dot_deref_expression): Use it.
* g++.dg/template/incomplete11.C: New test.
* g++.dg/parse/crash67.C: Expect an incomplete type diagnostics too.
From-SVN: r258185
Backported from mainline
2018-02-07 Jakub Jelinek <jakub@redhat.com>
* tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
*DIV_EXPR and *MOD_EXPR.
From-SVN: r258184
Backported from mainline
2018-01-31 Jakub Jelinek <jakub@redhat.com>
PR fortran/84116
* openmp.c (gfc_match_omp_clauses): If all the linear
gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
nor set *head = NULL. Formatting fixes.
* gfortran.dg/gomp/pr84116.f90: New test.
From-SVN: r258182
Backported from mainline
2018-01-31 Jason Merrill <jason@redhat.com>
Jakub Jelinek <jakub@redhat.com>
PR c++/83993
* constexpr.c (cxx_eval_outermost_constant_expr): Build NOP_EXPR
around non-constant ADDR_EXPRs rather than clearing TREE_CONSTANT
on ADDR_EXPR.
* g++.dg/init/pr83993-2.C: New test.
From-SVN: r258181
Backported from mainline
2018-01-31 Jakub Jelinek <jakub@redhat.com>
PR preprocessor/69869
* traditional.c (skip_macro_block_comment): Return bool, true if
the macro block comment is unterminated.
(copy_comment): Use return value from skip_macro_block_comment instead
of always false.
* gcc.dg/cpp/trad/pr69869.c: New test.
From-SVN: r258180
Backported from mainline
2018-01-30 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/83986
* sched-deps.c (sched_analyze_insn): For frame related insns, add anti
dependence against last_pending_memory_flush in addition to
pending_jump_insns.
* gcc.dg/pr83986.c: New test.
From-SVN: r258179
Backported from mainline
2018-01-29 Christoph Spiel <cspiel@freenet.de>
Jakub Jelinek <jakub@redhat.com>
PR libgomp/84096
* omp.h.in (omp_init_nest_lock_with_hint): Use omp_nest_lock_t
instead of omp_lock_t.
From-SVN: r258178
Backported from mainline
2018-01-27 Jakub Jelinek <jakub@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
argument.
(LAZY_HEX_FP_VALUES_CNT): Define.
(lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
values rather than just 12.
(builtin_define_with_hex_fp_value): Likewise.
* include/cpplib.h (enum cpp_builtin_type): Change BT_LAST_USER from
BT_FIRST_USER + 31 to BT_FIRST_USER + 63.
From-SVN: r258176
Backported from mainline
2018-01-23 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/83987
* tree.c (cp_free_lang_data): Change DECL_VALUE_EXPR of
DECL_OMP_PRIVATIZED_MEMBER vars to error_mark_node.
* g++.dg/ubsan/pr83987.C: New test.
From-SVN: r258173
Backported from mainline
2018-01-20 Jakub Jelinek <jakub@redhat.com>
PR middle-end/83945
* tree-emutls.c: Include gimplify.h.
(lower_emutls_2): New function.
(lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
it before further processing.
* gcc.dg/tls/pr83945.c: New test.
From-SVN: r258171
Backported from mainline
2018-01-18 Jakub Jelinek <jakub@redhat.com>
PR c++/83824
* parser.c (attr_chainon): New function.
(cp_parser_label_for_labeled_statement, cp_parser_decl_specifier_seq,
cp_parser_namespace_definition, cp_parser_init_declarator,
cp_parser_type_specifier_seq, cp_parser_parameter_declaration,
cp_parser_gnu_attributes_opt): Use it.
(cp_parser_member_declaration, cp_parser_objc_class_ivars,
cp_parser_objc_struct_declaration): Likewise. Don't reset
prefix_attributes if attributes is error_mark_node.
* g++.dg/cpp0x/pr83824.C: New test.
From-SVN: r258169
Backported from mainline
2018-01-16 Jakub Jelinek <jakub@redhat.com>
PR c++/83817
* pt.c (tsubst_copy_and_build) <case CALL_EXPR>: If function
is AGGR_INIT_EXPR rather than CALL_EXPR, set AGGR_INIT_FROM_THUNK_P
instead of CALL_FROM_THUNK_P.
* g++.dg/cpp1y/pr83817.C: New test.
From-SVN: r258168
Backported from mainline
2018-01-09 Jakub Jelinek <jakub@redhat.com>
PR preprocessor/83722
* gcc.c (try_generate_repro): Pass
&temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
&temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
do_report_bug.
From-SVN: r258167
Backported from mainline
2018-01-05 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/83605
* gimple-ssa-strength-reduction.c: Include tree-eh.h.
(find_candidates_dom_walker::before_dom_children): Ignore stmts that
can throw.
* gcc.dg/pr83605.c: New test.
From-SVN: r258166
When -mfunction-return= is used, simple_return_pop_internal should pop
return address into ECX register, adjust stack by bytes to pop from stack
and jump to the return thunk via ECX register.
Revision 257992 removed the bool argument from ix86_output_indirect_jmp.
Update comments to reflect it.
Tested on i686 and x86-64.
gcc/
Backport from mainline
2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
PR target/84530
* config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
the bool argument.
(ix86_output_indirect_function_return): New prototype.
(ix86_split_simple_return_pop_internal): Likewise.
* config/i386/i386.c (indirect_return_via_cx): New.
(indirect_return_via_cx_bnd): Likewise.
(indirect_thunk_name): Handle return va CX_REG.
(output_indirect_thunk_function): Create alias for
__x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
(ix86_output_indirect_jmp): Remove the bool argument.
(ix86_output_indirect_function_return): New function.
(ix86_split_simple_return_pop_internal): Likewise.
* config/i386/i386.md (*indirect_jump): Don't pass false
to ix86_output_indirect_jmp.
(*tablejump_1): Likewise.
(simple_return_pop_internal): Change it to define_insn_and_split.
Call ix86_split_simple_return_pop_internal to split it for
-mfunction-return=.
(simple_return_indirect_internal): Call
ix86_output_indirect_function_return instead of
ix86_output_indirect_jmp.
gcc/testsuite/
Backport from mainline
2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
PR target/84530
* gcc.target/i386/ret-thunk-22.c: New test.
* gcc.target/i386/ret-thunk-23.c: Likewise.
* gcc.target/i386/ret-thunk-24.c: Likewise.
* gcc.target/i386/ret-thunk-25.c: Likewise.
* gcc.target/i386/ret-thunk-26.c: Likewise.
From-SVN: r258134
2017-03-01 Thomas Preud'homme <thomas.preudhomme@arm.com>
Backport from mainline
2017-12-05 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
with follow-up r255433 commit.
gcc/testsuite/
* gcc.c-torture/unsorted/dump-noaddr.x: Generate dump files in
tmpdir.
From-SVN: r258105
GNU ld error messages have changed to comply with the GNU coding
standards.
* lib/prune.exp (prune_gcc_output): Match lower case "in function"
GNU ld message.
* g++.dg/other/anon5.C: Match lower case "bad value" GNU ld message.
From-SVN: r258055
gcc/ChangeLog
2018-02-26 Carl Love <cel@us.ibm.com>
Backport from mainline: commit 257747 on 2018-02-16.
* config/rs6000/altivec.h: Add builtin names vec_extract4b
vec_insert4b.
* config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
definitions.
* config/rs6000/rs6000-c.c: Add the definitions for
P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
* config/rs6000/rs6000.c (altivec_expand_builtin): Add
P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
* config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
definition for insert4b and define insn *insert3b_internal.
* doc/extend.texi: Add documentation for vec_extract4b.
gcc/testsuite/ChangeLog
2018-02-26 Carl Love <cel@us.ibm.com>
Backport from mainline: commit 257747 on 2018-02-16.
* gcc.target/powerpc/builtins-7-p9-runnable.c: New runnable test file
for the ABI definitions for vec_extract4b and vec_insert4b.
From-SVN: r258007
PR rtl-optimization/83496
* reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
booleans to RTXes. Call fix_reg_dead_note on every non-null element.
(steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
redundant insn, if any.
(relax_delay_slots): Likewise.
(update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
From-SVN: r258000
2018-02-25 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/83633
* decl.c (variable_decl): Check that an explicit-shape-array with
nonconstant bounds is allowed.
2018-02-25 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/83633
* gfortran.dg/explicit_shape_1.f90: New test.
* gfortran.dg/automatic_module_variable.f90: Update regex.
* gfortran.dg/bad_automatic_objects_1.f90: Ditto.
* gfortran.dg/constant_shape.f90: Ditto.
From-SVN: r257972
2018-02-25 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/78238
Backport from trunk
* gfortran.h (gfc_integer_4_kind): Define.
* resolve.c (resolve_select_type): Make sure that the
kind of c->high is gfc_integer_4_kind.
2018-02-25 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/78238
Backport from trunk
* gfortran.dg/select_type_40.f90: New test.
From-SVN: r257969
2018-02-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/30792
* decl.c (gfc_match_data): Check for invalid substring in
data-implied-do
2018-02-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/30792
* gfortran.dg/data_substring.f90: New test.
From-SVN: r257963
2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/84346
* interface.c (compare_actual_formal): Issue error if keyword is
used in a statement function.
2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/84346
* gfortran.dg/statement_function_1.f90: Update test.
From-SVN: r257946
2018-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Backport from trunk
PR fortran/84506
* trans-io.c (set_parameter_value_inquire): Adjust range check of
negative unit values for kind=8 units to the kind=4 negative limit.
* gfortran.dg/inquire_19.f90: New test.
From-SVN: r257945
2018-02-22 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/81116
PR fortran/84495
Backport from trunk
* frontend-passes.c (realloc_string_callback): If expression is a
concatenation, also check for dependency.
(constant_string_length): Check for presence of symtree.
2018-02-22 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/81116
PR fortran/84495
* gfortran.dg/realloc_on_assignment_29.f90: New test.
From-SVN: r257912
This is a backport of r255625 of trunk.
*** gcc/ChangeLog ***
2018-02-22 Sudakshina Das <sudi.das@arm.com>
Bin Cheng <bin.cheng@arm.com>
Backport from mainline:
2017-12-14 Sudakshina Das <sudi.das@arm.com>
Bin Cheng <bin.cheng@arm.com>
PR target/81228
* config/aarch64/aarch64.c (aarch64_select_cc_mode): Move LTGT to
CCFPEmode.
* config/aarch64/aarch64-simd.md (vec_cmp<mode><v_cmp_result>): Add
LTGT.
*** gcc/testsuite/ChangeLog ***
2017-02-22 Sudakshina Das <sudi.das@arm.com>
Backport from mainline:
2017-12-14 Sudakshina Das <sudi.das@arm.com>
PR target/81228
* gcc.dg/pr81228.c: New.
Co-Authored-By: Bin Cheng <bin.cheng@arm.com>
From-SVN: r257901
2018-02-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Backport from trunk
PR fortran/82007
* resolve.c (resolve_transfer): Delete code looking for 'DT'
format specifiers in format strings. Set formatted to true if a
format string or format label is present.
* trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
whitespace.
From-SVN: r257837
gcc/cp:
Backport from mainline
2017-08-29 Jason Merrill <jason@redhat.com>
Fix lambdas in template default argument of inherited ctor.
* method.c (synthesized_method_base_walk): Replace an inherited
template with its specialization.
(synthesized_method_walk): Make inheriting_ctor a pointer.
(maybe_explain_implicit_delete, explain_implicit_non_constexpr)
(deduce_inheriting_ctor, implicitly_declare_fn): Adjust.
gcc/testsuite:
Backport from mainline
2018-01-02 Marek Polacek <polacek@redhat.com>
PR c++/81860
* g++.dg/cpp0x/inh-ctor30.C: New test.
From-SVN: r257806
2018-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Backport from trunk
PR libgfortran/84412
* io/transfer.c (finalize_transfer): After completng an internal unit
I/O operation, clear internal_unit_kind.
* gfortran.dg/inquire_18.f90: New test.
From-SVN: r257793
2018-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/84270
* frontend-passes (scalarized_expr): If the expression
is an assumed size array, leave in the last reference
and pass AR_SECTION instead of AR_FULL to gfc_resolve
in order to avoid an error.
2018-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/84270
* gfortran.dg/inline_matmul_22.f90: New test.
From-SVN: r257784
at stor-layout.c:403 with arm-linux-gnueabi.
*** gcc/ChangeLog ***
2018-02-16 Sudakshina Das <sudi.das@arm.com>
Backport from trunk
2018-01-10 Sudakshina Das <sudi.das@arm.com>
PR target/82096
* expmed.c (emit_store_flag_force): Swap if const op0
and change VOIDmode to mode of op0.
*** gcc/testsuite/ChangeLog ***
2018-02-16 Sudakshina Das <sudi.das@arm.com>
Backport from trunk
2018-01-12 Sudakshina Das <sudi.das@arm.com>
* gcc.c-torture/compile/pr82096.c: Add dg-skip-if
directive.
Backport from trunk
2018-01-10 Sudakshina Das <sudi.das@arm.com>
PR target/82096
* gcc.c-torture/compile/pr82096.c: New test.
From-SVN: r257741
2018-02-16 Richard Biener <rguenther@suse.de>
PR tree-optimization/84190
* tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
volatile accesses if the decl isn't volatile.
* g++.dg/torture/pr84190.C: New testcase.
From-SVN: r257722
[gcc]
2018-02-15 Michael Meissner <meissner@linux.vnet.ibm.com>
Back port from trunk
2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/84154
* config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
Convert from define_expand to be define_insn_and_split. Rework
float/double/_Float128 conversions to QI/HI/SImode to work with
both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
conversions to QI/HImode types did a store and then a load to
truncate the value. For conversions to VSX registers, don't split
the insn, instead emit the code directly. Use the code iterator
any_fix to combine signed and unsigned conversions.
(fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
(fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
(fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
(fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
(fix_<mode>di2_hw): Likewise.
(fixuns_<mode>di2_hw): Likewise.
(fix_<mode>si2_hw): Likewise.
(fixuns_<mode>si2_hw): Likewise.
(fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
(fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
(fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
fix<uns>_trunc<SFDF:mode>si2_p8.
(fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer
used.
(fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
(fix<uns>_<mode>_mem): Likewise.
(fctiw<u>z_<mode>_mem): Likewise.
(fix<uns>_<mode>_mem): Likewise.
(fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
the register allocator from doing a direct move to the GPRs to do
a store, and instead use the ISA 3.0 store byte/half-word from
vector register instruction. For IEEE 128-bit floating point,
also optimize stores of 32-bit ints.
(fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
[gcc/testsuite]
2018-02-15 Michael Meissner <meissner@linux.vnet.ibm.com>
Back port from trunk
2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/84154
* gcc.target/powerpc/pr84154-1.c: New tests.
* gcc.target/powerpc/pr84154-2.c: Likewise.
* gcc.target/powerpc/pr84154-3.c: Likewise.
From-SVN: r257697
2018-02-15 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
Back port from mainline
2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
PR target/83758
* config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
a reg rtx.
From-SVN: r257691
Back port from mainline
2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
PR target/84372
* gcc.target/powerpc/lvsl-lvsr.c: Also match lxv when compiling
with -mcpu=power9.
From-SVN: r257667
gcc/
Back port from mainline
2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
PR target/84279
* config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
gcc/testsuite/
Back port from mainline
2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
PR target/84279
* g++.dg/pr84279.C: New test.
From-SVN: r257661
2018-02-14 Martin Jambor <mjambor@suse.cz>
PR c++/83990
* ipa-prop.c (ipa_modify_call_arguments): Use location of call
statements, also set location of a load to a temporary.
From-SVN: r257656
Using lbasename ensures that the build path does not end up in the
module file.
Regtested on x86_64-pc-linux-gnu. Backport from trunk.
2018-02-13 Alastair McKinstry <alastair.mckinstry@sceal.ie>
Janne Blomqvist <jb@gcc.gnu.org>
* module.c (dump_module): Use lbasename to ensure that module
files are reproducible.
Co-Authored-By: Janne Blomqvist <jb@gcc.gnu.org>
From-SVN: r257614
2018-02-12 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/54223
PR fortran/84276
* interface.c (compare_actual_formal): Add in_statement_function
bool parameter. Skip check of INTENT attribute for statement
functions. Arguments to a statement function cannot be optional,
issue error for missing argument.
(gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
in_statement_function.
2018-02-12 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/54223
PR fortran/84276
* gfortran.dg/statement_function_1.f90: New test.
* gfortran.dg/statement_function_2.f90: New test.
From-SVN: r257593
2018-02-09 Martin Jambor <mjambor@suse.cz>
* hsa-gen.c (get_symbol_for_decl): Set program allocation for
static local variables.
libgomp/
* testsuite/libgomp.hsa.c/staticvar.c: New test.
From-SVN: r257528
gcc/ChangeLog:
2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Backport from mainline
2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
PR target/PR84295
* config/s390/s390.c (s390_set_current_function): Invoke
s390_indirect_branch_settings also if fndecl didn't change.
gcc/testsuite/ChangeLog:
2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Backport from mainline
2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
PR target/PR84295
* gcc.target/s390/pr84295.c: New test.
From-SVN: r257523
gcc/ChangeLog:
2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Backport from mainline
2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/s390-opts.h (enum indirect_branch): Define.
* config/s390/s390-protos.h (s390_return_addr_from_memory)
(s390_indirect_branch_via_thunk)
(s390_indirect_branch_via_inline_thunk): Add function prototypes.
(enum s390_indirect_branch_type): Define.
* config/s390/s390.c (struct s390_frame_layout, struct
machine_function): Remove.
(indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
(indirect_branch_table_label_no, indirect_branch_table_name):
Define variables.
(INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
(enum s390_indirect_branch_option): Define.
(s390_return_addr_from_memory): New function.
(s390_handle_string_attribute): New function.
(s390_attribute_table): Add new attribute handler.
(s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
(s390_indirect_branch_via_thunk): New function.
(s390_indirect_branch_via_inline_thunk): New function.
(s390_function_ok_for_sibcall): When jumping via thunk disallow
sibling call optimization for non z10 compiles.
(s390_emit_call): Force indirect branch target to be a single
register. Add r1 clobber for non-z10 compiles.
(s390_emit_epilogue): Emit return jump via return_use expander.
(s390_reorg): Handle JUMP_INSNs as execute targets.
(s390_option_override_internal): Perform validity checks for the
new command line options.
(s390_indirect_branch_attrvalue): New function.
(s390_indirect_branch_settings): New function.
(s390_set_current_function): Invoke s390_indirect_branch_settings.
(s390_output_indirect_thunk_function): New function.
(s390_code_end): Implement target hook.
(s390_case_values_threshold): Implement target hook.
(TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
macros.
* config/s390/s390.h (struct s390_frame_layout)
(struct machine_function): Move here from s390.c.
(TARGET_INDIRECT_BRANCH_NOBP_RET)
(TARGET_INDIRECT_BRANCH_NOBP_JUMP)
(TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
(TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
(TARGET_INDIRECT_BRANCH_NOBP_CALL)
(TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
(TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
(TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
(TARGET_INDIRECT_BRANCH_TABLE): Define macros.
* config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
(INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
(mnemonic attribute): Add values which aren't recognized
automatically.
("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
pattern for branch conversion. Fix mnemonic attribute.
("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
indirect branch via thunk if requested.
("indirect_jump", "<code>"): Expand patterns for branch conversion.
("*indirect_jump"): Disable for branch conversion using out of
line thunks.
("indirect_jump_via_thunk<mode>_z10")
("indirect_jump_via_thunk<mode>")
("indirect_jump_via_inlinethunk<mode>_z10")
("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
("casesi_jump_via_inlinethunk<mode>_z10")
("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
("*indirect2_jump"): Disable for branch conversion.
("casesi_jump"): Turn into expander and expand patterns for branch
conversion.
("return_use"): New expander.
("*return"): Emit return via thunk and rename it to ...
("*return<mode>"): ... this one.
* config/s390/s390.opt: Add new options and and enum for the
option values.
gcc/testsuite/ChangeLog:
2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Backport from mainline
2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* gcc.target/s390/nobp-function-pointer-attr.c: New test.
* gcc.target/s390/nobp-function-pointer-nothunk.c: New test.
* gcc.target/s390/nobp-function-pointer-z10.c: New test.
* gcc.target/s390/nobp-function-pointer-z900.c: New test.
* gcc.target/s390/nobp-indirect-jump-attr.c: New test.
* gcc.target/s390/nobp-indirect-jump-inline-attr.c: New test.
* gcc.target/s390/nobp-indirect-jump-inline-z10.c: New test.
* gcc.target/s390/nobp-indirect-jump-inline-z900.c: New test.
* gcc.target/s390/nobp-indirect-jump-nothunk.c: New test.
* gcc.target/s390/nobp-indirect-jump-z10.c: New test.
* gcc.target/s390/nobp-indirect-jump-z900.c: New test.
* gcc.target/s390/nobp-return-attr-all.c: New test.
* gcc.target/s390/nobp-return-attr-neg.c: New test.
* gcc.target/s390/nobp-return-mem-attr.c: New test.
* gcc.target/s390/nobp-return-mem-nothunk.c: New test.
* gcc.target/s390/nobp-return-mem-z10.c: New test.
* gcc.target/s390/nobp-return-mem-z900.c: New test.
* gcc.target/s390/nobp-return-reg-attr.c: New test.
* gcc.target/s390/nobp-return-reg-mixed.c: New test.
* gcc.target/s390/nobp-return-reg-nothunk.c: New test.
* gcc.target/s390/nobp-return-reg-z10.c: New test.
* gcc.target/s390/nobp-return-reg-z900.c: New test.
* gcc.target/s390/nobp-table-jump-inline-z10.c: New test.
* gcc.target/s390/nobp-table-jump-inline-z900.c: New test.
* gcc.target/s390/nobp-table-jump-z10.c: New test.
* gcc.target/s390/nobp-table-jump-z900.c: New test.
From-SVN: r257498
2018-02-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/84233
* tree-ssa-phiprop.c (propagate_with_phi): Use separate
changed flag instead of boguously re-using phi_inserted.
* g++.dg/torture/pr84233.C: New testcase.
From-SVN: r257487
2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/82994
* match.c (gfc_match_deallocate): Check for NULL pointer.
2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/82994
* gfortran.dg/deallocate_error_3.f90: New test.
* gfortran.dg/deallocate_error_4.f90: New test.
From-SVN: r257467
2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/82049
* match.c (gfc_match_type_spec): If the charlen is non-NULL, then
try to resolve it. While here return early if possible.
2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/82049
* gfortran.dg/assumed_charlen_parameter.f90: New test.
From-SVN: r257460
Back port from mainline
2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
PR target/56010
PR target/83743
* config/rs6000/driver-rs6000.c: #include "diagnostic.h".
#include "opts.h".
(rs6000_supported_cpu_names): New static variable.
(linux_cpu_translation_table): Likewise.
(elf_platform) <cpu>: Define new static variable and use it.
Translate kernel AT_PLATFORM name to canonical name if needed.
Error if platform name is unknown.
From-SVN: r257392
Backport from mainline
* config/i386/i386.c (ix86_output_function_return): Pass
INVALID_REGNUM, instead of -1, as invalid register number to
indirect_thunk_name and output_indirect_thunk.
From-SVN: r257341
PR rtl-optimization/84071
* combine.c (record_dead_and_set_regs_1): Record the source unmodified
for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
From-SVN: r257226
PR target/68467 is libgcc failing to build for m68k-linux-gnu
configured for ColdFire.
Jeff has an analysis in the PR identifying the problem as resulting
from the callers of libcalls with 1-byte or 2-byte arguments wanting
to push just 1 or 2 bytes on the stack, while the libcall
implementations have the normal C ABI and expect 4-byte arguments.
For normal C functions, I believe the TARGET_PROMOTE_PROTOTYPES
definition would ensure such arguments get passed as 4-byte, but that
does not apply for libcalls.
This patch fixes the issue by defining TARGET_PROMOTE_FUNCTION_MODE
for m68k. The definition is conservative, only applying promotions in
the case of arguments to libcalls; otherwise it returns the unpromoted
type, which I believe matches what the default implementation of the
hook would have done on m68k.
I have tested that this fixes the libgcc build for ColdFire, and, in
conjunction with one glibc patch, this enables glibc to build cleanly
for ColdFire and to pass the compilation parts of the glibc testsuite
except for one test unrelated to this patch (while glibc and the
compilation parts of the testsuite continue to build OK for
non-ColdFire m68k, as expected). I have *not* run any GCC tests for
this patch, or any execution tests for m68k.
Backport from mainline
2018-01-24 Joseph Myers <joseph@codesourcery.com>
PR target/68467
* config/m68k/m68k.c (m68k_promote_function_mode): New function.
(TARGET_PROMOTE_FUNCTION_MODE): New macro.
From-SVN: r257165
PR libstdc++/83658
* include/std/any (any::__do_emplace): Only set _M_manager after
constructing the contained object.
* testsuite/20_util/any/misc/any_cast_neg.cc: Adjust dg-error line.
* testsuite/20_util/any/modifiers/83658.cc: New test.
From-SVN: r257145
vbpermq produces its output in bits 48..63 of the target vector reg,
so the output cannot be lane swapped.
gcc/
PR target/84033
* config/rs6000/rs6000.c (rtx_is_swappable_p): Exclude
UNSPEC_VBPERMQ.
gcc/testsuite/
PR target/84033
* gcc.target/powerpc/swaps-p8-46.c: New.
Backport svn r257070
From-SVN: r257135
Fix a typo in doc/invoke.texi.
Backport from mainline
* doc/invoke.texi: Replace -mfunction-return==@var{choice} with
-mfunction-return=@var{choice}.
From-SVN: r257125
We can use const reference of struct ix86_frame to avoid making a local
copy of ix86_frame. ix86_expand_epilogue makes a local copy of struct
ix86_frame and uses the reg_save_offset field as a local variable. This
patch uses a separate local variable for reg_save_offset.
Tested on x86-64 with ada.
Backport from mainline
PR target/83905
* config/i386/i386.c (ix86_expand_prologue): Use cost reference
of struct ix86_frame.
(ix86_expand_epilogue): Likewise. Add a local variable for
the reg_save_offset field in struct ix86_frame.
From-SVN: r257123
Thist patch merges the safe-indirect-jump-1.c and -8.c testcases,
since they do the same thing. On the 64-bit and AIX ABIs the indirect
call is not a sibcall, since there is code generated after the call
(the restore of r2). On the 32-bit non-AIX ABIs it is a sibcall.
Backport from trunk
2018-01-26 Segher Boessenkool <segher@kernel.crashing.org>
* gcc.target/powerpc/safe-indirect-jump-1.c: Build on all targets.
Make expected output depend on whether we expect sibcalls or not.
* gcc.target/powerpc/safe-indirect-jump-8.c: Delete (merged into
safe-indirect-jump-1.c).
Backport from trunk
2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/83946
* gcc.target/powerpc/safe-indirect-jump-8.c: Skip for AIX.
From-SVN: r257110
Backport from mainline
2018-01-17 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (indirect_thunk_name): Declare regno
as unsigned int. Compare regno with INVALID_REGNUM.
(output_indirect_thunk): Ditto.
(output_indirect_thunk_function): Ditto.
(ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
in the call to output_indirect_thunk_function.
From-SVN: r257067
[gcc]
2018-01-25 Michael Meissner <meissner@linux.vnet.ibm.com>
Back port from trunk
2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/83862
* config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
no longer used.
* config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
* config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
128-bit to produce an UNSPEC move to get the double word with the
signbit and then a shift directly to do signbit.
(signbit<mode>2_dm): Replace old IEEE 128-bit signbit
implementation with a new version that just does either a direct
move or a regular move. Move memory interface to separate insns.
Move insns so they are next to the expander.
(signbit<mode>2_dm_mem_be): New combiner insns to combine load
with signbit move. Split big and little endian case.
(signbit<mode>2_dm_mem_le): Likewise.
(signbit<mode>2_dm_<su>ext): Delete, no longer used.
(signbit<mode>2_dm2): Likewise.
[gcc/testsuite]
2018-01-25 Michael Meissner <meissner@linux.vnet.ibm.com>
Back port from trunk
2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/83862
* gcc.target/powerpc/pr83862.c: New test.
From-SVN: r257060
gcc/
Back port from mainline
2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
PR target/83399
* config/rs6000/rs6000.c (print_operand) <'y'>: Use
VECTOR_MEM_ALTIVEC_OR_VSX_P.
* config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
indexed_or_indirect_operand predicate.
(*vsx_le_perm_load_<mode> for VSX_W): Likewise.
(*vsx_le_perm_load_v8hi): Likewise.
(*vsx_le_perm_load_v16qi): Likewise.
(*vsx_le_perm_store_<mode> for VSX_D): Likewise.
(*vsx_le_perm_store_<mode> for VSX_W): Likewise.
(*vsx_le_perm_store_v8hi): Likewise.
(*vsx_le_perm_store_v16qi): Likewise.
(eight unnamed splitters): Likewise.
gcc/testsuite/
Back port from mainline
2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
PR target/83399
* gcc.target/powerpc/pr83399.c: New test.
From-SVN: r257058
2018-01-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
New function.
(rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
swap associated with both a load and a store.
From-SVN: r257056
Generate code for darwin loadable kernel extensions.
msymbol-stubs
Target Report Var(darwin_symbol_stubs) Init(0)
Force generation of external symbol indirection stubs.
mkernel
Target Report Var(flag_mkernel)
Generate code for the kernel or loadable kernel extensions.
; Some code-gen may be improved / adjusted if the linker is sufficiently modern.
mtarget-linker=
Target RejectNegative Joined Report Alias(mtarget-linker)
iframework
Target RejectNegative C ObjC C++ ObjC++ Joined Separate
-iframework <dir> Add <dir> to the end of the system framework include path.
mtarget-linker
Target RejectNegative Joined Separate Report Var(darwin_target_linker) Init(LD64_VERSION)
The version of ld64 in use for this toolchain.
X
; Driver options.
all_load
Driver RejectNegative Alias(Zall_load)
Loads all members of archive libraries
allowable_client
Driver RejectNegative Separate Alias(Zallowable_client)
-allowable_client <name> The output dylib is private to the client(s) named
arch
Driver RejectNegative Separate
-arch <name> Specify that the output file should be generated for architecture \"name\"
arch_errors_fatal
Driver RejectNegative Alias(Zarch_errors_fatal)
Mismatches between file architecture and the \"-arch\" are errors instead of warnings
asm_macosx_version_min=
Driver RejectNegative Joined
The earliest MacOS X version on which this program will run (formatted for the assembler)
bind_at_load
Driver RejectNegative Alias(Zbind_at_load)
Produce an output file that will bind symbols on load, rather than lazily.
bundle
Driver RejectNegative Alias(Zbundle)
Produce a Mach-O bundle (file type MH_BUNDLE)
bundle_loader
Driver RejectNegative Separate Alias(Zbundle_loader)
-bundle_loader <executable> Treat \"executable\" (that will be loading this bundle) as if it was one of the dynamic libraries the bundle is linked against for symbol resolution
client_name
Driver RejectNegative Separate
-client_name <name> Enable the executable being built to link against a private dylib (using allowable_client)
compatibility_version
Driver RejectNegative Separate
-compatibility_version <number> Set the minimum version for the client interface. Clients must record a greater number than this or the binding will fail at runtime
current_version
Driver RejectNegative Separate
-current_version <number> Set the current version for the library.
dead_strip
Driver RejectNegative Alias(Zdead_strip)
Remove code and data that is unreachable from any exported symbol (including the entry point)
dylib_file
Driver Separate Alias(Zdylib_file)
dylinker
Driver RejectNegative
Produce a Mach-O dylinker (file type MH_DYLINKER), only used for building dyld.
dylinker_install_name
Driver RejectNegative Separate
-dylinker_install_name <path> Only used for building dyld.
dynamic
Driver RejectNegative Alias(Zdynamic)
The default (and opposite of -static), implied by user mode executables, shared libraries and bundles.
dynamiclib
Driver RejectNegative Alias(Zdynamiclib)
Produce a Mach-O shared library (file type MH_DYLIB), synonym for -shared
exported_symbols_list
Driver RejectNegative Separate Alias(Zexported_symbols_list)
-exported_symbols_list <filename> Global symbols in \"filename\" will be exported from the linked output file, any symbols not mentioned will be treated as hidden.
filelist
Driver RejectNegative Separate
Supply a list of objects to be linked from a file, rather than the command line
findirect-virtual-calls
Driver RejectNegative
Used for generating code for some older kernel revisions.
flat_namespace
Driver RejectNegative Alias(Zflat_namespace)
Ignore the normal two-level namespace; resolve symbols in command line order and do not record which library provided the resolved symbol.
Set the output object such that, on loading, dyld will ignore any two-level information and resolve symbols in the discovery order for loaded libs.
framework
Driver RejectNegative Separate
-framework <name> The linker should search for the named framework in the framework search path.
fterminated-vtables
Driver RejectNegative
Used for generating code for some older kernel revisions.
gfull
Driver
Abbreviation for \"-g -fno-eliminate-unused-debug-symbols\"
gused
Driver RejectNegative
Abbreviation for \"-g -feliminate-unused-debug-symbols\"
headerpad_max_install_names
Driver RejectNegative
Automatically adds space for longer path names in load commands (up to MAXPATHLEN)
image_base
Driver RejectNegative Separate Alias(Zimage_base)
-image_base <address> Choose a base address for a dylib or bundle.
init
Driver RejectNegative Separate Alias(Zinit)
-init <symbol_name> The symbol \"symbol_name\" will be used as the first initialiser for a dylib.
install_name
Driver RejectNegative Separate Alias(Zinstall_name)
-install_name <name> Set the install name for a dylib.
keep_private_externs
Driver RejectNegative
Usually \"private extern\" (hidden) symbols are made local when linking, this command suppresses that such that they remain exported.
multi_module
Driver RejectNegative Alias(Zmulti_module)
(Obsolete after 10.4) Multi modules are ignored at runtime since MacOS 10.4
multiply_defined
Driver RejectNegative Separate Alias(Zmultiply_defined)
(Obsolete after 10.4) -multiply_defined <treatment> Provided a mechanism for warning about symbols defined in multiple dylibs.
multiply_defined_unused
Driver RejectNegative Separate Alias(Zmultiplydefinedunused)
(Obsolete after 10.4) -multiply_defined_unused <treatment> Provided a mechanism for warning about symbols defined in the current executable also being defined in linked dylibs.
(Obsolete) The linker never dead strips these items, so the option is not needed.
nofixprebinding
Driver RejectNegative
(Obsolete after 10.3.9) Set MH_NOPREFIXBINDING, in an exectuable.
nomultidefs
Driver RejectNegative
(Obsolete after 10.4) Set MH_NOMULTIDEFS in an umbrella framework.
noprebind
Driver RejectNegative Negative(prebind)
(Obsolete) LD_PREBIND is no longer supported.
noseglinkedit
Driver RejectNegative Negative(seglinkedit)
(Obsolete) This is the default.
object
Driver RejectNegative
pagezero_size
Driver RejectNegative Separate
-pagezero_size size Allows setting the page 0 size to 4kb for certain special cases.
prebind
Driver RejectNegative Negative(noprebind)
(Obsolete) LD_PREBIND is no longer supported.
prebind_all_twolevel_modules
Driver RejectNegative
(Obsolete) LD_PREBIND is no longer supported.
preload
Driver RejectNegative
Produces a Mach-O file suitable for embedded/ROM use.
private_bundle
Driver RejectNegative
(Obsolete) Allowed linking to proceed with \"-flat_namespace\" when a linked bundle contained a symbol also exported from the main executable.
pthread
Driver RejectNegative
rdynamic
Driver RejectNegative
Synonym for \"-export-dynamic\" for linker versions that support it.
read_only_relocs
Driver RejectNegative Separate
-read_only_relocs <treatment> This will allow relocs in read-only pages (not advisable).
sectalign
Driver RejectNegative Separate Args(3)
-sectalign <segname> <sectname> <value> Set section \"sectname\" in segment \"segname\" to have alignment \"value\" which must be an integral power of two expressed in hexadecimal form.
sectcreate
Driver RejectNegative Separate Args(3)
-sectcreate <segname> <sectname> <file> Create section \"sectname\" in segment \"segname\" from the contents of \"file\".
sectobjectsymbols
Driver RejectNegative Separate Args(2)
(Obsolete) -sectobjectsymbols <segname> <sectname> Setting a local symbol at the start of a section is no longer supported.
sectorder
Driver RejectNegative Separate Args(3)
(Obsolete) -sectorder <segname> <sectname> orderfile Replaced by a more general option \"-order_file\".
seg_addr_table
Driver RejectNegative Separate Alias(Zseg_addr_table)
-seg_addr_table <file> Specify the base addresses for dynamic libraries, \"file\" contains a line for each library.
; This is only usable by the ld_classic linker.
seg_addr_table_filename
Driver RejectNegative Separate Alias(Zfn_seg_addr_table_filename)
(Obsolete) Object files with LINKEDIT sections are no longer supported.
segprot
Driver RejectNegative Separate Args(3)
-segprot <segname> max_prot init_prot The protection values are \"r\", \"w\", \"x\" or \"-\" the latter meaning \"no access\".
segs_read_only_addr
Driver RejectNegative Separate Alias(Zsegs_read_only_addr)
-segs_read_only_addr address Allows specifying the address of the read only portion of a dylib.
segs_read_write_addr
Driver RejectNegative Separate Alias(Zsegs_read_write_addr)
-segs_read_write_addr address Allows specifying the address of the read/write portion of a dylib.
single_module
Driver RejectNegative Alias(Zsingle_module)
(Obsolete) This is the default.
sub_library
Driver RejectNegative Separate
-sub_library <name> Library named \"name\" will be re-exported (only useful for dylibs).
sub_umbrella
Driver RejectNegative Separate
-sub_umbrella <name> Framework named \"name\" will be re-exported (only useful for dylibs).
twolevel_namespace
Driver RejectNegative
This is the default
twolevel_namespace_hints
Driver RejectNegative
Specifies content that can speed up dynamic loading when the binaries are unchanged.
umbrella
Driver RejectNegative Separate Alias(Zumbrella)
-umbrella <framework> The specified framework will be re-exported.
undefined
Driver RejectNegative Separate
-undefined <treatment> Specify the handling for undefined symbols (default is error).
unexported_symbols_list
Driver RejectNegative Separate Alias(Zunexported_symbols_list)
-unexported_symbols_list <filename> Don't export global symbols listed in filename.
weak_reference_mismatches
Driver RejectNegative Separate Alias(Zweak_reference_mismatches)
-weak_reference_mismatches <treatment> Specifies what to do if a symbol import conflicts between file (weak in one and not in another) the default is to treat the symbol as non-weak.
whatsloaded
Driver RejectNegative
Logs the object files the linker loads
whyload
Driver RejectNegative
Logs which symbol(s) caused an object to be loaded.
;(Obsolete, ignored) Strip symbols starting with "L", this is the default.
X
Driver RejectNegative
y
Driver RejectNegative Joined
(Obsolete, ignored) Old support similar to whyload.
Mach
Driver RejectNegative
(Obsolete and unhandled by ld64, ignored) ld should produce an executable (only handled by ld_classic).
;; These are not "real" options, but placeholders used to hide the real options
;; from generic options processing... FIXME: they can be eliminated now.
Zall_load
Driver
@ -343,62 +485,3 @@ Driver Separate
Zweak_reference_mismatches
Driver Separate
client_name
Driver Separate
compatibility_version
Driver Separate
current_version
Driver Separate
dylinker_install_name
Driver Separate
pagezero_size
Driver Separate
read_only_relocs
Driver Separate
sectalign
Driver Separate Args(3)
sectcreate
Driver Separate Args(3)
sectobjectsymbols
Driver Separate Args(2)
sectorder
Driver Separate Args(3)
seg1addr
Driver Separate
segcreate
Driver Separate Args(3)
segprot
Driver Separate Args(3)
segs_read_only_addr
Driver Separate
segs_read_write_addr
Driver Separate
sub_library
Driver Separate
sub_umbrella
Driver Separate
; Certain aspects of code-gen may be improved / adjusted if the version of ld64
; is sufficiently modern.
mtarget-linker
Target RejectNegative Joined Separate Report Var(darwin_target_linker) Init(LD64_VERSION)