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 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-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
* 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
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
* 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
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
* 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
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
* 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
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
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
* 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 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
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
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
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
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 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
* 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
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
This patch extends the support for "@..." pattern names so that
the patterns can have different numbers of operands. This allows
things like binary and ternary operations to be handled in a
consistent way, a bit like optabs. The generators assert that
the number of operands passed is correct for the underlying
instruction.
Also, replace_operands_with_dups iterated over the old rtx format
even after having decided to do a replacement, which broke with
match_operator.
2019-07-12 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* doc/md.texi: Document that @ patterns can have different
numbers of operands.
* genemit.c (handle_overloaded_gen): Handle this case.
* genopinit.c (handle_overloaded_gen): Likewise.
* gensupport.c (replace_operands_with_dups): Iterate over
the new rtx's format rather than the old one's.
From-SVN: r273432
placed closely next.
2019-07-12 Kewen Lin <linkw@gcc.gnu.org>
* gcc/cfgrtl.c (print_rtl_with_bb): Emit a hint if the
fallthrough target of current basic block isn't the placed
right next.
From-SVN: r273430
The type hash and equality functions are generated after the
order_evaluations pass. They may contain shortcut operators and
Set_and_use_temporary_expressions (e.g. from lowering a
Binary_exprssion) that need to be ordered. Run order_evaluations
and remove_shortcuts on these functions. (The hash functions
may be fine, but to be on the safe side we run on them anyway.
We do need to run on the equality functions.)
A Set_and_use_temporary_expression is effectively an assignment,
so it needs to be ordered. Otherwise if we insert a temporary
statement before it, we may get wrong evaluation order.
A test case is CL 185818.
Fixesgolang/go#33062.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/185817
From-SVN: r273425
This adds the new atomic types from C++2a, as proposed by P0019 and
P0020. To reduce duplication the calls to the compiler's atomic
built-ins are wrapped in new functions in the __atomic_impl namespace.
These functions are currently only used by std::atomic<floating-point>
and std::atomic_ref but could also be used for all other specializations
of std::atomic.
* include/bits/atomic_base.h (__atomic_impl): New namespace for
wrappers around atomic built-ins.
(__atomic_float, __atomic_ref): New class templates for use as base
classes.
* include/std/atomic (atomic<float>, atomic<double>)
(atomic<long double>): New explicit specializations.
(atomic_ref): New class template.
(__cpp_lib_atomic_ref): Define.
* include/std/version (__cpp_lib_atomic_ref): Define.
* testsuite/29_atomics/atomic/60695.cc: Adjust dg-error.
* testsuite/29_atomics/atomic_float/1.cc: New test.
* testsuite/29_atomics/atomic_float/requirements.cc: New test.
* testsuite/29_atomics/atomic_ref/deduction.cc: New test.
* testsuite/29_atomics/atomic_ref/float.cc: New test.
* testsuite/29_atomics/atomic_ref/generic.cc: New test.
* testsuite/29_atomics/atomic_ref/integral.cc: New test.
* testsuite/29_atomics/atomic_ref/pointer.cc: New test.
* testsuite/29_atomics/atomic_ref/requirements.cc: New test.
From-SVN: r273420
This patch recognises Modula-2 as language for the traceback table,
fixing the problem shown in
https://gcc.gnu.org/ml/gcc-patches/2019-07/msg00848.html .
* config/rs6000/rs6000-logue.c (rs6000_output_function_epilogue):
Handle Modula-2.
From-SVN: r273411