Commit Graph

177217 Commits

Author SHA1 Message Date
Jakub Jelinek 8be374e027 forwprop: Ignore scalar mode vectors in simplify_vector_constructor [PR95528]
As mentioned in the PR, the problem is that at least the x86 backend asumes
that the vec_unpack* and vec_pack* optabs with integral modes are for the
AVX512-ish vector masks rather than for very small vectors done in GPRs.
The only other target that seems to have a scalar mode vec_{,un}pack* optab
is aarch64 as discussed in the PR, so there is also a condition for that.
All other targets have just vector mode optabs.

2020-06-08  Jakub Jelinek  <jakub@redhat.com>

	PR target/95528
	* tree-ssa-forwprop.c (simplify_vector_constructor): Don't use
	VEC_UNPACK*_EXPR or VEC_PACK_TRUNC_EXPR with scalar modes unless the
	type is vector boolean.

	* g++.dg/opt/pr95528.C: New test.
2020-06-08 11:05:10 +02:00
Jakub Jelinek 296d644b9f testsuite: Fix up pr95548.C testcase.
2020-06-08  Jakub Jelinek  <jakub@redhat.com>

	PR lto/95548
	* g++.dg/torture/pr95548.C: Change from dg-do compile to dg-do link,
	add return type for main, for __SIZEOF_INT128__ test with __uint128_t
	enumerator constants and add a test with unsigned long long
	enumerators for all targets.
2020-06-08 10:31:35 +02:00
Tamar Christina d6430e3ccc AArch64: Expand on comment of stack-clash and implicit probing through LR.
This expands the comment on an assert we have in aarch64_layout_frame
and points to an existing comment somewhere else that has a much longer
explanation of what's going on.

Committed under the GCC Obvious rule.

gcc/ChangeLog:

	* config/aarch64/aarch64.c (aarch64_layout_frame): Expand comments.
2020-06-08 09:23:10 +01:00
Christophe Lyon 635408da1e [arm] Fix vfp_operand_register for VFP HI regs
While looking at PR target/94743 I noticed an ICE when I tried to save
all the FP registers: this was because all HI registers wouldn't match
vfp_register_operand.

gcc/ChangeLog:

	* config/arm/predicates.md (vfp_register_operand): Use VFP_HI_REGS
	instead of VFP_REGS.
2020-06-08 08:19:04 +00:00
Martin Liska 291f65f15a
rs6000: Replace FAIL with gcc_unreachable
gcc/ChangeLog:

	* config/rs6000/vector.md: Replace FAIL with gcc_unreachable
	in all vcond* patterns.
2020-06-08 10:16:59 +02:00
Christophe Lyon e7b3f654f2 [arm] (header usage fix) include c++ algorithm header via system.h
After the recent commit that forces uses of c++11, the arm part failed
to build because it does not include <algorithm> via system.h as
should be done.

This results in:
from /gcc/common/config/arm/arm-common.c:34:
/usr/lib/gcc/x86_64-linux-gnu/5/include/mm_malloc.h:42:12: error:
attempt to use poisoned "malloc"
     return malloc (size);

This patch fixes the problem by defining INCLUDE_ALGORITHM before
including system.h and no longer includes <algorithm> directly.

gcc/ChangeLog:

	* common/config/arm/arm-common.c (INCLUDE_ALGORITHM):
	Define. No longer include <algorithm>.
2020-06-08 08:16:15 +00:00
Steve Baird 48b799ea9a [Ada] Implement AI12-0073 (Ravenscar disallows Synchronous_Barriers)
2020-06-08  Steve Baird  <baird@adacore.com>

gcc/ada/

	* sem_prag.adb (Analyze_Pragma.Set_Ravenscar_Profile): Add
	appropriate call to Set_Restriction_No_Dependence if Ada_Version
	>= Ada2012 and Profile is either Ravenscar or a GNAT-defined
	Ravenscar variant (i.e., not Jorvik).
2020-06-08 03:51:16 -04:00
Arnaud Charlet 63408d0eb2 [Ada] AI12-0204 Renaming of a prefixed view
2020-06-08  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* sem_ch5.adb: Fix typo.
	* sem_ch8.adb (Analyze_Renamed_Primitive_Operation): Check that
	the prefix of a prefixed view must be renamable as an object.
