Commit Graph

170003 Commits

Author SHA1 Message Date
Jason Merrill
e6c847fb8f Add parens around constraint in <memory>.
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
2019-07-16 04:54:47 -04:00
Jason Merrill
fd860f7d44 Simplify type-specifier parsing.
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
2019-07-16 04:50:16 -04:00
Jason Merrill
19bd902826 Fix g++.dg/template/pr84789.C on new concepts branch.
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
2019-07-16 04:49:04 -04:00
Richard Sandiford
10b04d1e0b Report ambiguous uses of .md attributes
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
2019-07-16 08:41:21 +00:00
Richard Sandiford
737eb76789 Use file_location for md_reader's ptr_loc
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
2019-07-16 08:41:13 +00:00
Richard Sandiford
f6e5e4b83b [rs6000] Fix ambiguous .md attribute uses
This patch is part of a series that fixes ambiguous attribute
uses in .md files, i.e. cases in which attributes didn't use
<ITER:ATTR> to specify an iterator, and in which <ATTR> could
have different values depending on the iterator chosen.

No behavioural change -- produces the same code as before except
for formatting and line numbers.

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

gcc/
	* config/rs6000/rs6000.md (*mov<mode>_update1): Explicitly
	use <SFDF:mode>, <SFDF:MODE>, <SFDF:Ff> and <SFDF:bits> rather than
	leaving the choice between SFDF and P implicit.
	(*mov<mode>_update2): Likewise.
	(*cmp<IBM128:mode>_internal2): Explicitly use <IBM128:MODE>
	rather than leaving the choice betweem IBM128 and GPR implicit.
	(*fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Explicitly use
	<IEEE128:MODE> rather than leaving the choice between IEEE128 and
	QHSI implicit.
	(AltiVec define_peephole2s): Explicitly use <ALTIVEC_DFORM:MODE>
	rather than leaving the choice between ALTIVEC_DFORM and P implicit.
	* config/rs6000/vsx.md
	(*vsx_ext_<VSX_EXTRACT_I:VS_scalar>_fl_<FL_CONV:mode>)
	(*vsx_ext_<VSX_EXTRACT_I:VS_scalar>_ufl_<FL_CONV:mode>): Explicitly
	use <FL_CONV:VSisa> rather than leaving the choice between FL_CONV
	and VSX_EXTRACT_I implicit.

From-SVN: r273509
2019-07-16 08:41:03 +00:00
Richard Sandiford
8f5b616591 [mips] Fix ambiguous .md attribute uses
This patch is part of a series that fixes ambiguous attribute
uses in .md files, i.e. cases in which attributes didn't use
<ITER:ATTR> to specify an iterator, and in which <ATTR> could
have different values depending on the iterator chosen.

No behavioural change -- produces the same code as before.

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

gcc/
	* config/mips/micromips.md (*movep<MOVEP1:mode><MOVEP2:mode>):
	Explicitly use <MOVEP1:MODE> for the mode attribute.

From-SVN: r273508
2019-07-16 08:40:55 +00:00
Jan Hubicka
d3ed5b5664 PR91176: Skip debug insns when computing inline costs
Apply Honza's fix for an aarch64-linux-gnu bootstrap failure.

2019-07-16  Jan Hubicka  <hubicka@ucw.cz>

gcc/
	PR bootstrap/91176
	* ipa-fnsummary.c (analyze_function_body): Skip debug stmts

From-SVN: r273507
2019-07-16 08:12:05 +00:00
Jason Merrill
42b593d5e0 Remove trailing space.
From-SVN: r273506
2019-07-16 03:34:58 -04:00
GCC Administrator
b4ad799f45 Daily bump.
From-SVN: r273505
2019-07-16 00:16:48 +00:00
Uros Bizjak
c4a193bcba * config/i386/i386.md (*testdi_1): Put back "%" constraint modifier.
From-SVN: r273501
2019-07-16 00:23:11 +02:00
Ian Lance Taylor
4e62f891cd runtime: expose the g variable
Currently, getg is implemented in C, which loads the thread-local
    g variable. The g variable is declared static in C.
    
    This CL exposes the g variable, so it can be accessed from the Go
    side. This allows the Go compiler to inline getg calls to direct
    access of g.
    
    Currently, the actual inlining is only implemented in the gollvm
    compiler. The g variable is thread-local and the compiler backend
    may choose to cache the TLS address in a register or on stack. If
    a thread switch happens the cache may become invalid. I don't
    know how to disable the TLS address cache in gccgo, therefore
    the inlining of getg is not implemented. In the future gccgo may
    gain this if we know how to do it safely.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/186238

From-SVN: r273499
2019-07-15 21:17:16 +00:00
Segher Boessenkool
2d94f7dea9 rs6000: Always output .machine
We now can always output .machine (if we output it at all for the
current target).


	PR target/91050
	* config/rs6000/rs6000.c (rs6000_file_start): Never skip emitting a
	.machine directive.

From-SVN: r273498
2019-07-15 22:57:53 +02:00
Uros Bizjak
ea298f7ad0 i386.md (@test<mode>_ccno_1): Rename from test<mode>_ccno_1.
* config/i386/i386.md (@test<mode>_ccno_1):
	Rename from test<mode>_ccno_1.
	(*testdi_1): Remove redundant alternatives.  Remove modrm attribute.
	(*testqi_1_maybe_si): Remove modrm attribute.
	(*test<mode>_1): Ditto.
	* config/i386/i386-expand.c (ix86_split_idivmod): Use
	gen_test_ccno_1 and gen_extend_insn.

From-SVN: r273496
2019-07-15 22:26:43 +02:00
Jan Hubicka
c559f3ef4e tree-ssa-alias.c (aliasing_component_refs_walk): Initialize same_p to 0.
* tree-ssa-alias.c (aliasing_component_refs_walk): Initialize same_p
	to 0.

From-SVN: r273495
2019-07-15 19:21:36 +00:00
Richard Biener
5e79b14766 re PR tree-optimization/91162 (ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.c:86 (error: invalid 'PHI' argument))
2019-07-15  Richard Biener  <rguenther@suse.de>

	PR middle-end/91162
	* tree-cfg.c (move_block_to_fn): When releasing a virtual PHI
	node make sure to replace all uses with something valid.

	* gcc.dg/autopar/pr91162.c: New testcase.

From-SVN: r273492
2019-07-15 12:48:47 +00:00
Kewen Lin
6c2833e74e re PR tree-optimization/88497 (Improve Accumulation in Auto-Vectorized Code)
gcc/ChangeLog

2019-07-15  Kewen Lin  <linkw@gcc.gnu.org>

    PR tree-optimization/88497
    * tree-ssa-reassoc.c (reassociate_bb): Swap the positions of
    GIMPLE_BINARY_RHS check and gimple_visited_p check, call new
    function undistribute_bitref_for_vector.
    (undistribute_bitref_for_vector): New function.
    (cleanup_vinfo_map): Likewise.
    (sort_by_mach_mode): Likewise.

gcc/testsuite/ChangeLog

2019-07-15  Kewen Lin  <linkw@gcc.gnu.org>

    PR tree-optimization/88497
    * gcc.dg/tree-ssa/pr88497-1.c: New test.
    * gcc.dg/tree-ssa/pr88497-2.c: Likewise.
    * gcc.dg/tree-ssa/pr88497-3.c: Likewise.
    * gcc.dg/tree-ssa/pr88497-4.c: Likewise.
    * gcc.dg/tree-ssa/pr88497-5.c: Likewise.
    * gcc.dg/tree-ssa/pr88497-6.c: Likewise.
    * gcc.dg/tree-ssa/pr88497-7.c: Likewise.

From-SVN: r273490
2019-07-15 05:12:05 +00:00
GCC Administrator
3126c241af Daily bump.
From-SVN: r273488
2019-07-15 00:16:18 +00:00
Jerry DeLisle
1b034a958d re PR fortran/87233 (Constraint C1279 still followed after f2008 standard revision (?))
2019-07-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/87233
	* expr.c (check_restricted): Relax constraint C1279 which was
	removed from F2008 and above.

	* gfortran.dg/initialization_14.f90: Modify to now pass by
	removing two dg-error commands. Added comments.
	* gfortran.dg/initialization_30.f90: New test that includes the
	two tests removed above with the 'dg-options -std=f95'.

From-SVN: r273484
2019-07-14 22:52:58 +00:00
Uros Bizjak
c5e02838af pr84512.c (dg-final): Remove XFAIL on alpha*-*-*.
* gcc.dg/tree-ssa/pr84512.c (dg-final): Remove XFAIL on alpha*-*-*.

From-SVN: r273483
2019-07-14 22:27:25 +02:00
Uros Bizjak
3e4ceed077 i386.md (nonmemory_szext_operand): New mode attribute.
* config/i386/i386.md (nonmemory_szext_operand): New mode attribute.
	(test<mode>_ccno_1): Macroize insn pattern from testsi_ccno_1
	and testdi_ccno_1 using SWI48 mode attribute.
	(*testdi_1): Use x86_64_szext_nonmemory_operand instead of
	x86_64_szext_general_operand.
	(*testqi_1_maybe_si): Use nonmemory_operand instead of general_operand.
	(*test<mode>_1): Use nonmemory_szext_operand mode attribute
	instead of genera_operand mode attribute.

From-SVN: r273482
2019-07-14 20:52:16 +02:00
Vladislav Ivanishin
cbfde6ee68 gdbhooks.py: dump-fn, dot-fn: cast ret values of fopen/fclose
Work around the following

    (gdb) Python Exception <class 'gdb.error'> 'fclose@@GLIBC_2.2.5' has
    unknown return type; cast the call to its declared return type:
    (gdb) Error occurred in Python: 'fclose@@GLIBC_2.2.5' has unknown
    return type; cast the call to its declared return type

This is due to GDB not being able to pick up and use the return types from
debug info for external declarations.

2019-07-14  Vladislav Ivanishin <vlad@ispras.ru>

        * gdbhooks.py (DumpFn.invoke): Add explicit casts of return values of
        fopen and fclose to their respective types.
        (DotFn.invoke): Ditto.

From-SVN: r273480
2019-07-14 13:19:29 +00:00
Jan Hubicka
a20f263ba1 ipa-fnsummary.c (ipa_dump_hints): Do not dump array_index.
* ipa-fnsummary.c (ipa_dump_hints): Do not dump array_index.
	(ipa_fn_summary::~ipa_fn_summary): Do not destroy array_index.
	(ipa_fn_summary_t::duplicate): Do not duplicate array_index.
	(array_index_predicate): Remove.
	(analyze_function_body): Account cost for variable ofsetted array
	indexing.
	(estimate_node_size_and_time): Do not compute array index hint.
	(ipa_merge_fn_summary_after_inlining): Do not merge array index hint.
	(inline_read_section): Do not read array index hint.
	(ipa_fn_summary_write): Do not write array index hint.
	* doc/invoke.texi (ipa-cp-array-index-hint-bonus): Remove.
	* ipa-cp.c (hint_time_bonus): Remove.
	* ipa-fnsummary.h (ipa_hints_vals): Remove array_index.
	(ipa_fnsummary): Remove array_index.
	* ipa-inline.c (want_inline_small_function_p): Do not use
	array_index.
	(edge_badness): Likewise.
	* params.def (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Remove.

From-SVN: r273479
2019-07-14 11:57:10 +00:00
Segher Boessenkool
d67dfb85ba rs6000: Shut up -Wformat-diag a little more
PR target/91148
	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Remove
	superfluous "builtin function" phrasing.

gcc/testsuite/
	* gcc.target/powerpc/bfp/scalar-extract-exp-2.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-extract-sig-2.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-insert-exp-2.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-insert-exp-5.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-insert-exp-8.c: Adjust.
	* gcc.target/powerpc/byte-in-set-2.c: Adjust.
	* gcc.target/powerpc/cmpb-3.c: Adjust.
	* gcc.target/powerpc/vsu/vec-all-nez-7.c: Adjust.
	* gcc.target/powerpc/vsu/vec-any-eqz-7.c: Adjust.
	* gcc.target/powerpc/vsu/vec-xl-len-13.c: Adjust.
	* gcc.target/powerpc/vsu/vec-xst-len-12.c: Adjust.

From-SVN: r273475
2019-07-14 10:24:38 +02:00
GCC Administrator
0d67fe7e00 Daily bump.
From-SVN: r273474
2019-07-14 00:16:17 +00:00
Iain Sandoe
8028dd3f2f [Darwin, PPC, testsuite] Require stabs support for a test.
The test fails if the assembler doesn't support stabs.

2019-07-13  Iain Sandoe  <iain@sandoe.co.uk>

	* gcc.target/powerpc/stabs-attrib-vect-darwin.c: Require stabs
	support.

From-SVN: r273470
2019-07-13 21:21:43 +00:00
Jan Hubicka
e2bc581fca tree-ssa-alias.c (component_ref_to_zero_sized_trailing_array_p): Break out from ...
* tree-ssa-alias.c (component_ref_to_zero_sized_trailing_array_p):
	Break out from ...
	(aliasing_component_refs_walk): Break out from ...
	(aliasing_component_refs_p): ... here.

From-SVN: r273469
2019-07-13 18:46:40 +00:00
Segher Boessenkool
5c695c29de rs6000: Shut up -Wformat-diag somewhat
We currently get lot of build warnings like
/home/segher/src/gcc/gcc/config/rs6000/rs6000-c.c:7039:12: warning: misspelled term 'builtin function' in format; use 'built-in function' instead [-Wformat-diag]
 7039 |    error ("builtin function %qs not supported in this compiler "
      |            ^~~~~~~~~~~~~~~~

That would print something like
  builtin function '__builtin_example' not supported in this compiler

Changing that to "built-in" as suggested only makes this worse.
Instead, let's just remove the whole "builtin function" phrase.


	PR target/91148
	* config/rs6000/rs6000.c (rs6000_invalid_builtin): Remove superfluous
	"builtin function" phrasing.

gcc/testsuite/
	* gcc.target/powerpc/bfp/scalar-cmp-exp-eq-2.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-cmp-exp-gt-2.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-cmp-exp-lt-2.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-cmp-exp-unordered-2.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-extract-exp-1.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-extract-exp-2.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-extract-exp-4.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-extract-sig-1.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-extract-sig-2.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-extract-sig-4.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-insert-exp-1.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-insert-exp-10.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-insert-exp-2.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-insert-exp-4.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-insert-exp-5.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-insert-exp-7.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-insert-exp-8.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-test-data-class-11.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-test-data-class-6.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-test-data-class-7.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-test-neg-2.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-test-neg-3.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-test-neg-5.c: Adjust.
	* gcc.target/powerpc/bfp/vec-extract-exp-2.c: Adjust.
	* gcc.target/powerpc/bfp/vec-extract-exp-3.c: Adjust.
	* gcc.target/powerpc/bfp/vec-extract-sig-2.c: Adjust.
	* gcc.target/powerpc/bfp/vec-extract-sig-3.c: Adjust.
	* gcc.target/powerpc/bfp/vec-insert-exp-2.c: Adjust.
	* gcc.target/powerpc/bfp/vec-insert-exp-3.c: Adjust.
	* gcc.target/powerpc/bfp/vec-insert-exp-6.c: Adjust.
	* gcc.target/powerpc/bfp/vec-insert-exp-7.c: Adjust.
	* gcc.target/powerpc/bfp/vec-test-data-class-2.c: Adjust.
	* gcc.target/powerpc/bfp/vec-test-data-class-3.c: Adjust.
	* gcc.target/powerpc/byte-in-either-range-1.c: Adjust.
	* gcc.target/powerpc/byte-in-range-1.c: Adjust.
	* gcc.target/powerpc/byte-in-set-1.c: Adjust.
	* gcc.target/powerpc/byte-in-set-2.c: Adjust.
	* gcc.target/powerpc/cmpb-3.c: Adjust.
	* gcc.target/powerpc/crypto-builtin-2.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-1.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-11.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-16.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-21.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-26.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-31.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-36.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-41.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-46.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-51.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-56.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-6.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-61.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-66.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-71.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-76.c: Adjust.
	* gcc.target/powerpc/vsu/vec-all-nez-7.c: Adjust.
	* gcc.target/powerpc/vsu/vec-any-eqz-7.c: Adjust.
	* gcc.target/powerpc/vsu/vec-cmpnez-7.c: Adjust.
	* gcc.target/powerpc/vsu/vec-cntlz-lsbb-2.c: Adjust.
	* gcc.target/powerpc/vsu/vec-cnttz-lsbb-2.c: Adjust.
	* gcc.target/powerpc/vsu/vec-xl-len-12.c: Adjust.
	* gcc.target/powerpc/vsu/vec-xl-len-13.c: Adjust.
	* gcc.target/powerpc/vsu/vec-xlx-7.c: Adjust.
	* gcc.target/powerpc/vsu/vec-xrx-7.c: Adjust.
	* gcc.target/powerpc/vsu/vec-xst-len-12.c: Adjust.
	* gcc.target/powerpc/vsu/vec-xst-len-13.c: Adjust.

From-SVN: r273468
2019-07-13 17:57:21 +02:00
Andreas Schwab
544a74f051 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
From-SVN: r273467
2019-07-13 12:03:29 +00:00
Prathamesh Kulkarni
f2b29269c4 re PR target/90723 (pr88598-2.c segfaults with -msve-vector-bits=256)
2019-07-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

	PR target/90723
	* recog.h (temporary_volatile_ok): New class.
	* config/aarch64/aarch64.c (aarch64_emit_sve_pred_move): Set
	volatile_ok temporarily to true using temporary_volatile_ok.
	* expr.c (emit_block_move_via_cpymem): Likewise.
	* optabs.c (maybe_legitimize_operand): Likewise.

From-SVN: r273466
2019-07-13 08:28:33 +00:00
Jakub Jelinek
1a888209de re PR c/91149 (GCC 9 and later incorrectly rejects OpenMP task reduction-modifier on target parallel combined construct)
PR c/91149
	* c-omp.c (c_omp_split_clauses): Fix a pasto in
	OMP_CLAUSE_REDUCTION_TASK handling.

	* c-c++-common/gomp/reduction-task-3.c: New test.

From-SVN: r273465
2019-07-13 08:29:46 +02:00
Jakub Jelinek
704686049d gimplify.c (struct gimplify_omp_ctx): Add order_concurrent member.
* gimplify.c (struct gimplify_omp_ctx): Add order_concurrent member.
	(omp_notice_threadprivate_variable): Diagnose threadprivate variable
	uses inside of order(concurrent) constructs.
	(gimplify_scan_omp_clauses): Set ctx->order_concurrent if
	OMP_CLAUSE_ORDER is seen.
	* omp-low.c (struct omp_context): Add order_concurrent member.
	(scan_sharing_clauses): Set ctx->order_concurrent if
	OMP_CLAUSE_ORDER is seen.
	(check_omp_nesting_restrictions): Diagnose ordered or atomic inside
	of simd order(concurrent).  Diagnose constructs not allowed inside of
	for order(concurrent).
	(setjmp_or_longjmp_p): Add a context and TREE_PUBLIC check to avoid
	complaining about static double setjmp (double); or class static
	methods or non-global namespace setjmps.
	(omp_runtime_api_call): New function.
	(scan_omp_1_stmt): Diagnose OpenMP runtime API calls inside of
	order(concurrent) loops.

	* c-c++-common/gomp/order-3.c: New test.
	* c-c++-common/gomp/order-4.c: New test.

From-SVN: r273464
2019-07-13 08:25:04 +02:00
GCC Administrator
bf85a0385f Daily bump.
From-SVN: r273463
2019-07-13 00:16:24 +00:00
Bill Seurer
d64c6837a7 [PATCH] Fix typo in test case.
The test case has a typo in the big endian section that reversed two digits.

Fix committed as obvious.


2019-07-12  Bill Seurer  <seurer@linux.vnet.ibm.com>

	* gcc.dg/tree-ssa/vector-7.c: Fix typo.

From-SVN: r273459
2019-07-12 21:57:07 +00:00
Iain Sandoe
61fba2674f [Darwin, testsuite] Remove unused test.
During GCC-9, the codegen for unreachable switch case statements changed
such that the (undefined) behaviour of reaching such statements is directed
to one of the existing switch cases.  This means that the testcase which
deals with the old behaviour can no longer work (and there is nothing to test
with it).  The [Darwin-specific] test is now redundant and can be removed.

gcc/testsuite/

2019-07-12  Iain Sandoe  <iain@sandoe.co.uk>

	* gcc.dg/pr57438-2.c: Remove.

From-SVN: r273457
2019-07-12 18:38:33 +00:00
Martin Sebor
5dd47cb75d invoke.texi (ssa-name-def-chain-limit): Document new --param.
gcc/ChangeLog:

	* doc/invoke.texi (ssa-name-def-chain-limit): Document new --param.
	* params.def (PARAM_SSA_NAME_DEF_CHAIN_LIMIT): Add new --param.
	* tree-vrp.c (vrp_prop::check_mem_ref): Use
	PARAM_SSA_NAME_DEF_CHAIN_LIMIT.

gcc/testsuite/ChangeLog:

	* gcc.dg/Warray-bounds-43.c: New test.

From-SVN: r273454
2019-07-12 11:36:45 -06:00
Jan Hubicka
d132c59b10 tree-ssa-alias.c (same_tmr_indexing_p): Break out from ...
* tree-ssa-alias.c (same_tmr_indexing_p): Break out from ...
	(indirect_refs_may_alias_p): ... here.
	(nonoverlapping_component_refs_since_match_p): Support also non-trivial
	mem refs in the access paths.

	* gcc.dg/tree-ssa/alias-access-path-9.c: New testcase.

From-SVN: r273451
2019-07-12 16:56:57 +00:00
Jiangning Liu
b9ef6a2e04 re PR tree-optimization/89430 (A missing ifcvt optimization to generate csel)
2019-07-12  Jiangning Liu  <jiangning.liu@amperecomputing.com>

	PR tree-optimization/89430
	* tree-ssa-phiopt.c (cond_store_replacement): Support conditional
	store elimination for local variable without address escape.

	PR tree-optimization/89430
	* gcc.dg/tree-ssa/pr89430-1.c: New test.
	* gcc.dg/tree-ssa/pr89430-2.c: New test.
	* gcc.dg/tree-ssa/pr89430-3.c: New test.
	* gcc.dg/tree-ssa/pr89430-4.c: New test.
	* gcc.dg/tree-ssa/pr89430-5.c: New test.
	* gcc.dg/tree-ssa/pr89430-6.c: New test.

From-SVN: r273449
2019-07-12 10:28:43 -06:00
Jonathan Wakely
b979ca0ffd Fix inaccurate comment in new test
* testsuite/29_atomics/atomic_float/1.cc: Fix comment.

From-SVN: r273448
2019-07-12 16:45:16 +01:00
Jeff Law
c3a7a7b8ab c6x.c (c6x_section_type): Clear SECTION_NOTYPE for the ".far" section.
* config/c6x/c6x.c (c6x_section_type): Clear SECTION_NOTYPE
	for the ".far" section.

From-SVN: r273447
2019-07-12 09:40:39 -06:00
Richard Biener
cf91b5997d re PR tree-optimization/91145 (ICE: in vect_build_slp_tree_2, at tree-vect-slp.c:1143 with -march=skylake-avx512 -O3)
2019-07-12  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/91145
	* tree-vect-slp.c (vect_build_slp_tree_2): Fix reduction
	chain check.

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

From-SVN: r273445
2019-07-12 14:36:50 +00:00
Alexandre Oliva
b847405ade allow EH to escape from GIMPLE_EH_ELSE ELSE block
The only preexisting use of GIMPLE_EH_ELSE, for transactional memory
commits, did not allow exceptions to escape from the ELSE path.  The
trick it uses to allow the ELSE path to see the propagating exception
does not work very well if the exception cleanup raises further
exceptions: the ELSE block is configured to handle exceptions in
itself.  This confuses the heck out of CFG and EH cleanups.

Basing the lowering context for the ELSE block on outer_state, rather
than this_state, gets us the expected enclosing handler.


for  gcc/ChangeLog

	* tree-eh.c (honor_protect_cleanup_actions): Use outer_
	rather than this_state as the lowering context for the ELSE
	seq in a GIMPLE_EH_ELSE.

for  gcc/testsuite/ChangeLog

	* gcc.dg/gimplefe-44.c: New.

From-SVN: r273444
2019-07-12 13:51:00 +00:00
Alexandre Oliva
fdc1f34302 introduce try/finally/else in gimplefe
for  gcc/c/ChangeLog

	* gimple-parser.c (c_parser_gimple_try_stmt): New.
	(c_parser_compound_statement): Call it.

for  gcc/testsuite/ChangeLog

	* gcc.dg/gimplefe-43.c: New.

From-SVN: r273443
2019-07-12 13:50:49 +00:00
Jonathan Wakely
0d67cd380d Define __type_identity_t alias and use for string_view
This defines the equivalent of C++2a's std::type_identity_t alias but
for use in C++11 and later. This can be used to replace __detail::__idt
in the string_view headers, which previously used common_type_t because
the one argument specialization of common_type_t was simply the identity
transform (which is no longer true).

	* include/experimental/string_view (__detail::__idt): Remove.
	(operator==, operator!=, operator<, operator>, operator<=, operator>=):
	Use __type_identity_t instead of __detail::__idt;
	* include/std/string_view (__detail::__idt): Remove.
	(operator==, operator!=, operator<, operator>, operator<=, operator>=):
	Use __type_identity_t instead of __detail::__idt;
	* include/std/type_traits (__type_identity_t): New alias template.

From-SVN: r273442
2019-07-12 12:43:22 +01:00
Jonathan Wakely
804e2d0631 Update C++2a library status table
* doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
	and floating point atomics.

From-SVN: r273441
2019-07-12 12:43:17 +01:00
Richard Sandiford
72ab1c51b6 Relax vector_builder::elt sanity check
I'd made it a precondition of vector_builder::elt that the encoding
must have been fully populated and that all implicit elements are
therefore defined.  But for one of the AArch64 patches I'm working on,
it'd be convenient to be able to look back at previous elements while
building up the encoding.  This patch therefore makes the assert
specific to implicit elements only.

2019-07-12  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* vector-builder.h (vector_builder::elt): Allow already-supplied
	elements to be read back before building is complete.

From-SVN: r273440
2019-07-12 10:33:52 +00:00
Eric Botcazou
49dbd6a032 re PR rtl-optimization/91136 (incorrect move of instruction to delay slot causes application crash in exception handling)
PR rtl-optimization/91136
	* df-core.c (ACCESSING REFS): Fix typos in comment.
	* resource.c (mark_target_live_reg): Add artificial defs that occur at
	the beginning of the block to the initial set of live registers.

From-SVN: r273436
2019-07-12 10:15:39 +00:00
Richard Biener
831e688af5 fold-const.h (get_array_ctor_element_at_index): Adjust.
2019-07-12  Richard Biener  <rguenther@suse.de>

	* fold-const.h (get_array_ctor_element_at_index): Adjust.
	* fold-const.c (get_array_ctor_element_at_index): Add
	ctor_idx output parameter informing the caller where in
	the constructor the element was (not) found.  Add early exit
	for when the ctor is sorted.
	* gimple-fold.c (fold_array_ctor_reference): Support constant
	folding across multiple array elements.

	* gcc.dg/tree-ssa/vector-7.c: New testcase.

From-SVN: r273435
2019-07-12 10:03:10 +00:00
Eric Botcazou
e067f9924b cfgexpand.c (expand_gimple_stmt_1): If the statement doesn't have location...
* cfgexpand.c (expand_gimple_stmt_1) <GIMPLE_RETURN>: If the statement
	doesn't have location, set the current location to the function's end

From-SVN: r273434
2019-07-12 09:35:21 +00:00
Richard Sandiford
e7ba492a04 [arch64] Fix ambiguous .md attribute uses
This patch is part of a series that fixes ambiguous attribute
uses in .md files, i.e. cases in which attributes didn't use
<ITER:ATTR> to specify an iterator, and in which <ATTR> could
have different values depending on the iterator chosen.

No behavioural change except for dropping the unused SVE
divide permutations.

2019-07-12  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* config/aarch64/aarch64.md (*compare_condjump<mode>)
	(loadwb_pair<GPI:mode>_<P:mode>, loadwb_pair<GPF:mode>_<P:mode>)
	(storewb_pair<GPI:mode>_<P:mode>, storewb_pair<GPF:mode>_<P:mode>)
	(*ands<mode>_compare0): Fix ambiguous uses of .md attributes.
	* config/aarch64/aarch64-simd.md
	(*aarch64_get_lane_extend<GPI:mode><VDQQH:mode>): Likewise.
	(*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): Likewise.
	* config/aarch64/aarch64-sve.md
	(while_ult<GPI:mode><PRED_ALL:mode>): Likewise.
	(*cond_<optab><mode>_any): Fix SVE_I/SVE_SDI typo.

From-SVN: r273433
2019-07-12 08:14:34 +00:00