Using the macros in config/linux.h rather than duplicating them helps
stop future bitrot, and repairs existing bitrot (4 choices for libc in
linux.h, fewer in the rs6000 files not that it matters much). Also
fixes the fact that __gnu_linux__ was always defined rather than just
when glibc was the libc of choice.
* config.gcc (powerpc*-*-linux*): Add linux.h to tm_file.
* config/rs6000/linux.h (TARGET_OS_CPP_BUILTINS): Use
GNU_USER_TARGET_OS_CPP_BUILTINS.
(RS6000_ABI_NAME): Define.
* config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Use
GNU_USER_TARGET_OS_CPP_BUILTINS.
(MUSL_DYNAMIC_LINKER32): Undef before defining.
(UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64): Don't define.
(CHOOSE_DYNAMIC_LINKER): Don't define.
(GNU_USER_DYNAMIC_LINKER32, GNU_USER_DYNAMIC_LINKER64): Don't define.
* config/rs6000/sysv4.h (MUSL_DYNAMIC_LINKER): Undef before defining.
(CHOOSE_DYNAMIC_LINKER, GNU_USER_DYNAMIC_LINKER): Only define when
not already defined.
(CPP_OS_LINUX_SPEC): Remove defines and asserts handled by
TARGET_OS_CPP_BUILTINS.
From-SVN: r266493
2018-11-26 Iain Buclaw <ibuclaw@gdcproject.org>
* update-copyright.py (TestsuiteFilter): Skip .d tests.
(LibPhobosFilter): Add filter for upstream D sources.
(GCCCopyright): Add D Language Foundation as external author.
(GCCCmdLine): Add libphobos.
From-SVN: r266491
Create a framework for putting function bodies in export data. At
present only empty functions will be put there, and they will be
ignored on import. Later patches will get this to the point of
supporting inlining of (some) functions defined in other packages.
Reviewed-on: https://go-review.googlesource.com/c/150061
From-SVN: r266490
PR testsuite/88090
* obj-c++.dg/attributes/method-nonnull-1.mm (my_size_t): New typedef.
(MyArray::removeObjectAtIndex): Use my_size_t instead of size_t and
expect it in diagnostics.
From-SVN: r266486
PR c++/86900
* dwarf2out.c (secname_for_decl): For functions with
DECL_SECTION_NAME if in_cold_section_p, try to return
current_function_section's name if it is a named section.
* g++.dg/debug/dwarf2/pr86900.C: New test.
From-SVN: r266485
PR target/58397
* config.host (*-*-netbsd*): Use x-netbsd and host-netbsd.o.
* config/x-netbsd: New file.
* config/host-netbsd: New file.
From-SVN: r266484
* testsuite/Makefile.am (AUTOMAKE_OPTIONS): Drop dejagnu.
(RUNTEST): Don't define.
(RUNTESTDEFAULTFLAGS): Add.
(check-DEJAGNU, site.exp, distclean-DEJAGNU): New goals.
(distclean-am): Depend on distclean-DEJAGNU.
(check-am): If -j% option is present in MFLAGS and if
`getconf _NPROCESSORS_ONLN` is more than 8, export OMP_NUM_THREADS=8.
(.PHONY): Add check-DEJAGNU and distclean-DEJAGNU.
* testsuite/Makefile.in: Regenerated.
From-SVN: r266482
2018-11-26 Aaron Sawdey <acsawdey@linux.ibm.com>
* config/rs6000/rs6000-string.c (expand_cmp_vec_sequence): Rename
and modify expand_strncmp_vec_sequence.
(emit_final_compare_vec): Rename and modify emit_final_str_compare_vec.
(generate_6432_conversion): New function.
(expand_block_compare): Add support for vsx.
(expand_block_compare_gpr): New function.
* config/rs6000/rs6000.opt (rs6000_block_compare_inline_limit): Increase
default limit to 63 because of more compact vsx code.
From-SVN: r266481
PR target/88178
* config/i386/i386.c (dbx_register_map): Use IGNORED_DWARF_REGNUM
for registers for which no debug information can be generated.
Use INVALID_REGNUM for non-existent registers.
(dbx64_register_map): Ditto.
(svr4_dbx_register_map): Ditto.
testsuite/ChangeLog:
PR target/88178
* gcc.target/pr88178.c: New test.
From-SVN: r266480
The mul64 attribute in types.md causes some confusion as it is used to represent
aarch32 instructions that do widening multiplication to generate 32->64 bit results.
But these types are shared with aarch64, which has native 64-bit multiplication operations.
Those are currently not properly represented, which I will fix in follow-up patches.
For now, this patch renames the mul64 attribute to widen_mul64 to more clearly communicate its meaning.
It mechanically updates all users of that name in config/arm/ (there are no users in config/aarch64).
There is thus no change in behaviour.
* config/arm/types.md (mul64): Rename to...
(widen_mul64): ... This.
* config/arm/arm-generic.md: Rename mul64 to widen_mul64.
* config/arm/cortex-a15.md: Likewise.
* config/arm/cortex-a5.md: Likewise.
* config/arm/cortex-a53.md: Likewise.
* config/arm/cortex-a57.md: Likewise.
* config/arm/cortex-a7.md: Likewise.
* config/arm/cortex-m4.md: Likewise.
* config/arm/exynos-m1.md: Likewise.
* config/arm/marvell-pj4.md: Likewise.
* config/arm/xgene1.md: Likewise.
From-SVN: r266471
When throwing an Exception in the Fiber the backtrace generation
crashes. This happens because backtrace does not func the stack bottom.
Using '.cfi_undefined x30' tells the debug info that the value in the lr
is unknown, which seems to be the nicest way to stop the unwinder.
Setting x30 to 0 is another option, however it still creates one invalid
frame in gdb, so the .cfi variant is used here instead.
Backport from upstream druntime 2.083.
Reviewed-on: https://github.com/dlang/druntime/pull/2308
From-SVN: r266470
2018-11-26 Richard Biener <rguenther@suse.de>
PR tree-optimization/88182
* tree-vect-loop.c (vectorizable_reduction): Pick up single
correct reduc_def_info.
* tree-vect-slp.c (vect_analyze_slp_instance): Set
STMT_VINFO_REDUC_DEF of the first stmt.
libgomp/
* testsuite/libgomp.c++/pr88182.C: New testcase.
From-SVN: r266467
2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
PR web/79738
gcc/
* doc/extend.texi (Common Function Attributes): Clarify that
functions with "const" attribute can read const global variables.
From-SVN: r266445
2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
PR other/54265
gcc/
* doc/extend.texi (Common Variable Attributes): Use preferred
placement of type attributes in examples, plus whitespace fixes.
(Type Attributes): Clarify why placement of attributes
immediately after struct/union/enum keyword is preferred.
(Common Type Attributes): Use preferred placement of type
attributes in examples, plus more whitespace fixes.
From-SVN: r266440
gcc/testsuite:
* lib/target-supports.exp (check_compile): Handle D.
(check_effective_target_d_runtime): New proc.
* lib/gdc-dg.exp (gdc-dg-test): Demote link and run tests to
compile unless d_runtime.
* gdc.dg/runnable.d: Skip unless d_runtime.
* gdc.dg/lto/lto.exp: Require d_runtime to run tests.
gcc:
* doc/sourcebuild.texi (Effective-Target Keywords, Environment
attributes): Document d_runtime.
From-SVN: r266438
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: r266428
PR fortran/888143
* resolve.c (resolve_variable): Check for associate names with
NULL target.
2018-11-24 Paul Thomas <pault@gcc.gnu.org>
PR fortran/888143
* gfortran.dg/associate_46.f90: New test.
From-SVN: r266427
PR rtl-optimization/87468
* tree-ssa-threadupdate.c (create_block_for_threading): Clear
EDGE_IGNORE on all outgoing edges of the duplicate block.
From-SVN: r266426
2018-11-23 Vladimir Makarov <vmakarov@redhat.com>
PR bootstrap/88157
* ira-costs.c (record_operand_costs): Use bigger hard reg class if
its mode does not fit to the original class.
From-SVN: r266422
With multiple threads, using an unprotected static variable to check
whether recursion has occured isn't valid, as one thread might have
modified the variable, thus causing another thread to incorrectly
conclude that recursion has occured. This patch avoids this problem
by using a thread-specific variable for the recursion check.
Regtested on x86_64-pc-linux-gnu.
libgfortran/ChangeLog:
2018-11-23 Janne Blomqvist <jb@gcc.gnu.org>
* runtime/error.c (MAGIC): Remove.
(recursion_key): New variable.
(recursion_check): Use thread-specific variable for recursion
check if threads are active.
(constructor_recursion_check): New function.
(destructor_recursion_check): New funcion.
From-SVN: r266419
2018-11-23 Christoph Muellner <christoph.muellner@theobroma-systems.com>
Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* config/aarch64/aarch64.c (xgene1_addrcost_table): Correct the post modify
costs.
Co-Authored-By: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
From-SVN: r266412
2018-11-23 Christoph Muellner <christoph.muellner@theobroma-system.com>
* config/arm/aarch-cost-tables.h (xgene1_extra_costs): Update the cost table
for Xgene1.
From-SVN: r266411