2020-06-08 03:51:15 -04:00
Arnaud Charlet 072c5071e0 [Ada] AI12-0085 Missing aspect cases for Remote_Types
2020-06-08  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* sem_cat.ads: Fix typo.
	* sem_cat.adb (Validate_Remote_Access_To_Class_Wide_Type): Add
	handling of N_Attribute_Definition_Clause.
	* sem_ch13.adb (Analyze_Attribute_Definition_Clause): Call
	Validate_Remote_Access_To_Class_Wide_Type for Storage_Size and
	Storage_Pool.
	* sem_attr.adb, exp_ch4.adb: Update comments.
2020-06-08 03:51:14 -04:00
Justin Squirek a689887372 [Ada] Spurious error on call to controlled primitive
2020-06-08  Justin Squirek  <squirek@adacore.com>

gcc/ada/

	* sem_ch4.adb (Analyze_One_Call): Add extra condition to the
	predicate for deciding when a given controlled call is visible.
2020-06-08 03:51:13 -04:00
Piotr Trojanek 5351d617ec [Ada] Port a modified expansion of Enum_Rep from GNAT to GNATprove
2020-06-08  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

	* exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Port
	changes in frontend expander.
2020-06-08 03:51:12 -04:00
Piotr Trojanek e344ec2553 [Ada] Style cleanups in new code for Pure_Barriers
2020-06-08  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

	* sem_ch13.adb (All_Membership_Choices_Static): Fix style.
2020-06-08 03:51:12 -04:00
Steve Baird a998e58bf0 [Ada] Implement AI12-0291 (Jorvik profile)
2020-06-08  Steve Baird  <baird@adacore.com>

gcc/ada/

	* libgnat/s-rident.ads: Add Jorvik to the Profile_Name
	enumeration type.  Add an element for Jorvik to the array
	aggregate that is the initial value of the constant
	Profile_Info.
	* targparm.adb (Get_Target_Parameters): Handle "pragma Profile
	(Jorvik);" similarly to "pragma Profile (Ravenscar);".
	* snames.ads-tmpl: Declare Name_Jorvik Name_Id. Unlike
	Ravenscar, Jorvik is not a pragma name and has no corresponding
	element in the Pragma_Id enumeration type; this means that its
	declaration must not occur between those of First_Pragma_Name
	and Last_Pragma_Name.
	* sem_prag.adb (Analyze_Pragma): Add call to
	Set_Ravenscar_Profile for Jorvik, similar to the existing calls
	for Ravenscar and the GNAT Ravenscar variants.
2020-06-08 03:51:11 -04:00
Arnaud Charlet 4b8c2c4ba3 [Ada] AI12-0228 Properties of qualified expressions used as names
2020-06-08  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* sem_ch8.adb (Analyze_Object_Renaming): Update Get_Object_Name
	to go through N_Qualified_Expression and N_Type_Conversion.  Fix
	another case of wrong usage of E_Anonymous_Access_Type instead
	of Anonymous_Access_Kind.
	* sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Work
	on the original node.
	(Is_Aliased_View): Take into account N_Qualified_Expression.
2020-06-08 03:51:10 -04:00
Arnaud Charlet 8eda13a49e [Ada] Fix handling of 'Enum_Rep and renamings
2020-06-08  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* sem_eval.adb (Eval_Type_Conversion): Fix handling of
	enumeration to integer conversions.
	* exp_attr.adb (Expand_N_Attribute_Reference
	[Attribute_Enum_Rep]): Remove special casing for first-level
	renaming, best left to the general folding mechanism via
	Eval_Type_Conversion.
