]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
8 years ago[PATCH 2/17][Testsuite] Add a selector for ARM FP16 alternative format support.
mwahab [Fri, 23 Sep 2016 08:52:55 +0000 (08:52 +0000)] 
[PATCH 2/17][Testsuite] Add a selector for ARM FP16 alternative format support.

2016-09-23  Matthew Wahab  <matthew.wahab@arm.com>

* doc/sourcebuild.texi (ARM-specific attributes): Add entries for
arm_fp16_alternative_ok and arm_fp16_none_ok.

testsuite/
2016-09-23  Matthew Wahab  <matthew.wahab@arm.com>

* g++.dg/ext/arm-fp16/arm-fp16-ops-3.C: Use
arm_fp16_alternative_ok.
* g++.dg/ext/arm-fp16/arm-fp16-ops-4.C: Likewise.
* gcc.dg/torture/arm-fp16-int-convert-alt.c: Likewise.
* gcc/testsuite/gcc.dg/torture/arm-fp16-ops-3.c: Likewise.
* gcc/testsuite/gcc.dg/torture/arm-fp16-ops-4.c: Likewise.
* gcc.target/arm/fp16-compile-alt-1.c: Likewise.
* gcc.target/arm/fp16-compile-alt-10.c: Likewise.
* gcc.target/arm/fp16-compile-alt-11.c: Likewise.
* gcc.target/arm/fp16-compile-alt-12.c: Likewise.
* gcc.target/arm/fp16-compile-alt-2.c: Likewise.
* gcc.target/arm/fp16-compile-alt-3.c: Likewise.
* gcc.target/arm/fp16-compile-alt-4.c: Likewise.
* gcc.target/arm/fp16-compile-alt-5.c: Likewise.
* gcc.target/arm/fp16-compile-alt-6.c: Likewise.
* gcc.target/arm/fp16-compile-alt-7.c: Likewise.
* gcc.target/arm/fp16-compile-alt-8.c: Likewise.
* gcc.target/arm/fp16-compile-alt-9.c: Likewise.
* gcc.target/arm/fp16-compile-none-1.c: Use arm_fp16_none_ok.
* gcc.target/arm/fp16-compile-none-2.c: Likewise.
* gcc.target/arm/fp16-rounding-alt-1.c: Use
arm_fp16_alternative_ok.
* lib/target-supports.exp
(check_effective_target_arm_fp16_alternative_ok_nocache): New.
(check_effective_target_arm_fp16_alternative_ok): New.
(check_effective_target_arm_fp16_none_ok_nocache): New.
(check_effective_target_arm_fp16_none_ok): New.

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

8 years agoFix typo in IPA ICF
marxin [Fri, 23 Sep 2016 08:49:41 +0000 (08:49 +0000)] 
Fix typo in IPA ICF

* ipa-icf.c (sem_variable::merge): Replace adress
with address.
* gcc.dg/ipa/pr77653.c: Replace adress
with address.

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

8 years ago[PATCH 1/17][ARM] Add ARMv8.2-A command line option and profile.
mwahab [Fri, 23 Sep 2016 08:45:16 +0000 (08:45 +0000)] 
[PATCH 1/17][ARM] Add ARMv8.2-A command line option and profile.

2016-09-23  Matthew Wahab  <matthew.wahab@arm.com>

* config/arm/arm-arches.def ("armv8.1-a"): Add FL_CRC32.
("armv8.2-a"): New.
("armv8.2-a+fp16"): New.
* config/arm/arm-protos.h (FL2_ARCH8_2): New.
(FL2_FP16INST): New.
(FL2_FOR_ARCH8_2A): New.
* config/arm/arm-tables.opt: Regenerate.
* config/arm/arm.c (arm_arch8_2): New.
(arm_fp16_inst): New.
(arm_option_override): Set arm_arch8_2 and arm_fp16_inst.  Check
for incompatible fp16-format settings.
* config/arm/arm.h (TARGET_VFP_FP16INST): New.
(TARGET_NEON_FP16INST): New.
(arm_arch8_2): Declare.
(arm_fp16_inst): Declare.
* config/arm/bpabi.h (BE8_LINK_SPEC): Add entries for
march=armv8.2-a and march=armv8.2-a+fp16.
* config/arm/t-aprofile (Arch Matches): Add entries for armv8.2-a
and armv8.2-a+fp16.
* doc/invoke.texi (ARM Options): Add "-march=armv8.1-a",
"-march=armv8.2-a" and "-march=armv8.2-a+fp16".

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

8 years agoRemove fused-madd from documentation
marxin [Fri, 23 Sep 2016 07:58:33 +0000 (07:58 +0000)] 
Remove fused-madd from documentation

* doc/extend.texi: Remove fused-madd from i386 target
options.

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

8 years agoSupport movbe as a i386 target optimization node
marxin [Fri, 23 Sep 2016 07:58:07 +0000 (07:58 +0000)] 
Support movbe as a i386 target optimization node

* gcc.target/i386/movbe-4.c: New test.
* config/i386/i386.c (ix86_valid_target_attribute_inner_p):
Handle movbe.

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

8 years agoSupport crc32 as a i386 target optimization node
marxin [Fri, 23 Sep 2016 07:57:07 +0000 (07:57 +0000)] 
Support crc32 as a i386 target optimization node

* config/i386/i386.c (ix86_valid_target_attribute_inner_p):
Handle crc32.
* gcc.target/i386/crc32-5.c: New test.

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

8 years agoFix PR target/71652
marxin [Fri, 23 Sep 2016 07:55:57 +0000 (07:55 +0000)] 
Fix PR target/71652

PR target/71652
* config/i386/i386.c (ix86_option_override_internal): Change
signature and return false when there's an error related to
arch string.
(release_options_strings): New function.
(ix86_valid_target_attribute_tree): Call the function.
* gcc.target/i386/pr71652.c: New test.
* gcc.target/i386/pr71652-2.c: New test.
* gcc.target/i386/pr71652-3.c: New test.

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

8 years ago * lib/gcc-dg.exp (process-message): Support relative line number
jakub [Fri, 23 Sep 2016 07:46:15 +0000 (07:46 +0000)] 
* lib/gcc-dg.exp (process-message): Support relative line number
notation - .+4 or .-1 etc.
* gcc.dg/dg-test-1.c: New test.

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

