]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
7 years agoxtensa: add support for SSP
jcmvbkbc [Mon, 8 May 2017 23:53:14 +0000 (23:53 +0000)] 
xtensa: add support for SSP

gcc/
2017-05-08  Max Filippov  <jcmvbkbc@gmail.com>

* config/xtensa/xtensa-protos.h
        (xtensa_initial_elimination_offset): New declaration.
* config/xtensa/xtensa.c (xtensa_initial_elimination_offset):
New function. Move its body from the INITIAL_ELIMINATION_OFFSET
macro definition, add case for FRAME_POINTER_REGNUM when
FRAME_GROWS_DOWNWARD.
* config/xtensa/xtensa.h (FRAME_GROWS_DOWNWARD): New macro
definition.
(INITIAL_ELIMINATION_OFFSET): Replace body with call to
xtensa_initial_elimination_offset.

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

7 years ago * doc/invoke.texi: Alphabetize -fdump options.
nathan [Mon, 8 May 2017 21:52:53 +0000 (21:52 +0000)] 
* doc/invoke.texi: Alphabetize -fdump options.

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

7 years agogcc/ChangeLog:
msebor [Mon, 8 May 2017 20:50:24 +0000 (20:50 +0000)] 
gcc/ChangeLog:

PR translation/80280
* config/sol2-c.c (solaris_pragma_align): Correct quoting.

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

7 years ago PR c++/80178 - parameter passing for uncopyable classes
jason [Mon, 8 May 2017 19:08:07 +0000 (19:08 +0000)] 
PR c++/80178 - parameter passing for uncopyable classes

* tree.c (type_has_nontrivial_copy_init): True for classes with only
deleted copy/move ctors.
(remember_deleted_copy, maybe_warn_parm_abi): New.
* decl.c (require_complete_types_for_parms, check_function_type):
Call maybe_warn_parm_abi.
* call.c (convert_for_arg_passing, build_cxx_call): Likewise.

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

7 years ago Bump C++ ABI version.
jason [Mon, 8 May 2017 18:45:42 +0000 (18:45 +0000)] 
Bump C++ ABI version.

* c-opts.c (c_common_post_options): Update defaults for
flag_abi_version and flag_abi_compat_version.

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

7 years ago2017-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
tkoenig [Mon, 8 May 2017 18:22:44 +0000 (18:22 +0000)] 
2017-05-08  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/79930
* frontend-passes.c (matmul_to_var_expr): New function,
add prototype.
(matmul_to_var_code):  Likewise.
(optimize_namespace):  Use them from gfc_code_walker.

2017-05-08  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/79930
* gfortran.dg/inline_transpose_1.f90:  Add
-finline-matmul-limit=0 to options.
* gfortran.dg/matmul_5.f90:  Likewise.
* gfortran.dg/vect/vect-8.f90: Likewise.
* gfortran.dg/inline_matmul_14.f90:  New test.
* gfortran.dg/inline_matmul_15.f90:  New test.

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

7 years ago * decl.c (builtin_function_1): Set DCL_ANTICIPATED before pushing.
nathan [Mon, 8 May 2017 17:59:03 +0000 (17:59 +0000)] 
* decl.c (builtin_function_1): Set DCL_ANTICIPATED before pushing.
(start_preparsed_function): Do decl pushing before setting
current_funciton_decl and announcing it.

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

7 years ago2017-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
tkoenig [Mon, 8 May 2017 17:56:13 +0000 (17:56 +0000)] 
2017-05-08  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/80602
* m4/matmul_internal.m4:  'matmul_name`:  Change
t1 to a VLA of the required size.
        * generated/matmul_c10.c: Regenerated.
        * generated/matmul_c16.c: Regenerated.
        * generated/matmul_c4.c: Regenerated.
        * generated/matmul_c8.c: Regenerated.
        * generated/matmul_i1.c: Regenerated.
        * generated/matmul_i16.c: Regenerated.
        * generated/matmul_i2.c: Regenerated.
        * generated/matmul_i4.c: Regenerated.
        * generated/matmul_i8.c: Regenerated.
        * generated/matmul_r10.c: Regenerated.
        * generated/matmul_r16.c: Regenerated.
        * generated/matmul_r4.c: Regenerated.
        * generated/matmul_r8.c: Regenerated.

2017-05-08  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/80602
* gfortran.dg/matmul_15.f90:  New test case.

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

7 years ago * name-lookup.h (pushdecl_with_scope): Replace with ...
nathan [Mon, 8 May 2017 17:54:55 +0000 (17:54 +0000)] 
* name-lookup.h (pushdecl_with_scope): Replace with ...
(pushdecl_outermost_localscope): ... this.
* name-lookup.c (pushdecl_with_scope): Replace with ...
(pushdecl_outermost_localscope): ... this.
(pushdecl_namespace_level): Adjust.
* decl.c (cp_make_fname_decl): Use pushdecl_outermost_localscope.
* lambda.c (insert_capture_proxy): Likewise.

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

7 years ago2017-05-08 Bernd Edlinger <bernd.edlinger@hotmail.de>
edlinger [Mon, 8 May 2017 17:44:36 +0000 (17:44 +0000)] 
2017-05-08  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * target.def (compute_frame_layout): New optional target hook.
        * doc/tm.texi.in (TARGET_COMPUTE_FRAME_LAYOUT): Add hook.
        * doc/tm.texi (TARGET_COMPUTE_FRAME_LAYOUT): Add documentation.
        * lra-eliminations.c (update_reg_eliminate): Call compute_frame_layout
        target hook.
        * reload1.c (verify_initial_elim_offsets): Likewise.
        * config/arm/arm.c (TARGET_COMPUTE_FRAME_LAYOUT): Define.
        (use_simple_return_p): Call arm_compute_frame_layout if needed.
        (arm_get_frame_offsets): Split up into this ...
        (arm_compute_frame_layout): ... and this function.

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

7 years agoTweak static assertions in std::optional
redi [Mon, 8 May 2017 17:13:38 +0000 (17:13 +0000)] 
Tweak static assertions in std::optional

* include/std/optional: Use a separate static_assert per condition.
* testsuite/20_util/optional/cons/value_neg.cc: Update dg-error line
numbers.

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

7 years ago * class.c (build_vtbl_initializer): Don't shadow outer variable
nathan [Mon, 8 May 2017 16:58:44 +0000 (16:58 +0000)] 
* class.c (build_vtbl_initializer): Don't shadow outer variable
with static var.

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

7 years ago[AArch64] Tighten move constraints for symbolic operands
rsandifo [Mon, 8 May 2017 16:18:49 +0000 (16:18 +0000)] 
[AArch64] Tighten move constraints for symbolic operands

The movsi and movdi constraints allowed the source to be any
absolute symbolic expression ("S").  That's OK for operands that
have already been vetted by the aarch64_mov_operand predicate but
causes problems if the register allocator substitutes an equivalence
(the usual "the constraints can't accept more than the predicates"
restriction).

Although all other uses of "S" in the backend are redundant and could
in principle be removed, "S" itself is a publicly-documented constraint
and so we'd have to keep its definition.  This patch therefore adds a
new "Usa" constraint for legitimate absolute address operands.

2017-05-08  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* config/aarch64/constraints.md (Usa): New constraint.
* config/aarch64/aarch64.md (*movsi_aarch64, *movdi_aarch64): Use it.

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

