1. 04 Aug, 2018 4 commits
  2. 03 Aug, 2018 17 commits
    • nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define. · e23f3619
      2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
      
      	gcc/
      	* config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
      	Define.
      
      From-SVN: r263301
      Sandra Loosemore committed
    • Remove nfs bogon · 5ae10dba
      From-SVN: r263300
      Jeff Law committed
    • sjlj.S: Adjust to use PIC vs normal code to avoid absolute relocation in a shared library. · f6a9dfd3
      	* config/sh/sjlj.S: Adjust to use PIC vs normal code to avoid
      	absolute relocation in a shared library.
      
      From-SVN: r263299
      Sergei Trofimovich committed
    • Add fix-it hint for missing return statement in assignment operators (PR c++/85523) · bc31a87a
      gcc/cp/ChangeLog:
      
      	PR c++/85523
      	* decl.c: Include "gcc-rich-location.h".
      	(add_return_star_this_fixit): New function.
      	(finish_function): When warning about missing return statements in
      	functions returning non-void, add a "return *this;" fix-it hint for
      	assignment operators.
      
      gcc/testsuite/ChangeLog:
      
      	PR c++/85523
      	* g++.dg/pr85523.C: New test.
      
      
      Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>
      
      From-SVN: r263298
      David Malcolm committed
    • re PR target/86795 (mn10300 port needs updating for CVE-2017-5753) · 2e2bd24b
      	PR target/86795
      	* config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
      	Define to speculation_safe_value_not_needed.
      
      From-SVN: r263296
      Jeff Law committed
    • docs: fix stray duplicated words · c64f2af3
      gcc/ChangeLog:
      	* doc/gcov.texi (-x): Remove duplicate "to".
      	* doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
      	(-Wif-not-aligned): Remove duplicate "is".
      	(-flto): Remove duplicate "the".
      	(MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
      	duplicate "v5.00.b".
      	(MSP430 Options): Remove duplicate "and" from the description
      	of "-mgprel-sec=regexp".
      	(x86 Options): Remove duplicate copies of "vmldLog102" and
      	vmlsLog104 from description of "-mveclibabi=type".
      
      From-SVN: r263295
      David Malcolm committed
    • Avoid infinite loop with duplicate anonymous union fields (PR c/86690). · e5e7e50d
      If a struct contains an anonymous union and both have a field with the
      same name, detect_field_duplicates_hash() will replace one of them
      with NULL.  If compilation doesn't stop immediately, it may later call
      lookup_field() on the union, which falsely assumes the union's
      LANG_SPECIFIC array is sorted, and may loop indefinitely because of
      this.
      
      2018-08-03  Bogdan Harjoc  <harjoc@gmail.com>
      
      	PR c/86690
      gcc/c:
      	* c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
      	errors.
      
      gcc/testsuite:
      	* gcc.dg/union-duplicate-field.c: New test.
      
      From-SVN: r263294
      Bogdan Harjoc committed
    • re PR c++/86706 (ICE in build_base_path, at cp/class.c:294) · d198fc5a
      	PR c++/86706
      	* class.c (build_base_path): Use currently_open_class.
      
      	* g++.dg/template/pr86706.C: New test.
      
      From-SVN: r263293
      Jason Merrill committed
    • ChangeLog: Move entry ... · 0b0c7dc6
      	* ChangeLog: Move entry ...
      	* cp/ChangeLog: ... here.
      
      From-SVN: r263292
      Uros Bizjak committed
    • [Ada] Partially revert "Makefile patches from initial RISC-V cross/native build." · 1ae45251
      This partially reverts r262482, at it broke canadian builds.
      
      2018-08-03  Pierre-Marie de Rodat  <derodat@adacore.com>
      
      gcc/ada/
      
      	Reverts
      	2018-07-06  Jim Wilson  <jimw@sifive.com>
      
      	* Make-generated.in (treeprs.ads): Use $(GNATMAKE) instead of gnatmake.
      	(einfo.h, sinfo.h, stamp-snames, stamp-nmake): Likewise.
      	* gcc-interface/Makefile.in (xoscons): Likewise.
      
      From-SVN: r263291
      Pierre-Marie de Rodat committed
    • Handle SLP of call pattern statements · 0246112a
      We couldn't vectorise:
      
        for (int j = 0; j < n; ++j)
          {
            for (int i = 0; i < 16; ++i)
      	a[i] = (b[i] + c[i]) >> 1;
            a += step;
            b += step;
            c += step;
          }
      
      at -O3 because cunrolli unrolled the inner loop and SLP couldn't handle
      AVG_FLOOR patterns (see also PR86504).  The problem was some overly
      strict checking of pattern statements compared to normal statements
      in vect_get_and_check_slp_defs:
      
                switch (gimple_code (def_stmt))
                  {
                  case GIMPLE_PHI:
                  case GIMPLE_ASSIGN:
      	      break;
      
      	    default:
      	      if (dump_enabled_p ())
      		dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
      				 "unsupported defining stmt:\n");
      	      return -1;
                  }
      
      The easy fix would have been to add GIMPLE_CALL to the switch,
      but I don't think the switch is doing anything useful.  We only create
      pattern statements that the rest of the vectoriser can handle, and the
      other checks in this function and elsewhere check whether SLP is possible.
      
      I'm also not sure why:
      
                if (!first && !oprnd_info->first_pattern
      	      /* Allow different pattern state for the defs of the
      		 first stmt in reduction chains.  */
      	      && (oprnd_info->first_dt != vect_reduction_def
      
      is necessary.  All that should matter is that the statements in the
      node are "similar enough".  It turned out to be quite hard to find a
      convincing example that used a mixture of pattern and non-pattern
      statements, so bb-slp-pow-1.c is the best I could come up with.
      But it does show that the combination of "xi * xi" statements and
      "pow (xj, 2) -> xj * xj" patterns are handled correctly.
      
      The patch therefore just removes the whole if block.
      
      The loop also needed commutative swapping to be extended to at least
      AVG_FLOOR.
      
      This gives +3.9% on 525.x264_r at -O3.
      
      2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* internal-fn.h (first_commutative_argument): Declare.
      	* internal-fn.c (first_commutative_argument): New function.
      	* tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
      	restrictions for pattern statements.  Use first_commutative_argument
      	to look for commutative operands in calls to internal functions.
      
      gcc/testsuite/
      	* gcc.dg/vect/bb-slp-over-widen-1.c: Expect AVG_FLOOR to be used
      	on vect_avg_qi targets.
      	* gcc.dg/vect/bb-slp-over-widen-2.c: Likewise.
      	* gcc.dg/vect/bb-slp-pow-1.c: New test.
      	* gcc.dg/vect/vect-avg-15.c: Likewise.
      
      From-SVN: r263290
      Richard Sandiford committed
    • Add workaround for non-unique errno values on AIX · d7487e2a
      	* src/c++11/system_error.cc
      	(system_error_category::default_error_condition): Add workaround for
      	ENOTEMPTY and EEXIST having the same value on AIX.
      	* testsuite/19_diagnostics/error_category/system_category.cc: Add
      	extra testcases for EDOM, EILSEQ, ERANGE, EEXIST and ENOTEMPTY.
      
      From-SVN: r263289
      Jonathan Wakely committed
    • Makefile.in (wide-int-range.o): New. · c9f8fca6
      	* Makefile.in (wide-int-range.o): New.
      	* tree-vrp.c: Move all the wide_int_* functions to...
      	* wide-int-range.cc: ...here.
      	* tree-vrp.h: Move all the wide_int_* prototypes to...
      	* wide-int-range.h: ...here.
      
      From-SVN: r263288
      Aldy Hernandez committed
    • [c++] Don't emit exception tables for UI_NONE · d989dba8
      If a target does not support exceptions, it can indicate this by returning
      UI_NONE in TARGET_EXCEPT_UNWIND_INFO.  Currently the compiler still emits
      exception tables for such a target.
      
      This patch makes sure that no exception tables are emitted if the target does
      not support exceptions.  This allows us to remove a workaround in
      TARGET_ASM_BYTE_OP in the nvptx port.
      
      Build on x86_64 with nvptx accelerator, and tested libgomp.
      
      Build and reg-tested on x86_64.
      
      2018-08-03  Tom de Vries  <tdevries@suse.de>
      
      	* common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
      	UI_NONE.
      	* config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
      	* except.c (output_function_exception_table): Do early exit if
      	targetm_common.except_unwind_info (&global_options) == UI_NONE.
      
      From-SVN: r263287
      Tom de Vries committed
    • Print heuristics probability fraction part with 2 digits. · a77e3a39
      2018-08-03  Martin Liska  <mliska@suse.cz>
      
      	* predict.c (dump_prediction): Change to 2 digits
              in fraction part.
      2018-08-03  Martin Liska  <mliska@suse.cz>
      
      	* gcc.dg/predict-1.c: Adjust scanned pattern to cover 2 digits.
      	* gcc.dg/predict-13.c:Likewise.
      	* gcc.dg/predict-3.c:Likewise.
      	* gcc.dg/predict-4.c:Likewise.
      	* gcc.dg/predict-5.c:Likewise.
      	* gcc.dg/predict-6.c:Likewise.
      	* gcc.dg/predict-9.c:Likewise.
      	* gfortran.dg/predict-1.f90:Likewise.
      
      From-SVN: r263286
      Martin Liska committed
    • [aarch64] Fix falkor pipeline description for dup<q> · 561d0119
      There was a typo in the pipeline description where DUP was assigned to
      the vector pipes for quad mode ops when it really only uses the VTOG
      pipes.  Fixing this does not show any noticeable difference in
      performance (there's a very small bump of 1.7% in x264 but that's
      about it) in my tests but is the more precise description of operations
      for falkor.
      
      	* config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
      	neon_dup_q to...
      	(falkor_am_1_gtov_gtov): ... a new insn reservation.
      
      From-SVN: r263285
      Siddhesh Poyarekar committed
    • Daily bump. · 90d981fb
      From-SVN: r263284
      GCC Administrator committed
  3. 02 Aug, 2018 19 commits
    • nds32.c (nds32_hard_regno_mode_ok): Replace > with >=. · 65e87462
      	* config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
      	* df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
      	* dwarf2out.c (mem_loc_descriptor): Replace > with >=.
      	* lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
      	* lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
      
      From-SVN: r263280
      Ilya Leoshkevich committed
    • Fix memory leak of pretty_printer prefixes · 653fee19
      We were rather sloppy about handling the ownership of prefixes for
      pretty_printer, and this lead to a memory leak for any time a
      diagnostic_show_locus call emits multiple line spans.
      
      This showed up in "make selftest-valgrind" as:
      
      3,976 bytes in 28 blocks are definitely lost in loss record 632 of 669
         at 0x4A0645D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
         by 0x1F08227: xmalloc (xmalloc.c:147)
         by 0x1F083E6: xvasprintf (xvasprintf.c:58)
         by 0x1E7EC7D: build_message_string(char const*, ...) (diagnostic.c:78)
         by 0x1E7F438: diagnostic_get_location_text(diagnostic_context*, expanded_location) (diagnostic.c:328)
         by 0x1E7FD54: default_diagnostic_start_span_fn(diagnostic_context*, expanded_location) (diagnostic.c:626)
         by 0x1EB3508: selftest::test_diagnostic_context::start_span_cb(diagnostic_context*, expanded_location) (selftest-diagnostic.c:57)
         by 0x1E89215: diagnostic_show_locus(diagnostic_context*, rich_location*, diagnostic_t) (diagnostic-show-locus.c:1992)
         by 0x1E8ECAD: selftest::test_fixit_insert_containing_newline_2(selftest::line_table_case const&) (diagnostic-show-locus.c:3044)
         by 0x1EB0606: selftest::for_each_line_table_case(void (*)(selftest::line_table_case const&)) (input.c:3525)
         by 0x1E8F3F5: selftest::diagnostic_show_locus_c_tests() (diagnostic-show-locus.c:3164)
         by 0x1E010BF: selftest::run_tests() (selftest-run-tests.c:88)
      
      4,004 bytes in 28 blocks are definitely lost in loss record 633 of 669
         at 0x4A0645D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
         by 0x1F08227: xmalloc (xmalloc.c:147)
         by 0x1F083E6: xvasprintf (xvasprintf.c:58)
         by 0x1E7EC7D: build_message_string(char const*, ...) (diagnostic.c:78)
         by 0x1E7F438: diagnostic_get_location_text(diagnostic_context*, expanded_location) (diagnostic.c:328)
         by 0x1E7FD54: default_diagnostic_start_span_fn(diagnostic_context*, expanded_location) (diagnostic.c:626)
         by 0x1EB3508: selftest::test_diagnostic_context::start_span_cb(diagnostic_context*, expanded_location) (selftest-diagnostic.c:57)
         by 0x1E89215: diagnostic_show_locus(diagnostic_context*, rich_location*, diagnostic_t) (diagnostic-show-locus.c:1992)
         by 0x1E8B373: selftest::test_diagnostic_show_locus_fixit_lines(selftest::line_table_case const&) (diagnostic-show-locus.c:2500)
         by 0x1EB0606: selftest::for_each_line_table_case(void (*)(selftest::line_table_case const&)) (input.c:3525)
         by 0x1E8F3B9: selftest::diagnostic_show_locus_c_tests() (diagnostic-show-locus.c:3159)
         by 0x1E010BF: selftest::run_tests() (selftest-run-tests.c:88)
      
      This patch fixes the leaks by ensuring that the pretty_printer "owns"
      the prefix if it's non-NULL, freeing it in the dtor and in pp_set_prefix.
      
      gcc/cp/ChangeLog:
      	* error.c (cxx_print_error_function): Duplicate "file" before
      	passing it to pp_set_prefix.
      	(cp_print_error_function): Use pp_take_prefix when saving the
      	existing prefix.
      
      gcc/ChangeLog:
      	* diagnostic-show-locus.c (diagnostic_show_locus): Use
      	pp_take_prefix when saving the existing prefix.
      	* diagnostic.c (diagnostic_append_note): Likewise.
      	* langhooks.c (lhd_print_error_function): Likewise.
      	* pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
      	param's type.  Free the existing prefix.
      	(pp_take_prefix): New function.
      	(pretty_printer::pretty_printer): Drop the prefix parameter.
      	Rename the length parameter to match the comment.
      	(pretty_printer::~pretty_printer): Free the prefix.
      	* pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
      	parameter.
      	(struct pretty_printer): Drop the "const" from "prefix" field's
      	type and clarify memory management.
      	(pp_set_prefix): Drop the "const" from the 2nd param.
      	(pp_take_prefix): New decl.
      
      From-SVN: r263275
      David Malcolm committed
    • rs6000-string.c (select_block_compare_mode): Move test for word_mode_ok here… · 74f9986e
      rs6000-string.c (select_block_compare_mode): Move test for word_mode_ok here instead of passing as argument.
      
      2018-07-31  Aaron Sawdey  <acsawdey@linux.ibm.com>
      
      	* config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
      	for word_mode_ok here instead of passing as argument.
      	(expand_block_compare): Change select_block_compare_mode() call.
      	(expand_strncmp_gpr_sequence): New function.
      	(expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
      
      From-SVN: r263273
      Aaron Sawdey committed
    • re PR target/86790 (m68k port needs updating for CVE-2017-5753) · a1293ed1
      	PR target/86790
      	* config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
      	Define to speculation_safe_value_not_needed.
      
      From-SVN: r263272
      Jeff Law committed
    • [OBVIOUS] Correct name of file in ChangeLog · f97b9ecc
      Committed on behalf of Matthew Malcomson.
      
      From-SVN: r263271
      Sudakshina Das committed
    • re PR target/86784 (H8 port needs updating for CVE-2017-5753) · efbf3c34
      	PR target/86784
      	* config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
      	Define to speculation_safe_value_not_needed.
      
      From-SVN: r263270
      Jeff Law committed
    • arm - correctly handle denormal results during softfp subtraction · 89fff9cc
      2018-08-02  Nicolas Pitre <nico@fluxnic.net>
      
      	PR libgcc/86512
      	* config/arm/ieee754-df.S (adddf3): Don't shortcut denormal handling
      	when exponent goes negative. Update my email address.
      	* config/arm/ieee754-sf.S (addsf3): Likewise.
      
      From-SVN: r263267
      Nicolas Pitre committed
    • re PR target/86813 (xstormy16 port needs updating for CVE-2017-5753) · 01557bd4
      	PR target/86813
      	* config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
      	Define to speculation_safe_value_not_needed.
      
      From-SVN: r263266
      Nick Clifton committed
    • [nvptx] Ignore c++ exceptions · 77e0a97a
      The nvptx port can't support exceptions using sjlj, because ptx does not
      support sjlj.  However, default_except_unwind_info still returns UI_SJLJ, even
      even if we configure with --disable-sjlj-exceptions, because UI_SJLJ is the
      fallback option.
      
      The reason default_except_unwind_info doesn't return UI_DWARF2 is because
      DWARF2_UNWIND_INFO is not defined in defaults.h, because
      INCOMING_RETURN_ADDR_RTX is not defined, because there's no ptx equivalent.
      
      Testcase libgomp.c++/for-15.C currently doesn't compile unless fno-exceptions
      is added because:
      - it tries to generate sjlj exception handling code, and
      - it tries to generate exception tables using label-addressed .byte sequence.
        Ptx doesn't support generating random data at a label, nor being able to
        load/write data relative to a label.
      
      This patch fixes the first problem by using UI_TARGET for nvptx.
      
      The second problem is worked around by generating all .byte sequences commented
      out.  It would be better to have a narrower workaround, and define
      TARGET_ASM_BYTE_OP to "error: .byte unsupported " or some such.
      
      This patch does not enable exceptions for nvptx, it merely allows c++ programs
      to run correctly if they do no use exception handling.
      
      Build and reg-tested on x86_64 with nvptx accelerator.
      
      2018-08-02  Tom de Vries  <tdevries@suse.de>
      
      	PR target/86660
      	* common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
      	function.  Return UI_TARGET unconditionally.
      	(TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
      	* config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
      
      	* testsuite/libgomp.oacc-c++/routine-1-auto.C: Remove -fno-exceptions.
      	* testsuite/libgomp.oacc-c++/routine-1-template-auto.C: Same.
      	* testsuite/libgomp.oacc-c++/routine-1-template-trailing-return-type.C:
      	Same.
      	* testsuite/libgomp.oacc-c++/routine-1-template.C: Same.
      	* testsuite/libgomp.oacc-c++/routine-1-trailing-return-type.C: Same.
      	* testsuite/libgomp.oacc-c-c++-common/routine-1.c: Same.
      
      From-SVN: r263265
      Tom de Vries committed
    • re PR target/86810 (v850 port needs updating for CVE-2017-5753) · 007b11a5
      	PR target/86810
      	* config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
      	Define to speculation_safe_value_not_needed.
      
      From-SVN: r263264
      Nick Clifton committed
    • re PR target/86803 (rx port needs updating for CVE-2017-5753) · e3b4c729
      	PR target/86803
      	* config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
      	Define to speculation_safe_value_not_needed.
      
      From-SVN: r263263
      Nick Clifton committed
    • Typo fix · ae5bdb7f
      Noticed by Tamar (thanks).
      
      2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* genemit.c (print_overload_test): Fix typo.
      
      From-SVN: r263262
      Richard Sandiford committed
    • re PR c++/86763 (Wrong code comparing member of copy of a 237 byte object with… · f70cb6f5
      re PR c++/86763 (Wrong code comparing member of copy of a 237 byte object with nontrivial default constructor on x86-64 arch)
      
      2018-08-02  Richard Biener  <rguenther@suse.de>
      
      	PR c++/86763
      	* class.c (layout_class_type): Copy TYPE_TYPELESS_STORAGE
      	to the CLASSTYPE_AS_BASE.
      
      	* g++.dg/torture/pr86763.C: New testcase.
      
      From-SVN: r263261
      Richard Biener committed
    • re PR target/86797 (msp430 port needs updating for CVE-2017-5753) · 7c9f1147
      	PR target/86797
      	* config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
      	Define to speculation_safe_value_not_needed.
      
      From-SVN: r263259
      Nick Clifton committed
    • re PR target/86791 (mcore port needs updating for CVE-2017-5753) · 1169a206
      	PR target/86791
      	* config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
      	Define to speculation_safe_value_not_needed.
      
      From-SVN: r263258
      Nick Clifton committed
    • re PR tree-optimization/86816 (ICE: SIGSEGV in tree-ssa-pre / tail_merge_optimize) · 86c8eea6
      2018-08-02  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/86816
      	* tree-ssa-tail-merge.c (tail_merge_valueize): New function
      	which checks for value availability before querying it.
      	(gvn_uses_equal): Use it.
      	(same_succ_hash): Likewise.
      	(gimple_equal_p): Likewise.
      
      	* g++.dg/torture/pr86816.C: New testcase.
      
      From-SVN: r263257
      Richard Biener committed
    • re PR target/86789 (m32r port needs updating for CVE-2017-5753) · 593d93cb
      	PR target/86789
      	* config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
      	Define to speculation_safe_value_not_needed.
      
      From-SVN: r263256
      Nick Clifton committed
    • re PR target/86787 (iq2000 port needs updating for CVE-2017-5753) · 9950fbd3
      	PR target/86787
      	* config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
      	Define to speculation_safe_value_not_needed.
      
      From-SVN: r263255
      Nick Clifton committed
    • re PR target/86782 (frv port needs updating for CVE-2017-5753) · fd157d13
      	PR target/86782
      	* config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
      	speculation_safe_value_not_needed.
      
      From-SVN: r263254
      Nick Clifton committed