]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
5 years ago[libgomp, nvptx] Note that cuGetErrorString is in CUDA_VERSION >= 6000
vries [Wed, 8 Aug 2018 14:26:10 +0000 (14:26 +0000)] 
[libgomp, nvptx] Note that cuGetErrorString is in CUDA_VERSION >= 6000

Cuda driver api function cuGetErrorString is available in version 6.0 and
higher.

This patch:
- removes a comment saying the declaration is not available in cuda.h 6.0
- fixes the presence test to use CUDA_VERSION < 6000
- moves the declaration to toplevel

Build on x86_64 with nvptx accelerator and reg-tested libgomp.

2018-08-08  Tom de Vries  <tdevries@suse.de>

* plugin/plugin-nvptx.c (cuda_error): Move declaration of cuGetErrorString ...
(cuGetErrorString): ... here.  Guard with CUDA_VERSION < 6000.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263405 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[AArch64] Add HXT Phecda core support
jgreenhalgh [Wed, 8 Aug 2018 14:23:59 +0000 (14:23 +0000)] 
[AArch64] Add HXT Phecda core support

HXT semiconductor's CPU core Phecda, as a variant of Qualcomm qdf24xx,
reuses the same tuning structure and pipeline with it.

Applied on behalf of: Hongbo Zhang <hongbo.zhang@linaro.org>

* config/aarch64/aarch64-cores.def: Add phecda core.
* config/aarch64/aarch64-tune.md: Regenerate.
* doc/invoke.texi: Add phecda core.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263404 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoFix Docbook markup for table entry
redi [Wed, 8 Aug 2018 13:37:24 +0000 (13:37 +0000)] 
Fix Docbook markup for table entry

