platform/upstream/linaro-gcc.git
9 years agogcc/
ienkovich [Mon, 10 Nov 2014 07:46:45 +0000 (07:46 +0000)]
gcc/

* tree-if-conv.c (add_to_predicate_list): Check unconditionally
that bb is always executed to early exit. Use predicate of
cd-equivalent block for join blocks if it exists.
(if_convertible_loop_p_1): Recompute POST_DOMINATOR tree.
(tree_if_conversion): Free post-dominance information.

gcc/testsuite/

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

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

9 years ago DR 799
jason [Mon, 10 Nov 2014 05:00:05 +0000 (05:00 +0000)]
DR 799
* typeck.c (build_reinterpret_cast_1): reinterpret_cast to the
same scalar type is an rvalue.

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

9 years ago DR 2007
jason [Mon, 10 Nov 2014 05:00:00 +0000 (05:00 +0000)]
DR 2007
* call.c (build_new_op_1): Don't do non-class lookup for =, -> or [].

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

9 years ago * config/i386/avx512vldqintrin.h (_mm256_broadcast_f32x2): __mmask8.
jason [Mon, 10 Nov 2014 04:59:54 +0000 (04:59 +0000)]
* config/i386/avx512vldqintrin.h (_mm256_broadcast_f32x2): __mmask8.
* config/i386/avx512vlintrin.h (_mm256_mask_cvtepi32_storeu_epi16)
(_mm_mask_cvtusepi32_storeu_epi16)
(_mm_mask_cvtsepi64_storeu_epi32): Return void.

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

9 years agoPR 47007 and 61847 Locale failures in libgfortran.
jb [Mon, 10 Nov 2014 00:17:16 +0000 (00:17 +0000)]
PR 47007 and 61847 Locale failures in libgfortran.

2014-11-10  Janne Blomqvist  <jb@gcc.gnu.org>

PR libfortran/47007
PR libfortran/61847
* config.h.in: Regenerated.
* configure: Regenerated.
* configure.ac (AC_CHECK_HEADERS_ONCE): Check for xlocale.h.
(AC_CHECK_FUNCS_ONCE): Check for newlocale, freelocale, uselocale,
strerror_l.
* io/io.h (locale.h): Include.
(xlocale.h): Include if present.
(c_locale): New variable.
(old_locale): New variable.
(old_locale_ctr): New variable.
(old_locale_lock): New variable.
(st_parameter_dt): Add old_locale member.
* io/transfer.c (data_transfer_init): Set locale to "C" if doing
formatted transfer.
(finalize_transfer): Reset locale to previous.
* io/unit.c (c_locale): New variable.
(old_locale): New variable.
(old_locale_ctr): New variable.
(old_locale_lock): New variable.
(init_units): Init c_locale, init old_locale_lock.
(close_units): Free c_locale.
* runtime/error.c (locale.h): Include.
(xlocale.h): Include if present.
(gf_strerror): Use strerror_l if available. Reset locale to
LC_GLOBAL_LOCALE for strerror_r branch.

2014-11-10  Janne Blomqvist  <jb@gcc.gnu.org>

PR libfortran/47007
PR libfortran/61847
* gfortran.texi: Add note about locale issues to thread-safety
section.

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

9 years agoDaily bump.
gccadmin [Mon, 10 Nov 2014 00:16:28 +0000 (00:16 +0000)]
Daily bump.

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

9 years agoCorrect ChangeLog
hjl [Sun, 9 Nov 2014 17:56:51 +0000 (17:56 +0000)]
Correct ChangeLog

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

9 years agoFix buffer overflow in avx256-unaligned-{load|store}-7.c
hjl [Sun, 9 Nov 2014 17:54:54 +0000 (17:54 +0000)]
Fix buffer overflow in avx256-unaligned-{load|store}-7.c

* testsuite/63305
* gcc.target/i386/avx256-unaligned-load-7.c (avx_test): Fix
buffer overflow.
* gcc.target/i386/avx256-unaligned-store-7.c (avx_test): Likewise.

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

9 years ago * config/avr/predicates.md (low_io_address_operand): Fix typo.
amylaar [Sun, 9 Nov 2014 17:06:50 +0000 (17:06 +0000)]
    * config/avr/predicates.md (low_io_address_operand): Fix typo.

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

9 years ago2014-11-09 Vladimir Makarov <vmakarov@redhat.com>
vmakarov [Sun, 9 Nov 2014 16:45:15 +0000 (16:45 +0000)]
2014-11-09  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/63620
* lra-constraints.c (substitute_pseudo): Add prefix lra_ to the
name.  Move to lra.c.  Make it external.
(substitute_pseudo_within_insn): Ditto.
(inherit_reload_reg, split_reg, remove_inheritance_pseudos): Use
the new names.
(undo_optional_reloads): Ditto.
* lra-int.h (lra_dump_bitmap_with_title, lra_substitute_pseudo):
New prototypes.
(lra_substitute_pseudo_within_insn): Ditto.
* lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): New.
(mark_regno_live): Add parameter.  Update bb_gen_pseudos.
(mark_regno_dead): Add parameter.  Update bb_gen_pseudos and
bb_killed_pseudos.
(struct bb_data, bb_data_t, bb_data): New.
(get_bb_data, get_bb_data_by_index): Ditto.
(all_hard_regs_bitmap): New.
(live_trans_fun, live_con_fun_0, live_con_fun_n, all_blocks): New.
(initiate_live_solver, finish_live_solver): New.
(process_bb_lives): Change return type.  Add code updating local
live data and removing dead insns.  Pass new argument to
mark_regno_live and mark_regno_dead.  Check changing bb pseudo
life info.  Return the result.
(lra_create_live_ranges): Add code to do global pseudo live
analysis.
(lra_live_ranges_init): Call initiate_live_solver.
(lra_live_ranges_finish): Call finish_live_solver.
* lra.c (lra_dump_bitmap_with_title): New.
(lra_substitute_pseudo, lra_substitute_pseudo_within_insn): Move
from lra-constraints.c.

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

9 years ago* gcc.target/powerpc/pr51623.c: Fix implicit declarations.
schwab [Sun, 9 Nov 2014 12:46:27 +0000 (12:46 +0000)]
* gcc.target/powerpc/pr51623.c: Fix implicit declarations.

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

9 years ago2014-11-09 Richard Biener <rguenther@suse.de>
rguenth [Sun, 9 Nov 2014 11:27:00 +0000 (11:27 +0000)]
2014-11-09  Richard Biener  <rguenther@suse.de>

* match.pd: Add patterns convering two conversions in a row
from fold-const.c.
* fold-const.c (fold_unary_loc): Remove them here.
* tree-ssa-forwprop.c (combine_conversions): Likewise.
* genmatch.c (dt_node::gen_kids): Check whether we may
follow SSA use-def chains.

* g++.dg/cpp0x/constexpr-reinterpret1.C: XFAIL.
* gcc.dg/tree-ssa/pr21031.c: XFAIL.

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

9 years agoDaily bump.
gccadmin [Sun, 9 Nov 2014 00:16:26 +0000 (00:16 +0000)]
Daily bump.

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

9 years agogcc/
rsandifo [Sat, 8 Nov 2014 11:25:32 +0000 (11:25 +0000)]
gcc/
* config/aarch64/aarch64.c: Include rtl-iter.h.
(aarch64_tls_operand_p_1): Delete.
(aarch64_tls_operand_p): Use FOR_EACH_SUBRTX.

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

9 years agogcc/
rsandifo [Sat, 8 Nov 2014 11:25:24 +0000 (11:25 +0000)]
gcc/
* config/arm/arm.c (arm_note_pic_base): Delete.
(arm_cannot_copy_insn_p): Use FOR_EACH_SUBRTX.

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

9 years agogcc/
rsandifo [Sat, 8 Nov 2014 11:25:17 +0000 (11:25 +0000)]
gcc/
* config/arm/arm.c: Include rtl-iter.h.
(arm_tls_referenced_p_1): Delete.
(arm_tls_referenced_p): Use FOR_EACH_SUBRTX.

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

9 years agogcc/
rsandifo [Sat, 8 Nov 2014 11:25:10 +0000 (11:25 +0000)]
gcc/
* config/arm/aarch-common.c: Include rtl-iter.h.
(search_term, arm_find_sub_rtx_with_search_term): Delete.
(arm_find_sub_rtx_with_code): Use FOR_EACH_SUBRTX_VAR.
(arm_get_set_operands): Pass the insn pattern rather than the
insn itself.
(arm_no_early_store_addr_dep): Likewise.

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

9 years ago * config/arm/arm.c (arm_set_return_address): Mark the store as frame
ebotcazou [Sat, 8 Nov 2014 09:17:23 +0000 (09:17 +0000)]
* config/arm/arm.c (arm_set_return_address): Mark the store as frame
related, if any.
(thumb_set_return_address): Likewise.

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

9 years ago DR 1558
jason [Sat, 8 Nov 2014 06:06:42 +0000 (06:06 +0000)]
DR 1558
* pt.c (dependent_alias_template_spec_p): New.
(dependent_type_p_r): Handle dependent alias template specialization.
(template_args_equal): A dependent alias template specializations
is not equal to its underlying type as a template argument.
* tree.c (strip_typedefs): Don't strip a dependent alias
template-id.

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

9 years agoDaily bump.
gccadmin [Sat, 8 Nov 2014 00:16:20 +0000 (00:16 +0000)]
Daily bump.

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

9 years ago2014-11-07 Andrew Pinski <apinski@cavium.com>
pinskia [Fri, 7 Nov 2014 23:08:43 +0000 (23:08 +0000)]
2014-11-07  Andrew Pinski  <apinski@cavium.com>

* gcc.c-torture/execute/20141107-1.c: New testcase.

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

9 years ago * parser.c (cp_parser_unqualified_id): Handle __func__ here.
jason [Fri, 7 Nov 2014 23:01:09 +0000 (23:01 +0000)]
* parser.c (cp_parser_unqualified_id): Handle __func__ here.
(cp_parser_primary_expression): Not here.

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

9 years agoFix typo and line wrap in ChangeLog
law [Fri, 7 Nov 2014 22:59:40 +0000 (22:59 +0000)]
Fix typo and line wrap in ChangeLog

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

9 years ago PR tree-optimization/61515
law [Fri, 7 Nov 2014 22:55:00 +0000 (22:55 +0000)]
PR tree-optimization/61515
* tree-ssa-threadedge.c (invalidate_equivalences): Walk the unwinding stack
rather than looking at ever SSA_NAME's value.

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

9 years ago2014-11-07 Richard Biener <rguenther@suse.de>
rguenth [Fri, 7 Nov 2014 20:57:01 +0000 (20:57 +0000)]
2014-11-07  Richard Biener  <rguenther@suse.de>

PR tree-optimization/63605
* fold-const.c (fold_binary_loc): Properly use element_precision
for types that may not be scalar.

* gcc.dg/vect/pr63605.c: New testcase.

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

9 years agoPR target/63534
kyukhin [Fri, 7 Nov 2014 20:42:36 +0000 (20:42 +0000)]
PR target/63534

gcc/
        * config/i386/i386.md (builtin_setjmp_receiver): Use
        pic_offset_table_rtx for PIC register.
        (nonlocal_goto_receiver): Delete.

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

9 years ago * g++.dg/pr61289-2.C: Renamed from pr61289-2.c.
law [Fri, 7 Nov 2014 17:02:55 +0000 (17:02 +0000)]
    * g++.dg/pr61289-2.C: Renamed from pr61289-2.c.

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

9 years ago2014-11-07 Daniel Hellstrom <daniel@gaisler.com>
danielh [Fri, 7 Nov 2014 16:35:01 +0000 (16:35 +0000)]
2014-11-07  Daniel Hellstrom  <daniel@gaisler.com>

* config.gcc (sparc-*-rtems*): Clean away unused t-elf.
* config/sparc/t-rtems: Add leon3v7 and muser-mode multilibs.

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

9 years ago[PATCH] gnu11 cleanup for gcc.target/arm/lp1243022.c
jiwang [Fri, 7 Nov 2014 16:28:37 +0000 (16:28 +0000)]
[PATCH] gnu11 cleanup for gcc.target/arm/lp1243022.c

  gcc/testsuite/
    * gcc.target/arm/lp1243022.c (xhci_test_trb_in_td): Add return type.
    (xhci_check_trb_in_td_math): Likewise.

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

9 years ago PR c++/63366
jason [Fri, 7 Nov 2014 16:21:15 +0000 (16:21 +0000)]
PR c++/63366
* decl.c (grokdeclarator): Fix __complex meaning __complex double.

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

9 years ago[PATCH] Add AArch64 to the target list for 20040204-1.c
jiwang [Fri, 7 Nov 2014 16:21:00 +0000 (16:21 +0000)]
[PATCH] Add AArch64 to the target list for 20040204-1.c

