Commit Graph

171985 Commits

Author SHA1 Message Date
Richard Sandiford
9b17a646d9 [AArch64] Improve poly_int handling in aarch64_layout_frame
I'd used known_lt when converting these conditions to poly_int,
but on reflection that was a bad choice.  The code isn't just
doing a range check; it specifically needs constants that will
fit in a certain encoding.

2019-10-16  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* config/aarch64/aarch64.c (aarch64_layout_frame): Use is_constant
	rather than known_lt when choosing frame layouts.

From-SVN: r277061
2019-10-16 10:50:53 +00:00
Richard Sandiford
8e66b377a9 [AArch64] Add an assert to aarch64_layout_frame
This patch adds an assert that all the individual *_adjust allocations
add up to the full frame size.  With that safety net, it seemed slightly
clearer to use crtl->outgoing_args_size as the final adjustment where
appropriate, to match what's used in the comments.

This is a bit overkill on its own, but I need to add more cases for SVE.

2019-10-16  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* config/aarch64/aarch64.c (aarch64_layout_frame): Assert
	that all the adjustments add up to the full frame size.
	Use crtl->outgoing_args_size directly as the final adjustment
	where appropriate.

From-SVN: r277060
2019-10-16 10:48:00 +00:00
Richard Sandiford
ab43763e51 [AArch64] Use frame reference in aarch64_layout_frame
Using the full path "cfun->machine->frame" in aarch64_layout_frame
led to awkward formatting in some follow-on patches, so it seemed
worth using a local reference instead.

2019-10-16  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* config/aarch64/aarch64.c (aarch64_layout_frame): Use a local
	"frame" reference instead of always referring directly to
	"cfun->machine->frame".

From-SVN: r277059
2019-10-16 10:44:31 +00:00
Jonathan Wakely
44af818f00 Only use GCC-specific __is_same_as built-in conditionally
Clang doesn't support __is_same_as but provides __is_same instead.
Restore the original implementation (pre r276891) when neither of those
built-ins is available.

	* include/bits/c++config (_GLIBCXX_BUILTIN_IS_SAME_AS): Define to
	one of __is_same_as or __is_same when available.
	* include/std/concepts (__detail::__same_as): Use std::is_same_v.
	* include/std/type_traits (is_same) [_GLIBCXX_BUILTIN_IS_SAME_AS]:
	Use new macro instead of __is_same_as.
	(is_same) [!_GLIBCXX_BUILTIN_IS_SAME_AS]: Restore partial
	specialization.
	(is_same_v) [_GLIBCXX_BUILTIN_IS_SAME_AS]: Use new macro.
	(is_same_v) [!_GLIBCXX_BUILTIN_IS_SAME_AS]: Use std::is_same.

From-SVN: r277058
2019-10-16 11:26:05 +01:00
Richard Biener
bf78ed91a4 re PR tree-optimization/92119 (ICE: SIGSEGV in contains_struct_check (tree.h:3380) with -Os -fno-tree-dce -fno-tree-dse -ftree-slp-vectorize)
2019-10-16  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/92119
	* tree-vect-patterns.c (vect_recog_rotate_pattern): Guard
	against missing bswap lhs.

From-SVN: r277057
2019-10-16 10:05:21 +00:00
Richard Sandiford
96eb7d7a64 Deal with incoming POLY_INT_CST ranges (PR92033)
This patch makes value_range_base::set convert POLY_INT_CST bounds
into the worst-case INTEGER_CST bounds.  The main case in which this
gives useful ranges is a lower bound of A + B * X becoming A when B >= 0.
E.g.:

  [32 + 16X, 100] -> [32, 100]
  [32 + 16X, 32 + 16X] -> [32, MAX]

But the same thing can be useful for the upper bound with negative
X coefficients.