* doc/xml/manual/using.xml: Fix markup for empty table entry.
* doc/html/*: Regenerate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263401 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoAdd missing <experimental/numeric> header to docs
redi [Wed, 8 Aug 2018 13:29:25 +0000 (13:29 +0000)] 
Add missing <experimental/numeric> header to docs

* doc/xml/manual/using.xml: Add missing header to table and fix typo.
* doc/html/*: Regenerate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263398 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoPR libstdc++/86597 directory_entry observers should clear error_code
redi [Wed, 8 Aug 2018 13:09:19 +0000 (13:09 +0000)] 
PR libstdc++/86597 directory_entry observers should clear error_code

PR libstdc++/86597
* include/bits/fs_dir.h (directory_entry::_M_file_type(error_code&)):
Clear error_code when cached type is used.
* testsuite/27_io/filesystem/directory_entry/86597.cc: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263397 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoS/390: Fix PR85295
krebbel [Wed, 8 Aug 2018 12:38:51 +0000 (12:38 +0000)] 
S/390: Fix PR85295

gcc/ChangeLog:

2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>

PR target/85295
* config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
definitions.
* config/s390/s390.md ("movti"): Add more alternatives for
constant to GPR copies.

gcc/testsuite/ChangeLog:

2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>

PR target/85295
* gcc.target/s390/TI-constants-lra.c: New testcase.
* gcc.target/s390/TI-constants-nolra.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263396 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoS/390: Fix whitespace problems in the backend
krebbel [Wed, 8 Aug 2018 11:35:45 +0000 (11:35 +0000)] 
S/390: Fix whitespace problems in the backend

2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>

* config/s390/s390.c: Fix whitespace damage throughout the file.
* config/s390/s390.h: Likewise.
* config/s390/tpf.h: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263395 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoS/390: Remove TARGET_CPU_ZARCH
krebbel [Wed, 8 Aug 2018 11:25:31 +0000 (11:25 +0000)] 
S/390: Remove TARGET_CPU_ZARCH

TARGET_CPU_ZARCH allowed to distinguish between g5/g6 and newer
machines.  Since the former are now gone, we can assume that
TARGET_CPU_ZARCH is always true.  As a side-effect, branch splitting
is now completely gone.  Some parts of literal pool splitting are also
gone, but it's still there: we need to support it because floating
point and vector instructions still cannot use relative addressing.

gcc/ChangeLog:

2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>

* config/s390/s390.c (s390_loadrelative_operand_p):
        Remove TARGET_CPU_ZARCH usages.
(s390_rtx_costs): Likewise.
(s390_legitimate_constant_p): Likewise.
(s390_cannot_force_const_mem): Likewise.
(legitimate_reload_constant_p): Likewise.
(s390_preferred_reload_class): Likewise.
(legitimize_pic_address): Likewise.
(legitimize_tls_address): Likewise.
(s390_split_branches): Removed.
(s390_add_execute): Removed.
(s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
(s390_mainpool_start): Likewise.
(s390_mainpool_finish): Likewise.
(s390_mainpool_cancel): Removed.
(s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
(s390_chunkify_cancel): Likewise.
(s390_return_addr_rtx): Likewise.
(s390_register_info): Remove split_branches_pending_p uages.
(s390_optimize_register_info): Likewise.
(s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
        split_branches_pending_p usages.
(s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
(s390_load_got): Likewise.
(s390_expand_split_stack_prologue): Likewise.
(output_asm_nops): Likewise.
(s390_function_profiler): Likewise.
(s390_emit_call): Likewise.
(s390_conditional_register_usage): Likewise.
(s390_optimize_prologue): Likewise.
(s390_reorg): Remove TARGET_CPU_ZARCH and
        split_branches_pending_p usages.
(s390_option_override_internal): Remove TARGET_CPU_ZARCH
        usages.
(s390_output_indirect_thunk_function): Likewise.
* config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
(TARGET_CPU_ZARCH_P): Removed.
(struct machine_function): Remove split_branches_pending_p.
* config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263394 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoS/390: Remove support for g5 and g6 machines
krebbel [Wed, 8 Aug 2018 10:55:56 +0000 (10:55 +0000)] 
S/390: Remove support for g5 and g6 machines

g5 and g6 were deprecated since gcc 6.1.0 (commit 3bd8520f).

gcc/ChangeLog:

2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>

* common/config/s390/s390-common.c (processor_flags_table):
        Remove flags.
* config.gcc: Remove with_arch/with_tune support.
* config/s390/2064.md: Remove cpu attribute comparisons.
* config/s390/driver-native.c (s390_host_detect_local_cpu):
        Remove MTN.
* config/s390/linux.h (ASM_SPEC):
        Remove -march support.
* config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
        Use a table to get an arch level.
* config/s390/s390-opts.h (enum processor_type):
        Remove enum values.
* config/s390/s390.c
        (processor_table): Remove entries, add arch_level values.
        (s390_issue_rate): Remove cases.
        (s390_option_override): Adjust
        s390_option_override_internal() call.
(s390_option_override_internal): Remove deprecation warning.
        (s390_valid_target_attribute_tree): Adjust
        s390_option_override_internal() call.
* config/s390/s390.h (struct s390_processor):
        Share with s390-c.c, add arch_level field.
* config/s390/s390.md:
        Remove occurrences in cpu attribute.
* config/s390/s390.opt: Remove -march/-mtune support.
* config/s390/tpf.h (ASM_SPEC): Remove -march support.
* doc/invoke.texi: Remove deprecation warning.

gcc/testsuite/ChangeLog:

2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>

* gcc.target/s390/hotpatch-8.c: Remove.
* gcc.target/s390/hotpatch-9.c: Remove.
* gcc.target/s390/mnop-mcount-m31-fpic.c: Remove.
* gcc.target/s390/mnop-mcount-m31.c: Remove.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263393 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago P0595R1 - is_constant_evaluated
jakub [Wed, 8 Aug 2018 09:00:51 +0000 (09:00 +0000)] 
P0595R1 - is_constant_evaluated
cp/
* cp-tree.h (enum cp_built_in_function): New.
(maybe_constant_init): Add pretend_const_required argument.
* typeck2.c (store_init_value): Pass true as new argument to
maybe_constant_init.
* constexpr.c (constexpr_fn_retval): Check also DECL_BUILT_IN_CLASS
for BUILT_IN_UNREACHABLE.
(struct constexpr_ctx): Add pretend_const_required field.
(cxx_eval_builtin_function_call): Use DECL_IS_BUILTIN_CONSTANT_P
macro.  Handle CP_BUILT_IN_IS_CONSTANT_EVALUATED.  Check also
DECL_BUILT_IN_CLASS for BUILT_IN_UNREACHABLE.
(cxx_eval_outermost_constant_expr): Add pretend_const_required
argument, initialize pretend_const_required field in ctx.  If the
result is TREE_CONSTANT and non_constant_p, retry with
pretend_const_required false if it was true.
(is_sub_constant_expr): Initialize pretend_const_required_field in
ctx.
(cxx_constant_value): Pass true as pretend_const_required to
cxx_eval_outermost_constant_expr.
(maybe_constant_value): Pass false as pretend_const_required to
cxx_eval_outermost_constant_expr.
(fold_non_dependent_expr): Likewise.
(maybe_constant_init_1): Add pretend_const_required argument, pass it
down to cxx_eval_outermost_constant_expr.  Pass !allow_non_constant
instead of false as strict to cxx_eval_outermost_constant_expr.
(maybe_constant_init): Add pretend_const_required argument, pass it
down to maybe_constant_init_1.
(cxx_constant_init): Pass true as pretend_const_required to
maybe_constant_init_1.
* cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPRs to
CP_BUILT_IN_IS_CONSTANT_EVALUATED.
(cp_fold): Don't fold CP_BUILT_IN_IS_CONSTANT_EVALUATED calls.
* decl.c: Include langhooks.h.
(cxx_init_decl_processing): Register __builtin_is_constant_evaluated
built-in.
* tree.c (builtin_valid_in_constant_expr_p): Return true for
CP_BUILT_IN_IS_CONSTANT_EVALUATED.
* pt.c (declare_integer_pack): Initialize DECL_FUNCTION_CODE.
testsuite/
* g++.dg/cpp2a/is-constant-evaluated1.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263392 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR c++/86836
jakub [Wed, 8 Aug 2018 08:32:51 +0000 (08:32 +0000)] 
PR c++/86836
* pt.c (tsubst_expr): For structured bindings, call tsubst_decomp_names
before tsubst_init, not after it.

* g++.dg/cpp1z/decomp46.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263391 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR c++/86738
jakub [Wed, 8 Aug 2018 08:31:40 +0000 (08:31 +0000)] 
PR c++/86738
* constexpr.c (cxx_eval_binary_expression): For arithmetics involving
NULL pointer set *non_constant_p to true.
(cxx_eval_component_reference): For dereferencing of a NULL pointer,
set *non_constant_p to true and return t.

* g++.dg/opt/pr86738.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263390 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[AArch64, Falkor] Switch to using Falkor-specific vector costs.
siddhesh [Wed, 8 Aug 2018 07:54:14 +0000 (07:54 +0000)] 
[AArch64, Falkor] Switch to using Falkor-specific vector costs.

The adjusted vector costs give Falkor a reasonable boost in performance for FP
benchmarks (both CPU2017 and CPU2006) and doesn't change INT benchmarks that
much. There are some regressions that will be investigated as follow on work.

Numbers from the CI run:

CPU2017:

(R) 605.mcf_s: -1.8%
(R) 620.omnetpp_s: -2%
    623.xalancbmk_s: 2%
    654.roms_s: 7%

(R) INT mean: -0.09%
    FP mean: 0.70%

CPU2006:

(R) 429.mc: -5%
(R) 471.omnetpp: -9.5% (potentially noise/fluctuations)
    483.xalancbmk: 6.02%
    410.bwaves: 5.03%
    433.milc: 2%
    434.zeusmp: 10.5%
(R) 436.cactusADM: -12.75%
    437.leslie3d: 5.94%
(R) 453.povray: -0.82%
    459.GemsFDTD: 16.87%
    465.tonto: 1%

(R) INT mean: -0.79%
    FP mean: 1.54%

gcc/ChangeLog:

2018-08-08  Luis Machado  <luis.machado@linaro.org>

* config/aarch64/aarch64.c (qdf24xx_vector_cost): New static global.
(qdf24xx_tunings): Set vector cost structure to qdf24xx_vector_cost.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263389 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[aarch64] Adjust Falkor's sign extend reg+reg address cost
siddhesh [Wed, 8 Aug 2018 07:45:11 +0000 (07:45 +0000)] 
[aarch64] Adjust Falkor's sign extend reg+reg address cost

Adjust Falkor's register_sextend cost from 4 to 3.  This fixes a testsuite
failure in gcc.target/aarch64/extend.c:ldr_sxtw where GCC was generating
a sbfiz instruction rather than a load with sign extension.

No performance changes.

gcc/ChangeLog:

2018-08-08  Luis Machado  <luis.machado@linaro.org>

* config/aarch64/aarch64.c (qdf24xx_addrcost_table)
<register_sextend>: Set to 3.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263388 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDaily bump.
gccadmin [Wed, 8 Aug 2018 00:16:28 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263387 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[OpenACC] cleanup trans-stmt.h
cesar [Tue, 7 Aug 2018 22:18:36 +0000 (22:18 +0000)] 
[OpenACC] cleanup trans-stmt.h

gcc/fortran/
* trans-stmt.h: Remove stale reference to trans-openacc.c.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263372 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[PATCH] Line map table allocation
nathan [Tue, 7 Aug 2018 21:28:51 +0000 (21:28 +0000)] 
[PATCH] Line map table allocation

https://gcc.gnu.org/ml/gcc-patches/2018-08/msg00434.html
* line-map.c: (linemap_init): Set default allocator here.
(new_linemap): Rather than here.  Refactor allocation logic.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263366 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoPR libstdc++/86874 fix std::variant::swap regression
redi [Tue, 7 Aug 2018 19:13:26 +0000 (19:13 +0000)] 
PR libstdc++/86874 fix std::variant::swap regression

PR libstdc++/86874
* include/std/variant (_Copy_ctor_base::_M_destructive_move): Define
here instead of in _Move_assign_base.
(_Copy_ctor_base<true, _Types...>::_M_destructive_move): Define.
(_Copy_assign_base::operator=): Use _M_destructive_move when changing
the contained value to another alternative.
(_Move_assign_base::operator=): Likewise.
(_Move_assign_base::_M_destructive_move): Remove.
* testsuite/20_util/variant/86874.cc: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263365 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago runtime: use poll rather than pollset for netpoll on AIX
ian [Tue, 7 Aug 2018 17:29:50 +0000 (17:29 +0000)] 
runtime: use poll rather than pollset for netpoll on AIX

    Updates golang/go#26634

    Reviewed-on: https://go-review.googlesource.com/126857

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263364 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago libgo: uncomment trace.Stop() call in testing package
ian [Tue, 7 Aug 2018 17:28:22 +0000 (17:28 +0000)] 
libgo: uncomment trace.Stop() call in testing package

    Fix up the testing package to insure that execution traces
    work properly (e.g. "-test.trace=<XXX>" command line option). The
    call to stop tracing and emit the output file was stubbed out.

    Reviewed-on: https://go-review.googlesource.com/128275

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263363 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[AArch64] Fix -mlow-precision-div (PR 86838)
rsandifo [Tue, 7 Aug 2018 17:22:19 +0000 (17:22 +0000)] 
[AArch64] Fix -mlow-precision-div (PR 86838)

The "@" handling broke -mlow-precision-div, because the scalar forms of
the instruction were provided by a pattern that also provided FRECPX
(and so were parameterised on an unspec code as well as a mode),
while the SIMD versions had a dedicated FRECPE pattern.  This patch
moves the scalar FRECPE handling to the SIMD pattern too (as for FRECPS)
and uses a separate pattern for FRECPX.

The convention in aarch64-simd-builtins.def seemed to be to add
comments only if the mapping wasn't obvious (i.e. not just sticking
"aarch64_" on the beginning and "<mode>" on the end), so the patch
deletes the reference to the combined pattern instead of rewording it.

There didn't seem to be any coverage of -mlow-precision-div in the
testsuite, so the patch adds some tests for it.

2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
PR target/86838
* config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
* config/aarch64/aarch64-simd.md
(aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
(@aarch64_frecpe<mode>): ...here and the move FRECPX to...
(aarch64_frecpx<mode>): ...this new pattern.
* config/aarch64/aarch64-simd-builtins.def: Remove comment
about aarch64_frecp<FRECP:frecp_suffix><mode>.

gcc/testsuite/
PR target/86838
* gcc.target/aarch64/frecpe_1.c: New test.
* gcc.target/aarch64/frecpe_2.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263362 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago/cp
paolo [Tue, 7 Aug 2018 16:40:18 +0000 (16:40 +0000)] 
/cp
2018-08-07  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/59480, DR 136
* decl.c (check_no_redeclaration_friend_default_args): New.
(duplicate_decls): Use the latter; also check that a friend
declaration specifying default arguments is a definition.

/testsuite
2018-08-07  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/59480, DR 136
* g++.dg/other/friend8.C: New.
* g++.dg/other/friend9.C: Likewise.
* g++.dg/other/friend10.C: Likewise.
* g++.dg/other/friend11.C: Likewise.
* g++.dg/other/friend12.C: Likewise.
* g++.dg/other/friend13.C: Likewise.
* g++.dg/other/friend14.C: Likewise.
* g++.dg/other/friend15.C: Likewise.
* g++.dg/parse/defarg4.C: Compile with -fpermissive -w.
* g++.dg/parse/defarg8.C: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263361 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoPR libstdc++/86861 Meet precondition for Solaris memalign
redi [Tue, 7 Aug 2018 16:10:29 +0000 (16:10 +0000)] 
PR libstdc++/86861 Meet precondition for Solaris memalign

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.
This adds a branch to check for undefined behaviour which we could just
ignore, so the check could just be removed. It should certainly be
removed if PR 86878 is implemented to issue a warning about calls with
invalid alignments.

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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263360 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoFix PR number for HPPA speculation patch: PR target/86807 -> PR target/86785
rearnsha [Tue, 7 Aug 2018 14:33:09 +0000 (14:33 +0000)] 
Fix PR number for HPPA speculation patch: PR target/86807 ->  PR target/86785

This just fixes the PR number in the ChangeLog.  Nothing we can do
about the SVN history.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263358 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoPR c++/79133
ville [Tue, 7 Aug 2018 13:46:16 +0000 (13:46 +0000)] 
PR c++/79133

gcc/cp/

PR c++/79133
* name-lookup.c (check_local_shadow): Reject captures and parameters
with the same name.

testsuite/

PR c++/79133
* g++.dg/cpp0x/lambda/lambda-shadow3.C: New.
* g++.dg/cpp1y/lambda-generic-variadic18.C: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263357 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoAdd malloc predictor (PR middle-end/83023).
marxin [Tue, 7 Aug 2018 11:59:13 +0000 (11:59 +0000)] 
Add malloc predictor (PR middle-end/83023).

2018-08-07  Martin Liska  <mliska@suse.cz>

        PR middle-end/83023
* predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
        BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
* predict.def (PRED_MALLOC_NONNULL): New predictor.
* doc/extend.texi: Document that malloc attribute adds
        hit to compiler.
2018-08-07  Martin Liska  <mliska@suse.cz>

        PR middle-end/83023
* gcc.dg/predict-16.c: New test.
* g++.dg/predict-1.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263355 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDefine monotonic_buffer_resource members out-of-line
redi [Tue, 7 Aug 2018 11:31:16 +0000 (11:31 +0000)] 
Define monotonic_buffer_resource members out-of-line

Move the allocation logic into libstdc++.so so that it can be changed
without worrying about inlined code in existing binaries.

Leave do_allocate inline so that calls to it can be devirtualized, and
only the slow path needs to call into the library.

* config/abi/pre/gnu.ver: Export monotonic_buffer_resource members.
* include/std/memory_resource (monotonic_buffer_resource::release):
Call _M_release_buffers to free buffers.
(monotonic_buffer_resource::do_allocate): Call _M_new_buffer to
allocate a new buffer from upstream.
(monotonic_buffer_resource::_M_new_buffer): Declare.
(monotonic_buffer_resource::_M_release_buffers): Declare.
(monotonic_buffer_resource::_Chunk): Replace definition with
declaration as opaque type.
* src/c++17/memory_resource.cc (monotonic_buffer_resource::_Chunk):
Define.
(monotonic_buffer_resource::_M_new_buffer): Define.
(monotonic_buffer_resource::_M_release_buffers): Define.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263354 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoFix gcc.dg/vect/no-section-anchors-vect-69.c on SPARC etc. (PR tree-optimization...
ro [Tue, 7 Aug 2018 08:51:29 +0000 (08:51 +0000)] 
Fix gcc.dg/vect/no-section-anchors-vect-69.c on SPARC etc. (PR tree-optimization/80925)

2018-08-07  Steve Ellcey  <sellcey@cavium.com>
    Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

PR tree-optimization/80925
* gcc.dg/vect/no-section-anchors-vect-69.c: Expect 3 loops
vectorized on !vect_hw_misalign targets.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263352 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoAdd missing gcc-interface/ to 2018-07-31 ChangeLog entry
aoliva [Tue, 7 Aug 2018 05:54:11 +0000 (05:54 +0000)] 
Add missing gcc-interface/ to 2018-07-31 ChangeLog entry

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263351 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDaily bump.
gccadmin [Tue, 7 Aug 2018 00:16:33 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263350 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[libgomp, nvptx] Handle CUDA_ONE_CALL_MAYBE_NULL
vries [Mon, 6 Aug 2018 22:13:56 +0000 (22:13 +0000)] 
[libgomp, nvptx] Handle CUDA_ONE_CALL_MAYBE_NULL

This patch adds handling of functions that may not be present in the cuda
driver.

Such a function can be declared using CUDA_ONE_CALL_MAYBE_NULL in cuda-lib.def,
it can be called with the usual convenience macros, but before calling its
presence needs to be tested using new macro CUDA_CALL_EXISTS.

When using the dlopen interface (PLUGIN_NVPTX_DYNAMIC == 1), we allow
non-present functions by allowing dlsym to return NULL.  Otherwise
(PLUGIN_NVPTX_DYNAMIC == 0) we declare the non-present function to be weak.

Build and reg-tested libgomp on x86_64 with nvidia accelerator, with and without
--disable-cuda-driver, in combination with a trigger patch that adds a
non-existing function foo to cuda-lib.def:
...
CUDA_ONE_CALL_MAYBE_NULL (foo)
...
and declares it in plugin-nvptx.c:
...
CUresult foo (void);
...
and then uses it in nvptx_init after the init_cuda_lib call:
...
  if (CUDA_CALL_EXISTS (foo))
    CUDA_CALL (foo);
...

Also build and reg-tested on x86_64 with nvidia accelerator, with and without
--disable-cuda-driver, in combination with a trigger patch that replaces all
CUDA_ONE_CALLs in cuda-lib.def with CUDA_ONE_CALL_MAYBE_NULL, and guards two
CUDA_CALLs with CUDA_CALL_EXISTS, one for a regular fn, and one for a fn that is
a define in cuda/cuda.h.

2018-08-07  Tom de Vries  <tdevries@suse.de>

* plugin/plugin-nvptx.c (DO_PRAGMA): Define.
(struct cuda_lib_s): Add def/undef of CUDA_ONE_CALL_MAYBE_NULL.
(init_cuda_lib): Add new param to CUDA_ONE_CALL_1.  Add arg to
corresponding call in CUDA_ONE_CALL.  Add def/undef of
CUDA_ONE_CALL_MAYBE_NULL.
(CUDA_CALL_EXISTS): Define.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263346 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[libgomp, nvptx] Minimize lifetime of CUDA_ONE_CALL defines
vries [Mon, 6 Aug 2018 22:13:46 +0000 (22:13 +0000)] 
[libgomp, nvptx] Minimize lifetime of CUDA_ONE_CALL defines

This patch makes sure that the lifetimes of the CUDA_ONE_CALL macro (which is
defined twice in plugin-nvptx.c) are minimized, to make it obvious that the
definitions are used only in the lib-cuda.def include.

Build on x86_64 with nvptx accelerator and reg-tested libgomp.

2018-08-07  Tom de Vries  <tdevries@suse.de>

* plugin/plugin-nvptx.c (struct cuda_lib_s, init_cuda_lib): Put
CUDA_ONE_CALL defines right before the cuda-lib.def include, and the
corresponding undefs right after.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263345 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR target/86807
danglin [Mon, 6 Aug 2018 21:47:54 +0000 (21:47 +0000)] 
PR target/86807
* config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263344 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
law [Mon, 6 Aug 2018 20:13:20 +0000 (20:13 +0000)] 
* tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
the vr_values instance to cprop_into_stmt.
(cprop_into_stmt): Pass vr_values instance down to cprop_operand.
(cprop_operand): Also query EVRP to determine if OP is a constant.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263342 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[PATCH] Diagnostic included-from loop
nathan [Mon, 6 Aug 2018 16:52:38 +0000 (16:52 +0000)] 
[PATCH] Diagnostic included-from loop

https://gcc.gnu.org/ml/gcc-patches/2018-08/msg00416.html
* diagnostic.c (diagnostic_report_current_module): Reroll
included-at loop.  Translate text.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263341 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR c++/86767
mpolacek [Mon, 6 Aug 2018 16:46:13 +0000 (16:46 +0000)] 
PR c++/86767
* constexpr.c (cxx_eval_statement_list): Handle continue.

* g++.dg/cpp1y/constexpr-86767.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263340 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoFix memory leak in selftest::test_expansion_to_rtl
dmalcolm [Mon, 6 Aug 2018 16:25:27 +0000 (16:25 +0000)] 
Fix memory leak in selftest::test_expansion_to_rtl

"make selftest-valgrind" shows:

187 bytes in 1 blocks are definitely lost in loss record 567 of 669
    at 0x4A081D4: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
    by 0x1F08260: xcalloc (xmalloc.c:162)
    by 0xB24F32: init_emit() (emit-rtl.c:5843)
    by 0xC10080: prepare_function_start() (function.c:4803)
    by 0xC10254: init_function_start(tree_node*) (function.c:4877)
    by 0x1CDF92A: selftest::test_expansion_to_rtl() (function-tests.c:595)
    by 0x1CE007C: selftest::function_tests_c_tests() (function-tests.c:676)
    by 0x1E010E7: selftest::run_tests() (selftest-run-tests.c:98)
    by 0x1062D1E: toplev::run_self_tests() (toplev.c:2225)
    by 0x1062F40: toplev::main(int, char**) (toplev.c:2303)
    by 0x1E5B90A: main (main.c:39)

The allocation in question is:

  crtl->emit.regno_pointer_align
    = XCNEWVEC (unsigned char, crtl->emit.regno_pointer_align_length);

This patch fixes this leak (and makes the output of
"make selftest-valgrind" clean) by calling free_after_compilation at the
end of the selftest in question.

gcc/ChangeLog:
* function-tests.c (selftest::test_expansion_to_rtl): Call
free_after_compilation.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263339 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * g++.dg/torture/pr86763.C (dg-additional-options): Add -lrt
uros [Mon, 6 Aug 2018 15:49:05 +0000 (15:49 +0000)] 
* g++.dg/torture/pr86763.C (dg-additional-options): Add -lrt
for target *-*-linux-gnu.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263338 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoEnable clobber high for tls descs on Aarch64
alahay01 [Mon, 6 Aug 2018 15:33:00 +0000 (15:33 +0000)] 
Enable clobber high for tls descs on Aarch64

gcc/
* config/aarch64/aarch64.md: Add clobber highs to tls_desc.

gcc/testsuite/
* gcc.target/aarch64/sve/tls_preserve_1.c: New test.
* gcc.target/aarch64/sve/tls_preserve_2.c: New test.
* gcc.target/aarch64/sve/tls_preserve_3.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263337 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoS/390: Don't unroll memory blk op loops
krebbel [Mon, 6 Aug 2018 15:01:00 +0000 (15:01 +0000)] 
S/390: Don't unroll memory blk op loops

gcc/ChangeLog:

2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>

* config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
loops with memory block operations from getting unrolled.

gcc/testsuite/ChangeLog:

2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>

* gcc.target/s390/nomemloopunroll-1.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263336 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[spu, commit] Define TARGET_HAVE_SPECULATION_SAFE_VALUE
uweigand [Mon, 6 Aug 2018 14:40:56 +0000 (14:40 +0000)] 
[spu, commit] Define TARGET_HAVE_SPECULATION_SAFE_VALUE

The SPU processor is not affected by speculation, so this macro can
safely be defined as speculation_safe_value_not_needed.

gcc/ChangeLog:

PR target/86807
* config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263335 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
law [Mon, 6 Aug 2018 13:49:10 +0000 (13:49 +0000)] 
* reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
assert.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263333 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoPR target/86662
jozefl [Mon, 6 Aug 2018 10:29:17 +0000 (10:29 +0000)] 
PR target/86662

        * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
        with all enabled __intN types.

        * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263332 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoRemaining support for clobber high
alahay01 [Mon, 6 Aug 2018 09:57:03 +0000 (09:57 +0000)] 
Remaining support for clobber high

gcc/
* alias.c (record_set): Check for clobber high.
* cfgexpand.c (expand_gimple_stmt): Likewise.
* combine-stack-adj.c (single_set_for_csa): Likewise.
* combine.c (find_single_use_1): Likewise.
(set_nonzero_bits_and_sign_copies): Likewise.
(get_combine_src_dest): Likewise.
(is_parallel_of_n_reg_sets): Likewise.
(try_combine): Likewise.
(record_dead_and_set_regs_1): Likewise.
(reg_dead_at_p_1): Likewise.
(reg_dead_at_p): Likewise.
* dce.c (deletable_insn_p): Likewise.
(mark_nonreg_stores_1): Likewise.
(mark_nonreg_stores_2): Likewise.
* df-scan.c (df_find_hard_reg_defs): Likewise.
(df_uses_record): Likewise.
(df_get_call_refs): Likewise.
* dwarf2out.c (mem_loc_descriptor): Likewise.
* haifa-sched.c (haifa_classify_rtx): Likewise.
* ira-build.c (create_insn_allocnos): Likewise.
* ira-costs.c (scan_one_insn): Likewise.
* ira.c (equiv_init_movable_p): Likewise.
(rtx_moveable_p): Likewise.
(interesting_dest_for_shprep): Likewise.
* jump.c (mark_jump_label_1): Likewise.
* postreload-gcse.c (record_opr_changes): Likewise.
* postreload.c (reload_cse_simplify): Likewise.
(struct reg_use): Add source expr.
(reload_combine): Check for clobber high.
(reload_combine_note_use): Likewise.
(reload_cse_move2add): Likewise.
(move2add_note_store): Likewise.
* print-rtl.c (print_pattern): Likewise.
* recog.c (decode_asm_operands): Likewise.
(store_data_bypass_p): Likewise.
(if_test_bypass_p): Likewise.
* regcprop.c (kill_clobbered_value): Likewise.
(kill_set_value): Likewise.
* reginfo.c (reg_scan_mark_refs): Likewise.
* reload1.c (maybe_fix_stack_asms): Likewise.
(eliminate_regs_1): Likewise.
(elimination_effects): Likewise.
(mark_not_eliminable): Likewise.
(scan_paradoxical_subregs): Likewise.
(forget_old_reloads_1): Likewise.
* reorg.c (find_end_label): Likewise.
(try_merge_delay_insns): Likewise.
(redundant_insn): Likewise.
(own_thread_p): Likewise.
(fill_simple_delay_slots): Likewise.
(fill_slots_from_thread): Likewise.
(dbr_schedule): Likewise.
* resource.c (update_live_status): Likewise.
(mark_referenced_resources): Likewise.
(mark_set_resources): Likewise.
* rtl.c (copy_rtx): Likewise.
* rtlanal.c (reg_referenced_p): Likewise.
(single_set_2): Likewise.
(noop_move_p): Likewise.
(note_stores): Likewise.
* sched-deps.c (sched_analyze_reg): Likewise.
(sched_analyze_insn): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263331 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agocse support for clobber_high
alahay01 [Mon, 6 Aug 2018 09:54:28 +0000 (09:54 +0000)] 
cse support for clobber_high

gcc/
* cse.c (invalidate_reg): New function extracted from...
(invalidate): ...here.
(canonicalize_insn): Check for clobber high.
(invalidate_from_clobbers): invalidate clobber highs.
(invalidate_from_sets_and_clobbers): Likewise.
(count_reg_usage): Check for clobber high.
(insn_live_p): Likewise.
* cselib.c (cselib_expand_value_rtx_1):Likewise.
(cselib_invalidate_regno): Check for clobber in setter.
(cselib_invalidate_rtx): Pass through setter.
(cselib_invalidate_rtx_note_stores):
(cselib_process_insn): Check for clobber high.
* cselib.h (cselib_invalidate_rtx): Add operand.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263330 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agolra support for clobber_high
alahay01 [Mon, 6 Aug 2018 09:51:01 +0000 (09:51 +0000)] 
lra support for clobber_high

gcc/
* lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
(mark_not_eliminable): Likewise.
* lra-int.h (struct lra_insn_reg): Add clobber high marker.
* lra-lives.c (process_bb_lives): Check for clobber high.
* lra.c (new_insn_reg): Remember clobber highs.
(collect_non_operand_hard_regs): Check for clobber high.
(lra_set_insn_recog_data): Likewise.
(add_regs_to_insn_regno_info): Likewise.
(lra_update_insn_regno_info): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263329 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoAdd func to check if register is clobbered by clobber_high
alahay01 [Mon, 6 Aug 2018 09:38:29 +0000 (09:38 +0000)] 
Add func to check if register is clobbered by clobber_high

gcc/
* rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
* rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263328 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoGeneration support for CLOBBER_HIGH
alahay01 [Mon, 6 Aug 2018 09:16:24 +0000 (09:16 +0000)] 
Generation support for CLOBBER_HIGH

Ensure clobber high is a register expression.
Info is passed through for the error case.

gcc/
* emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
(copy_insn_1): Likewise.
(gen_hard_reg_clobber_high): New gen function.
* genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
* genemit.c (gen_exp): Likewise.
(gen_emit_seq): Pass through info.
(gen_insn): Check for CLOBBER_HIGH.
(gen_expand): Pass through info.
(gen_split): Likewise.
(output_add_clobbers): Likewise.
* genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
(remove_clobbers): Likewise.
* rtl.h (gen_hard_reg_clobber_high): New declaration.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263327 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoAdd CLOBBER_HIGH expression
alahay01 [Mon, 6 Aug 2018 09:07:57 +0000 (09:07 +0000)] 
Add CLOBBER_HIGH expression

Includes documentation.

2018-08-06  Alan Hayward  <alan.hayward@arm.com>

* doc/rtl.texi (clobber_high): Add.
(parallel): Add in clobber high
* rtl.c (rtl_check_failed_code3): Add function.
* rtl.def (CLOBBER_HIGH): Add expression.
* rtl.h (RTL_CHECKC3): Add macro.
(rtl_check_failed_code3): Add declaration.
(XC3EXP): Add macro.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263326 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * MAINTAINERS: Update my email address.
naveenh [Mon, 6 Aug 2018 07:22:57 +0000 (07:22 +0000)] 
* MAINTAINERS: Update my email address.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263325 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDaily bump.
gccadmin [Mon, 6 Aug 2018 00:16:32 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263324 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agolibbacktrace: Suppress the default action-if-found for AC_CHECK_LIBS.
ibuclaw [Sun, 5 Aug 2018 20:24:59 +0000 (20:24 +0000)] 
libbacktrace: Suppress the default action-if-found for AC_CHECK_LIBS.

Zlib is not a dependency of libbacktrace, and so it shouldn't be added
to LIBS.

libbacktrace/

* configure.ac: Move define of HAVE_ZLIB into check for -lz.
* Makefile.in: Regenerate.
* config.h.in: Likewise.
* configure: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263320 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2018-08-05 François Dumont <fdumont@gcc.gnu.org>
fdumont [Sun, 5 Aug 2018 15:33:58 +0000 (15:33 +0000)] 
2018-08-05  François Dumont  <fdumont@gcc.gnu.org>

* include/bits/stl_iterator.h: Fix comment.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263318 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoi386: Set cfun->machine->max_used_stack_alignment if needed
hjl [Sun, 5 Aug 2018 12:46:13 +0000 (12:46 +0000)] 
i386: Set cfun->machine->max_used_stack_alignment if needed

cfun->machine->max_used_stack_alignment is used to decide how stack frame
should be aligned.  This is independent of any psABIs nor 32-bit vs 64-bit.
It is always safe to compute max_used_stack_alignment.  We compute it only
if 128-bit aligned load/store may be generated on misaligned stack slot
which will lead to segfault.

gcc/

PR target/86386
* config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
cfun->machine->max_used_stack_alignment if needed.

gcc/testsuite/

PR target/86386
* gcc.target/i386/pr86386.c: New file.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263317 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDaily bump.
gccadmin [Sun, 5 Aug 2018 00:16:33 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263316 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoPR tree-optimization/86571 - AIX NaNQ and NaNS output format conflicts with __builtin...
msebor [Sat, 4 Aug 2018 22:14:41 +0000 (22:14 +0000)] 
PR tree-optimization/86571 - AIX NaNQ and NaNS output format conflicts with __builtin_sprintf

gcc/ChangeLog:

PR tree-optimization/86571
* gimple-ssa-sprintf.c (format_floating): Extend upper bound of
NaN output to 4.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263312 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[testsuite, guality] Use absolute line number in pass/fail line
vries [Sat, 4 Aug 2018 21:42:53 +0000 (21:42 +0000)] 
[testsuite, guality] Use absolute line number in pass/fail line

2018-08-04  Tom de Vries  <tdevries@suse.de>

* lib/gcc-gdb-test.exp: Use absolute line number in pass/fail line.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263311 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[libgomp, nvptx, --without-cuda-driver] Don't use system cuda driver
vries [Sat, 4 Aug 2018 20:07:22 +0000 (20:07 +0000)] 
[libgomp, nvptx, --without-cuda-driver] Don't use system cuda driver

Using libgomp configure option --with-cuda-driver=<dir> we can indicate what
cuda driver to use to build the libgomp nvptx plugin.  Without such an option,
the system cuda driver is used, if available.  If not availabe, a dlopen
interface is used instead.

However, when we use --without-cuda-driver (or the equivalent
--with-cuda-driver=no) the system cuda driver is still used if available.

This patch fixes that, making sure that --without-cuda-driver selects the dlopen
interface.

Build on x86_64 with nvptx accelerator and tested libgomp testsuite, with and
without option --without-cuda-driver.

2018-08-04  Tom de Vries  <tdevries@suse.de>

* plugin/configfrag.ac: For --without-cuda-driver, set
CUDA_DRIVER_INCLUDE and CUDA_DRIVER_LIB to no.  Handle
CUDA_DRIVER_INCLUDE == no and CUDA_DRIVER_LIB == no.
* configure: Regenerate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263310 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago* gcc.dg/guality/const-volatile.c: Remove duplicate test
schwab [Sat, 4 Aug 2018 16:50:02 +0000 (16:50 +0000)] 
* gcc.dg/guality/const-volatile.c: Remove duplicate test
"type:cvip".

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263309 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2018-08-04 Janus Weil <janus@gcc.gnu.org>
janus [Sat, 4 Aug 2018 15:37:23 +0000 (15:37 +0000)] 
2018-08-04  Janus Weil  <janus@gcc.gnu.org>

PR fortran/45521
* interface.c (gfc_compare_interfaces): Apply additional
distinguishability criteria of F08 to operator interfaces.

2018-08-04  Janus Weil  <janus@gcc.gnu.org>

PR fortran/45521
* gfortran.dg/interface_assignment_6.f90: New test case.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263308 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR testsuite/86153
uros [Sat, 4 Aug 2018 10:01:54 +0000 (10:01 +0000)] 
PR testsuite/86153
* g++.dg/pr83239.C (dg-options): Add -finline-limit=500.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263306 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDaily bump.
gccadmin [Sat, 4 Aug 2018 00:16:28 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263305 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
sandra [Fri, 3 Aug 2018 22:40:08 +0000 (22:40 +0000)] 
2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>

gcc/
* config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263301 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoRemove nfs bogon
law [Fri, 3 Aug 2018 20:53:48 +0000 (20:53 +0000)] 
Remove nfs bogon

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263300 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * config/sh/sjlj.S: Adjust to use PIC vs normal code to avoid
law [Fri, 3 Aug 2018 20:53:08 +0000 (20:53 +0000)] 
* config/sh/sjlj.S: Adjust to use PIC vs normal code to avoid
absolute relocation in a shared library.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263299 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoAdd fix-it hint for missing return statement in assignment operators (PR c++/85523)
dmalcolm [Fri, 3 Aug 2018 18:38:13 +0000 (18:38 +0000)] 
Add fix-it hint for missing return statement in assignment operators (PR c++/85523)

gcc/cp/ChangeLog:

PR c++/85523
* decl.c: Include "gcc-rich-location.h".
(add_return_star_this_fixit): New function.
(finish_function): When warning about missing return statements in
functions returning non-void, add a "return *this;" fix-it hint for
assignment operators.

gcc/testsuite/ChangeLog:

PR c++/85523
* g++.dg/pr85523.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263298 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR target/86795
law [Fri, 3 Aug 2018 17:39:00 +0000 (17:39 +0000)] 
PR target/86795
* config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263296 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agodocs: fix stray duplicated words
dmalcolm [Fri, 3 Aug 2018 15:49:12 +0000 (15:49 +0000)] 
docs: fix stray duplicated words

gcc/ChangeLog:
* doc/gcov.texi (-x): Remove duplicate "to".
* doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
(-Wif-not-aligned): Remove duplicate "is".
(-flto): Remove duplicate "the".
(MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
duplicate "v5.00.b".
(MSP430 Options): Remove duplicate "and" from the description
of "-mgprel-sec=regexp".
(x86 Options): Remove duplicate copies of "vmldLog102" and
vmlsLog104 from description of "-mveclibabi=type".

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263295 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoAvoid infinite loop with duplicate anonymous union fields (PR c/86690).
jsm28 [Fri, 3 Aug 2018 15:25:35 +0000 (15:25 +0000)] 
Avoid infinite loop with duplicate anonymous union fields (PR c/86690).

If a struct contains an anonymous union and both have a field with the
same name, detect_field_duplicates_hash() will replace one of them
with NULL.  If compilation doesn't stop immediately, it may later call
lookup_field() on the union, which falsely assumes the union's
LANG_SPECIFIC array is sorted, and may loop indefinitely because of
this.

2018-08-03  Bogdan Harjoc  <harjoc@gmail.com>

PR c/86690
gcc/c:
* c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
errors.

gcc/testsuite:
* gcc.dg/union-duplicate-field.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263294 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR c++/86706
jakub [Fri, 3 Aug 2018 15:10:32 +0000 (15:10 +0000)] 
PR c++/86706
* class.c (build_base_path): Use currently_open_class.

* g++.dg/template/pr86706.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263293 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * ChangeLog: Move entry ...
uros [Fri, 3 Aug 2018 13:55:31 +0000 (13:55 +0000)] 
* ChangeLog: Move entry ...
* cp/ChangeLog: ... here.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263292 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[Ada] Partially revert "Makefile patches from initial RISC-V cross/native build."
pmderodat [Fri, 3 Aug 2018 13:22:38 +0000 (13:22 +0000)] 
[Ada] Partially revert "Makefile patches from initial RISC-V cross/native build."

This partially reverts r262482, at it broke canadian builds.

2018-08-03  Pierre-Marie de Rodat  <derodat@adacore.com>

gcc/ada/

Reverts
2018-07-06  Jim Wilson  <jimw@sifive.com>

* Make-generated.in (treeprs.ads): Use $(GNATMAKE) instead of gnatmake.
(einfo.h, sinfo.h, stamp-snames, stamp-nmake): Likewise.
* gcc-interface/Makefile.in (xoscons): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263291 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoHandle SLP of call pattern statements
rsandifo [Fri, 3 Aug 2018 12:56:55 +0000 (12:56 +0000)] 
Handle SLP of call pattern statements

We couldn't vectorise:

  for (int j = 0; j < n; ++j)
    {
      for (int i = 0; i < 16; ++i)
a[i] = (b[i] + c[i]) >> 1;
      a += step;
      b += step;
      c += step;
    }

at -O3 because cunrolli unrolled the inner loop and SLP couldn't handle
AVG_FLOOR patterns (see also PR86504).  The problem was some overly
strict checking of pattern statements compared to normal statements
in vect_get_and_check_slp_defs:

          switch (gimple_code (def_stmt))
            {
            case GIMPLE_PHI:
            case GIMPLE_ASSIGN:
      break;

    default:
      if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
 "unsupported defining stmt:\n");
      return -1;
            }

The easy fix would have been to add GIMPLE_CALL to the switch,
but I don't think the switch is doing anything useful.  We only create
pattern statements that the rest of the vectoriser can handle, and the
other checks in this function and elsewhere check whether SLP is possible.

I'm also not sure why:

          if (!first && !oprnd_info->first_pattern
      /* Allow different pattern state for the defs of the
 first stmt in reduction chains.  */
      && (oprnd_info->first_dt != vect_reduction_def

is necessary.  All that should matter is that the statements in the
node are "similar enough".  It turned out to be quite hard to find a
convincing example that used a mixture of pattern and non-pattern
statements, so bb-slp-pow-1.c is the best I could come up with.
But it does show that the combination of "xi * xi" statements and
"pow (xj, 2) -> xj * xj" patterns are handled correctly.

The patch therefore just removes the whole if block.

The loop also needed commutative swapping to be extended to at least
AVG_FLOOR.

This gives +3.9% on 525.x264_r at -O3.

2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* internal-fn.h (first_commutative_argument): Declare.
* internal-fn.c (first_commutative_argument): New function.
* tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
restrictions for pattern statements.  Use first_commutative_argument
to look for commutative operands in calls to internal functions.

gcc/testsuite/
* gcc.dg/vect/bb-slp-over-widen-1.c: Expect AVG_FLOOR to be used
on vect_avg_qi targets.
* gcc.dg/vect/bb-slp-over-widen-2.c: Likewise.
* gcc.dg/vect/bb-slp-pow-1.c: New test.
* gcc.dg/vect/vect-avg-15.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263290 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoAdd workaround for non-unique errno values on AIX
redi [Fri, 3 Aug 2018 12:53:34 +0000 (12:53 +0000)] 
Add workaround for non-unique errno values on AIX

* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263289 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * Makefile.in (wide-int-range.o): New.
aldyh [Fri, 3 Aug 2018 11:31:22 +0000 (11:31 +0000)] 
* Makefile.in (wide-int-range.o): New.
* tree-vrp.c: Move all the wide_int_* functions to...
* wide-int-range.cc: ...here.
* tree-vrp.h: Move all the wide_int_* prototypes to...
* wide-int-range.h: ...here.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263288 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[c++] Don't emit exception tables for UI_NONE
vries [Fri, 3 Aug 2018 11:21:09 +0000 (11:21 +0000)] 
[c++] Don't emit exception tables for UI_NONE

If a target does not support exceptions, it can indicate this by returning
UI_NONE in TARGET_EXCEPT_UNWIND_INFO.  Currently the compiler still emits
exception tables for such a target.

This patch makes sure that no exception tables are emitted if the target does
not support exceptions.  This allows us to remove a workaround in
TARGET_ASM_BYTE_OP in the nvptx port.

Build on x86_64 with nvptx accelerator, and tested libgomp.

Build and reg-tested on x86_64.

2018-08-03  Tom de Vries  <tdevries@suse.de>

* common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
UI_NONE.
* config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
* except.c (output_function_exception_table): Do early exit if
targetm_common.except_unwind_info (&global_options) == UI_NONE.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263287 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoPrint heuristics probability fraction part with 2 digits.
marxin [Fri, 3 Aug 2018 07:23:47 +0000 (07:23 +0000)] 
Print heuristics probability fraction part with 2 digits.

2018-08-03  Martin Liska  <mliska@suse.cz>

* predict.c (dump_prediction): Change to 2 digits
        in fraction part.
2018-08-03  Martin Liska  <mliska@suse.cz>

* gcc.dg/predict-1.c: Adjust scanned pattern to cover 2 digits.
* gcc.dg/predict-13.c:Likewise.
* gcc.dg/predict-3.c:Likewise.
* gcc.dg/predict-4.c:Likewise.
* gcc.dg/predict-5.c:Likewise.
* gcc.dg/predict-6.c:Likewise.
* gcc.dg/predict-9.c:Likewise.
* gfortran.dg/predict-1.f90:Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263286 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[aarch64] Fix falkor pipeline description for dup<q>
siddhesh [Fri, 3 Aug 2018 01:51:42 +0000 (01:51 +0000)] 
[aarch64] Fix falkor pipeline description for dup<q>

There was a typo in the pipeline description where DUP was assigned to
the vector pipes for quad mode ops when it really only uses the VTOG
pipes.  Fixing this does not show any noticeable difference in
performance (there's a very small bump of 1.7% in x264 but that's
about it) in my tests but is the more precise description of operations
for falkor.

* config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
neon_dup_q to...
(falkor_am_1_gtov_gtov): ... a new insn reservation.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263285 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDaily bump.
gccadmin [Fri, 3 Aug 2018 00:16:17 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263284 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
law [Thu, 2 Aug 2018 22:39:59 +0000 (22:39 +0000)] 
* config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
* df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
* dwarf2out.c (mem_loc_descriptor): Replace > with >=.
* lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
* lra-remat.c (call_used_input_regno_present_p): Replace <= with <.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263280 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoFix memory leak of pretty_printer prefixes
dmalcolm [Thu, 2 Aug 2018 20:07:28 +0000 (20:07 +0000)] 
Fix memory leak of pretty_printer prefixes

We were rather sloppy about handling the ownership of prefixes for
pretty_printer, and this lead to a memory leak for any time a
diagnostic_show_locus call emits multiple line spans.

This showed up in "make selftest-valgrind" as:

3,976 bytes in 28 blocks are definitely lost in loss record 632 of 669
   at 0x4A0645D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x1F08227: xmalloc (xmalloc.c:147)
   by 0x1F083E6: xvasprintf (xvasprintf.c:58)
   by 0x1E7EC7D: build_message_string(char const*, ...) (diagnostic.c:78)
   by 0x1E7F438: diagnostic_get_location_text(diagnostic_context*, expanded_location) (diagnostic.c:328)
   by 0x1E7FD54: default_diagnostic_start_span_fn(diagnostic_context*, expanded_location) (diagnostic.c:626)
   by 0x1EB3508: selftest::test_diagnostic_context::start_span_cb(diagnostic_context*, expanded_location) (selftest-diagnostic.c:57)
   by 0x1E89215: diagnostic_show_locus(diagnostic_context*, rich_location*, diagnostic_t) (diagnostic-show-locus.c:1992)
   by 0x1E8ECAD: selftest::test_fixit_insert_containing_newline_2(selftest::line_table_case const&) (diagnostic-show-locus.c:3044)
   by 0x1EB0606: selftest::for_each_line_table_case(void (*)(selftest::line_table_case const&)) (input.c:3525)
   by 0x1E8F3F5: selftest::diagnostic_show_locus_c_tests() (diagnostic-show-locus.c:3164)
   by 0x1E010BF: selftest::run_tests() (selftest-run-tests.c:88)

4,004 bytes in 28 blocks are definitely lost in loss record 633 of 669
   at 0x4A0645D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x1F08227: xmalloc (xmalloc.c:147)
   by 0x1F083E6: xvasprintf (xvasprintf.c:58)
   by 0x1E7EC7D: build_message_string(char const*, ...) (diagnostic.c:78)
   by 0x1E7F438: diagnostic_get_location_text(diagnostic_context*, expanded_location) (diagnostic.c:328)
   by 0x1E7FD54: default_diagnostic_start_span_fn(diagnostic_context*, expanded_location) (diagnostic.c:626)
   by 0x1EB3508: selftest::test_diagnostic_context::start_span_cb(diagnostic_context*, expanded_location) (selftest-diagnostic.c:57)
   by 0x1E89215: diagnostic_show_locus(diagnostic_context*, rich_location*, diagnostic_t) (diagnostic-show-locus.c:1992)
   by 0x1E8B373: selftest::test_diagnostic_show_locus_fixit_lines(selftest::line_table_case const&) (diagnostic-show-locus.c:2500)
   by 0x1EB0606: selftest::for_each_line_table_case(void (*)(selftest::line_table_case const&)) (input.c:3525)
   by 0x1E8F3B9: selftest::diagnostic_show_locus_c_tests() (diagnostic-show-locus.c:3159)
   by 0x1E010BF: selftest::run_tests() (selftest-run-tests.c:88)

This patch fixes the leaks by ensuring that the pretty_printer "owns"
the prefix if it's non-NULL, freeing it in the dtor and in pp_set_prefix.

gcc/cp/ChangeLog:
* error.c (cxx_print_error_function): Duplicate "file" before
passing it to pp_set_prefix.
(cp_print_error_function): Use pp_take_prefix when saving the
existing prefix.

gcc/ChangeLog:
* diagnostic-show-locus.c (diagnostic_show_locus): Use
pp_take_prefix when saving the existing prefix.
* diagnostic.c (diagnostic_append_note): Likewise.
* langhooks.c (lhd_print_error_function): Likewise.
* pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
param's type.  Free the existing prefix.
(pp_take_prefix): New function.
(pretty_printer::pretty_printer): Drop the prefix parameter.
Rename the length parameter to match the comment.
(pretty_printer::~pretty_printer): Free the prefix.
* pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
parameter.
(struct pretty_printer): Drop the "const" from "prefix" field's
type and clarify memory management.
(pp_set_prefix): Drop the "const" from the 2nd param.
(pp_take_prefix): New decl.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263275 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2018-07-31 Aaron Sawdey <acsawdey@linux.ibm.com>
acsawdey [Thu, 2 Aug 2018 18:11:54 +0000 (18:11 +0000)] 
2018-07-31  Aaron Sawdey  <acsawdey@linux.ibm.com>

* config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
for word_mode_ok here instead of passing as argument.
(expand_block_compare): Change select_block_compare_mode() call.
(expand_strncmp_gpr_sequence): New function.
(expand_strn_compare): Make use of expand_strncmp_gpr_sequence.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263273 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR target/86790
law [Thu, 2 Aug 2018 17:50:16 +0000 (17:50 +0000)] 
PR target/86790
* config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263272 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[OBVIOUS] Correct name of file in ChangeLog
sudi [Thu, 2 Aug 2018 17:36:43 +0000 (17:36 +0000)] 
[OBVIOUS] Correct name of file in ChangeLog

Committed on behalf of Matthew Malcomson.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263271 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR target/86784
law [Thu, 2 Aug 2018 17:24:59 +0000 (17:24 +0000)] 
PR target/86784
* config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263270 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoarm - correctly handle denormal results during softfp subtraction
rearnsha [Thu, 2 Aug 2018 16:50:07 +0000 (16:50 +0000)] 
arm - correctly handle denormal results during softfp subtraction

2018-08-02  Nicolas Pitre <nico@fluxnic.net>

PR libgcc/86512
* config/arm/ieee754-df.S (adddf3): Don't shortcut denormal handling
when exponent goes negative. Update my email address.
* config/arm/ieee754-sf.S (addsf3): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263267 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR target/86813
nickc [Thu, 2 Aug 2018 16:13:32 +0000 (16:13 +0000)] 
PR target/86813
* config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263266 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[nvptx] Ignore c++ exceptions
vries [Thu, 2 Aug 2018 15:59:01 +0000 (15:59 +0000)] 
[nvptx] Ignore c++ exceptions

The nvptx port can't support exceptions using sjlj, because ptx does not
support sjlj.  However, default_except_unwind_info still returns UI_SJLJ, even
even if we configure with --disable-sjlj-exceptions, because UI_SJLJ is the
fallback option.

The reason default_except_unwind_info doesn't return UI_DWARF2 is because
DWARF2_UNWIND_INFO is not defined in defaults.h, because
INCOMING_RETURN_ADDR_RTX is not defined, because there's no ptx equivalent.

Testcase libgomp.c++/for-15.C currently doesn't compile unless fno-exceptions
is added because:
- it tries to generate sjlj exception handling code, and
- it tries to generate exception tables using label-addressed .byte sequence.
  Ptx doesn't support generating random data at a label, nor being able to
  load/write data relative to a label.

This patch fixes the first problem by using UI_TARGET for nvptx.

The second problem is worked around by generating all .byte sequences commented
out.  It would be better to have a narrower workaround, and define
TARGET_ASM_BYTE_OP to "error: .byte unsupported " or some such.

This patch does not enable exceptions for nvptx, it merely allows c++ programs
to run correctly if they do no use exception handling.

Build and reg-tested on x86_64 with nvptx accelerator.

2018-08-02  Tom de Vries  <tdevries@suse.de>

PR target/86660
* common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
function.  Return UI_TARGET unconditionally.
(TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
* config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.

* testsuite/libgomp.oacc-c++/routine-1-auto.C: Remove -fno-exceptions.
* testsuite/libgomp.oacc-c++/routine-1-template-auto.C: Same.
* testsuite/libgomp.oacc-c++/routine-1-template-trailing-return-type.C:
Same.
* testsuite/libgomp.oacc-c++/routine-1-template.C: Same.
* testsuite/libgomp.oacc-c++/routine-1-trailing-return-type.C: Same.
* testsuite/libgomp.oacc-c-c++-common/routine-1.c: Same.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263265 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR target/86810
nickc [Thu, 2 Aug 2018 15:57:06 +0000 (15:57 +0000)] 
PR target/86810
* config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263264 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR target/86803
nickc [Thu, 2 Aug 2018 14:35:10 +0000 (14:35 +0000)] 
PR target/86803
* config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263263 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoTypo fix
rsandifo [Thu, 2 Aug 2018 14:33:30 +0000 (14:33 +0000)] 
Typo fix

Noticed by Tamar (thanks).

2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* genemit.c (print_overload_test): Fix typo.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263262 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2018-08-02 Richard Biener <rguenther@suse.de>
rguenth [Thu, 2 Aug 2018 14:25:57 +0000 (14:25 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263261 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR target/86797
nickc [Thu, 2 Aug 2018 14:02:32 +0000 (14:02 +0000)] 
PR target/86797
* config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263259 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR target/86791
nickc [Thu, 2 Aug 2018 13:30:40 +0000 (13:30 +0000)] 
PR target/86791
* config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263258 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2018-08-02 Richard Biener <rguenther@suse.de>
rguenth [Thu, 2 Aug 2018 13:19:50 +0000 (13:19 +0000)] 
2018-08-02  Richard Biener  <rguenther@suse.de>

PR tree-optimization/86816
* tree-ssa-tail-merge.c (tail_merge_valueize): New function
which checks for value availability before querying it.
(gvn_uses_equal): Use it.
(same_succ_hash): Likewise.
(gimple_equal_p): Likewise.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263257 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR target/86789
nickc [Thu, 2 Aug 2018 12:31:29 +0000 (12:31 +0000)] 
PR target/86789
* config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263256 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR target/86787
nickc [Thu, 2 Aug 2018 12:14:52 +0000 (12:14 +0000)] 
PR target/86787
* config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263255 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR target/86782
nickc [Thu, 2 Aug 2018 11:46:06 +0000 (11:46 +0000)] 
PR target/86782
* config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
speculation_safe_value_not_needed.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263254 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR target/86781
nickc [Thu, 2 Aug 2018 11:24:47 +0000 (11:24 +0000)] 
PR target/86781
* config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
speculation_safe_value_not_needed.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263253 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoRevert "[ARM] Fix PR85434: spilling of stack protector guard's address on ARM"
thopre01 [Thu, 2 Aug 2018 11:16:05 +0000 (11:16 +0000)] 
Revert "[ARM] Fix PR85434: spilling of stack protector guard's address on ARM"

This reverts commit r263245.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263252 138bc75d-0d04-0410-961f-82ee72b054a4