2020-06-08 03:51:09 -04:00
Eric Botcazou bbe7d67f5f [Ada] Remove the Has_Dynamic_Range_Check flag
2020-06-08  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* atree.adb (New_Copy): Do not clear Has_Dynamic_Range_Check.
	* checks.ads (Append_Range_Checks): Remove Flag_Node parameter.
	(Insert_Range_Checks): Likewise and remove default value of
	Static_Loc parameter.
	* checks.adb (Append_Range_Checks): Remove Flag_Node parameter.
	Do not test and set Has_Dynamic_Range_Check.
	(Insert_Range_Checks): Likewise and remove default value of
	Static_Loc parameter.
	* csinfo.adb (CSinfo): Remove 'L' from [NEUB]_Fields pattern and
	do not handle Has_Dynamic_Range_Check.
	* exp_ch5.adb (Expand_N_Assignment_Statement): Remove argument
	in call to Insert_Range_Checks.
	* sem_ch3.adb (Analyze_Subtype_Declaration): Do not fiddle
	with Has_Dynamic_Range_Check.
	(Process_Range_Expr_In_Decl): Remove argument in calls to
	Insert_Range_Checks and Append_Range_Checks.
	* sinfo.ads (Has_Dynamic_Range_Check): Delete.
	(Set_Has_Dynamic_Range_Check): Likewise.
	* sinfo.adb (Has_Dynamic_Range_Check): Delete.
	(Set_Has_Dynamic_Range_Check): Likewise.
	* treepr.adb (Print_Node): Do not print Has_Dynamic_Range_Check.
2020-06-08 03:51:08 -04:00
Steve Baird 6476fc372a [Ada] Implement AI12-0290 (Simple_Barriers restriction)
2020-06-08  Steve Baird  <baird@adacore.com>

gcc/ada/

	* sem_ch13.ads: Export new function
	All_Membership_Choices_Static.
	* sem_ch13.adb: Implement new function
	All_Membership_Choices_Static.  This involves moving the
	functions Is_Static_Choice and All_Membership_Choices_Static,
	which were previously declared within the function
	Is_Predicate_Static, out to library level so that they can be
	called by the new function. The already-exisiting code in
	Is_Predicate_Static which became the body of
	All_Membership_Choices_Static is replaced with a call to the new
	function in order to avoid duplication.
	* exp_ch9.adb (Is_Pure_Barrier): Several changes needed to
	implement rules of AI12-0290 and RM D.7's definition of
	"pure-barrier-eligible". These changes include adding a call to
	the new function Sem_13.All_Membership_Choices_Static, as per
	the "see 4.9" in RM D.7(1.6/5).
2020-06-08 03:51:07 -04:00
Richard Kenner 8b0ec65d85 [Ada] Issue with unnesting of 'First/Last and renaming
2020-06-08  Richard Kenner  <kenner@adacore.com>

gcc/ada/

	* exp_unst.adb (Visit_Node): When visiting array attribute
	nodes, in addition to checking the type of Get_Referenced_Object
	of the prefix, also check the actual type of the prefix.
2020-06-08 03:51:06 -04:00
Gary Dismukes 24eda9e701 [Ada] Implement predicate checks on qualified expressions (AI12-0100)
2020-06-08  Gary Dismukes  <dismukes@adacore.com>

gcc/ada/

	* checks.adb (Apply_Predicate_Check): Refine test for being in a
	subprogram body to account for no Corresponding_Body case,
	avoiding blowups arising due to other changes here.
	* exp_ch4.adb (Expand_N_Qualified_Expression): Apply predicate
	checks, if any, after constraint checks are applied.
	* sem_eval.ads (Check_Expression_Against_Static_Predicate): Add
	Check_Failure_Is_Error formal for conditionalizing warning vs.
	error messages.
	* sem_eval.adb (Check_Expression_Against_Static_Predicate):
	Issue an error message rather than a warning when the new
	Check_Failure_Is_Error formal is True. In the nonstatic or
	Dynamic_Predicate case where the predicate is known to fail,
	emit the check to ensure that folded cases get checks applied.
	* sem_res.adb (Resolve_Qualified_Expression): Call
	Check_Expression_Against_Static_Predicate, passing True for
	Check_Failure_Is_Error, to ensure we reject static predicate
	violations. Remove code that was conditionally calling
	Apply_Predicate_Check, which is no longer needed, and that check
	procedure shouldn't be called from a resolution routine in any
	case. Also remove associated comment about preventing infinite
	recursion and consistency with Resolve_Type_Conversion, since
	that handling was already similarly removed from
	Resolve_Type_Convesion at some point.
	(Resolve_Type_Conversion): Add passing of True for
	Check_Failure_Is_Error parameter on call to
	Check_Expression_Against_Static_Predicate, to ensure that static
	conversion cases that violate a predicate are rejected as
	errors.