2019-10-16  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	PR middle-end/92033
	* poly-int.h (constant_lower_bound_with_limit): New function.
	(constant_upper_bound_with_limit): Likewise.
	* doc/poly-int.texi: Document them.
	* tree-vrp.c (value_range_base::set): Convert POLY_INT_CST bounds
	into the worst-case INTEGER_CST bounds.

From-SVN: r277056
2019-10-16 09:50:44 +00:00
Feng Xue
4307a485c3 Generalized IPA predicate on parameter reference
2019-10-16  Feng Xue  <fxue@os.amperecomputing.com>

        PR ipa/91088
        * doc/invoke.texi (ipa-max-param-expr-ops): Document new option.
        * params.def (PARAM_IPA_MAX_PARAM_EXPR_OPS): New.
        * ipa-predicat.h (struct expr_eval_op): New struct.
        (expr_eval_ops): New typedef.
        (struct condition): Add type and param_ops fields, remove size field.
        (add_condition): Replace size parameter with type parameter, add
        param_ops parameter.
        * ipa-predicat.c (expr_eval_ops_equal_p): New function.
        (predicate::add_clause): Add comparisons on type and param_ops.
        (dump_condition): Add debug dump for param_ops.
        (remap_after_inlining): Adjust call arguments to add_condition.
        (add_condition): Replace size parameter with type parameter, add
        param_ops parameter. Unshare constant value used in conditions.
        * ipa-fnsummary.c (evaluate_conditions_for_known_args): Fold
        parameter expressions using param_ops.
        (decompose_param_expr):  New function.
        (set_cond_stmt_execution_predicate): Use call to decompose_param_expr
        to replace call to unmodified_parm_or_parm_agg_item.
        (set_switch_stmt_execution_predicate): Likewise.
        (will_be_nonconstant_expr_predicate): Likewise. Replace usage of size
        with type.
        (inline_read_section): Read param_ops from summary stream.
        (ipa_fn_summary_write): Write param_ops to summary stream.

2019-10-16  Feng Xue  <fxue@os.amperecomputing.com>

        PR ipa/91088
        * gcc.dg/ipa/pr91088.c: New test.
        * gcc.dg/ipa/pr91089.c: Add sub-test for range analysis.
        * g++.dg/tree-ssa/ivopts-3.C: Force a function to be noinline.

From-SVN: r277054
2019-10-16 07:27:50 +00:00
François Dumont
8cf9bbd247 [_GLIBCXX_DEBUG] Clarify constness and state <unknown> entries.
* src/c++11/debug.cc (print_field): Replace constness_names <unknown>
	entry with <unknown constness>. Replace state_names <unknown> entry with
	<unknown state>.

From-SVN: r277049
2019-10-16 05:05:27 +00:00
GCC Administrator
6c1ee90605 Daily bump.
From-SVN: r277033
2019-10-16 00:16:15 +00:00
Segher Boessenkool
f937014334 genattrtab: Parenthesize expressions correctly (PR92107)
As PR92107 shows, genattrtab doesn't parenthesize expressions correctly
(or at all, even).  This fixes it.


	PR rtl-optimization/92107
	* genattrtab.c (write_attr_value) <do_operator>: Parenthesize the
	expression written.

From-SVN: r277023
2019-10-16 01:47:47 +02:00
John David Anglin
85093ac6c9 fptr.c (_dl_read_access_allowed): Change argument to unsigned int.
* config/pa/fptr.c (_dl_read_access_allowed): Change argument to
	unsigned int.  Adjust callers.
	(__canonicalize_funcptr_for_compare): Change plabel type to volatile
	unsigned int *.  Load relocation offset before function pointer.
	Add barrier to ensure ordering.

From-SVN: r277015
2019-10-15 22:17:14 +00:00
Andrew Pinski
70a42a8559 20191015-1.c: New test.
2019-10-15  Andrew Pinski  <apinski@marvell.com>

        * gcc.c-torture/compile/20191015-1.c: New test.
        * gcc.c-torture/compile/20191015-2.c: New test.

