platform/upstream/linaro-gcc.git
8 years agorevert to assign_parms assignments using default defs
aoliva [Sun, 27 Sep 2015 09:02:00 +0000 (09:02 +0000)]
revert to assign_parms assignments using default defs

Revert the fragile and complicated changes to assign_parms designed to
enable it to use RTL assigments chosen by cfgexpand, and instead have
cfgexpand use the RTL assignments by assign_parms, keying them off of
the default defs that are now necessarily introduced for each parm and
result.  The possible lack of a default def was already a problem, and
the fallbacks in place were not enough, as shown by PR67312.  We now
have checking asserts in set_rtl that verify that we're assigning to
each var a piece of RTL that matches the expectations set forth by
use_register_for_decl.

for  gcc/ChangeLog

PR rtl-optimization/64164
PR tree-optimization/67312
PR middle-end/67340
PR middle-end/67490
PR bootstrap/67597
* cfgexpand.c (parm_in_stack_slot_p): Remove.
(ssa_default_def_partition): Remove.
(get_rtl_for_parm_ssa_default_def): Remove.
(set_rtl): Check that RTL assignments match expectations.
Loop on SUBREGs, CONCATs and PARALLELs subexprs.  Set only the
default def location for params and results.  Record SSA names
or types in REG and MEM attrs, respectively.
(set_parm_rtl): New.
(expand_one_ssa_partition): Drop logic that assigned MEMs with
unassigned addresses.
(adjust_one_expanded_partition_var): Don't accept NULL RTL on
deferred stack alloc vars.
(expand_used_vars): Skip partitions holding parm default defs.
Move adjust_one_expanded_partition_var loop...
(pass_expand::execute): ... here.  Drop redundant assert.
Adjust comments before the final loop over all ssa names.
Require assigned rtl of parms and results to match exactly.
Reset its attributes to match them, not any other variables in
the same partition.
(expand_debug_expr): Use entry value for PARM's default defs
only iff they have zero nondebug uses.
* cfgexpand.h (parm_in_stack_slot_p): Remove.
(get_rtl_for_parm_ssa_default_def): Remove.
(set_parm_rtl): Declare.
* doc/invoke.texi: Improve wording.
* explow.c (promote_decl_mode): Fix promote_function_mode for
result decls not by reference.
(promote_ssa_mode): Disregard BLKmode from promote_decl, and
bypass TYPE_MODE to get the actual vector mode.
* function.c: Include tree-dfa.h.  Revert 2015-08-14's and
2015-08-19's changes as follows.  Drop include of
basic-block.h and df.h.
(rtl_for_parm): Remove.
(maybe_reset_rtl_for_parm): Remove.
(parm_in_unassigned_mem_p): Remove.
(use_register_for_decl): Add logic for RESULT_DECLs matching
assign_parms' behavior.
(split_complex_args): Revert.
(assign_parms_augmented_arg_list): Revert.  Add comment
referencing the logic above.
(assign_parm_adjust_stack_rtl): Revert.
(assign_parm_setup_block): Revert.  Use set_parm_rtl instead
of SET_DECL_RTL.  Set up a REG if the parm demands so.
(assign_parm_setup_reg): Revert.  Consolidated SET_DECL_RTL
calls into a single set_parm_rtl.  Set up a temporary RTL
temporarily for expand_assignment.
(assign_parm_setup_stack): Revert.  Use set_parm_rtl.
(assign_parms_unsplit_complex): Revert.  Use set_parm_rtl.
(assign_bounds): Revert.
(assign_parms): Revert.  Use set_parm_rtl.
(allocate_struct_function): Relayout result and parms of
non-abstruct functions.
(expand_function_start): Revert.  Use set_parm_rtl.  If the
result is not a hard reg, create a pseudo from the promoted
mode of the default def.  Promote static chain mode.
* tree-outof-ssa.c (remove_ssa_form): Drop unused
partition_has_default_def.  Set up
partitions_for_parm_default_defs.
(finish_out_of_ssa): Remove partition_has_default_def.
Release partitions_for_parm_default_defs.
* tree-outof-ssa.h (struct ssaexpand): Remove
partition_has_default_def.  Add
partitions_for_parm_default_defs.
* tree-ssa-coalesce.c: Include tree-dfa.h, tm_p.h and
stor-layout.h.
(build_ssa_conflict_graph): Fix conflict-detection of default
defs of even unused default defs of params and results.
(for_all_parms): New.
(create_default_def): New.
(register_default_def): New.
(coalesce_with_default): New.
(create_outofssa_var_map): Create default defs for all parms
and results, and register their partitions.  Add GIMPLE_RETURN
operands as coalesce candidates with results.  Add default
defs of each parm or result as coalesce candidates with its
other defs.  Mark each result def, and each default def of
parms, as used_in_copy.
(gimple_can_coalesce_p): Call it.  Call use_register_for_decl
with the ssa names, even anonymous ones.  Drop
parm_in_stack_slot_p calls.  Require same signedness and
alignment.
(coalesce_ssa_name): Add coalesce candidates for all defs of
each parm and result, even unused ones.
(parm_default_def_partition_arg): New type.
(set_parm_default_def_partition): New.
(get_parm_default_def_partitions): New.
* tree-ssa-coalesce.h (get_parm_default_def_partitions): New.
* tree-ssa-live.c (partition_view_init): Regard unused defs of
parms and results as used.
(verify_live_on_entry): Don't error out just because they're
not live.

for  gcc/testsuite/ChangeLog

PR rtl-optimization/64164
PR tree-optimization/67312
* gcc.dg/pr67312.c: New.  From Zdenek Sojka.
* gcc.target/i386/stackalign/return-4.c: Add -O.

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

8 years ago * g++.dg/debug/dwarf2/pr44641.C: Add one to expected line numbers.
dje [Sun, 27 Sep 2015 01:44:59 +0000 (01:44 +0000)]
    * g++.dg/debug/dwarf2/pr44641.C: Add one to expected line numbers.

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

8 years agoDaily bump.
gccadmin [Sun, 27 Sep 2015 00:16:22 +0000 (00:16 +0000)]
Daily bump.

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

8 years agoFix missing deep copy when assigning a DT constructor to an array
mikael [Sat, 26 Sep 2015 20:34:39 +0000 (20:34 +0000)]
Fix missing deep copy when assigning a DT constructor to an array

This adds the missing deep copy when assiging a constructor of a derived
type with allocatable components to an array.

The check for consantness is removed so that the deep_copy argument passed
to gfc_trans_scalar_assign is set to true.

PR fortran/67721
gcc/fortran/
* trans-expr.c (gfc_trans_assignment_1): Remove the non-constantness
condition guarding deep copy.
gcc/testsuite/
* gfortran.dg/alloc_comp_deep_copy_3.f03: New.

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

8 years ago2013-09-26 Paul Thomas <pault@gcc.gnu.org>
pault [Sat, 26 Sep 2015 17:52:24 +0000 (17:52 +0000)]
2013-09-26  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/67567
* resolve.c (resolve_fl_procedure): For module procedures, take
the parent module name and the submodule name from the name of
the namespace.

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

8 years ago * gcc.dg/pr64935-1.c: XFAIL on AIX.
dje [Sat, 26 Sep 2015 15:34:58 +0000 (15:34 +0000)]
    * gcc.dg/pr64935-1.c: XFAIL on AIX.
        * gcc.dg/pr64935-2.c: XFAIL on AIX.
        * gcc.dg/debug/dwarf2/dwarf2-macro2.c: XFAIL Start new file on AIX.
        * gcc.dg/debug/dwarf2/dwarf2-macro2.c: XFAIL At line number on AIX.
        * gcc.dg/debug/dwarf2/global-used-types.c: XFAIL ascii on AIX.
        * gcc.dg/debug/dwarf2/noreturn-function-keyword.c: XFAIL
        DW_AT_noreturn on AIX.
        * gcc.dg/debug/dwarf2/noreturn-function-attribute.c: XFAIL
        DW_AT_noreturn on AIX.
        * gcc.dg/debug/dwarf2/lang-c89.c: XFAIL DW_AT_language on AIX.
        * gcc.dg/debug/dwarf2/stacked-qualified-types-3.c: XFAIL DW_TAG on AIX.
        * g++.dg/debug/dwarf2/deleted-member-function.C: XFAIL
        DW_AT_GNU_deleted on AIX.
        * g++.dg/debug/dwarf2/noreturn-function.C: XFAIL DW_AT_noreturn on AIX.
        * g++.dg/debug/dwarf2/template-params-6.C: XFAIL ascii on AIX.
        * g++.dg/debug/dwarf2/dwarf4-nested.C: XFAIL ascii on AIX.
        * g++.dg/debug/dwarf2/pubnames-2.C: Skip on AIX.
        * g++.dg/debug/dwarf2/pr44641.C: Skip on AIX.
        * g++.dg/debug/dwarf2/pr46527.C: XFAIL on AIX.
        * g++.dg/debug/dwarf2/imported-decl-2.C: XFAIL ascii on AIX.
        * g++.dg/debug/dwarf2/namespace-1.C: XFAIL ascii on AIX.
        * g++.dg/debug/dwarf2/global-used-types-1.C: XFAIL ascii on AIX.
        * g++.dg/debug/dwarf2/lambda1.C: XFAIL ascii on AIX.
        * g++.dg/debug/dwarf2/pubnames-3.C: Skip on AIX.
        * g++.dg/debug/dwarf2/pr61433.C: XFAIL on AIX.
        * g++.dg/debug/dwarf2/nested-4.C: XFAIL on AIX.
        * g++.dg/debug/dwarf2/template-func-params-6.C: XFAIL ascii on AIX.
        * g++.dg/debug/dwarf2/lineno-simple1.C: XFAIL on AIX.

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