8 years ago * hsa-gen.c (hsa_op_immed::hsa_op_immed Use CONSTRUCTOR_NELTS (...)
jakub [Fri, 23 Sep 2016 07:34:43 +0000 (07:34 +0000)] 
* hsa-gen.c (hsa_op_immed::hsa_op_immed Use CONSTRUCTOR_NELTS (...)
instead of vec_safe_length (CONSTRUCTOR_ELTS (...)).
(gen_hsa_ctor_assignment): Likewise.
* print-tree.c (print_node): Likewise.
* tree-dump.c (dequeue_and_dump): Likewise.
* tree-sra.c (sra_modify_constructor_assign): Likewise.
* expr.c (store_constructor): Likewise.
* fold-const.c (operand_equal_p): Likewise.
* tree-pretty-print.c (dump_generic_node): Likewise.
* hsa-brig.c (hsa_op_immed::emit_to_buffer): Likewise.
* ipa-icf-gimple.c (func_checker::compare_operand): Likewise.
cp/
* typeck2.c (process_init_constructor_record): Use
CONSTRUCTOR_NELTS (...) instead of
vec_safe_length (CONSTRUCTOR_ELTS (...)).
* decl.c (reshape_init_r): Likewise.
(check_initializer): Likewise.
ada/
* gcc-interface/decl.c (gnat_to_gnu_entity): Use
CONSTRUCTOR_NELTS (...) instead of
vec_safe_length (CONSTRUCTOR_ELTS (...)).

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

8 years ago2016-09-23 Richard Biener <rguenther@suse.de>
rguenth [Fri, 23 Sep 2016 07:22:32 +0000 (07:22 +0000)] 
2016-09-23  Richard Biener  <rguenther@suse.de>

* hooks.h (hook_uint_uintp_false): Declare.

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

8 years agoProvide right LDD offset bound in avr_address_cost
saaadhu [Fri, 23 Sep 2016 07:12:35 +0000 (07:12 +0000)] 
Provide right LDD offset bound in avr_address_cost

This patch fixes cost computation in avr_address_cost - instead of the
hardcoded 61, it uses the already existing MAX_LD_OFFSET(mode) macro.

This showed up when investigating a code size regression in the ivopts
pass. That pass computes address_cost with and without an offset to
decide on the right induction variable candidate(s). The legitimate
address target hook returns false for offsets more than 63, so the
pass calls the TARGET_ADDRESS_COST hook with 62 as the offset.

The avr_address_cost hook returns 18 as the cost, and the ivopts pass
concludes that the cost of address with *any* offset is 18, which is not
true - the higher cost is incurred only with offsets bigger than MAX_LD_OFFSET.
This in turn results in a suboptimal choice of induction variables in the
ivopts pass. The patch changes the hardcoded 61 to use the mode
specific MAX_LD_OFFSET instead.

Regression testing with just that fix showed one additional
compilation timeout. That turned out to be the same as
https://lists.nongnu.org/archive/html/avr-gcc-list/2014-03/msg00010.html
- the middle end takes too much time to decide on the best strategy to
multiply DImode values on a 64 bit host. This already causes timeouts
for a few builtin-arith-overflow-* tests (see
https://gcc.gnu.org/ml/gcc-testresults/2016-09/msg02018.html), so it
isn't really related to this fix. Just providing a cost estimate for
DImode mul fixes the timeout though, so the patch does that by scaling
SImode costs by 2 for DImode muls.

With both changes in, there are no regressions, and the
builtin-arith-overflow-* tests now PASS and don't timeout.

gcc/ChangeLog

2016-09-22  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

* config/avr/avr.c (avr_rtx_costs_1): Handle DImode MULT.
(avr_address_cost): Replace 61 with MAX_LD_OFFSET(mode).

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

8 years ago[RTEMS] Always use atomic builtins for libstdc++
sh [Fri, 23 Sep 2016 06:58:00 +0000 (06:58 +0000)] 
[RTEMS] Always use atomic builtins for libstdc++

libstdc++-v3/
* config/cpu/m68k/atomicity.h: Adjust comment.
* acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Honor
explicit atomicity_dir setup via configure.host.
* configure.host (rtems-*): Set atomicity_dir.
* configure: Regenerate.

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

8 years agoDaily bump.
gccadmin [Fri, 23 Sep 2016 00:16:16 +0000 (00:16 +0000)] 
Daily bump.

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

8 years agoPR target/77676 - powerpc64 and powerpc64le stage2 bootstrap fail
msebor [Thu, 22 Sep 2016 21:28:07 +0000 (21:28 +0000)] 
PR target/77676 - powerpc64 and powerpc64le stage2 bootstrap fail

gcc/testsuite/ChangeLog:

PR target/77676
* gcc.dg/tree-ssa/builtin-sprintf-1.c: Define and use wint_t.
* gcc.dg/tree-ssa/builtin-sprintf-2.c: Fix typo.
* gcc.dg/tree-ssa/builtin-sprintf-3.c: New test.
* gcc.dg/tree-ssa/builtin-sprintf-warn-5.c: New test.

gcc/ChangeLog:

PR target/77676
* gimple-ssa-sprintf.c (target_int_min, target_int_max): Use
HOST_BITS_PER_WIDE_INT, make a static local variable auto.
(target_int_min): Correct computation.
(format_integer): Use long long as the argument for the ll length
modifier.
(format_floating): Use target_int_max().
(get_string_length): Same.
(format_string): Avoid setting the bounded flag for strings
of unknown length.
(try_substitute_return_value): Avoid setting range info when
the result isn't bounded.
* varasm.c (assemble_name): Increase buffer size.

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

8 years ago compiler: compile runtime.getcaller{pc,sp} into builtin functions
ian [Thu, 22 Sep 2016 20:32:16 +0000 (20:32 +0000)] 
compiler: compile runtime.getcaller{pc,sp} into builtin functions

    The runtime functions runtime.getcallerpc and runtime.getcallersp are
    intended to be efficient ways to get the return and frame address of the
    caller (that is, the caller of runtime.getcallerpc).  In the C code that
    is implemented by simply using C macros:

    This patch essentially implements those macros in the Go code.

    It would be nice if we could just use //extern for this, but it doesn't
    work because the runtime code passes the right argument.  Of course we
    could change the runtime code, but these are common enough that I'd
    prefer to avoid the difference from the gc version of the runtime code.

    This patch corrects the existing declaration of __builtin_return_address
    to use uint32, rather than uint, for the parameter type.  The builtin
    functions take the C type "unsigned int", which for the targets we use
    corresponds to the Go type uint32.  Not that it should matter, really.

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

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

8 years ago * gcc.dg/ifcvt-1.c: Compile also for 64-bit i?86-*-* target.
uros [Thu, 22 Sep 2016 18:11:19 +0000 (18:11 +0000)] 
* gcc.dg/ifcvt-1.c: Compile also for 64-bit i?86-*-* target.
* gcc.dg/ifcvt-2.c: Ditto.
* gcc.dg/zero_bits_compound-1.c: Ditto.
* gcc.dg/zero_bits_compound-1.c: Ditto.
* gcc.dg/pr40550.c: Simplify target selectors.
Use dg-additional-options.
* gcc.dg/pr47893.c: Ditto.
* gcc.dg/pr68435.c: Compile also for i?86-*-* target.  Add -march=i686
additional options for 32-bit x86 targets.
* gcc.dg/pr70955.c: Move to ...
* gcc.target/i386/pr70955.c: ... here.  Simplify target selector.

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

8 years ago2016-09-22 Paolo Carlini <paolo.carlini@oracle.com>
paolo [Thu, 22 Sep 2016 17:11:33 +0000 (17:11 +0000)] 
2016-09-22  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/61019
* g++.dg/cpp0x/pr61019.C: New.

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

8 years ago[ARM] Add support for -mpure-code option
avieira [Thu, 22 Sep 2016 17:02:47 +0000 (17:02 +0000)] 
[ARM] Add support for -mpure-code option

gcc/ChangeLog:
2016-09-22  Andre Vieira  <andre.simoesdiasvieira@arm.com>
            Terry Guo  <terry.guo@arm.com>

    * target.def (elf_flags_numeric): New target hook.
    * targhooks.h (default_asm_elf_flags_numeric): New.
    * varasm.c (default_asm_elf_flags_numeric): New.
    (default_elf_asm_named_section): Use new target hook.
    * config/arm/arm.opt (mpure-code): New.
    * config/arm/arm.h (SECTION_ARM_PURECODE): New.
    * config/arm/arm.c (arm_asm_init_sections): Add section
    attribute to default text section if -mpure-code.
    (arm_option_check_internal): Diagnose use of option with
    non supported targets and/or options.
    (arm_asm_elf_flags_numeric): New.
    (arm_function_section): New.
    (arm_elf_section_type_flags): New.
    * config/arm/elf.h (JUMP_TABLES_IN_TEXT_SECTION): Disable
    for -mpure-code.
    * gcc/doc/texi (TARGET_ASM_ELF_FLAGS_NUMERIC): New.
    * gcc/doc/texi.in (TARGET_ASM_ELF_FLAGS_NUMERIC): Likewise.

gcc/testsuite/ChangeLog:
2016-09-22  Andre Vieira  <andre.simoesdiasvieira@arm.com>
            Terry Guo  <terry.guo@arm.com>

    * gcc.target/arm/pure-code/ffunction-sections.c: New.
    * gcc.target/arm/pure-code/no-literal-pool.c: New.
    * gcc.target/arm/pure-code/pure-code.exp: New.

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

8 years ago gofrontend: add missing break in Builtin_call_expression::do_flatten
ian [Thu, 22 Sep 2016 17:02:04 +0000 (17:02 +0000)] 
gofrontend: add missing break in Builtin_call_expression::do_flatten

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

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

8 years ago * gcc.dg/debug/dwarf2/const-2b.c: Also compile for x86_64-*-*.
uros [Thu, 22 Sep 2016 16:23:20 +0000 (16:23 +0000)] 
* gcc.dg/debug/dwarf2/const-2b.c: Also compile for x86_64-*-*.
Remove SSE effective target requirement.

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

8 years ago * MAINTAINERS (Write After Approval): Add myself.
tnfchris [Thu, 22 Sep 2016 15:41:03 +0000 (15:41 +0000)] 
* MAINTAINERS (Write After Approval): Add myself.

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

8 years ago/cp
paolo [Thu, 22 Sep 2016 15:26:23 +0000 (15:26 +0000)] 
/cp
2016-09-22  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/71979
* class.c (build_base_path): Allow for lookup_base returning
NULL_TREE.

/testsuite
2016-09-22  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/71979
* g++.dg/cpp0x/pr71979.C: New.

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

8 years agoRevert accidental commit.
hubicka [Thu, 22 Sep 2016 15:20:43 +0000 (15:20 +0000)] 
Revert accidental commit.

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

8 years ago * regcprop.c (copyprop_hardreg_forward_1): Remove noop moves.
hubicka [Thu, 22 Sep 2016 14:34:09 +0000 (14:34 +0000)] 
* regcprop.c (copyprop_hardreg_forward_1): Remove noop moves.

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

8 years agoImplement C++17 node extraction and insertion (P0083R5)
redi [Thu, 22 Sep 2016 13:58:49 +0000 (13:58 +0000)] 
Implement C++17 node extraction and insertion (P0083R5)

* doc/xml/manual/status_cxx2017.xml: Document status.
* doc/html/*: Regenerate.
* include/Makefile.am: Add bits/node_handle.h and reorder.
* include/Makefile.in: Regenerate.
* include/bits/hashtable.h (_Hashtable::node_type)
(_Hashtable::insert_return_type, _Hashtable::_M_reinsert_node)
(_Hashtable::_M_reinsert_node_multi, _Hashtable::extract)
(_Hashtable::_M_merge_unique, _Hashtable::_M_merge_multi): Define.
(_Hash_merge_helper): Define primary template.
* include/bits/node_handle.h: New header.
* include/bits/stl_map.h (map): Declare _Rb_tree_merge_helper as
friend.
(map::node_type, map::insert_return_type, map::extract, map::merge)
(map::insert(node_type&&), map::insert(const_iterator, node_type&&)):
Define new members.
(_Rb_tree_merge_helper): Specialize for map.
* include/bits/stl_multimap.h (multimap): Declare _Rb_tree_merge_helper
as friend.
(multimap::node_type, multimap::extract, multimap::merge)
(multimap::insert(node_type&&))
(multimap::insert(const_iterator, node_type&&)): Define.
(_Rb_tree_merge_helper): Specialize for multimap.
* include/bits/stl_multiset.h (multiset): Declare _Rb_tree_merge_helper
as friend.
(multiset::node_type, multiset::extract, multiset::merge)
(multiset::insert(node_type&&))
(multiset::insert(const_iterator, node_type&&)): Define.
* include/bits/stl_set.h (set): Declare _Rb_tree_merge_helper as
friend.
(set::node_type, set::insert_return_type, set::extract, set::merge)
(set::insert(node_type&&), set::insert(const_iterator, node_type&&)):
Define.
(_Rb_tree_merge_helper): Specialize for set.
* include/bits/stl_tree.h (_Rb_tree): Declare _Rb_tree<> as friend.
(_Rb_tree::node_type, _Rb_tree::insert_return_type)
(_Rb_tree::_M_reinsert_node_unique, _Rb_tree::_M_reinsert_node_equal)
(_Rb_tree::_M_reinsert_node_hint_unique)
(_Rb_tree::_M_reinsert_node_hint_equal, _Rb_tree::extract)
(_Rb_tree::_M_merge_unique, _Rb_tree::_M_merge_equal): Define.
(_Rb_tree_merge_helper): Specialize for multiset.
* include/bits/unordered_map.h (unordered_map): Declare
unordered_map<> and unordered_multimap<> as friends.
(unordered_map::node_type, unordered_map::insert_return_type)
(unordered_map::extract, unordered_map::merge)
(unordered_map::insert(node_type&&))
(unordered_map::insert(const_iterator, node_type&&))
(unordered_multimap): Declare _Hash_merge_helper as friend.
(unordered_multimap::node_type, unordered_multimap::extract)
(unordered_multimap::merge, unordered_multimap::insert(node_type&&))
(unordered_multimap::insert(const_iterator, node_type&&)): Define.
(_Hash_merge_helper): Specialize for unordered maps and multimaps.
* include/bits/unordered_set.h (unordered_set, unordered_multiset):
Declare _Hash_merge_helper as friend.
(unordered_set::node_type, unordered_set::insert_return_type)
(unordered_set::extract, unordered_set::merge)
(unordered_set::insert(node_type&&))
(unordered_set::insert(const_iterator, node_type&&)): Define.
(unordered_multiset::node_type, unordered_multiset::extract)
(unordered_multiset::merge, unordered_multiset::insert(node_type&&))
(unordered_multiset::insert(const_iterator, node_type&&)): Define.
(_Hash_merge_helper): Specialize for unordered sets and multisets.
* include/debug/map.h (map): Add using declarations or forwarding
functions for new members.
* include/debug/map.h (multimap): Likewise.
* include/debug/map.h (multiset): Likewise.
* include/debug/map.h (set): Likewise.
* include/debug/unordered_map (unordered_map, unordered_multimap):
Likewise.
* include/debug/unordered_set( unordered_set, unordered_multiset):
Likewise.
* python/libstdcxx/v6/printers.py (get_value_from_aligned_membuf): New
helper function.
(get_value_from_list_node, get_value_from_Rb_tree_node): Use helper.
(StdNodeHandlePrinter): Define printer for node handles.
(build_libstdcxx_dictionary): Register StdNodeHandlePrinter.
* testsuite/23_containers/map/modifiers/extract.cc: New.
* testsuite/23_containers/map/modifiers/merge.cc: New.
* testsuite/23_containers/multimap/modifiers/extract.cc: New.
* testsuite/23_containers/multimap/modifiers/merge.cc: New.
* testsuite/23_containers/multiset/modifiers/extract.cc: New.
* testsuite/23_containers/multiset/modifiers/merge.cc: New.
* testsuite/23_containers/set/modifiers/extract.cc: New.
* testsuite/23_containers/set/modifiers/merge.cc: New.
* testsuite/23_containers/unordered_map/modifiers/extract.cc: New.
* testsuite/23_containers/unordered_map/modifiers/merge.cc: New.
* testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
New.
* testsuite/23_containers/unordered_multimap/modifiers/merge.cc: New.
* testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
New.
* testsuite/23_containers/unordered_multiset/modifiers/merge.cc: New.
* testsuite/23_containers/unordered_set/modifiers/extract.cc: New.
* testsuite/23_containers/unordered_set/modifiers/merge.cc: New.
* testsuite/23_containers/unordered_set/instantiation_neg.cc: Adjust
dg-error lineno.
* testsuite/libstdc++-prettyprinters/cxx17.cc: Test node handles.

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

8 years agomake next_cc0_user take rtx_insn *
tbsaunde [Thu, 22 Sep 2016 13:17:34 +0000 (13:17 +0000)] 
make next_cc0_user take rtx_insn *

gcc/ChangeLog:

2016-09-22  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

* emit-rtl.c (next_cc0_user): Make argument type rtx_insn *.
* rtl.h: Adjust prototype.

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

8 years agomake next/prev active_insn and active_insn_p take rtx_insn *
tbsaunde [Thu, 22 Sep 2016 13:16:41 +0000 (13:16 +0000)] 
make next/prev active_insn and active_insn_p take rtx_insn *

gcc/ChangeLog:

2016-09-22  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

* emit-rtl.c (next_active_insn): Change argument type to
rtx_insn *.
(prev_active_insn): Likewise.
(active_insn_p): Likewise.
* rtl.h: Adjust prototypes.
* cfgcleanup.c (merge_blocks_move_successor_nojumps): Adjust.
* config/arc/arc.md: Likewise.
* config/pa/pa.c (branch_to_delay_slot_p): Likewise.
(branch_needs_nop_p): Likewise.
(use_skip_p): Likewise.
* config/sh/sh.c (gen_block_redirect): Likewise.
(split_branches): Likewise.
* reorg.c (optimize_skip): Likewise.
(fill_simple_delay_slots): Likewise.
(fill_slots_from_thread): Likewise.
(relax_delay_slots): Likewise.
* resource.c (mark_target_live_regs): Likewise.

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

8 years agomake next/prev nonnote_nondebug_insn take rtx_insn *
tbsaunde [Thu, 22 Sep 2016 13:16:35 +0000 (13:16 +0000)] 
make next/prev nonnote_nondebug_insn take rtx_insn *

gcc/ChangeLog:

2016-09-22  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

* config/cris/cris.c (cris_asm_output_case_end): Change argument
type to rtx_insn *.
* emit-rtl.c (next_nonnote_nondebug_insn): Likewise.
(prev_nonnote_nondebug_insn): Likewise.
* config/cris/cris-protos.h: Adjust prototype.
* rtl.h: Likewise.
* jump.c (rtx_renumbered_equal_p): Adjust.

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

8 years agomake prev_real_insn take rtx_insn *
tbsaunde [Thu, 22 Sep 2016 13:16:30 +0000 (13:16 +0000)] 
make prev_real_insn take rtx_insn *

gcc/ChangeLog:

2016-09-22  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

* emit-rtl.c (prev_real_insn): Change argument type to rtx_insn *.
* rtl.h: Adjust prototype.
* config/sh/sh.md: Adjust.
* dwarf2out.c (add_var_loc_to_decl): Likewise.

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

8 years agomake next/prev nondebug_insn take rtx_insn *
tbsaunde [Thu, 22 Sep 2016 13:16:23 +0000 (13:16 +0000)] 
make next/prev nondebug_insn take rtx_insn *

gcc/ChangeLog:

2016-09-22  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

* emit-rtl.c (next_nondebug_insn): Change argument type to
rtx_insn *.
(prev_nondebug_insn): Likewise.
* loop-doloop.c (doloop_condition_get): Likewise.
* rtl.h: Adjust prototype.
* cfgloop.h: Likewise.

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

8 years agomake next/prev _nonnote_insn take rtx_insn *
tbsaunde [Thu, 22 Sep 2016 13:16:17 +0000 (13:16 +0000)] 
make next/prev _nonnote_insn take rtx_insn *

gcc/ChangeLog:

2016-09-22  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

* emit-rtl.c (next_nonnote_insn): Change argument type to
rtx_insn *.
(prev_nonnote_insn): Likewise.
* jump.c (reversed_comparison_code_parts): Likewise.
(reversed_comparison): Likewise.
* rtl.h: Adjust prototypes.
* config/arc/arc.md: Adjust.
* cse.c (find_comparison_args): Likewise.
* reorg.c (redundant_insn): Change return type to rtx_insn *.
(fix_reg_dead_note): Change argument type to rtx_insn *.
(delete_prior_computation): Likewise.
(delete_computation): Likewise.
(fill_slots_from_thread): Adjust.
(relax_delay_slots): Likewise.
* simplify-rtx.c (simplify_unary_operation_1): Likewise.
(simplify_relational_operation_1): Likewise.
(simplify_ternary_operation): Likewise.

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

8 years agouse rtx_insn * more
tbsaunde [Thu, 22 Sep 2016 13:16:11 +0000 (13:16 +0000)] 
use rtx_insn * more

gcc/ChangeLog:

2016-09-22  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

* config/arc/arc-protos.h (arc_label_align): Change type of
variables from rtx to rtx_insn *.
* config/arc/arc.c (arc_label_align): Likewise.
* config/arm/arm.c (any_sibcall_could_use_r3): Likewise.
* config/bfin/bfin.c (workaround_speculation): Likewise.
* config/c6x/c6x.c (find_next_cycle_insn): Likewise.
(find_last_same_clock): Likewise.
(reorg_split_calls): Likewise.
* config/cris/cris-protos.h (cris_cc0_user_requires_cmp): Likewise.
* config/cris/cris.c (cris_cc0_user_requires_cmp): Likewise.
* config/h8300/h8300-protos.h (same_cmp_preceding_p): Likewise.
(same_cmp_following_p): Likewise.
* config/h8300/h8300.c (same_cmp_preceding_p): Likewise.
(same_cmp_following_p): Likwise.
* config/m32r/m32r.c (m32r_expand_epilogue): Likewise.
* config/nds32/nds32-protos.h (nds32_target_alignment): Likewise.
* config/nds32/nds32.c (nds32_target_alignment): Likewise.
* config/rl78/rl78.c (rl78_alloc_physical_registers_op2):
* Likewise.
(rl78_alloc_physical_registers_cmp): Likewise.
(rl78_alloc_physical_registers_umul): Likewise.
(rl78_calculate_death_notes): Likewise.
* config/s390/s390-protos.h (s390_label_align): Likewise.
* config/s390/s390.c (s390_label_align): Likewise.
* config/sh/sh.c (barrier_align): Likewise.
* config/sparc/sparc-protos.h (emit_cbcond_nop): Likewise.
* config/sparc/sparc.c (sparc_asm_function_epilogue): Likewise.
(emit_cbcond_nop): Likewise.

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

8 years ago2016-09-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
edlinger [Thu, 22 Sep 2016 12:57:19 +0000 (12:57 +0000)] 
2016-09-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * g++.dg/pr77550.C: Use __SIZE_TYPE__.

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

8 years agoFix PR ipa/77653
marxin [Thu, 22 Sep 2016 12:52:09 +0000 (12:52 +0000)] 
Fix PR ipa/77653

PR ipa/77653
* gcc.dg/ipa/pr77653.c: New test.
PR ipa/77653
* ipa-icf.c (sem_variable::merge): Yield merge operation if
alias address matters, not necessarily address of original.

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

8 years ago2016-09-22 Richard Biener <rguenther@suse.de>
rguenth [Thu, 22 Sep 2016 12:16:42 +0000 (12:16 +0000)] 
2016-09-22  Richard Biener  <rguenther@suse.de>

PR middle-end/77697
* gimple-fold.c (fold_array_ctor_reference): Turn asserts into
fold fails.

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

8 years ago2016-09-22 Richard Biener <rguenther@suse.de>
rguenth [Thu, 22 Sep 2016 12:16:12 +0000 (12:16 +0000)] 
2016-09-22  Richard Biener  <rguenther@suse.de>

PR middle-end/77677
* gimple-match-head.c (gimple_resimplify1): Drop TREE_OVERFLOW
from constant folding results.
(gimple_resimplify2): Likewise.
(gimple_resimplify3): Likewise.

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

8 years ago2016-09-22 Richard Biener <rguenther@suse.de>
rguenth [Thu, 22 Sep 2016 12:15:38 +0000 (12:15 +0000)] 
2016-09-22  Richard Biener  <rguenther@suse.de>

PR middle-end/77678
* expr.c (expand_expr_real_1): Guard array access against negative
offset.

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

8 years agoUse GMP_RNDN for portability to MPFR 2.4.2
ro [Thu, 22 Sep 2016 11:33:25 +0000 (11:33 +0000)] 
Use GMP_RNDN for portability to MPFR 2.4.2

* gimple-ssa-sprintf.c (format_floating_max): Use GMP_RNDN instead
of MPFR_RNDN.
(format_floating): Likewise.

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

8 years ago2016-09-22 Paul Thomas <pault@gcc.gnu.org>
pault [Thu, 22 Sep 2016 11:26:59 +0000 (11:26 +0000)] 
2016-09-22  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/48298
* gfortran.h : Place the pseudo operators INTRINSIC_FORMATTED
and INTRINSIC_UNFORMATTED after the sentinel in enum
gfc_intrinsic_op so that they do not appear as place holders
in module_write.
* interface.c (dtio_op): Comment on the special nature of the
pseudo operators INTRINSIC FORMATTED and INTRINSIC_UNFORMATTED.

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

8 years ago PR fortran/77665
jakub [Thu, 22 Sep 2016 11:17:24 +0000 (11:17 +0000)] 
PR fortran/77665
* tree-inline.c (remap_gimple_stmt): Set has_simduid_loops
for all IFN_GOMP_SIMD_* internal fns, not just for
IFN_GOMP_SIMD_ORDERED_*.

* gfortran.dg/gomp/pr77665.f90: New test.

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

8 years ago Fix tests on old arm platforms for optional.
ville [Thu, 22 Sep 2016 11:01:29 +0000 (11:01 +0000)] 
Fix tests on old arm platforms for optional.
* testsuite/20_util/optional/77288.cc: Don't use exception_ptr.

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

8 years ago2016-09-22 Richard Biener <rguenther@suse.de>
rguenth [Thu, 22 Sep 2016 10:54:41 +0000 (10:54 +0000)] 
2016-09-22  Richard Biener  <rguenther@suse.de>

java/
* class.c (push_super_field): Set DECL_CONTEXT.

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

8 years agoUpdate pretty printer for std::variant
redi [Thu, 22 Sep 2016 10:06:41 +0000 (10:06 +0000)] 
Update pretty printer for std::variant

* python/libstdcxx/v6/printers.py (StdVariantPrinter): Adjust for
recent change to _Variant_storage.
* testsuite/libstdc++-prettyprinters/cxx17.cc: Test variant with
reference type.

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

8 years agoAlways qualify std::forward in <variant>
redi [Thu, 22 Sep 2016 09:56:54 +0000 (09:56 +0000)] 
Always qualify std::forward in <variant>

* include/bits/uses_allocator.h (__uses_allocator_construct): Qualify
std::forward and ::new. Cast pointer to void*.
* include/std/variant (_Variant_storage, _Union, _Variant_base)
(__access, __visit_invoke, variant, visit): Qualify std::forward.
* testsuite/20_util/variant/compile.cc: Test for ADL problems.

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

8 years ago * libstdc++-v3/include/std/variant (variant::operator=): Fix assignment
timshen [Thu, 22 Sep 2016 08:45:55 +0000 (08:45 +0000)] 
* libstdc++-v3/include/std/variant (variant::operator=): Fix assignment
on references.
* libstdc++-v3/testsuite/20_util/variant/compile.cc: Add test.

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

8 years ago2016-09-22 Paul Thomas <pault@gcc.gnu.org>
pault [Thu, 22 Sep 2016 07:46:07 +0000 (07:46 +0000)] 
2016-09-22  Paul Thomas  <pault@gcc.gnu.org>

* interface.c (check_dtio_interface1): Introduce errors for
alternate returns and incorrect numbers of arguments.
(gfc_find_specific_dtio_proc): Return cleanly if the derived
type either doesn't exist or has no namespace.

2016-09-22  Paul Thomas  <pault@gcc.gnu.org>

* gfortran.dg/dtio_11.f90: Correct for changed error messages.
* gfortran.dg/dtio_13.f90: New test.

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

8 years ago2016-09-21 Louis Krupp <louis.krupp@zoho.com>
lkrupp [Thu, 22 Sep 2016 07:07:53 +0000 (07:07 +0000)] 
2016-09-21  Louis Krupp  <louis.krupp@zoho.com>

PR fortran/66107
* gfortran.dg/pr66107.f90: New test.

2016-09-21  Louis Krupp  <louis.krupp@zoho.com>

PR fortran/66107
* decl.c (add_init_expr_to_sym): Catch variable character length
in parameter array.

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

8 years ago PR libstdc++/77641
timshen [Thu, 22 Sep 2016 03:15:58 +0000 (03:15 +0000)] 
PR libstdc++/77641
* include/std/variant (_Variant_storage::_Variant_storage):
Change _Variant_storage's union to be default constructible.
* testsuite/20_util/variant/compile.cc: New test.

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

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

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

8 years ago2016-09-21 Michael Meissner <meissner@linux.vnet.ibm.com>
meissner [Wed, 21 Sep 2016 22:12:13 +0000 (22:12 +0000)] 
2016-09-21  Michael Meissner  <meissner@linux.vnet.ibm.com>

PR target/77670
* config/rs6000/predicates.md (invert_fpmask_comparison_operator):
New predicate that matches the ISA 3.0 XSCMP{EQ,GT,GE}DP
instructions when you want to invert the test.
* config/rs6000/rs6000.md (fpmask<mode>): Use the arguments in the
correct order for XXSEL.
(mov<SFDF:mode><SFDF2:mode>cc_invert_p9): Define the inverted test
for using XSCMP{EQ,GT,GE}DP.

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

8 years ago2016-09-21 Michael Meissner <meissner@linux.vnet.ibm.com>
meissner [Wed, 21 Sep 2016 22:11:42 +0000 (22:11 +0000)] 
2016-09-21  Michael Meissner  <meissner@linux.vnet.ibm.com>

PR target/77670
* config/rs6000/predicates.md (invert_fpmask_comparison_operator):
New predicate that matches the ISA 3.0 XSCMP{EQ,GT,GE}DP
instructions when you want to invert the test.
* config/rs6000/rs6000.md (fpmask<mode>): Use the arguments in the
correct order for XXSEL.
(mov<SFDF:mode><SFDF2:mode>cc_invert_p9): Define the inverted test
for using XSCMP{EQ,GT,GE}DP.

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

8 years ago compiler, runtime: replace hashmap code with Go 1.7 hashmap
ian [Wed, 21 Sep 2016 20:58:51 +0000 (20:58 +0000)] 
compiler, runtime: replace hashmap code with Go 1.7 hashmap

    This change removes the gccgo-specific hashmap code and replaces it with
    the hashmap code from the Go 1.7 runtime.  The Go 1.7 hashmap code is
    more efficient, does a better job on details like when to update a key,
    and provides some support against denial-of-service attacks.

    The compiler is changed to call the new hashmap functions instead of the
    old ones.

    The compiler now tracks which types are reflexive and which require
    updating when used as a map key, and records the information in map type
    descriptors.

    Map_index_expression is simplified.  The special case for a map index on
    the right hand side of a tuple expression has been unnecessary for some
    time, and is removed.  The support for specially marking a map index as
    an lvalue is removed, in favor of lowering an assignment to a map index
    into a function call.  The long-obsolete support for a map index of a
    pointer to a map is removed.

    The __go_new_map_big function (known to the compiler as
    Runtime::MAKEMAPBIG) is no longer needed, as the new runtime.makemap
    function takes an int64 hint argument.

    The old map descriptor type and supporting expression is removed.

    The compiler was still supporting the long-obsolete syntax `m[k] = 0,
    false` to delete a value from a map.  That is now removed, requiring a
    change to one of the gccgo-specific tests.

    The builtin len function applied to a map or channel p is now compiled
    as `p == nil ? 0 : *(*int)(p)`.  The __go_chan_len function (known to
    the compiler as Runtime::CHAN_LEN) is removed.

    Support for a shared zero value for maps to large value types is
    introduced, along the lines of the gc compiler.  The zero value is
    handled as a common variable.

    The hash function is changed to take a seed argument, changing the
    runtime hash functions and the compiler-generated hash functions.
    Unlike the gc compiler, both the hash and equal functions continue to
    take the type length.

    Types that can not be compared now store nil for the hash and equal
    functions, rather than pointing to functions that throw.  Interface hash
    and comparison functions now check explicitly for nil.  This matches the
    gc compiler and permits a simple implementation for ismapkey.

    The compiler is changed to permit marking struct and array types as
    incomparable, meaning that they have no hash or equal function.  We use
    this for thunk types, removing the existing special code to avoid
    generating hash/equal functions for them.

    The C runtime code adds memclr, memequal, and memmove functions.

    The hashmap code uses go:linkname comments to make the functions
    visible, as otherwise the compiler would discard them.

    The hashmap code comments out the unused reference to the address of the
    first parameter in the race code, as otherwise the compiler thinks that
    the parameter escapes and copies it onto the heap.  This is probably not
    needed when we enable escape analysis.

    Several runtime map tests that ere previously skipped for gccgo are now
    run.

    The Go runtime picks up type kind information and stubs.  The type kind
    information causes the generated runtime header file to define some
    constants, including `empty`, and the C code is adjusted accordingly.

    A Go-callable version of runtime.throw, that takes a Go string, is
    added to be called from the hashmap code.

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

* go.go-torture/execute/map-1.go: Replace old map deletion syntax
with call to builtin delete function.

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

8 years agoIntroduce class rtx_reader
dmalcolm [Wed, 21 Sep 2016 20:55:06 +0000 (20:55 +0000)] 
Introduce class rtx_reader

Bundle up various global variables within gensupport.c into a
class rtx_reader, with a view towards making it easier to run the
code more than once in-process.

gcc/ChangeLog:
* genconstants.c (main): Introduce noop_reader and convert call
to read_md_files to a method call.
* genenums.c (main): Likewise.
* genmddeps.c (main): Likewise.
* genpreds.c (write_tm_constrs_h): Replace use of "in_fname" with
rtx_reader_ptr->get_top_level_filename ().
(write_tm_preds_h): Likewise.
(write_insn_preds_c): Likewise.
* gensupport.c (class gen_reader): New subclass of rtx_reader.
(rtx_handle_directive): Convert to...
(gen_reader::handle_unknown_directive): ...this.
(init_rtx_reader_args_cb): Convert return type from bool to
rtx_reader *.  Create a gen_reader instance, using it for the
call to read_md_files.  Return it if no errors occur.
(init_rtx_reader_args): Convert return type from bool to
rtx_reader *.
* gensupport.h (init_rtx_reader_args_cb): Likewise.
(init_rtx_reader_args_cb): Likewise.
* read-md.c (struct file_name_list): Move to class rtx_reader.
(read_md_file): Delete in favor of rtx_reader::m_read_md_file.
(read_md_filename): Delete in favor of
rtx_reader::m_read_md_filename.
(read_md_lineno): Delete in favor of rtx_reader::m_read_md_lineno.
(in_fname): Delete in favor of rtx_reader::m_toplevel_fname.
(base_dir): Delete in favor of rtx_reader::m_base_dir.
(first_dir_md_include): Delete in favor of
rtx_reader::m_first_dir_md_include.
(last_dir_md_include_ptr): Delete in favor of
rtx_reader::m_last_dir_md_include_ptr.
(max_include_len): Delete.
(rtx_reader_ptr): New.
(fatal_with_file_and_line): Use get_filename and get_lineno
accessors of rtx_reader_ptr.
(require_char_ws): Likewise.
(rtx_reader::read_char): New method, based on ::read_char.
(rtx_reader::unread_char): New method, based on ::unread_char.
(read_escape): Use get_filename and get_lineno accessors of
rtx_reader_ptr.
(read_braced_string): Use get_lineno accessor of rtx_reader_ptr.
(read_string): Use get_filename and get_lineno accessors of
rtx_reader_ptr.
(rtx_reader::rtx_reader): New ctor.
(rtx_reader::~rtx_reader): New dtor.
(handle_include): Convert from a function to...
(rtx_reader::handle_include): ...this method, converting
handle_directive from a callback to a virtual function.
(handle_file): Likewise, converting to...
(rtx_reader::handle_file): ...this method.
(handle_toplevel_file): Likewise, converting to...
(rtx_reader::handle_toplevel_file): ...this method.
(rtx_reader::get_current_location): New method.
(parse_include): Convert from a function to...
(rtx_reader::add_include_path): ...this method, dropping redundant
update to unused max_include_len.
(read_md_files): Convert from a function to...
(rtx_reader::read_md_files): ...this method, converting
handle_directive from a callback to a virtual function.
(noop_reader::handle_unknown_directive): New method.
* read-md.h (directive_handler_t): Delete this typedef.
(in_fname): Delete.
(read_md_file): Delete.
(read_md_lineno): Delete.
(read_md_filename): Delete.
(class rtx_reader): New class.
(rtx_reader_ptr): New decl.
(class noop_reader): New subclass of rtx_reader.
(read_char): Reimplement in terms of rtx_reader::read_char.
(unread_char): Reimplement in terms of rtx_reader::unread_char.
(read_md_files): Delete.
* read-rtl.c (read_rtx_code): Update for deletion of globals
read_md_filename and read_md_lineno.

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

8 years agoAdd PR target/71395 marker to 71395 fix
meissner [Wed, 21 Sep 2016 20:17:32 +0000 (20:17 +0000)] 
Add PR target/71395 marker to 71395 fix

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

8 years ago2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
edlinger [Wed, 21 Sep 2016 20:14:44 +0000 (20:14 +0000)] 
2016-09-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * c-common.c (c_common_truthvalue_conversion): Inhibit
        Wint-in-bool-context warning with from_macro_definition_at.
        Mention the expression will always evaluate to true.

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

8 years ago Add from_macro_definition_at predicate for locations.
jason [Wed, 21 Sep 2016 19:59:29 +0000 (19:59 +0000)] 
Add from_macro_definition_at predicate for locations.

gcc/
* input.h (from_macro_definition_at): New.
libcpp/
* line-map.c (linemap_location_from_macro_definition_p): New.
* line-map.h: Declare it.

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

8 years ago Core 903
jason [Wed, 21 Sep 2016 19:49:32 +0000 (19:49 +0000)] 
Core 903
* call.c (null_ptr_cst_p): Check char_type_p.

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

8 years agoAdd _FloatN, _FloatNx tests for __builtin_fpclassify.
jsm28 [Wed, 21 Sep 2016 17:52:47 +0000 (17:52 +0000)] 
Add _FloatN, _FloatNx tests for __builtin_fpclassify.

This patch adds tests for _FloatN and _FloatNx arguments to the
__builtin_fpclassify type-generic built-in function, omitted from the
original tests for type-generic functions on these types.

Tested for x86_64-pc-linux-gnu; all the supported new tests pass.

* gcc.dg/torture/float128-tg-3.c, gcc.dg/torture/float128x-tg-3.c,
gcc.dg/torture/float16-tg-3.c, gcc.dg/torture/float32-tg-3.c,
gcc.dg/torture/float32x-tg-3.c, gcc.dg/torture/float64-tg-3.c,
gcc.dg/torture/float64x-tg-3.c, gcc.dg/torture/floatn-tg-3.h: New
tests.

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

8 years agoFix JUMP_LABEL documentation
segher [Wed, 21 Sep 2016 17:48:47 +0000 (17:48 +0000)] 
Fix JUMP_LABEL documentation

* doc/rtl.texi (JUMP_LABEL): Document RETURN and SIMPLE_RETURN values.

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

8 years ago PR libstdc++/77288
ville [Wed, 21 Sep 2016 17:37:17 +0000 (17:37 +0000)] 
PR libstdc++/77288
* include/std/optional (__is_optional_impl, __is_optional): Remove.
(__converts_from_optional, __assigns_from_optional): New.
(optional(_Up&&)): Use is_same instead of __is_optional.
(optional(const optional<_Up>&)): Constrain with
__converts_from_optional.
(optional(optional<_Up>&&)): Likewise.
(operator=(_Up&&)): Use is_same instead of __is_optional, check
is_same and is_scalar.
(operator=(const optional<_Up>&)): Constrain with
__converts_from_optional and __assigns_from_optional.
(operator=(optional<_Up>&&)): Likewise.
* testsuite/20_util/optional/77288.cc: New.
* testsuite/20_util/optional/cons/value.cc: Adjust.

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

8 years ago Implement LWG 2729 for tuple.
ville [Wed, 21 Sep 2016 17:25:16 +0000 (17:25 +0000)] 
Implement LWG 2729 for tuple.
* include/std/tuple (_Tuple_impl(_Tuple_impl&&)):
Suppress conditionally.
(_Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&&)): Likewise.
(__is_tuple_impl_trait_impl, __is_tuple_impl_trait): New.
(_Tuple_impl(const _Head&)): Constrain.
(_Tuple_impl(_UHead&&)): Likewise.
(_Tuple_impl(_Tuple_impl&&)): Suppress conditionally.
(_Tuple_impl(const _Tuple_impl<_Idx, _UHead>&)): Constrain.
(_Tuple_impl(_Tuple_impl<_Idx, _UHead>&&)): Likewise.
(operator=(const tuple&)): Enable conditionally.
(operator=(tuple&&)): Suppress conditionally.
(operator=(const tuple<_UElements...>&)): Constrain.
(operator=(tuple<_UElements...>&&)): Likewise.
(operator=(const tuple&)): Enable conditionally (2-param tuple).
(operator=(tuple&&)): Suppress conditionally (2-param tuple).
(operator=(const tuple<_U1, _U2>&)): Constrain.
(operator=(tuple<_U1, _U2>&&)): Likewise.
(operator=(const pair<_U1, _U2>&)): Likewise.
(operator=(pair<_U1, _U2>&&)): Likewise.
* testsuite/20_util/tuple/element_access/get_neg.cc: Adjust.
* testsuite/20_util/tuple/tuple_traits.cc: New.

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

8 years ago PR libstdc++/77537
ville [Wed, 21 Sep 2016 16:48:35 +0000 (16:48 +0000)] 
PR libstdc++/77537
Implement LWG 2729 for pair.
* include/bits/stl_pair.h (_PCC): New.
(_ConstructiblePair, _ImplicitlyConvertiblePair):
Turn into static member functions of _PCC.
(_MoveConstructiblePair, _ImplicitlyMoveConvertiblePair): Likewise.
(_PCCP): New.
(pair(const _T1&, const _T2&)): Adjust.
(_PCCFP): New.
(pair(const pair<_U1, _U2>&)): Adjust.
(pair(_U1&&, const _T2&)): Likewise.
(pair(const _T1&, _U2&&)): Likewise.
(pair(_U1&&, _U2&&)): Likewise.
(pair(pair<_U1, _U2>&&)): Likewise.
(operator=(const pair&)): Make conditionally deleted.
(operator=(pair&&)): Make conditionally suppressed.
(operator=(const pair<_U1, _U2>&)): Constrain.
(operator=(pair<_U1, _U2>&&): Likewise.
* include/std/type_traits (__nonesuch): New.
* testsuite/20_util/pair/traits.cc: New.

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

8 years agoPR bootstrap/77676 - powerpc64 and powerpc64le stage2 bootstrap fail
msebor [Wed, 21 Sep 2016 16:13:12 +0000 (16:13 +0000)] 
PR bootstrap/77676 - powerpc64 and powerpc64le stage2 bootstrap fail

* c.opt (fprintf-return-value): Temporarily initialize to zero
to unblock bootstrap failures.

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

8 years ago * gcc.c-torture/unsorted/dump-noaddr.x: Remove debug statements.
uros [Wed, 21 Sep 2016 15:16:41 +0000 (15:16 +0000)] 
* gcc.c-torture/unsorted/dump-noaddr.x: Remove debug statements.

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

8 years ago PR c++/77651
jakub [Wed, 21 Sep 2016 15:13:46 +0000 (15:13 +0000)] 
PR c++/77651
c-family/
* c.opt (Waligned-new=): Add RejectNegative.
(faligned-new=): Likewise.  Spelling fix - change
aligned_new_threshhold to aligned_new_threshold.
* c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
to aligned_new_threshold.
cp/
* init.c (build_new_1): Don't suggest to use -faligned-new if
aligned_new_threshold is non-zero.
(type_has_new_extended_alignment): Change aligned_new_threshhold
to aligned_new_threshold.
* call.c (second_parm_is_size_t, aligned_allocation_fn_p,
aligned_deallocation_fn_p, build_op_delete_call): Likewise.
* decl.c (cxx_init_decl_processing): Likewise.
testsuite/
* g++.dg/cpp1z/aligned-new6.C: New test.

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

8 years ago PR sanitizer/77567
jakub [Wed, 21 Sep 2016 14:40:30 +0000 (14:40 +0000)] 
PR sanitizer/77567
* asan/asan_new_delete.cc: Cherry-pick upstream r282019.

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

8 years ago[ARM] FP16 ARM Alternative format variants of AAPCS tests.
mwahab [Wed, 21 Sep 2016 13:28:53 +0000 (13:28 +0000)] 
[ARM] FP16 ARM Alternative format variants of AAPCS tests.

testsuite/
2016-09-21  Matthew Wahab  <matthew.wahab@arm.com>

* gcc.target/arm/fp16-aapcs-3.c: New.
* gcc.target/arm/fp16-aapcs-4.c: New.
* gcc.target/arm/aapcs/aapcs/vfp22.c: New.
* gcc.target/arm/aapcs/aapcs/vfp23.c: New.
* gcc.target/arm/aapcs/aapcs/vfp24.c: New.
* gcc.target/arm/aapcs/aapcs/vfp25.c: New.

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

8 years agogcc:
edlinger [Wed, 21 Sep 2016 13:03:59 +0000 (13:03 +0000)] 
gcc:
2016-09-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR tree-optimization/77550
        * tree-vect-stmts.c (create_array_ref): Change parameters.
        (get_group_alias_ptr_type): New function.
        (vectorizable_store, vectorizable_load): Use get_group_alias_ptr_type.

testsuite:
2016-09-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR tree-optimization/77550
        * g++.dg/pr77550.C: New test.

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

8 years ago * configure.ac: Do not create links, only substitute the filenames.
ebotcazou [Wed, 21 Sep 2016 12:53:20 +0000 (12:53 +0000)] 
* configure.ac: Do not create links, only substitute the filenames.
* configure: Regenerate.
* Makefile.in: Assign the substitution results to variables.
(LIBGCC_LINKS): Define.
(enable-execute-stack.c): New rule.
(unwind.h): Likewise.
(md-unwind-support.h): Likewise.
(sfp-machine.h): Likewise.
(gthr-default.h): Likewise.
Add $(LIBGCC_LINKS) to the prerequisites of all object files and
unwind.h as prerequisite of install-unwind_h-forbuild.

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

8 years ago * gimple-ssa-sprintf.c (pass_sprintf_length::compute_format_length):
mpolacek [Wed, 21 Sep 2016 11:08:11 +0000 (11:08 +0000)] 
* gimple-ssa-sprintf.c (pass_sprintf_length::compute_format_length):
Add falls through comment.

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

8 years ago2016-09-21 Richard Biener <rguenther@suse.de>
rguenth [Wed, 21 Sep 2016 11:00:02 +0000 (11:00 +0000)] 
2016-09-21  Richard Biener  <rguenther@suse.de>

* dwarf2out.c (remove_child_with_prev): Clear child->die_sib.
(replace_child): Likewise.
(remove_child_TAG): Adjust.
(move_marked_base_types): Likewise.
(prune_unused_types_prune): Clear die_sib of removed children.

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

8 years agoUse rand_s on MinGW-w64, fix array bound overflow.
jb [Wed, 21 Sep 2016 10:07:06 +0000 (10:07 +0000)] 
Use rand_s on MinGW-w64, fix array bound overflow.

2016-09-21  Janne Blomqvist  <jb@gcc.gnu.org>

* intrinsics/random.c (getosrandom): Use rand_s() on
MinGW-w64. Fix bounds overflow in fallback code.

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

8 years agogcc/
gjl [Wed, 21 Sep 2016 09:17:32 +0000 (09:17 +0000)] 
gcc/
PR target/77326
* config/avr/avr.c (avr_notice_update_cc) [CC_NONE]: If insn
touches some regs mentioned in cc_status, do CC_STATUS_INIT.
gcc/testsuite/
PR target/77326
* gcc.target/avr/torture/pr77326.c: New test.

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

8 years ago2016-09-21 Louis Krupp <louis.krupp@zoho.com>
lkrupp [Wed, 21 Sep 2016 08:30:51 +0000 (08:30 +0000)] 
2016-09-21  Louis Krupp  <louis.krupp@zoho.com>

* gfortran.dg/pr68078.f90: Run on x86_64_*_linux* only.

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

8 years ago2016-09-21 Richard Biener <rguenther@suse.de>
rguenth [Wed, 21 Sep 2016 07:38:33 +0000 (07:38 +0000)] 
2016-09-21  Richard Biener  <rguenther@suse.de>

PR tree-optimization/77648
* tree-ssa-structalias.c (process_constraint): Handle all DEREF
with complex RHS.
(make_transitive_closure_constraints): Adjust comment.
(make_any_offset_constraints): New function.
(handle_rhs_call): Make sure to first expand a pointer to all
subfields before transitively closing it.
(handle_const_call): Likewise.  Properly expand returned
pointers as well.
(handle_pure_call): Likewise.

* gcc.dg/torture/pr77648-1.c: New testcase.
* gcc.dg/torture/pr77648-2.c: Likewise.

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

8 years ago2016-09-21 Richard Biener <rguenther@suse.de>
rguenth [Wed, 21 Sep 2016 07:37:18 +0000 (07:37 +0000)] 
2016-09-21  Richard Biener  <rguenther@suse.de>
Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/77621
* tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Split
group at non-vectorizable stmts.

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

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

8 years ago2016-09-21 Paul Thomas <pault@gcc.gnu.org>
pault [Wed, 21 Sep 2016 06:57:28 +0000 (06:57 +0000)] 
2016-09-21  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/77657

* interface.c (gfc_find_specific_dtio_proc): Borrow trick from
resolve_typebound_generic_call to find dtio procedures that
over-ride those in the declared type.

2016-09-21  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/77657
* gfortran.dg/dtio_12.f90: New test.

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

8 years agoMake integer size explicit
saaadhu [Wed, 21 Sep 2016 06:03:32 +0000 (06:03 +0000)] 
Make integer size explicit

For the lower vrp bound to be 2/-2, unsigned ints must be 4 bytes wide. This
breaks targets like avr. Explicitly using __UINT32_TYPE__ (behind a typedef)
makes the testcase pass for all targets.

gcc/testsuite/ChangeLog:

2016-09-21  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

* gcc.dg/tree-ssa/pr64130.c: Use __UINT32_TYPE__ instead of int.

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

8 years agoIncorrect arithmetic optimization involving bitfield arguments
kugan [Wed, 21 Sep 2016 03:28:24 +0000 (03:28 +0000)] 
Incorrect arithmetic optimization involving bitfield arguments

gcc/ChangeLog:

2016-09-21  Kugan Vivekanandarajah  <kuganv@linaro.org>

PR tree-optimization/72835
* tree-ssa-reassoc.c (make_new_ssa_for_def): New.
(make_new_ssa_for_all_defs): Likewise.
(zero_one_operation): Replace all SSA_NAMEs defined in the chain.

gcc/testsuite/ChangeLog:

2016-09-21  Kugan Vivekanandarajah  <kuganv@linaro.org>

PR tree-optimization/72835
* gcc.dg/tree-ssa/pr72835.c: New test.

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

8 years agoPR middle-end/49905 - Better sanity checking on sprintf src & dest to
msebor [Wed, 21 Sep 2016 01:39:27 +0000 (01:39 +0000)] 
PR middle-end/49905 - Better sanity checking on sprintf src & dest to

gcc/ChangeLog:

PR middle-end/49905
* Makefile.in (OBJS): Add gimple-ssa-sprintf.o.
* config/linux.h (TARGET_PRINTF_POINTER_FORMAT): Redefine.
* config/linux.c (gnu_libc_printf_pointer_format): New function.
* config/sol2.h (TARGET_PRINTF_POINTER_FORMAT): Same.
* config/sol2.c (solaris_printf_pointer_format): New function.
* doc/invoke.texi (-Wformat-length, -fprintf-return-value): New
options.
* doc/tm.texi.in (TARGET_PRINTF_POINTER_FORMAT): Document.
* doc/tm.texi: Regenerate.
* gimple-fold.h (get_range_strlen): New function.
(get_maxval_strlen): Declare existing function.
* gimple-fold.c (get_range_strlen): Add arguments and compute both
maximum and minimum.
 (get_range_strlen): Define overload.
(get_maxval_strlen): Adjust.
* gimple-ssa-sprintf.c: New file and pass.
* passes.def (pass_sprintf_length): Add new pass.
* targhooks.h (default_printf_pointer_format): Declare new function.
(gnu_libc_printf_pointer_format): Same.
(solaris_libc_printf_pointer_format): Same.
* targhooks.c (default_printf_pointer_format): Define new function.
* tree-pass.h (make_pass_sprintf_length): Declare new function.
* print-tree.c: Increase buffer size.

gcc/c-family/ChangeLog:

PR middle-end/49905
* c.opt: Add -Wformat-length and -fprintf-return-value.

gcc/testsuite/ChangeLog:

PR middle-end/49905
* gcc.dg/builtin-stringop-chk-1.c: Adjust.
* gcc.dg/tree-ssa/builtin-sprintf-warn-1.c: New test.
* gcc.dg/tree-ssa/builtin-sprintf-warn-2.c: New test.
* gcc.dg/tree-ssa/builtin-sprintf-warn-3.c: New test.
* gcc.dg/tree-ssa/builtin-sprintf-warn-4.c: New test.
* gcc.dg/tree-ssa/builtin-sprintf.c: New test.
* gcc.dg/tree-ssa/builtin-sprintf-2.c: New test.

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

8 years agoDaily bump.
gccadmin [Wed, 21 Sep 2016 00:16:19 +0000 (00:16 +0000)] 
Daily bump.

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

8 years agoUse ipa-vrp result in tree-vrp
kugan [Tue, 20 Sep 2016 23:41:01 +0000 (23:41 +0000)] 
Use ipa-vrp result in tree-vrp

gcc/ChangeLog:

2016-09-21  Kugan Vivekanandarajah  <kuganv@linaro.org>

 * tree-vrp.c (get_value_range): Teach PARM_DECL to use ipa-vrp
 results.

gcc/testsuite/ChangeLog:

2016-09-21  Kugan Vivekanandarajah  <kuganv@linaro.org>

* gcc.dg/guality/pr54519-1.c: Add -fno-ipa-vrp. Else constant
arguments/compare will be optimized away.
* gcc.dg/torture/ftrapv-1.c: Likewise.

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

8 years agoAdd IPA VRP
kugan [Tue, 20 Sep 2016 23:29:05 +0000 (23:29 +0000)] 
Add IPA VRP

gcc/lto/ChangeLog:
2016-09-21  Kugan Vivekanandarajah  <kuganv@linaro.org>

* lto-partition.c: Include tree-vrp.h.
* lto.c: Likewise.

gcc/testsuite/ChangeLog:

2016-09-21  Kugan Vivekanandarajah  <kuganv@linaro.org>

* g++.dg/ipa/pure-const-3.C: Add -fno-ipa-vrp. Else constant arguments
will be optimized away.
* gcc.dg/ipa/vrp1.c: New test.
* gcc.dg/ipa/vrp2.c: New test.
* gcc.dg/ipa/vrp3.c: New test.

gcc/ChangeLog:

2016-09-21  Kugan Vivekanandarajah  <kuganv@linaro.org>

* common.opt: New option -fipa-vrp.
* ipa-cp.c (ipa_get_vr_lat): New.
(ipcp_vr_lattice::print): Likewise.
(print_all_lattices): Call ipcp_vr_lattice::print.
(ipcp_vr_lattice::meet_with): New.
(ipcp_vr_lattice::meet_with_1): Likewise.
(ipcp_vr_lattice::top_p): Likewise.
(ipcp_vr_lattice::bottom_p): Likewsie.
(ipcp_vr_lattice::set_to_bottom): Likewise.
(set_all_contains_variable): Call VR set_to_bottom.
(initialize_node_lattices): Init VR lattices.
(propagate_vr_accross_jump_function): New.
(propagate_constants_accross_call): Call
propagate_vr_accross_jump_function.
(ipcp_store_vr_results): New.
(ipcp_driver): Handle VR.
* ipa-prop.c (ipa_print_node_jump_functions_for_edge): Handle VR.
(ipa_set_jf_unknown): Likewise.
(ipa_compute_jump_functions_for_edge): Likewise.
(ipa_node_params_t::duplicate): Likewise.
(ipa_write_jump_function): Likewise.
(ipa_read_jump_function): Likewise.
(write_ipcp_transformation_info): Likewise.
(read_ipcp_transformation_info): Likewise.
(ipcp_update_vr): New.
(ipcp_transform_function): Handle VR.
* ipa-prop.h (struct ipa_vr): New.
* cgraph.c: Include tree-vrp.h.
* cgraphunit.c: Likewise.
* ipa-utils.c: Likewise.
* ipa.c: Likewise.

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

8 years agoAdd Early VRP
kugan [Tue, 20 Sep 2016 23:23:55 +0000 (23:23 +0000)] 
Add Early VRP

gcc/ChangeLog:

2016-09-21  Kugan Vivekanandarajah  <kuganv@linaro.org>

* doc/invoke.texi: Document -fdump-tree-evrp.
* passes.def: Define new pass_early_vrp.
* timevar.def: Define new TV_TREE_EARLY_VRP.
* tree-pass.h (make_pass_early_vrp): New.
* tree-ssa-propagate.c: Make replace_uses_in non static.
* tree-ssa-propagate.h: Export replace_uses_in.
* tree-vrp.c (extract_range_for_var_from_comparison_expr): New.
(extract_range_from_assert): Factor out
extract_range_for_var_from_comparison_expr.
(vrp_initialize_lattice): New.
(vrp_initialize): Factor out vrp_initialize_lattice.
(vrp_valueize): Fix it to reject complex value ranges.
(vrp_free_lattice): New.
(evrp_dom_walker::before_dom_children): Likewise.
(evrp_dom_walker::after_dom_children): Likewise.
(evrp_dom_walker::push_value_range): Likewise.
(evrp_dom_walker::pop_value_range): Likewise.
(execute_early_vrp): Likewise.
(execute_vrp): Call vrp_initialize_lattice and
vrp_free_lattice.
(make_pass_early_vrp): New.

gcc/testsuite/ChangeLog:

2016-09-21  Kugan Vivekanandarajah  <kuganv@linaro.org>

* g++.dg/tree-ssa/pr31146-2.C: Run with -fno-tree-evrp as evrp also
does the same transformation.
* g++.dg/warn/pr33738.C: XFAIL as optimization now happens in ccp.
* gcc.dg/tree-ssa/evrp1.c: New test.
* gcc.dg/tree-ssa/evrp2.c: New test.
* gcc.dg/tree-ssa/evrp3.c: New test.
* gcc.dg/tree-ssa/pr20657.c: Check for the pattern in evrp dump.
* gcc.dg/tree-ssa/pr22117.c: Likewise.
* gcc.dg/tree-ssa/pr61839_2.c: Likewise.
* gcc.dg/tree-ssa/pr64130.c: Likewise.
* gcc.dg/tree-ssa/pr37508.c: Change the pattern to be checked as
foling now happens early.
* gcc.dg/tree-ssa/vrp04.c: Likewise.
* gcc.dg/tree-ssa/vrp06.c: Likewise.
* gcc.dg/tree-ssa/vrp16.c: Likewise.
* gcc.dg/tree-ssa/vrp25.c: Likewise.
* gcc.dg/tree-ssa/vrp67.c: Likewise.

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

8 years agoReport DejaGnu ERROR messages in dg-extract-results.
clyon [Tue, 20 Sep 2016 20:15:30 +0000 (20:15 +0000)] 
Report DejaGnu ERROR messages in dg-extract-results.

2016-09-20  Christophe Lyon  <christophe.lyon@linaro.org>

* dg-extract-results.py: Report DejaGnu error in the final
summary.
* dg-extract-results.sh: Likewise.

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

8 years agoReport DejaGnu ERROR messages in compare_tests
clyon [Tue, 20 Sep 2016 20:14:14 +0000 (20:14 +0000)] 
Report DejaGnu ERROR messages in compare_tests

2016-09-20  Christophe Lyon  <christophe.lyon@linaro.org>

* compare_tests: Take ERROR messages into account when
          comparing.

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

8 years ago * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Adjust fall through
mpolacek [Tue, 20 Sep 2016 18:41:14 +0000 (18:41 +0000)] 
* trans-intrinsic.c (conv_expr_ref_to_caf_ref): Adjust fall through
comment.

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

8 years ago syscall: build export_unix_test.go on solaris
ian [Tue, 20 Sep 2016 18:26:55 +0000 (18:26 +0000)] 
syscall: build export_unix_test.go on solaris

    Patch from Rainer Orth.

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

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

8 years ago * config/i386/i386.md (mult->ashift peephole2s): Use pow2p_hwi
uros [Tue, 20 Sep 2016 18:00:46 +0000 (18:00 +0000)] 
* config/i386/i386.md (mult->ashift peephole2s): Use pow2p_hwi
instead of exact_log2.

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

8 years ago PR go/77625
ian [Tue, 20 Sep 2016 17:52:23 +0000 (17:52 +0000)] 
PR go/77625

    compiler: allocate std::ofstream as a local variable

    GCC PR 77625 points out a warning about new std::ofstream.  I don't know
    how that is supposed to work, but in this case the std::ofstream may as
    well be a local variable anyhow.

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

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

8 years ago PR target/77621
uros [Tue, 20 Sep 2016 17:36:03 +0000 (17:36 +0000)] 
PR target/77621
* config/i386/i386.c (ix86_preferred_simd_mode) <case DFmode>:
Don't return word_mode for !TARGET_VECTORIZE_DOUBLE.
(ix86_add_stmt_cost): Penalize DFmode vector operations
for !TARGET_VECTORIZE_DOUBLE.

testsuite/ChangeLog:

PR target/77621
* gcc.target/i386/pr77621.c: New test.
* gcc.target/i386/vect-double-2.c: Update scan-tree-dump-times
pattern, loop should vectorize with -mtune=atom.

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

8 years ago PR go/77642
ian [Tue, 20 Sep 2016 16:48:19 +0000 (16:48 +0000)] 
PR go/77642

    runtime: pass correct type to __splitstack_find

    The code was passing uintptr* to a function that expected size_t*.

    Based on patch by Andreas Krebbel.

    Fixes GCC PR 77642.

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

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

8 years ago * doc/invoke.texi (Warning Options): Simplify language.
gerald [Tue, 20 Sep 2016 16:42:14 +0000 (16:42 +0000)] 
* doc/invoke.texi (Warning Options): Simplify language.
(Optimize Options): Complete sentence.

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

8 years ago* dbxout.c (xcoff_debug_hooks): Add filename parameter to early_finish hook.
dje [Tue, 20 Sep 2016 16:37:08 +0000 (16:37 +0000)] 
* dbxout.c (xcoff_debug_hooks):  Add filename parameter to early_finish hook.

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

8 years ago2016-09-20 Michael Meissner <meissner@linux.vnet.ibm.com>
meissner [Tue, 20 Sep 2016 16:22:24 +0000 (16:22 +0000)] 
2016-09-20  Michael Meissner  <meissner@linux.vnet.ibm.com>

* config/rs6000/rs6000.c (rs6000_expand_vector_init): For V4SF
inits on power8 and above, use the VMRGEW instruction instead of a
permute.

* config/rs6000/altivec.md (UNSPEC_VMRGEW_DIRECT): New unspec.
(p8_vmrgew_v4sf_direct): New VMRGEW insn for V4SF floating
initialization.

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

8 years ago[PATCH] [AArch64] Add missing attributes to arm_neon.h
jgreenhalgh [Tue, 20 Sep 2016 15:53:00 +0000 (15:53 +0000)] 
[PATCH] [AArch64] Add missing attributes to arm_neon.h

Committed on behalf of Tamar Christina  <tamar.christina@arm.com>

gcc/

* config/aarch64/arm_neon.h
(vst2_s64, vst2_u64, vst2_f64, vst2_s8): Add missing attributes.
(vst3_s64, vst3_u64, vst3_f64, vst3_s8): Likewise.
(vst4_s64, vst4_u64, vst4_f64, vst4_s8): Likewise.

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

8 years ago2016-09-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
edlinger [Tue, 20 Sep 2016 15:28:02 +0000 (15:28 +0000)] 
2016-09-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * config/var/vax.h (ELIMINABLE_REGS): Define.
        (INITIAL_ELIMINATION_OFFSET): Define.

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

8 years ago PR testsuite/63299
jakub [Tue, 20 Sep 2016 15:19:14 +0000 (15:19 +0000)] 
PR testsuite/63299
* g++.old-deja/g++.jason/init3.C (My_string::~My_string): Use delete[]
instead of delete.

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

8 years ago PR c++/77626
jakub [Tue, 20 Sep 2016 15:18:31 +0000 (15:18 +0000)] 
PR c++/77626
* constexpr.c (cxx_fold_indirect_ref): Don't call byte_position on
FIELD_DECLs with error_mark_node type.  Remove useless break; after
return.

* g++.dg/other/pr77626.C: New test.

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

8 years ago PR c++/77638
jakub [Tue, 20 Sep 2016 15:17:41 +0000 (15:17 +0000)] 
PR c++/77638
* parser.c (cp_parser_template_declaration_after_parameter): For 2
argument operator"" template set ok to false for
parm == error_mark_node.

* g++.dg/cpp0x/udlit-tmpl-arg-neg2.C: New test.

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