1. 18 Jul, 2019 11 commits
    • demangle.h (rust_is_mangled): Move to libiberty/rust-demangle.h. · 979526c9
      include/
      	* demangle.h (rust_is_mangled): Move to libiberty/rust-demangle.h.
      	(rust_demangle_sym): Move to libiberty/rust-demangle.h.
      libiberty/
      	* cplus-dem.c: Include rust-demangle.h.
      	* rust-demangle.c: Include rust-demangle.h.
      	* rust-demangle.h: New file.
      
      From-SVN: r273573
      Eduard-Mihai Burtescu committed
    • [arm] Fix incorrect modes with 'borrow' operations · 24990170
      Looking through the arm backend I noticed that the modes used to pass
      comparison types into subtract-with-carry operations were being
      incorrectly set.  The result is that the compiler is not truly
      self-consistent.  To clean this up I've introduced a new predicate,
      arm_borrow_operation (borrowed from the AArch64 backend) which can
      match the comparison type with the required mode and then fixed all
      the patterns to use this.  The split patterns that were generating
      incorrect modes have all obviously been fixed as well.
      
      The basic rule for the use of a borrow is:
      - if the condition code was set by a 'subtract-like' operation (subs, cmp),
        then use CCmode and LTU.
      - if the condition code was by unsigned overflow of addition (adds), then
        use CC_Cmode and GEU.
      
      	* config/arm/predicates.md (arm_borrow_operation): New predicate.
      	* config/arm/arm.c (subdi3_compare1): Use CCmode for the split.
      	(arm_subdi3, subdi_di_zesidi, subdi_di_sesidi): Likewise.
      	(subdi_zesidi_zesidi): Likewise.
      	(negdi2_compare, negdi2_insn): Likewise.
      	(negdi_extensidi): Likewise.
      	(negdi_zero_extendsidi): Likewise.
      	(arm_cmpdi_insn): Likewise.
      	(subsi3_carryin): Use arm_borrow_operation.
      	(subsi3_carryin_const): Likewise.
      	(subsi3_carryin_const0): Likewise.
      	(subsi3_carryin_compare): Likewise.
      	(subsi3_carryin_compare_const): Likewise.
      	(subsi3_carryin_compare_const0): Likewise.
      	(subsi3_carryin_shift): Likewise.
      	(rsbsi3_carryin_shift): Likewise.
      	(negsi2_carryin_compare): Likewise.
      
      From-SVN: r273572
      Richard Earnshaw committed
    • lto-common.c (gimple_register_canonical_type_1): Do not look for non-ODR… · b01659aa
      lto-common.c (gimple_register_canonical_type_1): Do not look for non-ODR conflicts of types in anonymous namespaces.
      
      	* lto-common.c (gimple_register_canonical_type_1): Do not look for
      	non-ODR conflicts of types in anonymous namespaces.
      	(unify_scc): Do not merge anonymous namespace types.
      	* g++.dg/lto/alias-5_0.C: New testcase.
      	* g++.dg/lto/alias-5_1.C: New.
      	* g++.dg/lto/alias-5_2.c: New.
      
      From-SVN: r273571
      Jan Hubicka committed
    • re PR tree-optimization/91137 (Wrong code with -O3) · 3796e3b3
              PR tree-optimization/91137
              * tree-ssa-loop-ivopts.c (struct ivopts_data): New field.
              (tree_ssa_iv_optimize_init, alloc_iv, tree_ssa_iv_optimize_finalize):
              Init, use and fini the above new field.
              (determine_base_object_1): New function.
              (determine_base_object): Reimplement using walk_tree.
      
      gcc/testsuite
              PR tree-optimization/91137
              * gcc.c-torture/execute/pr91137.c: New test.
      
      From-SVN: r273570
      Bin Cheng committed
    • Make ifcvt clean up dead comparisons · f1f10541
      This change is needed to avoid a regression in gcc.dg/ifcvt-3.c
      for a later patch.  Without it, we enter CSE with a dead comparison left
      by if-conversion and then eliminate the second (live) comparison in
      favour of the dead one.  That's functionally correct in itself, but it
      meant that we'd combine the subtraction and comparison into a SUBS
      before we have a chance to fold away the subtraction.
      
      2019-07-18  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* basic-block.h (CLEANUP_FORCE_FAST_DCE): New macro.
      	* cfgcleanup.c (cleanup_cfg): Call run_fast_dce if
      	CLEANUP_FORCE_FAST_DCE is set.
      	* ifcvt.c (rest_of_handle_if_conversion): Pass
      	CLEANUP_FORCE_FAST_DCE to the final cleanup_cfg call if
      	if-conversion succeeded.
      
      From-SVN: r273569
      Richard Sandiford committed
    • Fix -Wreturn-type for static naked functions in C · d119bf79
      This patch extends the fix for PR53633 to include static functions,
      which were giving a bogus -Wreturn-type warning for C but not for C++.
      
      2019-07-18  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/c/
      	PR c/53633
      	* c-decl.c (finish_function): Check targetm.warn_func_return
      	before issuing a -Wreturn-type warning.
      
      gcc/testsuite/
      	* c-c++-common/pr53633-2.c: New test.
      
      From-SVN: r273568
      Richard Sandiford committed
    • tree-ssa-sccvn.c (vn_walk_cb_data::push_partial_def): Refactor branches to make code less indented. · d1f2e4c1
      2019-07-18  Richard Biener  <rguenther@suse.de>
      
      	* tree-ssa-sccvn.c (vn_walk_cb_data::push_partial_def): Refactor
      	branches to make code less indented.
      
      From-SVN: r273567
      Richard Biener committed
    • compiler: fix bug in handling of unordered set during exporting · b94b6cc0
          
          In CL 183850 a change was made to combine tracking/discovery of
          exported types and imported packages during export data generation. As
          a result of this refactoring a bug was introduced: the new code can
          potentially insert items into the exports set (an unordered_set) while
          iterating through the same set, which is illegal according to the spec
          for std::unordered_set.
          
          This patch fixes the problem by changing the type discovery phase to
          iterate through a separate list of sorted exports, as opposed to
          iterating through the main unordered set.  Also included is a change
          to fix the code that looks for variables that are referenced from
          inlined routine bodies (this code wasn't scanning all of the function
          that it needed to scan).
          
          New test case for this problem in CL 186697.
          
          Updates golang/go#33020.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/185977
      
      From-SVN: r273564
      Ian Lance Taylor committed
    • -Wmissing-attributes: check that we avoid duplicates and false positives · dea78431
      The initial patch for PR 81824 fixed various possibilities of
      -Wmissing-attributes reporting duplicates and false positives.  The
      test that avoided them was a little obscure, though, so this patch
      rewrites it into a more self-evident form.
      
      The patch also adds a testcase that already passed, but that
      explicitly covers some of the possibilities of reporting duplicates
      and false positives that preexisting tests did not cover.
      
      
      for  gcc/ChangeLog
      
      	PR middle-end/81824
      	* attribs.c (decls_mismatched_attributes): Simplify the logic
      	that avoids duplicates and false positives.
      
      for  gcc/testsuite/ChangeLog
      
      	PR middle-end/81824
      	* g++.dg/Wmissing-attributes-1.C: New.  Some of its fragments
      	are from Martin Sebor.
      
      From-SVN: r273563
      Alexandre Oliva committed
    • Daily bump. · 8ea3c020
      From-SVN: r273562
      GCC Administrator committed
    • pa.c (pa_som_asm_init_sections): Don't force all constant data into data section… · 9cc7debe
      pa.c (pa_som_asm_init_sections): Don't force all constant data into data section when generating PIC code.
      
      	* config/pa/pa.c (pa_som_asm_init_sections): Don't force all constant
      	data into data section when generating PIC code.
      	(pa_select_section): Use pa_reloc_rw_mask() to qualify relocs.
      	(pa_reloc_rw_mask): Return 3 when generating PIC code and when
      	generating code for SOM targets earlier than HP-UX 11.  Otherwise,
      	return 2 for SOM and 0 for other targets.
      
      From-SVN: r273557
      John David Anglin committed
  2. 17 Jul, 2019 14 commits
  3. 16 Jul, 2019 15 commits
    • re PR fortran/90903 (Implement runtime checks for bit manipulation intrinsics) · df1afcca
      2019-07-16  Harald Anlauf  <anlauf@gmx.de>
      
      	PR fortran/90903
      	* libgfortran.h: Add mask for -fcheck=bits option.
      	* options.c (gfc_handle_runtime_check_option): Add option "bits"
      	to run-time checks selectable via -fcheck.
      	* trans-intrinsic.c (gfc_conv_intrinsic_btest)
      	(gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits)
      	(gfc_conv_intrinsic_shift, gfc_conv_intrinsic_ishft)
      	(gfc_conv_intrinsic_ishftc): Implement run-time checks for the
      	POS, LEN, SHIFT, and SIZE arguments.
      	* gfortran.texi: Document run-time checks for bit manipulation
      	intrinsics.
      	* invoke.texi: Document new -fcheck=bits option.
      
      	PR fortran/90903
      	* gfortran.dg/check_bits_1.f90: New testcase.
      
      From-SVN: r273535
      Harald Anlauf committed
    • i386.md (*testdi_1): Match CCZmode for constants that might have the SImode sign bit set. · 460bf043
      	* config/i386/i386.md (*testdi_1): Match CCZmode for
      	constants that might have the SImode sign bit set.
      	(*testqi_1_maybe_si): Remove "!" constraint modifier.
      	Use correct constraints for pentium pairing.
      	(*test<mode>_1): Ditto.
      
      From-SVN: r273534
      Uros Bizjak committed
    • re PR rtl-optimization/91173 (ICE: in int_mode_for_mode, at stor-layout.c:403) · f615b74e
      	PR rtl-optimization/91173
      	* g++.dg/pr91173.C: New test.
      
      From-SVN: r273531
      Jeff Law committed
    • re PR rtl-optimization/91173 (ICE: in int_mode_for_mode, at stor-layout.c:403) · f0593c53
      	PR rtl-optimization/91173
      	* tree-ssa-address.c (addr_for_mem_ref): If the base is an
      	SSA_NAME with a constant value, fold its value into the offset
      	and clear the base before calling gen_addr_rtx.
      
      From-SVN: r273529
      Jeff Law committed
    • Add missing testcase for PR89190 · de2ad117
          testsuite/
      	PR target/89190
      	* gcc.target/arm/pr89190.c: New test.
      
      From-SVN: r273524
      Wilco Dijkstra committed
    • re PR rtl-optimization/91164 (ICE in verify_dominators, at dominance.c:1184… · 7f5ddfcb
      re PR rtl-optimization/91164 (ICE in verify_dominators, at dominance.c:1184 (error: dominator of 114 should be 112, not 16))
      
      	PR rtl-optimization/91164
      	* dse.c (rest_of_handle_dse): If dead edges have been purged,
      	invalidate dominance info.
      
      	* g++.dg/opt/pr91164.C: New test.
      
      From-SVN: r273522
      Jakub Jelinek committed
    • alias-1_0.C: Use -O3. · f6bbf1ca
      
      	* g++.dg/lto/alias-1_0.C: Use -O3.
      	* g++.dg/lto/alias-2_0.C: Use -O3.
      	* g++.dg/lto/alias-3_0.C: Add loop to enable inlining with
      	-fno-use-linker-plugin.
      	* g++.dg/lto/alias-3_1.C: Remove dg-lto-do and dg-lto-options.
      
      From-SVN: r273520
      Jan Hubicka committed
    • Don't xfail gcc.dg/tree-ssa/pr84512.c on 64-bit SPARC · ee8c4549
      	* gcc.dg/tree-ssa/pr84512.c: Don't xfail scan-tree-dump on
      	sparcv9.
      
      From-SVN: r273519
      Rainer Orth committed
    • Require int128 support in gcc.dg/autopar/pr91162.c · 656867bc
      	* gcc.dg/autopar/pr91162.c: Require int128 support.
      
      From-SVN: r273518
      Rainer Orth committed
    • Simplify range location creation in C++ parser. · 6eaf3f9e
      Many places in the parser follow the same pattern of capturing the location
      of the last lexed token, either before or after lexing it, and then using
      that as the end of a location range; this can be simplified by passing the
      lexer to make_location and grabbing the token location there.
      
      	* parser.c (make_location): Add overload taking cp_lexer* as last
      	parameter.
      
      From-SVN: r273516
      Jason Merrill committed
    • Add parens around constraint in <memory>. · e6c847fb
      C++20 concepts require parens around atomic constraints that are not
      primary-expressions.
      
      	* include/std/memory (uses_allocator_construction_args): Add parens
      	around constraint.
      
      From-SVN: r273515
      Jason Merrill committed
    • Simplify type-specifier parsing. · fd860f7d
      Previously, the tentative parses for optional type-specifier and to support
      class template argument deduction were combined awkwardly.  This
      reorganization was motivated by the new concepts branch.
      
      	* parser.c (cp_parser_simple_type_specifier): Separate tentative
      	parses for optional type-spec and CTAD.
      
      From-SVN: r273514
      Jason Merrill committed
    • Fix g++.dg/template/pr84789.C on new concepts branch. · 19bd9028
      On the concepts branch I ran into trouble where a pre-parsed dependent
      nested-name-specifier got replaced on a subsequent parse with is_declaration
      by one with typenames resolved, which was then used wrongly on a further
      parse with !is_declaration.
      
          * parser.c (cp_parser_nested_name_specifier_opt): If the token is
          already CPP_NESTED_NAME_SPECIFIER, leave it alone.
      
      From-SVN: r273513
      Jason Merrill committed
    • Report ambiguous uses of .md attributes · 10b04d1e
      This patch reports an error if the .md file has an unscoped
      attribute that maps to more than one possible value.
      
      2019-07-16  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* read-md.h (md_reader::record_potential_iterator_use): Add a
      	file_location parameter.
      	* read-rtl.c (attribute_use::loc): New field.
      	(map_attr_string): Take a file_location parameter.  Report cases
      	in which attributes map to multiple distinct values.
      	(apply_attribute_uses): Update call accordingly.
      	(md_reader::handle_overloaded_name): Likewise.
      	(md_reader::apply_iterator_to_string): Likewise.  Skip empty
      	nonnull strings.
      	(record_attribute_use): Take a file_location parameter.
      	Initialize attribute_use::loc.
      	(md_reader::record_potential_iterator_use): Take a file_location
      	parameter.  Update call to record_attribute_use.
      	(rtx_reader::rtx_alloc_for_name): Update call accordingly.
      	(rtx_reader::read_rtx_code): Likewise.
      	(rtx_reader::read_rtx_operand): Likewise.  Record a location
      	for implicitly-expanded empty strings.
      
      From-SVN: r273511
      Richard Sandiford committed
    • Use file_location for md_reader's ptr_loc · 737eb767
      Also make it public, so that clients can use the location for error
      reporting.
      
      2019-07-16  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* read-md.h (md_reader::ptr_loc): Moved from read-md.c.
      	Use file_location instead of separate fields.
      	(md_reader::set_md_ptr_loc): Take a file_location instead of a
      	separate filename and line number.
      	* read-md.c (ptr_loc): As above.
      	(md_reader::copy_md_ptr_loc): Update for new ptr_loc layout.
      	(md_reader::fprint_md_ptr_loc): Likewise.
      	(md_reader::set_md_ptr_loc): Likewise.  Take a file_location
      	instead of a separate filename and line number.
      	(md_reader::read_string): Update call accordingly.
      
      From-SVN: r273510
      Richard Sandiford committed