8 years ago * dwarf2out.c (XCOFF_DEBUGGING_INFO): Default 0 definition.
dje [Sat, 26 Sep 2015 15:31:35 +0000 (15:31 +0000)]
    * dwarf2out.c (XCOFF_DEBUGGING_INFO): Default 0 definition.
        (HAVE_XCOFF_DWARF_EXTRAS): Default to 0 definition.
        (output_fde): Don't output length for debug_frame on AIX.
        (output_call_frame_info): Don't output length for debug_frame on AIX.
        (have_macinfo): Force to False for XCOFF_DEBUGGING_INFO and not
        HAVE_XCOFF_DWARF_EXTRAS.
        (add_AT_loc_list): Return early if XCOFF_DEBUGGING_INFO and not
        HAVE_XCOFF_DWARF_EXTRAS.
        (output_compilation_unit_header): Don't output length on AIX.
        (output_pubnames): Don't output length on AIX.
        (output_aranges): Delete argument. Compute length locally. Don't
        output length on AIX.
        (output_line_info): Don't output length on AIX.
        (dwarf2out_finish): Don't compute aranges_length.
        * dwarf2asm.c (XCOFF_DEBUGGING_INFO): Default 0 definition.
        (dw2_asm_output_nstring): Emit .byte not .ascii on AIX.
        * config/rs6000/rs6000.c (rs6000_output_dwarf_dtprel): Emit correct
        symbol decoration for AIX.
        (rs6000_xcoff_debug_unwind_info): New.
        (rs6000_xcoff_asm_named_section): Emit .dwsect pseudo-op
        for SECTION_DEBUG.
        (rs6000_xcoff_declare_function_name): Emit different
        .function pseudo-op when DWARF2_DEBUG. Don't call
        xcoffout_declare_function for DWARF2_DEBUG.
        * config/rs6000/xcoff.h (TARGET_DEBUG_UNWIND_INFO):
        Redefine.
        * config/rs6000/aix71.h: New.
        * configure.ac (gcc_cv_as_aix_dwloc): Check AIX as for DWARF
        locations support.
        * configure: Regenerate.
        * config.gcc (powerpc-ibm-aix[789]+): New stanza for AIX 7.1+ with
        DWARF support.

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

8 years ago [PATCH] Fix undefined behaviour in arc port
law [Sat, 26 Sep 2015 07:48:10 +0000 (07:48 +0000)]
[PATCH] Fix undefined behaviour in arc port

* config/arc/arc.c (arc_output_addsi): Fix left shift undefined
behaviour.
* config/arc/constraints.md (Cca, C2a): Fix left shift undefined
behaviour.

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

8 years ago [PATCH] Fix undefined behaviour in SH port
law [Sat, 26 Sep 2015 07:42:32 +0000 (07:42 +0000)]
[PATCH] Fix undefined behaviour in SH port
* config/sh/sh.h (CONST_OK_FOR_J16): Fix left shift undefined
behaviour

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

8 years ago[PATCH] Fix undefined behaviour in mips port
law [Sat, 26 Sep 2015 07:38:29 +0000 (07:38 +0000)]
[PATCH] Fix undefined behaviour in mips port
* config/mips/mips.c (mips_compute_frame_info): Fix left shift
undefined behaviour.

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

8 years ago[PATCH] Fix undefined behaviour in cris port
law [Sat, 26 Sep 2015 07:33:05 +0000 (07:33 +0000)]
[PATCH] Fix undefined behaviour in cris port
* config/cris/cris.md (asrandb): Fix left shift undefined
behaviour.
(asrandw): Likewise.

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

8 years agoDaily bump.
gccadmin [Sat, 26 Sep 2015 00:16:12 +0000 (00:16 +0000)]
Daily bump.

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

8 years ago2015-09-25 Steven G. Kargl <kargl@gcc.gnu.org>
kargl [Fri, 25 Sep 2015 22:30:26 +0000 (22:30 +0000)]
2015-09-25  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/67614
* resolve.c (gfc_resolve_code): Prevent ICE for invalid EXPR_NULL.

2015-09-25  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/67614
* gfortran.dg/pr67614.f90: New test.

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

8 years ago2015-09-25 Steven G. Kargl <kargl@gcc.gnu.org>
kargl [Fri, 25 Sep 2015 22:28:04 +0000 (22:28 +0000)]
2015-09-25  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/67525
* parse.c (match_deferred_characteristics): Remove an assert, which
allows an invalid SELECT TYPE selector to be detected.

2015-09-25  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/67525
* gfortran.dg/pr67525.f90: New test.

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

8 years agoFix type in the changelog entry,
vmakarov [Fri, 25 Sep 2015 21:11:28 +0000 (21:11 +0000)]
Fix type in the changelog entry,

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

8 years ago2015-09-25 Vladimir Makarov <vmakarov@redhat.com>
vmakarov [Fri, 25 Sep 2015 21:06:08 +0000 (21:06 +0000)]
2015-09-25  Vladimir Makarov  <vmakarov@redhat.com>

PR target/61578
* lra-constarints.c (match_reload): Check presence of the input pseudo
in the output pseudo.

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

8 years agoAdd PR fortran/55603 working test
mikael [Fri, 25 Sep 2015 20:28:33 +0000 (20:28 +0000)]
Add PR fortran/55603 working test

gcc/testsuite/
PR fortran/55603
* gfortran.dg/allocatable_function_9.f90: New.

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

8 years ago2015-09-25 Tobias Burnus <burnus@net-b.de>
burnus [Fri, 25 Sep 2015 18:59:58 +0000 (18:59 +0000)]
2015-09-25  Tobias Burnus  <burnus@net-b.de>

* doc/invoke.texi (-fsanitize): Minor wording tweak.

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

8 years ago2015-09-25 Tobias Burnus <burnus@net-b.de>
burnus [Fri, 25 Sep 2015 18:41:07 +0000 (18:41 +0000)]
2015-09-25  Tobias Burnus  <burnus@net-b.de>

        * doc/invoke.texi (-fsanitize): Update URLs.

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

8 years ago * tr.po: Update.
jsm28 [Fri, 25 Sep 2015 17:05:49 +0000 (17:05 +0000)]
* tr.po: Update.

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

8 years agoFix old ChangeLog entry to include global variable name that was changed.
tejohnson [Fri, 25 Sep 2015 16:55:10 +0000 (16:55 +0000)]
Fix old ChangeLog entry to include global variable name that was changed.

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

8 years agoThis patch unsets -freorder-blocks-and-partition when -fprofile-use
tejohnson [Fri, 25 Sep 2015 16:53:40 +0000 (16:53 +0000)]
This patch unsets -freorder-blocks-and-partition when -fprofile-use
is not specified. Function splitting was not actually being performed
in that case, as probably_never_executed_bb_p does not distinguish
any basic blocks as being cold vs hot when there is no profile data.
Leaving it enabled, however, causes the assembly code generator to create
(empty) cold sections and labels, leading to unnecessary size overhead.

2015-09-25  Teresa Johnson  <tejohnson@google.com>

* opts.c (finish_options): Unset -freorder-blocks-and-partition
if not using profile.

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

8 years agoAvoid creating dangling references in case of nested tuples
ville [Fri, 25 Sep 2015 16:41:45 +0000 (16:41 +0000)]
Avoid creating dangling references in case of nested tuples
for tuple constructors that construct from other tuples.

2015-09-25  Ville Voutilainen  <ville.voutilainen@gmail.com>