From-SVN: r277011
2019-10-15 14:06:55 -07:00
Iain Sandoe
a1f37c3f62 [Darwin] Clarify fix and continue support (NFC).
This updates the description of the support for fix and continue
debugging.

gcc/ChangeLog:

2019-10-15  Iain Sandoe  <iain@sandoe.co.uk>

	* config/darwin.c: Update description of fix and continue.

From-SVN: r277010
2019-10-15 20:28:02 +00:00
Iain Sandoe
6eee515142 [Darwin] Update darwin_binds_local_p.
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
2019-10-15 20:15:38 +00:00
Martin Sebor
863950d280 PR testsuite/92016 - Excess errors in Wstringop-overflow-17.c
gcc/testsuite/ChangeLog:
	* gcc.dg/Wstringop-overflow-17.c: Expect an additional warning.

From-SVN: r277008
2019-10-15 13:16:51 -06:00
Richard Biener
7e601a1d3e lto-streamer-out.c (lto_variably_modified_type_p): New.
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
2019-10-15 18:30:15 +00:00
James Norris
2a0cb1644c [Fortran] OpenMP+OpenACC: Remove bogus contigous-pointer check
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
2019-10-15 16:13:01 +02:00
Bill Schmidt
855b85b4e7 re PR testsuite/92093 (New test case gcc.target/powerpc/pr91275.c from r276410 fails on BE)
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
2019-10-15 12:44:25 +00:00
Nathan Sidwell
c1d781707e [C++ PATCH] clone_function_decl breakup
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
2019-10-15 12:27:21 +00:00
Jozef Lawrynowicz
a0a9a3fc22 msp430.md (zero_extendqipsi2): New.
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
2019-10-15 12:24:53 +00:00
Jozef Lawrynowicz
582b4055ca msp430.md: Group zero_extend* insns together.
2019-10-15  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

	* config/msp430/msp430.md: Group zero_extend* insns together.

From-SVN: r276996
2019-10-15 12:19:51 +00:00
Jozef Lawrynowicz
28987d8be6 constraints.md: Allow post_inc operand for "Ya" constraint.
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
2019-10-15 12:14:55 +00:00
Nathan Sidwell
9158f0ba97 [linemap PATCH] Constify lookup
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
2019-10-15 12:03:04 +00:00
Richard Biener
d8955dc0f4 re PR debug/91929 (missing inline subroutine information in build using sin/cos)
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
2019-10-15 11:47:27 +00:00
Nathan Sidwell
386c407786 [C++ PATCH] build_clone cleanup
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
2019-10-15 11:20:06 +00:00
Richard Biener
1c2e7cd91a re PR target/92048 (armeb regression after r276645)
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
2019-10-15 10:47:48 +00:00
Richard Sandiford
0186d373b6 Fix unchecked use of tree_to_uhwi in tree-ssa-strlen.c
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
2019-10-15 10:29:53 +00:00
Ilya Leoshkevich
0d552c1b67 [PATCH] S/390: Run %a0:DI splitters only after reload
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
2019-10-15 10:22:35 +00:00
Arnaud Charlet
14f020d16d 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
2019-10-15 12:12:15 +02:00
Richard Biener
c30587c020 re PR fortran/92094 (ice in vect_transform_stmt at tree-vect-stmts.c:10921)
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
2019-10-15 10:09:10 +00:00
Hongtao Liu
a7c4d6d1c2 Add missing mask[z]_roundscale_[round]_s[d,s] intrinsics
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
2019-10-15 07:44:15 +00:00
Richard Biener
e622a32db7 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
2019-10-15 07:28:26 +00:00
Prathamesh Kulkarni
3c8e341b99 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
2019-10-15 07:19:41 +00:00
Steven G. Kargl
51992f15a7 re PR fortran/89943 (Submodule functions are not allowed to have C binding)
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
2019-10-15 00:28:47 +00:00
GCC Administrator
23605fec7a Daily bump.
From-SVN: r276982
2019-10-15 00:16:17 +00:00
Joseph Myers
783bfe5ee8 Rename attribute-related functions and productions in C parser.
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
2019-10-15 01:12:49 +01:00
Kugan Vivekanandarajah
490d1b4a83 vfp.md (fma<SDF:mode>4): Enable DF only when TARGET_VFP_DOUBLE.
gcc/ChangeLog:

