Commit Graph

169962 Commits

Author SHA1 Message Date
Ed Schonberg
c3c41b296a [Ada] Unnesting: handle conditional expressions
2019-07-04  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* exp_unst.adb: Handle conditional expressions.

From-SVN: r273053
2019-07-04 08:05:50 +00:00
Yannick Moy
3d53efa692 [Ada] Skip code not in SPARK for ownership analysis
Ownership rules for pointer support should only apply to code marked in
SPARK. There is no impact on compilation.

2019-07-04  Yannick Moy  <moy@adacore.com>

gcc/ada/

	* sem_spark.adb (Check_Package_Spec, Check_Package_Body): Only
	analyze parts of the code marked in SPARK.

From-SVN: r273052
2019-07-04 08:05:45 +00:00
Hristian Kirtchev
bc1146e5e0 [Ada] Minor reformatting
2019-07-04  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

	* erroutc.adb, exp_aggr.adb, inline.adb, opt.adb, sem_ch3.adb:
	Minor reformatting.

From-SVN: r273051
2019-07-04 08:05:40 +00:00
Yannick Moy
b04fe972e3 [Ada] Better error messages for ownership errors in SPARK
When SPARK code does not follow the ownership rules of SPARK RM 3.10,
the error message now points to a location explaining why the object has
a more restricted permission than the expected one.

There is no impact on compilation.

2019-07-04  Yannick Moy  <moy@adacore.com>

gcc/ada/

	* sem_spark.adb (Explanation, Get_Expl): New functions to get
	the explanation for a permission mismatch.
	(Perm_Error, Perm_Mismatch, Perm_Error_Loop_Exit): Take
	explanation into account for issuing a more precise error
	message.
	(Set_Perm_Prefixes, Set_Perm_Extensions,
	Set_Perm_Extensions_Move): Pass suitable argument for the
	explanation node.

From-SVN: r273050
2019-07-04 08:05:36 +00:00
Arnaud Charlet
4ff5aa0c05 [Ada] CCG: reduce generated temporaries
2019-07-04  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* exp_aggr.adb (In_Place_Assign_OK): Moved to top level and add
	support for record aggregates.
	(Component_Check): Use Is_CCG_Supported_Aggregate instead of a
	similar local predicate.
	(Convert_To_Assignments): Take advantage of In_Place_Assign_OK
	predicate when possible.
	(Is_CCG_Supported_Aggregate): Return False for records with
	representation clauses and fix the logic for dealing with nested
	aggregates.

From-SVN: r273049
2019-07-04 08:05:31 +00:00
Piotr Trojanek
d8be36d287 [Ada] Keep assertions in internal units enabled for GNATprove
In GNATprove mode the assertion policy is now always enabled, even when
analysing internal units. Otherwise, assertion expressions (e.g.
Default_Initial_Condition) in internal units (e.g. Ada.Text_IO)
disappear in the semantic analysis phase of the frontend and the
GNATprove backend can't see them.

No frontend test provided, because only the GNATprove backend is
affected (and there appear to be no difference in the output with -gnatG
switch, because the expansion of Default_Initial_Condition is not
attached to the AST).

2019-07-04  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

	* opt.adb (Set_Config_Switches): Keep assertions policy as
	enabled when analysing internal units in GNATprove mode.

From-SVN: r273048
2019-07-04 08:05:27 +00:00
Arnaud Charlet
a0766a8258 [Ada] CCG: restrict folding for boolean tests
2019-07-04  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* exp_ch4.adb (Expand_Short_Circuit_Operator): Strip
	N_Variable_Reference_Marker when checking for the presence of
	actions.

From-SVN: r273047
2019-07-04 08:05:23 +00:00
Arnaud Charlet
cd93d2d89d [Ada] Reduce emitted code size in CCG for aggregate assignment
2019-07-04  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* exp_aggr.adb (Check_Component): Take into account type
	conversions.

From-SVN: r273046
2019-07-04 08:05:17 +00:00
Dmitriy Anisimkov
b7d5159ec9 [Ada] GNAT.Sockets: fix socket timeout on recent Windows versions
2019-07-04  Dmitriy Anisimkov  <anisimko@adacore.com>

gcc/ada/

	* doc/gnat_ugn/platform_specific_information.rst: Document
	Windows socket timeout particularity.
	* gnat_ugn.texi: Regenerate.
	* gsocket.h: Include versionhelpers.h.
	* socket.c (__gnat_minus_500ms): New function.
	* libgnat/g-sothco.ads (Minus_500ms_Windows_Timeout): New
	imported function.
	* libgnat/g-socket.adb (Set_Socket_Option): Refactor to remove
	500ms from the requested timeout only on old Windows version.

From-SVN: r273045
2019-07-04 08:05:13 +00:00
Thomas Quinot
1708a783b5 [Ada] Get_Scos: Remove bogus, dead code
The nonsensical snippet was found by Codepeer. No behavior change.

2019-07-04  Thomas Quinot  <quinot@adacore.com>

gcc/ada/

	* get_scos.adb: Remove bogus, dead code.

