The D2 testsuite script has been updated to handle EXTRA_SOURCES and
EXTRA_FILES settings being split across multiple lines, which is how
they appear in upstream.
Reviewed-on: https://github.com/dlang/dmd/pull/9517
gcc/testsuite/ChangeLog:
2019-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
* gdc.test/gdc-test.exp (gdc-copy-extra): Append copied files to
cleanup_extra_files.
(dmd2dg): Copy additional files after test is processed.
(gdc-do-test): Remove all copied files after test.
From-SVN: r270038
2019-03-30 Paul Thomas <pault@gcc.gnu.org>
PR fortran/89841
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Use the formal
argument attributes rather than those of the actual argument.
PR fortran/89842
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Call
'set_dtype_for_unallocated' for any type of arrayspec.
2019-03-30 Paul Thomas <pault@gcc.gnu.org>
PR fortran/89841
* gfortran.dg/ISO_Fortran_binding_1.f90: Change the interfaces
for c_deallocate, c_allocate and c_assumed_size so that the
attributes of the array arguments are correct and are typed.
* gfortran.dg/ISO_Fortran_binding_7.f90: New test.
* gfortran.dg/ISO_Fortran_binding_7.c: Additional source.
PR fortran/89842
* gfortran.dg/ISO_Fortran_binding_8.f90: New test.
* gfortran.dg/ISO_Fortran_binding_8.c: Additional source.
From-SVN: r270037
My fix five years ago for PR 60241 was incomplete: when we reassign implicit
instances of a partial instantiation of a member template to the explicit
specialization of that partial instantiation, we also need to adjust the
CLASSTYPE_TI_ARGS to match what we'd get when looking up that instance after
the explicit specialization. We also need to do this when we later look up
the instance in a way that only finds the explicit specialization halfway
through lookup_template_class_1.
* pt.c (lookup_template_class_1): If the partial instantiation is
explicitly specialized, adjust.
(maybe_process_partial_specialization): Also adjust
CLASSTYPE_TI_ARGS.
From-SVN: r270036
2019-03-29 Kugan Vivekanandarajah <kuganv@linaro.org>
Eric Botcazou <ebotcazou@adacore.com>
PR rtl-optimization/89862
* rtl.h (word_register_operation_p): Exclude CONST_INT from operations
that operates on the full registers for WORD_REGISTER_OPERATIONS
architectures.
Co-Authored-By: Eric Botcazou <ebotcazou@adacore.com>
From-SVN: r270030
This was accidentally broken by the patch adding ELF attribute support.
The __riscv_compressed predefined macro is not being defined when the
target supports the C extension. The fix adds testcases to verify that
all of the predefined macros are correct for various option combinations.
gcc/
* common/config/riscv/riscv-common.c (riscv_parse_arch_string):
Clear MASK_RVC and then set if C subset supported.
gcc/testsuite/
* gcc.target/riscv/predef-1.c: New.
* gcc.target/riscv/predef-2.c: New.
* gcc.target/riscv/predef-3.c: New.
* gcc.target/riscv/predef-4.c: New.
* gcc.target/riscv/predef-5.c: New.
* gcc.target/riscv/predef-6.c: New.
* gcc.target/riscv/predef-7.c: New.
* gcc.target/riscv/predef-8.c: New.
From-SVN: r270026
PR rtl-optimization/89865
* gcc.target/i386/pr49095.c: Include in scan-assembler-times patterns
the first argument register, so that occassional spills/fills are
ignored.
From-SVN: r270025
PR sanitizer/89869
* typeck.c: Include gimplify.h.
(cp_build_modify_expr) <case COND_EXPR>: Unshare rhs before using it
for second time. Formatting fixes.
* g++.dg/ubsan/vptr-14.C: New test.
From-SVN: r270024
PR c/89872
* gimplify.c (gimplify_compound_literal_expr): Don't optimize a
non-addressable complit into its initializer if it is volatile.
* gcc.dg/tree-ssa/pr89872.c: New test.
From-SVN: r270023
2019-03-29 Martin Liska <mliska@suse.cz>
* dbgcnt.c (dbg_cnt_process_single_pair): Fix GNU coding style.
(dbg_cnt_process_opt): Parse first tokens aas
dbg_cnt_process_single_pair is also using strtok.
From-SVN: r270014
PR rtl-optimization/87485
* function.c (expand_function_end): Move stack_protect_epilogue
before loading of return value into hard register(s).
* gcc.dg/pr87485.c: New test.
From-SVN: r270013
PR middle-end/89621
* tree-inline.h (struct copy_body_data): Add
dont_remap_vla_if_no_change flag.
* tree-inline.c (remap_type_3, remap_type_2): New functions.
(remap_type): Don't remap vla types if id->dont_remap_vla_if_no_change
and remap_type_2 returns false.
* omp-low.c (new_omp_context): Set ctx->cb.dont_remap_vla_if_no_change.
Move ctx->cb.adjust_array_error_bounds setting to the outermost ctx
only from where it is copied to nested contexts.
* gfortran.dg/gomp/pr89621.f90: New test.
From-SVN: r270009
PR c++/66548 - Invalid class member access expression in decltype sometimes
accepted
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/decltype-pr66548.C: New test.
From-SVN: r270007
* pt.c (maybe_instantiate_noexcept): For function templates, use their
template result (function decl). Don't set up local specializations.
Temporarily turn on processing_template_decl. Update the template type
too.
* g++.dg/cpp0x/noexcept38.C: New test.
* g++.dg/cpp0x/noexcept39.C: New test.
* g++.dg/cpp1z/noexcept-type21.C: New test.
From-SVN: r270005
PR target/89848
* config/i386/i386.c (dimode_scalar_chain::make_vector_copies):
Also process XEXP (src, 0) of a shift insn.
testsuite/ChangeLog:
PR target/89848
* gcc.target/i386/pr89848.c: New test.
From-SVN: r270003
PR c++/89785
* constexpr.c (struct check_for_return_continue_data): New type.
(check_for_return_continue): New function.
(potential_constant_expression_1) <case SWITCH_STMT>: Walk
SWITCH_STMT_BODY to find RETURN_EXPRs or CONTINUE_STMTs not nested
in loop bodies and set *jump_target to that if found.
* g++.dg/cpp1y/constexpr-89785-1.C: New test.
* g++.dg/cpp1y/constexpr-89785-2.C: New test.
From-SVN: r269995
optrecord_json_writer::optinfo_to_json can in theory be called from any
optimization pass, but currently uses get_fnname_from_decl, which
is RTL-specific.
In that PR, Jakub suggested using either DECL_ASSEMBLER_NAME or the
"printable name" (via current_function_name).
This patch makes it use DECL_ASSEMBLER_NAME.
gcc/ChangeLog:
PR middle-end/89725
* optinfo-emit-json.cc (optrecord_json_writer::optinfo_to_json):
Use DECL_ASSEMBLER_NAME rather than get_fnname_from_decl.
From-SVN: r269994
* regcprop.c (copyprop_hardreg_forward_1): Remove redundant INSN_P
test.
(cprop_hardreg_bb, cprop_hardreg_debug): New functions.
(pass_cprop_hardreg::execute): Use those. Don't repeat bb processing
immediately after first one with df_analyze in between, but rather
process all bbs, queueing ones that need second pass in a worklist,
df_analyze, process queued debug insn changes and if second pass is
needed, process bbs from worklist, df_analyze, process queued debug
insns again.
From-SVN: r269992
* rtl.h (NONDEBUG_INSN_P): Define as NONJUMP_INSN_P or JUMP_P
or CALL_P instead of INSN_P && !DEBUG_INSN_P.
(INSN_P): Define using NONDEBUG_INSN_P or DEBUG_INSN_P.
From-SVN: r269991
The declaration of create_nested_ptr_option in the header has the 'from'
and 'to' parameters in the opposite order from the definition in
gengtype.c:
/* Return an options structure for a "nested_ptr" option. */
options_p
create_nested_ptr_option (options_p next, type_p t,
const char *to, const char *from)
and the only caller in gengtype-parse.c:
return create_nested_ptr_option (prev, ty, to, from);
This patch swaps the parameter names in the declaration.
PR c/79022
* gengtype.h (create_nested_ptr_option): Fix parameter names to match
definition.
From-SVN: r269990
PR target/85667
* config/i386/i386.c (ix86_function_value_1): Call the newly added
function for 32-bit MS_ABI.
(function_value_ms_32): New function.
testsuite/ChangeLog:
PR target/85667
* gcc.target/i386/pr85667-5.c: New testcase.
* gcc.target/i386/pr85667-6.c: New testcase.
From-SVN: r269979
Since the fix for 15272 we were remembering the wrong function to use at
instantiation time, because the type of the SCOPE_REF didn't reflect the
cv-quals of 'this'. Conveniently, we can fix this by simplifying the code.
* semantics.c (finish_non_static_data_member): Use object cv-quals
in scoped case, too.
From-SVN: r269977
We were getting confused by a lambda in template definition context that
isn't actually in the scope of any templated entity. Fixed by telling
type_dependent_expression_p that such a lambda is type-dependent even if we
can't tell that from its closure type. I've also restored the error for
defining a non-lambda class in a default template argument, and for a lambda
befor C++20.
* parser.c (cp_parser_lambda_expression): Also reject a lambda in a
template parameter list before C++20.
* pt.c (type_dependent_expression_p): True for LAMBDA_EXPR.
* semantics.c (begin_class_definition): Restore error about defining
non-lambda class in template parm list.
From-SVN: r269972
2019-03-27 Andrew Stubbs <ams@codesourcery.com>
gcc/
* config/gcn/gcn.md (CC_SAVE_REG): New constant.
(movdi): Call gen_movdi_symbol_save_scc.
(gen_movdi_symbol_save_scc): New insn and split.
From-SVN: r269970
gcc/
PR rtl-optimization/89313
* function.c (matching_constraint_num): New static function.
(match_asm_constraints_1): Use it. Fixup white space and comment.
Don't replace inputs with non-matching constraints which conflict
with early clobber outputs.
gcc/testsuite/
PR rtl-optimization/89313
* gcc.dg/pr89313.c: New test.
From-SVN: r269969
PR rtl-optimization/87761
PR rtl-optimization/89826
* regcprop.c (copyprop_hardreg_forward_1): Move may_trap_p test
slightly later.
(pass_cprop_hardreg::execute): Call df_analyze after adding the
note problem to get REG_DEAD/REG_UNUSED notes updated.
PR rtl-optimization/87761
PR rtl-optimization/89826
* gcc.c-torture/execute/pr89826.c: New test.
From-SVN: r269967
The issue here was that when processing the explicit template args in
fn_type_unification we added an empty argument pack for the parameter pack,
so we never tried to do any deduction for it, and therefore never looked at
its type. We need that empty pack behavior for partial ordering, but we
don't want it here, so let's make it conditional on tf_partial.
* pt.c (coerce_template_parms): Don't add an empty pack if
tf_partial.
(fn_type_unification): Pass tf_partial to coerce_template_parms.
From-SVN: r269965
2019-03-27 Paul Thomas <pault@gcc.gnu.org>
PR fortran/88247
* expr.c (is_subref_array): Permit substrings to be detected
as subref arrays.
* trans-array.c (get_array_ctor_var_strlen): Obtain the length
of deferred length strings. Handle substrings with a NULL end
expression.
(trans_array_constructor): Remove an unnecessary blank line.
(gfc_conv_scalarized_array_ref): Skip to label 'done' if 'decl'
is a pointer array.
(get_array_charlen): If the expression is an array, convert the
first element of the constructor and use its string length. Get
a new charlen if necessary.
(gfc_conv_expr_descriptor): Call 'get_array_charlen' for array
constructor expressions. If the ss_info string length is
available, use that to set the span of character arrays.
* trans-expr.c (gfc_get_expr_charlen): Handle substrings
* trans-stmt.c (trans_associate_var): Set the pointer array
flag for variable targets and constant array constructors. Take
care not to reset the string length or the span in the case of
expressions that are not converted as direct by reference.
2019-03-27 Paul Thomas <pault@gcc.gnu.org>
PR fortran/88247
* gfortran.dg/associate_47.f90: New test.
From-SVN: r269962
2019-03-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/89463
* tree-ssa-dce.c (remove_dead_stmt): Take output vector to
queue edges to remove.
(eliminate_unnecessary_stmts): Remove dead PHIs alongside
dead stmts. Delay edge removal until PHIs are removed to
make debug-stmt creation not confused by seemingly degenerate
PHIs.
* gcc.dg/guality/pr89463.c: New testcase.
From-SVN: r269961