2019-10-15  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>

	* config/arm/vfp.md (fma<SDF:mode>4): Enable DF only when
	TARGET_VFP_DOUBLE.
	(*fmsub<SDF:mode>4): Likewise.
	*fnmsub<SDF:mode>4): Likewise.
	(*fnmadd<SDF:mode>4): Likewise.

From-SVN: r276977
2019-10-14 23:33:17 +00:00
Ian Lance Taylor
0a0582d75e compiler: revise exportdata fix for processing constant types
This patch is an addendum to the fix for issue 34577, which was not
    sufficiently general. During export data processing, when looking at
    the types of constants mentioned in inlinable function bodies, include
    both locally defined constants and constant imported from other
    packages.
    
    Testcase for this bug is in CL 201017.
    
    Fixes golang/go#34852.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/201018

From-SVN: r276976
2019-10-14 23:12:33 +00:00
Thomas Koenig
4a4fc7feda re PR fortran/92004 (Rejection of different ranks for dummy array argument where actual argument is an element)
2019-10-14  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/92004
	* array.c (expand_constructor): Set from_constructor on
	expression.
	* gfortran.h (gfc_symbol): Add maybe_array.
	(gfc_expr): Add from_constructor.
	* interface.c (maybe_dummy_array_arg): New function.
	(compare_parameter): If the formal argument is generated from a
	call, check the conditions where an array element could be
	passed to an array.  Adjust error message for assumed-shape
	or pointer array.  Use correct language for assumed shaped arrays.
	(gfc_get_formal_from_actual_arglist): Set maybe_array on the
	symbol if the actual argument is an array element fulfilling
	the conditions of 15.5.2.4.

2019-10-14  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/92004
	* gfortran.dg/argument_checking_24.f90: New test.
	* gfortran.dg/abstract_type_6.f90: Add error message.
	* gfortran.dg/argument_checking_11.f90: Correct wording
	in error message.
	* gfortran.dg/argumeent_checking_13.f90: Likewise.
	* gfortran.dg/interface_40.f90: Add error message.

From-SVN: r276972
2019-10-14 21:37:34 +00:00
Maya Rashish
b08e9f111b * gcc.c-torture/compile/pr85401: New test.
From-SVN: r276971
2019-10-14 15:14:16 -06:00
Joel Hutton
128ec9d550 * doc/tree-ssa.texi: Update renamed macro name.
From-SVN: r276970
2019-10-14 15:09:45 -06:00
Mihailo Stojanovic
4236e880ee mips.c (mips_cannot_force_const_mem): Reject vector constants.
* config/mips/mips.c (mips_cannot_force_const_mem): Reject
	vector constants.

	* gcc.target/mips/constant-spill.c: New test.

From-SVN: r276969
2019-10-14 15:07:56 -06:00
Jason Merrill
ac308262f3 PR c++/91930 - ICE with constrained inherited default ctor.
The testcase was crashing because lazily_declare_fn was failing to add a
defaulted constructor, because the implicit declaration was less constrained
than the inherited default constructor.  But when we have an inherited
constructor, we shouldn't be trying to declare a default constructor in the
first place, because it counts as "a user-declared constructor".  With that
fixed I needed to adjust a couple of inherited constructor testcases that
previously had been diagnosing the default constructor as deleted rather
than not declared.

	* name-lookup.c (do_class_using_decl): Set TYPE_HAS_USER_CONSTRUCTOR
	for inherited constructor.