2020-06-08 03:51:06 -04:00
Piotr Trojanek 7b7f1ca1b2 [Ada] Restore Snames.Name_SPARK as it used in the GNATprove backend
2020-06-08  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

	* snames.ads-tmpl (Name_SPARK): Restore after being deleted.
2020-06-08 03:51:05 -04:00
Arnaud Charlet 7907619e77 [Ada] Remove processing of SPARK_05 restriction
2020-06-08  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* exp_aggr.adb, exp_ch6.adb, par-ch11.adb, par-ch6.adb,
	par-ch7.adb, par-prag.adb, restrict.adb, restrict.ads,
	scans.ads, scng.adb, sem_aggr.adb, sem_attr.adb, sem_ch11.adb,
	sem_ch12.adb, sem_ch3.adb, sem_ch3.ads, sem_ch4.adb,
	sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_ch8.adb, sem_ch9.adb,
	sem_res.adb, sem_util.adb, sem_util.ads, snames.ads-tmpl,
	gnatbind.adb, libgnat/s-rident.ads,
	doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
	Remove processing of SPARK_05 restriction.
	* gnat_rm.texi: Regenerate.
	* opt.ads: Remove processing of old checksum which is now
	handled by gprbuild directly.
2020-06-08 03:51:04 -04:00
Arnaud Charlet b4aa6e2978 [Ada] AI12-0287 Legality Rules for null exclusions in renaming are too fierce
2020-06-08  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* sem_ch12.adb (Instantiate_Object): Relax rules related to null
	exclusions and generic objects. Handle all anonymous types
	consistently and not just E_Anonymous_Access_Type.
	* sem_ch8.adb (Analyze_Object_Renaming): Change wording so that
	it applies to both renamings and instantiations to avoid
	confusion.
2020-06-08 03:51:03 -04:00
Arnaud Charlet 58c4038810 [Ada] Ada.Text_IO: fix typo
2020-06-08  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* libgnat/a-textio.ads (File_Mode): Fix typo in comment.
2020-06-08 03:51:02 -04:00
Eric Botcazou 8214938ab2 [Ada] Do not warn on partial access to atomic object with address clause
2020-06-08  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* sem_res.adb (Resolve_Indexed_Component): Do not give a warning
	for a nonatomic component of an atomic array which is subject to
	an address clause in Ada 2020 mode.
	(Resolve_Selected_Component): Likewise for an atomic record.
2020-06-08 03:51:01 -04:00
Philippe Gil 591bdee0fa [Ada] Add gnatname use for multiple units files support
2020-06-08  Philippe Gil  <gil@adacore.com>

gcc/ada/

	* doc/gnat_ugn/the_gnat_compilation_model.rst: in "Handling
	Files with Multiple Units" part documents gnatname use for
	unmodified files handling and gnatchop use for files
	refactoring.
	* gnat_ugn.texi: Regenerate.
2020-06-08 03:51:00 -04:00
Arnaud Charlet fccf77d504 [Ada] Update doc on Enum_Rep/Enum_Val
2020-06-08  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* doc/gnat_rm/implementation_defined_attributes.rst:
	Enum_Rep/Enum_Val are standard Ada 202x attributes.
	* gnat_rm.texi: Regenerate.
2020-06-08 03:50:59 -04:00
Javier Miranda 176de68377 [Ada] Better code generation for nested aggregates
2020-06-08  Javier Miranda  <miranda@adacore.com>

gcc/ada/

	* exp_aggr.adb (Safe_Component): Remove code that considers as
	unsafe components that are aggregates; such removal allows the
	frontend to proceed and evaluate if they are safe by means of
	invoking Safe_Aggregate.
2020-06-08 03:50:58 -04:00
Piotr Trojanek c382d0712f [Ada] Reuse standard expansion of 'First and 'Last in GNATprove mode
2020-06-08  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

	* exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Apply
	standard expansion to attributes First and Last.
2020-06-08 03:50:57 -04:00
Piotr Trojanek 3ebf0cbda5 [Ada] Reuse Get_Index_Subtype in the special expander for GNATprove
2020-06-08  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

	* exp_attr.adb, exp_util.ads, exp_util.adb (Get_Index_Subtype):
	Move from the body of Exp_Attr to Exp_Util and expose from the
	spec.
	* exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Replace
	duplicated code with a call to Get_Index_Subtype.
