Commit Graph

167700 Commits

Author SHA1 Message Date
Richard Biener baa09dc5c9 c-tree.h (enum c_declspec_il): New.
2019-03-14  Richard Biener  <rguenther@suse.de>

	c/
	* c-tree.h (enum c_declspec_il): New.
	(struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
	enum bitfield.
	* c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
	Pass start pass and declspec_il to c_parser_parse_gimple_body.
	(c_parser_declspecs): Adjust.
	* gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
	gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
	and bitmap.h.
	(struct gimple_parser): New.
	(gimple_parser::push_edge): New method.
	(c_parser_gimple_parse_bb_spec): New helper.
	(c_parser_parse_gimple_body): Get start pass and IL specification.
	Initialize SSA and CFG.
	(c_parser_gimple_compound_statement): Handle CFG and SSA build.
	Build a gimple_parser parsing state and pass it along.
	(c_parser_gimple_statement): Change intermittend __PHI internal
	function argument for the edge.
	(c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
	(c_parser_gimple_goto_stmt): Record edges to build.
	(c_parser_gimple_if_stmt): Likewise.
	* gimple-parser.h (c_parser_parse_gimple_body): Adjust.
	(c_parser_gimple_or_rtl_pass_list): Likewise.

	* gimple-pretty-print.c: Include cfgloop.h.
	(dump_gimple_phi): Adjust.
	(dump_gimple_bb_header): Dump loop header for GIMPLE.
	(pp_cfg_jump): Adjust.
	(dump_implicit_edges): Dump fallthru to next block for GIMPLE as well.
	* tree-cfg.c (build_gimple_cfg): Remove lower_phi_internal_fn call.
	(lower_phi_internal_fn): Remove.
	(verify_gimple_call): Remove IFN_PHI special-casing.
	(dump_function_to_file): Dump IL state.
	* tree-into-ssa.c (rewrite_add_phi_arguments): Revert changes
	done to deal with PHI nodes being present in non-SSA state.

	* gcc.dg/gimplefe-13.c: Adjust.
	* gcc.dg/gimplefe-14.c: Likewise.
	* gcc.dg/gimplefe-17.c: Likewise.
	* gcc.dg/gimplefe-18.c: Likewise.
	* gcc.dg/gimplefe-7.c: Likewise.
	* gcc.dg/torture/pr89595.c: Likewise.
	* gcc.dg/tree-ssa/cunroll-13.c: Likewise.
	* gcc.dg/tree-ssa/ivopt_mult_1g.c: Likewise.
	* gcc.dg/tree-ssa/ivopt_mult_2g.c: Likewise.
	* gcc.dg/tree-ssa/scev-3.c: Likewise.
	* gcc.dg/tree-ssa/scev-4.c: Likewise.
	* gcc.dg/tree-ssa/scev-5.c: Likewise.
	* gcc.dg/vect/vect-cond-arith-2.c: Likewise.
	* gcc.target/aarch64/sve/loop_add_6.c: Likewise.

From-SVN: r269682
2019-03-14 13:25:27 +00:00
Jakub Jelinek 27814aed34 re PR ipa/89684 (ICE in gsi_for_stmt, at gimple-iterator.c:613)
PR ipa/89684
	* multiple_target.c (create_dispatcher_calls): Change
	references_to_redirect from vector of ipa_ref * to vector of ipa_ref.
	In the node->iterate_referring loop, push *ref rather than ref, call
	ref->remove_reference () and always pass 0 to iterate_referring.

	* gcc.target/i386/pr89684.c: New test.

From-SVN: r269681
2019-03-14 14:05:34 +01:00
Jakub Jelinek 87654f1813 re PR rtl-optimization/89679 (wrong code with -Og -frerun-cse-after-loop -fno-tree-fre)
PR rtl-optimization/89679
	* expmed.c (expand_mult_const): Don't add a REG_EQUAL note if it
	would contain a paradoxical SUBREG.

	* gcc.dg/pr89679.c: New test.

From-SVN: r269680
2019-03-14 13:21:36 +01:00
Richard Biener df6d3ac9aa re PR tree-optimization/89710 (ICE in dyn_cast<gcond*, gimple>(gimple*) / should_duplicate_loop_header_p)
2019-03-14  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/89710
	* tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Use
	safe_dyn_cast.

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

From-SVN: r269679
2019-03-14 11:07:41 +00:00
Martin Liska b815471796 GCOV: print {start,end}_column in JSON file and gcov-dump tool.
2019-03-14  Martin Liska  <mliska@suse.cz>

	* coverage.c (coverage_begin_function): Stream also
	end_column.
	* doc/gcov.texi: Document 2 new fields in JSON file.  Improve
	documentation about function declaration location.
	* gcov-dump.c (tag_function): Print whole range
	of function declaration.
	* gcov.c (struct function_info): Add end_column field.
	(function_info::function_info): Initialize it.
	(output_json_intermediate_file): Output {start,end}_column
	fields.
	(read_graph_file): Read end_column.

From-SVN: r269678
2019-03-14 09:33:54 +00:00
Richard Biener ea9d9d749c re PR c++/89698 (Run-time error due to optimization of field access after cast at -Os/-O2 and higher)
2019-03-14  Richard Biener  <rguenther@suse.de>

	PR middle-end/89698
	* fold-const.c (operand_equal_p): For INDIRECT_REF check
	that the access types are similar.

	* g++.dg/torture/pr89698.C: New testcase.

From-SVN: r269677
2019-03-14 09:24:21 +00:00
Jakub Jelinek f54e63dfa3 re PR tree-optimization/89703 (ICE in compare_values_warnv, at tree-vrp.c:997)
PR tree-optimization/89703
	* tree-ssa-strlen.c (valid_builtin_call): Punt if stmt call types
	aren't compatible also with builtin_decl_explicit.  Check pure
	or non-pure status of BUILT_IN_STR{{,N}CMP,N{LEN,{CAT,CPY}{,_CHK}}}
	and BUILT_IN_STPNCPY{,_CHK}.

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

From-SVN: r269674
2019-03-14 09:56:47 +01:00
H.J. Lu fb055f4b74 x32: Add addr32 prefix to VSIB address
32-bit indices in VSIB address are sign-extended to 64 bits.  In x32,
when 32-bit indices are used as addresses, like in

vgatherdps %ymm7, 0(,%ymm9,1), %ymm6

32-bit indices, 0xf7fa3010, is sign-extended to 0xfffffffff7fa3010 which
is invalid address.  Add addr32 prefix to UNSPEC_VSIBADDR instructions
for x32 if there is no base register nor symbol.

This fixes 175.vpr and 254.gap in SPEC CPU 2000 on x32 with

-Ofast -funroll-loops -march=haswell

gcc/

	PR target/89523
	* config/i386/i386.c (ix86_print_operand): Handle 'M' to add
	addr32 prefix to VSIB address for X32.
	* config/i386/sse.md (*avx512pf_gatherpf<mode>sf_mask): Prepend
	"%M2" to opcode.
	(*avx512pf_gatherpf<mode>df_mask): Likewise.
	(*avx512pf_scatterpf<mode>sf_mask): Likewise.
	(*avx512pf_scatterpf<mode>df_mask): Likewise.
	(*avx2_gathersi<mode>): Prepend "%M3" to opcode.
	(*avx2_gathersi<mode>_2): Prepend "%M2" to opcode.
	(*avx2_gatherdi<mode>): Prepend "%M3" to opcode.
	(*avx2_gatherdi<mode>_2): Prepend "%M2" to opcode.
	(*avx2_gatherdi<mode>_3): Prepend "%M3" to opcode.
	(*avx2_gatherdi<mode>_4): Prepend "%M2" to opcode.`
	(*avx512f_gathersi<mode>): Prepend "%M4" to opcode.
	(*avx512f_gathersi<mode>_2): Prepend "%M3" to opcode.
	(*avx512f_gatherdi<mode>): Prepend "%M4" to opcode.
	(*avx512f_gatherdi<mode>_2): Prepend "%M3" to opcode.
	(*avx512f_scattersi<mode>): Prepend "%M0" to opcode.
	(*avx512f_scatterdi<mode>): Likewise.

gcc/testsuite/

	PR target/89523
	* gcc.target/i386/pr89523-1a.c: New test.
	* gcc.target/i386/pr89523-1b.c: Likewise.
	* gcc.target/i386/pr89523-2.c: Likewise.
	* gcc.target/i386/pr89523-3.c: Likewise.
	* gcc.target/i386/pr89523-4.c: Likewise.
	* gcc.target/i386/pr89523-5.c: Likewise.
	* gcc.target/i386/pr89523-6.c: Likewise.
	* gcc.target/i386/pr89523-7.c: Likewise.
	* gcc.target/i386/pr89523-8.c: Likewise.
	* gcc.target/i386/pr89523-9.c: Likewise.

From-SVN: r269673
2019-03-14 01:49:54 -07:00
Jakub Jelinek b2725ea5df re PR c++/89512 (ICE in get_expr_operands, at tree-ssa-operands.c:882)
PR c++/89512
	* semantics.c (finish_qualified_id_expr): Reject variable templates.

	* g++.dg/cpp1y/var-templ61.C: New test.

From-SVN: r269672
2019-03-14 09:14:48 +01:00
Jakub Jelinek 0ee285909b re PR c++/89652 (ICE during constexpr evaluation)
PR c++/89652
	* constexpr.c (struct constexpr_ctx): Change save_exprs type from
	hash_set<tree> to vec<tree>.
	(cxx_eval_call_expression): Adjust for save_exprs being a vec instead
	of hash_set.
	(cxx_eval_loop_expr): Likewise.  Truncate the vector after each
	removal of SAVE_EXPRs from values.
	(cxx_eval_constant_expression) <case SAVE_EXPR>: Call safe_push
	method on save_exprs instead of add.

	* g++.dg/cpp1y/constexpr-89652.C: New test.

From-SVN: r269671
2019-03-14 09:13:09 +01:00
GCC Administrator 7da0bca130 Daily bump.
From-SVN: r269670
2019-03-14 00:16:19 +00:00
Jason Merrill dcfa851886 PR c++/86521 - C++17 copy elision in initialization by constructor.
This is an overlooked case in C++17 mandatory copy elision: We want overload
resolution to reflect that initializing an object from a prvalue does not
involve a copy or move constructor even when [over.match.ctor] says that
only constructors are candidates.  Here I implement that by looking through
the copy/move constructor in joust.

	* call.c (joust_maybe_elide_copy): New.
	(joust): Call it.

From-SVN: r269667
2019-03-13 19:34:51 -04:00
Harald Anlauf edaff7c944 re PR fortran/87045 (pointer to array of character)
2019-03-13  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/87045
	* trans-expr.c (gfc_trans_pointer_assignment): Move check for same
	string length so that we do not get false errors for deferred
	length.

	PR fortran/87045
	* gfortran.dg/pr87045.f90: New test.

From-SVN: r269664
2019-03-13 21:33:27 +00:00
Vladimir Makarov 1e05d1854c re PR target/85860 (ICE: in lra_split_hard_reg_for, at lra-assigns.c:1810: unable to find a register to spill with -flive-range-shrinkage -mbmi2)
2019-03-13  Vladimir Makarov  <vmakarov@redhat.com>

	PR target/85860
	* lra-constraints.c (inherit_in_ebb): Update
	potential_reload_hard_regs along with live_hard_regs.

2019-03-13  Vladimir Makarov  <vmakarov@redhat.com>

	PR target/85860
	* gcc.target/i386/pr85860.c: New.

From-SVN: r269662
2019-03-13 20:35:18 +00:00
Jakub Jelinek 43fb4c8056 re PR debug/89498 (ICE in AT_loc_list, at dwarf2out.c:4871)
PR debug/89498
	* dwarf2out.c (size_of_die): For dw_val_class_view_list always use
	DWARF_OFFSET_SIZE.
	(value_format): For dw_val_class_view_list never use DW_FORM_loclistx.

From-SVN: r269661
2019-03-13 21:22:15 +01:00
Marek Polacek ef7e79a367 PR c++/89660 - bogus error with -Wredundant-move.
* typeck.c (maybe_warn_pessimizing_move): Only accept (T &) &arg
	as the std::move's argument.  Don't call convert_for_initialization
	when warn_redundant_move isn't on.

	* g++.dg/cpp0x/Wredundant-move8.C: New test.
	* g++.dg/cpp0x/Wredundant-move9.C: New test.

From-SVN: r269660
2019-03-13 20:04:33 +00:00
Marek Polacek 2b0a62741e PR c++/89686 - mixing init-capture and simple-capture in lambda.
* parser.c (cp_parser_lambda_introducer): Give error when combining
	init-capture and simple-capture.

	* g++.dg/cpp2a/lambda-pack-init2.C: New test.

From-SVN: r269659
2019-03-13 19:58:20 +00:00
Janus Weil 84083a711e re PR fortran/89601 ([PDT] ICE: Segmentation fault (in resolve_component))
fix PR 89601

2019-03-13  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/89601
	* decl.c (gfc_match_formal_arglist): Reject empty type parameter lists.
	(gfc_match_derived_decl): Mark as PDT only if type parameter list was
	matched successfully.

2019-03-13  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/89601
	* gfortran.dg/pdt_16.f03: Modified to avoid follow-up errors.
	* gfortran.dg/pdt_30.f90: New test case.

From-SVN: r269658
2019-03-13 20:52:23 +01:00
Marek Polacek cbfa3ec327 PR c++/88979 - further P0634 fix for constructors.
* parser.c (cp_parser_decl_specifier_seq): Pass flags to
	cp_parser_constructor_declarator_p.
	(cp_parser_direct_declarator): Allow missing typename for constructor
	parameters.
	(cp_parser_constructor_declarator_p): Add FLAGS parameter.  Pass it to
	cp_parser_type_specifier.

	* g++.dg/cpp2a/typename15.C: New test.

From-SVN: r269656
2019-03-13 18:38:45 +00:00
Martin Sebor 129ef157d4 PR tree-optimization/89662 - -Warray-bounds ICE on void* arithmetic
gcc/ChangeLog:

	PR tree-optimization/89662
	* tree-vrp.c (vrp_prop::check_mem_ref): Avoid assuming every type
	has a size.

gcc/testsuite/ChangeLog:

	PR tree-optimization/89662
	* gcc.dg/Warray-bounds-41.c: New test.

From-SVN: r269655
2019-03-13 11:19:43 -06:00
Paolo Carlini bd8ea48313 re PR c++/63508 (ICE when using bracketed initializer on pointer to member function of a templated class)
2019-03-13  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/63508
	* g++.dg/cpp0x/auto53.C: New.

From-SVN: r269651
2019-03-13 15:01:00 +00:00
Richard Biener cd5091f1ea re PR middle-end/89677 (internal compiler error: in wide_int_to_tree_1, at tree.c:1549)
2019-03-13  Richard Biener  <rguenther@suse.de>

	PR middle-end/89677
	* tree-scalar-evolution.c (simplify_peeled_chrec): Do not
	throw FP expressions at tree-affine.

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

From-SVN: r269646
2019-03-13 11:32:11 +00:00
Richard Biener c045ea5763 tree-pretty-print.c (dump_generic_node): For -gimple properly dump negative integer constants using _Literal (type) -num.
2019-03-14  Richard Biener  <rguenther@suse.de>

	* tree-pretty-print.c (dump_generic_node): For -gimple properly
	dump negative integer constants using _Literal (type) -num.

From-SVN: r269645
2019-03-13 10:56:32 +00:00
Paolo Carlini 31ba0418a2 re PR c++/85558 (ICE in make_rtl_for_nonlocal_decl when using static member of template class)
2019-03-13  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/85558
	* g++.dg/other/friend16.C: New.
	* g++.dg/other/friend17.C: Likewise.

From-SVN: r269644
2019-03-13 10:32:29 +00:00
Eric Botcazou 7a26e2739d re PR sanitizer/80953 (Support libsanitizer on Solaris)
PR sanitizer/80953
	Merge from LLVM revision 355980
	* asan/asan_allocator.h (kAllocatorSpace): Define for SPARC.
	(kAllocatorSize): Likewise.
	(DefaultSizeClassMap): Likewise.
	* asan/asan_mapping.h (kSPARC64_ShadowOffset64): Define.
	(SHADOW_OFFSET): Define for SPARC.
	Include asan_mapping_sparc64.h for SPARC 64-bit.
	* asan/asan_mapping_sparc64.h: New file.

From-SVN: r269641
2019-03-13 09:19:25 +00:00
Eric Botcazou a196c82cf2 re PR sanitizer/80953 (Support libsanitizer on Solaris)
PR sanitizer/80953
	Merge from LLVM revision 355979
	* asan/asan_globals.c (GetGlobalsForAddress): Use internal_memcpy to
	copy Global objects for SPARC with GCC.

From-SVN: r269640
2019-03-13 09:15:02 +00:00
Eric Botcazou 36b50aeb4e re PR sanitizer/80953 (Support libsanitizer on Solaris)
PR sanitizer/80953
	Merge from LLVM revision 355978
	* sanitizer_common/sanitizer_allocator_primary32.h
	(class SizeClassAllocator32): Assert that kSpaceSize is power of 2 if
	SANITIZER_SIGN_EXTENDED_ADDRESSES is set.
	(PointerIsMine): Deal with SANITIZER_SIGN_EXTENDED_ADDRESSES.
	(ComputeRegionId): Likewise.
	* sanitizer_common/sanitizer_linux.cc (GetMaxVirtualAddress): Return
	appropriate value for SPARC 64-bit.
	* sanitizer_common/sanitizer_platform.h (SANITIZER_MMAP_RANGE_SIZE):
	Define for SPARC.
	(SANITIZER_SIGN_EXTENDED_ADDRESSES): Define to 1 for SPARC 64-bit.

From-SVN: r269639
2019-03-13 09:11:46 +00:00
Eric Botcazou 017abbe362 re PR sanitizer/80953 (Support libsanitizer on Solaris)
PR sanitizer/80953
	Merge from LLVM revision 355965
	* sanitizer_common/sanitizer_linux.cc (GetWriteFlag): Implement for
	SPARC/Linux.
	(GetPcSpBp): Likewise.
	* sanitizer_common/sanitizer_stacktrace.cc (GetNextInstructionPc):
	Adjust for SPARC.
	* sanitizer_common/sanitizer_stacktrace.h (SANITIZER_CAN_FAST_UNWIND):
	Define to 1 for SPARC.
	* sanitizer_common/sanitizer_stacktrace_sparc.cc: Rewrite.
	* sanitizer_common/sanitizer_unwind_linux_libcdep.cc (SlowUnwindStack):
	Adjust the PC address for SPARC with GCC.

From-SVN: r269638
2019-03-13 09:05:43 +00:00
Jakub Jelinek 6e089cc3f6 ipa-param-manipulation.h (struct ipa_parm_adjustment): Remove nonlocal_value member.
* ipa-param-manipulation.h (struct ipa_parm_adjustment): Remove
	nonlocal_value member.

From-SVN: r269637
2019-03-13 09:48:56 +01:00
Jakub Jelinek 33813f1d70 re PR middle-end/88588 (ICE in make_decl_rtl, at varasm.c:1329)
PR middle-end/88588
	* omp-simd-clone.c (ipa_simd_modify_stmt_ops): Handle PHI args.
	(ipa_simd_modify_function_body): Handle PHIs.

	* c-c++-common/gomp/pr88588.c: New test.

From-SVN: r269636
2019-03-13 09:24:41 +01:00
Thomas Koenig 55b9c61257 [multiple changes]
2019-03-13  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/66695
	PR fortran/77746
	PR fortran/79485
	* gfortran.h (gfc_symbol): Add bind_c component.
	(gfc_get_gsymbol): Add argument bind_c.
	* decl.c (add_global_entry): Add bind_c argument to
	gfc_get_symbol.
	* parse.c (parse_block_data): Likewise.
	(parse_module): Likewise.
	(add_global_procedure): Likewise.
	(add_global_program): Likewise.
	* resolve.c (resolve_common_blocks): Likewise.
	(resolve_global_procedure): Likewise.
	(gfc_verify_binding_labels): Likewise.
	* symbol.c (gfc_get_gsymbol): Add argument bind_c. Set bind_c
	in gsym.
	* trans-decl.c (gfc_get_module_backend_decl): Add bind_c argument
	to gfc_get_symbol.
	(gfc_get_extern_function_decl): If the sym has a binding label
	and it cannot be found in the global symbol tabel, it is the wrong
	one and vice versa.

2019-03-13 Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/66695
	PR fortran/77746
	PR fortran/79485
	* gfortran.dg/binding_label_tests_30.f90: New test.
	* gfortran.dg/binding_label_tests_31.f90: New test.
	* gfortran.dg/binding_label_tests_32.f90: New test.
	* gfortran.dg/binding_label_tests_33.f90: New test.

From-SVN: r269635
2019-03-13 07:21:33 +00:00
Ian Lance Taylor 599b9f723e compiler: compare parse methods when indexing interface types for export
This change fixes a bug in which two interface types were being
    incorrectly commoned (considered identical) in the initial stages of
    writing out types to export data. The indexer does a walk to collect
    candidates for export, inserting types into a table to eliminate
    duplicates; as part of this process a local interface type T1 was
    being commoned with a different interface type T2. This caused a cycle
    in the exported type graph due to the way embedded interfaces are
    handled.
    
    The fix was to add a new flag to the Type::is_identical utility
    routine to request that interface type comparison be done by examining
    the original parse methods, as opposed to the expanded method set,
    then use the new flag when creating the hash map for the exporter.
    
    Fixes golang/go#30659.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/166638

From-SVN: r269634
2019-03-13 05:12:05 +00:00
Ian Lance Taylor f4390da0c5 compiler: add new debugging helper function debug_go_type()
Add a new debugging utility routine debug_go_type(), intended to
    display the contents of a Type object in a way useful to debugging
    a run of the compiler.  Prior to this the only useful alternative
    for debugging types was invoking the mangled_name() method, which
    has problems (for example, won't work on interface types prior
    to finalizing of methods).
    
    This is a "deep" dump, meaning that all types reachable from the
    type passed to debug_go_type() will be printed out. Example:
    
    (gdb) print debug_go_type(t1)
          T0        0x535f300  'net/http.Header' -> T1
          T1        0x535d3d0  map ['string' -> string] T4
          T2        0x5304bb0  'string' -> string
          T3        0x331f900  string
          T4        0x535d370  array [] 'string' -> string
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/166637

From-SVN: r269633
2019-03-13 04:43:33 +00:00
Iain Buclaw 50e021a590 pr88957.d: Move to gdc.dg/ubsan.
gcc/testsuite/ChangeLog:

2019-03-13  Iain Buclaw  <ibuclaw@gdcproject.org>

	* gdc.dg/pr88957.d: Move to gdc.dg/ubsan.
	* gdc.dg/ubsan/ubsan.exp: New file.
	* lib/gdc.exp (gdc_include_flags): Remove unused target variable.
	Explicitly return flags from procedure.

From-SVN: r269632
2019-03-13 00:18:37 +00:00
GCC Administrator 1ad43ab9a3 Daily bump.
From-SVN: r269631
2019-03-13 00:16:13 +00:00
John David Anglin 2ff656f421 re PR libstdc++/89461 (FAIL: experimental/net/timer/waitable/cons.cc)
PR libstdc++/89461
	* testsuite/lib/libstdc++.exp: Locate libatomic.
	* testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
	* testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
	libatomic options.
	* testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
	* testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
	* testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
	* testsuite/experimental/net/timer/waitable/ops.cc: Likewise.

From-SVN: r269628
2019-03-12 23:13:36 +00:00
Iain Buclaw b9da027866 d/dmd: Merge upstream dmd 19b1454b5
Backports fixes for many ICEs that occurred when using the vector .array
property in both CTFE and code generation passes.

Fixes https://gcc.gnu.org/PR88957

Reviewed-on: https://github.com/dlang/dmd/pull/9438

gcc/d/ChangeLog:

2019-03-13  Iain Buclaw  <ibuclaw@gdcproject.org>

	PR d/88957
	* expr.cc (ExprVisitor::visit(VectorArrayExp)): New override.

gcc/testsuite/ChangeLog:

2019-03-13  Iain Buclaw  <ibuclaw@gdcproject.org>

	PR d/88957
	* gdc.dg/pr88957.d: New test.
	* gdc.dg/simd.d: Add new vector tests.

From-SVN: r269627
2019-03-12 23:10:49 +00:00
Uros Bizjak 035f5b9e0b re PR d/87824 (x86_64-linux multilib issues)
PR d/87824
	* lib/gdc.exp (gdc_include_flags): Find C++ headers by calling
	libstdc++v3/scripts/testsuite_flags.  Filter out unsupported
	-nostdinc++ flag.

From-SVN: r269625
2019-03-12 19:37:31 +01:00
Thomas Koenig 1eabf876d5 re PR fortran/87673 (Errors caused by using function for character length in allocate with typespec)
2019-03-12  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/87673
	* match.c (gfc_match_type_spec): Remove call to
	gfc_resolve_expr for character length.

2019-03-12  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/87673
	* gfortran.dg/charlen_17.f90: New test.

From-SVN: r269624
2019-03-12 17:22:28 +00:00
Robin Dapp 6684d2dbff S/390: Perform more aggressive inlining
This patch sets the inlining parameters for z13 and later to rather
aggressive values in response to PR85103 that caused performance
regressions in SPEC2006's sjeng and gobmk benchmarks.

From-SVN: r269623
2019-03-12 17:12:56 +00:00
Robin Dapp ff99338ce3 S/390: Rework instruction scheduling.
This patch set adds new pipeline descriptions for z13 and z14.  Based
on that, the scoring and some properties are handled differently in
the scheduler hooks.

The patch before (r269620) also belongs to this set but I accidentally
applied it separately.

From-SVN: r269622
2019-03-12 17:08:27 +00:00
Robin Dapp 2380e04277 S/390: Change z13 pipeline description.
This patch adapts the z13 pipeline description.

From-SVN: r269620
2019-03-12 16:57:08 +00:00
Iain Buclaw 8451f4a52e Use libiberty's lrealpath to avoid portability problems.
The dmd front-end function FileName::canonicalName could be called
during the semantic pass of import("file") expressions, so still
requires that realpath() be redefined.

Initial patch by Rainer Orth.

gcc/d/ChangeLog:

2019-03-12  Iain Buclaw  <ibuclaw@gdcproject.org>

	PR d/87866
	* d-system.h (realpath): Redefine as lrealpath.

From-SVN: r269619
2019-03-12 16:31:48 +00:00
Martin Liska 1fe61adfcc Replace can't in error messages for Fortran.
2019-03-12  Martin Liska  <mliska@suse.cz>

	* c-opts.c (c_common_handle_option): Wrap option with %< and %>.
2019-03-12  Martin Liska  <mliska@suse.cz>

	* decl.c (add_init_expr_to_sym): Replace usage of 'can't'
	with 'cannot'.
	(variable_decl): Likewise.
	(cray_pointer_decl): Likewise.
	(match_binding_attributes): Likewise.
	* f95-lang.c (gfc_init): Likewise.
	* interface.c (gfc_check_typebound_override): Likewise.
	* intrinsic.c (make_generic): Likewise.
	* module.c (dump_module): Likewise.
	(gfc_use_module): Likewise.
	* primary.c (gfc_convert_to_structure_constructor): Likewise.
	* resolve.c (resolve_entries): Likewise.
	(check_generic_tbp_ambiguity): Likewise.
	(get_checked_tb_operator_target): Likewise.
	* scanner.c (load_file): Likewise.
	* trans-expr.c (gfc_conv_intrinsic_to_class): Likewise.
2019-03-12  Martin Liska  <mliska@suse.cz>

	* config/i386/i386.c: Reword an error message.
2019-03-12  Martin Liska  <mliska@suse.cz>

	* gfortran.dg/abstract_type_3.f03: Amend test-case scan
	patterns.
	* gfortran.dg/binding_label_tests_4.f03: Likewise.
	* gfortran.dg/c_f_pointer_tests_6.f90: Likewise.
	* gfortran.dg/c_funloc_tests_6.f90: Likewise.
	* gfortran.dg/c_loc_tests_17.f90: Likewise.
	* gfortran.dg/constructor_9.f90: Likewise.
	* gfortran.dg/dec_structure_8.f90: Likewise.
	* gfortran.dg/entry_4.f90: Likewise.
	* gfortran.dg/init_char_with_nonchar_ctr.f90: Likewise.
	* gfortran.dg/initialization_23.f90: Likewise.
	* gfortran.dg/logical_assignment_1.f90: Likewise.
	* gfortran.dg/pr80752.f90: Likewise.
	* gfortran.dg/pr88116_1.f90: Likewise.
	* gfortran.dg/pr88467.f90: Likewise.
	* gfortran.dg/typebound_call_7.f03: Likewise.
	* gfortran.dg/typebound_generic_1.f03: Likewise.
	* gfortran.dg/typebound_operator_2.f03: Likewise.
	* gfortran.dg/typebound_operator_4.f03: Likewise.
	* gfortran.dg/typebound_proc_9.f03: Likewise.
	* gfortran.dg/unlimited_polymorphic_2.f03: Likewise.

From-SVN: r269616
2019-03-12 15:11:42 +00:00
Paul Thomas 0e30888065 re PR fortran/89363 (RANK incorrect for unallocated allocatable)
2019-03-12  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/89363
	PR fortran/89364
	* trans-expr.c (set_dtype_for_unallocated): New function.
	(gfc_conv_gfc_desc_to_cfi_desc): Call it for allocatable and
	pointer arguments.
	(gfc_conv_procedure_call): Likewise. Also, set the ubound of
	the final dimension to -1 for assumed rank formal args that are
	associated with assumed size arrays.
	* trans-intrinsic.c (gfc_conv_intrinsic_bound): Return -1 for
	the final dimension of assumed rank entities that are argument
	associated with assumed size arrays.
	(gfc_conv_intrinsic_shape): Likewise return -1 for the final
	dimension of the shape intrinsic.

2019-03-12  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/89363
	* gfortran.dg/assumed_rank_16.f90: New test.

	PR fortran/89364
	* gfortran.dg/assumed_rank_17.f90: New test.

From-SVN: r269612
2019-03-12 13:40:51 +00:00
Iain Buclaw c9634470ba d/dmd: Merge upstream dmd 7423993c9
Fixes C++ mangling for substituted basic types that are target-specific.
Introduces a new method that currently does nothing, but could in future
make use of flag_abi_version as extern(C++) integration improves in
latter versions of the D front-end.

Reviewed-on: https://github.com/dlang/dmd/pull/9439

gcc/d/ChangeLog:

2019-03-12  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-lang.cc (d_init_options): Set global.params.cplusplus to C++14.
	* d-target.cc (Target::cppFundamentalType): New method.

From-SVN: r269611
2019-03-12 13:29:16 +00:00
Martin Jambor df2a91dece Fix dumping of "former thunk" info in cgraph dump
2019-03-12  Martin Jambor  <mjambor@suse.cz>

	* cgraph.c (cgraph_node::dump): Dump more info for former thunks,
	terminate with newline.

From-SVN: r269608
2019-03-12 13:39:18 +01:00
Jakub Jelinek 63c79a7509 re PR target/52726 (Composed error message will not get translated)
PR target/52726
	* config/s390/s390.md (tabort): Use %wd instead of
	HOST_WIDE_INT_PRINT_DEC in error message, reword to avoid two capital
	letters and periods.
	* config/tilepro/tilepro.c (tilepro_print_operand): Use %wd in
	output_operand_lossage instead of HOST_WIDE_INT_PRINT_DEC, replace
	's with %< and %>.

From-SVN: r269607
2019-03-12 11:07:25 +01:00
Jakub Jelinek 1c178a5af5 re PR middle-end/89663 (ICE in expand_builtin_int_roundingfn_2, at builtins.c:2831)
PR middle-end/89663
	* builtins.c (expand_builtin_int_roundingfn,
	expand_builtin_int_roundingfn_2): Return NULL_RTX instead of
	gcc_unreachable if validate_arglist fails.

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

From-SVN: r269605
2019-03-12 09:17:08 +01:00
Richard Biener d9e1f37fad re PR tree-optimization/89664 (ICE in free_bb, at tree-ssa-math-opts.c:522)
2019-03-12  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/89664
	* tree-ssa-math-opts.c (execute_cse_reciprocals_1): Properly
	free the occurance tree after the early out.

	* gfortran.dg/pr89664.f90: New testcase.

From-SVN: r269604
2019-03-12 07:56:23 +00:00