gcc/testsuite/
  * gcc.dg/tree-ssa/20040204-1.c: Add aarch64*-*-* to the list.

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

9 years ago2014-11-07 Arnaud Charlet <charlet@adacore.com>
charlet [Fri, 7 Nov 2014 13:59:41 +0000 (13:59 +0000)]
2014-11-07  Arnaud Charlet  <charlet@adacore.com>

* debug.adb, snames.adb-tmpl (Is_Keyword_Name): Consider 'overriding'
a keyword in Ada 95 mode when -gnatd.D is used.
* gnat_ugn.texi: Document -gnatd.D.

2014-11-07  Vasiliy Fofanov  <fofanov@adacore.com>

* gnatls.adb: Lower severity of the program's return value in
some common cases.

2014-11-07  Ed Schonberg  <schonberg@adacore.com>

* sem_ch10.adb (Decorate_Type): The limited view of a tagged
type has an empty list of primitive operations.

2014-11-07  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_ch3.adb (Analyze_Object_Declaration): Update references to SPARK
RM.
(Process_Full_View): Update references to SPARK RM.
* sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
to SPARK RM.
(Analyze_Subprogram_Body_Helper): Update references
to SPARK RM.
* sem_ch7.adb (Analyze_Package_Body_Helper): Update references
to SPARK RM.
* sem_prag.adb (Check_Ghost_Constituent): Update references to
SPARK RM.
* sem_res.adb (Check_Ghost_Policy): Update references to SPARK RM.
(Resolve_Actuals): Ensure that the actual parameter of a Ghost
subprogram whose formal is of mode IN OUT or OUT is Ghost.
* sem_util.adb (Check_Ghost_Completion): Update references to
SPARK RM.

2014-11-07  Ed Schonberg  <schonberg@adacore.com>

* exp_ch7.adb (Make_Final_Call): If type of designated object is
derived from that of the formal of the Deep_Finalize procedure,
add an unchecked conversion to prevent spurious type error.

2014-11-07  Robert Dewar  <dewar@adacore.com>

* table.adb, inline.adb, einfo.adb, gnat1drv.adb, exp_ch13.adb,
exp_fixd.adb, prj-conf.adb, exp_strm.adb, a-cofove.adb, exp_ch3.ads:
Minor reformatting.

2014-11-07  Robert Dewar  <dewar@adacore.com>

* sem_ch12.adb, sem_ch13.adb, prj-tree.adb: Minor reformatting.

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

9 years ago2014-11-07 Hristian Kirtchev <kirtchev@adacore.com>
charlet [Fri, 7 Nov 2014 13:54:09 +0000 (13:54 +0000)]
2014-11-07  Hristian Kirtchev  <kirtchev@adacore.com>

* einfo.adb (Set_Is_Checked_Ghost_Entity,
Set_Is_Ignored_Ghost_Entity): Add exceptions to the assertion
check.
* sem_ch6.adb (Check_Conformance): Consider only
source subprograms when checking for Ghost conformance.
* sem_prag.adb (Analyze_Pragma): Handle the case
where pragma Ghost applies to a stand alone subprogram body that
acts as a compilation unit.
* sem_res.adb: Minor reformatting (merge if statements).

2014-11-07  Ed Schonberg  <schonberg@adacore.com>

* exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
Check whether underlying type is constrained before generating
the object declaration for the result object of the function.

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

9 years ago2014-11-07 Robert Dewar <dewar@adacore.com>
charlet [Fri, 7 Nov 2014 13:51:20 +0000 (13:51 +0000)]
2014-11-07  Robert Dewar  <dewar@adacore.com>

* freeze.adb: Code clean up.

2014-11-07  Yannick Moy  <moy@adacore.com>

* a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cfinve.ads,
* a-cforma.ads, a-cforse.ads, a-cofove.ads: Mark First_To_Previous,
Current_To_Last and Strict_Equal as Ghost.

2014-11-07  Ed Schonberg  <schonberg@adacore.com>

* sem_ch3.adb: Code clean up.

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

9 years ago2014-11-07 Hristian Kirtchev <kirtchev@adacore.com>
charlet [Fri, 7 Nov 2014 13:47:31 +0000 (13:47 +0000)]
2014-11-07  Hristian Kirtchev  <kirtchev@adacore.com>

* freeze.adb (Freeze_Entity): Issue an error regardless of the
SPARK_Mode when a ghost type is effectively volatile.
* sem_ch3.adb (Analyze_Object_Contract): Decouple the checks
related to Ghost from SPARK_Mode.
* sem_res.adb (Check_Ghost_Policy): Issue an error regardless
of the SPARK_Mode when the Ghost policies do not match.
* sem_util.adb (Check_Ghost_Completion): Issue an error regardless
of the SPARK_Mode when the Ghost policies do not match.

2014-11-07  Ed Schonberg  <schonberg@adacore.com>

* sem_ch5.adb (Analyze_Iterator_Specification): return if name
in iterator does not have any usable aspect for iteration.

2014-11-07  Ed Schonberg  <schonberg@adacore.com>

* sem_ch6.adb (Analyze_Null_Procedure): Reject a null procedure
that there is a previous null procedure in scope with a matching
profile.

2014-11-07  Hristian Kirtchev  <kirtchev@adacore.com>

* atree.adb (Copy_Separate_Tree): Copy the aspect specifications.
* inline.adb (Has_Some_Contract): Do the check only when the
related entity has been analyzed.

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

9 years ago2014-11-07 Ed Schonberg <schonberg@adacore.com>
charlet [Fri, 7 Nov 2014 13:45:22 +0000 (13:45 +0000)]
2014-11-07  Ed Schonberg  <schonberg@adacore.com>

* exp_fixd.adb (Expand_Multiply_Fixed_By_Fixed_Giving_Integer):
If the restriction No_Floating_Point is in effect, and the
operands have the same type, introduce a temporary to hold
the fixed point result, to prevent the use of floating-point
operations at run-time.

2014-11-07  Robert Dewar  <dewar@adacore.com>

* freeze.adb (Check_Address_Clause): Minor reformatting
(Find_Constant): Minor reformatting.
(Freeze_Array_Type): Modify check for packed declarations.
(Freeze_Entity): Minor reformatting.

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

9 years ago PR ipa/63580
marxin [Fri, 7 Nov 2014 13:37:41 +0000 (13:37 +0000)]
PR ipa/63580
        * cgraphunit.c (cgraph_node::create_wrapper):
TREE_ADDRESSABLE is set to false for a newly created thunk.
* g++.dg/ipa/pr63580.C: New test.

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

9 years ago * ja.po: Update.
jsm28 [Fri, 7 Nov 2014 12:45:36 +0000 (12:45 +0000)]
* ja.po: Update.

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

9 years ago PR ipa/63747
marxin [Fri, 7 Nov 2014 12:35:43 +0000 (12:35 +0000)]
PR ipa/63747
* gcc.dg/ipa/pr63747.c: New test.
* ipa-icf-gimple.c (func_checker::compare_gimple_switch):
Missing checking for CASE_LOW and CASE_HIGH added.

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

9 years ago PR ipa/63595
marxin [Fri, 7 Nov 2014 12:32:30 +0000 (12:32 +0000)]
PR ipa/63595
* g++.dg/ipa/pr63595.C: New test.

* cgraphunit.c (cgraph_node::expand_thunk): DECL_BY_REFERENCE
is correctly handled for thunks created by IPA ICF.

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

9 years ago[PATCH] PR63676, exit tree fold when node be TREE_CLOBBER_P
jiwang [Fri, 7 Nov 2014 11:08:30 +0000 (11:08 +0000)]
[PATCH] PR63676, exit tree fold when node be TREE_CLOBBER_P

  gcc/
    PR tree-optimization/63676
    * gimple-fold.c (fold_gimple_assign): Do not fold node when
    TREE_CLOBBER_P be true.

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

9 years ago2014-11-07 Richard Biener <rguenther@suse.de>
rguenth [Fri, 7 Nov 2014 10:51:06 +0000 (10:51 +0000)]
2014-11-07  Richard Biener  <rguenther@suse.de>

PR middle-end/63770
* match.pd: Guard conflicting GENERIC pattern properly.

* gcc.dg/pr63770.c: New testcase.

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

9 years ago2014-11-07 Richard Biener <rguenther@suse.de>
rguenth [Fri, 7 Nov 2014 09:00:32 +0000 (09:00 +0000)]
2014-11-07  Richard Biener  <rguenther@suse.de>

* match.pd: Add patterns for POINTER_PLUS_EXPR association
and special patterns from tree-ssa-forwprop.c
* fold-const.c (fold_binary_loc): Remove them here.
* tree-ssa-forwprop.c (to_purge): New global bitmap.
(fwprop_set_lattice_val): New function.
(fwprop_invalidate_lattice): Likewise.
(remove_prop_source_from_use): Instead of purging dead EH
edges record blocks to do that in to_purge.
(tidy_after_forward_propagate_addr): Likewise.
(forward_propagate_addr_expr): Invalidate the lattice for
SSA names we release.
(simplify_conversion_from_bitmask): Likewise.
(simplify_builtin_call): Likewise.
(associate_pointerplus_align): Remove.
(associate_pointerplus_diff): Likewise.
(associate_pointerplus): Likewise.
(fold_all_stmts): Merge with ...
(pass_forwprop::execute): ... the original loop over all
basic-blocks.  Delay purging dead EH edges and invalidate
the lattice for SSA names we release.

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

9 years agocontrib/
mzakirov [Fri, 7 Nov 2014 08:15:19 +0000 (08:15 +0000)]
contrib/

2014-11-07  Marat Zakirov  <m.zakirov@samsung.com>

* mklog: Always doubt in functions.
Add EOF protection.

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

9 years agogcc/ChangeLog:
xguo [Fri, 7 Nov 2014 03:02:29 +0000 (03:02 +0000)]
gcc/ChangeLog:
2014-11-07  Terry Guo  <terry.guo@arm.com>

* config/arm/arm.opt (masm-syntax-unified): New option.
* doc/invoke.texi (-masm-syntax-unified): Document new option.
* config/arm/arm.h (TARGET_UNIFIED_ASM): Also include thumb1.
(ASM_APP_ON): Redefined.
* config/arm/arm.c (arm_option_override): Thumb2 inline assembly
code always use UAL syntax.
(arm_output_mi_thunk): Use UAL syntax for Thumb1 target.
* config/arm/thumb1.md: Likewise.

gcc/testsuite/ChangeLog:
2014-11-07  Terry Guo  <terry.guo@arm.com>

* gcc.target/arm/anddi_notdi-1.c: Match with UAL format.
* gcc.target/arm/pr40956.c: Likewise.
* gcc.target/arm/thumb1-Os-mult.c: Likewise.
* gcc.target/arm/thumb1-load-64bit-constant-3.c: Likewise.
* gcc.target/arm/scd42-1.c: Likewise.

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

9 years ago * config/pa/pa.md (trap): New insn. Add "trap" to attribute type.
danglin [Fri, 7 Nov 2014 00:50:44 +0000 (00:50 +0000)]
* config/pa/pa.md (trap): New insn.  Add "trap" to attribute type.
Don't allow trap insn in in_branch_delay, in_nullified_branch_delay
or in_call_delay.

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

9 years agoDaily bump.
gccadmin [Fri, 7 Nov 2014 00:16:27 +0000 (00:16 +0000)]
Daily bump.

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

9 years ago2014-11-06 Steve Ellcey <sellcey@imgtec.com>
sje [Thu, 6 Nov 2014 22:29:39 +0000 (22:29 +0000)]
2014-11-06  Steve Ellcey  <sellcey@imgtec.com>

* config.gcc (mips*-mti-linux*): Remove gnu_ld and gas assignments.
Set default_mips_arch and default_mips_abi instead of tm_defines.
(mips*-*-linux*): Set default_mips_arch and default_mips_abi instead
of tm_defines.
(mips*-*-*): Check with_arch and with_abi.  Set tm_defines.
* config/mips/mips.h (STANDARD_STARTFILE_PREFIX_1): Set default
based on MIPS_ABI_DEFAULT.
(STANDARD_STARTFILE_PREFIX_2): Ditto.

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

9 years agoPreserve original spellings of extended identifiers.
jsm28 [Thu, 6 Nov 2014 21:08:52 +0000 (21:08 +0000)]
Preserve original spellings of extended identifiers.

This patch makes cpplib track the original spellings of extended
identifiers, as well as the canonical UTF-8 version, in order to
follow standard semantics properly without needing a convoluted and
undocumented canonicalization in translation phase 1 (see bug 9449
comments 39-46 regarding such a canonicalization).