From-SVN: r273044
2019-07-04 08:05:08 +00:00
Ed Schonberg
dcd59a994a [Ada] Spurious dimensionality error on aggregate with "others" assoc.
This patch fixes a spurious dimensionality error on an array aggregate
with a single "others' clause whose expression is a dimensioned entity,
The expansion of the aggregate may create copies of the expression, and
the dimensionality check must use the type of the expression to retrieve
the proper dimension information to check against the dimensions of the
array component type.

2019-07-04  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* sem_dim.adb (Analyze_Dimension_Array_Aggregate): If the
	component is an entity name, its dimensions are those of its
	type.

gcc/testsuite/

	* gnat.dg/dimensions2.adb, gnat.dg/dimensions2_phys.ads,
	gnat.dg/dimensions2_real_numbers.ads: New testcase.

From-SVN: r273043
2019-07-04 08:05:03 +00:00
Richard Biener
ee7904e91f tree-ssa-sccvn.h (vn_reference_lookup): Add last_vuse_ptr argument.
2019-07-04  Richard Biener  <rguenther@suse.de>

	* tree-ssa-sccvn.h (vn_reference_lookup): Add last_vuse_ptr
	argument.
	* tree-ssa-sccvn.c (last_vuse_ptr, vn_walk_kind): Move
	globals into...
	(struct vn_walk_cb_data): New callback data struct.
	(vn_reference_lookup_2): Adjust.
	(vn_reference_lookup_3): Likewise.
	(vn_reference_lookup_pieces): Likewise.
	(vn_reference_lookup): Likewise, get last_vuse_ptr argument.
	(visit_reference_op_load): Adjust.

From-SVN: r273042
2019-07-04 07:35:12 +00:00
Jakub Jelinek
6f01ad76c1 re PR tree-optimization/91063 (ICE in set_vinfo_for_stmt, at tree-vectorizer.c:676)
PR tree-optimization/91063
	* tree-vect-stmts.c (vect_init_vector): Call gsi_remove to remove
	stmt from stmts sequence before calling vect_init_vector_1.
	Formatting fix.

	* gcc.dg/gomp/pr91063.c: New test.

From-SVN: r273041
2019-07-04 09:25:28 +02:00
Prathamesh Kulkarni
75da268e1a re PR target/88833 ([SVE] Redundant moves for WHILELO-based loops)
2019-07-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

	PR target/88833
	* fwprop.c (reg_single_def_p): New function.
	(propagate_rtx_1): Add unconditional else inside RTX_EXTRA case.
	(forward_propagate_into): New parameter reg_prop_only
	with default value false.
	Propagate def's src into loop only if SET_SRC and SET_DEST
	of def_set have single definitions.
	Likewise if reg_prop_only is set to true.
	(fwprop): New param fwprop_addr_p.
	Integrate fwprop_addr into fwprop.
	(fwprop_addr): Remove.
	(pass_rtl_fwprop_addr::execute): Call fwprop with arg set
	to true.
	(pass_rtl_fwprop::execute): Call fwprop with arg set to false.
	* simplify-rtx.c (simplify_subreg): Add case for vector comparison.
	* config/i386/sse.md (UNSPEC_BLENDV): Adjust pattern.

testsuite/
	* gfortran.dg/pr88833.f90: New test.

From-SVN: r273040
2019-07-04 06:48:42 +00:00
Jakub Jelinek
6b15061954 re PR tree-optimization/91069 (Miscompare of 453.povray since r272843)
PR middle-end/91069
	* gcc.dg/pr91069.c (v2df): Use 2 * sizeof (double) instead of
	hardcoded 16 for better portability.
	(v2di): Change from long vector to long long vector.  Use
	2 * sizeof (long long) instead of hardcoded 16.

From-SVN: r273039
2019-07-04 07:10:52 +02:00
Jakub Jelinek
6218005284 omp-low.c (lower_omp_scan): Call lower_omp on stmt's body in worksharing loop scans.
* omp-low.c (lower_omp_scan): Call lower_omp on stmt's body
	in worksharing loop scans.

From-SVN: r273038
2019-07-04 06:55:59 +02:00
Jakub Jelinek
6c96b432c9 re PR tree-optimization/91074 (c-c++-common/gomp/scan-3.c fails with ICE starting with r272958)
PR tree-optimization/91074
	* omp-low.c (lower_omp_for_scan): Set DECL_GIMPLE_REG_P on cplx
	temporary.

From-SVN: r273037
2019-07-04 06:54:52 +02:00
Jakub Jelinek
a59b2e4206 re PR rtl-optimization/90756 (g++ ICE in convert_move, at expr.c:218 on i686 and s390x)
PR rtl-optimization/90756
	* explow.c (promote_ssa_mode): Always use TYPE_MODE, don't bypass it
	for VECTOR_TYPE_P.

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

