Commit Graph

169586 Commits

Author SHA1 Message Date
Eric Botcazou 07ec36eed9 [Ada] Document that boolean types with convention C now map to C99 bool
2019-07-03  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* doc/gnat_rm/interfacing_to_other_languages.rst (Interfacing to C):
	Document that boolean types with convention C now map to C99 bool.
	* gnat_rm.texi: Regenerate.

From-SVN: r272960
2019-07-03 08:13:34 +00:00
Javier Miranda 4a51756a8c [Ada] Exp_Attr: remove dead code
2019-07-03  Javier Miranda  <miranda@adacore.com>

gcc/ada/

	* exp_attr.adb (Expand_Min_Max_Attribute): Code cleanup:
	removing code that it is now never executed in the CCG compiler
	(dead code).

From-SVN: r272959
2019-07-03 08:13:29 +00:00
Jakub Jelinek 2f6bb511d1 tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__SCANTEMP_ clause.
* tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__SCANTEMP_
	clause.
	* tree.h (OMP_CLAUSE_DECL): Use OMP_CLAUSE__SCANTEMP_ instead of
	OMP_CLAUSE__CONDTEMP_ as range's upper bound.
	(OMP_CLAUSE__SCANTEMP__ALLOC, OMP_CLAUSE__SCANTEMP__CONTROL): Define.
	* tree.c (omp_clause_num_ops, omp_clause_code_name): Add
	OMP_CLAUSE__SCANTEMP_ entry.
	(walk_tree_1): Handle OMP_CLAUSE__SCANTEMP_.
	* tree-pretty-print.c (dump_omp_clause): Likewise.
	* tree-nested.c (convert_nonlocal_omp_clauses,
	convert_local_omp_clauses): Likewise.
	* omp-general.h (struct omp_for_data): Add have_scantemp and
	have_nonctrl_scantemp members.
	* omp-general.c (omp_extract_for_data): Initialize them.
	* omp-low.c (struct omp_context): Add scan_exclusive member.
	(scan_omp_1_stmt): Don't unnecessarily mask gimple_omp_for_kind
	result again with GF_OMP_FOR_KIND_MASK.  Initialize also
	ctx->scan_exclusive.
	(lower_rec_simd_input_clauses): Use ctx->scan_exclusive instead
	of !ctx->scan_inclusive.
	(lower_rec_input_clauses): Simplify gimplification of dtors using
	gimplify_and_add.  For non-is_simd test OMP_CLAUSE_REDUCTION_INSCAN
	rather than rvarp.  Handle OMP_CLAUSE_REDUCTION_INSCAN in worksharing
	loops.  Don't add barrier for reduction_omp_orig_ref if
	ctx->scan_??xclusive.
	(lower_reduction_clauses): Don't do anything for ctx->scan_??xclusive.
	(lower_omp_scan): Use ctx->scan_exclusive instead
	of !ctx->scan_inclusive.  Handle worksharing loops with inscan
	reductions.  Use new_vard != new_var instead of repeated
	omp_is_reference calls.
	(omp_find_scan, lower_omp_for_scan): New functions.
	(lower_omp_for): Call lower_omp_for_scan for worksharing loops with
	inscan reductions.
	* omp-expand.c (expand_omp_scantemp_alloc): New function.
	(expand_omp_for_static_nochunk): Handle fd->have_nonctrl_scantemp
	and fd->have_scantemp.

	* c-c++-common/gomp/scan-3.c (f1): Don't expect a sorry message.
	* c-c++-common/gomp/scan-5.c (foo): Likewise.

	* testsuite/libgomp.c++/scan-1.C: New test.
	* testsuite/libgomp.c++/scan-2.C: New test.
	* testsuite/libgomp.c++/scan-3.C: New test.
	* testsuite/libgomp.c++/scan-4.C: New test.
	* testsuite/libgomp.c++/scan-5.C: New test.
	* testsuite/libgomp.c++/scan-6.C: New test.
	* testsuite/libgomp.c++/scan-7.C: New test.
	* testsuite/libgomp.c++/scan-8.C: New test.
	* testsuite/libgomp.c/scan-1.c: New test.
	* testsuite/libgomp.c/scan-2.c: New test.
	* testsuite/libgomp.c/scan-3.c: New test.
	* testsuite/libgomp.c/scan-4.c: New test.
	* testsuite/libgomp.c/scan-5.c: New test.
	* testsuite/libgomp.c/scan-6.c: New test.
	* testsuite/libgomp.c/scan-7.c: New test.
	* testsuite/libgomp.c/scan-8.c: New test.