The spelling is tracked in cpp_identifier and cpp_macro_arg without
making cpp_token any larger.  The original spelling is used for checks
of duplicate macro definitions, stringizing (see the C++ tests added;
this case is only an issue for C++ not C because C makes it
implementation-defined whether a \ is inserted before the \ of a UCN
in a string or character constant when stringizing, while C++ does
not), pasting (relevant when the result is then stringized for C++)
and when macro definitions are output as text (e.g. for -d options).

Once a macro has been defined, only the original spelling of the
argument names needs keeping in the argument list.  While it is being
defined, however, both spellings are needed: the original one for
subsequent saving for checks of duplicate macro definitions, and the
canonical one which is the node marked specially to generate macro
argument tokens rather than normal identifier tokens.  The buffer that
is used to save the original values of the identifier tokens is
changed so that it stores both those original values and a pointer to
the canonical hash nodes, so that those canonical nodes can be found
when their values need restoring after the macro definition has been
parsed.

I believe this covers the known standards issues in extended
identifiers support (the remaining unimplemented C99 areas in GCC all
being floating-point-related), except for C++ translation of extended
characters to UCNs in phase 1 (which I have no plans to work on).
There are however probably issues left with handling of extended
identifiers in other places, as listed in
<https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00337.html> (those
issues are generally the sort of thing that could be addressed as bugs
outside development stage 1).  (The bulk of the potential issues Zack
was concerned about in 2003-5, that resulted in extended identifiers
being disabled in the absence of -fextended-identifiers, were
effectively eliminated by the audit and fixes I did in 2009, however;
that todo list reflects what was left over after that audit.)

Bootstrapped with no regressions on x86_64-unknown-linux-gnu.

libcpp:
* include/cpp-id-data.h (struct cpp_macro): Update comment
regarding parameters.
* include/cpplib.h (struct cpp_macro_arg, struct cpp_identifier):
Add spelling fields.
(struct cpp_token): Update comment on macro_arg.
* internal.h (_cpp_save_parameter): Add extra argument.
(_cpp_spell_ident_ucns): New declaration.
* lex.c (lex_identifier): Add SPELLING argument.  Set *SPELLING to
original spelling of identifier.
(_cpp_lex_direct): Update calls to lex_identifier.
(_cpp_spell_ident_ucns): New function, factored out of
cpp_spell_token.
(cpp_spell_token): Adjust FORSTRING argument semantics to return
original spelling of identifiers.  Use _cpp_spell_ident_ucns in
!FORSTRING case.
(_cpp_equiv_tokens): Check spellings of identifiers and macro
arguments are identical.
* macro.c (macro_arg_saved_data): New structure.
(paste_tokens): Use original spellings of identifiers from
cpp_spell_token.
(_cpp_save_parameter): Add argument SPELLING.  Save both canonical
node and its value.
(parse_params): Update calls to _cpp_save_parameter.
(lex_expansion_token): Save spelling of macro argument tokens.
(_cpp_create_definition): Extract canonical node from saved data.
(cpp_macro_definition): Use UCNs in spelling of macro name.  Use
original spellings of macro argument tokens and identifiers.
* traditional.c (scan_parameters): Update call to
_cpp_save_parameter.

gcc:
* doc/invoke.texi (-std=c99, -std=c11): Don't refer to corner
cases of extended identifiers.

gcc/testsuite:
* g++.dg/cpp/ucnid-2.C, g++.dg/cpp/ucnid-3.C,
gcc.dg/cpp/ucnid-11.c, gcc.dg/cpp/ucnid-12.c,
gcc.dg/cpp/ucnid-13.c, gcc.dg/cpp/ucnid-14.c,
gcc.dg/cpp/ucnid-15.c: New tests.

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

9 years ago * tree-cfgcleanup.c (fixup_noreturn_call): Do not perform DCE here.
ebotcazou [Thu, 6 Nov 2014 20:13:18 +0000 (20:13 +0000)]
* tree-cfgcleanup.c (fixup_noreturn_call): Do not perform DCE here.

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

9 years ago* config/m32c/cond.md (movqicc_<code>_<mode>): Remove mode of
dj [Thu, 6 Nov 2014 17:57:15 +0000 (17:57 +0000)]
* config/m32c/cond.md (movqicc_<code>_<mode>): Remove mode of
conditional.
(movhicc_<code>_<mode>): Likewise.
* config/m32c/m32c.c (encode_pattern_1): Specialise PSImode
subregs.
(m32c_eh_return_data_regno): Change to using memregs to avoid
tying up all the compute regs.
(m32c_legitimate_address_p) Subregs are not valid addresses.

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

9 years agoAdd a hook to inform a port about call arguments.
bernds [Thu, 6 Nov 2014 17:20:13 +0000 (17:20 +0000)]
Add a hook to inform a port about call arguments.

* target.def (call_args, end_call_args): New hooks.
* hooks.c (hook_void_rtx_tree): New empty function.
* hooks.h (hook_void_rtx_tree): Declare.
* doc/tm.texi.in (TARGET_CALL_ARGS, TARGET_END_CALL_ARGS): Add.
* doc/tm.texi: Regenerate.
* calls.c (expand_call): Slightly rearrange the code.  Use the two new
hooks.
(expand_library_call_value_1): Use the two new hooks.

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

9 years agoAllow a port to use pseudos as call args; don't put them in the fusage.
bernds [Thu, 6 Nov 2014 17:20:05 +0000 (17:20 +0000)]
Allow a port to use pseudos as call args; don't put them in the fusage.

* expr.c (use_reg_mode): Just return for pseudo registers.

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

9 years agoDon't combine calls into i3, it wouldn't be changed into a CALL_INSN.
bernds [Thu, 6 Nov 2014 17:19:57 +0000 (17:19 +0000)]
Don't combine calls into i3, it wouldn't be changed into a CALL_INSN.

* combine.c (try_combine): Don't allow a call as one of the source
insns.

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

9 years agoAdd a new asm hook to print the end of a variable definition.
bernds [Thu, 6 Nov 2014 17:19:48 +0000 (17:19 +0000)]
Add a new asm hook to print the end of a variable definition.

* target.def (decl_end): New hook.
* varasm.c (assemble_variable_contents, assemble_constant_contents):
Use it.
* doc/tm.texi.in (TARGET_ASM_DECL_END): Add.
* doc/tm.texi: Regenerate.

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

9 years agoruntime: Use stckf unconditionally on s390.
ian [Thu, 6 Nov 2014 17:00:13 +0000 (17:00 +0000)]
runtime: Use stckf unconditionally on s390.

2014-11-05  Dominik Vogt  <vogt@linux.vnet.ibm.com>

* libgo/runtime/runtime.c (runtime_cputicks): s390: use stckf
unconditionally

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

9 years agomksysinfo: Tolerate missing structures in upcase_fields.
ian [Thu, 6 Nov 2014 16:44:32 +0000 (16:44 +0000)]
mksysinfo: Tolerate missing structures in upcase_fields.

2014-11-06  Dominik Vogt  <vogt@linux.vnet.ibm.com>

* libgo/mksysinfo.sh: Tolerate missing structures.

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

9 years ago[AArch64] Add ACLE arch-related predefined macros
jiwang [Thu, 6 Nov 2014 14:41:52 +0000 (14:41 +0000)]
[AArch64] Add ACLE arch-related predefined macros

2014-11-06  Renlin Li  <renlin.li@arm.com>

* config/aarch64/aarch64.c (aarch64_architecture_version): New.
(processor): New architecture_version field.
(aarch64_override_options): Initialize aarch64_architecture_version.
* config/aarch64/aarch64.h (TARGET_CPU_CPP_BUILTINS): Define __ARM_ARCH,
__ARM_ARCH_PROFILE, aarch64_arch_name macro.

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

9 years ago[Patchv3] Control SRA and IPA-SRA by a param rather than MOVE_RATIO
jgreenhalgh [Thu, 6 Nov 2014 14:18:52 +0000 (14:18 +0000)]
[Patchv3] Control SRA and IPA-SRA by a param rather than MOVE_RATIO

gcc/

* params.def (sra-max-scalarization-size-Ospeed): New.
(sra-max-scalarization-size-Osize): Likewise.
* doc/invoke.texi (sra-max-scalarization-size-Ospeed): Document.
(sra-max-scalarization-size-Osize): Likewise.
* toplev.c (process_options): Set default values for new
parameters.
* tree-sra.c (analyze_all_variable_accesses): Use new parameters.
* targhooks.c (get_move_ratio): Remove static designator.
* target.h (get_move_ratio): Declare.

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

9 years ago * sanopt.c (sanopt_optimize_walker): Limit removal of the checks.
mpolacek [Thu, 6 Nov 2014 11:22:59 +0000 (11:22 +0000)]
* sanopt.c (sanopt_optimize_walker): Limit removal of the checks.
Remove vector limit.
testsuite/
* c-c++-common/ubsan/align-2.c: Add dg-output.
* c-c++-common/ubsan/align-4.c: Likewise.
* c-c++-common/ubsan/align-6.c: New test.
* c-c++-common/ubsan/align-7.c: New test.
* c-c++-common/ubsan/align-8.c: New test.
* g++.dg/ubsan/null-1.C: Add dg-output.
* g++.dg/ubsan/null-2.C: Likewise.
* g++.dg/ubsan/null-3.C: New test.
* g++.dg/ubsan/null-4.C: New test.
* g++.dg/ubsan/null-5.C: New test.

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

9 years agoCorrectly check dg-require-effective-target in avx512 tests.
tocarip [Thu, 6 Nov 2014 11:01:59 +0000 (11:01 +0000)]
Correctly check dg-require-effective-target in avx512 tests.

gcc/testsuite