2020-06-08 03:50:57 -04:00
Arnaud Charlet 6e063ac388 [Ada] AI12-0226 Make objects more consistent
2020-06-08  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* sem_ch8.adb (Analyze_Object_Renaming): Simplify code by moving
	many special cases to Is_Object_Reference and removing others by
	only checking renamings coming from sources.
	* sem_util.adb (Is_Object_Reference): Update for AI12-0226 and
	add more regular handling of 'Priority. Remove special cases no
	longer needed now that we are only checking renamings coming
	from sources.
2020-06-08 03:50:56 -04:00
Claire Dross ae9293fb8e [Ada] Silence spurious warning on instances of formal vectors
2020-06-08  Claire Dross  <dross@adacore.com>

gcc/ada/

	* libgnat/a-cofove.adb (Insert_Space): The computation of Index
	generates a spurious compiler warning about a value not being in
	range for a statically dead branch.  Silence it using pragma
	Warnings.
2020-06-08 03:50:55 -04:00
Bob Duff d2f7fa08bd [Ada] gnatbind: Deterministic No_Entry_Calls_In_Elaboration_Code messages
2020-06-08  Bob Duff  <duff@adacore.com>

gcc/ada/

	* bindo-graphs.adb (function Add_Edge): Rename
	Add_Edge_With_Return to Add_Edge; we can tell it returns because
	it's a function, and overloading seems appropriate in this case.
	If Activates_Task=True, and we're not going to add a new edge
	because an existing Pred-->Succ edge already exists, then set
	Activates_Task to True on the preexisting edge.  This ensures
	that the message:

	info: use pragma Restrictions (No_Entry_Calls_In_Elaboration_Code)

	appears when appropriate, no matter in what order the edges
	happened to be processed.
	(procedure Add_Edge): Remove redundant assertions.
	(Activates_Task): Other kinds of edges can have
	Activates_Task=True.  For example, if we had a With_Edge and
	then an Invocation_Edge with Activates_Task=True, then the
	With_Edge has Activates_Task set to True.
	(Add_Edge_Kind_Check): New procedure to prevent other bugs of
	this nature. For example, if we were to sometimes call Add_Edge
	for a Spec_Before_Body_Edge followed by Add_Edge for a
	With_Edge, and sometimes in the other order, that would cause a
	similar bug to what we're fixing here.
	(Set_Is_Recorded_Edge): Val parameter is not used. Get rid of
	it.
	(Set_Activates_Task): New procedure to set the Activates_Task flag.
	* bindo-graphs.ads (Library_Graph_Edge_Kind): Reorder the
	enumeration literals to facilitate Add_Edge_Kind_Check.
	* ali.adb (Known_ALI_Lines): The comment about "still available"
	was wrong. Fix that by erasing the comment, and encoding the
	relevant information in real code. Take advantage of Ada's full
	coverage rules by removing "others =>".  Also DRY.
2020-06-08 03:50:54 -04:00
Ed Schonberg 2f7294f23e [Ada] Ada_2020: shared variable control aspects on formal derived types
2020-06-08  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* par-ch12.adb (P_Formal_Derived_Type_Definition): Handle
	properly formal derived types that include aspect
	specifications, so that the "with" keyword appears twice in the
	formal type declaration.
	* sem_ch13.adb (Has_Generic_Parent): Return true if the type
	itself is a generic formal.
2020-06-08 03:50:53 -04:00
Dmitriy Anisimkov 8472d81ea0 [Ada] Fix socket timeout correction for Windows Server 2019 case
2020-06-08  Dmitriy Anisimkov  <anisimko@adacore.com>

gcc/ada/

	* socket.c (__gnat_minus_500ms): Remove
	IsWindowsVersionOrGreater from condition.
2020-06-08 03:50:52 -04:00
Claire Dross 54c1fdb62b [Ada] Add Depends contracts to Delete procedures of formal containers
2020-06-08  Claire Dross  <dross@adacore.com>

gcc/ada/

	* libgnat/a-cfdlli.ads, libgnat/a-cfhama.ads,
	libgnat/a-cfhase.ads, libgnat/a-cforma.ads, libgnat/a-cforse.ads
	(Delete): Add Depends contract.
