1. 11 Jan, 2017 21 commits
    • re PR c++/72813 (atomic header cannot be compiled into translation unit with… · 6b5b4e9c
      re PR c++/72813 (atomic header cannot be compiled into translation unit with -fkeep-inline-functions)
      
      	PR c++/72813
      	* gcc.c (default_compilers): Don't add -o %g.s for -S -save-temps
      	of c-header.
      
      	* c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
      	PCH file.
      
      	* decl2.c (c_parse_final_cleanups): Set flag_syntax_only to 1 after
      	writing PCH file.
      
      From-SVN: r244328
      Jakub Jelinek committed
    • compiler: mark generated struct/array types as incomparable · 25e15acf
          
          The recent change to generate type functions for more types with
          identity comparisons caused us to generate some unnecessary functions,
          and even caused a compiler crash on Solaris due to phase ordering.
          Avoid this by marking all generated and uncompared struct and array
          types as incomparable, so that we don't try to generate type functions
          for them.
          
          Reviewed-on: https://go-review.googlesource.com/35110
      
      From-SVN: r244327
      Ian Lance Taylor committed
    • PR c/78768 - -Walloca-larger-than and -Wformat-length warnings disabled by -flto · bf5fbf46
      gcc/ChangeLog:
      	* c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
      	Also enable for LTO.
      
      gcc/testsuite/ChangeLog:
      	PR c/78768
      	* gcc.dg/pr78768.c: New test.
      
      From-SVN: r244326
      Martin Sebor committed
    • Offer suggestions for unrecognized sanitizer options (PR driver/78877) · 19ff0049
      gcc/ChangeLog:
      	PR driver/78877
      	* opts.c: Include "spellcheck.h"
      	(struct string_fragment): New struct.
      	(struct edit_distance_traits<const string_fragment &>): New
      	struct.
      	(get_closest_sanitizer_option): New function.
      	(parse_sanitizer_options): Offer suggestions for unrecognized arguments.
      
      gcc/testsuite/ChangeLog:
      	PR driver/78877
      	* gcc.dg/spellcheck-options-14.c: New test case.
      	* gcc.dg/spellcheck-options-15.c: New test case.
      	* gcc.dg/spellcheck-options-16.c: New test case.
      	* gcc.dg/spellcheck-options-17.c: New test case.
      
      From-SVN: r244325
      David Malcolm committed
    • dwarf2out.c (DWARF_COMPILE_UNIT_HEADER_SIZE): For DWARF5 decrease by 12. · d29bd378
      	* dwarf2out.c (DWARF_COMPILE_UNIT_HEADER_SIZE): For DWARF5 decrease
      	by 12.
      	(DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE): Always
      	DWARF_COMPILE_UNIT_HEADER_SIZE plus 12.
      	(DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE): Define.
      	(calc_base_type_die_sizes): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE
      	for initial die_offset if dwarf_split_debug_info.
      	(output_comp_unit): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE for
      	initial next_die_offset if dwo_id is non-NULL.  Don't emit padding
      	fields.
      	(output_skeleton_debug_sections): Formatting fix.  Use
      	DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE instead of
      	DWARF_COMPILE_UNIT_HEADER_SIZE.  Don't emit padding.
      
      From-SVN: r244323
      Jakub Jelinek committed
    • My previous change to the Cortex-A53 scheduler resulted in a 13% regression on a… · d2471b31
      My previous change to the Cortex-A53 scheduler resulted in a 13% regression on a proprietary benchmark.
      
      My previous change to the Cortex-A53 scheduler resulted in a 13% regression on a
      proprietary benchmark.  This turned out to be due to non-optimal scheduling of int
      to float conversions.  This patch separates int to FP transfers from int to float
      conversions based on experiments to determine the best schedule.  As a result of
      these tweaks the performance of the benchmark improves by 20%.
      
          gcc/
      	* config/arm/cortex-a53.md: Add bypasses for
      	cortex_a53_r2f_cvt.
      	(cortex_a53_r2f): Only use for transfers.
      	(cortex_a53_f2r): Likewise.
      	(cortex_a53_r2f_cvt): Add reservation for conversions.
      	(cortex_a53_f2r_cvt): Likewise.
      
      From-SVN: r244322
      Wilco Dijkstra committed
    • arm_neon.h: Add __artificial__ and gnu_inline to all inlined functions, change static to extern. · dbd84710
      2017-01-09  Tamar Christina  <tamar.christina@arm.com>
      
      	* config/arm/arm_neon.h: Add __artificial__ and gnu_inline
                to all inlined functions, change static to extern.
      
      From-SVN: r244321
      Tamar Christina committed
    • [ARM] PR target/78253 Call weak function instead of strong when called through pointer. · 6027c4b5
      2017-01-11  Christophe Lyon  <christophe.lyon@linaro.org>
      
      	PR target/78253
      	* config/arm/arm.c (legitimize_pic_address): Handle reference to
      	weak symbol.
      	(arm_assemble_integer): Likewise.
      
      From-SVN: r244320
      Christophe Lyon committed
    • PR78134 fix return types of heterogeneous lookup functions · b744bf4e
      	PR libstdc++/78134
      	* include/bits/stl_map.h (map::lower_bound, map::upper_bound)
      	(map::equal_range): Fix return type of heterogeneous overloads.
      	* include/bits/stl_multimap.h (multimap::lower_bound)
      	(multimap::upper_bound, multimap::equal_range): Likewise.
      	* include/bits/stl_multiset.h (multiset::lower_bound)
      	(multiset::upper_bound, multiset::equal_range): Likewise.
      	* include/bits/stl_set.h (set::lower_bound, set::upper_bound)
      	(set::equal_range): Likewise.
      	* testsuite/23_containers/map/operations/2.cc
      	* testsuite/23_containers/multimap/operations/2.cc
      	* testsuite/23_containers/multiset/operations/2.cc
      	* testsuite/23_containers/set/operations/2.cc
      
      From-SVN: r244318
      Jonathan Wakely committed
    • PR78273 fix count to work with partitioning function · b091b8dc
      	PR libstdc++/78273
      	* include/bits/stl_map.h (map::count<_Kt>(const _Kt&)): Don't assume
      	the heterogeneous comparison can only find one match.
      	* include/bits/stl_set.h (set::count<_Kt>(const _Kt&)): Likewise.
      	* testsuite/23_containers/map/operations/2.cc: Test count works with
      	comparison function that just partitions rather than sorting.
      	* testsuite/23_containers/set/operations/2.cc: Likewise.
      
      From-SVN: r244317
      Jonathan Wakely committed
    • [arm] Replace command-line option .def files with single definition file · a92ffb3e
      The files arm-cores.def, arm-fpus.def and arm-arches.def are parsed and
      used in several places and the format is slightly awkward to maintain
      as they must be parsable in C and by certain scripts.  Furthermore,
      changes to the content that affects every entry is particularly awkward for
      dealing with merges.
      
      This patch replaces all three files with a single file that specifies all
      the command-line related definitions in a new format that allows for better
      checking for consistency as well as (hopefully) easier to merge changes.
      
      The awk script used to parse it is relatively complicated, but should be
      pretty portable.  It works by parsing in all the data and then operating
      one of a number of possible sub-commands to generate the desired output.
      
      The new method picked up one error.  The CPU descriptions referred to an
      architecture ARMv5tej which was not supported by -march.  This has been
      fixed by adding the relevant entry to the architecture list.
      
      gcc:
      	* config.gcc: Use new awk script to check CPU, FPU and architecture
      	parameters for --with-... options.
      	* config/arm/parsecpu.awk: New file
      	* config/arm/arm-cpus.in: New file.
      	* config/arm/arm-opts.h: Include arm-cpu.h instead of processing .def
      	files.
      	* config/arm/arm.c: Include arm-cpu-data.h instead of processing .def
      	files.
      	* config/arm/t-arm: Update dependency rules.
      	* common/config/arm/arm-common.c: Include arm-cpu-cdata.h instead
      	of processing .def files.
      	* config/arm/genopt.sh: Deleted.
      	* config/arm/gentune.sh: Deleted.
      	* config/arm/arm-cores.def: Deleted.
      	* config/arm/arm-arches.def: Deleted.
      	* config/arm/arm-fpus.def: Deleted.
      	* config/arm/arm-tune.md: Regenerated.
      	* config/arm/arm-tables.opt: Regenerated.
      	* config/arm/arm-cpu.h: New generated file.
      	* config/arm/arm-cpu-data.h: New generated file.
      	* config/arm/arm-cpu-cdata.h: New generated file.
      
      Contrib:
      	* gcc_update: Adjust touch list.
      
      From-SVN: r244316
      Richard Earnshaw committed
    • re PR lto/79042 (LTO doesn't propagate node->dynamically_initialized bit for varpool nodes.) · ca280d38
      	PR lto/79042
      	* lto-cgraph.c (lto_output_varpool_node): Pack dynamically_initialized
      	bit.
      	(input_varpool_node): Unpack dynamically_initialized bit.
      
      From-SVN: r244314
      Maxim Ostapenko committed
    • Fix flatten-3.c test-case. · c86e9f03
      2017-01-11  Martin Liska  <mliska@suse.cz>
      
      	* gcc.dg/tree-ssa/flatten-3.c: Add -fno-ipa-icf to dg-options.
      
      From-SVN: r244313
      Martin Liska committed
    • decomp4.C (test): Use 2 identifier decomposition instead of just 1 for the decomposition from... · 947f51d6
      	* g++.dg/cpp1z/decomp4.C (test): Use 2 identifier decomposition
      	instead of just 1 for the decomposition from struct C.
      
      From-SVN: r244312
      Jakub Jelinek committed
    • re PR rtl-optimization/79032 (unaligned memory access generated with LRA and optimization) · 849fccf8
      	PR rtl-optimization/79032
      	* lra-constraints.c (simplify_operand_subreg): In the MEM case, test
      	the alignment of the adjusted memory reference against that of MODE,
      	instead of the alignment of the original memory reference.
      
      From-SVN: r244311
      Eric Botcazou committed
    • re PR bootstrap/79052 (bootstrap-ubsan failures due to warnings) · e3252775
      2017-01-11  Richard Biener  <rguenther@suse.de>
      
      	PR bootstrap/79052
      	* gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
      	returns on parse errors.
      
      From-SVN: r244310
      Richard Biener committed
    • Reduce the size of variant, it doesn't need an index of type size_t internally. · f3df0b3c
      Reduce the size of variant, it doesn't need an index of
      type size_t internally.
      * include/std/variant (parse_numbers.h): New include.
      (__select_index): New.
      (_Variant_storage<false, _Types...>::_M_reset_impl): Use
      _index_type for comparison with variant_npos.
      (_Variant_storage<false, _Types...>::__index_type): New.
      (_Variant_storage<false, _Types...>::_M_index): Change the
      type from size_t to __index_type.
      (_Variant_storage<true, _Types...>::__index_type): New.
      (_Variant_storage<true, _Types...>::_M_index): Change the
      type from size_t to __index_type.
      (_Variant_base::_M_valid): Use _Storage::__index_type
      for comparison with variant_npos.
      (variant::index): Use _Base::_Storage::__index_type
      for comparison with variant_npos.
      * testsuite/20_util/variant/index_type.cc: New.
      
      From-SVN: r244309
      Ville Voutilainen committed
    • [hsa] Fix hsa function cloning test · 51020892
      2017-01-11  Martin Jambor  <mjambor@suse.cz>
      
      	* hsa.c (hsa_callable_function_p): Revert addition of DECL_ARTIFICIAL
      	test.
      	* ipa-hsa.c (process_hsa_functions): Only duplicate non-artificial
      	decorated functions.
      
      From-SVN: r244308
      Martin Jambor committed
    • tree-vrp.c (evrp_dom_walker::before_dom_children): Also set range/nonnull info for PHI results. · 80c74722
      2017-01-11  Richard Biener  <rguenther@suse.de>
      
      	* tree-vrp.c (evrp_dom_walker::before_dom_children): Also
      	set range/nonnull info for PHI results.  Do not set it on
      	stmts marked for removal.
      
      	* gcc.dg/tree-ssa/pr61743-1.c: Adjust.
      
      From-SVN: r244305
      Richard Biener committed
    • re PR middle-end/50199 (wrong code with -flto -fno-merge-constants) · 4c4b4703
      	PR middle-end/50199
      	* lto-lang.c (lto_post_options): Force flag_merge_constants = 1
      	if it was 0.
      
      	* gcc.dg/lto/pr50199_0.c: New test.
      
      From-SVN: r244304
      Jakub Jelinek committed
    • Daily bump. · a476f046
      From-SVN: r244302
      GCC Administrator committed
  2. 10 Jan, 2017 19 commits
    • expr.c (store_field): In the bitfield case... · a34ab4c9
      	* expr.c (store_field): In the bitfield case, fetch the return value
      	from the registers before applying a single big-endian adjustment.
      	Always do a final load for a BLKmode value not larger than a word.
      
      From-SVN: r244299
      Eric Botcazou committed
    • PR testsuite/78960 - FAIL: gcc.dg/tree-ssa/builtin-sprintf.c execution test · 664b1a6b
      PR testsuite/78960 - FAIL: gcc.dg/tree-ssa/builtin-sprintf.c execution test
      PR testsuite/78959 - FAIL: gcc.c-torture/execute/pr78622.c 
      PR testsuite/78133 - Commit r241489 adds printf specifiers not supported by newlib
      
      gcc/testsuite/ChangeLog:
      	PR testsuite/78960
      	PR testsuite/78959
      	PR testsuite/78133
      	* gcc.dg/tree-ssa/builtin-sprintf.c: Require C99 runtime.
      	* gcc.dg/tree-ssa/pr78622.c: Ditto.
      
      From-SVN: r244298
      Martin Sebor committed
    • PR middle-end/78138 - missing warnings on buffer overflow with non-constant source length · fefd3086
      gcc/testsuite/ChangeLog:
      
      	PR middle-end/78138
      	* gcc.dg/pr78138.c: New test.
      
      From-SVN: r244297
      Martin Sebor committed
    • re PR c++/77598 (constexpr compilation failure on reference type casting) · 8cef5875
      	PR c++/77598
      
      	* g++.dg/cpp0x/constexpr-ref11.C: New.
      
      From-SVN: r244296
      Jason Merrill committed
    • PR middle-end/78245 - missing -Wformat-length on an overflow of a dynamically allocated buffer · 5a50f6bb
      gcc/testsuite/ChangeLog:
      
      	PR middle-end/78245
      	* gcc.dg/tree-ssa/builtin-sprintf-warn-3.c: Add tests.
      
      gcc/ChangeLog:
      
      	PR middle-end/78245
      	* gimple-ssa-sprintf.c (get_destination_size): Call
      	{init,fini}object_sizes.
      	* tree-object-size.c (addr_object_size): Adjust.
      	(pass_through_call): Adjust.
      	(pass_object_sizes::execute): Adjust.
      	* tree-object-size.h (fini_object_sizes): Declare.
      
      From-SVN: r244294
      Martin Sebor committed
    • PR middle-end/78245 - missing -Wformat-length on an overflow of a dynamically allocated buffer · eb07c7cf
      gcc/testsuite/ChangeLog:
      
      	PR middle-end/78245
      	* gcc.dg/tree-ssa/builtin-sprintf-warn-3.c: Add tests.
      
      gcc/ChangeLog:
      
      	PR middle-end/78245
      	* gimple-ssa-sprintf.c (get_destination_size): Call
      	{init,fini}object_sizes.
      	* tree-object-size.c (addr_object_size): Adjust.
      	(pass_through_call): Adjust.
      	(pass_object_sizes::execute): Adjust.
      	* tree-object-size.h (fini_object_sizes): Declare.
      
      From-SVN: r244293
      Martin Sebor committed
    • Fix issues with unrepresentable column numbers (PR c++/77949) · b9f4757f
      PR c++/77949 identifies an ICE when the C++ frontend attempts to emit a
      fix-it hint inserting a missing semicolon at column 4097 of a source file.
      
      This column value exceeds LINE_MAP_MAX_COLUMN_NUMBER and hence isn't
      representable using a location_t.
      
      Attempting to do so leads to these problems, which this patch fixes:
      
      (a) when encountering a column number > LINE_MAP_MAX_COLUMN_NUMBER we
      create a new linemap with m_column_and_range_bits == 0, but
      linemap_position_for_column doesn't check for this, and hence can emit
      a bogus location_t value that's calculated relative to the previous
      linemap start, but which will be decoded relative to the new linemap,
      leading to very large incorrect line values.
      
      (b) when encountering a column number that can't be represented, and
      for which the linemap was pre-existing, the code would hit this assertion:
        if (linemap_assert_fails (column < (1u << map->m_column_and_range_bits)))
      around a bail-out condition.  The patch replaces this assertion with a
      simple conditional, to stop the ICE when this occurs, and fixes the
      bit count (effective column bits, vs column+range bits)
      
      (c) the C++ frontend wasn't checking for failure of
      linemap_position_for_loc_and_offset when considering emitting the fix-it
      hint.  The patch adds a conditional, so that no fix-it hint is emitted
      if the location is bogus.
      
      gcc/cp/ChangeLog:
      	PR c++/77949
      	* parser.c (cp_parser_class_specifier_1): Only suggest inserting
      	a missing semicolon if we have a valid insertion location for
      	the fix-it hint.
      
      gcc/ChangeLog:
      	PR c++/77949
      	* input.c (selftest::test_accessing_ordinary_linemaps): Verify
      	that we correctly handle column numbers greater than
      	LINE_MAP_MAX_COLUMN_NUMBER.
      
      gcc/testsuite/ChangeLog:
      	PR c++/77949
      	* g++.dg/diagnostic/pr77949.C: New test case.
      
      libcpp/ChangeLog:
      	PR c++/77949
      	* line-map.c (linemap_position_for_column): When calling
      	linemap_start_line, detect if a new linemap was created with
      	0 column bits, and bail out early if this is the case.
      	(linemap_position_for_loc_and_offset): Replace overzealous
      	linemap_assert_fails with a simple conditional; use correct
      	bit count.
      
      From-SVN: r244292
      David Malcolm committed
    • runtime: copy more scheduler code from Go 1.7 runtime · 6fcb740a
          
          I looked at a diff of proc.go between Go 1.7 and gccgo, and copied
          over all the easy stuff.
          
          Reviewed-on: https://go-review.googlesource.com/35090
      
      From-SVN: r244291
      Ian Lance Taylor committed
    • PR tree-optimization/78775 - [7 Regression] ICE in maybe_warn_alloc_args_overflow · c16880ef
      gcc/ChangeLog:
      
      	PR tree-optimization/78775
      	* builtins.c (get_size_range): Move...
      	* calls.c: ...to here.
      	(alloc_max_size): Accept zero argument.
      	(operand_signed_p): Remove.
      	(maybe_warn_alloc_args_overflow): Call get_size_range.
      	* calls.h (get_size_range): Declare.
      
      gcc/testsuite/ChangeLog:
      
      	PR tree-optimization/78775
      	* gcc.dg/attr-alloc_size-4.c: Add test cases.
      	* gcc.dg/attr-alloc_size-10.c: New test.
      	* gcc.dg/attr-alloc_size-11.c: New test.
      	* gcc.dg/builtin-stringop-chk-7.c: New test.
      	* gcc.dg/pr78775.c: New test.
      	* gcc.dg/pr78973-2.c: New test.
      	* gcc.dg/pr78973.c: New test.
      
      From-SVN: r244290
      Martin Sebor committed
    • driver-msp430.c (msp430_mcu_data): Sync with data from TI's devices.csv file as of September 2016. · 5d582919
      2017-01-10  Joe Seymour  <joe.s@somniumtech.com>
      
      	* config/msp430/driver-msp430.c (msp430_mcu_data): Sync with data
      	from TI's devices.csv file as of September 2016.
      	* config/msp430/msp430.c (msp430_mcu_data): Likewise.
      
      From-SVN: r244289
      Joe Seymour committed
    • * da.po: Update. · b7cfd5c4
      From-SVN: r244288
      Joseph Myers committed
    • re PR middle-end/77766 (wrong code at -O2 and -O3 in 64-bit mode on… · 5363d9d9
      re PR middle-end/77766 (wrong code at -O2 and -O3 in 64-bit mode on x86_64-linux-gnu (executable hangs))
      
      	PR tree-optimization/77766
      	PR tree-optimization/78856
      	* gcc.c-torture/execute/pr77766.c: New test.
      
      From-SVN: r244287
      Jeff Law committed
    • extend.texi: Tweak formatting to fix overfull hbox warnings. · dc703d70
      2017-01-10  Sandra Loosemore  <sandra@codesourcery.com>
      
      	gcc/
      	* doc/extend.texi: Tweak formatting to fix overfull hbox warnings.
      	* doc/invoke.texi: Likewise.
      	* doc/md.texi: Likewise.
      	* doc/objc.texi: Likewise.
      
      From-SVN: r244286
      Sandra Loosemore committed
    • FI 20, decomposition declaration with parenthesized initializer. · 2af5cb50
      	* parser.c (cp_parser_decomposition_declaration): Use
      	cp_parser_initializer.
      
      From-SVN: r244282
      Jason Merrill committed
    • fuchsia-elf.h: New file. · 491b3c5f
      2017-01-10  Joshua Conner  <joshconner@google.com>
      
              * config/arm/fuchsia-elf.h: New file.
              * config/fuchsia.h: New file.
              * config.gcc (*-*-fuchsia*): Set native_system_header_dir.
              (aarch64*-*-fuchsia*, arm*-*-fuchsia*, x86_64-*-fuchsia*): Add to
              targets.
              * config.host: (aarch64*-*-fuchsia*, arm*-*-fuchsia*): Add to hosts.
      
      From-SVN: r244281
      Joshua Conner committed
    • Adjust effective target selector to fix C++17 FAIL · 904112f6
      	* testsuite/18_support/exception_ptr/60612-unexpected.cc: Adjust
      	effective target selector to prevent running in C++17 mode.
      
      From-SVN: r244280
      Jonathan Wakely committed
    • PR77528 add default constructors for container adaptors · d2e1d4b7
      	PR libstdc++/77528
      	* include/bits/stl_queue.h (queue::c): Add default member initializer.
      	(queue::queue()): Add constructor and define as defaulted.
      	(queue::queue(_Sequence&&)): Remove default argument.
      	(priority_queue::c, priority_queue::comp): Add default member
      	initializers.
      	(priority_queue::priority_queue()): Add constructor and define as
      	defaulted.
      	(priority_queue::priority_queue(const _Compare&, _Sequence&&)):
      	Remove default argument for first parameter.
      	* include/bits/stl_stack.h (stack::c): Add default member initializer.
      	(stack::stack()): Add constructor and define as defaulted.
      	(stack::stack(const _Sequence&)): Remove default argument.
      	* testsuite/23_containers/priority_queue/requirements/
      	explicit_instantiation/1.cc: Test explicit instantiation with
      	non-DefaultConstructible sequence.
      	* testsuite/23_containers/priority_queue/77528.cc: New test.
      	* testsuite/23_containers/priority_queue/requirements/
      	explicit_instantiation/1_c++0x.cc: Replace with 1_c++98.cc.
      	* testsuite/23_containers/queue/77528.cc: New test.
      	* testsuite/23_containers/queue/requirements/explicit_instantiation/
      	1.cc: Test explicit instantiation with non-DefaultConstructible
      	sequence.
      	* testsuite/23_containers/queue/requirements/explicit_instantiation/
      	1_c++0x.cc: Replace with 1_c++98.cc.
      	* testsuite/23_containers/stack/77528.cc: New test.
      	* testsuite/23_containers/stack/requirements/explicit_instantiation/
      	1.cc: Test explicit instantiation with non-DefaultConstructible
      	sequence.
      	* testsuite/23_containers/stack/requirements/explicit_instantiation/
      	1_c++0x.cc: Replace with 1_c++98.cc.
      
      From-SVN: r244278
      Jonathan Wakely committed
    • * ChangeLog: Fix whitespace. · 034afd02
      From-SVN: r244276
      Uros Bizjak committed