* gcc.target/i386/avx512vl-vandnpd-2.c: Fix
dg-require-effective-target check.
* gcc.target/i386/avx512vl-vandnps-2.c: Ditto.
* gcc.target/i386/avx512vl-vandpd-2.c: Ditto.
* gcc.target/i386/avx512vl-vandps-2.c: Ditto.
* gcc.target/i386/avx512vl-vbroadcastf32x2-2.c: Ditto.
* gcc.target/i386/avx512vl-vbroadcastf32x4-2.c: Ditto.
* gcc.target/i386/avx512vl-vbroadcastf64x2-2.c: Ditto.
* gcc.target/i386/avx512vl-vbroadcasti32x2-2.c: Ditto.
* gcc.target/i386/avx512vl-vbroadcasti32x4-2.c: Ditto.
* gcc.target/i386/avx512vl-vbroadcasti64x2-2.c: Ditto.
* gcc.target/i386/avx512vl-vcvtpd2qq-2.c: Ditto.
* gcc.target/i386/avx512vl-vcvtpd2uqq-2.c: Ditto.
* gcc.target/i386/avx512vl-vcvtps2qq-2.c: Ditto.
* gcc.target/i386/avx512vl-vcvtps2uqq-2.c: Ditto.
* gcc.target/i386/avx512vl-vcvtqq2pd-2.c: Ditto.
* gcc.target/i386/avx512vl-vcvtqq2ps-2.c: Ditto.
* gcc.target/i386/avx512vl-vcvttpd2qq-2.c: Ditto.
* gcc.target/i386/avx512vl-vcvttpd2uqq-2.c: Ditto.
* gcc.target/i386/avx512vl-vcvttps2qq-2.c: Ditto.
* gcc.target/i386/avx512vl-vcvttps2uqq-2.c: Ditto.
* gcc.target/i386/avx512vl-vcvtuqq2pd-2.c: Ditto.
* gcc.target/i386/avx512vl-vcvtuqq2ps-2.c: Ditto.
* gcc.target/i386/avx512vl-vdbpsadbw-2.c: Ditto.
* gcc.target/i386/avx512vl-vextractf64x2-2.c: Ditto.
* gcc.target/i386/avx512vl-vextracti64x2-2.c: Ditto.
* gcc.target/i386/avx512vl-vfpclasspd-2.c: Ditto.
* gcc.target/i386/avx512vl-vfpclassps-2.c: Ditto.
* gcc.target/i386/avx512vl-vinsertf64x2-2.c: Ditto.
* gcc.target/i386/avx512vl-vinserti64x2-2.c: Ditto.
* gcc.target/i386/avx512vl-vmovdqu16-2.c: Ditto.
* gcc.target/i386/avx512vl-vmovdqu8-2.c: Ditto.
* gcc.target/i386/avx512vl-vorpd-2.c: Ditto.
* gcc.target/i386/avx512vl-vorps-2.c: Ditto.
* gcc.target/i386/avx512vl-vpabsb-2.c: Ditto.
* gcc.target/i386/avx512vl-vpabsw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpackssdw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpacksswb-2.c: Ditto.
* gcc.target/i386/avx512vl-vpackusdw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpackuswb-2.c: Ditto.
* gcc.target/i386/avx512vl-vpaddb-2.c: Ditto.
* gcc.target/i386/avx512vl-vpaddsb-2.c: Ditto.
* gcc.target/i386/avx512vl-vpaddsw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpaddusb-2.c: Ditto.
* gcc.target/i386/avx512vl-vpaddusw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpaddw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpalignr-2.c: Ditto.
* gcc.target/i386/avx512vl-vpavgb-2.c: Ditto.
* gcc.target/i386/avx512vl-vpavgw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpblendmb-2.c: Ditto.
* gcc.target/i386/avx512vl-vpblendmw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpbroadcastb-2.c: Ditto.
* gcc.target/i386/avx512vl-vpbroadcastw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpcmpb-2.c: Ditto.
* gcc.target/i386/avx512vl-vpcmpeqb-2.c: Ditto.
* gcc.target/i386/avx512vl-vpcmpequb-2.c: Ditto.
* gcc.target/i386/avx512vl-vpcmpequw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpcmpeqw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpcmpgtb-2.c: Ditto.
* gcc.target/i386/avx512vl-vpcmpgtub-2.c: Ditto.
* gcc.target/i386/avx512vl-vpcmpgtuw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpcmpgtw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpcmpub-2.c: Ditto.
* gcc.target/i386/avx512vl-vpcmpuw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpcmpw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpermi2w-2.c: Ditto.
* gcc.target/i386/avx512vl-vpermt2w-2.c: Ditto.
* gcc.target/i386/avx512vl-vpermw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpmaddubsw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpmaddwd-2.c: Ditto.
* gcc.target/i386/avx512vl-vpmaxsb-2.c: Ditto.
* gcc.target/i386/avx512vl-vpmaxsw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpmaxub-2.c: Ditto.
* gcc.target/i386/avx512vl-vpmaxuw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpminsb-2.c: Ditto.
* gcc.target/i386/avx512vl-vpminsw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpminub-2.c: Ditto.
* gcc.target/i386/avx512vl-vpminuw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpmovb2m-2.c: Ditto.
* gcc.target/i386/avx512vl-vpmovd2m-2.c: Ditto.
* gcc.target/i386/avx512vl-vpmovm2b-2.c: Ditto.
* gcc.target/i386/avx512vl-vpmovm2d-2.c: Ditto.
* gcc.target/i386/avx512vl-vpmovm2q-2.c: Ditto.
* gcc.target/i386/avx512vl-vpmovm2w-2.c: Ditto.
* gcc.target/i386/avx512vl-vpmovq2m-2.c: Ditto.
* gcc.target/i386/avx512vl-vpmovswb-2.c: Ditto.
* gcc.target/i386/avx512vl-vpmovsxbw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpmovuswb-2.c: Ditto.
* gcc.target/i386/avx512vl-vpmovw2m-2.c: Ditto.
* gcc.target/i386/avx512vl-vpmovwb-2.c: Ditto.
* gcc.target/i386/avx512vl-vpmovzxbw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpmulhrsw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpmulhuw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpmulhw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpmullq-2.c: Ditto.
* gcc.target/i386/avx512vl-vpmullw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpshufb-2.c: Ditto.
* gcc.target/i386/avx512vl-vpshufhw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpshuflw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpsllvw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpsllw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpsllwi-2.c: Ditto.
* gcc.target/i386/avx512vl-vpsravw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpsraw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpsrawi-2.c: Ditto.
* gcc.target/i386/avx512vl-vpsrlvw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpsrlw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpsrlwi-2.c: Ditto.
* gcc.target/i386/avx512vl-vpsubb-2.c: Ditto.
* gcc.target/i386/avx512vl-vpsubsb-2.c: Ditto.
* gcc.target/i386/avx512vl-vpsubsw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpsubusb-2.c: Ditto.
* gcc.target/i386/avx512vl-vpsubusw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpsubw-2.c: Ditto.
* gcc.target/i386/avx512vl-vptestmb-2.c: Ditto.
* gcc.target/i386/avx512vl-vptestmw-2.c: Ditto.
* gcc.target/i386/avx512vl-vptestnmb-2.c: Ditto.
* gcc.target/i386/avx512vl-vptestnmw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpunpckhbw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpunpckhwd-2.c: Ditto.
* gcc.target/i386/avx512vl-vpunpcklbw-2.c: Ditto.
* gcc.target/i386/avx512vl-vpunpcklwd-2.c: Ditto.
* gcc.target/i386/avx512vl-vrangepd-2.c: Ditto.
* gcc.target/i386/avx512vl-vrangeps-2.c: Ditto.
* gcc.target/i386/avx512vl-vreducepd-2.c: Ditto.
* gcc.target/i386/avx512vl-vreduceps-2.c: Ditto.
* gcc.target/i386/avx512vl-vxorpd-2.c: Ditto.
* gcc.target/i386/avx512vl-vxorps-2.c: Ditto.

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

9 years ago Fix incorrect ChangeLog entry.
halewang [Thu, 6 Nov 2014 10:57:43 +0000 (10:57 +0000)]
Fix incorrect ChangeLog entry.

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

9 years ago Move testsuits ChangeLog entry to correct ChangeLog.
halewang [Thu, 6 Nov 2014 10:46:58 +0000 (10:46 +0000)]
Move testsuits ChangeLog entry to correct ChangeLog.

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

9 years agogcc/testsuite/
ienkovich [Thu, 6 Nov 2014 09:44:05 +0000 (09:44 +0000)]
gcc/testsuite/

* lib/mpx-dg.exp: New.
* gcc.target/i386/i386.exp: Load mpx-dg.exp.
* gcc.target/i386/chkp-builtins-1.c: Require mpx target.
* gcc.target/i386/chkp-builtins-2.c: Likewise.
* gcc.target/i386/chkp-builtins-3.c: Likewise.
* gcc.target/i386/chkp-builtins-4.c: Likewise.
* gcc.target/i386/chkp-const-check-1.c: Likewise.
* gcc.target/i386/chkp-const-check-2.c: Likewise.
* gcc.target/i386/chkp-lifetime-1.c: Likewise.
* gcc.target/i386/chkp-remove-bndint-1.c: Likewise.
* gcc.target/i386/chkp-remove-bndint-2.c: Likewise.

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

9 years ago2014-11-06 Richard Biener <rguenther@suse.de>
rguenth [Thu, 6 Nov 2014 09:07:39 +0000 (09:07 +0000)]
2014-11-06  Richard Biener  <rguenther@suse.de>

* match.pd: Implement bitwise binary and unary simplifications
from tree-ssa-forwprop.c.
* fold-const.c (fold_unary_loc): Remove them here.
(fold_binary_loc): Likewise.
* tree-ssa-forwprop.c (simplify_not_neg_expr): Remove.
(truth_valued_ssa_name): Likewise.
(lookup_logical_inverted_value): Likewise.
(simplify_bitwise_binary_1): Likewise.
(hoist_conversion_for_bitop_p): Likewise.
(simplify_bitwise_binary_boolean): Likewise.
(simplify_bitwise_binary): Likewise.
(pass_forwprop::execute): Remove calls to simplify_not_neg_expr
and simplify_bitwise_binary.
* genmatch.c (dt_node::append_true_op): Use safe_as_a for parent.
(decision_tree::insert): Also insert non-expressions.

* gcc.dg/tree-ssa/forwprop-28.c: Adjust scanning for the
desired transform.

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

9 years ago2014-11-06 Hale Wang <Hale.Wang@arm.com>
halewang [Thu, 6 Nov 2014 07:02:30 +0000 (07:02 +0000)]
2014-11-06  Hale Wang  <Hale.Wang@arm.com>

* config/arm/arm-cores.def: Add support for
-mcpu=cortex-m0.small-multiply,cortex-m0plus.small-multiply,
cortex-m1.small-multiply.
* config/arm/arm-tables.opt: Regenerate.
* config/arm/arm-tune.md: Regenerate.
* config/arm/arm.c: Update the rtx-costs for MUL.
* config/arm/bpabi.h: Handle
-mcpu=cortex-m0.small-multiply,cortex-m0plus.small-multiply,
cortex-m1.small-multiply.
* doc/invoke.texi: Document
-mcpu=cortex-m0.small-multiply,cortex-m0plus.small-multiply,
cortex-m1.small-multiply.
* testsuite/gcc.target/arm/small-multiply-m0-1.c: New test case.
* testsuite/gcc.target/arm/small-multiply-m0-2.c: Likewise.
* testsuite/gcc.target/arm/small-multiply-m0-3.c: Likewise.
* testsuite/gcc.target/arm/small-multiply-m0plus-1.c: Likewise.
* testsuite/gcc.target/arm/small-multiply-m0plus-2.c: Likewise.
* testsuite/gcc.target/arm/small-multiply-m0plus-3.c: Likewise.
* testsuite/gcc.target/arm/small-multiply-m1-1.c: Likewise.
* testsuite/gcc.target/arm/small-multiply-m1-2.c: Likewise.
* testsuite/gcc.target/arm/small-multiply-m1-3.c: Likewise.

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

9 years ago Fix incorrect ChangeLog entry.
halewang [Thu, 6 Nov 2014 06:26:27 +0000 (06:26 +0000)]
Fix incorrect ChangeLog entry.

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

9 years ago2014-10-11 Hale Wang <Hale.Wang@arm.com>
halewang [Thu, 6 Nov 2014 05:38:45 +0000 (05:38 +0000)]
2014-10-11  Hale Wang  <Hale.Wang@arm.com>

* config/arm/arm.c: Add cortex-m7 tune.
* config/arm/arm-cores.def: Use cortex-m7 tune.

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

9 years ago2014-11-06 Prachi Godbole <prachi.godbole@imgtec.com>
prachigodbole [Thu, 6 Nov 2014 04:42:33 +0000 (04:42 +0000)]
2014-11-06  Prachi Godbole  <prachi.godbole@imgtec.com>

* MAINTAINERS (Write After Approval): Add myself.

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

9 years agoDaily bump.
gccadmin [Thu, 6 Nov 2014 00:16:24 +0000 (00:16 +0000)]
Daily bump.

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

9 years agoFix all MIPS test failures caused by implicit declaration/int warnings.
mpf [Wed, 5 Nov 2014 23:37:02 +0000 (23:37 +0000)]
Fix all MIPS test failures caused by implicit declaration/int warnings.

gcc/testsuite/

* gcc.target/mips/asm-1.c (bar): Add prototype.
* gcc.target/mips/call-1.c (f, h): Add return type.
* gcc.target/mips/call-5.c (f, h): Likewise.
* gcc.target/mips/call-6.c (f, h): Likewise.
* gcc.target/mips/call-3.c (f): Likewise.
* gcc.target/mips/call-2.c (g): Add prototype.
(f): Add return type.
* gcc.target/mips/call-4.c: Likewise.
* gcc.target/mips/code-readable-1.c (foo): Add type for x.
* gcc.target/mips/code-readable-2.c (foo): Likewise.
* gcc.target/mips/code-readable-3.c (foo): Likewise.
* gcc.target/mips/code-readable-4.c (foo): Likewise.
* gcc.target/mips/const-anchor-1.c (g): Add prototype.
* gcc.target/mips/const-anchor-2.c (g): Likewise.
* gcc.target/mips/const-anchor-3.c (g): Likewise.
* gcc.target/mips/const-anchor-4.c (g): Likewise.
* gcc.target/mips/interrupt_handler.c (t): Likewise.
* gcc.target/mips/mips-nonpic/main-1.c (main): Add return type.
* gcc.target/mips/mips-nonpic/main-2.c (main): Likewise.
* gcc.target/mips/mips-nonpic/main-3.c (main): Likewise.
* gcc.target/mips/mips-nonpic/main-4.c (main): Likewise.
* gcc.target/mips/mips-nonpic/main-5.c (main): Likewise.
* gcc.target/mips/mips-nonpic/main-6.c (main): Likewise.
* gcc.target/mips/mips-nonpic/main-7.c (main): Likewise.
* gcc.target/mips/mips-nonpic/main-8.c (main): Likewise.
* gcc.target/mips/mips-nonpic/main-9.c (main): Likewise.
* gcc.target/mips/mips-nonpic/main-10.c (main): Likewise.
* gcc.target/mips/mips-nonpic/main-11.c (main): Likewise.
* gcc.target/mips/mips-nonpic/main-12.c (main): Likewise.
* gcc.target/mips/mips-nonpic/main-13.c (main): Likewise.
* gcc.target/mips/mips-nonpic/main-14.c (main): Likewise.
* gcc.target/mips/mips-nonpic/main-15.c (main): Likewise.
* gcc.target/mips/mips-nonpic/main-16.c (main): Likewise.
* gcc.target/mips/mips-nonpic/mips-nonpic.h
(nonpic_call, nonpic_addr_call): Add prototype.
(pic_call, pic_addr_call): Likewise.
* gcc.target/mips/mips16e-extends.c (validate): Likewise.
* gcc.target/mips/octeon-bbit-3.c (foo): Likewise.
* gcc.target/mips/octeon-seq-4.c (h): Likewise.
* gcc.target/mips/truncate-3.c (g): Add prototype.
(f): Add return type.

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