From-SVN: r276968
2019-10-14 16:13:49 -04:00
Iain Sandoe
10aabe339a [Darwin, machopic 9/n] Minor code clean-ups.
Improve some comments, replace some asserts that have been in the code
base for years with checking-asserts.

gcc/ChangeLog:

2019-10-14  Iain Sandoe  <iain@sandoe.co.uk>

	* config/darwin.c: Use unsigned ints for the picbase label
	counters, initialise the vars explicitly.
	(update_pic_label_number_if_needed): Move a variable declaration
	to where it's needed.
	(machopic_output_function_base_name): Use a more strict checking
	assert, and and unsigned int for the picbase label counter.
	(machopic_get_function_picbase): Likewise.

From-SVN: r276967
2019-10-14 19:18:34 +00:00
Ian Lance Taylor
2dccdbcff6 runtime: correct facilities names in s390 CPU support
Patch from Andreas Krebbel.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/201038

From-SVN: r276964
2019-10-14 14:10:16 +00:00
Richard Biener
fc2d730302 re PR middle-end/92046 (Command line options (that are per-functions) are affecting --params which are global.)
2019-10-14  Richard Biener  <rguenther@suse.de>

	PR middle-end/92046
	* dse.c (scan_insn): Use param max_active_local_stores.
	(dse_step1): Get PARAM_MAX_DSE_ACTIVE_LOCAL_STORES and adjust
	based on optimization level.
	* loop-invariant.c (move_loop_invariants): Adjust
	LOOP_INVARIANT_MAX_BBS_IN_LOOP based on optimization level.
	* opts.c (default_options_optimization): Do not adjust
	PARAM_MAX_DSE_ACTIVE_LOCAL_STORES and
	LOOP_INVARIANT_MAX_BBS_IN_LOOP here.

From-SVN: r276963
2019-10-14 14:03:35 +00:00
Ian Lance Taylor
d2317d50ae internal/cpu: define kdsaQuery for s390
Patch from Andreas Krebbel.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/201037

From-SVN: r276962
2019-10-14 14:01:15 +00:00
Wilco Dijkstra
ea9782106c [ARM] Enable arm_legitimize_address for Thumb-2
Currently arm_legitimize_address doesn't handle Thumb-2 at all, resulting in
inefficient code.  Since Thumb-2 supports similar address offsets use the Arm
legitimization code for Thumb-2 to get significant codesize and performance
gains.  SPECINT2006 shows 0.4% gain on Cortex-A57, while SPECFP improves 0.2%.

    gcc/
	* config/arm/arm.c (arm_legitimize_address): Remove Thumb-2 bailout.

From-SVN: r276961
2019-10-14 12:25:00 +00:00
Wilco Dijkstra
c7207339a7 [ARM] Switch to default sched pressure algorithm
Currently the Arm backend selects the alternative sched pressure algorithm.
The issue is that this doesn't take register pressure into account, and so
it causes significant additional spilling on Arm where there are only 14
allocatable registers.  Building SPEC2006 showed significant codesize gains
with the default pressure algorithm, so switch back to that.  PR77308 shows
~800 fewer instructions.

SPECINT2006 is ~0.6% faster on Cortex-A57 together with the other DImode
patches. Overall SPEC codesize is 1.1% smaller.

    gcc/
	* config/arm/arm.c (arm_option_override): Don't override sched
	pressure algorithm.

From-SVN: r276960
2019-10-14 12:21:14 +00:00
Richard Biener
7bd8bec53f re PR tree-optimization/92069 (ice in vect_analyze_scalar_cycles_1, at tree-vect-loop.c:560)
2019-10-14  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/92069
	* tree-vect-loop.c (vect_analyze_scalar_cycles_1): For nested
	cycles do not set vect_nested_cycle on the latch definition.

	* gcc.dg/torture/pr92069.c: New testcase.

From-SVN: r276959
2019-10-14 11:47:15 +00:00