From-SVN: r272958
2019-07-03 07:03:58 +02:00
Jakub Jelinek 83eb952208 gimplify.c (gimplify_scan_omp_clauses): For inscan reductions on worksharing loop propagate it as shared clause to...
* gimplify.c (gimplify_scan_omp_clauses): For inscan reductions
	on worksharing loop propagate it as shared clause to containing
	combined parallel.

	* c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
	clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
	with OMP_PARALLEL.

	* c-c++-common/gomp/scan-5.c: New test.

From-SVN: r272957
2019-07-03 06:56:25 +02:00
Jakub Jelinek 1a39b3d3e2 omp-expand.c (expand_omp_for_static_nochunk, [...]): For nowait worksharing loop with conditional lastprivate clause(s)...
* omp-expand.c (expand_omp_for_static_nochunk,
	expand_omp_for_static_chunk): For nowait worksharing loop with
	conditional lastprivate clause(s), emit GOMP_loop_end_nowait call
	at the end.

	* c-c++-common/gomp/lastprivate-conditional-5.c: New test.

From-SVN: r272956
2019-07-03 06:51:45 +02:00
Ian Lance Taylor 61a02d1e97 compiler: rework type and package tracking in exporter
Revamps the way the exporter tracks exported types and imported
    packages that need to be mentioned in the export data.
    
    The previous implementation wasn't properly handling the case where an
    exported non-inlinable function refers to an imported type whose
    method set includes an inlinable function whose body makes a call to a
    function in another package that's not directly used in the original
    package.
    
    This patch integrates together two existing traversal helper classes,
    "Collect_references_from_inline" and "Find_types_to_prepare" into a
    single helper "Collect_export_references", so as to have common/shared
    code that looks for indirectly imported packages.
    
    Fixes golang/go#32778
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/183850

From-SVN: r272955
2019-07-03 00:56:35 +00:00
Joern Rennecke 5935baf5bb re PR testsuite/91065 (gcc.dg/plugin/start_unit_plugin.c uses ggc memory without registering a root_tab)
PR testsuite/91065
        * testsuite/gcc.dg/plugin/start_unit_plugin.c: Register a root tab
        to reference fake_var.

From-SVN: r272954
2019-07-03 01:22:53 +01:00
GCC Administrator d332da4f9b Daily bump.
From-SVN: r272953
2019-07-03 00:16:15 +00:00
Jeff Law fd2ef5123a re PR tree-optimization/90883 (Generated code is worse if returned struct is unnamed)
PR tree-optimization/90883
	* g++.dg/tree-ssa/pr90883.c: Add -Os.  Check dse2 for the
	deleted store on some targets.