9 years agoRevert revision 217149 because it breaks Ada:
manu [Wed, 5 Nov 2014 22:17:22 +0000 (22:17 +0000)]
Revert revision 217149 because it breaks Ada:

gcc/testsuite/ChangeLog:

2014-11-05  Anthony Brandon  <anthony.brandon@gmail.com>

        PR driver/36312
        * gcc.misc-tests/output.exp: New test case for identical input and
        output files.

include/ChangeLog:

2014-11-05  Anthony Brandon  <anthony.brandon@gmail.com>

        PR driver/36312
        * filenames.h: Add prototype for canonical_filename_eq.

gcc/ChangeLog:

2014-11-05  Anthony Brandon  <anthony.brandon@gmail.com>

        PR driver/36312
        * diagnostic-core.h: Add prototype for fatal_error.
        * diagnostic.c (fatal_error): New function fatal_error.
        * gcc.c (store_arg): Remove have_o_argbuf_index.
        (process_command): Check if input and output files are the same.
        * toplev.c (init_asm_output): Check if input and output files are
        the same.

libiberty/ChangeLog:

2014-11-05  Anthony Brandon  <anthony.brandon@gmail.com>

        PR driver/36312
        * filename_cmp.c (canonical_filename_eq): New function to check if
        file names are the same.
        * functions.texi: Updated with documentation for new function.

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

9 years ago * gnatvsn.ads (Library_Version): Bump to 5.0.
ebotcazou [Wed, 5 Nov 2014 21:04:50 +0000 (21:04 +0000)]
* gnatvsn.ads (Library_Version): Bump to 5.0.

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

9 years ago PR target/63538
uros [Wed, 5 Nov 2014 21:00:07 +0000 (21:00 +0000)]
PR target/63538
* config/i386/i386.c (in_large_data_p): Reject automatic variables.
(ix86_encode_section_info): Do not check for non-automatic varibles
when setting SYMBOL_FLAG_FAR_ADDR flag.
(x86_64_elf_select_section): Do not check ix86_cmodel here.
(x86_64_elf_unique_section): Ditto.
(x86_elf_aligned_common): Emit tab before .largecomm.

testsuite/ChangeLog:

PR target/63538
* gcc.target/i386/pr63538.c: New test.

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

9 years ago * gcc-interface/trans.c (Subprogram_Body_to_gnu): For a function with
ebotcazou [Wed, 5 Nov 2014 19:17:00 +0000 (19:17 +0000)]
* gcc-interface/trans.c (Subprogram_Body_to_gnu): For a function with
copy-in/copy-out parameters and which returns by invisible reference,
do not create the variable for the return value; instead, manually
generate the indirect copy out statements on exit.
(gnat_to_gnu) <N_Simple_Return_Statement>: Adjust accordingly and build
a simple indirect assignment for the return value.

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

9 years ago2014-11-04 François Dumont <fdumont@gcc.gnu.org>
fdumont [Wed, 5 Nov 2014 19:16:13 +0000 (19:16 +0000)]
2014-11-04  François Dumont  <fdumont@gcc.gnu.org>
    Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/63698
* include/bits/stl_tree.h (_Reuse_or_alloc_node): Simplify constructor.
Always move to the left node if there is one.
* testsuite/23_containers/set/allocator/move_assign.cc (test04): New.

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

9 years ago * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: For a
ebotcazou [Wed, 5 Nov 2014 19:03:26 +0000 (19:03 +0000)]
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: For a
derived untagged type that renames discriminants, be prepared for
a type derived from a private discriminated type when changing the
type of the stored discriminants.

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

9 years ago * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): Set
ebotcazou [Wed, 5 Nov 2014 18:52:07 +0000 (18:52 +0000)]
* gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): Set
the SLOC of the node on the call to set_jmpbuf_address_soft emitted
on block entry with SJLJ.

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

9 years ago * gcc-interface/utils.c (create_subprog_decl): Move code dealing with
ebotcazou [Wed, 5 Nov 2014 18:47:04 +0000 (18:47 +0000)]
* gcc-interface/utils.c (create_subprog_decl): Move code dealing with
conflicting inlining status of nested subprograms to...
* gcc-interface/trans.c (check_inlining_for_nested_subprog): ...here.
(Attribute_to_gnu) <Attr_Access>: Call it.
(Call_to_gnu): Likewise.
(Subprogram_Body_to_gnu): Drop the body if it is an inlined external
function that has been marked uninlinable.

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

9 years agogcc/testsuite/ChangeLog:
manu [Wed, 5 Nov 2014 17:23:46 +0000 (17:23 +0000)]
gcc/testsuite/ChangeLog:

2014-11-05  Anthony Brandon  <anthony.brandon@gmail.com>

PR driver/36312
* gcc.misc-tests/output.exp: New test case for identical input and
output files.

include/ChangeLog:

2014-11-05  Anthony Brandon  <anthony.brandon@gmail.com>

PR driver/36312
* filenames.h: Add prototype for canonical_filename_eq.

gcc/ChangeLog:

2014-11-05  Anthony Brandon  <anthony.brandon@gmail.com>

PR driver/36312
* diagnostic-core.h: Add prototype for fatal_error.
* diagnostic.c (fatal_error): New function fatal_error.
* gcc.c (store_arg): Remove have_o_argbuf_index.
(process_command): Check if input and output files are the same.
* toplev.c (init_asm_output): Check if input and output files are
the same.

libiberty/ChangeLog:

2014-11-05  Anthony Brandon  <anthony.brandon@gmail.com>

PR driver/36312
* filename_cmp.c (canonical_filename_eq): New function to check if
file names are the same.
* functions.texi: Updated with documentation for new function.

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

9 years agoEnable -fextended-identifiers by default.
jsm28 [Wed, 5 Nov 2014 16:19:10 +0000 (16:19 +0000)]
Enable -fextended-identifiers by default.

As proposed at <https://gcc.gnu.org/ml/gcc/2014-11/msg00014.html>,
this patch enables -fextended-identifiers by default for all standard
versions including this feature (all C++ versions, C99 and above for
C, but not C90 / C94 / gnu89 / preprocessing assembler).  It adds a
couple of tests for areas where I previously noted testsuite coverage
for extended identifiers was lacking, removes -fextended-identifiers
from existing tests, adds -g to various such tests to verify that
extended identifiers don't break debug info generation and removes the
test that was only there to verify that the feature was off by
default.

The current state of the feature may not correspond exactly to any
particular checklist from 2004/5 (see bug 9449) of what was wanted
before enabling the feature by default, but I don't think it's any
worse than plenty of other features supported by default before every
corner case is fully functional, and think problems can readily be
fixed incrementally.

The following aspects of extended identifiers could still do with more
work (and should be straightforward):

* C -aux-info (output should use UCNs).

* ObjC -gen-decls (output should use UCNs; associated diagnostics from
  the ObjC front end should use extended characters or UCNs as
  appropriate to the locale, via using %qE or identifier_to_locale).

* Use DW_AT_use_UTF8 in DWARF-3 debug info for compilation units built
  with extended identifiers enabled (or unconditionally).

* cpplib diagnostics (outputting characters or UCNs as appropriate
  depending on the locale, as done for identifiers in non-cpplib
  diagnostics).

* C++ test for UCN linking with C and extern "C".

* Check GDB support / file issues for support if needed.

* Actual UTF-8 in identifiers (?).  (Be careful about not affecting
  performance for the normal fast path of lexing identifiers, if
  possible.)

The following may be trickier:

* cpplib spelling preservation (required to diagnose macro
  redefinition with different spellings of the same identifier in the
  definition or argument names; different spellings of the name of the
  macro itself are OK, however; also required for correct handling of
  multiple stringizing in C++); correct output for -d (UCNs), DWARF
  debug info for macros (UCNs), PCH and PCH tests.  (Spelling
  preservation is the issue that needs fixing to remove references to
  corner cases in the documentation of -std=c99 and -std=c11 and in
  c99status.html.)  The idea would be to add a second pointer to
  cpp_identifier that stores the original spelling (whether for
  extended identifiers only, or for all identifiers); this does not
  enlarge cpp_token because the resulting larger cpp_identifier
  structure is no bigger than cpp_string.