7 years ago Revert _binding -> _value change.
nathan [Mon, 8 May 2017 15:51:57 +0000 (15:51 +0000)] 
Revert _binding -> _value change.
* name-lookup.h (get_namespace_value, set_global_value): Rename to
...
(get_namespace_binding, set_global_binding): ... these.
* name-lookup.c (get_namespace_value, set_global_value): Rename to
...
(get_namespace_binding, set_global_binding): ... these.
(arg_assoc_namespace, pushdecl_maybe_friend_1)
check_for_out_of_scope_variable, push_overloaded_decl_1,
lookup_name_innermost_nonclass_level, push_namespace): Adjust.
* cp-tree.h (IDENTIFIER_GLOBAL_VALUE)
SET_IDENTIFIER_GLOBAL_VALUE): Adjust.
* decl.c (poplevel): Adjust.
* pt.c (make_constrained_auto): Likewise.
((--This line, and those below, will be ignored--

M    cp/cp-tree.h
M    cp/name-lookup.c
M    cp/name-lookup.h
M    cp/decl.c
M    cp/ChangeLog
M    cp/pt.c

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

7 years ago * es.po, sv.po: Update.
jsm28 [Mon, 8 May 2017 15:42:27 +0000 (15:42 +0000)] 
* es.po, sv.po: Update.

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

7 years agoClarify mt_allocator documentation w.r.t deallocation
redi [Mon, 8 May 2017 15:09:08 +0000 (15:09 +0000)] 
Clarify mt_allocator documentation w.r.t deallocation

* doc/xml/manual/mt_allocator.xml: Clarify deallocation behaviour.
* doc/html/*: Regenerate.

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

7 years agoDefine TM_MULTILIB_CONFIG for ARM multilib
thopre01 [Mon, 8 May 2017 14:35:56 +0000 (14:35 +0000)] 
Define TM_MULTILIB_CONFIG for ARM multilib

TM_MULTILIB_CONFIG is not set in config.gcc when building with multilib
for arm targets, leading to config/arm/t-multilib not including any of
the files (t-aprofile and t-rmprofile) definining the architecture and
FPU to build multilib for. This patch fixes that by setting
TM_MULTILIB_CONFIG to with_multilib_list's value after it has been
checked. It also fix a trailing whitespace issue.

2017-05-08  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    * config.gcc (arm*-*-*): Set TM_MULTILIB_CONFIG from
    with_multilib_list after it has been checked.

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

7 years ago2017-05-08 Richard Biener <rguenther@suse.de>
rguenth [Mon, 8 May 2017 13:35:29 +0000 (13:35 +0000)] 
2017-05-08  Richard Biener  <rguenther@suse.de>

* tree-ssa-pre.c (bitmap_set_and): Avoid bitmap copy.
(bitmap_set_subtract_values): Likewise.

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

7 years ago2017-05-08 Richard Biener <rguenther@suse.de>
rguenth [Mon, 8 May 2017 12:52:44 +0000 (12:52 +0000)] 
2017-05-08  Richard Biener  <rguenther@suse.de>

* tree-vrp.c (gimple_assign_nonzero_warnv_p): Rename to ...
(gimple_assign_nonzero): ... this and remove strict_overflow_p
argument.
(gimple_stmt_nonzero_warnv_p): Rename to ...
(gimple_stmt_nonzero_p): ... this and remove strict_overflow_p
argument.
(vrp_stmt_computes_nonzero): Remove strict_overflow_p argument.
(extract_range_basic): Adjust, do not disable propagation on
strict overflow sensitive simplification.
(vrp_visit_cond_stmt): Likewise.

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

7 years agoThis fixes a few failures on ARM and AArch64 due to a recent change in
wilco [Mon, 8 May 2017 12:38:52 +0000 (12:38 +0000)] 
This fixes a few failures on ARM and AArch64 due to a recent change in
alignment peeling by switching the vector cost model off.

Tested on AArch64, ARM and x64 - committed as obvious.

    testsuite/
* gcc.dg/vect/vect-44.c: Add -fno-vect-cost-model.
* gcc.dg/vect/vect-50.c: Likewise.

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

7 years agoDaily bump.
gccadmin [Mon, 8 May 2017 00:16:30 +0000 (00:16 +0000)] 
Daily bump.

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

7 years ago * ipa-inline-analysis.c (estimate_function_body_sizes): Recompute
hubicka [Sun, 7 May 2017 22:21:05 +0000 (22:21 +0000)] 
* ipa-inline-analysis.c (estimate_function_body_sizes): Recompute
body size unconditionally.

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

7 years ago PR translation/80280
reichelt [Sun, 7 May 2017 19:41:09 +0000 (19:41 +0000)] 
    PR translation/80280
        * call.c (print_z_candidate): Fix quoting.

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

7 years ago2017-05-07 Jeff Law <law@redhat.com>
law [Sun, 7 May 2017 15:10:55 +0000 (15:10 +0000)] 
2017-05-07  Jeff Law  <law@redhat.com>

Revert:
2017-05-06  Jeff Law  <law@redhat.com>
PR tree-optimization/78496
* tree-vrp.c (simplify_assert_expr_using_ranges): Remove debugging
code.

PR tree-optimization/78496
* tree-vrp.c (simplify_assert_expr_using_ranges): New function.
(simplify_stmt_using_ranges): Call it.
(vrp_dom_walker::before_dom_children): Extract equivalences
from an ASSERT_EXPR with an equality comparison against a
constant.

Revert:
2017-05-06  Jeff Law  <law@redhat.com>
PR tree-optimization/78496
* gcc.dg/tree-ssa/ssa-thread-16.c: New test.
* gcc.dg/tree-ssa/ssa-thread-17.c: New test.

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

7 years agoDaily bump.
gccadmin [Sun, 7 May 2017 00:16:25 +0000 (00:16 +0000)] 
Daily bump.

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

7 years ago PR tree-optimization/78496
law [Sat, 6 May 2017 18:20:31 +0000 (18:20 +0000)] 
PR tree-optimization/78496
* tree-vrp.c (simplify_assert_expr_using_ranges): Remove debugging
code.

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

7 years ago PR tree-optimization/78496
law [Sat, 6 May 2017 15:03:40 +0000 (15:03 +0000)] 
PR tree-optimization/78496
* tree-vrp.c (simplify_assert_expr_using_ranges): New function.
(simplify_stmt_using_ranges): Call it.
(vrp_dom_walker::before_dom_children): Extract equivalences
from an ASSERT_EXPR with an equality comparison against a
constant.

PR tree-optimization/78496
* gcc.dg/tree-ssa/ssa-thread-16.c: New test.
* gcc.dg/tree-ssa/ssa-thread-17.c: New test.

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

7 years agoRecord equivalences for spill registers
rsandifo [Sat, 6 May 2017 07:46:48 +0000 (07:46 +0000)] 
Record equivalences for spill registers

If we decide to allocate a call-clobbered register R to a value that
is live across a call, LRA will create a new spill register TMPR,
insert:

   TMPR <- R

before the call and

   R <- TMPR

after it.  But if we then failed to allocate a register to TMPR, we would
always spill it to the stack, even if R was known to be equivalent to
a constant or to some existing memory location.  And on AArch64, we'd
always fail to allocate such a register for 128-bit Advanced SIMD modes,
since no registers of those modes are call-preserved.

This patch avoids the problem by copying the equivalence information
from the original pseudo to the spill register.  It means that the
code for the testcase is as good with -O2 as it is with -O,
whereas previously the -O code was better.

[Based on the code ARM contributed in branches/ARM/sve-branch@247248]

2017-05-06  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* lra-constraints.c (lra_copy_reg_equiv): New function.
(split_reg): Use it to copy equivalence information from the
original register to the spill register.

gcc/testsuite/
* gcc.target/aarch64/spill_1.c: New test.

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

7 years agoPR 75964: Invalid integer ABS handling in simplify-rtx.c
rsandifo [Sat, 6 May 2017 07:44:13 +0000 (07:44 +0000)] 
PR 75964: Invalid integer ABS handling in simplify-rtx.c

RTL has no distinction between signed and unsigned values, so it
doesn't make sense to test for signed overflow.

2017-05-06  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
PR rtl-optimization/75964
* simplify-rtx.c (simplify_const_relational_operation): Remove
invalid handling of comparisons of integer ABS.

gcc/testsuite/
PR rtl-optimization/75964
* gcc.dg/torture/pr75964.c: New test.

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

7 years agoRemove default_packed lines from i386/avx-vtestp{d,s}*
vries [Sat, 6 May 2017 07:31:27 +0000 (07:31 +0000)] 
Remove default_packed lines from i386/avx-vtestp{d,s}*

2017-05-06  Tom de Vries  <tom@codesourcery.com>

PR testsuite/80606
* gcc.target/i386/avx-vtestpd-1.c: Remove default_packed lines.
* gcc.target/i386/avx-vtestpd-2.c: Same.
* gcc.target/i386/avx-vtestpd-256-1.c: Same.
* gcc.target/i386/avx-vtestpd-256-2.c: Same.
* gcc.target/i386/avx-vtestpd-256-3.c: Same.
* gcc.target/i386/avx-vtestpd-3.c: Same.
* gcc.target/i386/avx-vtestps-1.c: Same.
* gcc.target/i386/avx-vtestps-2.c: Same.
* gcc.target/i386/avx-vtestps-256-1.c: Same.
* gcc.target/i386/avx-vtestps-256-2.c: Same.
* gcc.target/i386/avx-vtestps-256-3.c: Same.
* gcc.target/i386/avx-vtestps-3.c: Same.

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

7 years agoAdd absolute line number comment in gcc.target/avr/progmem-error-1.cpp
vries [Sat, 6 May 2017 07:17:16 +0000 (07:17 +0000)] 
Add absolute line number comment in gcc.target/avr/progmem-error-1.cpp

2017-05-06  Tom de Vries  <tom@codesourcery.com>

* gcc.target/avr/progmem-error-1.cpp: Add abolute line number comment.

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

7 years agoReplace absolute line numbers in gcc.target/powerpc
vries [Sat, 6 May 2017 07:17:05 +0000 (07:17 +0000)] 
Replace absolute line numbers in gcc.target/powerpc

2017-05-06  Tom de Vries  <tom@codesourcery.com>

PR testsuite/80557
* gcc.target/powerpc/altivec-macros.c: Replace absolute line numbers.
* gcc.target/powerpc/altivec-types-1.c: Same.

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

7 years agoReplace absolute line numbers in gcc.target/spu
vries [Sat, 6 May 2017 07:16:53 +0000 (07:16 +0000)] 
Replace absolute line numbers in gcc.target/spu

2017-05-06  Tom de Vries  <tom@codesourcery.com>

PR testsuite/80557
* gcc.target/spu/Wmain.c: Replace absolute line numbers.
* gcc.target/spu/intrinsics-1.c: Same.

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

7 years agoReplace absolute line numbers in gcc.target/arm
vries [Sat, 6 May 2017 07:16:43 +0000 (07:16 +0000)] 
Replace absolute line numbers in gcc.target/arm

2017-05-06  Tom de Vries  <tom@codesourcery.com>

PR testsuite/80557
* gcc.target/arm/pr69180.c: Replace absolute line numbers.

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

7 years agoReplace absolute line numbers in gcc.target/aarch64
vries [Sat, 6 May 2017 07:16:33 +0000 (07:16 +0000)] 
Replace absolute line numbers in gcc.target/aarch64

2017-05-06  Tom de Vries  <tom@codesourcery.com>

PR testsuite/80557
* gcc.target/aarch64/spellcheck_1.c: Replace absolute line numbers.
* gcc.target/aarch64/spellcheck_2.c: Same.
* gcc.target/aarch64/spellcheck_3.c: Same.

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

7 years agoReplace absolute line numbers in g++.dg/{debug,goacc}
vries [Sat, 6 May 2017 07:16:17 +0000 (07:16 +0000)] 
Replace absolute line numbers in g++.dg/{debug,goacc}

2017-05-06  Tom de Vries  <tom@codesourcery.com>

PR testsuite/80557
* g++.dg/debug/dwarf2/dwarf2-1.C: Replace absolute line numbers.
* g++.dg/debug/dwarf2/dwarf2-2.C: Same.
* g++.dg/debug/dwarf2/pr46123-2.C: Same.
* g++.dg/debug/dwarf2/typedef5.C: Same.
* g++.dg/goacc/data-1.C: Same.

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

7 years ago * config/i386/i386.c (ext_80387_constant_init): Do not explicitly
uros [Sat, 6 May 2017 07:01:51 +0000 (07:01 +0000)] 
* config/i386/i386.c (ext_80387_constant_init): Do not explicitly
initialize to zero.
(init_regs): Remove declaration.
(function_arg_advance_32): Initialize error_p as boolean variable.

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

7 years agoAdd fuchsia support to libgcc
jconner [Sat, 6 May 2017 00:22:38 +0000 (00:22 +0000)] 
Add fuchsia support to libgcc

* config/arm/unwind-arm.h (_Unwind_decode_typeinfo_ptr): Use
pc-relative indirect handling for fuchsia.
* config/t-slibgcc-fuchsia: New file.
* config.host (*-*-fuchsia*, aarch64*-*-fuchsia*, arm*-*-fuchsia*,
x86_64-*-fuchsia*): Add definitions.

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

7 years agoDaily bump.
gccadmin [Sat, 6 May 2017 00:16:44 +0000 (00:16 +0000)] 
Daily bump.

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

7 years ago * store-motion.c (remove_reachable_equiv_notes): Reformat long
nathan [Fri, 5 May 2017 23:24:41 +0000 (23:24 +0000)] 
* store-motion.c (remove_reachable_equiv_notes): Reformat long
lines.  Use for (;;).

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

7 years ago[gcc]
wschmidt [Fri, 5 May 2017 21:27:54 +0000 (21:27 +0000)] 
[gcc]

2017-05-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* config/rs6000/rs6000.c (rs6000_vect_nonmem): New static var.
(rs6000_init_cost): Initialize rs6000_vect_nonmem.
(rs6000_add_stmt_cost): Update rs6000_vect_nonmem.
(rs6000_finish_cost): Avoid vectorizing simple copy loops with
VF=2 that require versioning.

[gcc/testsuite]

2017-05-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* gcc.target/powerpc/versioned-copy-loop.c: New file.

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

7 years agoConvert CARET_LINE_MARGIN to const int
dmalcolm [Fri, 5 May 2017 21:07:38 +0000 (21:07 +0000)] 
Convert CARET_LINE_MARGIN to const int

gcc/ChangeLog:
* diagnostic.h (CARET_LINE_MARGIN): Convert from macro to const
int.

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

7 years agoConvert diagnostic_override_option_index from macro to inline function
dmalcolm [Fri, 5 May 2017 21:05:15 +0000 (21:05 +0000)] 
Convert diagnostic_override_option_index from macro to inline function

gcc/ChangeLog:
* diagnostic.h (diagnostic_override_option_index): Convert from
macro to inline function.

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

7 years agoGet rid of macros for diagnostic_report_current_module
dmalcolm [Fri, 5 May 2017 21:03:07 +0000 (21:03 +0000)] 
Get rid of macros for diagnostic_report_current_module

diagnostic.h has a couple of macros (diagnostic_last_module_changed
and diagnostic_set_last_module) which are only used within
diagnostic_report_current_module.

This patch eliminates the macros in favor of static functions within
diagnostic.c.

No functional change intended.

gcc/ChangeLog:
* diagnostic.c (last_module_changed_p): New function.
(set_last_module): New function.
(diagnostic_report_current_module): Convert macro usage to
the above functions.
* diagnostic.h (diagnostic_context::last_module): Strengthen
from const line_map * to const line_map_ordinary *.
(diagnostic_last_module_changed): Delete macro.
(diagnostic_set_last_module): Delete macro.

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

7 years agoEliminate report_diagnostic macro
dmalcolm [Fri, 5 May 2017 21:01:05 +0000 (21:01 +0000)] 
Eliminate report_diagnostic macro

This patch eliminates the report_diagnostic macro, manually
expanding it in all sites in the code.

No functional change intended.

gcc/c-family/ChangeLog:
* c-common.c (c_cpp_error): Replace report_diagnostic
with diagnostic_report_diagnostic.

gcc/c/ChangeLog:
* c-decl.c (warn_defaults_to): Replace report_diagnostic
with diagnostic_report_diagnostic.
* c-errors.c (pedwarn_c99): Likewise.
(pedwarn_c90): Likewise.

gcc/cp/ChangeLog:
* error.c (pedwarn_cxx98): Replace report_diagnostic
with diagnostic_report_diagnostic.

gcc/ChangeLog:
* diagnostic.c (diagnostic_impl): Replace report_diagnostic
with diagnostic_report_diagnostic.
(diagnostic_n_impl_richloc): Likewise.
* diagnostic.h (report_diagnostic): Delete macro.
* rtl-error.c (diagnostic_for_asm): Replace report_diagnostic
with diagnostic_report_diagnostic.
* substring-locations.c (format_warning_va): Likewise.

gcc/fortran/ChangeLog:
* cpp.c (cb_cpp_error): Replace report_diagnostic
with diagnostic_report_diagnostic.
* error.c (gfc_warning): Likewise.
(gfc_warning_now_at): Likewise.
(gfc_warning_now): Likewise.
(gfc_warning_internal): Likewise.
(gfc_error_now): Likewise.
(gfc_fatal_error): Likewise.
(gfc_error_opt): Likewise.
(gfc_internal_error): Likewise.

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

7 years agodiagnostic.c: add print_option_information
dmalcolm [Fri, 5 May 2017 20:56:36 +0000 (20:56 +0000)] 
diagnostic.c: add print_option_information

This patch simplifies diagnostic_report_diagnostic by moving
option-printing to a new subroutine.

Doing so required a slight rewrite.  In both the old and new
code, context->option_name returns a malloc-ed string.
The old behavior was to then use ACONCAT to manipulate the
format_spec, appending the option metadata.
ACONCAT calcs the buffer size, then uses alloca, and then copies the
data to the on-stack buffer.

Given the alloca, this needs rewriting when moving the printing to
a subroutine.  In the new version, the metadata is simply printed
using pp_* calls (so it's hitting the obstack within the
pretty_printer).

This means we can get rid of the save/restore of format_spec: I don't
believe anything else in the code modifies it.

It also seems inherently simpler; it seems odd to me to be
appending metadata to the formatting string, rather than simply
printing the metadata after the formatted string is printed
(the old code also assumed that no option name contained a '%').

No functional change intended.

gcc/ChangeLog:
* diagnostic.c (diagnostic_report_diagnostic): Eliminate
save/restor of format_spec.  Move option-printing code to...
(print_option_information): ...this new function, and
reimplement by simply printing to the pretty_printer,
rather than appending to the format string.

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

7 years agodiagnostic_report_diagnostic: refactor pragma-handling
dmalcolm [Fri, 5 May 2017 20:51:18 +0000 (20:51 +0000)] 
diagnostic_report_diagnostic: refactor pragma-handling

This patch simplifies diagnostic_report_diagnostic by moving the
pragma-handling logic into a subroutine.

No functional change intended.

gcc/ChangeLog:
* diagnostic.c (diagnostic_report_diagnostic): Split out pragma
handling logic into...
(update_effective_level_from_pragmas): ...this new function.

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

7 years agoRISC-V: Add -mstrict-align option
palmer [Fri, 5 May 2017 20:24:46 +0000 (20:24 +0000)] 
RISC-V: Add -mstrict-align option

The RISC-V user ISA permits misaligned accesses, but they may trap
and be emulated.  That emulation software needs to be compiled assuming
strict alignment.

Even when strict alignment is not required, set SLOW_UNALIGNED_ACCESS
based upon -mtune to avoid a performance pitfall.

gcc/ChangeLog:

2017-05-04  Andrew Waterman  <andrew@sifive.com>

* config/riscv/riscv.opt (mstrict-align): New option.
* config/riscv/riscv.h (STRICT_ALIGNMENT): Use it.  Update comment.
(SLOW_UNALIGNED_ACCESS): Define.
(riscv_slow_unaligned_access): Declare.
* config/riscv/riscv.c (riscv_tune_info): Add slow_unaligned_access
field.
(riscv_slow_unaligned_access): New variable.
(rocket_tune_info): Set slow_unaligned_access to true.
(optimize_size_tune_info): Set slow_unaligned_access to false.
(riscv_cpu_info_table): Add entry for optimize_size_tune_info.
(riscv_valid_lo_sum_p): Use TARGET_STRICT_ALIGN.
(riscv_option_override): Set riscv_slow_unaligned_access.
        * doc/invoke.texi: Add -mstrict-align to RISC-V.

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

7 years agoRISC-V: Unify indention in riscv.md
palmer [Fri, 5 May 2017 20:24:38 +0000 (20:24 +0000)] 
RISC-V: Unify indention in riscv.md

This contains only whitespace changes.

gcc/ChangeLog

2017-05-04  Kito Cheng  <kito.cheng@gmail.com>

* config/riscv/riscv.md: Unify indentation.

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

7 years ago[gcc]
meissner [Fri, 5 May 2017 20:21:15 +0000 (20:21 +0000)] 
[gcc]
2017-05-05  Michael Meissner  <meissner@linux.vnet.ibm.com>

PR target/79038
PR target/79202
PR target/79203
* config/rs6000/rs6000.md (u code attribute): Add FIX and
UNSIGNED_FIX.
(extendsi<mode>2): Add support for doing sign extension via
VUPKHSW and XXPERMDI if the value is in Altivec registers and we
don't have ISA 3.0 instructions.
(extendsi<mode>2 splitter): Likewise.
(fix_trunc<mode>si2): If we are at ISA 2.07 (VSX small integer),
generate the normal insns since SImode can now go in vector
registers.  Disallow the special UNSPECs needed for previous
machines to hide SImode being used.  Add new insns
fctiw{,w}_<mode>_smallint if SImode can go in vector registers.
(fix_trunc<mode>si2_stfiwx): Likewise.
(fix_trunc<mode>si2_internal): Likewise.
(fixuns_trunc<mode>si2): Likewise.
(fixuns_trunc<mode>si2_stfiwx): Likewise.
(fctiw<u>z_<mode>_smallint): Likewise.
(fctiw<u>z_<mode>_mem): New combiner pattern to prevent conversion
of floating point to 32-bit integer from doing a direct move to
the GPR registers to do a store.
(fctiwz_<mode>): Break long line.

[gcc/testsuite]
2017-05-05  Michael Meissner  <meissner@linux.vnet.ibm.com>

PR target/79038
PR target/79202
PR target/79203
* gcc.target/powerpc/ppc-round3.c: New test.
* gcc.target/powerpc/ppc-round2.c: Update expected code.

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

7 years ago * cp-tree.h (IDENTIFIER_GLOBAL_VALUE): Use get_namespace_value.
nathan [Fri, 5 May 2017 20:04:45 +0000 (20:04 +0000)] 
* cp-tree.h (IDENTIFIER_GLOBAL_VALUE): Use get_namespace_value.
(SET_IDENTIFIER_GLOBAL_VALUE): Use set_global_value.
(IDENTIFIER_NAMESPACE_VALUE): Delete.
* name-lookup.h (namespace_binding, set_namespace_binding):
Replace
with ...
(get_namespace_value, set_global_value): ... these.
(get_global_value_if_present, is_typename_at_global_scope):
Delete.
* decl.c (poplevel): Use get_namespace_value.
(grokdeclarator): Use IDENTIFIER_GLOBAL_VALUE.
* class.c (build_vtbl_initializer): Stash library decl in
static var. Use IDENTIFIER_GLOBAL_VALUE.
* except.c (do_get_exception_ptr, do_begin_catch, do_end_catch)
do_allocate_exception, do_free_exception, build_throw): Likewise.
* init.c (throw_bad_array_new_length): Likewise.
* rtti.c (throw_bad_cast, throw_bad_typeid): Likewise.
* name-lookup.c (arg_assoc_namespace, pushdecl_maybe_friend_1)
check_for_our_of_scope_variable, push_overloaded_decl_1): Use
get_namespace_value.
(set_namespace_binding_1): Rename to
(set_namespace_binding): ... here.
(set_global_value): New.
(lookup_name_innermost_nonclass_level_1, push_namespace): Use
get_namespace_value.
* pt.c (listify): Use get_namespace_value.
((--This line, and those below, will be ignored--

M    cp/name-lookup.c
M    cp/name-lookup.h
M    cp/ChangeLog
M    cp/except.c
M    cp/class.c
M    cp/pt.c
M    cp/init.c
M    cp/cp-tree.h
M    cp/decl.c
M    cp/rtti.c

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

7 years ago * Makefile.in (GTFILES): Add tree-ssa-loop-ivopts.c.
amker [Fri, 5 May 2017 18:34:45 +0000 (18:34 +0000)] 
* Makefile.in (GTFILES): Add tree-ssa-loop-ivopts.c.
* tree-ssa-loop-ivopts.c (compute_max_addr_offset): Delete.
(addr_list, addr_offset_valid_p): New.
(split_address_groups): Check offset validity with above function.
(gt-tree-ssa-loop-ivopts.h): Include header file.

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

7 years agogcc/ChangeLog:
msebor [Fri, 5 May 2017 18:03:26 +0000 (18:03 +0000)] 
gcc/ChangeLog:
* builtins.c (check_sizes, check_strncat_sizes): Fix typos
introduced during merge conflict resolution.
(expand_builtin_strncat): Same.

gcc/testsuite/ChangeLog:
* gcc.dg/pr78138.c: Adjust text of expected diagnostics.
* gcc.dg/pr79214.c: Same.
* gcc.dg/pr79222.c: Same.
* gcc.dg/pr79223.c: Same.
* gcc.dg/tree-ssa/builtins-folding-gimple-ub.c: Expect warnings.

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

7 years ago * config.gcc (arm*-*-*): Add missing 'fi'.
nathan [Fri, 5 May 2017 17:31:57 +0000 (17:31 +0000)] 
* config.gcc (arm*-*-*): Add missing 'fi'.

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

7 years ago2017-05-05 Steve Ellcey <sellcey@cavium.com>
sje [Fri, 5 May 2017 17:00:46 +0000 (17:00 +0000)] 
2017-05-05  Steve Ellcey  <sellcey@cavium.com>

* doc/invoke.texi (-fopt-info): Explicitly say order of options
included in -fopt-info does not matter.
* doc/optinfo.texi (-fopt-info): Fix description of default
behavour. Explicitly say order of options included in -fopt-info
does not matter.

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

7 years ago[ARM] Allow combination of aprofile and rmprofile multilibs
thopre01 [Fri, 5 May 2017 16:50:40 +0000 (16:50 +0000)] 
[ARM] Allow combination of aprofile and rmprofile multilibs

2017-05-05  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    * config.gcc: Allow combinations of aprofile and rmprofile values for
    --with-multilib-list.
    * config/arm/t-multilib: New file.
    * config/arm/t-aprofile: Remove initialization of MULTILIB_*
    variables.  Remove setting of ISA and floating-point ABI in
    MULTILIB_OPTIONS and MULTILIB_DIRNAMES.  Set architecture and FPU in
    MULTI_ARCH_OPTS_A and MULTI_ARCH_DIRS_A rather than MULTILIB_OPTIONS
    and MULTILIB_DIRNAMES respectively.  Add comment to introduce all
    matches.  Add architecture matches for marvel-pj4 and generic-armv7-a
    CPU options.
    * config/arm/t-rmprofile: Likewise except for the matches changes.
    * doc/install.texi (--with-multilib-list): Document the combination of
    aprofile and rmprofile values and warn about pitfalls in doing that.

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

7 years ago * call.c (make_temporary_var_for_ref_to_temp): Push decl into
nathan [Fri, 5 May 2017 16:50:14 +0000 (16:50 +0000)] 
* call.c (make_temporary_var_for_ref_to_temp): Push decl into
current scope.
* lex.c (unqualified_name_lookup_error): Likewise.

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

7 years ago * class.c (alter_class): Use retrofit_lang_decl directly.
nathan [Fri, 5 May 2017 16:47:39 +0000 (16:47 +0000)] 
* class.c (alter_class): Use retrofit_lang_decl directly.
* decl.c (push_local_name, dupliate_decls): Likewise.
* semantics.c (omp_privatize_field): Likewise.

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

7 years agoFloat to int moves currently generate inefficient code due to
wilco [Fri, 5 May 2017 16:18:17 +0000 (16:18 +0000)] 
Float to int moves currently generate inefficient code due to
hacks used in the movsi and movdi patterns.  The 'r = w' variant
uses '*' which tells the register allocator to ignore it.
As a result the float to int moves typically spill to the stack,
which is extremely inefficient.

    gcc/
* config/aarch64/aarch64.md (movsi_aarch64): Remove '*' from r=w.
(movdi_aarch64): Likewise.

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

7 years ago PR tree-optimization/80632
jakub [Fri, 5 May 2017 16:02:44 +0000 (16:02 +0000)] 
PR tree-optimization/80632
* tree-switch-conversion.c (struct switch_conv_info): Add target_vop
field.
(build_arrays): Initialize it for virtual phis.
(fix_phi_nodes): Use it for virtual phis.

* gcc.dg/pr80632.c: New test.

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

7 years ago PR tree-optimization/80558
jakub [Fri, 5 May 2017 15:43:22 +0000 (15:43 +0000)] 
PR tree-optimization/80558
* tree-vrp.c (extract_range_from_binary_expr_1): Optimize
[x, y] op z into [x op, y op z] for op & or | if conditions
are met.

* gcc.dg/tree-ssa/vrp115.c: New test.

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

7 years ago[ARM] PR71607: Fix ICE when loading constant
thopre01 [Fri, 5 May 2017 15:41:28 +0000 (15:41 +0000)] 
[ARM] PR71607: Fix ICE when loading constant

2017-05-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
            Prakhar Bahuguna  <prakhar.bahuguna@arm.com>

    gcc/
    PR target/71607
    * config/arm/arm.md (use_literal_pool): Remove.
    (64-bit immediate split): No longer takes cost into consideration
    if arm_disable_literal_pool is enabled.
    * config/arm/arm.c (arm_tls_referenced_p): Add diagnostic if TLS is
    used when arm_disable_literal_pool is enabled.
    (arm_max_const_double_inline_cost): Remove use of
    arm_disable_literal_pool.
    (push_minipool_fix): Add assert.
    (arm_reorg): Add return if arm_disable_literal_pool is enabled.
    * config/arm/vfp.md (no_literal_pool_df_immediate): New.
    (no_literal_pool_sf_immediate): New.

2017-05-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
        Thomas Preud'homme  <thomas.preudhomme@arm.com>
        Prakhar Bahuguna  <prakhar.bahuguna@arm.com>

    gcc/testsuite/
    PR target/71607
    * gcc.target/arm/thumb2-slow-flash-data.c: Renamed to ...
    * gcc.target/arm/thumb2-slow-flash-data-1.c: ... this.
    * gcc.target/arm/thumb2-slow-flash-data-2.c: New.
    * gcc.target/arm/thumb2-slow-flash-data-3.c: New.
    * gcc.target/arm/thumb2-slow-flash-data-4.c: New.
    * gcc.target/arm/thumb2-slow-flash-data-5.c: New.
    * gcc.target/arm/tls-disable-literal-pool.c: New.

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

7 years ago Kill walk_namespaces.
nathan [Fri, 5 May 2017 15:06:13 +0000 (15:06 +0000)] 
Kill walk_namespaces.
* cp-tree.h (walk_namespaces_fn, walk_namespaces): Delete.
* decl.c (walk_namespaces_r, walk_namespaces): Delete.

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

7 years ago2017-05-05 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
prathamesh3492 [Fri, 5 May 2017 13:21:28 +0000 (13:21 +0000)] 
2017-05-05  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

PR tree-optimization/80613
* tree-ssa-dce.c (propagate_necessity): Remove cases for
BUILT_IN_STRDUP and BUILT_IN_STRNDUP.

testsuite/
* gcc.dg/tree-ssa/pr79697.c (k): Remove.

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

7 years ago2017-05-05 Richard Biener <rguenther@suse.de>
rguenth [Fri, 5 May 2017 12:51:36 +0000 (12:51 +0000)] 
2017-05-05  Richard Biener  <rguenther@suse.de>

* tree-ssa-pre.c (get_or_alloc_expr_for): Simplify.

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

7 years ago Kill per-namespace static_decls.
nathan [Fri, 5 May 2017 11:30:49 +0000 (11:30 +0000)] 
Kill per-namespace static_decls.
* cp-tree.h (static_decls): Declare.
(wrapup_globals_for_namespace)
diagnose_inline_vars_for_namespace): Replace with ...
(wrapup_namespace_globals): ... this.
* decl.c (static_decls): Define.
(wrapup_globals_for_namespace)
diagnose_inline_vars_for_namespace): Replace with ...
(wrapup_namespace_globals): ... this.
(cxx_init_decl_processing): Initialize static_decls.
* decl2.c (c_parse_final_cleanups): Adjust.
* name-lookup.h (cp_binding_level): Remove static_decls member.
* name-lookup.c (add_decl_to_level): Adjust.
(begin_scope): Adjust.
((--This line, and those below, will be ignored--

M    cp/cp-tree.h
M    cp/name-lookup.c
M    cp/name-lookup.h
M    cp/ChangeLog
M    cp/decl2.c
M    cp/decl.c

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

7 years ago * config/avr/avr.md [flag_strict_overflow]: Remove any occurence
gjl [Fri, 5 May 2017 10:35:55 +0000 (10:35 +0000)] 
* config/avr/avr.md [flag_strict_overflow]: Remove any occurence
of this flag from insn conditions due to removal from r247495.

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

7 years agoCode scheduling for Cortex-A53 isn't as good as it could be. It turns out
wilco [Fri, 5 May 2017 09:40:01 +0000 (09:40 +0000)] 
Code scheduling for Cortex-A53 isn't as good as it could be.  It turns out
code runs faster overall if we place loads and stores with a dependency
closer together.  To achieve this effect, this patch adds a bypass between
cortex_a53_load1 and cortex_a53_load*/cortex_a53_store* if the result of an
earlier load is used in an address calculation.  This significantly improved
benchmark scores in a proprietary benchmark suite.

    gcc/
* config/arm/aarch-common.c (arm_early_load_addr_dep_ptr):
New function.
(arm_early_store_addr_dep_ptr): Likewise.
* config/arm/aarch-common-protos.h
(arm_early_load_addr_dep_ptr): Add prototype.
(arm_early_store_addr_dep_ptr): Likewise.
* config/arm/cortex-a53.md: Add new bypasses.

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

7 years ago/cp
paolo [Fri, 5 May 2017 09:02:22 +0000 (09:02 +0000)] 
/cp
2017-05-05  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/71577
* decl.c (reshape_init): Unconditionally return error_mark_node
upon error about too many initializers.

/testsuite
2017-05-05  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/71577
* g++.dg/cpp0x/pr71577.C: New.

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

7 years ago * tree.c (next_type_uid): Change type to unsigned.
jakub [Fri, 5 May 2017 07:35:13 +0000 (07:35 +0000)] 
* tree.c (next_type_uid): Change type to unsigned.
(type_hash_canon): Decrement back next_type_uid if
freeing a type node with the highest TYPE_UID.  For INTEGER_TYPEs
also ggc_free TYPE_MIN_VALUE, TYPE_MAX_VALUE and TYPE_CACHED_VALUES
if possible.

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

7 years agoDaily bump.
gccadmin [Fri, 5 May 2017 00:16:23 +0000 (00:16 +0000)] 
Daily bump.

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

7 years agogcc/ChangeLog:
msebor [Thu, 4 May 2017 23:54:22 +0000 (23:54 +0000)] 
gcc/ChangeLog:
* builtins.c: Fix a trivial typo in a comment.

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

7 years agoPR libstdc++/54924 - Warn for std::string constructor with wrong size
msebor [Thu, 4 May 2017 23:50:21 +0000 (23:50 +0000)] 
PR libstdc++/54924 - Warn for std::string constructor with wrong size
PR middle-end/79234 - warn on past the end reads by library functions

gcc/ChangeLog:

PR middle-end/79234
* builtins.c (check_sizes): Adjust to handle reading past the end.
Avoid printing excessive upper bound of ranges.  Use %E to print
tree nodes instead of converting them to %wu.
(expand_builtin_memchr): New function.
(compute_dest_size): Rename...
(compute_objsize): ...to this.
(expand_builtin_memcpy): Adjust.
(expand_builtin_mempcpy): Adjust.
(expand_builtin_strcat): Adjust.
(expand_builtin_strcpy): Adjust.
(check_strncat_sizes): Adjust.
(expand_builtin_strncat): Adjust.
(expand_builtin_strncpy): Adjust and simplify.
(expand_builtin_memset): Adjust.
(expand_builtin_bzero): Adjust.
(expand_builtin_memcmp): Adjust.
(expand_builtin): Handle memcmp.
(maybe_emit_chk_warning): Check strncat just once.

gcc/testsuite/ChangeLog:

PR middle-end/79234
* gcc.dg/builtin-stringop-chk-8.c: New test.
* gcc.dg/builtin-stringop-chk-1.c: Adjust.
* gcc.dg/builtin-stringop-chk-4.c: Same.
* gcc.dg/builtin-strncat-chk-1.c: Same.
* g++.dg/ext/strncpy-chk1.C: Same.
* g++.dg/torture/Wsizeof-pointer-memaccess1.C: Same.
* gcc.dg/out-of-bounds-1.c: Same.
* gcc.dg/pr78138.c: Same.
* gcc.dg/torture/Wsizeof-pointer-memaccess1.c: Same.
* gfortran.dg/mvbits_7.f90: Same.

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

7 years agoFix a typo.
msebor [Thu, 4 May 2017 21:04:04 +0000 (21:04 +0000)] 
Fix a typo.

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

7 years agoPR preprocessor/79214 - -Wno-system-header defeats strncat buffer overflow warnings
msebor [Thu, 4 May 2017 20:54:43 +0000 (20:54 +0000)] 
PR preprocessor/79214 -  -Wno-system-header defeats strncat buffer overflow warnings
PR middle-end/79222 - missing -Wstringop-overflow= on a stpcpy overflow
PR middle-end/79223 - missing -Wstringop-overflow on a memmove overflow

gcc/ChangeLog:

PR preprocessor/79214
PR middle-end/79222
PR middle-end/79223
* builtins.c (check_sizes): Add inlinining context and issue
warnings even when -Wno-system-headers is set.
(check_strncat_sizes): Same.
(expand_builtin_strncat): Same.
(expand_builtin_memmove): New function.
(expand_builtin_stpncpy): Same.
(expand_builtin): Handle memmove and stpncpy.

gcc/testsuite/ChangeLog:

PR preprocessor/79214
PR middle-end/79222
PR middle-end/79223
* gcc.dg/pr79214.c: New test.
* gcc.dg/pr79214.h: New test header.
* gcc.dg/pr79222.c: New test.
* gcc.dg/pr79223.c: New test.
* gcc.dg/pr78138.c: Adjust.
* gfortran.dg/unconstrained_commons.f: Same.

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

7 years ago * constraint.cc (diagnose_check_constraint): Fix %E thinko.
nathan [Thu, 4 May 2017 18:37:53 +0000 (18:37 +0000)] 
* constraint.cc (diagnose_check_constraint): Fix %E thinko.

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

7 years ago * tree-ssa-loop-ivopts.c (struct cost_pair): Remove field inv_expr
amker [Thu, 4 May 2017 18:01:10 +0000 (18:01 +0000)] 
* tree-ssa-loop-ivopts.c (struct cost_pair): Remove field inv_expr
which is not used any more.

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

7 years agoMany supported cores use the AUTOPREFETCHER_WEAK setting which tries
wilco [Thu, 4 May 2017 17:52:03 +0000 (17:52 +0000)] 
Many supported cores use the AUTOPREFETCHER_WEAK setting which tries
to order loads and stores to improve streaming performance.  Since significant
gains were reported in http://patchwork.ozlabs.org/patch/534469/ it seems
like a good idea to enable this setting too for -mcpu=generic.  Since the
weak model only keeps the order if it doesn't make the schedule worse, it
should not impact performance adversely on cores that don't show a gain.

    gcc/
        * config/aarch64/aarch64.c (generic_tunings): Update prefetch model.

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

7 years agoSet jump alignment to 4 for Cortex cores as it reduces codesize by 0.4% on
wilco [Thu, 4 May 2017 17:49:19 +0000 (17:49 +0000)] 
Set jump alignment to 4 for Cortex cores as it reduces codesize by 0.4% on
average with no obvious performance difference.  See original discussion of
the overheads of various alignments:
https://gcc.gnu.org/ml/gcc-patches/2016-06/msg02075.html.

    gcc/
* config/aarch64/aarch64.c (cortexa35_tunings): Set jump alignment to 4.
(cortexa53_tunings): Likewise.
(cortexa57_tunings): Likewise.
(cortexa72_tunings): Likewise.
(cortexa73_tunings): Likewise.

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

7 years agoWith -mcpu=generic the loop alignment is currently 4. All but one of the
wilco [Thu, 4 May 2017 17:43:43 +0000 (17:43 +0000)] 
With -mcpu=generic the loop alignment is currently 4.  All but one of the
supported cores use 8 or higher.  Since using 8 provides performance gains
on several cores, it is best to use that by default.  As discussed in [1],
the jump alignment has no effect on performance, yet has a relatively high
codesize cost [2], so setting it to 4 is best.  This gives a 0.2% overall
codesize improvement as well as performance gains in several benchmarks.

    gcc/
* config/aarch64/aarch64.c (generic_tunings): Set jump alignment to 4.
Set loop alignment to 8.

[1] https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00574.html
[2] https://gcc.gnu.org/ml/gcc-patches/2016-06/msg02075.html

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

7 years agoPR translation/80280 - Missing closing quote (%>) c/semantics.c and c/c-typeck.c
msebor [Thu, 4 May 2017 17:40:05 +0000 (17:40 +0000)] 
PR translation/80280 - Missing closing quote (%>) c/semantics.c and c/c-typeck.c

gcc/c-family/ChangeLog:

PR translation/80280
* c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
(handle_weakref_attribute): Same.

PR translation/80280 - Missing closing quote (%>) c/semantics.c and c/c-typeck.c

gcc/ChangeLog:

PR translation/80280
* config/i386/i386.c (ix86_function_versions): Quote a %D directive.

PR translation/80280 - Missing closing quote (%>) c/semantics.c and c/c-typeck.c

gcc/cp/ChangeLog:

PR translation/80280
* call.c (print_z_candidate): Add missing quoting to %D and other
like directives.
(build_op_call_1): Same.
* constraint.cc (diagnose_check_constraint): Same.
* mangle.c (mangle_decl): Same.
* name-lookup.c (cp_binding_level_debug): Same.
(set_decl_namespace): Same.
* parser.c (cp_parser_tx_qualifier_opt): Same.
* pt.c (print_candidates_1): Same.
(check_template_variable): Same.
(tsubst_default_argument): Same.
(most_specialized_partial_spec): Same.
* semantics.c (omp_reduction_lookup): Same.
* tree.c (check_abi_tag_redeclaration): Same.
* typeck.c (comptypes): Same.
* typeck2.c (abstract_virtuals_error_sfinae): Same.

PR translation/80280 - Missing closing quote (%>) c/semantics.c and c/c-typeck.c

gcc/ChangeLog:

PR translation/80280
* builtins.c (expand_builtin_object_size): Add missing quoting to
%D and like directives.
* hsa-gen.c (hsa_type_for_scalar_tree_type): Same.
(hsa_type_for_tree_type): Same.
(verify_function_arguments): Same.
* symtab.c (symbol_table::change_decl_assembler_name): Same.
* varasm.c (get_section): Same.
(mark_weak): Same.

PR translation/80280 - Missing closing quote (%>) c/semantics.c and c/c-typeck.c

gcc/objc/ChangeLog:

PR translation/80280
* objc-gnu-runtime-abi-01.c (objc_eh_runtime_type): Add missing
quoting to directives.
* objc-next-runtime-abi-01.c (objc_eh_runtime_type): Ditto.
* objc-next-runtime-abi-02.c (next_runtime_02_eh_type): Ditto.

PR translation/80280 - Missing closing quote (%>) c/semantics.c and c/c-typeck.c

gcc/testsuite/ChangeLog:

PR translation/80280
* g++.dg/abi/Wabi-2-3.C: Adjust.
* g++.dg/abi/Wabi-3-2.C: Ditto.
* g++.dg/lookup/using17.C: Ditto.
* gcc.dg/format/gcc_diag-1.c (foo): Ditto.

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

7 years agoAll cores which add a cpu_addrcost_table use a non-zero value for
wilco [Thu, 4 May 2017 17:05:28 +0000 (17:05 +0000)] 
All cores which add a cpu_addrcost_table use a non-zero value for
HI and TI mode shifts (a non-zero value for general indexing also
applies to all shifts).  Given this, it makes no sense to use a
different setting in generic_addrcost_table.  So change it so that
all supported cores, including -mcpu=generic, now generate the same:

int f(short *p, short *q, long x) { return p[x] + q[x]; }

        lsl     x2, x2, 1
        ldrsh   w3, [x0, x2]
        ldrsh   w0, [x1, x2]
        add     w0, w3, w0
        ret

    gcc/
* config/aarch64/aarch64.c (generic_addrcost_table):
Change HI/TI mode setting.

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

7 years ago[PR 80622] Treat const pools as initialized in SRA
jamborm [Thu, 4 May 2017 16:19:20 +0000 (16:19 +0000)] 
[PR 80622] Treat const pools as initialized in SRA

2017-05-04  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/80622
* tree-sra.c (comes_initialized_p): New function.
(build_accesses_from_assign): Only set write lazily when
comes_initialized_p is false.
(analyze_access_subtree): Use comes_initialized_p.
(propagate_subaccesses_across_link): Assert !comes_initialized_p
instead of testing for PARM_DECL.

testsuite/
* gcc.dg/tree-ssa/pr80622.c: New test.

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

7 years ago[AArch64] Accept more addressing modes for PRFM
ktkachov [Thu, 4 May 2017 16:14:37 +0000 (16:14 +0000)] 
[AArch64] Accept more addressing modes for PRFM

* config/aarch64/aarch64.md (prefetch); Adjust predicate and
constraint on operand 0 to allow more general addressing modes.
Adjust output template.
* config/aarch64/aarch64.c (aarch64_address_valid_for_prefetch_p):
New function.
* config/aarch64/aarch64-protos.h
(aarch64_address_valid_for_prefetch_p): Declare prototype.
* config/aarch64/constraints.md (Dp): New address constraint.
* config/aarch64/predicates.md (aarch64_prefetch_operand): New
predicate.

* gcc.target/aarch64/prfm_imm_offset_1.c: New test.

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

7 years agoUpdate .po files.
jsm28 [Thu, 4 May 2017 15:54:08 +0000 (15:54 +0000)] 
Update .po files.

* be.po, da.po, el.po, fi.po, hr.po, id.po, ja.po, nl.po, ru.po,
sr.po, sv.po, tr.po, uk.po, vi.po, zh_CN.po, zh_TW.po: Update.

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

7 years ago More global trees.
nathan [Thu, 4 May 2017 15:39:05 +0000 (15:39 +0000)] 
More global trees.
* cp-tree.h (enum cp_tree_index): Add CPTI_GLOBAL,
CPTI_GLOBAL_TYPE, CPTI_GLOBAL_IDENTIFIER, CPTI_ANON_IDENTIFIER,
CPTI_INIT_LIST_IDENTIFIER.
(global_namespace, global_type_node, global_identifier)
anon_identifier, init_list_identifier): New.
* decl.c (global_type_node, global_scope_name): Delete.
(initialize_predefined_identifiers): Add new identifiers.
(cxx_init_decl_processing): Adjust.
* name-lookup.h (global_namespace, global_type_node): Delete.
* name-lookup.c (global_namespace, anonymous_namespace_name)
get_anonymous_namespace_name): Delete.
(namespace_scope_ht_size, begin_scope, pushtag_1)
push_namespace): Adjust,
* call.c (type_has_extended_temps): Use init_list_identifier.
* pt.c (listify): Likewise.
(((--This line, and those below, will be ignored--

M    cp/name-lookup.c
M    cp/name-lookup.h
M    cp/ChangeLog
M    cp/call.c
M    cp/pt.c
M    cp/cp-tree.h
M    cp/decl.c

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

7 years ago * ipa-cp.c (perform_estimation_of_a_value): Drop base_time parameter;
hubicka [Thu, 4 May 2017 13:57:35 +0000 (13:57 +0000)] 
* ipa-cp.c (perform_estimation_of_a_value): Drop base_time parameter;
update use of estimate_ipcp_clone_size_and_time.
(estimate_local_effects): Update use of
estimate_ipcp_clone_size_and_time and perform_estimation_of_a_value.
* ipa-inline.h (estimate_ipcp_clone_size_and_time): Update prototype.
* ipa-inline-analysis.c (estimate_ipcp_clone_size_and_time):
Return nonspecialized time.

* gcc.dg/ipa/ipcp-2.c: Decrease ipcp threshold
* gcc.dg/tree-ssa/ipa-cp-1.c: Likewise.

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

7 years ago2017-05-04 Richard Biener <rguenther@suse.de>
rguenth [Thu, 4 May 2017 13:29:08 +0000 (13:29 +0000)] 
2017-05-04  Richard Biener  <rguenther@suse.de>

* tree-ssa-alias.c (get_continuation_for_phi): Improve looking
for the last VUSE which def dominates the PHI.  Directly call
maybe_skip_until.
(get_continuation_for_phi_1): Remove.

* gcc.dg/tree-ssa/ssa-fre-58.c: New testcase.

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

7 years ago * name-lookup.c: Reorder functions to make merging from modules
nathan [Thu, 4 May 2017 12:35:05 +0000 (12:35 +0000)] 
* name-lookup.c: Reorder functions to make merging from modules
branch simpler.

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

7 years agoCap niter_for_unrolled_loop to upper bound
rsandifo [Thu, 4 May 2017 11:37:05 +0000 (11:37 +0000)] 
Cap niter_for_unrolled_loop to upper bound

For the reasons explained in PR77536, niter_for_unrolled_loop assumes 5
iterations in the absence of profiling information, although it doesn't
increase beyond the estimate for the original loop.  This left a hole in
which the new estimate could be less than the old one but still greater
than the limit imposed by CEIL (nb_iterations_upper_bound, unroll factor).

2017-05-04  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* tree-ssa-loop-manip.c (niter_for_unrolled_loop): Add commentary
to explain the use of truncating division.  Cap the number of
iterations to the maximum given by nb_iterations_upper_bound,
if defined.

gcc/testsuite/
* gcc.dg/vect/vect-profile-1.c: New test.

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

7 years agoFix previous commit
rsandifo [Thu, 4 May 2017 11:03:54 +0000 (11:03 +0000)] 
Fix previous commit

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

7 years ago2017-05-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
jyong [Thu, 4 May 2017 11:02:08 +0000 (11:02 +0000)] 
2017-05-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* configure.ac (--enable-mingw-wildcard): Add new configurable feature.
* configure: Regenerate.
* config.in: Regenerate.
* config/i386/driver-mingw32.c: new file.
* config/i386/x-mingw32: Add rule to build driver-mingw32.o.
* config.host: Link driver-mingw32.o on MinGW host.
* doc/install.texi: Document new --enable-mingw-wildcard configure
option.

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

7 years agoRemove bogus top-level ChangeLog commit (sorry!)
rsandifo [Thu, 4 May 2017 11:00:48 +0000 (11:00 +0000)] 
Remove bogus top-level ChangeLog commit (sorry!)

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

7 years ago PR tree-optimization/80612
mpolacek [Thu, 4 May 2017 10:35:58 +0000 (10:35 +0000)] 
PR tree-optimization/80612
* calls.c (get_size_range): Check for INTEGRAL_TYPE_P.

* gcc.dg/torture/pr80612.c: New test.

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

7 years ago[ARM] Enable Purecode for ARMv8-M Baseline
thopre01 [Thu, 4 May 2017 10:26:25 +0000 (10:26 +0000)] 
[ARM] Enable Purecode for ARMv8-M Baseline

This patch adds support for purecode to ARMv8-M Baseline, in addition to
the existing support for ARMv7-M and ARMv8-M Mainline.

2017-05-04  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
            Andre Simoes Dias Vieira  <andre.simoesdiasvieira@arm.com>

    gcc/
    * config/arm/arm.md (movsi): Change TARGET_32BIT to TARGET_HAVE_MOVT.
    (movt splitter): Likewise.
    * config/arm/arm.c (arm_option_check_internal): Change arm_arch_thumb2
    to TARGET_HAVE_MOVT, and merge with -mslow-flash-data check.
    (const_ok_for_arm): Change else to else if (TARGET_THUMB2) and add else
    block for Thumb-1 with MOVT.
    (thumb2_legitimate_address_p): Move code block ...
    (can_avoid_literal_pool_for_label_p): ... into this new function.
    (thumb1_legitimate_address_p): Add check for TARGET_HAVE_MOVT and
    literal pool.
    (thumb_legitimate_constant_p): Add conditional on TARGET_HAVE_MOVT
    * doc/invoke.texi (-mpure-code): Change "ARMv7-M targets" for
    "M-profile targets with the MOVT instruction".

    gcc/testsuite/
    * gcc.target/arm/pure-code/pure-code.exp: Add conditional for
    check_effective_target_arm_thumb1_movt_ok.

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

7 years ago[ARM] Rename FPSCR builtins to correct names
thopre01 [Thu, 4 May 2017 10:16:04 +0000 (10:16 +0000)] 
[ARM] Rename FPSCR builtins to correct names

The GCC documentation in section 6.60.8 ARM Floating Point Status and
Control Intrinsics states that the FPSCR register can be read and
written to using the intrinsics __builtin_arm_get_fpscr and
__builtin_arm_set_fpscr. However, these are misnamed within GCC itself
and these intrinsic names are not recognised.

This patch corrects the intrinsic names to match the documentation, and
adds tests to verify these intrinsics generate the correct
instructions.

2017-05-04  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>

    gcc/
    * gcc/config/arm/arm-builtins.c (arm_init_builtins): Rename
    __builtin_arm_ldfscr to __builtin_arm_get_fpscr, and rename
    __builtin_arm_stfscr to __builtin_arm_set_fpscr.

    gcc/testsuite/
    * gcc.target/arm/fpscr.c: New file.

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

7 years agoRemove an unused variable.
marxin [Thu, 4 May 2017 10:06:54 +0000 (10:06 +0000)] 
Remove an unused variable.

2017-05-04  Martin Liska  <mliska@suse.cz>

* tree-vrp.c (simplify_cond_using_ranges_2): Remove unused
variable cond_code.

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

7 years agoRequire c99_runtime for pr78622.c
thopre01 [Thu, 4 May 2017 09:36:29 +0000 (09:36 +0000)] 
Require c99_runtime for pr78622.c

2017-05-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>

gcc/testsuite/
    * gcc.c-torture/execute/pr78622.c: Require c99_runtime effective
    target.

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

7 years ago2017-05-04 Richard Biener <rguenther@suse.de>
rguenth [Thu, 4 May 2017 09:08:01 +0000 (09:08 +0000)] 
2017-05-04  Richard Biener  <rguenther@suse.de>

* tree.c (array_at_struct_end_p): Handle arrays at struct
end with flexarrays more conservatively.  Refactor and treat
arrays of arrays or aggregates more strict.  Fix
VIEW_CONVERT_EXPR handling.  Remove allow_compref argument.
* tree.c (array_at_struct_end_p): Adjust prototype.
* emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust.
* gimple-fold.c (get_range_strlen): Likewise.
* tree-chkp.c (chkp_may_narrow_to_field): Likewise.

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

7 years agoReplace absolute line numbers in g++.dg/warn
vries [Thu, 4 May 2017 07:55:11 +0000 (07:55 +0000)] 
Replace absolute line numbers in g++.dg/warn

2017-05-04  Tom de Vries  <tom@codesourcery.com>

PR testsuite/80557
* g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C: Replace absolute
line numbers.
* g++.dg/warn/miss-format-1.C: Same.
* g++.dg/warn/overflow-warn-1.C: Same.
* g++.dg/warn/overflow-warn-3.C: Same.
* g++.dg/warn/overflow-warn-4.C: Same.

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