From-SVN: r273036
2019-07-04 06:49:22 +02:00
Ian Lance Taylor
0e68d70b7f compiler: optimize 0,1,2-case select statement
For a select statement with zero-, one-, or two-case with a
    default case, we can generate simpler code instead of calling the
    generic selectgo. A zero-case select is just blocking the
    execution. A one-case select is mostly just executing the case. A
    two-case select with a default case is a non-blocking send or
    receive. We add these special cases for lowering a select
    statement.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/184998

From-SVN: r273034
2019-07-04 02:20:37 +00:00
Chenghua Xu
9c5784fa75 [MIPS][Testsuite] Specify msa-fmadd.c abis.
gcc/testsuite/

        * gcc.target/mips/mips-fmadd.c: Rename to ... 
        * gcc.target/mips/mips-fmadd-o32.c: ... Here; add abi=32.
        * gcc.target/mips/mips-fmadd-n64.c: New.

From-SVN: r273033
2019-07-04 01:54:02 +00:00
Ian Lance Taylor
4c5f7762a9 compiler: fix indentation of select statement AST dump
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/184997

From-SVN: r273032
2019-07-04 01:48:57 +00:00
GCC Administrator
c93d9e4fa8 Daily bump.
From-SVN: r273031
2019-07-04 00:16:21 +00:00
Ian Lance Taylor
651c754cfb compiler: set varargs lowered for imported call expressions
Fix compiler buglet: varargs lowering happens before inlinable
    function bodies are written out to export data, so set the "varargs
    lowered" flag on call expressions that we import.
    
    Fixes golang/go#32922
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/184919

From-SVN: r273026
2019-07-03 22:27:51 +00:00
Jonathan Wakely
67699bf667 PR libstdc++/91067 fix missing exports for filesystem iterators
The copy assignment operator for recursive_directory_iterator was not
exported despite being needed. The __shared_ptr default constructors are
not needed when compiling with GCC but Clang requires them for -O1.

	PR libstdc++/91067
	* acinclude.m4 (libtool_VERSION): Bump to 6:27:0.
	* configure: Regenerate.
	* config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export
	missing symbols.
	* testsuite/27_io/filesystem/iterators/91067.cc: New test.
	* testsuite/util/testsuite_abi.cc: Add new symbol version.

From-SVN: r273023
2019-07-03 22:06:25 +01:00
Dennis Zhang
1bbffb87a9 [AArch64] Remove constraint strings from define_expand constructs
A number of AArch64 define_expand patterns have specified constraints
for their operands. But the constraint strings are ignored at expand
time and are therefore redundant/useless. We now avoid specifying
constraints in new define_expands, but we should clean up the existing
define_expand definitions.