2020-06-08 03:50:52 -04:00
Arnaud Charlet 9490fd58a8 [Ada] AI12-0309 Missing checks for pragma Suppress
2020-06-08  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* snames.ads-tmpl (Name_Program_Error_Check,
	Name_Tasking_Check): New constants.
	* types.ads (Program_Error_Check, Tasking_Check): New constants.
	(All_Checks): Update accordingly.
2020-06-08 03:50:51 -04:00
GCC Administrator 53d461e4e0 Daily bump. 2020-06-08 00:16:23 +00:00
Iain Buclaw 0a2ee4099d d: Merge upstream dmd 73d8e2fec.
Renames the enum PROTKIND to Prot::Kind, updates all uses of the
original enum accordingly.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd 73d8e2fec.
	* decl.cc (get_symbol_decl): Use new Prot::Kind enum.
	* modules.cc (get_internal_fn): Likewise.
2020-06-08 00:10:11 +02:00
Uros Bizjak f08995eefb i386: Improve expansion of __builtin_parity
GCC currently hides the shift and xor reduction inside a backend
specific UNSPEC PARITY, making it invisible to the RTL optimizers until
very late during compilation.  It is normally reasonable for the
middle-end to maintain wider mode representations for as long as possible
and split them later, but this only helps if the semantics are visible
at the RTL-level (to combine and other passes), but UNSPECs are black
boxes, so in this case splitting early (during RTL expansion) is a
better strategy.

It turns out that that popcount instruction on modern x86_64 processors
has (almost) made the integer parity flag in the x86 ALU completely
obsolete, especially as POPCOUNT's integer semantics are a much better
fit to RTL.  The one remaining case where these transistors are useful
is where __builtin_parity is immediately tested by a conditional branch,
and therefore the result is wanted in a flags register rather than as
an integer.  This case is captured by two peephole2 optimizations in
the attached patch.

2020-06-07  Roger Sayle  <roger@nextmovesoftware.com>

gcc/ChangeLog:

	* config/i386/i386.md (paritydi2, paritysi2): Expand reduction
	via shift and xor to an USPEC PARITY matching a parityhi2_cmp.
	(paritydi2_cmp, paritysi2_cmp): Delete these define_insn_and_split.
	(parityhi2, parityqi2): New expanders.
	(parityhi2_cmp): Implement set parity flag with xorb insn.
	(parityqi2_cmp): Implement set parity flag with testb insn.
	New peephole2s to use these insns (UNSPEC PARITY) when appropriate.

gcc/testsuite/ChangeLog:

	* gcc.target/i386/parity-3.c: New test.
	* gcc.target/i386/parity-4.c: Likewise.
	* gcc.target/i386/parity-5.c: Likewise.
	* gcc.target/i386/parity-6.c: Likewise.
	* gcc.target/i386/parity-7.c: Likewise.
	* gcc.target/i386/parity-8.c: Likewise.
	* gcc.target/i386/parity-9.c: Likewise.
2020-06-07 22:09:49 +02:00
Iain Buclaw fced594b31 d: Merge upstream dmd 108ca1bcd.
Renames OutBuffer::peekString to OutBuffer::peekChars, and
OutBuffer::extractString to OutBuffer::extractChars.  All callers have
been updated as appropriate.

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

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd 108ca1bcd.
	* d-diagnostic.cc (expand_d_format): Adjust to use extractChars().
	* d-frontend.cc (Loc::toChars): Likewise.
	* d-lang.cc (deps_write): Likewise.
	(d_parse_file): Likewise.
	* decl.cc (d_mangle_decl): Likewise.
	* intrinsics.cc (maybe_set_intrinsic): Likewise.