* C++ translation of extended characters (including $@` and various
  control characters) to UCNs in phase 1 (note diagnostics thus
  needed, but not for C++11, for control characters in strings /
  character constants as those UCNs invalid); a likely implementation
  approach is to do translation when identifiers / strings / character
  constants are lexed, together with errors for stray $@` / control
  characters in program as not being valid UCNs in identifiers ($ only
  if not accepted in identifiers); note that this translation should
  not take place inside raw string literals.

Bootstrapped with no regressions on x86_64-unknown-linux-gnu.

libcpp:
PR preprocessor/9449
* init.c (lang_defaults): Enable extended identifiers for C++ and
C99-based standards.

gcc:
PR preprocessor/9449
* doc/cpp.texi (Character sets, Tokenization)
(Implementation-defined behavior): Don't refer to UCNs in
identifiers requiring -fextended-identifiers.
* doc/cppopts.texi (-fextended-identifiers): Document as enabled
by default for C99 and later and C++.
* doc/invoke.texi (-std=c99, -std=c11): Don't refer to extended
identifiers needing -fextended-identifiers.

gcc/testsuite:
PR preprocessor/9449
* lib/target-supports.exp (check_effective_target_ucn_nocache):
Don't use -fextended-identifiers.
* c-c++-common/cpp/normalize-3.c, c-c++-common/cpp/ucnid-2011-1.c,
g++.dg/cpp/ucn-1.C, g++.dg/cpp/ucnid-1.C, g++.dg/other/ucnid-1.C,
gcc.dg/cpp/normalize-1.c, gcc.dg/cpp/normalize-2.c,
gcc.dg/cpp/normalize-4.c: Don't use -fextended-identifiers.
* gcc.dg/cpp/ucnid-1.c: Don't use -fextended-identifiers.  Use
-g3.
* gcc.dg/cpp/ucnid-10.c, gcc.dg/cpp/ucnid-2.c,
gcc.dg/cpp/ucnid-3.c, gcc.dg/cpp/ucnid-4.c, gcc.dg/cpp/ucnid-5.c,
gcc.dg/cpp/ucnid-7.c, gcc.dg/cpp/ucnid-9.c,
gcc.dg/cpp/warn-normalized-1.c, gcc.dg/cpp/warn-normalized-2.c,
gcc.dg/cpp/warn-normalized-3.c: Don't use -fextended-identifiers.
* gcc.dg/ucnid-1.c, gcc.dg/ucnid-2.c, gcc.dg/ucnid-3.c,
gcc.dg/ucnid-4.c, gcc.dg/ucnid-5.c, gcc.dg/ucnid-6.c: Don't use
-fextended-identifiers.  Use -g.
* gcc.dg/ucnid-7.c, gcc.dg/ucnid-8.c: Don't use
-fextended-identifiers.
* gcc.dg/ucnid-9.c: Don't use -fextended-identifiers.  Use -g.
* gcc.dg/ucnid-10.c: Don't use -fextended-identifiers.
* gcc.dg/ucnid-11.c, gcc.dg/ucnid-12.c: Don't use
-fextended-identifiers.  Use -g.
* gcc.dg/ucnid-13.c: Don't use -fextended-identifiers.
* gcc.dg/cpp/ucnid-8.c: Remove test.
* gcc.dg/cpp/ucnid-10.c, gcc.dg/ucnid-14.c: New tests.

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

9 years agoFix dg.torture tests with avx512
tocarip [Wed, 5 Nov 2014 15:55:44 +0000 (15:55 +0000)]
Fix dg.torture tests with avx512

gcc/
* config/i386/i386.c (expand_vec_perm_pshufb): Try vpermq/vpermd
for 512-bit wide modes.
(expand_vec_perm_1): Use correct versions of patterns.
* config/i386/sse.md (avx512f_vec_dup_<mode>_1): New.
(vashr<mode>3<mask_name>): Split V8HImode and V16QImode.

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

9 years ago2014-11-05 Christophe Lyon <christophe.lyon@linaro.org>
clyon [Wed, 5 Nov 2014 15:22:28 +0000 (15:22 +0000)]
2014-11-05  Christophe Lyon  <christophe.lyon@linaro.org>

* gcc.target/aarch64/advsimd-intrinsics/advsimd-intrinsics.exp:
Skip tests if target does not support Neon.

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

9 years ago[AArch64,ARM] support bswap tests on aarch64_be. Skip them on ARM
clyon [Wed, 5 Nov 2014 15:19:19 +0000 (15:19 +0000)]
[AArch64,ARM] support bswap tests on aarch64_be. Skip them on ARM
targets older than v6.

2014-11-05  Christophe Lyon  <christophe.lyon@linaro.org>

* lib/target-supports.exp (check_effective_target_bswap): Update
conditions for AArch64 and ARM targets.

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

9 years ago * gcc.dg/torture/pr59166.c: XFAIL on AIX.
dje [Wed, 5 Nov 2014 14:32:59 +0000 (14:32 +0000)]
    * gcc.dg/torture/pr59166.c: XFAIL on AIX.
        * g++.dg/ext/visitibility/anon1.C: XFAIL on AIX.
        * g++.dg/opt/pr60002.C: XFAIL on AIX.
        * g++.dg/torture/pr63419.C: Ignore non-standard ABI warning.
        * g++.dg/ipa/ipa-icf-5.C: Require visibility support.

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

9 years agogcc/
ienkovich [Wed, 5 Nov 2014 12:42:03 +0000 (12:42 +0000)]
gcc/

2014-11-05  Ilya Enkovich  <ilya.enkovich@intel.com>

* ipa-chkp.c: New.
* ipa-chkp.h: New.
* tree-chkp.c: New.
* tree-chkp.h: New.
* tree-chkp-opt.c: New.
* rtl-chkp.c: New.
* rtl-chkp.h: New.
* Makefile.in (OBJS): Add ipa-chkp.o, rtl-chkp.o, tree-chkp.o
tree-chkp-opt.o.
(GTFILES): Add tree-chkp.c.
* mode-classes.def (MODE_POINTER_BOUNDS): New.
* tree.def (POINTER_BOUNDS_TYPE): New.
* genmodes.c (complete_mode): Support MODE_POINTER_BOUNDS.
(POINTER_BOUNDS_MODE): New.
(make_pointer_bounds_mode): New.
* machmode.h (POINTER_BOUNDS_MODE_P): New.
* stor-layout.c (int_mode_for_mode): Support MODE_POINTER_BOUNDS.
(layout_type): Support POINTER_BOUNDS_TYPE.
* tree-pretty-print.c (dump_generic_node): Support POINTER_BOUNDS_TYPE.
* tree-core.h (tree_index): Add TI_POINTER_BOUNDS_TYPE.
* tree.c (build_int_cst_wide): Support POINTER_BOUNDS_TYPE.
(type_contains_placeholder_1): Likewise.
(build_common_tree_nodes): Initialize
pointer_bounds_type_node.
* tree.h (POINTER_BOUNDS_TYPE_P): New.
(pointer_bounds_type_node): New.
(POINTER_BOUNDS_P): New.
(BOUNDED_TYPE_P): New.
(BOUNDED_P): New.
(CALL_WITH_BOUNDS_P): New.
* gimple.h (gf_mask): Add GF_CALL_WITH_BOUNDS.
(gimple_call_with_bounds_p): New.
(gimple_call_set_with_bounds): New.
(gimple_return_retbnd): New.
(gimple_return_set_retbnd): New
* gimple.c (gimple_build_return): Increase number of ops
for return statement.
(gimple_build_call_from_tree): Propagate CALL_WITH_BOUNDS_P
flag.
* gimple-pretty-print.c (dump_gimple_return): Print second op.
* rtl.h (CALL_EXPR_WITH_BOUNDS_P): New.
* gimplify.c (gimplify_init_constructor): Avoid infinite
loop during gimplification of bounds initializer.
* calls.c: Include tree-chkp.h, rtl-chkp.h, bitmap.h.
(special_function_p): Use original decl name when analyzing
instrumentation clone.
(arg_data): Add fields special_slot, pointer_arg and
pointer_offset.
(store_bounds): New.
(emit_call_1): Propagate instrumentation flag for CALL.
(initialize_argument_information): Compute pointer_arg,
pointer_offset and special_slot for pointer bounds arguments.
(finalize_must_preallocate): Preallocate when storing bounds
in bounds table.
(compute_argument_addresses): Skip pointer bounds.
(expand_call): Store bounds into tables separately.  Return
result joined with resulting bounds.
* cfgexpand.c: Include tree-chkp.h, rtl-chkp.h.
(expand_call_stmt): Propagate bounds flag for CALL_EXPR.
(expand_return): Add returned bounds arg.  Handle returned bounds.
(expand_gimple_stmt_1): Adjust to new expand_return signature.
(gimple_expand_cfg): Reset rtx bounds map.
* expr.c: Include tree-chkp.h, rtl-chkp.h.
(expand_assignment): Handle returned bounds.
(store_expr_with_bounds): New.  Replaces store_expr with new bounds
target argument.  Handle bounds returned by calls.
(store_expr): Now wraps store_expr_with_bounds.
* expr.h (store_expr_with_bounds): New.
* function.c: Include tree-chkp.h, rtl-chkp.h.
(bounds_parm_data): New.
(use_register_for_decl): Do not registerize decls used for bounds
stores and loads.
(assign_parms_augmented_arg_list): Add bounds of the result
structure pointer as the second argument.
(assign_parm_find_entry_rtl): Mark bounds are never passed on
the stack.
(assign_parm_is_stack_parm): Likewise.
(assign_parm_load_bounds): New.
(assign_bounds): New.
(assign_parms): Load bounds and determine a location for
returned bounds.
(diddle_return_value_1): New.
(diddle_return_value): Handle returned bounds.
* function.h (rtl_data): Add field for returned bounds.
* varasm.c: Include tree-chkp.h.
(output_constant): Support POINTER_BOUNDS_TYPE.
(output_constant_pool_2): Support MODE_POINTER_BOUNDS.
(ultimate_transparent_alias_target): Move up.
(make_decl_rtl): For instrumented function use
name of the original decl.
(assemble_start_function): Mark function as global
in case it is instrumentation clone of the global
function.
(do_assemble_alias): Follow transparent alias chain
for identifier.  Check if original alias is public.
(maybe_assemble_visibility): Use visibility of the
original function for instrumented version.
(default_unique_section): Likewise.
* emit-rtl.c (immed_double_const): Support MODE_POINTER_BOUNDS.
(init_emit_once): Build pointer bounds zero constants.
* explow.c (trunc_int_for_mode): Support MODE_POINTER_BOUNDS.
* target.def (builtin_chkp_function): New.
(chkp_bound_type): New.
(chkp_bound_mode): New.
(chkp_make_bounds_constant): New.
(chkp_initialize_bounds): New.
(load_bounds_for_arg): New.
(store_bounds_for_arg): New.
(load_returned_bounds): New.
(store_returned_bounds): New.
(chkp_function_value_bounds): New.
(setup_incoming_vararg_bounds): New.
(function_arg): Update hook description with new possible return
value CONST_INT.
* targhooks.h (default_load_bounds_for_arg): New.
(default_store_bounds_for_arg): New.
(default_load_returned_bounds): New.
(default_store_returned_bounds): New.
(default_chkp_bound_type): New.
(default_chkp_bound_mode): New.
(default_builtin_chkp_function): New.
(default_chkp_function_value_bounds): New.
(default_chkp_make_bounds_constant): New.
(default_chkp_initialize_bounds): New.
(default_setup_incoming_vararg_bounds): New.
* targhooks.c (default_load_bounds_for_arg): New.
(default_store_bounds_for_arg): New.
(default_load_returned_bounds): New.
(default_store_returned_bounds): New.
(default_chkp_bound_type): New.
(default_chkp_bound_mode); New.
(default_builtin_chkp_function): New.
(default_chkp_function_value_bounds): New.
(default_chkp_make_bounds_constant): New.
(default_chkp_initialize_bounds): New.
(default_setup_incoming_vararg_bounds): New.
* builtin-types.def (BT_BND): New.
(BT_FN_PTR_CONST_PTR): New.
(BT_FN_CONST_PTR_CONST_PTR): New.
(BT_FN_BND_CONST_PTR): New.
(BT_FN_CONST_PTR_BND): New.
(BT_FN_PTR_CONST_PTR_SIZE): New.
(BT_FN_PTR_CONST_PTR_CONST_PTR): New.
(BT_FN_VOID_PTRPTR_CONST_PTR): New.
(BT_FN_VOID_CONST_PTR_SIZE): New.
(BT_FN_VOID_PTR_BND): New.
(BT_FN_CONST_PTR_CONST_PTR_CONST_PTR): New.
(BT_FN_BND_CONST_PTR_SIZE): New.
(BT_FN_PTR_CONST_PTR_CONST_PTR_SIZE): New.
(BT_FN_VOID_CONST_PTR_BND_CONST_PTR): New.
* chkp-builtins.def: New.
* builtins.def: include chkp-builtins.def.
(DEF_CHKP_BUILTIN): New.
* builtins.c: Include tree-chkp.h and rtl-chkp.h.
(expand_builtin): Support BUILT_IN_CHKP_INIT_PTR_BOUNDS,
BUILT_IN_CHKP_NULL_PTR_BOUNDS, BUILT_IN_CHKP_COPY_PTR_BOUNDS,
BUILT_IN_CHKP_CHECK_PTR_LBOUNDS, BUILT_IN_CHKP_CHECK_PTR_UBOUNDS,
BUILT_IN_CHKP_CHECK_PTR_BOUNDS, BUILT_IN_CHKP_SET_PTR_BOUNDS,
BUILT_IN_CHKP_NARROW_PTR_BOUNDS, BUILT_IN_CHKP_STORE_PTR_BOUNDS,
BUILT_IN_CHKP_GET_PTR_LBOUND, BUILT_IN_CHKP_GET_PTR_UBOUND,
BUILT_IN_CHKP_BNDMK, BUILT_IN_CHKP_BNDSTX, BUILT_IN_CHKP_BNDCL,
BUILT_IN_CHKP_BNDCU, BUILT_IN_CHKP_BNDLDX, BUILT_IN_CHKP_BNDRET,
BUILT_IN_CHKP_INTERSECT, BUILT_IN_CHKP_NARROW,
BUILT_IN_CHKP_EXTRACT_LOWER, BUILT_IN_CHKP_EXTRACT_UPPER.
(std_expand_builtin_va_start): Init bounds for va_list.
* cppbuiltin.c (define_builtin_macros_for_compilation_flags): Add
__CHKP__ macro when Pointer Bounds Checker is on.
* params.def (PARAM_CHKP_MAX_CTOR_SIZE): New.
* passes.def (pass_ipa_chkp_versioning): New.
(pass_early_local_passes): Renamed to pass_build_ssa_passes.
(pass_fixup_cfg): Moved to pass_chkp_instrumentation_passes.
(pass_chkp_instrumentation_passes): New.
(pass_ipa_chkp_produce_thunks): New.
(pass_local_optimization_passes): New.
(pass_chkp_opt): New.
* tree-pass.h (make_pass_ipa_chkp_versioning): New.
(make_pass_ipa_chkp_produce_thunks): New.
(make_pass_chkp): New.
(make_pass_chkp_opt): New.
(make_pass_early_local_passes): Renamed to ...
(make_pass_build_ssa_passes): This.
(make_pass_chkp_instrumentation_passes): New.
(make_pass_local_optimization_passes): New.
* passes.c (pass_manager::execute_early_local_passes): Execute
early passes in three steps.
(execute_all_early_local_passes): Renamed to ...
(execute_build_ssa_passes): This.
(pass_data_early_local_passes): Renamed to ...
(pass_data_build_ssa_passes): This.
(pass_early_local_passes): Renamed to ...
(pass_build_ssa_passes): This.
(pass_data_chkp_instrumentation_passes): New.
(pass_chkp_instrumentation_passes): New.
(pass_data_local_optimization_passes): New.
(pass_local_optimization_passes): New.
(make_pass_early_local_passes): Renamed to ...
(make_pass_build_ssa_passes): This.
(make_pass_chkp_instrumentation_passes): New.
(make_pass_local_optimization_passes): New.
* c-family/c.opt (fcheck-pointer-bounds): New.
(fchkp-check-incomplete-type): New.
(fchkp-zero-input-bounds-for-main): New.
(fchkp-first-field-has-own-bounds): New.
(fchkp-narrow-bounds): New.
(fchkp-narrow-to-innermost-array): New.
(fchkp-optimize): New.
(fchkp-use-fast-string-functions): New.
(fchkp-use-nochk-string-functions): New.
(fchkp-use-static-bounds): New.
(fchkp-use-static-const-bounds): New.
(fchkp-treat-zero-dynamic-size-as-infinite): New.
(fchkp-check-read): New.
(fchkp-check-write): New.
(fchkp-store-bounds): New.
(fchkp-instrument-calls): New.
(fchkp-instrument-marked-only): New.
(Wchkp): New.
* c-family/c-common.c (handle_bnd_variable_size_attribute): New.
(handle_bnd_legacy): New.
(handle_bnd_instrument): New.
(c_common_attribute_table): Add bnd_variable_size, bnd_legacy
and bnd_instrument.  Fix documentation.
(c_common_format_attribute_table): Likewsie.
* toplev.c: include tree-chkp.h.
(process_options): Check Pointer Bounds Checker is supported.
(compile_file): Add chkp_finish_file call.
* ipa-cp.c (initialize_node_lattices): Use cgraph_local_p
to handle instrumentation clones properly.
(propagate_constants_accross_call): Do not propagate
through instrumentation thunks.
* ipa-pure-const.c (propagate_pure_const): Support
IPA_REF_CHKP.
* ipa-inline.c (early_inliner): Check edge has summary allocated.
* ipa-split.c: Include tree-chkp.h.
(find_retbnd): New.
(split_part_set_ssa_name_p): New.
(consider_split): Do not split retbnd and retval
producers.
(insert_bndret_call_after): new.
(split_function): Propagate Pointer Bounds Checker
instrumentation marks and handle returned bounds.
* tree-ssa-sccvn.h (vn_reference_op_struct): Transform opcode
into bit field and add with_bounds field.
* tree-ssa-sccvn.c (copy_reference_ops_from_call): Set
with_bounds field for instrumented calls.
* tree-ssa-pre.c (create_component_ref_by_pieces_1): Restore
CALL_WITH_BOUNDS_P flag for calls.
* tree-ssa-ccp.c: Include tree-chkp.h.
(insert_clobber_before_stack_restore): Handle
BUILT_IN_CHKP_BNDRET calls.
* tree-ssa-dce.c: Include tree-chkp.h.
(propagate_necessity): For free call fed by alloc check
bounds are also provided by the same alloc.
(eliminate_unnecessary_stmts): Handle BUILT_IN_CHKP_BNDRET
used by free calls.
* tree-inline.c: Include tree-chkp.h.
(declare_return_variable): Add arg holding
returned bounds slot.  Create and initialize returned bounds var.
(remap_gimple_stmt): Handle returned bounds.
Return sequence of statements instead of a single statement.
(insert_init_stmt): Add declaration.
(remap_gimple_seq): Adjust to new remap_gimple_stmt signature.
(copy_bb): Adjust to changed return type of remap_gimple_stmt.
Properly handle bounds in va_arg_pack and va_arg_pack_len.
(expand_call_inline): Handle returned bounds.  Add bounds copy
for generated mem to mem assignments.
* tree-inline.h (copy_body_data): Add fields retbnd and
assign_stmts.
* value-prof.c: Include tree-chkp.h.
(gimple_ic): Support returned bounds.
* ipa.c (cgraph_build_static_cdtor_1): Support contructors
with "chkp ctor" and "bnd_legacy" attributes.
(symtab_remove_unreachable_nodes): Keep initial values for
pointer bounds to be used for checks eliminations.
(process_references): Handle IPA_REF_CHKP.
(walk_polymorphic_call_targets): Likewise.
* ipa-visibility.c (cgraph_externally_visible_p): Mark
instrumented 'main' as externally visible.
(function_and_variable_visibility): Filter instrumentation
thunks.
* cgraph.h (cgraph_thunk_info): Add add_pointer_bounds_args
field.
(cgraph_node): Add instrumented_version, orig_decl and
instrumentation_clone fields.
(symtab_node::get_alias_target): Allow IPA_REF_CHKP reference.
(varpool_node): Add need_bounds_init field.
(cgraph_local_p): New.
* cgraph.c: Include tree-chkp.h.
(cgraph_node::remove): Fix instrumented_version
of the referenced node if any.
(cgraph_node::dump): Dump instrumentation_clone and
instrumented_version fields.
(cgraph_node::verify_node): Check correctness of IPA_REF_CHKP
references and instrumentation thunks.
(cgraph_can_remove_if_no_direct_calls_and_refs_p): Keep
all not instrumented instrumentation clones alive.
(cgraph_redirect_edge_call_stmt_to_callee): Support
returned bounds.
* cgraphbuild.c (rebuild_cgraph_edges): Rebuild IPA_REF_CHKP
reference.
(cgraph_rebuild_references): Likewise.
* cgraphunit.c: Include tree-chkp.h.
(assemble_thunks_and_aliases): Skip thunks calling instrumneted
function version.
(varpool_finalize_decl): Register statically initialized decls
in Pointer Bounds Checker.
(walk_polymorphic_call_targets): Do not mark generated call to
__builtin_unreachable as with_bounds.
(output_weakrefs): If there are both instrumented and original
versions, output only one of them.
(cgraph_node::expand_thunk): Set with_bounds flag
for created call statement.
* ipa-ref.h (ipa_ref_use): Add IPA_REF_CHKP.
(ipa_ref): increase size of use field.
* symtab.c (ipa_ref_use_name): Add element for IPA_REF_CHKP.
* varpool.c (dump_varpool_node): Dump need_bounds_init field.
(ctor_for_folding): Do not fold constant bounds vars.
* lto-streamer.h (LTO_minor_version): Change minor version from
0 to 1.
* lto-cgraph.c (compute_ltrans_boundary): Keep initial values for
pointer bounds.
(lto_output_node): Output instrumentation_clone,
thunk.add_pointer_bounds_args and orig_decl field.
(lto_output_ref): Adjust to new ipa_ref::use field size.
(input_overwrite_node): Read instrumentation_clone field.
(input_node): Read thunk.add_pointer_bounds_args and orig_decl
fields.
(input_ref): Adjust to new ipa_ref::use field size.
(input_cgraph_1): Compute instrumented_version fields and restore
IDENTIFIER_TRANSPARENT_ALIAS chains.
(lto_output_varpool_node): Output
need_bounds_init value.
(input_varpool_node): Read need_bounds_init value.
* lto-partition.c (add_symbol_to_partition_1): Keep original
and instrumented versions together.
(privatize_symbol_name): Restore transparent alias chain if required.
(add_references_to_partition): Add references to pointer bounds vars.
* dbxout.c (dbxout_type): Ignore POINTER_BOUNDS_TYPE.
* dwarf2out.c (gen_subprogram_die): Ignore bound args.
(gen_type_die_with_usage): Skip pointer bounds.
(dwarf2out_global_decl): Likewise.
(is_base_type): Support POINTER_BOUNDS_TYPE.
(gen_formal_types_die): Skip pointer bounds.
(gen_decl_die): Likewise.
* var-tracking.c (vt_add_function_parameters): Skip
bounds parameters.
* ipa-icf.c (sem_function::merge): Do not merge when instrumentation
thunk still exists.
(sem_variable::merge): Reset need_bounds_init flag.
* doc/extend.texi: Document Pointer Bounds Checker built-in functions
and attributes.
* doc/tm.texi.in (TARGET_LOAD_BOUNDS_FOR_ARG): New.
(TARGET_STORE_BOUNDS_FOR_ARG): New.
(TARGET_LOAD_RETURNED_BOUNDS): New.
(TARGET_STORE_RETURNED_BOUNDS): New.
(TARGET_CHKP_FUNCTION_VALUE_BOUNDS): New.
(TARGET_SETUP_INCOMING_VARARG_BOUNDS): New.
(TARGET_BUILTIN_CHKP_FUNCTION): New.
(TARGET_CHKP_BOUND_TYPE): New.
(TARGET_CHKP_BOUND_MODE): New.
(TARGET_CHKP_MAKE_BOUNDS_CONSTANT): New.
(TARGET_CHKP_INITIALIZE_BOUNDS): New.
* doc/tm.texi: Regenerated.
* doc/rtl.texi (MODE_POINTER_BOUNDS): New.
(BND32mode): New.
(BND64mode): New.
* doc/invoke.texi (-mmpx): New.
(-mno-mpx): New.
(chkp-max-ctor-size): New.
* config/i386/constraints.md (w): New.
(Ti): New.
(Tb): New.
* config/i386/i386-c.c (ix86_target_macros_internal): Add __MPX__.
* config/i386/i386-modes.def (BND32): New.
(BND64): New.
* config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): New.
* config/i386/i386.c: Include tree-chkp.h, rtl-chkp.h, tree-iterator.h.
(regclass_map): Add bound registers.
(dbx_register_map): Likewise.
(dbx64_register_map): Likewise.
(svr4_dbx_register_map): Likewise.
(isa_opts): Add -mmpx.
(PTA_MPX): New.
(ix86_option_override_internal): Support MPX ISA.
(ix86_conditional_register_usage): Support bound registers.
(ix86_code_end): Add MPX bnd prefix.
(output_set_got): Likewise.
(print_reg): Avoid prefixes for bound registers.
(ix86_print_operand): Add '!' (MPX bnd) print prefix support.
(ix86_print_operand_punct_valid_p): Likewise.
(ix86_print_operand_address): Support UNSPEC_BNDMK_ADDR and
UNSPEC_BNDLDX_ADDR.
(ix86_output_call_insn): Add MPX bnd prefix to branch instructions.
(ix86_class_likely_spilled_p): Add bound regs support.
(ix86_hard_regno_mode_ok): Likewise.
(x86_order_regs_for_local_alloc): Likewise.
(ix86_bnd_prefixed_insn_p): New.
(ix86_builtins): Add
IX86_BUILTIN_BNDMK, IX86_BUILTIN_BNDSTX,
IX86_BUILTIN_BNDLDX, IX86_BUILTIN_BNDCL,
IX86_BUILTIN_BNDCU, IX86_BUILTIN_BNDRET,
IX86_BUILTIN_BNDNARROW, IX86_BUILTIN_BNDINT,
IX86_BUILTIN_SIZEOF, IX86_BUILTIN_BNDLOWER,
IX86_BUILTIN_BNDUPPER.
(builtin_isa): Add leaf_p and nothrow_p fields.
(def_builtin): Initialize leaf_p and nothrow_p.
(ix86_add_new_builtins): Handle leaf_p and nothrow_p
flags.
(bdesc_mpx): New.
(bdesc_mpx_const): New.
(ix86_init_mpx_builtins): New.
(ix86_init_builtins): Call ix86_init_mpx_builtins.
(ix86_emit_cmove): New.
(ix86_emit_move_max): New.
(ix86_expand_builtin): Expand IX86_BUILTIN_BNDMK,
IX86_BUILTIN_BNDSTX, IX86_BUILTIN_BNDLDX,
IX86_BUILTIN_BNDCL, IX86_BUILTIN_BNDCU,
IX86_BUILTIN_BNDRET, IX86_BUILTIN_BNDNARROW,
IX86_BUILTIN_BNDINT, IX86_BUILTIN_SIZEOF,
IX86_BUILTIN_BNDLOWER, IX86_BUILTIN_BNDUPPER.
(ix86_function_value_bounds): New.
(ix86_builtin_mpx_function): New.
(ix86_get_arg_address_for_bt): New.
(ix86_load_bounds): New.
(ix86_store_bounds): New.
(ix86_load_returned_bounds): New.
(ix86_store_returned_bounds): New.
(ix86_mpx_bound_mode): New.
(ix86_make_bounds_constant): New.
(ix86_initialize_bounds):
(TARGET_LOAD_BOUNDS_FOR_ARG): New.
(TARGET_STORE_BOUNDS_FOR_ARG): New.
(TARGET_LOAD_RETURNED_BOUNDS): New.
(TARGET_STORE_RETURNED_BOUNDS): New.
(TARGET_CHKP_BOUND_MODE): New.
(TARGET_BUILTIN_CHKP_FUNCTION): New.
(TARGET_CHKP_FUNCTION_VALUE_BOUNDS): New.
(TARGET_CHKP_MAKE_BOUNDS_CONSTANT): New.
(TARGET_CHKP_INITIALIZE_BOUNDS): New.
(ix86_option_override_internal): Do not
support x32 with MPX.
(init_cumulative_args): Init stdarg, bnd_regno, bnds_in_bt
and force_bnd_pass.
(function_arg_advance_32): Return number of used integer
registers.
(function_arg_advance_64): Likewise.
(function_arg_advance_ms_64): Likewise.
(ix86_function_arg_advance): Handle pointer bounds.
(ix86_function_arg): Likewise.
(ix86_function_value_regno_p): Mark fisrt bounds registers as
possible function value.
(ix86_function_value_1): Handle pointer bounds type/mode
(ix86_return_in_memory): Likewise.
(ix86_print_operand): Analyse insn to decide abounf "bnd" prefix.
(ix86_expand_call): Generate returned bounds.
(ix86_setup_incoming_vararg_bounds): New.
(ix86_va_start): Initialize bounds for pointers in va_list.
(TARGET_SETUP_INCOMING_VARARG_BOUNDS): New.
* config/i386/i386.h (TARGET_MPX): New.
(TARGET_MPX_P): New.
(FIRST_PSEUDO_REGISTER): Fix to new value.
(FIXED_REGISTERS): Add bound registers.
(CALL_USED_REGISTERS): Likewise.
(REG_ALLOC_ORDER): Likewise.
(HARD_REGNO_NREGS): Likewise.
(VALID_BND_REG_MODE): New.
(FIRST_BND_REG): New.
(LAST_BND_REG): New.
(reg_class): Add BND_REGS.
(REG_CLASS_NAMES): Likewise.
(REG_CLASS_CONTENTS): Likewise.
(BND_REGNO_P): New.
(ANY_BND_REG_P): New.
(BNDmode): New.
(HI_REGISTER_NAMES): Add bound registers.
(ix86_args): Add bnd_regno, bnds_in_bt, force_bnd_pass and
stdarg fields.
* config/i386/i386.md (UNSPEC_BNDMK): New.
(UNSPEC_BNDMK_ADDR): New.
(UNSPEC_BNDSTX): New.
(UNSPEC_BNDLDX): New.
(UNSPEC_BNDLDX_ADDR): New.
(UNSPEC_BNDCL): New.
(UNSPEC_BNDCU): New.
(UNSPEC_BNDCN): New.
(UNSPEC_MPX_FENCE): New.
(UNSPEC_SIZEOF): New.
(BND0_REG): New.
(BND1_REG): New.
(type): Add mpxmov, mpxmk, mpxchk, mpxld, mpxst.
(length_immediate): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst.
(prefix_rep): Check for bnd prefix.
(prefix_0f): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst.
(length_nobnd): New.
(length): Use length_nobnd when specified.
(memory): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst.
(BND): New.
(bnd_ptr): New.
(BNDCHECK): New.
(bndcheck): New.
(*jcc_1): Add MPX bnd prefix.
(*jcc_2): Likewise.
(jump): Likewise.
(*indirect_jump): Likewise.
(*tablejump_1): Likewise.
(simple_return_internal): Likewise.
(simple_return_internal_long): Likewise.
(simple_return_pop_internal): Likewise.
(simple_return_indirect_internal): Likewise.
(<mode>_mk): New.
(*<mode>_mk): New.
(mov<mode>): New.
(*mov<mode>_internal_mpx): New.
(<mode>_<bndcheck>): New.
(*<mode>_<bndcheck>): New.
(<mode>_ldx): New.
(*<mode>_ldx): New.
(<mode>_stx): New.
(*<mode>_stx): New.
move_size_reloc_<mode>): New.
* config/i386/predicates.md (address_mpx_no_base_operand): New.
(address_mpx_no_index_operand): New.
(bnd_mem_operator): New.
(symbol_operand): New.
(x86_64_immediate_size_operand): New.
* config/i386/i386.opt (mmpx): New.
* config/i386/i386-builtin-types.def (BND): New.
(ULONG): New.
(BND_FTYPE_PCVOID_ULONG): New.
(VOID_FTYPE_BND_PCVOID): New.
(VOID_FTYPE_PCVOID_PCVOID_BND): New.
(BND_FTYPE_PCVOID_PCVOID): New.
(BND_FTYPE_PCVOID): New.
(BND_FTYPE_BND_BND): New.
(PVOID_FTYPE_PVOID_PVOID_ULONG): New.
(PVOID_FTYPE_PCVOID_BND_ULONG): New.
(ULONG_FTYPE_VOID): New.
(PVOID_FTYPE_BND): New.

