1. 09 Aug, 2018 17 commits
    • Define aliases for containers using polymorphic_allocator · 1fc9d0b0
      These aliases are placed in the top-level header, e.g. <vector> not
      <bits/stl_vector.h>. This ensures that they refer to whichever of
      std::vector or __debug::vector or __profile::vector is in use when the
      header is included.
      
      	* include/std/deque (std::pmr::deque): Declare alias.
      	* include/std/forward_list (std::pmr::forward_list): Likewise.
      	* include/std/list (std::pmr::list): Likewise.
      	* include/std/map (std::pmr::map, std::pmr::multimap): Likewise.
      	* include/std/regex (std::pmr::match_results, std::pmr::cmatch)
      	(std::pmr::smatch, std::pmr::wcmatch, std::pmr::wsmatch): Likewise.
      	* include/std/set (std::pmr::set, std::pmr::multiset): Likewise.
      	* include/std/string (std::pmr::basic_string, std::pmr::string)
      	(std::pmr::u16string, std::pmr::u32string, std::pmr::wstring):
      	Likewise.
      	* include/std/unordered_map (std::pmr::unordered_map)
      	(std::pmr::unordered_multimap): Likewise.
      	* include/std/unordered_set (std::pmr::unordered_set)
      	(std::pmr::unordered_multiset): Likewise.
      	* include/std/vector (std::pmr::vector): Likewise.
      	* testsuite/21_strings/basic_string/types/pmr_typedefs.cc: New test.
      	* testsuite/23_containers/deque/types/pmr_typedefs.cc: New test.
      	* testsuite/23_containers/forward_list/pmr_typedefs.cc: New test.
      	* testsuite/23_containers/list/pmr_typedefs.cc: New test.
      	* testsuite/23_containers/map/pmr_typedefs.cc: New test.
      	* testsuite/23_containers/multimap/pmr_typedefs.cc: New test.
      	* testsuite/23_containers/multiset/pmr_typedefs.cc: New test.
      	* testsuite/23_containers/set/pmr_typedefs.cc: New test.
      	* testsuite/23_containers/unordered_map/pmr_typedefs.cc: New test.
      	* testsuite/23_containers/unordered_multimap/pmr_typedefs.cc: New
      	test.
      	* testsuite/23_containers/unordered_multiset/pmr_typedefs.cc: New
      	test.
      	* testsuite/23_containers/unordered_set/pmr_typedefs.cc: New test.
      	* testsuite/23_containers/vector/pmr_typedefs.cc: New test.
      	* testsuite/28_regex/match_results/pmr_typedefs.cc: New test.
      
      From-SVN: r263456
      Jonathan Wakely committed
    • m68k.c (m68k_adjust_decorated_operand): Remove unused variable. · 093f71db
      	* config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
      	unused variable.
      
      From-SVN: r263455
      Jeff Law committed
    • re PR middle-end/86897 (gcc.dg/uninit-suppress_2.c FAILs) · 568f6ad5
      	PR middle-end/86897
      	* gcc.dg/uninit-suppress_2.c: Disable DOM.
      
      From-SVN: r263454
      Jeff Law committed
    • Add missing PR to Nios fix for CVE-2017-5753 · cdaa7e32
      I nearly missed this patch for my accumulated back-porting list since
      it didn't have the PR number in it.
      
      Just adding it so that I can track things properly.  The original
      commit landed as r263301.
      
      From-SVN: r263453
      Richard Earnshaw committed
    • m68k-protos.h (m68k_final_prescan_insn): Remove prototype. · 6b10fc37
      * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
      prototype.
      
      From-SVN: r263452
      Andreas Schwab committed
    • Allow inner-loop reductions with variable-length vectors · b8d5e148
      While working on PR 86871, I noticed we were being overly restrictive
      when handling variable-length vectors.  For:
      
        for (i : ...)
          {
            res = ...;
            for (j : ...)
              res op= ...;
            a[i] = res;
          }
      
      we don't need a reduction operation (although we do for double
      reductions like:
      
        res = ...;
        for (i : ...)
          for (j : ...)
            res op= ...;
        a[i] = res;
      
      which must still be rejected).
      
      2018-08-08  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
      	reductions for variable-length vectors.
      
      gcc/testsuite/
      	* gcc.target/aarch64/sve/reduc_8.c: New test.
      
      From-SVN: r263451
      Richard Sandiford committed
    • diagnostics: add line numbers to source (PR other/84889) · 56b61d7f
      This patch adds a left margin to the lines of source (and annotations)
      printed by diagnostic_show_locus, so that e.g. rather than:
      
      test.c: In function 'test':
      test.c:12:15: error: 'struct foo' has no member named 'm_bar'; did you mean 'bar'?
         return ptr->m_bar;
                     ^~~~~
                     bar
      
      we print:
      
      test.c: In function 'test':
      test.c:12:15: error: 'struct foo' has no member named 'm_bar'; did you mean 'bar'?
      12 |   return ptr->m_bar;
         |               ^~~~~
         |               bar
      
      Similarly, for a multiline case (in C++ this time), this:
      
      bad-binary-ops.C: In function 'int test_2()':
      bad-binary-ops.C:26:4: error: no match for 'operator+' (operand types are 's' and 't')
         return (some_function ()
                 ~~~~~~~~~~~~~~~~
          + some_other_function ());
          ^~~~~~~~~~~~~~~~~~~~~~~~
      
      becomes:
      
      bad-binary-ops.C: In function 'int test_2()':
      bad-binary-ops.C:26:4: error: no match for 'operator+' (operand types are 's' and 't')
      25 |   return (some_function ()
         |           ~~~~~~~~~~~~~~~~
      26 |    + some_other_function ());
         |    ^~~~~~~~~~~~~~~~~~~~~~~~
      
      I believe this slightly improves the readability of the output, in that it:
      - distinguishes between the user's source code vs the annotation lines
        that we're adding (the underlinings and fix-it hints here)
      - shows the line numbers in another place (potentially helpful for
        multiline diagnostics, where the user can see the line numbers directly,
        rather than have to figure them out relative to the caret: in the 2nd
        example, note how the diagnostic is reported at line 26, but the first
        line printed is actually line 25)
      
      I'm not sure that this is the precise format we want to go with [1], but
      I think it's an improvement over the status quo, and we're in stage 1
      of gcc 9, so there's plenty of time to shake out issues.
      
      I've turned it on by default; it can be disabled via
      -fno-diagnostics-show-line-numbers (it's also turned off in the testsuite, to
      avoid breaking numerous existing test cases).
      
      [1] Some possible variants:
        - maybe just "LL|" rather than "LL | "
        - maybe ':' rather than '|'
        - maybe we should have some leading indentation, to better split up
          the diagnostics visually via the left-hand column
        - etc
      
      gcc/ChangeLog:
      	PR other/84889
      	* common.opt (fdiagnostics-show-line-numbers): New option.
      	* diagnostic-show-locus.c (class layout): Add fields
      	"m_show_line_numbers_p" and "m_linenum_width";
      	(num_digits): New function.
      	(test_num_digits): New function.
      	(layout::layout): Initialize new fields.  Update m_x_offset
      	logic to handle any left margin.
      	(layout::print_source_line): Print line number when requested.
      	(layout::start_annotation_line): New member function.
      	(layout::print_annotation_line): Call it.
      	(layout::print_leading_fixits): Likewise.
      	(layout::print_trailing_fixits): Likewise.  Update calls to
      	move_to_column for new parameter.
      	(layout::get_x_bound_for_row): Add "add_left_margin" param and use
      	it to potentially call start_annotation_line.
      	(layout::show_ruler): Call start_annotation_line.
      	(selftest::test_line_numbers_multiline_range): New selftest.
      	(selftest::diagnostic_show_locus_c_tests): Call test_num_digits
      	and selftest::test_line_numbers_multiline_range.
      	* diagnostic.c (diagnostic_initialize): Initialize
      	show_line_numbers_p.
      	* diagnostic.h (struct diagnostic_context): Add field
      	"show_line_numbers_p".
      	* doc/invoke.texi (Diagnostic Message Formatting Options): Add
      	-fno-diagnostics-show-line-numbers.
      	* dwarf2out.c (gen_producer_string): Add
      	OPT_fdiagnostics_show_line_numbers to the ignored options.
      	* lto-wrapper.c (merge_and_complain): Likewise to the "pick
      	one setting" options.
      	(append_compiler_options): Likewise to the dropped options.
      	(append_diag_options): Likewise to the passed-on options.
      	* opts.c (common_handle_option): Handle the new option.
      	* toplev.c (general_init): Set up global_dc->show_line_numbers_p.
      
      gcc/testsuite/ChangeLog:
      	PR other/84889
      	* gcc.dg/plugin/diagnostic-test-show-locus-bw-line-numbers.c: New
      	test.
      	* gcc.dg/plugin/diagnostic-test-show-locus-color-line-numbers.c:
      	New test.
      	* gcc.dg/plugin/plugin.exp (plugin_test_list): Add the new tests.
      	* lib/prune.exp: Add -fno-diagnostics-show-line-numbers to
      	TEST_ALWAYS_FLAGS.
      
      From-SVN: r263450
      David Malcolm committed
    • extend.texi (PowerPC AltiVec Built-in Functions Available on ISA 2.07): Correct… · f4b905f0
      extend.texi (PowerPC AltiVec Built-in Functions Available on ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.
      
      gcc/ChangeLog:
      
      2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
      
      	* doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
      	ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
      	third argument of type "const signed char" to descriptions of
      	__builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
      	__builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
      	__builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
      	__builtin_bcdsub_ov functions.
      
      From-SVN: r263449
      Kelvin Nilsen committed
    • Restore flow_bb_inside_loop_p tests (PR 86858) · 3dec9a89
      The series to remove vinfo_for_stmt also removed tests of
      flow_bb_inside_loop_p if the call was simply testing whether the
      statement was in the vectorisation region.  I'd tried to keep calls
      that were testing whether the statement was in a particular loop
      (inner or outer), but messed up in vect_is_simple_reduction and
      removed calls that were actually needed.  This patch restores them.
      
      I double-checked the other removed calls and I think these are
      the only ones affected.
      
      2018-08-08  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	PR tree-optimization/86858
      	* tree-vect-loop.c (vect_is_simple_reduction): Restore
      	flow_bb_inside_loop_p calls.
      
      gcc/testsuite/
      	PR tree-optimization/86858
      	* gcc.dg/vect/pr86858.c: New test.
      
      From-SVN: r263448
      Richard Sandiford committed
    • Fix invalid assumption in vect_transform_stmt (PR 86871) · 4beb6642
      The handling of outer-loop uses of inner-loop definitions assumed
      that anything that wasn't a PHI would be a gassign.  It's also
      possible for it to be a gcall.
      
      2018-08-08  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	PR tree-optimization/86871
      	* tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
      	instead of gimple_assign_lhs.
      
      gcc/testsuite/
      	PR tree-optimization/86871
      	* gcc.dg/vect/pr86871.c: New test.
      
      From-SVN: r263447
      Richard Sandiford committed
    • aarch64 - PR target/86887 Fix missing register constraints in carryin patterns · 16621f0d
      Some of the carryin insn patterns are missing a register constraint.
      That means that the register allocator can pick practically anything
      to hold that value, including memory locations, or registers of the
      wrong class.
      
      	PR target/86887
      	* config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
      	register constraint to operand 0.
      	(add<mode>3_carryinC): Likewise.
      	(add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
      
      From-SVN: r263446
      Richard Earnshaw committed
    • p784.C: Add -fpermissive. · 40c27f7d
      2018-08-09  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	* g++.old-deja/g++.mike/p784.C: Add -fpermissive.
      
      From-SVN: r263445
      Paolo Carlini committed
    • Remove extra line in common.opt (PR c/86895). · 35cf9fd0
      2018-08-09  Martin Liska  <mliska@suse.cz>
      
              PR c/86895
      	* common.opt: Remove extra line.
      
      From-SVN: r263444
      Martin Liska committed
    • S/390: Fix target attribute tests · be03e785
      These broke after removing G5 and G6 CPUs from the processor
      enumeration.
      
      gcc/testsuite/ChangeLog:
      
      2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
      
      	* gcc.target/s390/target-attribute/tattr-arch-tune-1.c: Decrement
      	arch and tune numbers by 2.
      	* gcc.target/s390/target-attribute/tattr-arch-tune-2.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-1.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-10.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-11.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-12.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-13.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-14.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-15.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-16.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-17.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-18.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-19.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-2.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-20.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-21.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-22.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-23.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-24.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-25.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-26.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-27.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-28.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-29.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-3.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-30.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-31.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-32.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-4.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-5.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-6.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-7.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-8.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m31-9.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-1.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-10.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-11.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-12.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-13.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-14.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-15.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-16.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-17.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-18.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-19.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-2.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-20.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-21.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-22.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-23.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-24.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-25.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-26.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-27.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-28.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-29.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-3.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-30.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-31.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-32.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-33.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-4.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-5.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-6.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-7.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-8.c: Likewise.
      	* gcc.target/s390/target-attribute/tattr-m64-9.c: Likewise.
      
      From-SVN: r263443
      Andreas Krebbel committed
    • Fix typos in params.def. · 874ffe9e
      2018-08-09  Martin Liska  <mliska@suse.cz>
      
      	* params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
              at the end of a line, make first letter capital and end up
              a sentence with a dot.
      	(PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
      	(PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
      	(PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
      	(PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
      	(PARAM_MAX_ISL_OPERATIONS): Likewise.
      	(PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
      	(PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
      	(PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
      	(PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
      	(PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
      	(PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
      	(PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
      	(PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
      	(PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
      	(PARAM_TREE_REASSOC_WIDTH): Likewise.
      	(PARAM_HSA_GEN_DEBUG_STORES): Likewise.
      	(PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
      	(PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
      
      From-SVN: r263442
      Martin Liska committed
    • S/390: Fix PR84332 ICE with stack clash protection · 0b06c9a6
      Our implementation of the stack probe requires the probe interval to
      be used as displacement in an address operand.  The maximum probe
      interval currently is 64k.  This would exceed short displacements.
      Trim that value down to 4k if that happens.  This might result in too
      many probes being generated only on the oldest supported machine level
      z900.
      
      gcc/ChangeLog:
      
      2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
      
      	PR target/84332
      	* config/s390/s390.c (s390_option_override_internal): Reduce the
      	stack-clash-protection-probe-interval param if it would be too big
      	for z900.
      
      gcc/testsuite/ChangeLog:
      
      2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
      
      	PR target/84332
      	* gcc.target/s390/pr84332.c: New testcase.
      
      From-SVN: r263441
      Andreas Krebbel committed
    • Daily bump. · a0de11f4
      From-SVN: r263439
      GCC Administrator committed
  2. 08 Aug, 2018 22 commits
    • 2018-08-08 François Dumont <fdumont@gcc.gnu.org> · 29a9c26c
      	* include/bits/stl_algo.h
      	(__rotate(_Ite, _Ite, _Ite, forward_iterator_tag))
      	(__rotate(_Ite, _Ite, _Ite, bidirectional_iterator_tag))
      	(__rotate(_Ite, _Ite, _Ite, random_access_iterator_tag)): Move code duplication...
      	(rotate(_Ite, _Ite, _Ite)): ...here.
      	(__stable_partition_adaptive(_FIt, _FIt, _Pred, _Dist, _Pointer, _Dist)):
      	Simplify rotate call.
      	(__rotate_adaptive(_BIt1, _BIt1, _BIt1, _Dist, _Dist, _Bit2, _Dist)):
      	Likewise.
      	(__merge_without_buffer(_BIt, _BIt, _BIt, _Dist, _Dist, _Comp)):
      	Likewise.
      
      From-SVN: r263433
      François Dumont committed
    • m68k: handle more cases of TLS symbols with offset · ede9446c
      PR target/46179
      * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
      * config/m68k/m68k.c (handle_move_double): Don't call
      m68k_final_prescan_insn.
      (m68k_adjust_decorated_operand): Renamed from
      m68k_final_prescan_insn, remove first and third operand and
      simplify.
      (print_operand): Call it.
      (print_operand_address): Call it.
      
      PR target/46179
      * gcc.target/m68k/tls-dimode.c: New file.
      
      From-SVN: r263432
      Andreas Schwab committed
    • [PATCH] line-map include-from representation · f10a9135
      https://gcc.gnu.org/ml/gcc-patches/2018-08/msg00554.html
      	Make linemap::included_from a location
      	libcpp/
      	* include/line-map.h (struct line_map_ordinary): Replace
      	included_from map index with included_at source_location.
      	(ORDINARY_MAP_INCLUDER_FILE_INDEX): Delete.
      	(LAST_SOURCE_LINE_LOCATION): Delete.
      	(LAST_SOURCE_LINE, LAST_SOURCE_COLUMN): Delete.
      	(linemap_included_from): New.
      	(linemap_included_from_linemap): Declare.
      	(MAIN_FILE_P): Adjust.
      	* line-map.c (linemap_included_from_linemap): New.
      	(lonemap_check_files_exited): Use linemap_included_at.
      	(linemap_add): Adjust inclusion setting.
      	(linemap_dump, linemap_dump_location): Adjust.
      	* directives.c (do_linemarker): Use linemap_included_at.
      	gcc/
      	* diagnostic.c (diagnostic_report_current_module): Use
      	linemap_included_from & linemap_included_from_linemap.
      	gcc/c-family/
      	* c-common.c (try_to_locate_new_include_inertion_point): Use
      	linemap_included_from_linemap.
      	* c-lex.c (fe_file_change): Use linemap_included_from.
      	* c-ppoutput.c (pp_file_change): Likewise.
      	gcc/fortran/
      	* cpp.c (cb_file_change): Use linemap_included_from.
      	gcc/testsuite/
      	* c-c++-common/inc-from-1a.h, c-c++-common/inc-from-1b.h,
      	c-c++-common/inc-from-1.c: New
      
      From-SVN: r263429
      Nathan Sidwell committed
    • Prevent internal aligned_alloc clashing with libc version · a8019919
      If configure fails to detect aligned_alloc we will try to define our
      own in new_opa.cc but that could clash with the libcversion in
      <stdlib.h>. Use a namespace to keep them distinct.
      
      	* libsupc++/new_opa.cc (aligned_alloc): Declare inside namespace to
      	avoid clashing with an ::aligned_alloc function that was not detected
      	by configure.
      
      From-SVN: r263409
      Jonathan Wakely committed
    • [libgomp, nvptx] Fall back to cuLinkAddData/cuLinkCreate if _v2 not found · 8e09a12f
      Cuda driver api functions cuLinkAddData and cuLinkCreate are available starting
      version 5.5.  In version 6.5, they are remapped onto _v2 versions.
      
      The dlopen interface of the libgomp nvptx plugin uses the _v2 versions, so it
      won't work with a cuda driver with driver api version lower than 6.5.
      
      This patch fixes the problem by testing for the presence of the _v2 versions,
      and falling back to the original versions in case of absence of the _v2
      versions.
      
      Build on x86_64 with nvptx accelerator and reg-tested libgomp, both with and
      without --without-cuda-driver.
      
      2018-08-08  Tom de Vries  <tdevries@suse.de>
      
      	* plugin/cuda-lib.def (cuLinkAddData_v2, cuLinkCreate_v2): Declare using
      	CUDA_ONE_CALL_MAYBE_NULL.
      	* plugin/plugin-nvptx.c (cuLinkAddData, cuLinkCreate): Undef and declare.
      	(cuLinkAddData_v2, cuLinkCreate_v2): Declare.
      	(link_ptx): Fall back to cuLinkAddData/cuLinkCreate if the _v2 versions
      	are not found.
      
      From-SVN: r263408
      Tom de Vries committed
    • [libgomp, nvptx] Allow cuGetErrorString to be NULL · cedd9bd0
      Cuda driver api function cuGetErrorString is available in version 6.0 and
      higher.
      
      Currently, when the driver that is used does not contain this function, the
      libgomp nvptx plugin will not build (PLUGIN_NVPTX_DYNAMIC == 0) or run
      (PLUGIN_NVPTX_DYNAMIC == 1).
      
      This patch fixes this problem by testing for the presence of the function, and
      handling absence.
      
      Build on x86_64 with nvptx accelerator and reg-tested libgomp, both with and
      without --without-cuda-driver.
      
      2018-08-08  Tom de Vries  <tdevries@suse.de>
      
      	* plugin/cuda-lib.def (cuGetErrorString): Use CUDA_ONE_CALL_MAYBE_NULL.
      	* plugin/plugin-nvptx.c (cuda_error): Handle if cuGetErrorString is not
      	present.
      
      From-SVN: r263407
      Tom de Vries committed
    • [libgomp, nvptx] Remove hard-coded const in nvptx_open_device · b113af95
      CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR is defined in cuda driver
      api version 6.0 and higher.
      
      Currently nvptx_open_device uses a hard-coded constant instead.
      
      This patch fixes that by:
      - defining CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR to the hardcoded
        constant at toplevel, if not present in cuda.h, and
      - using CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR in nvptx_open_device
      
      Build on x86_64 with nvptx accelerator and reg-tested libgomp.
      
      2018-08-08  Tom de Vries  <tdevries@suse.de>
      
      	* plugin/plugin-nvptx.c
      	(CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR): Define.
      	(nvptx_open_device): Use
      	CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR.
      
      From-SVN: r263406
      Tom de Vries committed
    • [libgomp, nvptx] Note that cuGetErrorString is in CUDA_VERSION >= 6000 · 94767dac
      Cuda driver api function cuGetErrorString is available in version 6.0 and
      higher.
      
      This patch:
      - removes a comment saying the declaration is not available in cuda.h 6.0
      - fixes the presence test to use CUDA_VERSION < 6000
      - moves the declaration to toplevel
      
      Build on x86_64 with nvptx accelerator and reg-tested libgomp.
      
      2018-08-08  Tom de Vries  <tdevries@suse.de>
      
      	* plugin/plugin-nvptx.c (cuda_error): Move declaration of cuGetErrorString ...
      	(cuGetErrorString): ... here.  Guard with CUDA_VERSION < 6000.
      
      From-SVN: r263405
      Tom de Vries committed
    • [AArch64] Add HXT Phecda core support · dc878fea
      HXT semiconductor's CPU core Phecda, as a variant of Qualcomm qdf24xx,
      reuses the same tuning structure and pipeline with it.
      
      Applied on behalf of: Hongbo Zhang <hongbo.zhang@linaro.org>
      
      	* config/aarch64/aarch64-cores.def: Add phecda core.
      	* config/aarch64/aarch64-tune.md: Regenerate.
      	* doc/invoke.texi: Add phecda core.
      
      From-SVN: r263404
      Hongbo Zhang committed
    • Fix Docbook markup for table entry · 2e9dae04
      	* doc/xml/manual/using.xml: Fix markup for empty table entry.
      	* doc/html/*: Regenerate.
      
      From-SVN: r263401
      Jonathan Wakely committed
    • Add missing <experimental/numeric> header to docs · c0d57e63
      	* doc/xml/manual/using.xml: Add missing header to table and fix typo.
      	* doc/html/*: Regenerate.
      
      From-SVN: r263398
      Jonathan Wakely committed
    • PR libstdc++/86597 directory_entry observers should clear error_code · d3f3c680
      	PR libstdc++/86597
      	* include/bits/fs_dir.h (directory_entry::_M_file_type(error_code&)):
      	Clear error_code when cached type is used.
      	* testsuite/27_io/filesystem/directory_entry/86597.cc: New test.
      
      From-SVN: r263397
      Jonathan Wakely committed
    • S/390: Fix PR85295 · 9f3c21d6
      gcc/ChangeLog:
      
      2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
      
      	PR target/85295
      	* config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
      	definitions.
      	* config/s390/s390.md ("movti"): Add more alternatives for
      	constant to GPR copies.
      
      gcc/testsuite/ChangeLog:
      
      2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
      
      	PR target/85295
      	* gcc.target/s390/TI-constants-lra.c: New testcase.
      	* gcc.target/s390/TI-constants-nolra.c: New testcase.
      
      From-SVN: r263396
      Andreas Krebbel committed
    • S/390: Fix whitespace problems in the backend · 0ff3dcd6
      2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
      
      	* config/s390/s390.c: Fix whitespace damage throughout the file.
      	* config/s390/s390.h: Likewise.
      	* config/s390/tpf.h: Likewise.
      
      From-SVN: r263395
      Andreas Krebbel committed
    • S/390: Remove TARGET_CPU_ZARCH · 8cc6307c
      TARGET_CPU_ZARCH allowed to distinguish between g5/g6 and newer
      machines.  Since the former are now gone, we can assume that
      TARGET_CPU_ZARCH is always true.  As a side-effect, branch splitting
      is now completely gone.  Some parts of literal pool splitting are also
      gone, but it's still there: we need to support it because floating
      point and vector instructions still cannot use relative addressing.
      
      gcc/ChangeLog:
      
      2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
      
      	* config/s390/s390.c (s390_loadrelative_operand_p):
              Remove TARGET_CPU_ZARCH usages.
      	(s390_rtx_costs): Likewise.
      	(s390_legitimate_constant_p): Likewise.
      	(s390_cannot_force_const_mem): Likewise.
      	(legitimate_reload_constant_p): Likewise.
      	(s390_preferred_reload_class): Likewise.
      	(legitimize_pic_address): Likewise.
      	(legitimize_tls_address): Likewise.
      	(s390_split_branches): Removed.
      	(s390_add_execute): Removed.
      	(s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
      	(s390_mainpool_start): Likewise.
      	(s390_mainpool_finish): Likewise.
      	(s390_mainpool_cancel): Removed.
      	(s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
      	(s390_chunkify_cancel): Likewise.
      	(s390_return_addr_rtx): Likewise.
      	(s390_register_info): Remove split_branches_pending_p uages.
      	(s390_optimize_register_info): Likewise.
      	(s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
              split_branches_pending_p usages.
      	(s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
      	(s390_load_got): Likewise.
      	(s390_expand_split_stack_prologue): Likewise.
      	(output_asm_nops): Likewise.
      	(s390_function_profiler): Likewise.
      	(s390_emit_call): Likewise.
      	(s390_conditional_register_usage): Likewise.
      	(s390_optimize_prologue): Likewise.
      	(s390_reorg): Remove TARGET_CPU_ZARCH and
              split_branches_pending_p usages.
      	(s390_option_override_internal): Remove TARGET_CPU_ZARCH
              usages.
      	(s390_output_indirect_thunk_function): Likewise.
      	* config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
      	(TARGET_CPU_ZARCH_P): Removed.
      	(struct machine_function): Remove split_branches_pending_p.
      	* config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
      
      From-SVN: r263394
      Ilya Leoshkevich committed
    • S/390: Remove support for g5 and g6 machines · 52d4aa4f
      g5 and g6 were deprecated since gcc 6.1.0 (commit 3bd8520f).
      
      gcc/ChangeLog:
      
      2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
      
      	* common/config/s390/s390-common.c (processor_flags_table):
              Remove flags.
      	* config.gcc: Remove with_arch/with_tune support.
      	* config/s390/2064.md: Remove cpu attribute comparisons.
      	* config/s390/driver-native.c (s390_host_detect_local_cpu):
              Remove MTN.
      	* config/s390/linux.h (ASM_SPEC):
              Remove -march support.
      	* config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
              Use a table to get an arch level.
      	* config/s390/s390-opts.h (enum processor_type):
              Remove enum values.
      	* config/s390/s390.c
              (processor_table): Remove entries, add arch_level values.
              (s390_issue_rate): Remove cases.
              (s390_option_override): Adjust
              s390_option_override_internal() call.
      	(s390_option_override_internal): Remove deprecation warning.
              (s390_valid_target_attribute_tree): Adjust
              s390_option_override_internal() call.
      	* config/s390/s390.h (struct s390_processor):
              Share with s390-c.c, add arch_level field.
      	* config/s390/s390.md:
              Remove occurrences in cpu attribute.
      	* config/s390/s390.opt: Remove -march/-mtune support.
      	* config/s390/tpf.h (ASM_SPEC): Remove -march support.
      	* doc/invoke.texi: Remove deprecation warning.
      
      gcc/testsuite/ChangeLog:
      
      2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
      
      	* gcc.target/s390/hotpatch-8.c: Remove.
      	* gcc.target/s390/hotpatch-9.c: Remove.
      	* gcc.target/s390/mnop-mcount-m31-fpic.c: Remove.
      	* gcc.target/s390/mnop-mcount-m31.c: Remove.
      
      From-SVN: r263393
      Ilya Leoshkevich committed
    • P0595R1 - is_constant_evaluated · e4082611
      	P0595R1 - is_constant_evaluated
      cp/
      	* cp-tree.h (enum cp_built_in_function): New.
      	(maybe_constant_init): Add pretend_const_required argument.
      	* typeck2.c (store_init_value): Pass true as new argument to
      	maybe_constant_init.
      	* constexpr.c (constexpr_fn_retval): Check also DECL_BUILT_IN_CLASS
      	for BUILT_IN_UNREACHABLE.
      	(struct constexpr_ctx): Add pretend_const_required field.
      	(cxx_eval_builtin_function_call): Use DECL_IS_BUILTIN_CONSTANT_P
      	macro.  Handle CP_BUILT_IN_IS_CONSTANT_EVALUATED.  Check also
      	DECL_BUILT_IN_CLASS for BUILT_IN_UNREACHABLE.
      	(cxx_eval_outermost_constant_expr): Add pretend_const_required
      	argument, initialize pretend_const_required field in ctx.  If the
      	result is TREE_CONSTANT and non_constant_p, retry with
      	pretend_const_required false if it was true.
      	(is_sub_constant_expr): Initialize pretend_const_required_field in
      	ctx.
      	(cxx_constant_value): Pass true as pretend_const_required to
      	cxx_eval_outermost_constant_expr.
      	(maybe_constant_value): Pass false as pretend_const_required to
      	cxx_eval_outermost_constant_expr.
      	(fold_non_dependent_expr): Likewise.
      	(maybe_constant_init_1): Add pretend_const_required argument, pass it
      	down to cxx_eval_outermost_constant_expr.  Pass !allow_non_constant
      	instead of false as strict to cxx_eval_outermost_constant_expr.
      	(maybe_constant_init): Add pretend_const_required argument, pass it
      	down to maybe_constant_init_1.
      	(cxx_constant_init): Pass true as pretend_const_required to
      	maybe_constant_init_1.
      	* cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPRs to
      	CP_BUILT_IN_IS_CONSTANT_EVALUATED.
      	(cp_fold): Don't fold CP_BUILT_IN_IS_CONSTANT_EVALUATED calls.
      	* decl.c: Include langhooks.h.
      	(cxx_init_decl_processing): Register __builtin_is_constant_evaluated
      	built-in.
      	* tree.c (builtin_valid_in_constant_expr_p): Return true for
      	CP_BUILT_IN_IS_CONSTANT_EVALUATED.
      	* pt.c (declare_integer_pack): Initialize DECL_FUNCTION_CODE.
      testsuite/
      	* g++.dg/cpp2a/is-constant-evaluated1.C: New test.
      
      From-SVN: r263392
      Jakub Jelinek committed
    • re PR c++/86836 (internal compiler error on structured bindings with shadow… · 5e539332
      re PR c++/86836 (internal compiler error on structured bindings with shadow parameter on templated function)
      
      	PR c++/86836
      	* pt.c (tsubst_expr): For structured bindings, call tsubst_decomp_names
      	before tsubst_init, not after it.
      
      	* g++.dg/cpp1z/decomp46.C: New test.
      
      From-SVN: r263391
      Jakub Jelinek committed
    • re PR c++/86738 (gcc 8.2: Internal compiler error memcpy) · bf533db8
      	PR c++/86738
      	* constexpr.c (cxx_eval_binary_expression): For arithmetics involving
      	NULL pointer set *non_constant_p to true.
      	(cxx_eval_component_reference): For dereferencing of a NULL pointer,
      	set *non_constant_p to true and return t.
      
      	* g++.dg/opt/pr86738.C: New test.
      
      From-SVN: r263390
      Jakub Jelinek committed
    • [AArch64, Falkor] Switch to using Falkor-specific vector costs. · e75bc10e
      The adjusted vector costs give Falkor a reasonable boost in performance for FP
      benchmarks (both CPU2017 and CPU2006) and doesn't change INT benchmarks that
      much. There are some regressions that will be investigated as follow on work.
      
      Numbers from the CI run:
      
      CPU2017:
      
      (R) 605.mcf_s: -1.8%
      (R) 620.omnetpp_s: -2%
          623.xalancbmk_s: 2%
          654.roms_s: 7%
      
      (R) INT mean: -0.09%
          FP mean: 0.70%
      
      CPU2006:
      
      (R) 429.mc: -5%
      (R) 471.omnetpp: -9.5% (potentially noise/fluctuations)
          483.xalancbmk: 6.02%
          410.bwaves: 5.03%
          433.milc: 2%
          434.zeusmp: 10.5%
      (R) 436.cactusADM: -12.75%
          437.leslie3d: 5.94%
      (R) 453.povray: -0.82%
          459.GemsFDTD: 16.87%
          465.tonto: 1%
      
      (R) INT mean: -0.79%
          FP mean: 1.54%
      
      gcc/ChangeLog:
      
      2018-08-08  Luis Machado  <luis.machado@linaro.org>
      
      	* config/aarch64/aarch64.c (qdf24xx_vector_cost): New static global.
      	(qdf24xx_tunings): Set vector cost structure to qdf24xx_vector_cost.
      
      From-SVN: r263389
      Luis Machado committed
    • [aarch64] Adjust Falkor's sign extend reg+reg address cost · 31508b39
      Adjust Falkor's register_sextend cost from 4 to 3.  This fixes a testsuite
      failure in gcc.target/aarch64/extend.c:ldr_sxtw where GCC was generating
      a sbfiz instruction rather than a load with sign extension.
      
      No performance changes.
      
      gcc/ChangeLog:
      
      2018-08-08  Luis Machado  <luis.machado@linaro.org>
      
      	* config/aarch64/aarch64.c (qdf24xx_addrcost_table)
      	<register_sextend>: Set to 3.
      
      From-SVN: r263388
      Luis Machado committed
    • Daily bump. · 8a1d7237
      From-SVN: r263387
      GCC Administrator committed
  3. 07 Aug, 2018 1 commit