2020-06-07 19:44:20 +02:00
Iain Buclaw c3a2ba10b2 d: Merge upstream dmd b0df0e982
Adds a struct ParameterList to encapulate parameter and vararg
information in the front-end.

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

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd b0df0e982.
	* d-builtins.cc (build_frontend_type): Use VarArg for varargs_p.
	* d-codegen.cc (declaration_type): Call TypeFunction::create with
	argument VARARGnone.
	(parameter_type): Likewise.
	(d_build_call): Use new field names and member functions.
	* d-target.cc (Target::cppParameterType): Call TypeFunction::create
	with argument VARARGnone.
	* types.cc (TypeVisitor::visit (TypeFunction *): Use new field names
	and member functions.
2020-06-07 16:50:46 +02:00
Harald Anlauf 5aaccde3db PR fortran/95091 - Buffer overflows with submodules and long symbols
Add cast to fix bootstrap error with -Werror=sign-compare.

gcc/fortran/
	PR fortran/95091
	* class.c (gfc_hash_value): Add cast.
2020-06-07 16:43:12 +02:00
Iain Buclaw 761306fc5e d: Merge upstream dmd 1831b24ff.
Converts some global and param fields from pointers to value types.

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

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd 1831b24ff.
	* d-lang.cc (d_init_options): Remove initialization of updated fields.
	(d_handle_option): Adjust for new field types.
2020-06-07 16:39:39 +02:00
Harald Anlauf b342cfd648 PR fortran/95091 - Buffer overflows with submodules and long symbols
With submodules, name mangling results in long internal symbols.  This
requires adjustment of the sizes of temporaries to avoid buffer overflows.

2020-06-07  Harald Anlauf  <anlauf@gmx.de>

gcc/fortran/
	PR fortran/95091
	* class.c (get_unique_type_string, gfc_hash_value): Enlarge
	buffers, and check whether the strings returned by
	get_unique_type_string() fit.
2020-06-07 14:47:24 +02:00
Iain Buclaw d8930b1387 d: Merge upstream dmd cef1e7991.
Adds a DString type, a struct that has a compatible layout with D
strings.  Many parameters in the Global struct have been switched over
to this type, and users of these params have been adjust to use the
length or ptr field as appropriate.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd cef1e7991.
	* d-lang.cc (d_parse_file): Adjust for new field types.
2020-06-07 14:16:33 +02:00
guojiufu 557a40f599 rs6000: allow cunroll to grow size according to -funroll-loop or -fpeel-loops
Previously, flag_unroll_loops was turned on at -O2 implicitly.  This
also turned on cunroll with allowance size increasing, and cunroll
will unroll/peel the loop even the loop is complex like code in PR95018.
With this patch, size growth for cunroll is allowed only for if -funroll-loops
or -fpeel-loops or -O3 is specified explicitly.

gcc/ChangeLog
2020-06-07  Jiufu Guo  <guojiufu@linux.ibm.com>

	PR target/95018
	* config/rs6000/rs6000.c (rs6000_option_override_internal):
	Override flag_cunroll_grow_size.
2020-06-07 17:35:01 +08:00
guojiufu 71489d8e75 Introduce flag_cunroll_grow_size for cunroll
Currently GIMPLE complete unroller(cunroll) is checking
flag_unroll_loops and flag_peel_loops to see if allow size growth.
Beside affects curnoll, flag_unroll_loops also controls RTL unroler.
To have more freedom to control cunroll and RTL unroller, this patch
introduces flag_cunroll_grow_size.  With this patch, we can control
cunroll and RTL unroller indepently.

gcc/ChangeLog
2020-06-07  Jiufu Guo  <guojiufu@linux.ibm.com>

	* common.opt (flag_cunroll_grow_size): New flag.
	* toplev.c (process_options): Set flag_cunroll_grow_size.
	* tree-ssa-loop-ivcanon.c (pass_complete_unroll::execute):
	Use flag_cunroll_grow_size.
2020-06-07 17:35:01 +08:00
Thomas Koenig 905ba62ec9 Added test case for a PR which has been fixed in the meantime.
gcc/testsuite/ChangeLog:

	PR tree-optimization/50439
	* gfortran.dg/loop_interchange_2.f: New test.
2020-06-07 10:45:10 +02:00
GCC Administrator 8f94b078cc Daily bump. 2020-06-07 00:16:19 +00:00
Jan Hubicka eca7a60bd2 Fix ICE in ODR enum streaming [PR95548]
gcc/ChangeLog:

2020-06-06  Jan Hubicka  <hubicka@ucw.cz>

	PR lto/95548
	* ipa-devirt.c (struct odr_enum_val): Turn values to wide_int.
	(ipa_odr_summary_write): Update streaming.
	(ipa_odr_read_section): Update streaming.

gcc/testsuite/ChangeLog:

2020-06-06  Jan Hubicka  <hubicka@ucw.cz>

	* g++.dg/torture/pr95548.C: New test.
2020-06-06 22:19:46 +02:00