gcc/testsuite/

2014-11-05  Ilya Enkovich  <ilya.enkovich@intel.com>

* gcc.target/i386/chkp-builtins-1.c: New.
* gcc.target/i386/chkp-builtins-2.c: New.
* gcc.target/i386/chkp-builtins-3.c: New.
* gcc.target/i386/chkp-builtins-4.c: New.
* gcc.target/i386/chkp-remove-bndint-1.c: New.
* gcc.target/i386/chkp-remove-bndint-2.c: New.
* gcc.target/i386/chkp-const-check-1.c: New.
* gcc.target/i386/chkp-const-check-2.c: New.
* gcc.target/i386/chkp-lifetime-1.c: New.
* gcc.dg/pr37858.c: Replace early_local_cleanups pass name
with build_ssa_passes.

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

9 years agoReorganize post-ra pipeline for targets without register allocation.
bernds [Wed, 5 Nov 2014 12:14:45 +0000 (12:14 +0000)]
Reorganize post-ra pipeline for targets without register allocation.

* passes.def (pass_compute_alignments, pass_duplicate_computed_gotos,
pass_variable_tracking, pass_free_cfg, pass_machine_reorg,
pass_cleanup_barriers, pass_delay_slots,
pass_split_for_shorten_branches, pass_convert_to_eh_region_ranges,
pass_shorten_branches, pass_est_nothrow_function_flags,
pass_dwarf2_frame, pass_final): Move outside of pass_postreload and
into pass_late_compilation.
(pass_late_compilation): Add.
* passes.c (pass_data_late_compilation, pass_late_compilation,
make_pass_late_compilation): New.
* timevar.def (TV_LATE_COMPILATION): New.

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