Avoid creating dangling references in case of nested tuples
for tuple constructors that construct from other tuples.
* include/std/tuple (_TC::_NonNestedTuple): New.
* include/std/tuple (tuple::_TNTC): New.
* include/std/tuple (tuple(const tuple<_UElements...>&),
tuple(tuple<_UElements...>&&): Use _TNTC.
* testsuite/20_util/tuple/cons/nested_tuple_construct.cc: New.

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

8 years agoPR pretty-print/67567 do not pass NULL as a string
manu [Fri, 25 Sep 2015 14:24:11 +0000 (14:24 +0000)]
PR pretty-print/67567 do not pass NULL as a string

Fortran passes NULL where a non-null string is expected by the pretty-printer,
which causes a sanitizer warning. This could have been found earlier by using
gcc_checking_assert. Even if the assertion is false, the result is just an
incomplete diagnostic, thus it seems more user-friendly to assert only when
checking. I do not have any idea how to properly fix the Fortran bug, thus this
patch simply works-around it.

gcc/fortran/ChangeLog:

2015-09-25  Manuel López-Ibáñez  <manu@gcc.gnu.org>

PR pretty-print/67567
* resolve.c (resolve_fl_procedure): Work-around when iface->module
== NULL.

gcc/ChangeLog:

2015-09-25  Manuel López-Ibáñez  <manu@gcc.gnu.org>

PR pretty-print/67567
* pretty-print.c (pp_string): Add gcc_checking_assert.
* pretty-print.h (output_buffer_append_r): Likewise.

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

8 years agogcc/
olegendo [Fri, 25 Sep 2015 13:09:04 +0000 (13:09 +0000)]
gcc/
PR target/67675
* config/sh/sh-mem.cc (sh_expand_cmpstr): Check alignment of addr1 and
addr2 individually.  Don't emit logical or insn if one is known to
be aligned approriately.
(sh_expand_cmpnstr): Likewise.

gcc/testsuite/
PR target/67675
* gcc.target/sh/pr67675.c: New.

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

8 years ago[AArch64] Force __builtin_aarch64_fp[sc]r argument into a REG
rsandifo [Fri, 25 Sep 2015 11:54:22 +0000 (11:54 +0000)]
[AArch64] Force __builtin_aarch64_fp[sc]r argument into a REG

The testcase triggered an ICE because the builtin expansion
code passed the output of expand_normal directly to the SET_FP[SC]R
generator, without forcing it into a register first.

gcc/
* config/aarch64/aarch64-builtins.c (aarch64_expand_builtin): Force
__builtin_aarch64_fp[sc]r arguments into a register.

gcc/testsuite/
* gcc.target/aarch64/fpcr_fpsr_1.c: New file.

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

8 years agoRename IA MCU processor lakemount to lakemont
hjl [Fri, 25 Sep 2015 11:24:07 +0000 (11:24 +0000)]
Rename IA MCU processor lakemount to lakemont

IA MCU processor name is lakemont, not lakemount.

gcc/

* config.gcc (x86_archs): Replace lakemount with lakemont.
(with_cpu): Likewise.
(with_arch): Likewise.
* config/i386/i386-c.c (ix86_target_macros_internal): Replace
PROCESSOR_LAKEMOUNT with PROCESSOR_LAKEMONT.  Replace
__tune_lakemount__ with __tune_lakemont__.
* config/i386/i386.c (lakemount_cost): Renamed to ...
(lakemont_cost): This.
(m_LAKEMOUNT): Renamed to ...
(m_LAKEMONT): This.
(initial_ix86_arch_features): Replace m_LAKEMOUNT with m_LAKEMONT.
(processor_target_table): Replace "lakemount" with "lakemont".
(processor_alias_table): Likewise.
(ix86_issue_rate): Replace PROCESSOR_LAKEMOUNT with
PROCESSOR_LAKEMONT.
(ix86_adjust_cost): Likewise.
(ia32_multipass_dfa_lookahead): Likewise.
* config/i386/i386.h (processor_type): Likewise.
* config/i386/x86-tune.def: Replace m_LAKEMOUNT with m_LAKEMONT.
* doc/invoke.texi: Replace lakemount with lakemont.  Replace
Lakemount with Lakemont.

gcc/testsuite/

* gcc.target/i386/pr66749.c (dg-options): Replace
-mtune=lakemount with -mtune=lakemont.
* gcc.target/i386/pr66821.c (dg-options): Likewise.
* gcc.target/i386/pr67329.c (dg-options): Likewise.

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

8 years ago * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
mpolacek [Fri, 25 Sep 2015 11:19:11 +0000 (11:19 +0000)]
* c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
(ubsan_instrument_shift): Likewise.

* c-c++-common/ubsan/bounds-11.c: New test.
* c-c++-common/ubsan/bounds-12.c: New test.

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

8 years ago PR sanitizer/64906
mpolacek [Fri, 25 Sep 2015 09:50:29 +0000 (09:50 +0000)]
PR sanitizer/64906
* c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.

* c-c++-common/ubsan/pr64906.c: New test.

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

8 years agoChange IA MCU processor from iamcu to lakemount
hjl [Fri, 25 Sep 2015 00:18:21 +0000 (00:18 +0000)]
Change IA MCU processor from iamcu to lakemount

The first IA MCU processor will be Lakemount.  This patch changes IA MCU
processor name from iamcu to lakemount.

gcc/

* config.gcc (x86_archs): Replace iamcu with lakemount.
(with_cpu): Likewise.
(with_arch): Likewise.
* doc/invoke.texi: Likewise.
* config/i386/i386-c.c (ix86_target_macros_internal): Replace
PROCESSOR_IAMCU with PROCESSOR_LAKEMOUNT.  Replace
__tune_iamcu__ with __tune_lakemount__.
* config/i386/i386.c (iamcu_cost): Renamed to ...
(lakemount_cost): This.
(m_IAMCU): Renamed to ...
(m_LAKEMOUNT): This.
(initial_ix86_arch_features): Replace m_IAMCU with m_LAKEMOUNT.
(processor_target_table): Replace "iamcu" with "lakemount".
(processor_alias_table): Likewise.
(ix86_issue_rate): Replace PROCESSOR_IAMCU with
PROCESSOR_LAKEMOUNT.
(ix86_adjust_cost): Likewise.
(ia32_multipass_dfa_lookahead): Likewise.
* config/i386/i386.h (processor_type): Likewise.
* config/i386/x86-tune.def: Replace m_IAMCU with m_LAKEMOUNT.

gcc/testsuite/

* gcc.target/i386/pr66749.c (dg-options): Replace -mtune=iamcu
with -mtune=lakemount.
* gcc.target/i386/pr66821.c (dg-options): Likewise.
* gcc.target/i386/pr67329.c (dg-options): Likewise.

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

8 years agoDaily bump.
gccadmin [Fri, 25 Sep 2015 00:16:11 +0000 (00:16 +0000)]
Daily bump.

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

8 years ago * config/pa/pa-linux.h (HAVE_sync_compare_and_swapdi): Define.
danglin [Fri, 25 Sep 2015 00:01:34 +0000 (00:01 +0000)]
* config/pa/pa-linux.h (HAVE_sync_compare_and_swapdi): Define.
* config/pa/pa-protos.h (pa_maybe_emit_compare_and_swap_exchange_loop):
Declare.
* config/pa/pa.c (pa_init_libfuncs): Init sync libfuncs up to 8 bytes.
(pa_expand_compare_and_swap_loop): New.
(pa_maybe_emit_compare_and_swap_exchange_loop): New.
* config/pa/pa.md (atomic_storeqi, atomic_storehi, atomic_storesi,
atomic_storesf, atomic_loaddf, atomic_storedf): New expanders.
(atomic_loaddf_1, atomic_storedf_1): New insn patterns.
(atomic_loaddi, atomic_loaddi_1, atomic_storedi, atomic_storedi_1):
Revise.

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

8 years ago2015-09-24 Michael Collison <michael.collison@linaro.org>
collison [Thu, 24 Sep 2015 23:26:50 +0000 (23:26 +0000)]
2015-09-24  Michael Collison  <michael.collison@linaro.org>

PR other/57195
* read-md.c (read_name): Allow mode iterators inside angle
brackets in rtl expressions.

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

8 years ago2015-09-24 Vladimir Makarov <vmakarov@redhat.com>
vmakarov [Thu, 24 Sep 2015 20:40:30 +0000 (20:40 +0000)]
2015-09-24  Vladimir Makarov  <vmakarov@redhat.com>

PR target/61578
* ira-color.c (update_allocno_cost): Add parameter.
(update_costs_from_allocno): Decrease conflict cost.  Pass the new
parameter.

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

8 years agofdiagnostics-color=never does not disable color for some diagnostics
manu [Thu, 24 Sep 2015 16:37:43 +0000 (16:37 +0000)]
fdiagnostics-color=never does not disable color for some diagnostics

Actually, I was trying to reject non-warning options as argument to
-Werror=. However, the new test fails because -fdiagnostics-color=never is
always placed by the driver after the warning options when calling the compiler
proper. This patch prunes all -fdiagnostics-color from the command-line but the
last one, which is moved to the first position.

gcc/ChangeLog:

2015-09-24  Manuel López-Ibáñez  <manu@gcc.gnu.org>

PR driver/67640
* opts-common.c (prune_options): Discard all -fdiagnostics-color
but the last one, which is moved to the front to be processed
first.
* opts.c (enable_warning_as_error): Reject options that do not
control warnings.

gcc/testsuite/ChangeLog:

2015-09-24  Manuel López-Ibáñez  <manu@gcc.gnu.org>

PR driver/67640
* gcc.dg/Werror-13.c: New test.

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

8 years ago[AArch64] Handle const address in aarch64_print_operand
jiwang [Thu, 24 Sep 2015 16:04:12 +0000 (16:04 +0000)]
[AArch64] Handle const address in aarch64_print_operand

2015-09-24  Jiong Wang  <jiong.wang@arm.com>

* config/aarch64/aarch64.c (aarch64_print_operand): Add "CONST" support.

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

8 years ago[AArch64] Delete aarch64_symbol_context which is not used
jiwang [Thu, 24 Sep 2015 16:02:08 +0000 (16:02 +0000)]
[AArch64] Delete aarch64_symbol_context which is not used

2015-09-24  Jiong Wang  <jiong.wang@arm.com>

* config/aarch64/aarch64-protos.h (aarch64_symbol_context): Delete.
* config/aarch64/aarch64.c (aarch64_expand_mov_immediate): Likewise.
(aarch64_cannot_force_const_mem): Likewise.
(aarch64_classify_address): Likewise.
(aarch64_classify_symbolic_expression): Likewise.
(aarch64_print_operand): Likewise.
(aarch64_classify_symbol): Likewise.
(aarch64_mov_operand_p): Likewise.
* config/aarch64/predicates.md (aarch64_valid_symref): Likewise.
(aarch64_mov_operand): Likewise.

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

8 years agoLeave moved-from std::deque in a valid state
redi [Thu, 24 Sep 2015 15:46:24 +0000 (15:46 +0000)]
Leave moved-from std::deque in a valid state

PR libstdc++/67707
* include/bits/stl_deque.h (_Deque_base::_M_move_impl): Initialize
empty object.
* testsuite/23_containers/deque/allocator/move.cc: Check moved-from
deque.

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

8 years agoFix aarch64/target_attr_10 test following r227997.
nsz [Thu, 24 Sep 2015 13:41:52 +0000 (13:41 +0000)]
Fix aarch64/target_attr_10 test following r227997.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/target_attr_10.c (foo): Use dg-message for note.

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

8 years ago runtime: Fix recent lfstack change on Solaris.
ian [Thu, 24 Sep 2015 13:33:20 +0000 (13:33 +0000)]
runtime: Fix recent lfstack change on Solaris.

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

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

8 years agors6000: Fix -mdebug=stack code for spe_gp_offset
segher [Thu, 24 Sep 2015 12:43:43 +0000 (12:43 +0000)]
rs6000: Fix -mdebug=stack code for spe_gp_offset

2015-09-23  Segher Boessenkool  <segher@kernel.crashing.org>

* config/rs6000/rs6000.c (debug_stack_info): Invert the test
for info->spe_gp_size.

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

8 years ago2015-09-24 Richard Biener <rguenther@suse.de>
rguenth [Thu, 24 Sep 2015 11:01:14 +0000 (11:01 +0000)]
2015-09-24  Richard Biener  <rguenther@suse.de>

PR lto/67699
* lto-cgraph.c (compute_ltrans_boundary): Do not stream
abstract origins.

* g++.dg/pr67699.C: New testcase.

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

8 years agoARM: fp16 Fix PR 67624 - Incorrect conversion of float Infinity to __fp16
rearnsha [Thu, 24 Sep 2015 09:40:06 +0000 (09:40 +0000)]
ARM: fp16 Fix PR 67624 - Incorrect conversion of float Infinity to __fp16

PR libgcc/67624
libgcc:
* config/arm/fp16.c (__gnu_f2h_internal): Handle infinity correctly.
gcc/testsuite:
* gcc.target/arm/fp16-inf.c: New test.

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

8 years agoAdditional changes to switch from gimple to gimple *
tschwinge [Thu, 24 Sep 2015 09:27:12 +0000 (09:27 +0000)]
Additional changes to switch from gimple to gimple *

gcc/
* tree-object-size.c (plus_stmt_object_size)
(cond_expr_object_size): Change the formal parameters from gimple
to gimple *.
* tree-ssa-sccvn.h (vn_nary_op_insert_stmt): Likewise.
* tree-ssa-sccvn.c (vn_nary_op_insert_stmt): Make it static.
* tree-ssa-sccvn.h (vn_nary_op_insert_stmt): Don't declare.

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

8 years agogcc/testsuite/
kyukhin [Thu, 24 Sep 2015 09:03:57 +0000 (09:03 +0000)]
gcc/testsuite/
* gcc.target/i386/avx512vbmi-check.h (main): Fix register
name while checking for AVX-512VBMI presence.

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

8 years agoSupport PIE on Solaris
ro [Thu, 24 Sep 2015 09:00:22 +0000 (09:00 +0000)]
Support PIE on Solaris

gcc/testsuite:
* lib/target-supports.exp (check_effective_target_pie): Check for
PIE support on Solaris 11.x and 12.

libgcc:
* config.host (*-*-solaris2*): Add t-crtstuff-pic to tmake_file.
Add crtbeginS.o, crtendS.o to extra_parts if libgcc_cv_solaris_crts.
* config/sol2/gmon.c: (monstartup): Don't write trailing NUL of
messages.
(internal_mcount): Likewise.
* config/sol2/t-sol2 (crtp.o, crtpg.o, gmon.o): Compile with
crt_compile, add CRTSTUFF_T_CFLAGS_S.

gcc:
* configure.ac (gcc_cv_ld_pie): Check for gld >= 2.26 on Solaris.
Check for ld -type pie on Solaris 11.x and 12.
* configure: Regenerate.
* config.in: Regenerate.

* gcc.c (LD_PIE_SPEC): Allow redefinition.

* config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Define.
(STARTFILE_SPEC): Use it.
(ENDFILE_CRTEND_SPEC): Define.
(ENDFILE_SPEC): Use it and ENDFILE_ARCH_SPEC.
(SUBTARGET_EXTRA_SPECS): Add STARTFILE_CRTBEGIN_SPEC,
ENDFILE_ARCH_SPEC, ENDFILE_CRTEND_SPEC.
[HAVE_LD_PIE && HAVE_SOLARIS_CRTS] (LD_PIE_SPEC): Define.
(!(HAVE_LD_PIE && HAVE_SOLARIS_CRTS)] (LINK_PIE_SPEC): Define.
* config/i386/sol2.h (ENDFILE_SPEC): Remove.
(ENDFILE_ARCH_SPEC): Define.
* config/sparc/sol2.h (ENDFILE_ARCH_SPEC): Define.

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

8 years agoUse CRTs provided by Solaris
ro [Thu, 24 Sep 2015 08:51:39 +0000 (08:51 +0000)]
Use CRTs provided by Solaris

gcc:
* configure.ac (gcc_cv_solaris_crts): New test.
* configure. Regenerate.
* config.in: Regenerate.
* config/sol2.h (STARTFILE_SPEC): Simplify, provide
HAVE_SOLARIS_CRTS variant.

libgcc:
* configure.ac (libgcc_cv_solaris_crts): New test.
* configure: Regenerate.
* config.in: Regenerate.
* config/sol2/crtp.c, config/sol2/crtpg.c: New files.
* config/gmon-sol2.c: Rename to ...
* config/sol2/gmon.c: ... this.
Include auto-target.h.
(internal_mcount): Wrap setup handling in !HAVE_SOLARIS_CRTS.
* config/t-sol2: Rename to ...
* config/sol2/t-sol2: ... this.
(gmon.o): Reflect renaming.
(crtp.o, crtpg.o): New rules.
* config.host (*-*-solaris2*): Reflect renaming.
Use system CRTs if present.
Remove default CRT case.

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

8 years ago[tree-inline][obvious] Delete redundant count_insns_seq
ktkachov [Thu, 24 Sep 2015 08:25:13 +0000 (08:25 +0000)]
[tree-inline][obvious] Delete redundant count_insns_seq

* tree-inline.h (count_insns_seq): Delete prototype.
(estimate_num_insns_seq): Define prototype.
* tree-inline.c (count_insns_seq): Delete.
(estimate_num_insns_seq): Remove static qualifier.
* tree-eh.c (decide_copy_try_finally): Replace use of count_insns_seq
with estimate_num_insns_seq.

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

8 years ago2015-09-24 Richard Biener <rguenther@suse.de>
rguenth [Thu, 24 Sep 2015 07:35:55 +0000 (07:35 +0000)]
2015-09-24  Richard Biener  <rguenther@suse.de>

* tree-ssa-sccvn.h (vn_reference_op_struct): Add clique and base
members.
* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Record clique
and base for MEM_REF and TARGET_MEM_REF.  Handle BIT_FIELD_REF
offset.
(ao_ref_init_from_vn_reference): Record clique and base in the
built base.
* tree-ssa-pre.c (create_component_ref_by_pieces_1): Likewise

* g++.dg/tree-ssa/restrict3.C: New testcase.

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

8 years ago2015-09-24 Richard Biener <rguenther@suse.de>
rguenth [Thu, 24 Sep 2015 07:34:47 +0000 (07:34 +0000)]
2015-09-24  Richard Biener  <rguenther@suse.de>

PR tree-optimization/48885
* tree-ssa-structalias.c (visit_loadstore): Handle default defs
as not including any restrict tags from other pointers.

* gcc.dg/tree-ssa/restrict-6.c: New testcase.

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

8 years ago * ChangeLog: Fix whitespace.
uros [Thu, 24 Sep 2015 06:30:52 +0000 (06:30 +0000)]
* ChangeLog: Fix whitespace.
* testsuite/ChangeLog: Ditto.

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

8 years agoFix a -Wmisleading-indentation false-negative
ppalka [Thu, 24 Sep 2015 01:55:59 +0000 (01:55 +0000)]
Fix a -Wmisleading-indentation false-negative

gcc/c-family/ChangeLog:

* c-indentation.c (should_warn_for_misleading_indentation):
Compare next_stmt_vis_column with guard_line_first_nws instead
of with guard_line_vis_column.

gcc/testsuite/ChangeLog:

* c-c++-common/Wmisleading-indentation.c: Augment test.

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

8 years agoDaily bump.
gccadmin [Thu, 24 Sep 2015 00:16:15 +0000 (00:16 +0000)]
Daily bump.

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

8 years ago * config/pa/linux-atomic.c (__kernel_cmpxchg2): Reorder error checks.
danglin [Wed, 23 Sep 2015 23:27:15 +0000 (23:27 +0000)]
* config/pa/linux-atomic.c (__kernel_cmpxchg2): Reorder error checks.
(__sync_fetch_and_##OP##_##WIDTH): Change result to match type of
__kernel_cmpxchg2.
(__sync_##OP##_and_fetch_##WIDTH): Likewise.
(__sync_val_compare_and_swap_##WIDTH): Likewise.
(__sync_bool_compare_and_swap_##WIDTH): Likewise.
(__sync_lock_test_and_set_##WIDTH): Likewise.
(__sync_lock_release_##WIDTH): Likewise.
(__sync_fetch_and_##OP##_4): Change result to match type of
__kernel_cmpxchg.
(__sync_##OP##_and_fetch_4): Likewise.
(__sync_val_compare_and_swap_4): Likewise.
(__sync_bool_compare_and_swap_4): likewise.
(__sync_lock_test_and_set_4): Likewise.
(__sync_lock_release_4): Likewise.
(FETCH_AND_OP_2): Add long long variants.
(OP_AND_FETCH_2): Likewise.
(COMPARE_AND_SWAP_2 ): Likewise.
(SYNC_LOCK_TEST_AND_SET_2): Likewise.
(SYNC_LOCK_RELEASE_2): Likewise.
(__sync_bool_compare_and_swap_##WIDTH): Correct return.

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

8 years ago PR go/67695
ian [Wed, 23 Sep 2015 20:43:46 +0000 (20:43 +0000)]
PR go/67695
    mksysinfo.sh: Use = with test rather than ==.

    Fixes GCC PR 67695.

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

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

8 years agoFix small typos in the coding rule enforcement warnings.
ville [Wed, 23 Sep 2015 18:22:21 +0000 (18:22 +0000)]
Fix small typos in the coding rule enforcement warnings.

/cp
2015-09-23  Ville Voutilainen  <ville.voutilainen@gmail.com>

Fix small typos in the coding rule enforcement warnings.
* parser.c (cp_parser_namespace_definition): Replace 'namepace'
with 'namespace'.

/testsuite
2015-09-23  Ville Voutilainen  <ville.voutilainen@gmail.com>

Fix small typos in the coding rule enforcement warnings.
* g++.dg/diagnostic/disable.C: Replace 'namepace'
with 'namespace'.

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

8 years ago runtime: rewrite lfstack packing/unpacking to look more like that in Go
ian [Wed, 23 Sep 2015 17:07:15 +0000 (17:07 +0000)]
runtime: rewrite lfstack packing/unpacking to look more like that in Go

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

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

8 years agoFix --enable-offload-targets/-foffload handling, pt. 2
tschwinge [Wed, 23 Sep 2015 14:52:57 +0000 (14:52 +0000)]
Fix --enable-offload-targets/-foffload handling, pt. 2

gcc/
* gcc.c (handle_foffload_option): Don't lose the trailing NUL
character when appending to offload_targets.

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

8 years agoFix --enable-offload-targets/-foffload handling, pt. 1
tschwinge [Wed, 23 Sep 2015 14:52:50 +0000 (14:52 +0000)]
Fix --enable-offload-targets/-foffload handling, pt. 1

gcc/
* configure.ac (offload_targets, OFFLOAD_TARGETS): Separate
offload targets by commas, not colons.
* config.in: Regenerate.
* configure: Likewise.
* gcc.c (driver::maybe_putenv_COLLECT_LTO_WRAPPER): Due to that,
instead of setting up the default offload targets here...
(process_command): ..., do it here.
libgomp/
* plugin/configfrag.ac (OFFLOAD_TARGETS): Clarify that offload
targets are separated by commas.
* config.h.in: Regenerate.

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

8 years agoRefactor omp_reduction_init: omp_reduction_init_op
tschwinge [Wed, 23 Sep 2015 14:46:55 +0000 (14:46 +0000)]
Refactor omp_reduction_init: omp_reduction_init_op

gcc/
* omp-low.h (omp_reduction_init_op): Declare.
* omp-low.c (omp_reduction_init_op): New, broken out of ...
(omp_reduction_init): ... here.  Call it.
* tree-parloops.c (initialize_reductions): Use
omp_reduction_init_op.

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

8 years ago2015-09-23 Richard Biener <rguenther@suse.de>
rguenth [Wed, 23 Sep 2015 14:09:48 +0000 (14:09 +0000)]
2015-09-23   Richard Biener  <rguenther@suse.de>

PR middle-end/67662
* fold-const.c (fold_binary_loc): Do not reassociate two vars with
undefined overflow unless they will cancel out.

* gcc.dg/ubsan/pr67662.c: New testcase.

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

8 years agoAVX-512. Fix emit in '*<mshift><mode>3' pattern.
kyukhin [Wed, 23 Sep 2015 13:28:12 +0000 (13:28 +0000)]
AVX-512. Fix emit in '*<mshift><mode>3' pattern.

gcc/
 * config/i386/i386.md (define_insn "*<mshift><mode>3"): Fix
 insn emit.

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

8 years ago[c-family/49654/49655] reject invalid options in pragma diagnostic
manu [Wed, 23 Sep 2015 13:07:07 +0000 (13:07 +0000)]
[c-family/49654/49655] reject invalid options in pragma diagnostic

Use find_opt instead of linear search through options in
handle_pragma_diagnostic (PR 49654) and reject non-warning options and
options not valid for the current language (PR 49655).

gcc/testsuite/ChangeLog:

2015-09-23  Manuel López-Ibáñez  <manu@gcc.gnu.org>

PR c/49655
* gcc.dg/pragma-diag-6.c: New test.

gcc/ChangeLog:

2015-09-23  Manuel López-Ibáñez  <manu@gcc.gnu.org>

PR c/49655
* opts.h (write_langs): Declare.
* opts-global.c (write_langs): Make it extern.

gcc/c-family/ChangeLog:

2015-09-23  Manuel López-Ibáñez  <manu@gcc.gnu.org>

PR c/49654
PR c/49655
* c-pragma.c (handle_pragma_diagnostic): Detect non-warning
options and options not valid for the current language.

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

8 years agogcc/
olegendo [Wed, 23 Sep 2015 11:55:45 +0000 (11:55 +0000)]
gcc/
PR target/67391
* config/sh/sh.md (addsi3, *addsi3_compact): Don't check for overlapping
regs when matching the pattern.

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

8 years ago[AArch64] Fix vcvt_high_f64_f32 and vcvt_figh_f32_f64 intrinsics.
jgreenhalgh [Wed, 23 Sep 2015 11:39:48 +0000 (11:39 +0000)]
[AArch64] Fix vcvt_high_f64_f32 and vcvt_figh_f32_f64 intrinsics.

gcc/

* config/aarch64/aarch64-simd.md
(aarch64_float_truncate_hi_v4sf): Rewrite as an expand.
(aarch64_float_truncate_hi_v4sf_le): New.
(aarch64_float_truncate_hi_v4sf_be): Likewise.

gcc/testsuite/

* gcc.target/aarch64/advsimd-intrinsics/vcvt_high_1.c: New.

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

8 years agoLimit number of symlinks that canonical() will resolve
redi [Wed, 23 Sep 2015 11:26:50 +0000 (11:26 +0000)]
Limit number of symlinks that canonical() will resolve

* src/filesystem/ops.cc (canonical): Simplify error handling and
limit number of symlinks that can be resolved.

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

8 years agoFix semantics of Filesystem TS directory iterators
redi [Wed, 23 Sep 2015 11:26:45 +0000 (11:26 +0000)]
Fix semantics of Filesystem TS directory iterators

[class.directory_iterator] p4 and [directory_iterator.members] p4
require that only the default constructor and ignored permission denied
errors can create the end iterator.

* acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Remove _GLIBCXX_
prefix from HAVE_STRUCT_DIRENT_D_TYPE.
* config.h.in: Regenerate.
* configure: Regenerate.
* include/experimental/fs_dir.h (operator==, operator==):
Use owner_before instead of pointer equality.
(directory_iterator(std::shared_ptr<_Dir>, error_code*)): Remove.
* src/filesystem/dir.cc (ErrorCode): Remove.
(_Dir::advance): Change ErrorCode parameter to error_code*, add
directory_options parameter and check it on error.
(opendir): Rename to open_dir to avoid clashing with macro. Change
ErrorCode parameter to error_code*.
(make_shared_dir): Remove.
(native_readdir) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Don't set errno.
(directory_iterator(std::shared_ptr<_Dir>, error_code*)): Remove.
(directory_iterator(const path&, directory_options, error_code*)):
Pass options to _Dir::advance and create non-end iterator on error.
(recursive_directory_iterator(const path&, directory_options,
error_code*)): Clear error_code on ignored error, create non-end
iterator otherwise.
(recursive_directory_iterator::increment): Pass _M_options to
_Dir::advance.
(recursive_directory_iterator::pop): Likewise.
* testsuite/experimental/filesystem/iterators/directory_iterator.cc:
New.
* testsuite/experimental/filesystem/iterators/
recursive_directory_iterator.cc: New.

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

8 years agoFix filesystem::create_directories() function
redi [Wed, 23 Sep 2015 11:25:59 +0000 (11:25 +0000)]
Fix filesystem::create_directories() function

* src/filesystem/ops.cc (is_dot, is_dotdot): Define new helpers.
(create_directories): Fix error handling.
* testsuite/experimental/filesystem/operations/create_directories.cc:
New.

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

8 years ago2015-09-23 Richard Biener <rguenther@suse.de>
rguenth [Wed, 23 Sep 2015 11:11:48 +0000 (11:11 +0000)]
2015-09-23  Richard Biener  <rguenther@suse.de>

* tree-ssa-structalias.c (intra_create_variable_infos): Build
representatives for all restrict qualified pointer destinations.

* g++.dg/tree-ssa/restrict2.C: Un-XFAIL testcase.

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

8 years agoAVX-512. Add kshift[lr][bwdq]. Fix iterator.
kyukhin [Wed, 23 Sep 2015 07:08:56 +0000 (07:08 +0000)]
AVX-512. Add kshift[lr][bwdq]. Fix iterator.

gcc/
* config/i386/i386.md (define_code_attr mshift): New.
(define_mode_iterator SWI1248_AVX512BW): Rename ...
(SWI1248_AVX512BW): ... to this. Make QI enabled for TARGET_AVX512DQ
only.
(define_insn "*k<logic><mode>"): Use new iterator name.
(define_insn "*<mshift><mode>3"): New.

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

8 years agoFix use of valgrind API
miyuki [Wed, 23 Sep 2015 02:31:14 +0000 (02:31 +0000)]
Fix use of valgrind API

gcc/
PR middle-end/67649
* memory-block.h (memory_block_pool::allocate): Use valgrind API to
mark the block as accessible.

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

8 years agoDaily bump.
gccadmin [Wed, 23 Sep 2015 00:16:13 +0000 (00:16 +0000)]
Daily bump.

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

8 years agoFix -Wmisleading-indentation false-positive
ppalka [Tue, 22 Sep 2015 23:06:31 +0000 (23:06 +0000)]
Fix -Wmisleading-indentation false-positive

gcc/c-family/ChangeLog:

* c-indentation.c (should_warn_for_misleading_indentation):
Float out and consolidate the calls to get_visual_column that
are passed guard_exploc as an argument.  Compare
next_stmt_vis_column with guard_line_first_nws instead of with
body_line_first_nws.

gcc/testsuite/ChangeLog:

* c-c++-common/Wmisleading-indentation.c: Augment test.

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

8 years agoshrink-wrap: Handle multiple predecessors of prologue
segher [Tue, 22 Sep 2015 20:50:38 +0000 (20:50 +0000)]
shrink-wrap: Handle multiple predecessors of prologue

The caller of try_shrink_wrapping wants to be returned a single edge to
put the prologue on.  To make that work even if there are multiple edges
(all pointing to the PRO block) that need the prologue, add a new block
that becomes the destination of all such edges, and then jumps to PRO.

In the general case, some edges to PRO will need to be redirected, and
not all edges *can* be redirected.  This adds a can_get_prologue function
that detects such cases.  This then happily can also handle the "prologue
clobbers some reg that is live on the edge we want to insert it on" case.

Not all EDGE_CROSSING edges can be redirected, so handle those the same
as EDGE_COMPLEX edges.

2015-09-22  Segher Boessenkool  <segher@kernel.crashing.org>

* function.c (thread_prologue_and_epilogue_insns): Delete
orig_entry_edge argument to try_shrink_wrapping.
* shrink-wrap.c (can_get_prologue): New function.
(can_dup_for_shrink_wrapping): Also handle EDGE_CROSSING.
(try_shrink_wrapping): Delete orig_entry_edge argument.  Use
can_get_prologue where needed.  Remove code that finds a single
edge for the prologue.  Remove code that tests if any reg clobbered
by the prologue is live on the prologue edge.  Remove code that finds
the new prologue edge after duplicating blocks.  Make a new prologue
block and edge.
* shrink-wrap.h (try_shrink_wrapping): Delete orig_entry_edge argument.

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

8 years ago[PATCH] Remove undefined behaviour from hppa backend
law [Tue, 22 Sep 2015 18:39:10 +0000 (18:39 +0000)]
[PATCH] Remove undefined behaviour from hppa backend

* config/pa/pa.h (MIN_LEGIT_64BIT_CONST_INT: Avoid undefined
behavior.

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

8 years ago c-family/
nathan [Tue, 22 Sep 2015 15:34:49 +0000 (15:34 +0000)]
c-family/
* c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
Wnamespaces): New C++ warnings.

cp/
* decl.c (xref_basetypes): Check virtual and/or multiple
inheritance warning.
* parser.c (cp_parser_namespace_definition): Check namespaces
warning.
* pt.c (push_template_decl_real): Check templates warning.

* doc/invoke.texi  (-Wmultiple-inheritance, -Wvirtual-inheritance,
-Wtemplates, -Wnamespaces): Document.

testsuite/
* g++.dg/diagostic/disable.C: New.

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

8 years ago Disconnect -Wabi=<n> from -fabi-compat-version=<n>.
jason [Tue, 22 Sep 2015 15:18:26 +0000 (15:18 +0000)]
Disconnect -Wabi=<n> from -fabi-compat-version=<n>.

gcc/c-family/
* c-common.h (abi_compat_version_crosses): New.
(warn_abi_version): Declare.
* c-common.c: Define it.
* c-opts.c (c_common_post_options): Handle it.
flag_abi_compat_version defaults to 8.
gcc/cp/
* mangle.c (abi_warn_or_compat_version_crosses): New.
Use it instead of abi_version_crosses.
(mangle_decl): Deal with -fabi-compat-version and -Wabi separately.

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

8 years agoHandle restrict pointer references as restrict in AA
vries [Tue, 22 Sep 2015 14:14:56 +0000 (14:14 +0000)]
Handle restrict pointer references as restrict in AA

2015-09-22  Tom de Vries  <tom@codesourcery.com>

PR tree-optimization/67671
* tree-ssa-structalias.c (create_variable_info_for_1): Handle restrict
pointer references as restrict.

* g++.dg/pr67671.C: New test.

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

8 years agoUpdate Andrew Cagney's address.
jason [Tue, 22 Sep 2015 13:31:20 +0000 (13:31 +0000)]
Update Andrew Cagney's address.

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

8 years ago2015-09-22 Chung-Lin Tang <cltang@codesourcery.com>
cltang [Tue, 22 Sep 2015 12:19:27 +0000 (12:19 +0000)]
2015-09-22  Chung-Lin Tang  <cltang@codesourcery.com>

* config/nios2/nios2.c (nios2_legitimize_address): When handling
'reg + reloc' cases, allow first operand to be non-REG, and use
force_reg() to enforce address pattern.

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

8 years agoPR target/67480
kyukhin [Tue, 22 Sep 2015 11:14:25 +0000 (11:14 +0000)]
PR target/67480

gcc/
* config/i386/sse.md (define_mode_iterator VI48_AVX_AVX512F): New.
(define_mode_iterator VI12_AVX_AVX512F): New.
(define_insn "<mask_codefor><code><mode>3<mask_name>"): Change
all iterators to VI48_AVX_AVX512F. Extract remaining modes ...
(define_insn "*<code><mode>3"): ... Into new pattern using
VI12_AVX_AVX512F iterators without masking.

gcc/testsuite/
* gcc.target/i386/pr67480.c: New test.

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

8 years agoAVX-512. Introduce SKylake server CPU.
kyukhin [Tue, 22 Sep 2015 11:10:21 +0000 (11:10 +0000)]
AVX-512. Introduce SKylake server CPU.

gcc/
* config.gcc: Support "skylake-avx512".
        * config/i386/i386-c.c (ix86_target_macros_internal): Handle
        PROCESSOR_SKYLAKE_AVX512.
        * config/i386/i386.c (m_SKYLAKE_AVX512): Define.
        (processor_target_table): Add "skylake-avx512".
        (PTA_SKYLAKE_AVX512): Define.
(ix86_option_override_internal): Add "skylake_avx512".
        (fold_builtin_cpu): Handle "skylake_avx512", add F_AVX512VL
F_AVX512BW, F_AVX512DQ, F_AVX512ER, F_AVX512PF, F_AVX512CD.
        * config/i386/i386.h (TARGET_SKYLAKE_AVX512): Define.
        (processor_type): Add PROCESSOR_SKYLAKE_AVX512.
* doc/invoke.texi (skylake-avx512): New.

libgcc/
* libgcc/config/i386/cpuinfo.c (enum processor_features): Add
FEATURE_AVX512VL, FEATURE_AVX512BW, FEATURE_AVX512DQ,
FEATURE_AVX512CD, FEATURE_AVX512ER, FEATURE_AVX512PF.
(get_available_features): Habdle new features.

gcc/testsuite/
        * gcc.target/i386/funcspec-5.c: Test avx512vl, avx512bw,
avx512dq, avx512cd, avx512er, avx512pf and skylake-avx512.
* gcc.target/i386/builtin_target.c: Test  avx512vl, avx512bw,
avx512dq, avx512cd, avx512er and avx512pf.

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

8 years agoAVX-512. Fix patterns for kunpck insns.
kyukhin [Tue, 22 Sep 2015 09:47:39 +0000 (09:47 +0000)]
AVX-512. Fix patterns for kunpck insns.

gcc/
* gcc/config/i386/i386.md (define_insn "kunpckhi"): Fix
operand in pattern.
(define_insn "kunpcksi"): Ditto.
(define_insn "kunpckdi"): Ditto.

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

8 years agoAVX-512. Fix kxnor insn split.
kyukhin [Tue, 22 Sep 2015 09:42:26 +0000 (09:42 +0000)]
AVX-512. Fix kxnor insn split.

gcc/
* gcc/config/i386/i386.md (define_split not/xor SWI1248x): Use
iterator instead of fixed modes.

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

8 years ago[AArch64] Use atomic load-operate instructions for update-fetch patterns.
mwahab [Tue, 22 Sep 2015 09:41:15 +0000 (09:41 +0000)]
[AArch64] Use atomic load-operate instructions for update-fetch patterns.

2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

* config/aarch64/aarch64-protos.h (aarch64_gen_atomic_ldop):
Adjust declaration.
* config/aarch64/aarch64.c (aarch64_emit_bic): New.
(aarch64_gen_atomic_ldop): Adjust comment.  Add parameter
out_result.  Update to support update-fetch operations.
* config/aarch64/atomics.md (aarch64_atomic_exchange<mode>_lse):
Adjust for change to aarch64_gen_atomic_ldop.
(aarch64_atomic_<atomic_optab><mode>_lse): Likewise.
(aarch64_atomic_fetch_<atomic_optab><mode>_lse): Likewise.
(atomic_<atomic_optab>_fetch<mode>): Change to an expander.
(aarch64_atomic_<atomic_optab>_fetch<mode>): New.
(aarch64_atomic_<atomic_optab>_fetch<mode>_lse): New.

gcc/testsuite
2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

* gcc.target/aarch64/atomic-inst-ldadd.c: Add tests for
update-fetch operations.
* gcc.target/aarch64/atomic-inst-ldlogic.c: Likewise.

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

8 years ago[AArch64] Use atomic load-operate instructions for fetch-update patterns.
mwahab [Tue, 22 Sep 2015 09:35:17 +0000 (09:35 +0000)]
[AArch64] Use atomic load-operate instructions for fetch-update patterns.

gcc/
2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

* config/aarch64/aarch64-protos.h
(aarch64_atomic_ldop_supported_p): Declare.
* config/aarch64/aarch64.c (aarch64_atomic_ldop_supported_p): New.
(enum aarch64_atomic_load_op_code): New.
(aarch64_emit_atomic_load_op): New.
(aarch64_gen_atomic_ldop): Update to support load-operate
patterns.
* config/aarch64/atomics.md (atomic_<atomic_optab><mode>): Change
to an expander.
(aarch64_atomic_<atomic_optab><mode>): New.
(aarch64_atomic_<atomic_optab><mode>_lse): New.
(atomic_fetch_<atomic_optab><mode>): Change to an expander.
(aarch64_atomic_fetch_<atomic_optab><mode>): New.
(aarch64_atomic_fetch_<atomic_optab><mode>_lse): New.

gcc/testsuite/
2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

* gcc.target/aarch64/atomic-inst-ldadd.c: New.
* gcc.target/aarch64/atomic-inst-ldlogic.c: New.

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

8 years ago[AArch64] Add atomic load-operate instructions.
mwahab [Tue, 22 Sep 2015 09:30:51 +0000 (09:30 +0000)]
[AArch64] Add atomic load-operate instructions.

2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

* config/aarch64/aarch64/atomics.md (UNSPECV_ATOMIC_LDOP): New.
(UNSPECV_ATOMIC_LDOP_OR): New.
(UNSPECV_ATOMIC_LDOP_BIC): New.
(UNSPECV_ATOMIC_LDOP_XOR): New.
(UNSPECV_ATOMIC_LDOP_PLUS): New.
(ATOMIC_LDOP): New.
(atomic_ldop): New.
(aarch64_atomic_load<atomic_ldop><mode>): New.

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

8 years ago[AArch64] Make BIC, other logical instructions, available.
mwahab [Tue, 22 Sep 2015 09:24:47 +0000 (09:24 +0000)]
[AArch64] Make BIC, other logical instructions, available.

2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

* config/aarch64/aarch64.md
(<LOGICAL:optab>_one_cmpl_<SHIFT:optab><mode>3): Make a named
pattern.

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

8 years ago[AArch64] Use atomic instructions for swap and fetch-update operations.
mwahab [Tue, 22 Sep 2015 09:19:55 +0000 (09:19 +0000)]
[AArch64] Use atomic instructions for swap and fetch-update operations.

gcc/
2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

* config/aarch64/aarch64-protos.h (aarch64_gen_atomic_ldop):
Declare.
* config/aarch64/aarch64.c (aarch64_emit_atomic_swap): New.
(aarch64_gen_atomic_ldop): New.
(aarch64_split_atomic_op): Fix whitespace and add a comment.
* config/aarch64/atomics.md (UNSPECV_ATOMIC_SWP): New.
(aarch64_compare_and_swap<mode>_lse): Fix some whitespace.
(atomic_exchange<mode>): Replace with an expander.
(aarch64_atomic_exchange<mode>): New.
(aarch64_atomic_exchange<mode>_lse): New.
(aarch64_atomic_<atomic_optab><mode>): Fix some whitespace.
(aarch64_atomic_swp<mode>): New.

gcc/testsuite/
2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

* gcc.target/aarch64/atomic-inst-ops.inc: (TEST_MODEL): New.
(TEST_ONE): New.
        * gcc.target/aarch64/atomic-inst-swap.c: New.

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

8 years ago[PATCH tree-inline] Do not say "called from here" with UNKNOWN_LOCATION
manu [Tue, 22 Sep 2015 09:14:04 +0000 (09:14 +0000)]
[PATCH tree-inline] Do not say "called from here" with UNKNOWN_LOCATION

In https://sourceware.org/ml/libc-alpha/2014-12/msg00300.html, we give a
"called from here" note without actually having a location, which looks
strange. I haven't been able to generate such a testcase. If this happens,
try to at least point to the current function being called. If that location is
also unknown, skip the extra note.

gcc/ChangeLog:

2015-09-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>

* tree-inline.c (expand_call_inline): Use inform for extra note.
Do not give a note with UNKNOWN_LOCATION.
Replace input_location with gimple_location (stmt).
Use true/false instead of TRUE/FALSE.

gcc/testsuite/ChangeLog:

2015-09-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>

* gcc.target/i386/inline_error.c (int bar): Use dg-message for note.
* gcc.target/i386/pr57756.c (static __inline int caller): Likewise.
* gcc.target/i386/pr59789.c (f1): Likewise.
* gcc.target/i386/intrinsics_5.c (__m128i foo): Likewise.
* gcc.target/i386/intrinsics_6.c: Likewise.
* gcc.dg/winline-5.c (int t): Likewise.
* gcc.dg/winline-9.c (t): Likewise.
* gcc.dg/always_inline2.c (q): Likewise.
* gcc.dg/winline-2.c (inline int t): Likewise.
* gcc.dg/winline-6.c: Likewise.
* gcc.dg/winline-10.c (void g): Likewise.
* gcc.dg/pr49243.c (void parse): Likewise.
* gcc.dg/always_inline3.c (q2): Likewise.
* gcc.dg/winline-3.c: Likewise.
* gcc.dg/winline-7.c (inline void *t): Likewise.

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

8 years agoHandle single restrict pointer in struct in create_variable_info_for_1
vries [Tue, 22 Sep 2015 08:15:32 +0000 (08:15 +0000)]
Handle single restrict pointer in struct in create_variable_info_for_1

2015-09-22  Tom de Vries  <tom@codesourcery.com>

PR tree-optimization/67666
* tree-ssa-structalias.c (create_variable_info_for_1): Handle struct
with single field non-conservative.

* g++.dg/pr67666.C: New test.

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

8 years ago2015-09-22 Chung-Lin Tang <cltang@codesourcery.com>
cltang [Tue, 22 Sep 2015 06:45:22 +0000 (06:45 +0000)]
2015-09-22  Chung-Lin Tang  <cltang@codesourcery.com>

PR libgomp/67141
* oacc-int.h (goacc_host_init): Add declaration.
* oacc-host.c (goacc_host_init): Remove static and constructor attribute.
* oacc-init.c (goacc_runtime_initialize): Call goacc_host_init() at end.

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

8 years agoRevert LRA SPARC changes for now.
davem [Tue, 22 Sep 2015 03:52:45 +0000 (03:52 +0000)]
Revert LRA SPARC changes for now.

gcc/

PR/67622
Revert:
2015-09-11  David S. Miller  <davem@davemloft.net>

* config/sparc/constraints.md: Make "U" constraint a real register
constraint.
* config/sparc/sparc.c (TARGET_LRA_P): Define.
(D_MODES, DF_MODES): Add missing cast.
(TF_MODES, TF_MODES_NO_S): Include T_MODE.
(OF_MODES, OF_MODES_NO_S): Include O_MODE.
(sparc_register_move_cost): Decrease Niagara/UltrsSPARC memory
cost to 8.
* config/sparc/sparc.h (PROMOTE_MODE): Define.
* config/sparc/sparc.md (*movsi_lo_sum, *movsi_high): Do not
provide these insn when flag_pic.

2015-09-17  David S. Miller  <davem@davemloft.net>

* config/sparc/sparc-protos.h (sparc_secondary_memory_needed):
Declare.
* config/sparc/sparc.c (sparc_secondary_memory_needed): New
function.
* config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED): Use it.
(HARD_REGNO_CALLER_SAVE_MODE): Define.
* config/sparc/sparc.md (sethi_di_medlow, losum_di_medlow, seth44)
(setm44, setl44, sethh, setlm, sethm, setlo, embmedany_sethi)
(embmedany_losum, embmedany_brsum, embmedany_textuhi)
(embmedany_texthi, embmedany_textulo, embmedany_textlo): Do not
provide when flag_pic.

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

8 years agoDaily bump.
gccadmin [Tue, 22 Sep 2015 00:16:12 +0000 (00:16 +0000)]
Daily bump.

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

8 years ago[FT32] fixes for the default hardware startup
jamesbowman [Mon, 21 Sep 2015 22:31:53 +0000 (22:31 +0000)]
[FT32] fixes for the default hardware startup

libgcc/
        * config/ft32/crti-hw.S: Use __PMSIZE to allow configurable
        memory layout. Deal correctly with BSS region larger than 32K.
        Handle a watchdog reset like a power-on reset. Clean up unused
        code.

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

8 years ago2015-09-21 Steven G. Kargl <kargl@gcc.gnu.org>
kargl [Mon, 21 Sep 2015 21:40:26 +0000 (21:40 +0000)]
2015-09-21  Steven G. Kargl  <kargl@gcc.gnu.org>

* resolve.c (nonscalar_typebound_assign): Fix typos in comment.

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

8 years ago2015-09-21 Steven G. Kargl <kargl@gcc.gnu.org>
kargl [Mon, 21 Sep 2015 18:09:13 +0000 (18:09 +0000)]
2015-09-21  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/67615
* resolve.c (gfc_resolve_code): Check for scalar expression in
arithmetic-if.

2015-09-21  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/67615
* gfortran.dg/pr67615.f90: new test.

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

8 years ago[PATCH] Fix undefined behavior in h8300 backend
law [Mon, 21 Sep 2015 17:09:53 +0000 (17:09 +0000)]
[PATCH] Fix undefined behavior in h8300 backend

* config/h8300/h8300.md (andsi3_ashift_n_lower): Avoid undefined
behavior.

* gcc.target/h8300/andsi3_ashift_n_lower.c: New test.

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

8 years ago/c-family
ville [Mon, 21 Sep 2015 15:50:30 +0000 (15:50 +0000)]
/c-family
2015-09-21  Ville Voutilainen  <ville.voutilainen@gmail.com>

Complete the implementation of N4230, Nested namespace definition.
* c-cppbuiltin.c: Add __cpp_namespace_attributes and
__cpp_nested_namespace_definitions.

/cp
2015-09-21  Ville Voutilainen  <ville.voutilainen@gmail.com>

Complete the implementation of N4230, Nested namespace definition.
* parser.c (cp_parser_namespace_definition): Support namespace
attributes both before and after the namespace identifier.

/testsuite
2015-09-21  Ville Voutilainen  <ville.voutilainen@gmail.com>

Complete the implementation of N4230, Nested namespace definition.
* g++.dg/cpp1y/feat-cxx11-neg.C: Add tests for C++17 namespace
attributes and nested namespace definitions.
* g++.dg/cpp1y/feat-cxx98-neg.C: Likewise.
* g++.dg/cpp1z/feat-cxx1z.C: Likewise.
* g++.dg/cpp1y/feat-cxx14-neg.C: New.
* g++.dg/cpp1z/namespace-attribs.C: Likewise.
* g++.dg/cpp1z/nested-namespace-def1.C: Add tests for attributes
appearing before the namespace identifier.

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

8 years agoHandle lines encoded into several maps in linemap_position_for_loc_and_offset
manu [Mon, 21 Sep 2015 14:52:09 +0000 (14:52 +0000)]
Handle lines encoded into several maps in linemap_position_for_loc_and_offset

linemap_position_for_loc_and_offset() tries to generate a location_t
encoding a column offset from the current location, for example, point
to a certain character inside a string. This is trivial to do when the
new location "fits within" the map of the original location. However,
it may happen that the (long) line corresponding to the original
location is encoded in several maps, thus the new location should
actually be encoded in a subsequent map from the original location.
This patch detects this case and adjusts the map correspondingly.

(This shows that the line-map representation is quite wasteful in this
case, because line-maps always start at column 0. That is, map[0]
highest location may encode up to line 8 column 80, then
map[1]->start_location starts encoding at line 8 column 0. Thus, there
are two location_t values that point to the same source location.)

libcpp/ChangeLog:

2015-09-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>

PR c/66415
* line-map.c (linemap_position_for_loc_and_offset): Handle the
case of long lines encoded in multiple maps.

gcc/testsuite/ChangeLog:

2015-09-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>

PR c/66415
* gcc.dg/cpp/pr66415-1.c: Test column number.

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