From-SVN: r272949
2019-07-02 17:01:53 -06:00
Qing Zhao 1c6ffbab63 re PR preprocessor/90581 (provide an option to adjust the maximum depth of nested #include)
PR preprocessor/90581
Add a cpp option -fmax-include-depth to set the maximum depth of the nested #include.

From-SVN: r272948
2019-07-02 20:23:30 +00:00
Iain Sandoe 709877bf76 [PATCH, Ada, Darwin, PPC] PPC Darwin has stack check probes.
On PPC, Darwin uses the same code as other parts of the port.

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

	* libgnat/system-darwin-ppc.ads: Set Stack_Check_Probes True for
	PPC Darwin.

From-SVN: r272947
2019-07-02 19:03:48 +00:00
Aaron Sawdey 02e3025e17 optabs.def (movmem_optab): Add movmem back for memmove().
2019-07-02  Aaron Sawdey  <acsawdey@linux.ibm.com>

	* optabs.def (movmem_optab): Add movmem back for memmove().
	* doc/md.texi: Add description of movmem pattern for overlapping move.

From-SVN: r272946
2019-07-02 13:51:23 -05:00
Cherry Zhang e2790e1eab compiler: use builtin memset for non-pointer memclr
For zeroing a range of memory that doesn't contain pointer, we
    can use builtin memset directly.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/184438

	* go-gcc.cc (Gcc_backend::Gcc_backend): Define __builtin_memset.

From-SVN: r272944
2019-07-02 16:47:48 +00:00
Uros Bizjak dab0477b0b mmx.md (mmx_pack<s_trunsuffix>swb): Use TARGET_SSE2 && SSE_REGNO_P in split condition.
* config/i386/mmx.md (mmx_pack<s_trunsuffix>swb):
	Use TARGET_SSE2 && SSE_REGNO_P in split condition.
	(mmx_packssdw): Ditto.
	(mmx_punpckhbw): Ditto.
	(mmx_punpcklbw): Ditto.
	(mmx_punpckhwd): Ditto.
	(mmx_punpcklwd): Ditto.
	(mmx_punpckhdq): Ditto.
	(mmx_punpckldq): Ditto.
	(*vec_dupv4hi): Ditto.
	(*vec_dupv2si): Ditto.
	(mmx_pmovmskb): Ditto.
	* config/i386/sse.md (sse_cvtpi2ps): Use
	TARGET_SSE2 && SSE_REG_P in split condition.
	(ssse3_ph<plusminus_mnemonic>wv4hi3): Use
	TARGET_SSSE3 && SSE_REGNO_P in split condition.
	(ssse3_ph<plusminus_mnemonic>dv2si3): Ditto.
	(ssse3_pshufbv8qi3): Ditto.
	(ssse3_palignrdi): Ditto.

From-SVN: r272943
2019-07-02 17:48:36 +02:00
Andrew Stubbs 8108da8a55 Fix amdgcn regrename ICE.
2019-07-02  Andrew Stubbs  <ams@codesourcery.com>

	gcc/
	* config/gcn/gcn.md (movdi_symbol_save_scc): Convert to define_insn
	with inlined save and restore.

From-SVN: r272932
2019-07-02 11:57:17 +00:00
Jonathan Wakely 4887c9e808 Fix preprocessor checks for Clang builtins
Clang seems to define built-ins that start with "__builtin_" as
non-keywords, which means that we need to use __has_builtin to detect
them, not __is_identifier. The built-ins that don't start with
"__builtin_" are keywords, and can only be detected using
__is_identifier and not by __has_builtin.

	* include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
	(_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
	instead of __is_identifier to detect Clang support.

From-SVN: r272931
2019-07-02 12:50:27 +01:00
Eric Botcazou fe51b12950 * cfgrtl.c (commit_edge_insertions): Rebuild jump labels chain.
From-SVN: r272930
2019-07-02 11:10:59 +00:00
Eric Botcazou 82cea5e8bf cfgexpand.c (pass_expand::execute): Deal specially with instructions to be inserted on single successor edge of the...
* cfgexpand.c (pass_expand::execute): Deal specially with instructions
	to be inserted on single successor edge of the entry block.  Then call
	commit_edge_insertions instead of inserting the instructions manually.
	* cfgrtl.c (commit_edge_insertions): Do not verify flow info during
	RTL expansion.

From-SVN: r272929
2019-07-02 09:44:47 +00:00
Richard Biener 2e2c9da012 tree-core.h (enum tree_index): Add TI_CHREC_DONT_KNOW and TI_CHREC_KNOWN.
2019-07-02  Richard Biener  <rguenther@suse.de>

	* tree-core.h (enum tree_index): Add TI_CHREC_DONT_KNOW and
	TI_CHREC_KNOWN.
	* tree.h (chrec_not_analyzed_yet, chrec_dont_know, chrec_known):
	Define here.
	* tree.c (build_common_tree_nodes): Initialize them.
	* tree-chrec.h (chrec_not_analyzed_yet, chrec_dont_know, chrec_known):
	Make declarations comments.
	* tree-scalar-evolution.c (chrec_not_analyzed_yet, chrec_dont_know,
	chrec_known): Remove definitions.
	(initialize_scalar_evolutions_analyzer): Remove.
	(scev_initialize): Do not call initialize_scalar_evolutions_analyzer.
	* tree-streamer.c (preload_common_nodes): Do not preload
	TI_CHREC_DONT_KNOW or TI_CHREC_KNOWN.

From-SVN: r272928
2019-07-02 09:35:12 +00:00
Jan Hubicka 30ca9fbe90 tree-ssa-alias.c (aliasing_component_refs_p): Remove forgotten sanity check.
* tree-ssa-alias.c (aliasing_component_refs_p): Remove forgotten
	sanity check.

From-SVN: r272927
2019-07-02 08:35:58 +00:00
Jan Hubicka 1c28d12f61 tree-ssa-alias.c (nonoverlapping_component_refs_for_decl_p): Rename to ..
* tree-ssa-alias.c (nonoverlapping_component_refs_for_decl_p): Rename
	to ..
	(nonoverlapping_component_refs_since_match_p): ... this one;
	handle also non-decl bases; return -1 if search gave up.
	(alias_stats): Rename nonoverlapping_component_refs_of_decl_p_may_alias,
	nonoverlapping_component_refs_of_decl_p_no_alias to
	nonoverlapping_component_refs_since_match_p_may_alias,
	nonoverlapping_component_refs_since_match_p_no_alias.
	(dump_alias_stats): Update dumping.
	(aliasing_matching_component_refs_p):  Break out from ...;
	dispatch to nonoverlapping_component_refs_for_decl_p
	and nonoverlapping_component_refs_since_match_p.
	(aliasing_component_refs_p): ... here; call
	nonoverlapping_component_refs_p in scenarios where we can not
	precisely determine base match.
	(decl_refs_may_alias_p): Use
	nonoverlapping_component_refs_since_match_p.
	(indirect_ref_may_alias_decl_p): Do not call
	nonoverlapping_component_refs_p.
	(indirect_refs_may_alias_p): Likewise.

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

From-SVN: r272926
2019-07-02 08:28:24 +00:00
Jan Hubicka f51b4aed27 tree-inline.c (remap_gimple_stmt): Do not subtitute handled components to clobber of return value.
* tree-inline.c (remap_gimple_stmt): Do not subtitute handled components
	to clobber of return value.
	* g++.dg/lto/pr90990_0.C: New testcase.

From-SVN: r272925
2019-07-02 08:26:16 +00:00
Kyrylo Tkachov 8bb9a5e66a [arm/AArch64] Assume unhandled NEON types are neon_arith_basic types when scheduling for Cortex-A57
Some scheduling descriptions, like the Cortex-A57 one, are reused for multiple -mcpu options.
Sometimes those other -mcpu cores support more architecture features than the Armv8-A Cortex-A57.
For example, the Cortex-A75 and Cortex-A76 support Armv8.2-A as well as the Dot Product instructions.
These Dot Product instructions have the neon_dot and neon_dot_q scheduling type, but that type is not
handled in cortex-a57.md, since the Cortex-A57 itself doesn't need to care about these instructions.

But if we just ignore the neon_dot(_q) type at scheduling we get really terrible codegen when compiling
for -mcpu=cortex-a76, for example, because the scheduler just pools all the UDOT instructions at the end
of the basic block, since it doesn't assume anything about their behaviour.

This patch ameliorates the situation somewhat by telling the Cortex-A57 scheduling model to treat any
insn that doesn't get assigned a cortex_a57_neon_type but is actually a is_neon_type instruction as
a simple neon_arith_basic instruction. This allows us to treat post-Armv8-A SIMD instructions more sanely
without having to model each of them explicitly in cortex-a57.md.

	* config/arm/cortex-a57.md (cortex_a57_neon_type): Use neon_arith_basic
	for is_neon_type instructions that have not already been categorized.

From-SVN: r272924
2019-07-02 08:24:54 +00:00
Jan Hubicka 606a9a8c72 lto-common.c (lto_register_canonical_types_for_odr_types): Copy CXX_ODR_P from the main variant.
* lto-common.c (lto_register_canonical_types_for_odr_types):
	Copy CXX_ODR_P from the main variant.

From-SVN: r272923
2019-07-02 08:23:02 +00:00
Richard Biener 14ec49a753 re PR tree-optimization/58483 (missing optimization opportunity for const std::vector compared to std::array)
2019-07-02  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/58483
	* tree-ssa-scopedtables.c (avail_expr_hash): Use OEP_ADDRESS_OF
	for MEM_REF base hashing.
	(equal_mem_array_ref_p): Likewise for base comparison.

	* gcc.dg/tree-ssa/ssa-dom-cse-8.c: New testcase.

From-SVN: r272922
2019-07-02 07:35:23 +00:00
Janne Blomqvist 6d64cee84b mklog/91048: Open ~/.mklog in string mode.
2019-07-02  Janne Blomqvist  <jb@gcc.gnu.org>

	PR other/91048
	* mklog (read_user_info): Open ~/.mklog in string mode.

From-SVN: r272921
2019-07-02 08:54:31 +03:00
Jim Wilson 758d7478bf Fix libstdc++ install-pdf support.
Generating pdf files requires everything that is required for the xml files
except the style sheets.

	libstdc++-v3/
	* configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc,
	and xmllint.
	* configure: Regenerate.

From-SVN: r272920
2019-07-01 19:30:52 -07:00
Ian Lance Taylor 9badab5db5 compiler: refactoring in Export class to encapsulate type refs map
Convert the Export::type_refs map from a static object to a field
    contained (indirectly, via an impl class) in Export itself, for better
    encapsulation and to be able to reclaim its memory when exporting is
    done. No change in compiler functionality.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/184170

From-SVN: r272919
2019-07-02 01:39:19 +00:00
GCC Administrator b731572b8a Daily bump.
From-SVN: r272916
2019-07-02 00:16:22 +00:00
Segher Boessenkool a01d6debeb rs6000.md (signbit<mode>2_dm): Make this a parameterized name.
@signbit<mode>2_dm


	* config/rs6000/rs6000.md (signbit<mode>2_dm): Make this a
	parameterized name.
	(signbit<mode>2): Use that name.  Simplify.

From-SVN: r272912
2019-07-01 23:58:47 +02:00
Joern Rennecke 5cc8cb04de re PR tree-optimization/66726 (missed optimization, factor conversion out of COND_EXPR)
PR middle-end/66726
        * tree-ssa-phiopt.c (factor_out_conditional_conversion):
        Tune heuristic from PR71016 to allow MIN / MAX.
        * testsuite/gcc.dg/tree-ssa/pr66726-4.c: New testcase.

From-SVN: r272911
2019-07-01 22:48:55 +01:00
Uros Bizjak 63c94f4cb0 * config/i386/constraints.md: Remove stalled comment w.r.t. Yh constraint.
From-SVN: r272908
2019-07-01 21:04:05 +02:00
Segher Boessenkool 6783210c18 rs6000.md (ieee_128bit_vsx_abs<mode>2): Make this a parameterized name.
@ieee_128bit_vsx_abs<mode>2


	* config/rs6000/rs6000.md (ieee_128bit_vsx_abs<mode>2): Make this a
	parameterized name.
	(abs<mode>2): Use that name.  Simplify.

From-SVN: r272907
2019-07-01 20:47:56 +02:00
Segher Boessenkool 306f66aaaa rs6000.md (ieee_128bit_vsx_neg<mode>2): Make this a parameterized name.
@ieee_128bit_vsx_neg<mode>2


	* config/rs6000/rs6000.md (ieee_128bit_vsx_neg<mode>2): Make this a
	parameterized name.
	(neg<mode>2): Use that name.  Simplify.

From-SVN: r272906
2019-07-01 20:47:05 +02:00
Segher Boessenkool dca369ba28 rs6000.md (abs<mode>2_hw): Make this a parameterized name.
@abs<mode>2_hw


	* config/rs6000/rs6000.md (abs<mode>2_hw): Make this a parameterized
	name.
	(abs<mode>2): Use that name.  Simplify.

From-SVN: r272905
2019-07-01 20:45:36 +02:00
Segher Boessenkool 47434aeb56 rs6000.md (neg<mode>2_hw): Make this a parameterized name.
@neg<mode>2_hw


	* config/rs6000/rs6000.md (neg<mode>2_hw): Make this a parameterized
	name.
	(neg<mode>2): Use that name.  Simplify.

From-SVN: r272904
2019-07-01 20:44:18 +02:00
Segher Boessenkool c5634c4d53 rs6000.md (extenddf<mode>2): Make this a parameterized name.
@extenddf<mode>2


	* config/rs6000/rs6000.md (extenddf<mode>2): Make this a parameterized
	name.
	(floatsi<mode>2): Use that name.  Simplify.

From-SVN: r272903
2019-07-01 20:43:10 +02:00
Uros Bizjak 37d8d439f2 i386.md ("isa" attribute): Add sse_noavx.
* config/i386/i386.md ("isa" attribute): Add sse_noavx.
	("enabled" attribute): Handle sse_noavx isa attribute.
	* config/i386/mmx.md (*vec_dupv2sf): Add "isa" attribute.
	Use TARGET_SSE && SSE_REGNO_P in split condition.
	(*vec_dupv2sf): Ditto.

From-SVN: r272902
2019-07-01 20:41:09 +02:00
Segher Boessenkool a3185de66b rs6000.md (extenddf<mode>2_fprs): Make this a parameterized name.
@extenddf<mode>2_{fprs,vsx}


	* config/rs6000/rs6000.md (extenddf<mode>2_fprs): Make this a
	parameterized name.
	(extenddf<mode>2_vsx): Make this a parameterized name.
	(extenddf<mode>2): Use those names.  Simplify.

From-SVN: r272901
2019-07-01 20:40:40 +02:00
Segher Boessenkool 15f0523424 rs6000.md (eh_set_lr_<mode>): Make this a parameterized name.
@eh_set_lr_<mode>


	* config/rs6000/rs6000.md (eh_set_lr_<mode>): Make this a parameterized
	name.
	(eh_return): Use that name.  Simplify.

From-SVN: r272900
2019-07-01 20:39:52 +02:00
Segher Boessenkool f98342adf9 rs6000.md (ctr<mode>): Make this a parameterized name.
@ctr<mode>


	* config/rs6000/rs6000.md (ctr<mode>): Make this a parameterized name.
	(doloop_end): Use that name.  Simplify.

From-SVN: r272899
2019-07-01 20:39:13 +02:00
Segher Boessenkool d1fcc7f3af rs6000.md (indirect_jump<mode>_nospec): Make this a parameterized name.
@indirect_jump<mode>_nospec


	* config/rs6000/rs6000.md (indirect_jump<mode>_nospec): Make this a
	parameterized name.
	(indirect_jump): Use that name.  Simplify.

From-SVN: r272898
2019-07-01 20:38:21 +02:00
Segher Boessenkool d0e3843ef9 rs6000.md (abs<mode>2_internal): Make this a parameterized name.
@abs<mode>2_internal


	* config/rs6000/rs6000.md (abs<mode>2_internal): Make this a
	parameterized name.
	(abs<mode>2): Use that name.  Simplify.

From-SVN: r272897
2019-07-01 20:37:25 +02:00
Segher Boessenkool da29b9330a rs6000.md (fix_trunc<mode>si2_fprs): Make this a parameterized name.
@fix_trunc<mode>si2_fprs


	* config/rs6000/rs6000.md (fix_trunc<mode>si2_fprs): Make this a
	parameterized name.
	(fix_trunc<mode>si2): Use that name.  Simplify.

From-SVN: r272896
2019-07-01 20:36:34 +02:00
Segher Boessenkool 0254f29ad9 rs6000.md (neg<mode>2): Make this a parameterized name.
@neg<mode>2


	* config/rs6000/rs6000.md (neg<mode>2): Make this a parameterized name.
	(allocate_stack): Use that name.  Simplify.

From-SVN: r272894
2019-07-01 20:35:23 +02:00
Martin Sebor 7b8795a138 PR middle-end/90923 - hash_map destroys elements without constructing them
gcc/ChangeLog:

	PR middle-end/90923
	* hash-map.h (hash_map::put): On insertion invoke element ctor.
	(hash_map::get_or_insert): Same.  Reformat comment.
	* hash-set.h (hash_set::add): On insertion invoke element ctor.
	* hash-map-tests.c (test_map_of_type_with_ctor_and_dtor): New.
 	* hash-set-tests.c (test_map_of_type_with_ctor_and_dtor): New.
	* hash-table.h (hash_table::operator=): Prevent copy assignment.
	 (hash_table::hash_table (const hash_table&)): Use copy ctor
	 instead of assignment to copy elements.

From-SVN: r272893
2019-07-01 12:33:36 -06:00
Wilco Dijkstra 25cd9afbc1 re PR target/90963 (FAIL: gcc.c-torture/execute/built-in-setjmp.c execution test)
PR target/90963
	* config/pa/pa.md (builtin_longjmp): Restore hard_frame_pointer_rtx
	using saved frame pointer.


Co-Authored-By: John David Anglin <danglin@gcc.gnu.org>

From-SVN: r272891
2019-07-01 16:55:42 +00:00
Eric Botcazou 8ad8180392 re PR middle-end/64242 (Longjmp expansion incorrect)
PR middle-end/64242
	* config/sparc/sparc.md (nonlocal_goto): Restore frame pointer last.
	Add frame clobber and schedule blockage.

From-SVN: r272889
2019-07-01 16:26:38 +00:00
Sandra Loosemore 2d526072ef invoke.texi (Link Options): Further editorial changes to -flinker-output docs.
2019-07-01  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* doc/invoke.texi (Link Options): Further editorial changes to
	-flinker-output docs.

From-SVN: r272887
2019-07-01 11:42:49 -04:00
Segher Boessenkool b94eec3bea rs6000: Improve indexed addressing
The function rs6000_force_indexed_or_indirect_mem makes a memory
operand suitable for indexed (or indirect) addressing.  If the memory
address isn't yet valid, it loads the whole thing into a register to
make it valid.  That isn't optimal.  This changes it to load an
address that is the sum of two things into two registers instead.
This results in lower latency code, and if inside loops, a constant
term can be moved outside the loop.


	* config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
	Load both operands of a PLUS into registers separately.

From-SVN: r272886
2019-07-01 17:15:41 +02:00