9 years agoAllow a target to skip an unnecssary register return value for a struct return.
bernds [Wed, 5 Nov 2014 12:14:36 +0000 (12:14 +0000)]
Allow a target to skip an unnecssary register return value for a struct return.

* target.def (omit_struct_return_reg): New data hook.
* doc/tm.texi.in: Add @hook TARGET_OMIT_STRUCT_RETURN_REG.
* doc/tm.texi: Regenerate.
* function.c (expand_function_end): Use it.

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

9 years agoAdd a no_register_allocation target hook.
bernds [Wed, 5 Nov 2014 12:14:27 +0000 (12:14 +0000)]
Add a no_register_allocation target hook.

* target.def (no_register_allocation): New data hook.
* doc/tm.texi.in: Add @hook TARGET_NO_REGISTER_ALLOCATION.
* doc/tm.texi: Regenerate.
* ira.c (gate_ira): New function.
(pass_data_ira): Set has_gate.
(pass_ira): Add a gate function.
(pass_data_reload): Likewise.
(pass_reload): Add a gate function.
(pass_ira): Use it.
* reload1.c (eliminate_regs): If reg_eliminate_is NULL, assert that
no register allocation happens on the target and return.
* final.c (alter_subreg): Ensure register is not a pseudo before
calling simplify_subreg.
(output_operand): Assert that x isn't a pseudo only if doing
register allocation.

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

9 years agoDon't unnecessarily call eliminate_regs.
bernds [Wed, 5 Nov 2014 12:14:18 +0000 (12:14 +0000)]
Don't unnecessarily call eliminate_regs.

* dbxout.c (dbxout_symbol): Don't call eliminate_regs on decls for
global vars.

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

9 years agoAllow a port not to define an indirect_jump pattern.
bernds [Wed, 5 Nov 2014 12:14:10 +0000 (12:14 +0000)]
Allow a port not to define an indirect_jump pattern.

* optabs.c (emit_indirect_jump): Test HAVE_indirect_jump and emit a
sorry if necessary.

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

9 years ago2014-11-05 Alex Velenko <Alex.Velenko@arm.com>
thopre01 [Wed, 5 Nov 2014 11:22:28 +0000 (11:22 +0000)]
2014-11-05  Alex Velenko  <Alex.Velenko@arm.com>

    gcc/
    * simplify-rtx.c (simplify_binary_operation_1): Div check added.
    * rtl.h (SUBREG_P): New macro added.

    gcc/testsuite/
    * gcc.dg/asr-div1.c: New testcase.

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

9 years agoFix gnu11 fallout on Solaris 10+
ro [Wed, 5 Nov 2014 09:52:42 +0000 (09:52 +0000)]
Fix gnu11 fallout on Solaris 10+

libobjc:
* thr.c (_XOPEN_SOURCE): Define as 600.

libiberty:
* sigsetmask.c (_POSIX_SOURCE): Remove.

libgomp:
* config/posix/lock.c (_XOPEN_SOURCE) Define as 600.

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

9 years ago[AArch64] Restructure arm_neon.h vector types.
belagod [Wed, 5 Nov 2014 08:26:54 +0000 (08:26 +0000)]
[AArch64] Restructure arm_neon.h vector types.

2014-11-05  Tejas Belagod  <tejas.belagod@arm.com>

* config/aarch64/aarch64-builtins.c
(aarch64_build_scalar_type): Remove.
(aarch64_scalar_builtin_types, aarch64_simd_type,
aarch64_simd_type, aarch64_mangle_builtin_scalar_type,
aarch64_mangle_builtin_vector_type,
aarch64_mangle_builtin_type, aarch64_simd_builtin_std_type,
aarch64_lookup_simd_builtin_type, aarch64_simd_builtin_type,
aarch64_init_simd_builtin_types,
aarch64_init_simd_builtin_scalar_types): New.
(aarch64_init_simd_builtins): Refactor.
(aarch64_init_crc32_builtins): Fixup with qualifier.
* config/aarch64/aarch64-protos.h
(aarch64_mangle_builtin_type): Export.
* config/aarch64/aarch64-simd-builtin-types.def: New.
* config/aarch64/aarch64.c (aarch64_simd_mangle_map): Remove.
(aarch64_mangle_type): Refactor.
* config/aarch64/arm_neon.h: Declare vector types based on
internal types.
* config/aarch64/t-aarch64: Update dependency.

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

9 years ago * go.test/go-test.exp (go-set-goarch): Enable tests on s390[x].
ian [Wed, 5 Nov 2014 04:08:11 +0000 (04:08 +0000)]
* go.test/go-test.exp (go-set-goarch): Enable tests on s390[x].

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

9 years ago * go.test/go-test.exp: In +build lines, require whitespace around
ian [Wed, 5 Nov 2014 04:04:24 +0000 (04:04 +0000)]
* go.test/go-test.exp: In +build lines, require whitespace around
expected strings, fix check for negation.

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

9 years agosync/atomic: fix data races in tests
ian [Wed, 5 Nov 2014 03:39:49 +0000 (03:39 +0000)]
sync/atomic: fix data races in tests

Backport https://codereview.appspot.com/111320044 from Go
master library.

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

9 years agoDaily bump.
gccadmin [Wed, 5 Nov 2014 00:16:21 +0000 (00:16 +0000)]
Daily bump.

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

9 years agolibgo: add s390 support
ian [Tue, 4 Nov 2014 22:39:30 +0000 (22:39 +0000)]
libgo: add s390 support

From Dominik Vogt.

* libgo/go/syscall/libcall_linux_s390.go: New file for s390 support.
* libgo/go/syscall/syscall_linux_s390.go: Ditto.
* libgo/go/syscall/libcall_linux_s390x.go: New file for s390x support.
* libgo/go/syscall/syscall_linux_s390x.go: Ditto.
* libgo/go/runtime/pprof/pprof.go (printStackRecord): Support s390 and
s390x.
* libgo/runtime/runtime.c (runtime_cputicks): Add support for s390 and
s390x
* libgo/mksysinfo.sh: Ditto.
(upcase_fields): New helper function

* libgo/go/debug/elf/file.go (applyRelocations): Implement relocations
on s390x.
(applyRelocationsS390x): Ditto.
(DWARF): Ditto.
* libgo/go/debug/elf/elf.go (R_390): New constants for S390 relocations.
(r390Strings): Ditto.
(String): Helper function for S390 relocations.
(GoString): Ditto.

* libgo/go/reflect/makefuncgo_s390.go: New file.
(S390MakeFuncStubGo): Implementation of s390 abi.
* libgo/go/reflect/makefuncgo_s390x.go: New file.
(S390xMakeFuncStubGo): Implementation of s390x abi.
* libgo/go/reflect/makefunc_s390.c: New file.
(makeFuncStub): s390 and s390x specific implementation of function.
* libgo/go/reflect/makefunc.go
(MakeFunc): Add support for s390 and s390x.
(makeMethodValue): Ditto.
(makeValueMethod): Ditto.
* libgo/Makefile.am (go_reflect_makefunc_s_file): Ditto.
(go_reflect_makefunc_file): Ditto.
* libgo/go/reflect/makefunc_dummy.c: Ditto.
* libgo/runtime/runtime.h (__go_makefunc_can_recover): Export prototype
for use in makefunc_s390.c.
(__go_makefunc_returning): Ditto.

* libgo/go/syscall/exec_linux.go (forkAndExecInChild): Fix order of the
arguments of the clone system call for s390[x].

* libgo/configure.ac (is_s390): New variable.
(is_s390x): Ditto
(LIBGO_IS_S390): Ditto.
(LIBGO_IS_S390X): Ditto.
(GOARCH): Support s390 and s390x.
* libgo/go/go/build/build.go (cgoEnabled): Ditto.
* libgo/go/go/build/syslist.go (goarchList): Ditto.

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

9 years ago * config/rs6000/rs6000.c (atomic_hold_decl, atomic_clear_decl,
pthaugen [Tue, 4 Nov 2014 22:34:43 +0000 (22:34 +0000)]
* config/rs6000/rs6000.c (atomic_hold_decl, atomic_clear_decl,
atomic_update_decl): Guard declaration with #ifdef.

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