1. 25 Apr, 2017 35 commits
    • [multiple changes] · ded462b0
      2017-04-25  Gary Dismukes  <dismukes@adacore.com>
      
      	* exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
      	correction.
      
      2017-04-25  Yannick Moy  <moy@adacore.com>
      
      	* sem_res.adb (Resolve_Comparison_Op): Do not
      	attempt evaluation of relational operations inside assertions.
      
      2017-04-25  Justin Squirek  <squirek@adacore.com>
      
      	* exp_util.adb (Add_Interface_Invariants):
      	Restored, code moved back from Build_Invariant_Procedure_Body.
      	(Add_Parent_Invariants): Restored, code moved back from
      	Build_Invariant_Procedure_Body.
      	(Build_Invariant_Procedure_Body):
      	Remove refactored calls and integrated code from
      	Add_Parent_Invariants and Add_Interface_Invariants.
      
      2017-04-25  Johannes Kanig  <kanig@adacore.com>
      
      	* errout.adb (Output_Messages): Adjust computation of total
      	errors
      	* erroutc.adb (Error_Msg): In statistics counts, deal
      	correctly with informational messages that are not warnings.
      	* errutil.adb (Finalize): adjust computation of total errors.
      
      2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
      
      	* terminals.c (__gnat_terminate_pid): New.
      	* g-exptty.ads (Terminate_Process): New. Update comments.
      
      From-SVN: r247157
      Arnaud Charlet committed
    • [multiple changes] · d1eb8a82
      2017-04-25  Arnaud Charlet  <charlet@adacore.com>
      
      	* a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
      
      2017-04-25  Justin Squirek  <squirek@adacore.com>
      
      	* sem_ch3.adb (Analyze_Declarations): Minor
      	correction to comments, move out large conditional and scope
      	traversal into a predicate.
      	(Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
      	logic.
      
      2017-04-25  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch4.adb (Analyze_Selected_Component): Refine analysis
      	of prefix whose type is a current instance of a synchronized
      	type. If the prefix is an object this is an external call (or
      	requeue) that can only access public operations of the object. The
      	previous predicate was too restrictive, and did not allow public
      	protected operations, only task entries.
      
      2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* sem_ch5.adb, fname.adb: Minor reformatting.
      
      2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* einfo.adb (Is_Anonymous_Access_Type): New routine.
      	* einfo.ads Update the placement of
      	E_Anonymous_Access_Subprogram_Type along with all subtypes that
      	mention the ekind.
      	(Is_Anonymous_Access_Type): New routine.
      	* exp_ch7.adb (Allows_Finalization_Master): Do not generate a
      	master for an access type subject to pragma No_Heap_Finalization.
      	* exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
      	allocated or deallocated does not finalization actions if the
      	associated access type is subject to pragma No_Heap_Finalization.
      	* opt.ads Add new global variable No_Heap_Finalization_Pragma.
      	* par-prag.adb Pragma No_Heap_Finalization does not need special
      	processing from the parser.
      	* sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
      	??? comments. Use the new predicate Is_Anonymous_Access_Type.
      	* sem_prag.adb Add an entry in table Sig_Flags for pragma
      	No_Heap_Finalization.
      	(Analyze_Pragma): Add processing for
      	pragma No_Heap_Finalization. Update various error messages to
      	use Duplication_Error.
      	* sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
      	* snames.ads-tmpl: Add new predefined name No_Heap_Finalization
      	and corresponding pragma id.
      
      From-SVN: r247156
      Arnaud Charlet committed
    • [multiple changes] · 820f1162
      2017-04-25  Bob Duff  <duff@adacore.com>
      
      	* freeze.adb (Freeze_Record_Type): Use the
      	underlying type of the component type to determine whether it's
      	elementary. For representation clause purposes, a private type
      	should behave the same as its full type.
      	* fname.ads, fname.adb (Is_Predefined_File_Name):
      	Make sure things like "system.ali" are recognized as predefined.
      
      2017-04-25  Javier Miranda  <miranda@adacore.com>
      
      	* debug.adb: Update documentation of -gnatd.6.
      
      2017-04-25  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
      	element iterator when the name is an overloaded function call,
      	one of whose interpretations yields an array.
      
      From-SVN: r247155
      Arnaud Charlet committed
    • [multiple changes] · 998429d6
      2017-04-25  Bob Duff  <duff@adacore.com>
      
      	* uname.ads, uname.adb (Is_Predefined_Unit_Name,
      	Is_Internal_Unit_Name): New functions for operating on unit
      	names, as opposed to file names. There's some duplicated code
      	with fname.adb, which is unfortunate, but it seems like we don't
      	want to add dependencies here.
      	* fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
      	to Is_Predefined_Unit_Name; the former was wrong, because Uname
      	is not a file name at all.
      	* fname.ads, fname.adb: Document the fact that
      	Is_Predefined_File_Name and Is_Internal_File_Name can be called
      	for ALI files, and fix the code so it works properly for ALI
      	files. E.g. these should return True for "system.ali".
      
      2017-04-25  Justin Squirek  <squirek@adacore.com>
      
      	* exp_util.adb (Add_Invariant): Removed,
      	code moved to Add_Invariant_Check, Add_Inherited_Invariant,
      	and Add_Own_Invariant.	(Add_Invariant_Check): Used
      	for adding runtime checks from any kind of invariant.
      	(Add_Inherited_Invariant): Generates invariant checks for
      	class-wide invariants (Add_Interface_Invariants): Removed, code
      	moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
      	Create a types own invariant procedure (Add_Parent_Invariants):
      	Removed, code moved to Build_Invariant_Procedure_Body
      	(Build_Invariant_Procedure_Body): Add refactored calls
      	and integrated code from Add_Parent_Invariants and
      	Add_Interface_Invariants.
      	(Process_Type): Removed, the
      	relavant code was inlined into both Add_Own_Invariant and
      	Add_Inherited_Invariant.
      
      From-SVN: r247154
      Arnaud Charlet committed
    • [multiple changes] · 94d3a18d
      2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
      	scn.adb, osint.adb, fname.adb: Minor reformatting.
      
      2017-04-25  Pascal Obry  <obry@adacore.com>
      
      	* s-taprop-mingw.adb: Do not check for CloseHandle in
      	Finalize_TCB.
      
      From-SVN: r247153
      Arnaud Charlet committed
    • [multiple changes] · 51148dda
      2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* sem_util.adb (Check_Part_Of_Reference):
      	Continue to examine the context if the reference appears within
      	an expression function.
      
      2017-04-25  Justin Squirek  <squirek@adacore.com>
      
      	* exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
      	and Build_Invariant_Procedure_Declaration.
      	* exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
      	and Build_Invariant_Procedure_Declaration from exp_ch7
      	and break-out Is_Untagged_Private_Derivation from
      	Build_Invariant_Procedure_Body.
      	(Replace_Type_References):
      	Append an extra parameter to allow for dispatching replacements
      	and add the corrasponding logic.
      	(Type_Invariant): Remove
      	Replace_Typ_Refs and replace its references with calls to
      	Replace_Type_References.
      	* sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
      
      From-SVN: r247152
      Arnaud Charlet committed
    • [multiple changes] · b043ae01
      2017-04-25  Bob Duff  <duff@adacore.com>
      
      	* sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
      	that returns True when appropriate.
      	* par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
      	when compiling predefined files.
      	* fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
      	"gnat.adc" should not be considered a predefined file name.
      	That required (or at least encouraged) a lot of cleanup of global
      	variable usage. We shouldn't be communicating information via
      	the global name buffer.
      	* bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
      	* restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
      	required by the above-mentioned cleanup.
      
      2017-04-25  Ed Schonberg  <schonberg@adacore.com>
      
      	* osint.adb (Find_File): Handle properly a request for a
      	configuration file whose name is a directory.
      
      From-SVN: r247151
      Arnaud Charlet committed
    • [multiple changes] · b6e6a4e3
      2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* sem_attr.adb, sem_ch5.adb: Minor reformatting.
      
      2017-04-25  Bob Duff  <duff@adacore.com>
      
      	* types.ads: Minor: Fix '???' comment.
      	* sem_ch8.adb: Minor comment fix.
      
      2017-04-25  Bob Duff  <duff@adacore.com>
      
      	* sem_prag.adb: Remove suspicious uses of Name_Buf.
      	* stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
      	Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
      	Add String_To_Name with no side effects.
      
      2017-04-25  Justin Squirek  <squirek@adacore.com>
      
      	* sem_ch3.adb (Analyze_Declarations): Add
      	additional condition for edge case.
      
      2017-04-25  Bob Duff  <duff@adacore.com>
      
      	* par-ch2.adb, scans.ads, scn.adb: Do not give an error for
      	reserved words inside pragmas. This is necessary to allow the
      	pragma name Interface to be used in pragma Ignore_Pragma.
      	* par.adb: Minor comment fix.
      
      2017-04-25  Javier Miranda  <miranda@adacore.com>
      
      	* a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
      	* rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
      	* exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
      	* exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
      	occurrences of RE_Type_Is_Abstract
      
      2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* exp_util.adb (Build_Chain): Account for ancestor
      	subtypes while traversing the derivation chain.
      
      From-SVN: r247150
      Arnaud Charlet committed
    • [multiple changes] · f8a21934
      2017-04-25  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_attr.adb: minor reformatting.
      
      2017-04-25  Doug Rupp  <rupp@adacore.com>
      
      	* sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
      
      2017-04-25  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
      	the first pass over an assignment statement with target names,
      	to prevent the generation of subtypes (such as discriminated
      	record components)that may carry the target name outside of the
      	tree for the assignment. The subtypes will be generated when
      	the assignment is reanalyzed in full.
      	(Analyze_Target_Name): Handle properly class-wide types.
      
      From-SVN: r247149
      Arnaud Charlet committed
    • [multiple changes] · b619c88e
      2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
      	* exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
      	the purposes of freezing.
      	* exp_util.adb Update the documentation and structure of the
      	type map used in class-wide semantics of assertion expressions.
      	(Add_Inherited_Tagged_DIC): There is really no need to preanalyze
      	and resolve the triaged expression because all substitutions
      	refer to the proper entities.  Update the replacement of
      	references.
      	(Build_DIC_Procedure_Body): Add formal parameter
      	For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
      	are now only processed when freezing occurs.  Build a body only
      	when one is needed.
      	(Entity_Hash): Removed.
      	(Map_Types): New routine.
      	(Replace_Object_And_Primitive_References): Removed.
      	(Replace_References): New routine.
      	(Replace_Type_References): Moved to the library level of Exp_Util.
      	(Type_Map_Hash): New routine.
      	(Update_Primitives_Mapping): Update the mapping call.
      	(Update_Primitives_Mapping_Of_Types): Removed.
      	* exp_util.ads (Build_DIC_Procedure_Body): Add formal
      	parameter For_Freeze and update the comment on usage.
      	(Map_Types): New routine.
      	(Replace_References): New routine.
      	(Replace_Type_References): Moved to the library level of Exp_Util.
      	(Update_Primitives_Mapping_Of_Types): Removed.
      	* sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
      	properties of the private type to the full view in case the full
      	view derives from a parent type and inherits a DIC pragma.
      	* sem_prag.adb (Analyze_Pragma): Guard against a case where a
      	DIC pragma is placed at the top of a declarative region.
      
      2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
      
      	* a-tasatt.adb: Complete previous change and use an unsigned
      	int to avoid overflow checks.
      
      2017-04-25  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
      	the error message when the attribute reference is an actual in
      	a call to a subprogram inherited from a generic formal type with
      	unknown discriminants, which makes the subprogram and its formal
      	parameters intrinsic (see RM 6.3.1 (8) and (13)).
      
      From-SVN: r247148
      Arnaud Charlet committed
    • [multiple changes] · 2bb988bb
      2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
      	sem_prag.adb: Minor reformatting.
      
      2017-04-25  Bob Duff  <duff@adacore.com>
      
      	* sem_attr.adb (Type_Key): Add code in the
      	recursive Compute_Type_Key to protect against fetching the source
      	code for Standard, in case a component of the type is declared
      	in Standard. There was already code to do this for the original
      	type, but not for its components.
      
      From-SVN: r247147
      Arnaud Charlet committed
    • [multiple changes] · b03d3f73
      2017-04-25  Javier Miranda  <miranda@adacore.com>
      
      	* exp_ch3.adb (Build_Initialization_Call): Handle
      	subtypes of private types when searching for the underlying full
      	view of a private type.
      
      2017-04-25  Javier Miranda  <miranda@adacore.com>
      
      	* sem_res.adb (Set_Mixed_Mode_Operand): A universal
      	real conditional expression can appear in a fixed-type context
      	and must be resolved with that context to facilitate the code
      	generation to the backend.
      
      2017-04-25  Ed Schonberg  <schonberg@adacore.com>
      
      	* einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
      	to indicate whether during inline processing, when some unit U1
      	appears in the context of a unit U2 compiled for instantiation
      	or inlining purposes, the body of U1 needs to be compiled as well.
      	* sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
      	context is a package declaration.
      	* sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
      	Analyze_Generic_Package_Declaration): ditto.
      	* inline.adb (Analyze_Inlined_Bodies): Check
      	Body_Needed_For_Inlining.
      
      2017-04-25  Ed Schonberg  <schonberg@adacore.com>
      
      	* par.adb (Current_Assign_Node): Global variable use to record
      	the presence of a target_name in the right hand side of the
      	assignment being parsed.
      	* par-ch4.adb (P_Name): If the name is a target_name, mark the
      	enclosing assignment node accordingly.
      	* par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
      	appropriately.
      	* sem_ch5.adb (Analyze_Assignment): Disable expansion before
      	analyzing RHS if the statement has target_names.
      	* sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
      	properly choices that are subtype marks.
      	* exp_ch5.adb: Code cleanup.
      
      2017-04-25  Bob Duff  <duff@adacore.com>
      
      	* s-memory.adb: Add a comment regarding efficiency.
      	* atree.adb: Fix the assertion, and combine 2 assertions into one,
      	"the source has an extension if and only if the destination does."
      	* sem_ch3.adb, sem_ch13.adb: Address ??? comments.
      
      2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
      
      	* a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
      	conversion.
      
      2017-04-25  Doug Rupp  <rupp@adacore.com>
      
      	* init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
      	handling for ppc64-vx7.
      	* sigtramp-vxworks-target.inc
      	[SIGTRAMP_BODY]: Add section for ppc64-vx7.
      
      From-SVN: r247146
      Arnaud Charlet committed
    • New file. · 18e82947
      From-SVN: r247145
      Arnaud Charlet committed
    • uintp.adb (Most_Sig_2_Digits): In case Direct (Right)... · f607cacf
      2017-04-25  Bob Duff  <duff@adacore.com>
      
      	* uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
      	Direct_Val (Right), instead of the incorrect Direct_Val (Left).
      	(UI_GCD): Remove ??? comment involving possible efficiency
      	improvements. This just isn't important after all these years.
      	Also minor cleanup.
      	* uintp.ads: Minor cleanup.
      
      From-SVN: r247144
      Bob Duff committed
    • exp_util.adb, [...]: Revert previous changes. · 28ad2460
      2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
      	Revert previous changes.
      	* scng.adb: Minor reformatting.
      	* s-stratt.ads: Fix unbalanced parens in comment.
      
      From-SVN: r247143
      Hristian Kirtchev committed
    • [multiple changes] · b41c731f
      2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
      	Minor reformatting.
      
      2017-04-25  Ed Schonberg  <schonberg@adacore.com>
      
      	* scng.adb (Scan): Handle '@' appropriately.
      	* sem_ch5.adb: Code cleanup.
      
      From-SVN: r247142
      Arnaud Charlet committed
    • [multiple changes] · b5360737
      2017-04-25  Ed Schonberg  <schonberg@adacore.com>
      
      	* freeze.adb (Check_Expression_Function): Do not check for the
      	use of deferred constants if the freezing of the expression
      	function is triggered by its generated body, rather than a
      	premature use.
      
      2017-04-25  Javier Miranda  <miranda@adacore.com>
      
      	* exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
      	subtypes of private types when performing the view conversion.
      
      2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
      	the purposes of freezing.
      	* exp_util.adb Update the documentation and structure of the
      	type map used in class-wide semantics of assertion expressions.
      	(Add_Inherited_Tagged_DIC): There is really no need to preanalyze
      	and resolve the triaged expression because all substitutions
      	refer to the proper entities.  Update the replacement of
      	references.
      	(Build_DIC_Procedure_Body): Add formal parameter
      	For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
      	are now only processed when freezing occurs.  Build a body only
      	when one is needed.
      	(Entity_Hash): Removed.
      	(Map_Types): New routine.
      	(Replace_Object_And_Primitive_References): Removed.
      	(Replace_References): New routine.
      	(Replace_Type_References): Moved to the library level of Exp_Util.
      	(Type_Map_Hash): New routine.
      	(Update_Primitives_Mapping): Update the mapping call.
      	(Update_Primitives_Mapping_Of_Types): Removed.
      	* exp_util.ads (Build_DIC_Procedure_Body): Add formal
      	parameter For_Freeze and update the comment on usage.
      	(Map_Types): New routine.
      	(Replace_References): New routine.
      	(Replace_Type_References): Moved to the library level of Exp_Util.
      	(Update_Primitives_Mapping_Of_Types): Removed.
      	* sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
      	properties of the private type to the full view in case the full
      	view derives from a parent type and inherits a DIC pragma.
      	* sem_prag.adb (Analyze_Pragma): Guard against a case where a
      	DIC pragma is placed at the top of a declarative region.
      
      From-SVN: r247141
      Arnaud Charlet committed
    • [multiple changes] · a187206c
      2017-04-25  Tristan Gingold  <gingold@adacore.com>
      
      	* s-mmap.ads (Data): Add pragma Inline.
      
      2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* checks.adb (Insert_Valid_Check): Do not use
      	a renaming to alias a volatile name because this will lead to
      	multiple evaluations of the volatile name. Use a constant to
      	capture the value instead.
      
      2017-04-25  Doug Rupp  <rupp@adacore.com>
      
      	* init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
      
      2017-04-25  Ed Schonberg  <schonberg@adacore.com>
      
      	* exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
      	Add out parameter to indicate to caller that a wrapper must
      	be constructed for an inherited primitive whose inherited
      	pre/postcondition has called to overridden primitives.
      	* freeze.adb (Check_Inherited_Conditions): Build wrapper body
      	for inherited primitive that requires it.
      	* sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
      	legal primitive operations and belong to the list of bodies
      	generated after the freeze point of a type.
      	* sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
      	of Build_Class_Wide_Expression.
      	* sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
      	to construct the specification of the wrapper subprogram created
      	for an inherited operation.
      
      From-SVN: r247140
      Arnaud Charlet committed
    • [multiple changes] · 15fc8cb7
      2017-04-25  Bob Duff  <duff@adacore.com>
      
      	* s-osinte-linux.ads (pthread_mutexattr_setprotocol,
      	pthread_mutexattr_setprioceiling): Add new interfaces for these
      	pthread operations.
      	* s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
      	protocols as appropriate for Locking_Policy 'C' and 'I'.
      	* s-taprop-posix.adb: Minor reformatting to make it more similar
      	to s-taprop-linux.adb.
      
      2017-04-25  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
      	Handle properly a multi- level derivation involving both renamed
      	and constrained parent discriminants, when the type to be
      	constrained has fewer discriminants that the ultimate ancestor.
      
      2017-04-25  Bob Duff  <duff@adacore.com>
      
      	* sem_util.adb (Is_Object_Reference): In the
      	case of N_Explicit_Dereference, return False if it came from a
      	conditional expression.
      
      2017-04-25  Bob Duff  <duff@adacore.com>
      
      	* par-ch4.adb (P_Case_Expression): If a semicolon
      	is followed by "when", assume that ";" was meant to be ",".
      
      From-SVN: r247139
      Arnaud Charlet committed
    • Minor reformatting. · 611d5e3c
      From-SVN: r247138
      Arnaud Charlet committed
    • sem_ch9.adb, [...]: Minor reformatting and typo fixes. · 605afee8
      2017-04-25  Gary Dismukes  <dismukes@adacore.com>
      
      	* sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
      	fixes.
      
      From-SVN: r247137
      Gary Dismukes committed
    • [multiple changes] · b912db16
      2017-04-25  Arnaud Charlet  <charlet@adacore.com>
      
      	* rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
      	loading of an entity.
      	* rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
      	previously repeated in the analysis.
      	* sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
      	procedure SPARK_Implicit_Load.	(Analyze_Task_Type_Declaration):
      	use new procedure SPARK_Implicit_Load.
      	* sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
      	SPARK_Implicit_Load.
      
      2017-04-25  Javier Miranda  <miranda@adacore.com>
      
      	* sem_util.adb (New_Copy_Tree): By default
      	copying of defining identifiers is prohibited because
      	this would introduce an entirely new entity into the
      	tree. This patch introduces an exception to this general
      	rule: the declaration of constants and variables located in
      	Expression_With_Action nodes.
      	(Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
      	(In_Map): New subprogram.
      	(Visit_Entity): New subprogram.
      	(Visit_Node): Handle EWA_Level,
      	EWA_Inner_Scope_Level, and take care of defining entities defined
      	in Expression_With_Action nodes.
      
      2017-04-25  Thomas Quinot  <quinot@adacore.com>
      
      	* exp_ch6.adb: minor comment edit.
      	* sinfo.ads, sinfo.adb: New Null_Statement attribute for null
      	procedure specifications that come from source.
      	* par-ch6.adb (P_Subprogram, case of a null procedure): Set new
      	Null_Statement attribute.
      	* par_sco.adb (Traverse_Declarations_Or_Statements): For a null
      	procedure, generate statement SCO for the generated NULL statement.
      	* sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
      	parser, if available.
      
      From-SVN: r247136
      Arnaud Charlet committed
    • Add missing changelog entries for last commit. · e57136da
      From-SVN: r247135
      Andreas Krebbel committed
    • S/390: PR80464: Split MEM->GPR vector moves · 854dbb3c
      We do this already for TImode values but it was missing for vector
      modes.
      
      gcc/ChangeLog:
      
      2017-04-25  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
      
      	PR target/80464
      	* config/s390/vector.md: Split MEM->GPR vector moves for
      	non-s_operand addresses.
      
      gcc/testsuite/ChangeLog:
      
      2017-04-25  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
      
      	PR target/80464
      	* gfortran.fortran-torture/compile/pr80464.f90: New test.
      
      From-SVN: r247134
      Andreas Krebbel committed
    • S/390: PR79895: Fix TImode constant handling · 3cb9ee2f
      The P constraint letter is supposed to match every constant which is
      acceptable during reload.  However, constraints do not appear to be
      able to handle const_wide_int yet.  It works with predicates so the
      alternative is modelled with a new predicate now.
      
      gcc/ChangeLog:
      
      2017-04-25  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
      
      	PR target/79895
      	* config/s390/predicates.md (reload_const_wide_int_operand): New
      	predicate.
      	* config/s390/s390.md ("movti"): Remove d/P alternative.
      	("movti_bigconst"): New pattern definition.
      
      gcc/testsuite/ChangeLog:
      
      2017-04-25  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
      
      	PR target/79895
      	* gcc.target/s390/pr79895.c: New test.
      
      From-SVN: r247133
      Andreas Krebbel committed
    • S/390: PR80080: Optimize atomic patterns. · 03db9ab5
      The attached patch optimizes the atomic_exchange and atomic_compare
      patterns on s390 and s390x (mostly limited to SImode and DImode).
      Among general optimizaation, the changes fix most of the problems
      reported in PR 80080:
      https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80080
      
      gcc/ChangeLog:
      
      2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
      
      	PR target/80080
      	* s390-protos.h (s390_expand_cs_hqi): Removed.
      	(s390_expand_cs, s390_expand_atomic_exchange_tdsi): New prototypes.
      	* config/s390/s390.c (s390_emit_compare_and_swap): Handle all integer
      	modes as well as CCZ1mode and CCZmode.
      	(s390_expand_atomic_exchange_tdsi, s390_expand_atomic): Adapt to new
      	signature of s390_emit_compare_and_swap.
      	(s390_expand_cs_hqi): Likewise, make static.
      	(s390_expand_cs_tdsi): Generate an explicit compare before trying
      	compare-and-swap, in some cases.
      	(s390_expand_cs): Wrapper function.
      	(s390_expand_atomic_exchange_tdsi): New backend specific expander for
      	atomic_exchange.
      	(s390_match_ccmode_set): Allow CCZmode <-> CCZ1 mode.
      	* config/s390/s390.md ("atomic_compare_and_swap<mode>"): Merge the
      	patterns for small and large integers.  Forbid symref memory operands.
      	Move expander to s390.c.  Require cc register.
      	("atomic_compare_and_swap<DGPR:mode><CCZZ1:mode>_internal")
      	("*atomic_compare_and_swap<TDI:mode><CCZZ1:mode>_1")
      	("*atomic_compare_and_swapdi<CCZZ1:mode>_2")
      	("*atomic_compare_and_swapsi<CCZZ1:mode>_3"): Use s_operand to forbid
      	symref memory operands.  Remove CC mode and call s390_match_ccmode
      	instead.
      	("atomic_exchange<mode>"): Allow and implement all integer modes.
      
      gcc/testsuite/ChangeLog:
      
      2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
      
      	PR target/80080
      	* gcc.target/s390/md/atomic_compare_exchange-1.c: New test.
      	* gcc.target/s390/md/atomic_compare_exchange-1.inc: New test.
      	* gcc.target/s390/md/atomic_exchange-1.inc: New test.
      
      From-SVN: r247132
      Dominik Vogt committed
    • S/390: Load and test peephole. · 97160c9b
      gcc/ChangeLog:
      
      2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
      
      	* config/s390/s390.md (define_peephole2): New peephole to help
      	combining the load-and-test pattern with volatile memory.
      
      From-SVN: r247131
      Dominik Vogt committed
    • S/390: Use load-on-condition in cstorecc4 · 3ea685e7
      gcc/ChangeLog:
      
      2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
      
      	* config/s390/s390.md ("cstorecc4"): Use load-on-condition and deal
      	with CCZmode for TARGET_Z196.
      
      From-SVN: r247130
      Dominik Vogt committed
    • re PR rtl-optimization/80501 (Wrong code w/ a signed char, a shift, and a conversion to int) · ba5d69f3
      	PR rtl-optimization/80501
      	* combine.c (make_compound_operation_int): Set subreg_code to SET
      	even for AND with mask of the sign bit of mode.
      
      	* gcc.c-torture/execute/pr80501.c: New test.
      
      From-SVN: r247128
      Jakub Jelinek committed
    • re PR rtl-optimization/80500 (ICE: internal consistency failure (error: invalid… · 39259462
      re PR rtl-optimization/80500 (ICE: internal consistency failure (error: invalid rtl sharing found in the insn))
      
      	PR rtl-optimization/80500
      	* loop-unroll.c (combine_var_copies_in_loop_exit): Call copy_rtx on
      	sum's initial value.
      
      	* gcc.dg/pr80500.c: New test.
      
      From-SVN: r247126
      Jakub Jelinek committed
    • thunderx2t99.md (thunderx2t99_crc): New Reservation. · 904588d8
      
      	* config/aarch64/thunderx2t99.md (thunderx2t99_crc): New Reservation.
      
      
      Co-Authored-By: Naveen H.S <Naveen.Hurugalawadi@cavium.com>
      
      From-SVN: r247125
      Julian Brown committed
    • thunderx2t99.md (thunderx2t99_aes): New Reservation. · 424d5df0
      
      	* config/aarch64/thunderx2t99.md (thunderx2t99_aes): New Reservation.
      	(thunderx2t99_sha): New Reservation.
      
      
      Co-Authored-By: Naveen H.S <Naveen.Hurugalawadi@cavium.com>
      
      From-SVN: r247124
      Julian Brown committed
    • Let tree_single_nonzero_warnv_p use range information · bb0249cb
      2017-04-25  Marc Glisse  <marc.glisse@inria.fr>
      
      gcc/
      	* fold-const.c (tree_single_nonzero_warnv_p): Handle SSA_NAME.
      
      gcc/testsuite/
      	* gcc.dg/tree-ssa/cmpmul-1.c: New file.
      	* gcc.dg/Wstrict-overflow-18.c: Xfail.
      
      From-SVN: r247123
      Marc Glisse committed
    • aarch64-simd.md (aarch64_simd_vec_set<mode>): Fix type for 1-element load. · 452e929a
      
      	* config/aarch64/aarch64-simd.md (aarch64_simd_vec_set<mode>): Fix
      	type for 1-element load.
      
      
      Co-Authored-By: Naveen H.S <Naveen.Hurugalawadi@cavium.com>
      
      From-SVN: r247122
      Julian Brown committed
    • Daily bump. · e1bd42b9
      From-SVN: r247121
      GCC Administrator committed
  2. 24 Apr, 2017 5 commits
    • re PR fortran/80121 (Memory leak with derived-type intent(out) argument) · be420eb8
      2017-04-22  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/80121
      	* gfortran.dg/intent_out_9.f90: Remove deprecated cleanup-tree-dump
      	directive.
      
      From-SVN: r247115
      Janus Weil committed
    • Regenerate .pot files. · c1c1c8ea
      gcc/po:
      	* gcc.pot: Regenerate.
      
      libcpp/po:
      	* cpplib.pot: Regenerate.
      
      From-SVN: r247113
      Joseph Myers committed
    • types.rst (gccjit::type::get_const): Remove comment. · 0ebd1f00
      gcc_jit_type_get_aligned
      
      gcc/jit/ChangeLog:
      	* docs/cp/topics/types.rst (gccjit::type::get_const): Remove
      	comment.
      	(gccjit::type::get_aligned): Add.
      	* docs/topics/compatibility.rst: Add LIBGCCJIT_ABI_7.
      	* docs/topics/types.rst: Add gcc_jit_type_get_aligned.
      	* docs/_build/texinfo/libgccjit.texi: Regenerate.
      	* jit-playback.c (gcc::jit::playback::type::get_aligned): New
      	method.
      	* jit-playback.h (gcc::jit::playback::type::get_aligned): New
      	method.
      	* jit-recording.c: Within namespace gcc::jit::recording...
      	(type::get_aligned): New method.
      	(memento_of_get_aligned::replay_into): New method.
      	(memento_of_get_aligned::make_debug_string): New method.
      	(memento_of_get_aligned::write_reproducer): New method.
      	* jit-recording.h: Within namespace gcc::jit::recording...
      	(type::get_aligned): New method.
      	(type::accepts_writes_from): Strip off qualifications from
      	this when comparing pointer equality.
      	(decorated_type): New subclass of type, subsuming the
      	commonality between memento_of_get_const and
      	memento_of_get_volatile.
      	(memento_of_get_const): Make a subclass of decorated_type,
      	rather than type.
      	(memento_of_get_volatile): Likewise.
      	(memento_of_get_aligned): Likewise.
      	* libgccjit++.h: Within namespace gccjit...
      	(type::get_const): New method.
      	(type::get_aligned): New method.
      	* libgccjit.c (gcc_jit_type_get_aligned): New function.
      	* libgccjit.h (gcc_jit_type_get_aligned): New decl.
      	* libgccjit.map (LIBGCCJIT_ABI_7): New
      	(gcc_jit_type_get_aligned): Add.
      
      gcc/testsuite/ChangeLog:
      	* jit.dg/all-non-failing-tests.h: Add test-alignment.c.
      	* jit.dg/test-alignment.c: New test case.
      	* jit.dg/test-alignment.cc: New test case.
      	* jit.dg/test-error-gcc_jit_type_get_aligned-non-power-of-two.c:
      	New test case.
      
      From-SVN: r247111
      David Malcolm committed
    • decl.c (grokdeclarator): Use %qT instead of %<%T%> in · 761ad35c
              * decl.c (grokdeclarator): Use %qT instead of %<%T%> in
              * diagnostics.
              (start_enum): Likewise.
              (build_enumerator): Likewise. Use %qE instead of plain %E.
              * parser.c (cp_parser_mem_initializer_list): Use %qD instead of
              %<%D%> in diagnostics.
              (cp_parser_elaborated_type_specifier): Likewise.
              * pt.c (make_pack_expansion): Use %qT and %qE instead of
              %<%T%> and %<%E%> in diagnostics.
              (tsubst_pack_expansion): Likewise.
      
      From-SVN: r247110
      Volker Reichelt committed
    • Fix location of sizeof/alignof (PR c++/80016) · 412f61f0
      PR c++/80016 reports an issue with bizarre underlined range
      for a complicated expression.
      
      The root cause for the incorrect *starting* location of that range
      is that alignof and sizeof expressions currently have
      start == finish == caret at the opening parenthesis of the
      expression.
      
      This patch fixes this by generating appropriate start and finish
      locations for alignof and sizeof expressions.
      
      gcc/cp/ChangeLog:
      	PR c++/80016
      	* parser.c (cp_parser_unary_expression):  Generate a location
      	range for alignof and sizeof expressions.
      
      gcc/testsuite/ChangeLog:
      	PR c++/80016
      	* g++.dg/plugin/diagnostic-test-expressions-1.C (test_sizeof): New
      	test function.
      	(test_alignof): New test function.
      
      From-SVN: r247108
      David Malcolm committed