For example, the constraint "=w" is removed in the following case:
(define_expand "sqrt<mode>2"
    [(set (match_operand:GPF_F16 0 "register_operand" "=w")
The "" marks with an empty constraint in define_expand are removed as well.

2019-07-03  Dennis Zhang  <dennis.zhang@arm.com>

gcc/
	* config/aarch64/aarch64.md: Remove redundant constraints from
	define_expand but keep some patterns untouched if they are
	specially selected by TARGET_SECONDARY_RELOAD hook.
	* config/aarch64/aarch64-sve.md: Likewise.
	* config/aarch64/atomics.md: Remove redundant constraints from
	define_expand.
	* config/aarch64/aarch64-simd.md: Likewise.

From-SVN: r273021
2019-07-03 19:52:04 +00:00
Iain Sandoe
03eddfb3b5 [Darwin] Revise pie,no-pie and rdynamic driver specs.
Processing these early and pushing the corresponding Xlinker lines
has the effect that the driver then supposes that there are linker
inputs, and causes a link line to be created when it is not needed 

The solution is to place these drive specs into the link spec and
claim them at the end of that.

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

	* config/darwin.h (DRIVER_SELF_SPECS): Remove the linker cases.
	(RDYNAMIC): Rename to, DARWIN_RDYNAMIC.
	(DARWIN_PIE_SPEC, DARWIN_NOPIE_SPEC): Adjust to remove the Xlinker
	clauses.
	(LINK_COMMAND_SPEC_A): Add DARWIN_RDYNAMIC, DARWIN_PIE_SPEC and
	DARWIN_NOPIE_SPEC.

From-SVN: r273017
2019-07-03 18:43:55 +00:00
Iain Sandoe
179c7ef523 [Darwin] Some TLC for older Darwin versions.
The library handling and some of the options for creating the crts for
the older PPC Darwin versions had bit-rotted somewhat.  This adjusts the
build criteria for the crts to avoid newer ld64 versions warnings about
mismatches in build and object versions.

Added to some of the comments that it's documented why the specs are as
they are.

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

gcc/

	* config/darwin.h (REAL_LIBGCC_SPEC): Adjust for earlier Darwin.
	(STARTFILE_SPEC): Split crt3 into a separate spec.
	(DARWIN_EXTRA_SPECS): Add crt2 and crt3 spec.
	(DARWIN_CRT2_SPEC): New.
	(DARWIN_CRT3_SPEC): New.
	(MIN_LD64_OMIT_STUBS): Revise to 62.1.
	* config/rs6000/darwin.h (DARWIN_CRT2_SPEC): Revise conditions.
	(DARWIN_CRT3_SPEC): New.

libgcc/

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

	* config.host (powerpc-*-darwin*,powerpc64-*-darwin*): Revise crt
	list.
	* config/rs6000/t-darwin: Build crt3_2 for older systems.  Revise
	mmacosx-version-min for crts to run across all system versions.
	* config/rs6000/t-darwin64 (LIB2ADD): Remove.
	* config/t-darwin: Revise mmacosx-version-min for crts to run across
	system versions >= 10.4.

From-SVN: r273016
2019-07-03 18:36:28 +00:00
Michael Meissner
911c8df0a3 altivec.md (altivec_mov<mode>, [...]): Change the RTL attribute "length" from "4" to "*" to allow the length attribute...
2019-07-03  Michael Meissner  <meissner@linux.ibm.com>

	* config/rs6000/altivec.md (altivec_mov<mode>, VM2 iterator):
	Change the RTL attribute "length" from "4" to "*" to allow the
	length attribute to be adjusted automatically for prefixed load,
	store, and add immediate instructions.
	* config/rs6000/rs6000.md (extendhi<mode>2, EXTHI iterator):
	Likewise.
	(extendsi<mode>2, EXTSI iterator): Likewise.
	(movsi_internal1): Likewise.
	(movsi_from_sf): Likewise.
	(movdi_from_sf_zero_ext): Likewise.
	(mov<mode>_internal): Likewise.
	(movcc_internal1, QHI iterator): Likewise.
	(mov<mode>_softfloat, FMOVE32 iterator): Likewise.
	(movsf_from_si): Likewise.
	(mov<mode>_hardfloat32, FMOVE64 iterator): Likewise.
	(mov<mode>_softfloat64, FMOVE64 iterator): Likewise.
	(mov<mode>, FMOVE128 iterator): Likewise.
	(movdi_internal64): Likewise.
	* config/rs6000/vsx.md (vsx_le_permute_<mode>, VSX_TI iterator):
	Likewise.
	(vsx_le_undo_permute_<mode>, VSX_TI iterator): Likewise.
	(vsx_mov<mode>_64bit, VSX_M iterator): Likewise.
	(vsx_mov<mode>_32bit, VSX_M iterator): Likewise.
	(vsx_splat_v4sf): Likewise.

From-SVN: r273013
2019-07-03 17:42:09 +00:00
Wilco Dijkstra
e5833b5649 Fix store merging tests on Arm
Fix the failing store merging test on Arm.  Aligning variables fixes a
few cases, otherwise disable the test on Arm.  All store merging tests
now pass.  Committed as obvious.

    testsuite/
	* gcc.dg/store_merging_27.c: Fix test for Arm.
	* gcc.dg/store_merging_28.c: Likewise.
	* gcc.dg/store_merging_29.c: Likewise.
	* gcc.dg/tree-ssa/dump-6.c: Likewise.

From-SVN: r273011
2019-07-03 16:40:17 +00:00
Ian Lance Taylor
a35d6e9f21 compiler: include transitive imports in the type descriptor list
In CL 179598, we were using Gogo::packages_, when compiling the
    main package, as the list of packages of which we need to
    register the type descriptors. This is not complete. It only
    includes main's direct import and one-level indirect imports. It
    does not include all the packages transitively imported.
    
    To fix that, we need to track all the transitive imports. We
    have almost already done that, for init functions. However, there
    may be packages that don't need init functions but do need to
    register type descriptors. For them, we add a dummy init function
    to its export data. So when we compile the main package we will
    see all the transitive imports. The dummy init functions are not
    real functions and are not called.
    
    Fixes golang/go#32901.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/184717

From-SVN: r273009
2019-07-03 13:23:39 +00:00
Mark Wielaard
6c47a87b66 PR debug/90981 Empty .debug_addr crashes -gdwarf-5 -gsplit-dwarf
Even if there was no, or an empty address list we would try to generate
a header for the .debug_addr section with -gdwarf-5 and -gsplit-dwarf.
The skeleton DIE would also get a (dangling) DW_AT_addr_base in that case.

	PR debug/90981
	* dwarf2out.c (add_top_level_skeleton_die_attrs): Only add
	DW_AT_addr_base if there is actually a .debug_addr section with
	addresses.
	(output_addr_table): Add DWARF5 table header generation here after
	checking there are actually any addresses from...
	(dwarf2out_finish): ...here.
	* testsuite/g++.dg/pr90981.C: New test.

From-SVN: r273008
2019-07-03 13:08:01 +00:00
Richard Biener
cc49641a71 re PR tree-optimization/91069 (Miscompare of 453.povray since r272843)
2019-07-03  Richard Biener  <rguenther@suse.de>

	PR middle-end/91069
	* match.pd (vec_perm -> bit_insert): Fix element read from
	first vector.

	* gcc.dg/pr91069.c: New testcase.

From-SVN: r273007
2019-07-03 12:47:07 +00:00
Martin Liska
d398999dbe Add dbgcnt for gimple_match and generic_match.
2019-07-03  Martin Liska  <mliska@suse.cz>

	* dbgcnt.def (DEBUG_COUNTER): Add match debug counter.
	* genmatch.c (dt_simplify::gen_1): Generate dbgcnt
	condition.
	* generic-match-head.c: Include dbgcnt.h.
	* gimple-match-head.c: Likewise.

From-SVN: r273006
2019-07-03 12:43:44 +00:00
Martin Liska
596341c741 Rename SINGE_VALUE to TOPN_VALUES counters.
2019-07-03  Martin Liska  <mliska@suse.cz>

	* gcov-counter.def (GCOV_COUNTER_V_SINGLE): Remove.
	(GCOV_COUNTER_V_TOPN): New.
	(GCOV_COUNTER_V_INDIR): Use _topn.
	* gcov-io.h (GCOV_DISK_SINGLE_VALUES): Remove.
	(GCOV_TOPN_VALUES): New.
	(GCOV_SINGLE_VALUE_COUNTERS): Remove.
	(GCOV_TOPN_VALUES_COUNTERS): New.
	* profile.c (instrument_values): Use HIST_TYPE_TOPN_VALUES.
	* tree-profile.c:
	(gimple_init_gcov_profiler): Rename variables from one_value
	to topn_values.
	(gimple_gen_one_value_profiler): Remove.
	(gimple_gen_topn_values_profiler): New function.
	* value-prof.c (dump_histogram_value): Use TOPN_VALUES
	names instead of SINGLE_VALUE.
	(stream_out_histogram_value): Likewise.
	(stream_in_histogram_value): Likewise.
	(get_most_common_single_value): Likewise.
	(gimple_divmod_fixed_value_transform): Likewise.
	(gimple_stringops_transform): Likewise.
	(gimple_divmod_values_to_profile): Likewise.
	(gimple_stringops_values_to_profile): Likewise.
	(gimple_find_values_to_profile): Likewise.
	* value-prof.h (enum hist_type): Rename to TOPN.
	(gimple_gen_one_value_profiler): Remove.
	(gimple_gen_topn_values_profiler): New.
2019-07-03  Martin Liska  <mliska@suse.cz>

	* Makefile.in: Use topn_values instead of one_value names.
	* libgcov-merge.c (__gcov_merge_single): Move to ...
	(__gcov_merge_topn): ... this.
	(merge_single_value_set): Move to ...
	(merge_topn_values_set): ... this.
	* libgcov-profiler.c (__gcov_one_value_profiler_body): Move to
	...
	(__gcov_topn_values_profiler_body): ... this.
	(__gcov_one_value_profiler_v2): Move to ...
	(__gcov_topn_values_profiler): ... this.
	(__gcov_one_value_profiler_v2_atomic): Move to ...
	(__gcov_topn_values_profiler_atomic): ... this.
	(__gcov_indirect_call_profiler_v4): Remove.
	* libgcov-util.c (__gcov_single_counter_op): Move to ...
	(__gcov_topn_counter_op): ... this.
	* libgcov.h (L_gcov_merge_single): Remove.
	(L_gcov_merge_topn): New.
	(__gcov_merge_single): Remove.
	(__gcov_merge_topn): New.
	(__gcov_one_value_profiler_v2): Move to ..
	(__gcov_topn_values_profiler): ... this.
	(__gcov_one_value_profiler_v2_atomic): Move to ...
	(__gcov_topn_values_profiler_atomic): ... this.

From-SVN: r273005
2019-07-03 12:42:23 +00:00
Martin Liska
1b309ca5ed Support N values in libgcov for single value counter type.
2019-07-03  Martin Liska  <mliska@suse.cz>

	* gcc.dg/tree-prof/val-prof-2.c: Update scanned pattern
	as we do now better.
2019-07-03  Martin Liska  <mliska@suse.cz>

	* libgcov-merge.c (merge_single_value_set): Support N values.
	* libgcov-profiler.c (__gcov_one_value_profiler_body): Likewise.

From-SVN: r273004
2019-07-03 12:42:02 +00:00
Eric Botcazou
e157be919b dwarf2out.c (add_scalar_info): Add back refererence to existing DIE if it has the DW_AT_data_member_location...
* dwarf2out.c (add_scalar_info): Add back refererence to existing DIE
	if it has the DW_AT_data_member_location attribute.

From-SVN: r273002
2019-07-03 11:58:49 +00:00
Richard Biener
6235b0788c gimple-pretty-print.c (dump_ternary_rhs): Fix BIT_INSERT_EXPR dumping.
2019-07-03  Richard Biener  <rguenther@suse.de>

	* gimple-pretty-print.c (dump_ternary_rhs): Fix BIT_INSERT_EXPR
	dumping.

From-SVN: r273001
2019-07-03 11:01:01 +00:00
Sylvia Taylor
0e510d1824 [aarch64]: force frame pointer setup before tlsdesc call
The operation that sets up the tlsdesc register is really a function
call; as such, the frame pointer should really be correctly set up
before this happens.  However, because it does not appear as a
call_insn in the RTL the normal dependencies are not added
automatically.  We fix this by adding a USE of FP_REGNUM to prevent
migration of the frame-pointer setup past the call by the scheduler.
If a frame pointer is not being used, this is harmless since it only
represents a scheduling constraint.

2019-07-03  Sylvia Taylor  <sylvia.taylor@arm.com>

	* config/aarch64/aarch64.md (FP_REGNUM): New constant.
	(tlsdesc_small_advsimd_<mode>): Add use of FP_REGNUM.
	(tlsdesc_small_sve_<mode>): Likewise.

From-SVN: r273000
2019-07-03 10:57:28 +00:00
Andrea Corallo
e676d70449 Fix ChangeLog date for last commit
From-SVN: r272999
2019-07-03 09:42:05 +00:00
Andrea Corallo
e7dbf7f069 Add myself to MAINTAINERS
2019-07-02  Andrea Corallo  <andrea.corallo@arm.com>

	* MAINTAINERS (Write After Approval): Add myself.

From-SVN: r272997
2019-07-03 09:09:26 +00:00
Martin Liska
87741e51b5 Add zstd support for LTO bytecode compression.
2019-07-03  Martin Liska  <mliska@suse.cz>

	* Makefile.in: Define ZSTD_LIB.
	* common.opt: Adjust compression level
	to support also zstd levels.
	* config.in: Regenerate.
	* configure: Likewise.
	* configure.ac: Add --with-zstd and --with-zstd-include options
	and detect ZSTD.
	* doc/install.texi: Mention zstd dependency.
	* gcc.c: Print supported LTO compression algorithms.
	* lto-compress.c (lto_normalized_zstd_level): Likewise.
	(lto_compression_zstd): Likewise.
	(lto_uncompression_zstd): Likewise.
	(lto_end_compression): Dispatch in between zlib and zstd.
	(lto_compression_zlib): Mark with ATTRIBUTE_UNUSED.
	(lto_uncompression_zlib): Make it static.
	* lto-compress.h (lto_end_uncompression): Fix GNU coding style.
	* lto-section-in.c (lto_get_section_data): Pass info
	about used compression.
	* lto-streamer-out.c: By default use zstd when possible.
	* timevar.def (TV_IPA_LTO_DECOMPRESS): Rename to decompression
	(TV_IPA_LTO_COMPRESS): Likewise for compression.

From-SVN: r272996
2019-07-03 08:36:54 +00:00
Martin Liska
88614dfa2b Add .gnu.lto_.lto section.
2019-07-03  Martin Liska  <mliska@suse.cz>

	* lto-section-in.c (lto_get_section_data): Add "lto" section.
	* lto-section-out.c (lto_destroy_simple_output_block): Never
	compress LTO_section_lto section.
	* lto-streamer-out.c (produce_asm): Do not set major_version
	and minor_version.
	(lto_output_toplevel_asms): Likewise.
	(produce_lto_section): New function.
	(lto_output): Call produce_lto_section.
	(lto_write_mode_table): Do not set major_version and
	minor_version.
	(produce_asm_for_decls): Likewise.
	* lto-streamer.h (enum lto_section_type): Add LTO_section_lto
	type.
	(struct lto_header): Remove.
	(struct lto_section): New struct.
	(struct lto_simple_header): Do not inherit from lto_header.
	(struct lto_file_decl_data): Add lto_section_header field.
2019-07-03  Martin Liska  <mliska@suse.cz>

	* lto-common.c: Read LTO section and verify header.

From-SVN: r272995
2019-07-03 08:36:35 +00:00
Martin Liska
8ba6ea878f Remove another bunch of dead assignment.
2019-07-03  Martin Liska  <mliska@suse.cz>

	* lra-eliminations.c (eliminate_regs_in_insn): Remove
	dead assignemts.
	* reg-stack.c (check_asm_stack_operands): Likewise.
	* tree-ssa-structalias.c (create_function_info_for): Likewise.
	* tree-vect-generic.c (expand_vector_operations_1): Likewise.
	* config/i386/i386-expand.c (ix86_expand_sse2_mulvxdi3): Use
	force_expand_binop.
2019-07-03  Martin Liska  <mliska@suse.cz>

	* c-common.c (try_to_locate_new_include_insertion_point): Remove
	dead assignemts.
2019-07-03  Martin Liska  <mliska@suse.cz>

	* call.c (build_new_op_1): Remove
	dead assignemts.
	* typeck.c (cp_build_binary_op): Likewise.
2019-07-03  Martin Liska  <mliska@suse.cz>

	* check.c (gfc_check_c_funloc): Remove
	dead assignemts.
	* decl.c (variable_decl): Likewise.
	* resolve.c (resolve_typebound_function): Likewise.
	* simplify.c (gfc_simplify_matmul): Likewise.
	(gfc_simplify_scan): Likewise.
	* trans-array.c (gfc_could_be_alias): Likewise.
	* trans-common.c (add_equivalences): Likewise.
	* trans-expr.c (trans_class_vptr_len_assignment): Likewise.
	(gfc_trans_array_constructor_copy): Likewise.
	(gfc_trans_assignment_1): Likewise.
	* trans-intrinsic.c (conv_intrinsic_atomic_op): Likewise.
	* trans-openmp.c (gfc_omp_finish_clause): Likewise.
	* trans-types.c (gfc_get_array_descriptor_base): Likewise.
	* trans.c (gfc_build_final_call): Likewise.
2019-07-03  Martin Liska  <mliska@suse.cz>

	* line-map.c (linemap_get_expansion_filename): Remove
	dead assignemts.
	* mkdeps.c (make_write): Likewise.

From-SVN: r272994
2019-07-03 08:34:20 +00:00
Martin Liska
6aa2e42cb4 Handle '\0' in strcmp in RTL expansion (PR tree-optimization/90892).
2019-07-03  Martin Liska  <mliska@suse.cz>

	PR tree-optimization/90892
	* builtins.c (inline_expand_builtin_string_cmp): Handle '\0'
	in string constants.
2019-07-03  Martin Liska  <mliska@suse.cz>

	PR tree-optimization/90892
	* gcc.dg/pr90892.c: New test.

From-SVN: r272993
2019-07-03 08:32:25 +00:00
Martin Liska
d04295d243 Add to same comdate group only if set (PR middle-end/90899)
2019-07-03  Martin Liska  <mliska@suse.cz>

	PR middle-end/90899
	* multiple_target.c (create_dispatcher_calls): Add to comdat
	group only if set for ifunc.
2019-07-03  Martin Liska  <mliska@suse.cz>

	PR middle-end/90899
	* gcc.target/i386/pr90899.c: New test.

From-SVN: r272992
2019-07-03 08:31:35 +00:00
Martin Liska
22dfc3e89d Fix use-after-scope in host-mingw32.c (PR target/88056).
2019-07-03  Martin Liska  <mliska@suse.cz>

	PR target/88056
	* config/i386/host-mingw32.c (mingw32_gt_pch_use_address):
	Define local_object_name in outer scope in order to handle
	use-after-scope issue.

From-SVN: r272991
2019-07-03 08:29:48 +00:00
Martin Liska
8e37c995c6 Add -fprofile-note option.
2019-07-03  Martin Liska  <mliska@suse.cz>

	* common.opt: Add fprofile-note.
	* coverage.c (coverage_init): Append the option
	to bbg_file_name.
	* doc/invoke.texi: Document -fprofile-note.

From-SVN: r272990
2019-07-03 08:29:08 +00:00
Jakub Jelinek
a7b3509eb6 re PR tree-optimization/91033 (ICE in vect_analyze_loop, at tree-vect-loop.c:2416)
PR tree-optimization/91033
	* tree-vectorizer.h (vect_mark_stmts_to_be_vectorized,
	vect_analyze_data_refs): Add bool * arguments.
	* tree-vect-data-refs.c (vect_analyze_data_refs): Add fatal argument,
	if failure is due to scatter/gather, set *fatal to false if non-NULL.
	* tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
	* tree-vect-loop.c (vect_analyze_loop_2): Adjust
	vect_mark_stmts_to_be_vectorized and vect_analyze_data_refs callers.
	* tree-vect-slp.c (vect_slp_analyze_bb_1): Adjust
	vect_analyze_data_refs caller.

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

From-SVN: r272989
2019-07-03 10:25:22 +02:00
Bob Duff
49d0d5fc6f [Ada] Document new flags in GNATpp
2019-07-03  Bob Duff  <duff@adacore.com>

gcc/ada/

	* doc/gnat_ugn/gnat_utility_programs.rst: Document new flags in
	GNATpp.

From-SVN: r272988
2019-07-03 08:16:34 +00:00
Hristian Kirtchev
76b4158b8f [Ada] Forced elaboration order in Elaboration order v4.0
This patch refactors the forced elaboration order functionality,
reintegrates it in Binde, and impelements it in Bindo.

------------
-- Source --
------------

--  server.ads

package Server is
end Server;

--  client.ads

with Server;

package Client is
end Client;

--  main.adb

with Client;

procedure Main is begin null; end Main;

--  duplicate_1.txt

server (spec)
client (spec)
server (spec)

--  error_unit_1.txt

no such unit
client (spec)

--  error_unit_2.txt

no such unit
client (spec)

--  error_unit_3.txt

no such unit     --  comment
client (spec)

--  error_unit_4.txt

         no such unit     --  comment

client (spec)

--  error_unit_5.txt

no such unit (body)
client (spec)

--  error_unit_6.txt

    no such unit (body)
client (spec)

--  error_unit_7.txt

    no such unit (body)    --  comment
client (spec)

--  error_unit_8.txt

    no such unit (body)--  comment
client (spec)

--  error_unit_9.txt

    no such unit--  comment
client (spec)

--  no_unit_1.txt

--  no_unit_2.txt

--  no_unit_3.txt

      --  comment

--  no_unit_4.txt

--  no_unit_5.txt

--  no_unit_6.txt

       --  comment

--  no_unit_7.txt

--  no_unit_8.txt

    --  comment
--  comment

--  ok_unit_1.txt

server (spec)
client (spec)

--  ok_unit_2.txt

    server (spec)
client (spec)

--  ok_unit_3.txt

    server (spec)
client (spec)

--  ok_unit_4.txt

    server (spec)      --  comment
client (spec)

--  ok_unit_5.txt

server (spec)
client (spec)

--  ok_unit_6.txt

server (spec)
client (spec)    --  comment

--  ok_unit_7.txt

server (spec)
client (spec)    --  comment

--  ok_unit_8.txt

    --  comment
--  comment
    server (spec)

   --  comment
--  comment

client (spec)    --  comment

--  ok_unit_9.txt

server (spec)--  comment
client (spec)

----------------------------
-- Compilation and output --
----------------------------
$ gnatmake -q main.adb
$ gnatbind -fno_unit_1.txt main.ali
$ gnatbind -fno_unit_2.txt main.ali
$ gnatbind -fno_unit_3.txt main.ali
$ gnatbind -fno_unit_4.txt main.ali
$ gnatbind -fno_unit_5.txt main.ali
$ gnatbind -fno_unit_6.txt main.ali
$ gnatbind -fno_unit_7.txt main.ali
$ gnatbind -fno_unit_8.txt main.ali
$ gnatbind -ferror_unit_1.txt main.ali
$ gnatbind -ferror_unit_2.txt main.ali
$ gnatbind -ferror_unit_3.txt main.ali
$ gnatbind -ferror_unit_4.txt main.ali
$ gnatbind -ferror_unit_5.txt main.ali
$ gnatbind -ferror_unit_6.txt main.ali
$ gnatbind -ferror_unit_7.txt main.ali
$ gnatbind -ferror_unit_8.txt main.ali
$ gnatbind -ferror_unit_9.txt main.ali
$ gnatbind -fduplicate_1.txt main.ali
$ gnatbind -fok_unit_1.txt main.ali
$ gnatbind -fok_unit_2.txt main.ali
$ gnatbind -fok_unit_3.txt main.ali
$ gnatbind -fok_unit_4.txt main.ali
$ gnatbind -fok_unit_5.txt main.ali
$ gnatbind -fok_unit_6.txt main.ali
$ gnatbind -fok_unit_7.txt main.ali
$ gnatbind -fok_unit_8.txt main.ali
$ gnatbind -fok_unit_9.txt main.ali
"no such unit": not present; ignored
"no such unit": not present; ignored
"no such unit": not present; ignored
"no such unit": not present; ignored
"no such unit%b": not present; ignored
"no such unit%b": not present; ignored
"no such unit%b": not present; ignored
"no such unit%b": not present; ignored
"no such unit": not present; ignored
server (spec) <-- client (spec)
error: duplicate_1.txt:3: duplicate unit name "server (spec)" from line 1
server (spec) <-- client (spec)
server (spec) <-- client (spec)
server (spec) <-- client (spec)
server (spec) <-- client (spec)
server (spec) <-- client (spec)
server (spec) <-- client (spec)
server (spec) <-- client (spec)
server (spec) <-- client (spec)
server (spec) <-- client (spec)

2019-07-03  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

	* binde.adb: Remove with clause for System.OS_Lib.
	(Force_Elab_Order): Refactor the majority of the code in Butil.
	Use the new forced units iterator to obtain unit names.
	* bindo-builders.adb: Add with and use clauses for Binderr,
	Butil, Opt, Output, Types, GNAT, and GNAT.Dynamic_HTables.  Add
	a hash table which maps units to line number in the forced
	elaboration order file.
	(Add_Unit): New routine.
	(Build_Library_Graph): Create forced edges between pairs of
	units listed in the forced elaboration order file.
	(Create_Forced_Edge, Create_Forced_Edges, Destroy_Line_Number,
	Duplicate_Unit_Error, Hash_Unit, Internal_Unit_Info,
	Is_Duplicate_Unit, Missing_Unit_Info): New routines.
	* bindo-graphs.adb (Is_Internal_Unit, Is_Predefined_Unit):
	Refactor some of the behavior to Bindo-Units.
	* bindo-graphs.ads: Enable the enumeration literal for forced
	edges.
	* bindo-units.adb, bindo-units.ads (Is_Internal_Unit,
	Is_Predefined_Unit): New routines.
	* butil.adb: Add with and use clauses for Opt, GNAT, and
	System.OS_Lib.  Add with clause for Unchecked_Deallocation.
	(Has_Next, Iterate_Forced_Units, Next, Parse_Next_Unit_Name,
	Read_Forced_Elab_Order_File): New routines.
	* butil.ads: Add with and use clauses for Types.  Add new
	iterator over the units listed in the forced elaboration order
	file.
	(Has_Next, Iterate_Forced_Units, Next): New routine.
	* namet.adb, namet.ads (Present): New routine.

From-SVN: r272987
2019-07-03 08:16:29 +00:00