1. 15 Oct, 2019 23 commits
    • [Darwin] Update darwin_binds_local_p. · 6eee5151
      The use of default_binds_local_p had got out of sync with the varasm
      changes, this restores the call to be direct.  In practice, we add some
      further tests to determine local binding - but this callback is used for
      the initial assessments made by default_encode_section_info().
      
      gcc/ChangeLog:
      
      2019-10-15  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* config/darwin.c (darwin_binds_local_p): Update to call
      	default_binds_local_p_3 () directly. amend comments.
      
      From-SVN: r277009
      Iain Sandoe committed
    • PR testsuite/92016 - Excess errors in Wstringop-overflow-17.c · 863950d2
      gcc/testsuite/ChangeLog:
      	* gcc.dg/Wstringop-overflow-17.c: Expect an additional warning.
      
      From-SVN: r277008
      Martin Sebor committed
    • lto-streamer-out.c (lto_variably_modified_type_p): New. · 7e601a1d
      2019-10-15  Richard Biener  <rguenther@suse.de>
      
      	* lto-streamer-out.c (lto_variably_modified_type_p): New.
      	(tree_is_indexable): Use it.
      	* tree-streamer-out.c (pack_ts_type_common_value_fields):
      	Stream variably_modified_type_p as TYPE_LANG_FLAG_0.
      	* tree-streamer-in.c (unpack_ts_type_common_value_fields): Likewise.
      
      From-SVN: r277005
      Richard Biener committed
    • [Fortran] OpenMP+OpenACC: Remove bogus contigous-pointer check · 2a0cb164
              gcc/fortran
              PR fortran/65438
              * openmp.c (check_array_not_assumed): Remove pointer check.
      
      
      Co-Authored-By: Tobias Burnus <tobias@codesourcery.com>
      
      From-SVN: r277000
      James Norris committed
    • re PR testsuite/92093 (New test case gcc.target/powerpc/pr91275.c from r276410 fails on BE) · 855b85b4
      2019-10-15  Bill Schmidt  <wschmidt@linux.ibm.com>
      
      	PR target/92093
      	* gcc.target/powerpc/pr91275.c: Fix type and endian issues.
      
      From-SVN: r276999
      Bill Schmidt committed
    • [C++ PATCH] clone_function_decl breakup · c1d78170
      https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01083.html
      This patch, from the modules branch, breaks out function cloning from the
      method vector updating. We have a new function, build_clones,
      which does the building, returning a count of the number of clones
      (2 or 3). clone_function_decl separately adds them to the method
      vector, if they should be added. I suppose this could have used
      FOR_EVERY_CLONE, but I went with the counting scheme.
      
      	* class.c (build_clones): Break out of clone_function_decl.  Just
      	build the clones.
      	(clone_function_decl): Call build_clones, then maybe add them to
      	the method vector.
      
      From-SVN: r276998
      Nathan Sidwell committed
    • msp430.md (zero_extendqipsi2): New. · a0a9a3fc
      2019-10-15  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
      
      	* config/msp430/msp430.md (zero_extendqipsi2): New.
      	(zero_extendqisi2): Optimize case where src register and base dst
      	register are the same.
      	(zero_extendhipsi2): Don't use 430X insn for rYs->r case.
      	(zero_extendpsisi2): Optimize r->m case.
      	Add unnamed insn patterns to catch insns combine searches for when
      	optimizing pointer manipulation.
      
      From-SVN: r276997
      Jozef Lawrynowicz committed
    • msp430.md: Group zero_extend* insns together. · 582b4055
      2019-10-15  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
      
      	* config/msp430/msp430.md: Group zero_extend* insns together.
      
      From-SVN: r276996
      Jozef Lawrynowicz committed
    • constraints.md: Allow post_inc operand for "Ya" constraint. · 28987d8b
      2019-10-15  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
      
      	* config/msp430/constraints.md: Allow post_inc operand for "Ya"
      	constraint.
      	* config/msp430/msp430.c (msp430_legitimate_address_p): Handle
      	POST_INC.
      	(msp430_subreg): Likewise.
      	(msp430_split_addsi): Likewise.
      	(msp430_print_operand_addr): Likewise.
      	* config/msp430/msp430.h (HAVE_POST_INCREMENT): Define.
      	(USE_STORE_POST_INCREMENT): Define.
      	* config/msp430/msp430.md: Use the msp430_general_dst_operand or
      	msp430_general_dst_nonv_operand predicates for the lvalues of insns.
      	* config/msp430/predicates.md (msp430_nonpostinc_operand): New.
      	(msp430_general_dst_operand): New.
      	(msp430_general_dst_nonv_operand): New.
      	(msp430_nonsubreg_operand): Remove.
      	(msp430_nonsubreg_dst_operand): New.
      	(msp430_nonsubreg_or_imm_operand): Allow reg or mem operands in place
      	of defunct msp430_nonsubreg_operand.
      	(msp430_nonsubregnonpostinc_or_imm_operand): New.
      
      From-SVN: r276995
      Jozef Lawrynowicz committed
    • [linemap PATCH] Constify lookup · 9158f0ba
      https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01080.html
      looking up a line map takes a non-constant line_maps object, which is confusing.
      This makes the caching fields mutable, so permits a constant object, as one might expect for a lookup.
      
      	* include/line-map.h (struct maps_info_ordinary): Make cache
      	mutable.
      	(struct maps_info_macro): Likewise.
      	(LINEMAPS_CACHE): Remove non-ref accessor. Constify ref accessor.
      	(LINEMAPS_ORDINARY_CACHE, LINEMAPS_MACRO_CACHE): Likewise.
      	(LINEMAPS_ORDINARY_MAP_AT, LINEMAPS_MACRO_MAP_AT): Use
      	LINEMAPS_USED and LINEMAPS_MAP_AT.
      	(linemap_lookup): Constify line_map arg.
      	linemap.c (linemap_ordinary_map_lookup, linemap_macro_map_lookup):
      	Constify line_map arg.
      
      From-SVN: r276994
      Nathan Sidwell committed
    • re PR debug/91929 (missing inline subroutine information in build using sin/cos) · d8955dc0
      2019-10-15  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/91929
      	* tree-ssa-pre.c (pre_expr_d::loc): New member.
      	(get_or_alloc_expr_for_name): Initialize it.
      	(get_or_alloc_expr_for_constant): Likewise.
      	(phi_translate_1): Copy it.
      	(create_expression_by_pieces): Use the original location
      	of the expression for the inserted stmt.
      	(compute_avail): Record the location of the stmt for the
      	expressions created.
      
      From-SVN: r276993
      Richard Biener committed
    • [C++ PATCH] build_clone cleanup · 386c4077
      https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01069.html
      build_clone is recursive when applied to a template, but I found the control flow confusing. this makes it clearer and moves some decls to their initializers.
      
      	* class.c (build_clone): Refactor to clarify recursiveness.
      
      From-SVN: r276992
      Nathan Sidwell committed
    • re PR target/92048 (armeb regression after r276645) · 1c2e7cd9
      2019-10-15  Richard Biener  <rguenther@suse.de>
      
      	PR testsuite/92048
      	* gcc.dg/vect/fast-math-vect-pr29925.c: Avoid unrolling of
      	inner loop.
      
      From-SVN: r276991
      Richard Biener committed
    • Fix unchecked use of tree_to_uhwi in tree-ssa-strlen.c · 0186d373
      r273783 introduced an unchecked use of tree_to_uhwi.  This is
      tested by the SVE ACLE patches, but could potentially trigger
      in non-SVE cases too.
      
      2019-10-15  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* tree-ssa-strlen.c (count_nonzero_bytes): Check tree_fits_uhwi_p
      	before using tree_to_uhwi.
      
      From-SVN: r276990
      Richard Sandiford committed
    • [PATCH] S/390: Run %a0:DI splitters only after reload · 0d552c1b
      gcc/ChangeLog:
      
      2019-10-15  Ilya Leoshkevich  <iii@linux.ibm.com>
      
      	* config/s390/s390.md: Run %a0:DI splitters only after reload.
      
      gcc/testsuite/ChangeLog:
      
      2019-10-15  Ilya Leoshkevich  <iii@linux.ibm.com>
      
      	* gcc.target/s390/load-thread-pointer-once.c: New test.
      
      From-SVN: r276989
      Ilya Leoshkevich committed
    • Makefile.rtl (a-except.o): Put -O1 earlier so that it can be overriden if needed… · 14f020d1
      Makefile.rtl (a-except.o): Put -O1 earlier so that it can be overriden if needed by other variables.
      
      	* Makefile.rtl (a-except.o): Put -O1 earlier so that it can be
      	overriden if needed by other variables.
      
      From-SVN: r276988
      Arnaud Charlet committed
    • re PR fortran/92094 (ice in vect_transform_stmt at tree-vect-stmts.c:10921) · c30587c0
      2019-10-15  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/92094
      	* tree-vect-loop.c (vectorizable_reduction): For nested cycles
      	do not adjust the reduction definition def type.
      	* tree-vect-stmts.c (vect_transform_stmt): Verify the scalar stmt
      	defines the latch argument of the PHI.
      
      	* gfortran.dg/pr92094.f90: New testcase.
      
      From-SVN: r276987
      Richard Biener committed
    • Add missing mask[z]_roundscale_[round]_s[d,s] intrinsics · a7c4d6d1
      gcc/
      	* config/i386/avx512fintrin.h (_mm_mask_roundscale_ss,
      	_mm_maskz_roundscale_ss, _mm_maskz_roundscale_round_ss,
      	_mm_maskz_roundscale_round_ss, _mm_mask_roundscale_sd,
      	_mm_maskz_roundscale_sd, _mm_mask_roundscale_round_sd,
      	_mm_maskz_roundscale_round_sd): New intrinsics.
      	(_mm_roundscale_ss, _mm_roundscale_round_ss): Use
      	__builtin_ia32_rndscales?_mask_round builtins instead of
      	__builtin_ia32_rndscales?_round.
      	* config/i386/i386-builtin.def (__builtin_ia32_rndscaless_round,
      	__builtin_ia32_rndscalesd_round): Remove.
      	(__builtin_ia32_rndscaless_mask_round,
      	__builtin_ia32_rndscalesd_mask_round): New intrinsics.
      	* config/i386/sse.md
      	(avx512f_rndscale<mode><round_saeonly_name>): Renamed to ...
      	(avx512f_rndscale<mode><mask_scalar_name><round_saeonly_scalar_name>):
      	 ... this, adjust and add subst atrributes to make it maskable.
      
      gcc/testsuite/
      	* gcc.target/i386/avx512f-vrndscaless-1.c: Add scan-assembler-times
      	directives for newly expected instructions.
      	* gcc.target/i386/avx512f-vrndscalesd-1.c: Likewise.
      	* gcc.target/i386/avx512f-vrndscaless-2.c
      	(avx512f_test): Add tests for new intrinsics.
      	* gcc.target/i386/avx512f-vrndscalesd-2.c: Likewise.
      	* gcc.target/i386/avx-1.c (__builtin_ia32_rndscalefss_round,
      	__builtin_ia32_rndscalefsd_round): Remove.
      	(__builtin_ia32_rndscalefss_mask_round,
      	__builtin_ia32_rndscalefsd_mask_round): Define.
      	* gcc.target/i386/sse-13.c: Ditto.
      	* gcc.target/i386/sse-23.c: Ditto.
      
      From-SVN: r276986
      Hongtao Liu committed
    • re PR middle-end/92046 (Command line options (that are per-functions) are… · e622a32d
      re PR middle-end/92046 (Command line options (that are per-functions) are affecting --params which are global.)
      
      2019-10-15  Richard Biener  <rguenther@suse.de>
      
      	PR middle-end/92046
      	* common.opt (fallow-store-data-races): New.
      	* params.def (PARAM_ALLOW_STORE_DATA_RACES): Remove.
      	* params.h (ALLOW_STORE_DATA_RACES): Likewise.
      	* doc/invoke.texi (fallow-store-data-races): Document.
      	(--param allow-store-data-races): Remove docs.
      	* opts.c (default_options_table): Enable -fallow-store-data-races
      	at -Ofast.
      	(default_options_optimization): Do not enable --param
      	allow-store-data-races at -Ofast.
      	* tree-if-conv.c (ifcvt_memrefs_wont_trap): Use flag_store_data_races
      	instead of PARAM_ALLOW_STORE_DATA_RACES.
      	* tree-ssa-loop-im.c (execute_sm): Likewise.
      
      	* c-c++-common/cxxbitfields-3.c: Adjust.
      	* c-c++-common/cxxbitfields-6.c: Likewise.
      	* c-c++-common/simulate-thread/bitfields-1.c: Likewise.
      	* c-c++-common/simulate-thread/bitfields-2.c: Likewise.
      	* c-c++-common/simulate-thread/bitfields-3.c: Likewise.
      	* c-c++-common/simulate-thread/bitfields-4.c: Likewise.
      	* g++.dg/simulate-thread/bitfields-2.C: Likewise.
      	* g++.dg/simulate-thread/bitfields.C: Likewise.
      	* gcc.dg/lto/pr52097_0.c: Likewise.
      	* gcc.dg/simulate-thread/speculative-store-2.c: Likewise.
      	* gcc.dg/simulate-thread/speculative-store-3.c: Likewise.
      	* gcc.dg/simulate-thread/speculative-store-4.c: Likewise.
      	* gcc.dg/simulate-thread/speculative-store.c: Likewise.
      	* gcc.dg/tree-ssa/20050314-1.c: Likewise.
      
      From-SVN: r276985
      Richard Biener committed
    • re PR tree-optimization/92085 (ICE: tree check: expected class 'type', have… · 3c8e341b
      re PR tree-optimization/92085 (ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.c:86)
      
      2019-10-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
      
      	PR tree-optimization/92085
      	* tree-if-conv.c (ifcvt_local_dce): Call gsi_next in else clause,
      	instead of calling it unconditionally after
      	delete_dead_or_redundant_assignment and fix indentation.
      
      testsuite/
      	* gcc.dg/tree-ssa/pr92085-1.c: New test.
      	* gcc.dg/tree-ssa/pr92085-2.c: Likewise.
      
      From-SVN: r276984
      Prathamesh Kulkarni committed
    • re PR fortran/89943 (Submodule functions are not allowed to have C binding) · 51992f15
      2019-10-14  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/89943
      	decl.c (gfc_match_function_decl): Ignore duplicate BIND(C) for function
      	declaration in submodule.  Implement at check for F2018 C1550.
      	(gfc_match_entry): Use temporary for locus, which allows removal of
      	one gfc_error_now().
      	(gfc_match_subroutine): Ignore duplicate BIND(C) for subroutine
      	declaration in submodule.  Implement at check for F2018 C1550.
      
      2019-10-14  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/89943
      	* gfortran.dg/pr89943_1.f90: New test.
      	* gfortran.dg/pr89943_2.f90: Ditto.
      	* gfortran.dg/pr89943_3.f90: Ditto.
      	* gfortran.dg/pr89943_4.f90: Ditto.
      
      From-SVN: r276983
      Steven G. Kargl committed
    • Daily bump. · 23605fec
      From-SVN: r276982
      GCC Administrator committed
    • Rename attribute-related functions and productions in C parser. · 783bfe5e
      The C2x attribute syntax, [[ ]], appears in different places in the
      syntax from GNU __attribute__, and, where they can appear in the same
      place in the syntax, they do not always appertain to the same entity.
      (For example, in "int func(void) ATTRS;", GNU attributes appertain to
      the declaration but C2x attributes appertain to the function type.)
      
      Thus, the C parser needs to handle the two kinds of attributes
      separately, with each place in the syntax accepting whatever kinds of
      attributes are appropriate there and applying them to the relevant
      entities.  This patch prepares for this by renaming parser functions
      relating to attributes to make clear they are specifically about GNU
      attributes and renaming syntax productions likewise to avoid confusing
      with the C2x attributes syntax productions.
      
      Where comments refer to attributes, this has only be changed where it
      is clear that in the context they are referring specifically to the
      gnu-attributes syntax.  There may be other places that also end up
      changing to refer to gnu-attributes as part of the C2x attributes
      implementation, if more detailed examination of those places shows
      they are also specific to gnu-attributes.  (I do not expect code
      dealing with semantics of attributes outside of the parser to need to
      change; as for C++, it will be possible to use existing attributes
      inside [[]] with the gnu:: form of the attribute name.)
      
      Bootstrapped with no regressions on x86_64-pc-linux-gnu.
      
      	* c-parser.c (c_parser_attribute_any_word): Rename to
      	c_parser_gnu_attribute_any_word.  All callers changed.
      	(c_parser_attribute): Rename to c_parser_gnu_attribute.  All
      	callers changed.
      	(c_parser_attributes): Rename to c_parser_gnu_attributes.  All
      	callers changed.
      	(c_parser_declaration_or_fndef, c_parser_declspecs)
      	(c_parser_enum_specifier, c_parser_struct_or_union_specifier)
      	(c_parser_struct_declaration, c_parser_declarator)
      	(c_parser_gnu_attribute, c_parser_compound_statement)
      	(c_parser_label, c_parser_statement, c_parser_objc_method_decl)
      	(c_parser_transaction_attributes): Add "gnu-" prefix to names of
      	attribute-related syntax productions.
      
      From-SVN: r276978
      Joseph Myers committed
  2. 14 Oct, 2019 17 commits