]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/ChangeLog
spark_xrefs.ads (Scope_Num): type refined to positive integers.
[thirdparty/gcc.git] / gcc / ada / ChangeLog
CommitLineData
7ffbef99
AC
12016-06-22 Arnaud Charlet <charlet@adacore.com>
2
3 * spark_xrefs.ads (Scope_Num): type refined to positive integers.
4 * lib-xref-spark_specific.adb (Detect_And_Add_SPARK_Scope):
5 moved into scope of Collect_SPARK_Xrefs.
6 (Add_SPARK_Scope): moved into scope of Collect_SPARK_Xrefs;
7 now uses Dspec and Scope_Id from Collect_SPARK_Xrefs.
8 (Collect_SPARK_Xrefs): refactored to avoid retraversing the list
9 of scopes.
10 (Traverse_Compilation_Unit): refactored as a generic procedure.
11 * types.ads (Unit_Number_Type): range refined.
12
f26a3587
AC
132016-06-22 Hristian Kirtchev <kirtchev@adacore.com>
14
15 * lib-xref-spark_specific.adb, a-cuprqu.ads, sem_ch6.adb: Minor
16 reformatting.
17
182016-06-22 Eric Botcazou <ebotcazou@adacore.com>
19
20 * sem_util.ads (Address_Value): Declare new function.
21 * sem_util.adb (Address_Value): New function extracted
22 unmodified from Apply_Address_Clause_Check, which returns the
23 underlying value of the expression of an address clause.
24 * checks.adb (Compile_Time_Bad_Alignment): Delete.
25 (Apply_Address_Clause_Check): Call Address_Value on
26 the expression. Do not issue the main warning here and
27 issue the secondary warning only when the value of the
28 expression is not known at compile time.
29 * sem_ch13.adb (Address_Clause_Check_Record): Add A component and
30 adjust the description.
31 (Analyze_Attribute_Definition_Clause): In the case
32 of an address, move up the code creating an entry in the table of
33 address clauses. Also create an entry for an absolute address.
34 (Validate_Address_Clauses): Issue the warning for absolute
35 addresses here too. Tweak condition associated with overlays
36 for consistency.
37
f24ea912
AC
382016-06-22 Ed Schonberg <schonberg@adacore.com>
39
40 * sem_ch13.adb (Is_Predicate_Static): An inherited predicate
41 can be static only if it applies to a scalar type.
42
432016-06-22 Ed Schonberg <schonberg@adacore.com>
44
45 * exp_util.adb (Adjust_Result_Type): Convert operand to base
46 type to prevent spurious constraint checks on subtypes of Boolean.
47
482016-06-22 Bob Duff <duff@adacore.com>
49
50 * debug.adb: Document debug switch -gnatd.o.
51 * sem_elab.adb (Check_Internal_Call): Debug switch -gnatd.o
52 now causes a more conservative treatment of indirect calls,
53 treating P'Access as a call to P in more cases. We Can't make
54 this the default, because it breaks common idioms, for example
55 the soft links.
56 * sem_util.adb: Add an Assert.
57
582016-06-22 Bob Duff <duff@adacore.com>
59
60 * a-cuprqu.ads, a-cuprqu.adb: Completely rewrite this package. Use
61 red-black trees, which gives O(lg N) worst-case performance on
62 Enqueue and Dequeue. The previous version had O(N) Enqueue in
63 the worst case.
64
652016-06-22 Arnaud Charlet <charlet@adacore.com>
66
67 * sem_warn.adb: minor style fix in comment.
68 * spark_xrefs.ads (Scope_Num): type refined to positive integers.
69 * lib-xref-spark_specific.adb (Detect_And_Add_SPARK_Scope):
70 moved into scope of Collect_SPARK_Xrefs.
71 (Add_SPARK_Scope): moved into scope of Collect_SPARK_Xrefs;
72 now uses Dspec and Scope_Id from Collect_SPARK_Xrefs.
73 (Collect_SPARK_Xrefs): refactored to avoid retraversing the list
74 of scopes.
75 * sem_ch3.adb (Build_Discriminal): Set Parent of the discriminal.
76
b48a45e3
AC
772016-06-22 Arnaud Charlet <charlet@adacore.com>
78
79 * lib-xref-spark_specific.adb (Generate_Dereference): Assignment to not
80 commented local variables replaced with direct uses of their values.
81
22da8770
AC
822016-06-22 Hristian Kirtchev <kirtchev@adacore.com>
83
84 * exp_ch7.adb (Add_Invariant): Replace the
85 current type instance with the _object parameter even in ASIS mode.
86 (Build_Invariant_Procedure_Body): Do not insert the
87 invariant procedure body into the tree for ASIS and GNATprove.
88 (Build_Invariant_Procedure_Declaration): Do not insert the
89 invariant procedure declaration into the tree for ASIS and
90 GNATprove.
91 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Update comment.
92
932016-06-22 Ed Schonberg <schonberg@adacore.com>
94
95 * sem_ch6.adb (Set_Actual_Subtypes): If the type of the actual
96 has predicates, the actual subtype must be frozen properly
97 because of the generated tests that may follow. The predicate
98 may be specified by an explicit aspect, or may be inherited in
99 a derivation.
100
444656ce
ES
1012016-06-22 Ed Schonberg <schonberg@adacore.com>
102
103 * exp_ch4.adb (In_Range_Chec)): New predicate, subsidiary of
104 Expand_N_In: within an expanded range check that might raise
105 Constraint_Error do not generate a predicate check as well. It
106 is redundant because the context will add an explicit predicate
107 check, and it will raise the wrong exception if it fails.
108 * lib-xref-spark_specific.adb (Add_SPARK_File): Remove useless checks
109 since dependency units always have an associated compilation unit.
110
3bb91f98
AC
1112016-06-22 Arnaud Charlet <charlet@adacore.com>
112
113 * lib.ads: Code cleanup.
114 * inline.adb: Type refinement for a counter variable.
115 * lib-xref-spark_specific.adb (Add_SPARK_File): removal of no-op code.
116 Code cleanup.
117
d42b7559
EB
1182016-06-21 Eric Botcazou <ebotcazou@adacore.com>
119
120 * gcc-interface/decl.c (set_nonaliased_component_on_array_type): New
121 function.
122 (set_reverse_storage_order_on_array_type): Likewise.
123 (gnat_to_gnu_entity) <E_Array_Type>: Call them to set the flags.
124 <E_Array_Subtype>: Likewise.
125 <E_String_Literal_Subtype>: Likewise.
126 (substitute_in_type) <ARRAY_TYPE>: Likewise.
127 * gcc-interface/utils.c (gnat_pushdecl): Always create a variant for
128 the DECL_ORIGINAL_TYPE of a type.
129
20250fb8
AC
1302016-06-20 Hristian Kirtchev <kirtchev@adacore.com>
131
132 * make.adb, gnatbind.adb, g-socket.adb, sem_ch13.adb: Minor
133 reformatting.
134 * lib.ads, sem_util.adb: Minor typo in comment.
135
1362016-06-20 Yannick Moy <moy@adacore.com>
137
138 * sem_prag.adb, sem_prag.ads (Build_Pragma_Check_Equivalent):
139 Add parameter Keep_Pragma_Id to optionally keep
140 the identifier of the pragma instead of converting
141 to pragma Check. Also set type of new function call
142 appropriately. (Collect_Inherited_Class_Wide_Conditions):
143 Call Build_Pragma_Check_Equivalent with the new parameter
144 Keep_Pragma_Id set to True to keep the identifier of the copied
145 pragma.
146 * sinfo.ads: Add comment.
147
1482016-06-20 Hristian Kirtchev <kirtchev@adacore.com>
149
150 * exp_ch7.adb (Build_Invariant_Procedure_Body):
151 Always install the scope of the invariant procedure
152 in order to produce better error messages. Do not
153 insert the body when the context is a generic unit.
154 (Build_Invariant_Procedure_Declaration): Perform minimal
155 decoration of the invariant procedure and its formal parameter
156 in case they are not analyzed. Do not insert the declaration
157 when the context is a generic unit.
158
9e3be36e
ES
1592016-06-20 Ed Schonberg <schonberg@adacore.com>
160
161 * sem_ch13.adb (Visible_Component): New procedure, subsidiary
162 of Replace_Type_References_ Generic, to determine whether an
163 identifier in a predicate or invariant expression is a visible
164 component of the type to which the predicate or invariant
165 applies. Implements the visibility rule stated in RM 13.1.1
166 (12/3).
167
2f8d7dfe
AC
1682016-06-20 Hristian Kirtchev <kirtchev@adacore.com>
169
170 * s-regpat.adb, sem_prag.adb, pprint.adb, sem_ch13.adb: Minor
171 reformatting.
172
1732016-06-20 Tristan Gingold <gingold@adacore.com>
174
175 * make.adb (Check_Standard_Library): Consider system.ads
176 if s-stalib.adb is not available.
177 * gnatbind.adb (Add_Artificial_ALI_File): New procedure extracted from
178 gnatbind.
179
1802016-06-20 Thomas Quinot <quinot@adacore.com>
181
182 * g-socket.adb (Is_IP_Address): A string consisting in digits only is
183 not a dotted quad.
184
1852016-06-20 Arnaud Charlet <charlet@adacore.com>
186
187 * exp_ch7.adb (Build_Invariant_Procedure_Body):
188 decorate invariant procedure body with typical properties of
189 procedure entityes.
190
1912016-06-20 Arnaud Charlet <charlet@adacore.com>
192
193 * a-exetim-darwin.adb: New file.
194
3ddfabe3
AC
1952016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
196
197 * atree.ads, atree.adb (Elist29): New routine.
198 (Set_Elist29): New routine.
199 * atree.h New definition for Elist29.
200 * einfo.adb Subprograms_For_Type is now an Elist rather than
201 a node. Has_Invariants is now a synthesized attribute
202 and does not require a flag. Has_Own_Invariants
203 is now Flag232. Has_Inherited_Invariants is
204 Flag291. Is_Partial_Invariant_Procedure is Flag292.
205 (Default_Init_Cond_Procedure): Reimplemented.
206 (Has_Inherited_Invariants): New routine.
207 (Has_Invariants): Reimplemented.
208 (Has_Own_Invariants): New routine.
209 (Invariant_Procedure): Reimplemented.
210 (Is_Partial_Invariant_Procedure): New routine.
211 (Partial_Invariant_Procedure): Reimplemented.
212 (Predicate_Function): Reimplemented.
213 (Predicate_Function_M): Reimplemented.
214 (Set_Default_Init_Cond_Procedure): Reimplemented.
215 (Set_Has_Inherited_Invariants): New routine.
216 (Set_Has_Invariants): Removed.
217 (Set_Has_Own_Invariants): New routine.
218 (Set_Invariant_Procedure): Reimplemented.
219 (Set_Is_Partial_Invariant_Procedure): New routine.
220 (Set_Partial_Invariant_Procedure): Reimplemented.
221 (Set_Predicate_Function): Reimplemented.
222 (Set_Predicate_Function_M): Reimplemented.
223 (Set_Subprograms_For_Type): Reimplemented.
224 (Subprograms_For_Type): Reimplemented.
225 (Write_Entity_Flags): Output Flag232 and Flag291.
226 * einfo.ads Add new attributes Has_Inherited_Invariants
227 Has_Own_Invariants Is_Partial_Invariant_Procedure
228 Partial_Invariant_Procedure Change the documentation
229 of attributes Has_Inheritable_Invariants Has_Invariants
230 Invariant_Procedure Is_Invariant_Procedure Subprograms_For_Type
231 (Has_Inherited_Invariants): New routine along with pragma Inline.
232 (Has_Own_Invariants): New routine along with pragma Inline.
233 (Is_Partial_Invariant_Procedure): New routine along with pragma Inline.
234 (Partial_Invariant_Procedure): New routine.
235 (Set_Has_Inherited_Invariants): New routine along with pragma Inline.
236 (Set_Has_Invariants): Removed along with pragma Inline.
237 (Set_Has_Own_Invariants): New routine along with pragma Inline.
238 (Set_Is_Partial_Invariant_Procedure): New routine
239 along with pragma Inline.
240 (Set_Partial_Invariant_Procedure): New routine.
241 (Set_Subprograms_For_Type): Update the signature.
242 (Subprograms_For_Type): Update the signature.
243 * exp_ch3.adb Remove with and use clauses for Sem_Ch13.
244 (Build_Array_Invariant_Proc): Removed.
245 (Build_Record_Invariant_Proc): Removed.
246 (Freeze_Type): Build the body of the invariant procedure.
247 (Insert_Component_Invariant_Checks): Removed.
248 * exp_ch7.adb Add with and use clauses for Sem_Ch6, Sem_Ch13,
249 and Stringt.
250 (Build_Invariant_Procedure_Body): New routine.
251 (Build_Invariant_Procedure_Declaration): New routine.
252 * exp_ch7.ads (Build_Invariant_Procedure_Body): New routine.
253 (Build_Invariant_Procedure_Declaration): New routine.
254 * exp_ch9.adb (Build_Corresponding_Record): Do not propagate
255 attributes related to invariants to the corresponding record
256 when building the corresponding record. This is done by
257 Build_Invariant_Procedure_Declaration.
258 * exp_util.adb (Make_Invariant_Call): Reimplemented.
259 * freeze.adb (Freeze_Array_Type): An array type requires an
260 invariant procedure when its component type has invariants.
261 (Freeze_Record_Type): A record type requires an invariant
262 procedure when at least one of its components has an invariant.
263 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Inherit
264 invariant-related attributes.
265 (Analyze_Subtype_Declaration):
266 Inherit invariant-related attributes.
267 (Build_Derived_Record_Type): Inherit invariant-related attributes.
268 (Check_Duplicate_Aspects): Reimplemented.
269 (Get_Partial_View_Aspect): New routine.
270 (Process_Full_View): Inherit invariant-related attributes. Reimplement
271 the check on hidden inheritance of class-wide invariants.
272 (Remove_Default_Init_Cond_Procedure): Reimplemented.
273 * sem_ch6.adb (Analyze_Subprogram_Specification): Do not modify
274 the controlling type for an invariant procedure declaration
275 or body.
276 (Is_Invariant_Procedure_Or_Body): New routine.
277 * sem_ch7.adb (Analyze_Package_Specification): Build the partial
278 invariant body in order to preanalyze and resolve all invariants
279 of a private type at the end of the visible declarations. Build
280 the full invariant body in order to preanalyze and resolve
281 all invariants of a private type's full view at the end of
282 the private declarations.
283 (Preserve_Full_Attributes): Inherit invariant-related attributes.
284 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Ensure that
285 aspects are analyzed with the proper view when the protected type
286 is a completion of a private type. Inherit invariant-related attributes.
287 (Analyze_Task_Type_Declaration): Ensure that
288 aspects are analyzed with the proper view when the task type
289 is a completion of a private type. Inherit invariant-related
290 attributes.
291 * sem_ch13.adb Remove with and use clauses for Stringt.
292 (Build_Invariant_Procedure_Declaration): Removed.
293 (Build_Invariant_Procedure): Removed.
294 (Freeze_Entity_Checks): Do not build the body of the invariant
295 procedure here.
296 The body is built when the type is frozen in Freeze_Type.
297 (Inherit_Aspects_At_Freeze_Point): Do not inherit any attributes
298 related to invariants here because this leads to erroneous
299 inheritance.
300 (Replace_Node): Rename to Replace_Type_Ref.
301 * sem_ch13.ads (Build_Invariant_Procedure_Declaration): Removed.
302 (Build_Invariant_Procedure): Removed.
303 * sem_prag.adb Add with and use clauses for Exp_Ch7.
304 (Analyze_Pragma): Reimplement the analysis of pragma Invariant.
305 * sem_res.adb (Resolve_Actuals): Emit a specialized error when
306 the context is an invariant.
307 * sem_util.adb (Get_Views): New routine.
308 (Incomplete_Or_Partial_View): Consider generic packages when
309 examining declarations.
310 (Inspect_Decls): Consider full type
311 declarations because they may denote a derivation from a
312 private type.
313 (Propagate_Invariant_Attributes): New routine.
314 * sem_util.ads (Get_Views): New routine.
315 (Propagate_Invariant_Attributes): New routine.
316
3172016-06-16 Arnaud Charlet <charlet@adacore.com>
318
319 * pprint.adb (Expression_Image): Add better handling of UCs,
320 we don't want to strip them all for clarity.
321
322
ff7b374b
KT
3232016-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
324
325 * exp_util.adb (Safe_Unchecked_Type_Conversion): Use "alignment"
326 instead of "alignement".
327
73170f9e
AC
3282016-06-16 Gary Dismukes <dismukes@adacore.com>
329
330 * sem_util.adb: Minor typo fix.
331
3322016-06-16 Emmanuel Briot <briot@adacore.com>
333
334 * s-regpat.adb: Further fix for invalid index in GNAT.Regexp.
335
3362016-06-16 Eric Botcazou <ebotcazou@adacore.com>
337
338 * sem_ch13.adb (Validate_Address_Clauses): Use the same logic to
339 issue the warning on the offset for the size as for the alignment
340 and tweak the wording for the sake of consistency.
341
3422016-06-16 Ed Schonberg <schonberg@adacore.com>
343
344 * sem_prag.adb (Check_Class_Wide_COndition): New procedure,
345 subsidiary of Analyze_Pre_Post_ Condition_In_Decl_Part, to
346 check legality rules that follow from the revised semantics of
347 class-wide pre/postconditions described in AI12-0113.
348 (Build_Pragma_Check_Equivalent): Abstract subprogram declarations
349 must be included in list of overriding primitives of a derived
350 type.
351
4bfb35fd
AC
3522016-06-16 Ed Schonberg <schonberg@adacore.com>
353
354 * sem_util.adb (May_Be_Lvalue): An actual in an unexpanded
355 attribute reference 'Read is an assignment and must be considered
356 a modification of the object.
357
3582016-06-16 Gary Dismukes <dismukes@adacore.com>
359
360 * einfo.adb: Minor editorial.
361
d1b83e62
AC
3622016-06-16 Ed Schonberg <schonberg@adacore.com>
363
364 * sem_prag.adb (Overridden_Ancestor): Clean up code to use
365 controlling type of desired primitive rather than its scope,
366 because the primitive that inherits the classwide condition may
367 comes from several derivation steps.
368
3692016-06-16 Javier Miranda <miranda@adacore.com>
370
371 * einfo.adb (Set_Default_Init_Cond_Procedure): Allow calls setting
372 this attribute to Empty (only if the attribute has not been set).
373 * sem_util.adb (Build_Default_Init_Cond_Procedure_Body):
374 No action needed if the spec was not built.
375 (Build_Default_Init_Cond_Procedure_Declaration): The spec is
376 not built if DIC is set to NULL or no condition was specified.
377 * exp_ch3.adb (Expand_N_Object_Declaration): Check availability
378 of the Init_Cond procedure before generating code to call it.
379
3802016-06-16 Emmanuel Briot <briot@adacore.com>
381
382 * s-regpat.adb: Fix invalid index check when matching end-of-line
383 on substrings.
384
3852016-06-16 Arnaud Charlet <charlet@adacore.com>
386
387 * gnat1drv.adb: Minor reformatting.
388
3386e3ae
AC
3892016-06-16 Ed Schonberg <schonberg@adacore.com>
390
391 * sem_ch3.adb (Check_Entry_Contracts): New procedure, subsidiary
392 of Analyze_Declarations, that performs pre-analysis of
393 pre/postconditions on entry declarations before full analysis
394 is performed after entries have been converted into procedures.
395 Done solely to capture semantic errors.
396 * sem_attr.adb (Analyze_Attribute, case 'Result): Add guard to
397 call to Denote_Same_Function.
398
3992016-06-16 Emmanuel Briot <briot@adacore.com>
400
401 * g-comlin.adb: Fix minor memory leak in GNAT.Command_Line.
402
4032016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
404
405 * exp_ch7.adb (Find_Last_Init): Remove obsolete code. The
406 logic is now performed by Process_Object_Declaration.
407 (Process_Declarations): Recognize a controlled deferred
408 constant which is in fact initialized by means of a
409 build-in-place function call as needing finalization actions.
410 (Process_Object_Declaration): Insert the counter after the
411 build-in-place initialization call for a controlled object. This
412 was previously done in Find_Last_Init.
413 * exp_util.adb (Requires_Cleanup_Actions): Recognize a controlled
414 deferred constant which is in fact initialized by means of a
415 build-in-place function call as needing finalization actions.
416
4172016-06-16 Justin Squirek <squirek@adacore.com>
418
419 * exp_aggr.adb (Expand_Array_Aggregate): Minor comment changes and
420 additional style fixes.
421 * exp_ch7.adb: Minor typo fixes and reformatting.
422
5ed4ba15
AC
4232016-06-16 Justin Squirek <squirek@adacore.com>
424
425 * sem_ch3.adb (Analyze_Object_Declaration): Add a missing check
426 for optimized aggregate arrays with qualified expressions.
427 * exp_aggr.adb (Expand_Array_Aggregate): Fix block and
428 conditional statement in charge of deciding whether to perform
429 in-place expansion. Specifically, use Parent_Node to jump over
430 the qualified expression to the object declaration node. Also,
431 a check has been inserted to skip the optimization if SPARK 2005
432 is being used in strict adherence to RM 4.3(5).
433
4342016-06-16 Tristan Gingold <gingold@adacore.com>
435
436 * sem_prag.adb (Analyze_Pragma): Simplify code
437 for Pragma_Priority.
438
36d3d5d3
EB
4392016-06-16 Eric Botcazou <ebotcazou@adacore.com>
440
441 * sem_util.ads (Indexed_Component_Bit_Offset): Declare.
442 * sem_util.adb (Indexed_Component_Bit_Offset): New
443 function returning the offset of an indexed component.
444 (Has_Compatible_Alignment_Internal): Call it.
445 * sem_ch13.adb (Offset_Value): New function returning the offset of an
446 Address attribute reference from the underlying entity.
447 (Validate_Address_Clauses): Call it and take the offset into
448 account for the size warning.
449
34557478
HK
4502016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
451
452 * bindgen.adb, exp_util.adb, sem_ch9.adb, sem_util.adb: Minor
453 reformatting.
454
3ab53b0d
GD
4552016-06-16 Gary Dismukes <dismukes@adacore.com>
456
457 * sem_ch9.adb, sem_util.ads, sem_res.adb: Minor reformatting and typo
458 fixes.
459
a8a42b93
AC
4602016-06-16 Javier Miranda <miranda@adacore.com>
461
462 * sem_res.adb (Resolve): Under relaxed RM semantics silently
463 replace occurrences of null by System.Null_Address.
464 * sem_ch4.adb (Analyze_One_Call, Operator_Check): Under
465 relaxed RM semantics silently replace occurrences of null by
466 System.Null_Address.
467 * sem_util.ad[sb] (Null_To_Null_Address_Convert_OK): New subprogram.
468 (Replace_Null_By_Null_Address): New subprogram.
469
4702016-06-16 Bob Duff <duff@adacore.com>
471
472 * exp_util.adb (Is_Controlled_Function_Call):
473 This was missing the case where the call is in prefix format,
474 with named notation, as in Obj.Func (Formal => Actual).
475
fb757f7d
AC
4762016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
477
478 * exp_attr.adb, inline.adb, sem_attr.adb, sem_elab.adb: Minor
479 reformatting.
480
4812016-06-16 Bob Duff <duff@adacore.com>
482
483 * sem_util.adb (Collect): Avoid Empty Full_T. Otherwise Etype
484 (Full_T) crashes when assertions are on.
485 * sem_ch12.adb (Matching_Actual): Correctly handle the case where
486 "others => <>" appears in a generic formal package, other than
487 by itself.
488
4892016-06-16 Arnaud Charlet <charlet@adacore.com>
490
491 * usage.adb: Remove confusing comment in usage line.
492 * bindgen.adb: Fix binder generated file in codepeer mode wrt
493 recent additions.
494
4952016-06-16 Javier Miranda <miranda@adacore.com>
496
497 * restrict.adb (Check_Restriction_No_Use_Of_Entity): Avoid
498 never-ending loop, code cleanup; adding also support for Text_IO.
499 * sem_ch8.adb (Find_Expanded_Name): Invoke
500 Check_Restriction_No_Use_Entity.
501
5022016-06-16 Tristan Gingold <gingold@adacore.com>
503
504 * exp_ch9.adb: Minor comment fix.
505 * einfo.ads (Has_Protected): Clarify comment.
506 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Do not
507 consider private protected types declared in the runtime for
508 the No_Local_Protected_Types restriction.
509
124bed29
AC
5102016-06-14 Ed Schonberg <schonberg@adacore.com>
511
512 * sem_ch6.adb (Set_Actual_Subtypes): Do not generate actual
513 subtypes for unconstrained formals when analyzing the generated
514 body of an expression function, because it may lead to premature
515 and misplaced freezing of the types of formals.
516
5172016-06-14 Gary Dismukes <dismukes@adacore.com>
518
519 * sem_elab.adb, sem_ch4.adb: Minor reformatting and typo fix.
520
5212016-06-14 Tristan Gingold <gingold@adacore.com>
522
523 * einfo.adb (Set_Has_Timing_Event): Add assertion.
524 * sem_util.ads, sem_util.adb (Propagate_Concurrent_Flags): New
525 name for Propagate_Type_Has_Flags.
526 * exp_ch3.adb, sem_ch3.adb, sem_ch7.adb, sem_ch9.adb: Adjust after
527 renaming.
528
519e9fdf
AC
5292016-06-14 Bob Duff <duff@adacore.com>
530
531 * sem_elab.adb (Check_A_Call): Do nothing if the callee is
532 (or is in) an instance, and the caller is outside. Misc cleanup.
533
5342016-06-14 Javier Miranda <miranda@adacore.com>
535
536 * sem_ch4.adb (Analyze_Quantified_Expression):
537 Generating C code avoid spurious warning on loop variable of
538 inlinined postconditions.
539
64f5d139
JM
5402016-06-14 Javier Miranda <miranda@adacore.com>
541
542 * sem_attr.adb (Analyze_Attribute_Old_Result): Adding assertion.
543 (Analyze_Attribute [Attribute_Old]): Generating C handle
544 analysis of 'old in inlined postconditions.
545 (Analyze_Attribute [Attribute_Result]): Generating C handle analysis
546 of 'result in inlined postconditions.
547 * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Old]):
548 Generating C handle expansion of 'old in inlined postconditions.
549 * inline.adb (Declare_Postconditions_Result): New subprogram.
550 * sem_ch12.adb (Copy_Generic_Node): Copy pragmas generated from
551 aspects when generating C code since pre/post conditions are
552 inlined and the frontend inlining relies on this routine to
553 perform inlining.
554 * exp_ch6.adb (Inlined_Subprogram): Replace Generate_C_Code
555 by Modify_Tree_For_C.
556 * exp_unst.adb (Visit_Node): Searching for up-level references
557 skip entities defined in inlined subprograms.
558
5a527952
AC
5592016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
560
561 * sem_ch7.adb, sem_ch12.adb, freeze.adb, lib-xref.ads, exp_ch3.adb:
562 Minor reformatting.
563
5642016-06-14 Bob Duff <duff@adacore.com>
565
566 * sem_elab.adb: Do nothing if the callee is intrinsic.
567 * sinfo.ads, einfo.ads: Minor comment fixes.
568
7782ff67
AC
5692016-06-14 Ed Schonberg <schonberg@adacore.com>
570
571 * contracts.adb (Has_Null_Body): Move to sem_util, for general
572 availability.
573 * sem_util.ads, sem_util.adb (Has_Null_Body): Predicate to
574 determine when an internal procedure created for some assertion
575 checking (e.g. type invariant) is a null procedure. Used to
576 eliminate redundant calls to such procedures when they apply to
577 components of composite types.
578 * exp_ch3.adb (Build_Component_Invariant_Call): Do not add call
579 if invariant procedure has a null body.
580
5812016-06-14 Thomas Quinot <quinot@adacore.com>
582
583 * g-socket.ads (Check_Selector): Clarify effect on IN OUT socket
584 set parameters.
585
5862016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
587
588 * exp_ch4.adb (Process_Action): Pass the action
589 list to Process_Transient_Object.
590 (Process_If_Case_Statements): Pass the action list to
591 Process_Transient_Object.
592 (Process_Transient_Object): Add new parameter Stmts and update the
593 comment on usage. When the context is a Boolean evaluation, insert
594 any finalization calls after the last statement of the construct.
595
4969efdf
AC
5962016-06-14 Tristan Gingold <gingold@adacore.com>
597
598 * einfo.adb, einfo.ads (Has_Timing_Event,
599 Set_Has_Timing_Event): Add Has_Timing_Event flag.
600 (Write_Entity_Flags): Display * sem_util.ads, sem_util.adb:
601 (Propagate_Type_Has_Flags): New procedure to factorize code.
602 * exp_ch3.adb (Expand_Freeze_Array_Type,
603 Expand_Freeze_Record_Type): Call Propagate_Type_Has_Flags.
604 * sem_ch3.adb (Access_Type_Decalaration): Initialize
605 Has_Timing_Event flag. (Analyze_Object_Declaration):
606 Move code that check No_Local_Timing_Events near
607 the code that check No_Local_Protected_Objects.
608 (Analyze_Private_Extension_Declaration, Array_Type_Declaration)
609 (Build_Derived_Type, Copy_Array_Base_Type_Attributes,
610 Process_Full_View) (Record_Type_Definition): Call
611 Propagate_Type_Has_Flags.
612 * sem_ch4.adb (Analyze_Allocator): Check No_Local_Timing_Events.
613 * sem_ch7.adb (New_Private_Type): Set Has_Timing_Event on the
614 Timing_Event type.
615 (Uninstall_Declaration): Call Propagate_Type_Has_Flags.
616 * sem_ch9.adb (Analyze_Protected_Definition): Call
617 Propagate_Type_Has_Flags.
618
6192016-06-14 Arnaud Charlet <charlet@adacore.com>
620
621 * sem.ads: Minor style fix.
622
44900051
AC
6232016-06-14 Ed Schonberg <schonberg@adacore.com>
624
625 * sem_ch12.adb (Analyze_Associations): An actual parameter
626 with a box must be included in the count of actuals, to detect
627 possible superfluous named actuals that do not match any of the
628 formals of the generic unit in a formal package declaration.
629
6302016-06-14 Justin Squirek <squirek@adacore.com>
631
632 * sem_ch3.adb (Analyze_Object_Declaration): Fix formatting
633 of error output related to SPARK RM 6.1.7(3) and pragma
634 Extensions_Visible.
635 * sem_ch4.adb (Analyze_Type_Conversion): Fix formatting of error
636 output related to SPARK RM 6.1.7(3) and pragma Extensions_Visible.
637 * sem_prag.adb (Analyze_Pragma): Fix formatting of error output
638 related to SPARK RM 7.1.2(15) and pragma Volatile_Function
639 so that the values True and False are no longer surrounded by
640 double quotes.
641 * sem_res.adb (Resolve_Actuals): Fix formatting of error output
642 related to SPARK RM 6.1.7(3) and pragma Extensions_Visible.
643
6442016-06-14 Arnaud Charlet <charlet@adacore.com>
645
646 * gnat1drv.adb (Adjust_Global_Switches): Enable access checks
647 in codepeer mode.
648 * freeze.adb: Minor grammar fix in comment.
0da343bc
AC
6492016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
650
651 * lib.adb: Minor reformatting.
652 * sem_util.adb (Is_OK_Volatile_Context): Do
653 include Address in the supported attributes.
654
6552016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
656
657 * exp_ch4.adb (Expand_N_Case_Expression):
658 Code cleanup. Finalize any transient controlled
659 objects on exit from a case expression alternative.
660 (Expand_N_If_Expression): Code cleanup.
661 (Process_Actions): Removed.
662 (Process_If_Case_Statements): New routine.
663 (Process_Transient_Object): Change the name of formal Rel_Node to
664 N and update all occurrences. Update the comment on usage. When
665 the type of the context is Boolean, the proper insertion point
666 for the finalization call is after the last declaration.
667
6682016-06-14 Ed Schonberg <schonberg@adacore.com>
669
670 * lib-xref.ads, lib-xref.adb (Has_Deferred_Reference): new
671 predicate to determine whether an entity appears in a context
672 for which a Deferred_Reference was created, because it is not
673 possible to determine when reference is analyzed whether it
674 appears in a context in which the entity is modified.
675 * sem_ch5.adb (Analyze_Statement): Do not emit a useless warning
676 on assignment for an entity that has a deferred_reference.
677
6782016-06-14 Javier Miranda <miranda@adacore.com>
679
680 * sem_res.adb (Resolve_Actuals): Generate a reference to actuals that
681 come from source. Previously the reference was generated only if the
682 call comes from source but the call may be rewritten by the expander
683 thus causing the notification of spurious warnings.
684
6852016-06-14 Arnaud Charlet <charlet@adacore.com>
686
687 * gnat1drv.adb: Remove further references to AAMP.
688 * checks.adb (Apply_Scalar_Range_Check): Take
689 Check_Float_Overflow info account.
690 * live.ads, live.adb Added subprogram headers and
691 start-of-processing-for comments.
692 * sem_ch12.adb (Instantiate_Package_Body): Do not suppress
693 checks when instantiating runtime units in CodePeer mode.
694
a5150cb1
AC
6952016-06-14 Arnaud Charlet <charlet@adacore.com>
696
697 * exp_ch3.adb (Expand_N_Object_Declaration): Only consider
698 nodes from sources.
699
7002016-06-14 Arnaud Charlet <charlet@adacore.com>
701
702 * switch-c.adb, gnat1drv.adb (Adjust_Global_Switches): Only disable
703 simple value propagation in CodePeer mode when warnings are disabled.
704 (Scan_Front_End_Switches): Enable relevant front-end switches
705 when using -gnateC.
706
7072016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
708
709 * sem_util.adb (Is_OK_Volatile_Context): A
710 reference to a volatile object is considered OK if appears as
711 the prefix of attributes Address, Alignment, Component_Size,
712 First_Bit, Last_Bit, Position, Size, Storage_Size.
713
7142016-06-14 Yannick Moy <moy@adacore.com>
715
716 * lib-xref-spark_specific.adb (Add_SPARK_File): Do not traverse
717 subunits directly, as they are already traversed as part of the
718 top-level unit to which they belong.
719 (Add_SPARK_Xrefs): Add assertions to ensure correct sorting.
720 (Generate_Dereference): Use unique definition place for special
721 variable __HEAP, to ensure correct sorting of references.
722 * lib-xref.adb (Generate_Reference): Use top-level unit in case
723 of subunits.
724 * lib.adb, lib.ads (Get_Top_Level_Code_Unit): New functions that
725 compute the top-level code unit for a source location of AST node,
726 that go past subunits.
727
7cdb6871
EB
7282016-06-13 Eric Botcazou <ebotcazou@adacore.com>
729
730 * gcc-interface/decl.c (gnat_to_gnu_subprog_type): Build only a minimal
731 PARM_DECL when the parameter type is dummy.
732 * gcc-interface/trans.c (Call_to_gnu): Translate formal types before
733 formal objects.
734
42e77cbc
EB
7352016-06-13 Eric Botcazou <ebotcazou@adacore.com>
736
737 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
738 PLUS_EXPR in the expression of a renaming.
739
0317e5a2
EB
7402016-06-13 Eric Botcazou <ebotcazou@adacore.com>
741
742 * gcc-interface/utils2.c (known_alignment) <CALL_EXPR>: Deal specially
743 with calls to malloc.
744
aa18f65a
EB
7452016-06-11 Eric Botcazou <ebotcazou@adacore.com>
746
747 * gcc-interface/trans.c (build_binary_op_trapv): If no operand is a
748 constant, use the generic implementation of the middle-end; otherwise
749 turn the dynamic conditions into static conditions and simplify.
750
a31d78c6
EB
7512016-06-11 Eric Botcazou <ebotcazou@adacore.com>
752
753 * gcc-interface/trans.c (Case_Statement_to_gnu): Deal with characters.
754
773392af
PMR
7552016-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
756
757 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not clobber
758 gnat_entity_name with temporary names for XUP and XUT types.
759
4d926e34
MS
7602016-06-10 Martin Sebor <msebor@redhat.com>
761
762 PR c/71392
763 * gcc/ada/gcc-interface/utils.c (handle_nonnull_attribute): Accept
764 the nonnull attribute in type-generic builtins.
765
42a5e410
EB
7662016-06-06 Eric Botcazou <ebotcazou@adacore.com>
767
768 * gcc-interface/decl.c (Gigi_Equivalent_Type): Make sure equivalent
769 types are present before returning them. Remove final assertion.
770 (gnat_to_gnu_entity) <E_Access_Protected_Subprogram_Type>: Adjust to
771 above change.
772 <E_Protected_Type>: Likewise.
773
f8a9b81f
EB
7742016-06-06 Eric Botcazou <ebotcazou@adacore.com>
775
776 * gcc-interface/trans.c (elaborate_all_entities_for_package): Also do
777 not elaborate Itypes.
778
1f0b1322
EB
7792016-06-06 Eric Botcazou <ebotcazou@adacore.com>
780
781 * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
782 for noinline and noclone attributes.
783 (handle_noinline_attribute): New handler.
784 (handle_noclone_attribute): Likewise.
785
5a4916be
EB
7862016-06-06 Eric Botcazou <ebotcazou@adacore.com>
787
788 * gcc-interface/trans.c (process_type): Beef up comment.
789
62801a77
EB
7902016-06-06 Eric Botcazou <ebotcazou@adacore.com>
791
792 * gcc-interface/utils2.c (build_call_alloc_dealloc): Do not substitute
793 placeholder expressions here but...
794 * gcc-interface/trans.c (gnat_to_gnu) <N_Free_Statement>: ...here.
795 Make an exception to the protection of a CALL_EXPR result with an
796 unconstrained type only in the same cases as Call_to_gnu.
797
f1ff07ec
EB
7982016-06-06 Eric Botcazou <ebotcazou@adacore.com>
799
800 * gcc-interface/trans.c (gnat_to_gnu): Rework special code dealing
801 with boolean rvalues and set the location directly. Do not set the
802 location in the other cases for a simple name.
803 (gnat_to_gnu_external): Clear the location on the expression.
804
d5ebeb8c
EB
8052016-06-06 Eric Botcazou <ebotcazou@adacore.com>
806
807 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Remove
808 useless 'else' statements and tidy up.
809 <E_Array_Subtype>: Fully deal with the declaration here.
810 <E_Incomplete_Type>: Use properly-typed constant.
811 Assert that we don't apply the special type treatment to dummy types.
812 Separate this treatment from the final back-annotation and simplify
813 the condition for the RM size.
814 (gnat_to_gnu_param): Add GNU_PARAM_TYPE parameter and adjust.
815 (gnat_to_gnu_subprog_type): Ajust call to gnat_to_gnu_param.
816 * gcc-interface/trans.c (gnat_to_gnu) <N_Subprogram_Declaration>: Add
817 comment.
818 (process_freeze_entity): Remove obsolete code.
819 (process_type): Minor tweaks.
820
4d9446f9
EB
8212016-06-06 Eric Botcazou <ebotcazou@adacore.com>
822
823 * einfo.ads (Returns_Limited_View): Remove.
824 (Set_Returns_Limited_View ): Likewise.
825 * einfo.adb (Returns_Limited_View): Likewise.
826 (Set_Returns_Limited_View ): Likewise.
827 * freeze.adb (Late_Freeze_Subprogram): Remove.
828 (Freeze_Entity): Do not defer the freezing of functions returning an
829 incomplete type coming from a limited context.
830
7414a3c3
EB
8312016-06-06 Eric Botcazou <ebotcazou@adacore.com>
832
833 * gcc-interface/gigi.h (finish_subprog_decl): Add ASM_NAME parameter.
834 * gcc-interface/decl.c (gnu_ext_name_for_subprog): New function.
835 (gnat_to_gnu_entity) <E_Subprogram_Type>: Do not check compatibility
836 of profiles for builtins here... Call gnu_ext_name_for_subprog.
837 Also update profiles if pointers to limited_with'ed types are
838 updated.
839 (gnat_to_gnu_param): Restore the correct source location information
840 for vector ABI warnings.
841 (associate_subprog_with_dummy_type): Add comment about AI05-019.
842 Set TYPE_DUMMY_IN_PROFILE_P flag unconditionally.
843 (update_profile): Deal with builtin declarations.
844 Call gnu_ext_name_for_subprog. Adjust call to finish_subprog_decl.
845 (update_profiles_with): Add comment.
846 (gnat_to_gnu_subprog_type): Reuse the return type if it is complete.
847 Likewise for parameter declarations in most cases. Do not change
848 the return type for the CICO mechanism if the profile is incomplete.
849 ...but here instead. Always reset the slot for the parameters.
850 * gcc-interface/utils.c (create_subprog_decl): Call
851 gnu_ext_name_for_subprog. Do not set the assembler name here but...
852 (finish_subprog_decl): ...but here instead. Add ASM_NAME parameter.
853
128a98ea
EB
8542016-06-06 Eric Botcazou <ebotcazou@adacore.com>
855
856 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Insert the
857 declaration of the corresponding record type before that of the
858 unprotected version of the subprograms that operate on it.
859 (Expand_Access_Protected_Subprogram_Type): Declare the Equivalent_Type
860 just before the original type.
861 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Point the current
862 declaration to the newly created declaration for the primitive.
863 (Analyze_Subtype_Declaration): Remove obsolete code forcing the
864 freezing of the subtype before its declaration.
865 (Replace_Anonymous_Access_To_Protected_Subprogram): Insert the new
866 declaration in the nearest enclosing scope for formal parameters too.
867 (Build_Derived_Access_Type): Restore the status of the created Itype
868 after it is erased by Copy_Node.
869 * sem_ch6.adb (Exchange_Limited_Views): Remove guard on entry.
870 (Analyze_Subprogram_Body_Helper): Call Exchange_Limited_Views only if
871 the specification is present.
872 Move around the code changing the designated view of the return type
873 and save the original view. Restore it on exit.
874 * sem_ch13.adb (Build_Predicate_Function_Declaration): Always insert
875 the declaration right after that of the type.
876
e4b631a5
SW
8772016-06-01 Simon Wright <simon@pushface.org>
878
879 PR ada/71358
880 * g-comlin.adb (Display_Section_Help): Do not dereference
881 Config.Switches if it's null.
882 (Getopt): Likewise.
883
3dc553dd
EB
8842016-05-31 Eric Botcazou <ebotcazou@adacore.com>
885
886 * s-osinte-kfreebsd-gnu.ads (clock_getres): Define.
887 (Get_Page_Size): Remove duplicate and return int.
888
8892016-05-31 Jan Sommer <soja-lists@aries.uberspace.de>
890
891 PR ada/71317
892 * s-osinte-rtems.ads (clock_getres): Define.
893 (Get_Page_Size): Remove duplicate and return int.
894
55c8849f
EB
8952016-05-20 Eric Botcazou <ebotcazou@adacore.com>
896
897 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
898 Make same-sized subtypes of signed base types signed.
899 * gcc-interface/utils.c (make_type_from_size): Adjust to above change.
900 (unchecked_convert): Likewise.
901
d972bae0
EB
9022016-05-16 Eric Botcazou <ebotcazou@adacore.com>
903
904 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Do not build
905 a specific type for the object if it is deemed a constant.
906
f91caacb
EB
9072016-05-16 Eric Botcazou <ebotcazou@adacore.com>
908
909 * freeze.adb (Freeze_Record_Type): Extend pragma Implicit_Packing to
910 components of any elementary types and of composite types.
911
3d626f94
EB
9122016-05-16 Eric Botcazou <ebotcazou@adacore.com>
913
914 * freeze.adb (Freeze_Array_Type): Call Addressable predicate instead
915 of testing for individual sizes.
916 (Freeze_Entity): Rework implementation of pragma Implicit_Packing for
917 array types, in particular test for suitable sizes upfront and do not
918 mimic the processing that will be redone later in Freeze_Array_Type.
919
cce309d7
EB
9202016-05-16 Eric Botcazou <ebotcazou@adacore.com>
921
922 * gcc-interface/trans.c (elaborate_all_entities_for_package): Also skip
923 formal objects.
924
b3f75672
EB
9252016-05-16 Eric Botcazou <ebotcazou@adacore.com>
926
927 * doc/gnat_rm/implementation_defined_attributes.rst
928 (Scalar_Storage_Order): Adjust restriction for packed array types.
929 * einfo.ads (Is_Bit_Packed_Array): Adjust description.
930 (Is_Packed): Likewise.
931 (Is_Packed_Array_Impl_Type): Likewise.
932 (Packed_Array_Impl_Type): Likewise.
933 * exp_ch4.adb (Expand_N_Indexed_Component): Do not do anything special
934 if the prefix is not a packed array implemented specially.
935 * exp_ch6.adb (Expand_Actuals): Expand indexed components only for
936 bit-packed array types.
937 * exp_pakd.adb (Install_PAT): Set Is_Packed_Array_Impl_Type flag on
938 the PAT before analyzing its declaration.
939 (Create_Packed_Array_Impl_Type): Remove redundant statements.
940 * freeze.adb (Check_Component_Storage_Order): Reject packed array
941 components only if they are bit packed.
942 (Freeze_Array_Type): Fix logic detecting bit packing and do not bit
943 pack for composite types whose size is multiple of a byte.
944 Create the implementation type for packed array types only when it is
945 needed, i.e. bit packing or packing because of holes in index types.
946 Make sure the Has_Non_Standard_Rep and Is_Packed flags agree.
947 * gcc-interface/gigi.h (make_packable_type): Add MAX_ALIGN parameter.
948 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
949 Call maybe_pad_type instead of building the padding type manually.
950 (gnat_to_gnu_entity) <E_Array_Subtype>: Do not assert that
951 Packed_Array_Impl_Type is present for packed arrays.
952 (gnat_to_gnu_component_type): Also handle known alignment for packed
953 types by passing it to make_packable_type.
954 * gcc-interface/utils.c (make_packable_type): Add MAX_ALIGN parameter
955 and deal with it in the array case. Adjust recursive call. Simplify
956 computation of new size and cap the alignment to BIGGEST_ALIGNMENT.
957
6232acb7
TQ
9582016-05-16 Thomas Quinot <quinot@adacore.com>
959
960 * freeze.adb (Check_Component_Storage_Order): Also get full view of
961 enclosing type.
962
34da9c98
EB
9632016-05-16 Eric Botcazou <ebotcazou@adacore.com>
964
965 * exp_util.adb (Remove_Side_Effects): Also make a constant if we need
966 to capture the value for a small not by-reference record type.
967 * freeze.ads (Check_Compile_Time_Size): Adjust comment.
968 * freeze.adb (Set_Small_Size): Likewise. Accept a size in the range
969 of 33 .. 64 bits.
970 (Check_Compile_Time_Size): Merge scalar and access type cases. Change
971 variable name in array type case. For the computation of the packed
972 size, deal with record components and remove redundant test.
973 (Freeze_Array_Type): Also adjust packing status when the size of the
974 component type is in the range 33 .. 64 bits.
975 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Turn primitive
976 into elementary type throughout. Minor tweaks.
977 (Alignment Clauses): Document actual alignment of packed array types.
978 (Pragma Pack for Arrays): List only the 3 main cases and adjust. Add
979 "simple" to the record case. Document effect on non packable types.
980 (Pragma Pack for Records): Likewise. Add record case and adjust.
981
47e62307
EB
9822016-05-16 Eric Botcazou <ebotcazou@adacore.com>
983
984 * gcc-interface/Make-lang.in (GNATMAKE_FOR_HOST): In the canadian
985 cross case, use host_noncanonical instead of host as prefix.
986 (GNATBIND_FOR_HOST): Likewise.
987 (GNATLINK_FOR_HOST): Likewise.
988 (GNATLS_FOR_HOST): Likewise.
989
498988ad
EB
9902016-05-06 Eric Botcazou <ebotcazou@adacore.com>
991
992 PR ada/70969
993 * system-darwin-ppc64.ads: Add pragma No_Elaboration_Code_All.
994 * system-linux-armeb.ads: Likewise.
995 * system-linux-mips64el.ads: Likewise.
996 * system-linux-mips.ads: Likewise.
997 * system-linux-mipsel.ads: Likewise.
998 * system-linux-ppc64.ads: Likewise.
999 * system-linux-sparcv9.ads: Likewise.
1000 * system-rtems.ads: Likewise.
1001
2a746f23
ST
10022016-05-04 Samuel Thibault <samuel.thibault@ens-lyon.org>
1003
1004 * s-osinte-gnu.ads (Get_Page_Size): Return int and use getpagesize
1005 instead of __getpagesize.
1006
87cdf04b
RO
10072016-05-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1008
1009 * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
1010 Honor DESTDIR.
1011
a56886e9
AC
10122016-05-02 Tristan Gingold <gingold@adacore.com>
1013
1014 * fname.adb (Is_Predefined_File_Name): Also consider non-krunched
1015 i-* names.
1016
10172016-05-02 Ed Schonberg <schonberg@adacore.com>
1018
1019 * sem_util.adb (Aggregate_Constraint_Checks): Separate
1020 accessibility checks and non-null checks for aggregate components,
1021 to prevent spurious accessibility errors.
1022
10232016-05-02 Ed Schonberg <schonberg@adacore.com>
1024
1025 * sem_ch3.adb (OK_For_Limited_Init): A type conversion is not
1026 always legal in the in-place initialization of a limited entity
1027 (e.g. an allocator).
1028 * sem_res.adb (Resolve_Allocator): Improve error message with RM
1029 reference when allocator expression is illegal.
1030
fc3819c9
AC
10312016-05-02 Ed Schonberg <schonberg@adacore.com>
1032
1033 * exp_ch6.adb (Expand_Call): When inlining a call to a function
1034 declared in a package instance, locate the instance node of the
1035 package after the actual package declaration. skipping over
1036 pragmas that may have been introduced when the generic unit
1037 carries aspects that are transformed into pragmas.
1038
10392016-05-02 Bob Duff <duff@adacore.com>
1040
1041 * s-memory.adb (Alloc, Realloc): Move checks
1042 for Size = 0 or size_t'Last into the Result = System.Null_Address
1043 path for efficiency. Improve comments (based on actual C language
1044 requirements for malloc).
1045 * exp_util.adb (Build_Allocate_Deallocate_Proc): Optimize the
1046 case where we are using the default Global_Pool_Object, and we
1047 don't need the heavy finalization machinery.
1048
14c3ae9a
GD
10492016-05-02 Gary Dismukes <dismukes@adacore.com>
1050
1051 * exp_util.ads, sem_ch12.adb: Minor reformatting.
1052
89d3b1a1
AC
10532016-05-02 Javier Miranda <miranda@adacore.com>
1054
1055 * exp_util.ads, exp_util.adb (Force_Evaluation): Adding new formal.
1056 (Remove_Side_Effects): Adding a new formal.
1057 * exp_ch6.adb (Expand_Simple_Function_Return): Generating the
1058 call to the _Postconditions procedure ensure that side-effects
1059 are unconditionally removed.
1060
10612016-05-02 Ed Schonberg <schonberg@adacore.com>
1062
1063 * sem_ch12.adb (Check_Formal_Package_Instance, Check_Mismatch):
1064 Use original node to determine whether the declaration is for
1065 a formal type declaration, to take into account that formwl
1066 private types are rewritten as private extension declarations
1067 to simplify semantic analysis.
1068
ca90b962
GD
10692016-05-02 Gary Dismukes <dismukes@adacore.com>
1070
1071 * exp_ch9.adb, sem_ch6.adb, sem_ch6.ads: Minor reformatting and typo
1072 fixes.
1073
bac5ba15
AC
10742016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
1075
1076 * sem_ch3.adb, exp_ch9.adb, einfo.adb, sem_ch4.adb, sem_ch6.adb: Minor
1077 reformatting.
1078
10792016-05-02 Ed Schonberg <schonberg@adacore.com>
1080
1081 * exp_ch4.adb (Expand_N_Allocator): If the designated type
1082 is a private derived type with no discriminants, examine its
1083 underlying_full_view to determine whether the full view has
1084 defaulted discriminants, so their defaults can be used in the
1085 call to the initialization procedure for the designated object.
1086
42f11e4c
AC
10872016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
1088
1089 * exp_prag.adb, comperr.adb: Minor reformatting.
1090
10912016-05-02 Ed Schonberg <schonberg@adacore.com>
1092
1093 * exp_pakd.adb (Rj_Unchecked_Convert_To): Do not perform an
1094 unchecked conversion if the source size is 0 (indicating that
1095 its RM size is unknown). This will happen with packed arrays of
1096 non-discrete types, in which case the component type is known
1097 to match.
1098
10992016-05-02 Arnaud Charlet <charlet@adacore.com>
1100
1101 * debug.adb: Reserve -gnatd.V.
1102
11032016-05-02 Javier Miranda <miranda@adacore.com>
1104
1105 * sem_ch3.adb (Process_Full_View): Remove from visibility
1106 wrappers of synchronized types to avoid spurious errors with
1107 their wrapped entity.
1108 * exp_ch9.adb (Build_Wrapper_Spec): Do not generate the wrapper
1109 if no interface primitive is covered by the subprogram and this is
1110 not a primitive declared between two views; see Process_Full_View.
1111 (Build_Protected_Sub_Specification): Link the dispatching
1112 subprogram with its original non-dispatching protected subprogram
1113 since their names differ.
1114 (Expand_N_Protected_Type_Declaration):
1115 If a protected subprogram overrides an interface primitive then
1116 do not build a wrapper if it was already built.
1117 * einfo.ads, einfo.adb (Original_Protected_Subprogram): New attribute.
1118 * sem_ch4.adb (Names_Match): New subprogram.
1119 * sem_ch6.adb (Check_Synchronized_Overriding): Moved
1120 to library level and defined in the public part of the
1121 package to invoke it from Exp_Ch9.Build_Wrapper_Spec
1122 (Has_Matching_Entry_Or_Subprogram): New subprogram.
1123 (Report_Conflict): New subprogram.
1124
331e5015
AC
11252016-05-02 Jerome Lambourg <lambourg@adacore.com>
1126
1127 * s-unstyp.ads: Code cleanups.
1128
11292016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
1130
1131 * sem_ch13.adb (Size_Too_Small_Error): Fix the error message format.
1132
11332016-05-02 Ed Schonberg <schonberg@adacore.com>
1134
1135 * exp_prag.adb (Expand_attributes_In_Consequence,
1136 Expand_Attributes): If the prefix of'Old is an unconstrained type,
1137 for example an unconstrained formal of the enclosing subprogram,
1138 create an object declaration with an expression to obtain the
1139 actual subtype of the temporary.
1140
11412016-05-02 Arnaud Charlet <charlet@adacore.com>
1142
1143 * comperr.adb (Delete_SCIL_Files): Add missing handling of
1144 N_Subprogram_Declaration.
1145
2cc2e964
AC
11462016-05-02 Gary Dismukes <dismukes@adacore.com>
1147
1148 * exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, checks.adb, sem_attr.adb,
1149 gnat1drv.adb, sem_ch4.adb, sem_ch13.adb: Minor reformatting and typo
1150 fixes.
1151 * sem_prag.adb, sem_ch12.adb: Minor typo fixes.
1152
11532016-05-02 Ed Schonberg <schonberg@adacore.com>
1154
1155 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): The
1156 function call may be wrapped in an explicit type conversion.
1157
11582016-05-02 Jerome Lambourg <lambourg@adacore.com>
1159
1160 * interfac.ads: use pragma No_Elaboration_Code_All.
1161 * s-unstyp.ads: s-unstyp.ads: use pragma No_Elaboration_Code_All.
1162
11632016-05-02 Ed Schonberg <schonberg@adacore.com>
1164
1165 * sem.adb (Analyze: If node is an error node previously created
1166 by the parser, disable expansion to prevent subsequent glitches
1167 in error recovery.
1168
51122913
HK
11692016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
1170
1171 * sem_ch13.adb (Alignment_Error): Removed.
1172 (Get_Alignment_Value): Code cleanup.
1173
32b794c8
AC
11742016-05-02 Tristan Gingold <gingold@adacore.com>
1175
1176 * sem_ch3.adb (Analyze_Object_Declaration): Use Has_Protected
1177 to check for the no local protected objects restriction.
1178
11792016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
1180
1181 * einfo.adb Anonymous_Master now uses Node35.
1182 (Anonymous_Master): Update the assertion and node reference.
1183 (Set_Anonymous_Master): Update the assertion and node reference.
1184 (Write_Field35_Name): Add output for Anonymous_Master.
1185 (Write_Field36_Name): The output is now undefined.
1186 * einfo.ads Update the node and description of attribute
1187 Anonymous_Master. Remove prior occurrences in entities as this
1188 is now a type attribute.
1189 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove local variable
1190 Ins_Node. Anonymous access- to-controlled component types no
1191 longer need finalization masters. The master is now built when
1192 a related allocator is expanded.
1193 (Expand_Freeze_Record_Type): Remove local variable Has_AACC. Do not
1194 detect whether the record type has at least one component of anonymous
1195 access-to- controlled type. These types no longer need finalization
1196 masters. The master is now built when a related allocator is expanded.
1197 * exp_ch4.adb Remove with and use clauses for Lib and Sem_Ch8.
1198 (Current_Anonymous_Master): Removed.
1199 (Expand_N_Allocator): Call Build_Anonymous_Master to create a
1200 finalization master for an anonymous access-to-controlled type.
1201 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
1202 Call routine Build_Anonymous_Master to create a finalization master
1203 for an anonymous access-to-controlled type.
1204 * exp_ch7.adb (Allows_Finalization_Master): New routine.
1205 (Build_Anonymous_Master): New routine.
1206 (Build_Finalization_Master): Remove formal parameter
1207 For_Anonymous. Use Allows_Finalization_Master to determine whether
1208 circumstances warrant a finalization master. This routine no
1209 longer creates masters for anonymous access-to-controlled types.
1210 (In_Deallocation_Instance): Removed.
1211 * exp_ch7.ads (Build_Anonymous_Master): New routine.
1212 (Build_Finalization_Master): Remove formal parameter For_Anonymous
1213 and update the comment on usage.
1214 * sem_util.adb (Get_Qualified_Name): New routines.
1215 (Output_Name): Reimplemented.
1216 (Output_Scope): Removed.
1217 * sem_util.ads (Get_Qualified_Name): New routines.
1218
12192016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
1220
1221 * debug.adb: Document the use of switch -gnatd.H.
1222 * gnat1drv.adb (Adjust_Global_Switches): Set ASIS_GNSA mode when
1223 -gnatd.H is present.
1224 (Gnat1drv): Suppress the call to gigi when ASIS_GNSA mode is active.
1225 * opt.ads: Add new option ASIS_GNSA_Mode.
1226 * sem_ch13.adb (Alignment_Error): New routine.
1227 (Analyze_Attribute_Definition_Clause): Suppress certain errors in
1228 ASIS mode for attribute clause Alignment, Machine_Radix, Size, and
1229 Stream_Size.
1230 (Check_Size): Use routine Size_Too_Small_Error to
1231 suppress certain errors in ASIS mode.
1232 (Get_Alignment_Value): Use routine Alignment_Error to suppress certain
1233 errors in ASIS mode.
1234 (Size_Too_Small_Error): New routine.
1235
4871a41d
AC
12362016-05-02 Arnaud Charlet <charlet@adacore.com>
1237
1238 * spark_xrefs.ads Description of the spark cross-references
1239 clarified; small style fixes.
1240 * lib-xref-spark_specific.adb (Add_SPARK_Scope,
1241 Detect_And_Add_SPARK_Scope): consider protected types and bodies
1242 as yet another scopes.
1243 (Enclosing_Subprogram_Or_Library_Package): refactored using
1244 Hristian's suggestions; added support for scopes of protected
1245 types and bodies; fix for entries to return the scope of the
1246 enclosing concurrent type, which is consistent with what is
1247 returned for protected subprograms.
1248 * sem_intr.adb: Minor style fix in comment.
1249
8d4611f7
AC
12502016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
1251
1252 * lib-xref.ads, lib-xref-spark_specific.adb, get_spark_xrefs.adb,
1253 put_spark_xrefs.adb: Minor reformatting.
1254
12552016-05-02 Doug Rupp <rupp@adacore.com>
1256
1257 * g-traceb.ads: Document traceback for ARM.
1258
12592016-05-02 Javier Miranda <miranda@adacore.com>
1260
1261 * exp_disp.adb (Make_Tags): Do not generate the
1262 external name of interface tags adding the suffix counter since
1263 it causes problems at link time when the IP routines are inlined
1264 across units with optimization.
1265
12662016-05-02 Ed Schonberg <schonberg@adacore.com>
1267
1268 * einfo.ads, einfo.adb (Predicates_Ignared): new flag to indicate
1269 that predicate checking is disabled for predicated subtypes in
1270 the context of an Assertion_Policy pragma.
1271 * checks.adb (Apply_Predicate_Check): Do nothing if
1272 Predicates_Ignored is true.
1273 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): If
1274 Predicates_Ignores is true, the function Rep_To_Pos does raise
1275 an exception for invalid data.
1276 * exp_ch4.adb (Expand_N_Type_Conversion): IF target is a predicated
1277 type do not apply check if Predicates_Ignored is true.
1278 * exp_ch5.adb (Expand_N_Case_Statement): If Predicates_Ignored
1279 is true, sem_prag.adb:
1280 * sem_ch3.adb (Analyze_Object_Declaration): If Predicates_Ignored
1281 is true do not emit predicate check on initializing expression.
1282
bcb0389e
AC
12832016-05-02 Arnaud Charlet <charlet@adacore.com>
1284
1285 * get_spark_xrefs.adb (Get_Nat, Get_Name): Initialize variables when
1286 they are declared; refine type of a counter from Integer to Natural.
1287 * sem_ch5.adb, gnatcmd.adb, s-intman-posix.adb, eval_fat.adb,
1288 prj.adb, sem_util.adb, s-intman-android.adb, prj-nmsc.adb, sem_ch8.adb,
1289 exp_ch3.adb: Minor editing.
1290
ef25192b
YM
12912016-05-02 Yannick Moy <moy@adacore.com>
1292
1293 * a-tigeli.adb (Get_Line): Always set Last prior to returning.
1294
12952016-05-02 Yannick Moy <moy@adacore.com>
1296
1297 * lib-xref.adb: Minor style fix in whitespace of declarations.
1298 * put_spark_xrefs.adb (Put_SPARK_Xrefs): printing of strings
1299 refactored without loops.
1300 * put_spark_xrefs.ads (Write_Info_Str): new formal argument of
1301 generic procedure.
1302 * spark_xrefs.adb (Write_Info_Str): new actual in instantiation
1303 of generic procedure.
1304
eff69022
AC
13052016-05-02 Arnaud Charlet <charlet@adacore.com>
1306
1307 * lib-xref-spark_specific.adb (Add_SPARK_Scope): add task type scope.
1308 (Detect_And_Add_SPARK_Scope): detect and add task type scope.
1309 (Enclosing_Subprogram_Or_Package): Respect boundaries of task
1310 and entry declarations.
1311 * spark_xrefs.ads: minor typo in comment.
1312
fb8d37ef
AC
13132016-05-02 Arnaud Charlet <charlet@adacore.com>
1314
1315 * make.adb: Minor: avoid an exception when calling gnatmake with
1316 no argument and gnatmake is built with checks on.
1317 * lib-xref-spark_specific.adb: Minor code cleanup.
1318
c4405dfe
ES
13192016-05-02 Ed Schonberg <schonberg@adacore.com>
1320
1321 * sem_util.adb (Normalize_Actuals): Take into account extra
1322 actuals that may have been introduced previously. Normally extra
1323 actuals are introduced when a call is expanded, but a validity
1324 check may copy and reanalyze a call that carries an extra actual
1325 (e.g. an accessibility parameter) before the call itself is
1326 marked Analzyed, and the analysis of the copy has to be able to
1327 cope with the added actual.
1328
07eb872e
AC
13292016-05-02 Bob Duff <duff@adacore.com>
1330
1331 * sem_ch10.adb (Analyze_Compilation_Unit): Preserve
1332 treeishness. Previous version had Context_Items shared between
1333 the spec and body.
1334
13352016-05-02 Ed Schonberg <schonberg@adacore.com>
1336
1337 * sem_aggr.adb (Resolve_Aggr_Expression): For both array and
1338 record cases, apply predicate check on component for expression
1339 only if expression has been analyzed already. For expressions
1340 that need to be duplicated when they cover multiple components,
1341 resolution and predicate checking take place later.
1342
13432016-05-02 Olivier Hainque <hainque@adacore.com>
1344
1345 * a-direct.adb (Delete_Tree): Use full names to designate subdirs
1346 and files therein, instead of local names after a change of
1347 current directory.
1348
a25ad01c
TQ
13492016-05-02 Thomas Quinot <quinot@adacore.com>
1350
1351 * freeze.adb (Check_Component_Storage_Order): Get full view of
1352 component type.
1353
558fbeb0
HK
13542016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
1355
1356 * checks.adb, freeze.adb, sem_res.adb, s-stposu.adb, repinfo.adb:
1357 Minor reformatting.
1358
1e60643a
AC
13592016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
1360
1361 * sem_ch4.adb (Find_Indexing_Operations): Use the underlying type
1362 of the container base type in case the container is a subtype.
1363 * sem_ch5.adb (Analyze_Iterator_Specification): Ensure that
1364 the selector has an entity when checking for a component of a
1365 mutable object.
1366
13672016-05-02 Arnaud Charlet <charlet@adacore.com>
1368
1369 Remove dead code.
1370 * opt.ads (Latest_Ada_Only): New flag.
1371 * sem_prag.adb, par-prag.adb: Ignore pragma Ada_xx under this flag.
1372 * usage.adb, switch-c.adb: Disable support for -gnatxx under this flag.
1373 * einfo.ads (Has_Predicates, Predicate_Function):
1374 Clarify that Has_Predicates does not imply that Predicate_Function
1375 will return a non-empty entity.
1376
13772016-05-02 Ed Schonberg <schonberg@adacore.com>
1378
1379 * sem_res.adb (Resolve_Qualified_Expression): Generate a predicate
1380 check if type requires it.
1381 * checks.adb (Apply_Predicate_Check): Disable checks in the
1382 object declaration created for an expression with side-effects
1383 that requires a predicate check to prevent infinite recursion
1384 during expansion.
1385
13862016-05-02 Ed Schonberg <schonberg@adacore.com>
1387
1388 * sem_ch6.adb (Process_Formals): Check properly the type of a
1389 formal to determine whether a given convention applies to it.
1390
13912016-05-02 Doug Rupp <rupp@adacore.com>
1392
1393 * tracebak.c: Add incantations for arm-vxworks[67] traceback.
1394
13952016-05-02 Thomas Quinot <quinot@adacore.com>
1396
1397 * freeze.adb (Check_Component_Storage_Order): Make it a warning, not an
1398 error, to have a component with implicit SSO within a composite type
1399 that has explicit SSO.
1400
14012016-05-02 Bob Duff <duff@adacore.com>
1402
1403 * s-stposu.adb (Allocate_Any_Controlled): Don't lock/unlock twice.
1404
14052016-05-02 Ed Schonberg <schonberg@adacore.com>
1406
1407 * repinfo.adb (List_Entities): Make procedure recursive, to
1408 provide representation information for subprograms declared
1409 within subprogram bodies.
1410
f96fd197
AC
14112016-05-02 Arnaud Charlet <charlet@adacore.com>
1412
1413 * exp_ch5.adb, layout.adb, gnatcmd.adb exp_attr.adb, make.adb,
1414 bindgen.adb, debug.adb, exp_pakd.adb, freeze.adb, sem_util.adb,
1415 gnatlink.adb, switch-m.adb, exp_ch4.adb, repinfo.adb, adabkend.adb,
1416 osint.adb: Remove dead code.
1417
14182016-05-02 Yannick Moy <moy@adacore.com>
1419
1420 * a-tigeli.adb (Get_Line): Fix bound for test to
1421 decide when to compensate for character 0 added by call to fgets.
1422
3ba1a9eb
AC
14232016-05-02 Ed Schonberg <schonberg@adacore.com>
1424
1425 * sem_ch4.adb (Analyze_Allocator): If the expression does not
1426 have a subtype indication and the type is an unconstrained tagged
1427 type with defaulted discriminants, create an explicit constraint
1428 for it during analysis to prevent out-of-order freezing actions
1429 on generated classwide types.
1430
14312016-05-02 Javier Miranda <miranda@adacore.com>
1432
1433 * exp_ch5.adb (Expand_N_Assignment_Statement):
1434 In the runtime check that ensures that the tags of source an
1435 target match, add missing displacement of the pointer to the
1436 objects if they cover interface types.
1437
14382016-05-02 Ed Schonberg <schonberg@adacore.com>
1439
1440 * sem_attr.adb (Analyze_Attribute, case 'Old): Do not use
1441 base type for attribute when type is discrete: transformation
1442 is not needed for such types, and leads to spurious errors if
1443 the context is a case construct.
1444
552cc590
EB
14452016-05-02 Eric Botcazou <ebotcazou@adacore.com>
1446
1447 * gcc-interface/decl.c (elaborate_reference_1): Do not bother about
1448 operand #2 for COMPONENT_REF.
1449 * gcc-interface/utils2.c (gnat_save_expr): Likewise.
1450 (gnat_protect_expr): Likewise.
1451 (gnat_stabilize_reference_1): Likewise.
1452 (gnat_rewrite_reference): Do not bother about operand #3 for ARRAY_REF.
1453 (get_inner_constant_reference): Likewise.
1454 (gnat_invariant_expr): Likewise.
1455 * gcc-interface/trans.c (fold_constant_decl_in_expr): Likewise.
1456
3eaec285
EB
14572016-05-02 Eric Botcazou <ebotcazou@adacore.com>
1458
1459 * gcc-interface/trans.c (Range_to_gnu): New static function.
1460 (Raise_Error_to_gnu) <N_In>: Call it to translate the range.
1461 (gnat_to_gnu) <N_In>: Likewise.
1462
f73036c1
EB
14632016-04-30 Eric Botcazou <ebotcazou@adacore.com>
1464
1465 * gcc-interface/Make-lang.in (ACATSCMD): New variable.
1466 (check-acats): Use it.
1467 (check_acats_targets): Likewise.
1468
24efbb3e
EB
14692016-04-28 Eric Botcazou <ebotcazou@adacore.com>
1470
1471 PR ada/70786
1472 * a-textio.adb (Get_Immediate): Add missing 'not' in expression.
1473
1e55d29a
EB
14742016-04-27 Eric Botcazou <ebotcazou@adacore.com>
1475
1476 * sem_aux.adb (Is_By_Reference_Type): Also return true for a tagged
1477 incomplete type without full view.
1478 * sem_ch6.adb (Exchange_Limited_Views): Change into a function and
1479 return the list of changes.
1480 (Restore_Limited_Views): New procedure to undo the transformation made
1481 by Exchange_Limited_Views.
1482 (Analyze_Subprogram_Body_Helper): Adjust call to Exchange_Limited_Views
1483 and call Restore_Limited_Views at the end, if need be.
1484 (Possible_Freeze): Do not delay freezing because of incomplete types.
1485 (Process_Formals): Remove kludges for class-wide types.
1486 * types.h (By_Copy_Return): Delete.
1487 * gcc-interface/ada-tree.h (TYPE_MAX_ALIGN): Move around.
1488 (TYPE_DUMMY_IN_PROFILE_P): New macro.
1489 * gcc-interface/gigi.h (update_profiles_with): Declare.
1490 (finish_subprog_decl): Likewise.
1491 (get_minimal_subprog_decl): Delete.
1492 (create_subprog_type): Likewise.
1493 (create_param_decl): Adjust prototype.
1494 (create_subprog_decl): Likewise.
1495 * gcc-interface/decl.c (defer_limited_with): Rename into...
1496 (defer_limited_with_list): ...this.
1497 (gnat_to_gnu_entity): Adjust to above renaming.
1498 (finalize_from_limited_with): Likewise.
1499 (tree_entity_vec_map): New structure.
1500 (gt_pch_nx): New helpers.
1501 (dummy_to_subprog_map): New hash table.
1502 (gnat_to_gnu_param): Set the SLOC here. Remove MECH parameter and
1503 add FIRST parameter. Deal with the mechanism here instead of...
1504 Do not make read-only variant of types. Simplify expressions.
1505 In the by-ref case, test the mechanism before must_pass_by_ref
1506 and also TYPE_IS_BY_REFERENCE_P before building the reference type.
1507 (gnat_to_gnu_subprog_type): New static function extracted from...
1508 Do not special-case the type_annotate_only mode. Call
1509 gnat_to_gnu_profile_type instead of gnat_to_gnu_type on return type.
1510 Deal with dummy return types. Likewise for parameter types. Deal
1511 with by-reference types explicitly and add a kludge for null procedures
1512 with untagged incomplete types. Remove assertion on the types and be
1513 prepared for multiple elaboration of the declarations. Skip the whole
1514 CICO processing if the profile is incomplete. Handle the completion of
1515 a previously incomplete profile.
1516 (gnat_to_gnu_entity) <E_Variable>: Rename local variable.
1517 Adjust couple of calls to create_param_decl.
1518 <E_Access_Subprogram_Type, E_Anonymous_Access_Subprogram_Type>:
1519 Remove specific deferring code.
1520 <E_Access_Type>: Also deal with E_Subprogram_Type designated type.
1521 Simplify handling of dummy types and remove obsolete comment.
1522 Constify a couple of variables. Do not set TYPE_UNIVERSAL_ALIASING_P
1523 on dummy types.
1524 <E_Access_Subtype>: Tweak comment and simplify condition.
1525 <E_Subprogram_Type>: ...here. Call it and clean up handling. Remove
1526 obsolete comment and adjust call to gnat_to_gnu_param. Adjust call to
1527 create_subprog_decl.
1528 <E_Incomplete_Type>: Add a couple of 'const' qualifiers and get rid of
1529 inner break statements. Tidy up condition guarding direct use of the
1530 full view.
1531 (get_minimal_subprog_decl): Delete.
1532 (finalize_from_limited_with): Call update_profiles_with on dummy types
1533 with TYPE_DUMMY_IN_PROFILE_P set.
1534 (is_from_limited_with_of_main): Delete.
1535 (associate_subprog_with_dummy_type): New function.
1536 (update_profile): Likewise.
1537 (update_profiles_with): Likewise.
1538 (gnat_to_gnu_profile_type): Likewise.
1539 (init_gnat_decl): Initialize dummy_to_subprog_map.
1540 (destroy_gnat_decl): Destroy dummy_to_subprog_map.
1541 * gcc-interface/misc.c (gnat_get_alias_set): Add guard for accessing
1542 TYPE_UNIVERSAL_ALIASING_P.
1543 (gnat_get_array_descr_info): Minor tweak.
1544 * gcc-interface/trans.c (gigi): Adjust calls to create_subprog_decl.
1545 (build_raise_check): Likewise.
1546 (Compilation_Unit_to_gnu): Likewise.
1547 (Identifier_to_gnu): Accept mismatches coming from a limited context.
1548 (Attribute_to_gnu): Remove kludge for dispatch table entities.
1549 (process_freeze_entity): Do not retrieve old definition if there is an
1550 address clause on the entity. Call update_profiles_with on dummy types
1551 with TYPE_DUMMY_IN_PROFILE_P set.
1552 * gcc-interface/utils.c (build_dummy_unc_pointer_types): Also set
1553 TYPE_REFERENCE_TO to the fat pointer type.
1554 (create_subprog_type): Delete.
1555 (create_param_decl): Remove READONLY parameter.
1556 (finish_subprog_decl): New function extracted from...
1557 (create_subprog_decl): ...here. Call it. Remove CONST_FLAG and
1558 VOLATILE_FLAG parameters and adjust.
1559 (update_pointer_to): Also clear TYPE_REFERENCE_TO in the unconstrained
1560 case.
1561
437244c7
AC
15622016-04-27 Arnaud Charlet <charlet@adacore.com>
1563
1564 * aa_util.adb, aa_util.ads: Removed, no longer used.
1565
15662016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1567
1568 * sem_prag.adb (Analyze_Pragma): An object
1569 renaming declaration resulting from the expansion of an object
1570 declaration is a suitable context for pragma Ghost.
1571
15722016-04-27 Doug Rupp <rupp@adacore.com>
1573
1574 * init.c: Refine last checkin so the only requirement is the
1575 signaling compilation unit is compiled with the same mode as
1576 the compilation unit containing the initial landing pad.
1577
15782016-04-27 Ed Schonberg <schonberg@adacore.com>
1579
1580 * sem_ch13.adb (Valid_Default_Iterator): Better filter of illegal
1581 specifications for Default_Iterator, including overloaded cases
1582 where no interpretations are legal, and return types that are
1583 not iterator types.
1584
15852016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1586
1587 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not install
1588 an accessibility check when the left hand side of the assignment
1589 denotes a container cursor.
1590 * exp_util.ads, exp_util.adb (Find_Primitive_Operations): Removed.
1591 * sem_ch4.adb (Find_Indexing_Operations): New routine.
1592 (Try_Container_Indexing): Code cleanup.
1593
57323d5b
AC
15942016-04-27 Arnaud Charlet <charlet@adacore.com>
1595
1596 * sem_ch10.adb, sem_case.adb: Mark messages udner -gnatwr when needed.
1597
15982016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1599
1600 * errout.adb, errutil.adb: Minor reformatting.
1601
16022016-04-27 Ed Schonberg <schonberg@adacore.com>
1603
1604 * sem_ch13.adb (Analyze_Aspect_Specifications, case Pre/Post):
1605 Check that the classwide version is illegal when the prefix is
1606 an operation of an untagged synchronized type.
1607
ac566cbe
AC
16082016-04-27 Arnaud Charlet <charleT@adacore.com>
1609
1610 * sinput-l.ads, sem_ch13.adb: Minor editing.
1611
16122016-04-27 Doug Rupp <rupp@adacore.com>
1613
1614 * init.c (__gnat_adjust_context_for_raise) [arm-linux thumb]:
1615 Bump the pc so the lower order bit is set.
1616
16172016-04-27 Ed Schonberg <schonberg@adacore.com>
1618
1619 * sem_case.adb, sem_case.ads (NO_Op): If appropriate warning is
1620 enabled, report an empty range in a case construct.
1621
6616e390
AC
16222016-04-27 Arnaud Charlet <charlet@adacore.com>
1623
1624 * sinput.ads, a-cfdlli.adb, a-crbtgo.adb, a-chtgop.adb, a-cbhama.adb,
1625 a-rbtgbo.adb, a-crdlli.adb, a-chtgbo.adb: Minor editing.
1626
6d0d18dc
AC
16272016-04-27 Bob Duff <duff@adacore.com>
1628
1629 * a-chtgop.adb (Adjust): Zero the tampering counts on assignment,
1630 as is done for the other containers.
1631
16322016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1633
1634 * ghost.adb (In_Subprogram_Body_Profile): New routine.
1635 (Is_OK_Declaration): Treat an unanalyzed expression
1636 function as an OK context. Treat a reference to a Ghost entity
1637 as OK when it appears within the profile of a subprogram body.
1638
16392016-04-27 Bob Duff <duff@adacore.com>
1640
1641 * errout.ads: Document the fact that informational messages
1642 don't have to be warnings.
1643 * errout.adb (Error_Msg_Internal): In statistics counts, deal
1644 correctly with informational messages that are not warnings.
1645 (Error_Msg_NEL): Remove useless 'if' aroung Set_Posted, because
1646 Set_Posted already checks for errors and ignores others.
1647 * erroutc.adb (Prescan_Message): Set Is_Serious_Error to False
1648 if Is_Info_Msg; the previous code was assuming that Is_Info_Msg
1649 implies Is_Warning_Msg.
1650 * errutil.adb (Error_Msg): In statistics counts, deal correctly
1651 with informational messages that are not warnings.
1652
680d5f61
AC
16532016-04-27 Ed Schonberg <schonberg@adacore.com>
1654
1655 * sem_util.ads, sem_util.adb (Is_Null_Record_Type): New predicate
1656 to determine whether a record type is a null record.
1657 * sem_ch3.adb (Analyze_Object_Declaration): If the type is a
1658 null record and there is no expression in the declaration,
1659 no predicate check applies to the object.
1660
16612016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1662
1663 * sem_ch7.adb (Analyze_Package_Body_Helper): The body of an
1664 instantiated package should not cause freezing of previous contracts.
1665
16662016-04-27 Ed Schonberg <schonberg@adacore.com>
1667
1668 * sem_dim.adb (Analyze_Dimension): Handle subtype declarations
1669 that do not come from source.
1670 (Analyze_Dimension_Subtype_Declaration): Allow confirming
1671 dimensions on subtype entity, either inherited from base type
1672 or provided by aspect specification.
1673
16742016-04-27 Ed Schonberg <schonberg@adacore.com>
1675
1676 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1677 Add scalar formal object Zero, to allow detection and report
1678 when the matrix is singular.
1679 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1680 Raise Constraint_Error if the Forward_Eliminate pass has
1681 determined that determinant is Zero.o
1682 * s-ngrear.adb (Solve): Add actual for Zero in corresponding
1683 instantiations.
1684 * s-ngcoar.adb (Solve): Ditto.
1685
14f3895c
AC
16862016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1687
1688 * sem_ch3.adb: Minor reformatting.
1689
16902016-04-27 Ed Schonberg <schonberg@adacore.com>
1691
1692 * sem_dim.adb (Analyze_Dimension, case N_Identifier): Check
1693 that identifier has a usable type before analysis, to handle
1694 properly identifiers introduced after some lexical/syntactic
1695 recovery that created new identifiers.
1696
db99c46e
AC
16972016-04-27 Bob Duff <duff@adacore.com>
1698
1699 * a-coinve.adb, a-comutr.adb, a-conhel.adb, a-convec.adb,
1700 exp_util.adb: Remove assertions that can fail in obscure cases when
1701 assertions are turned on but tampering checks are turned off.
1702
17032016-04-27 Javier Miranda <miranda@adacore.com>
1704
1705 * exp_ch6.adb (Add_Call_By_Copy_Code,
1706 Add_Simple_Call_By_Copy_Code, Expand_Actuals): Handle formals
1707 whose type comes from the limited view.
1708
17092016-04-27 Yannick Moy <moy@adacore.com>
1710
1711 * a-textio.adb: Complete previous patch.
1712
17132016-04-27 Yannick Moy <moy@adacore.com>
1714
1715 * inline.adb (Expand_Inlined_Call): Use Cannot_Inline instead of
1716 Error_Msg_N to issue message about impossibility to inline call,
1717 with slight change of message.
1718
17192016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1720
1721 * exp_spark.adb (Expand_Potential_Renaming): Removed.
1722 (Expand_SPARK): Update the call to expand a potential renaming.
1723 (Expand_SPARK_Potential_Renaming): New routine.
1724 * exp_spark.ads (Expand_SPARK_Potential_Renaming): New routine.
1725 * sem.adb Add with and use clauses for Exp_SPARK.
1726 (Analyze): Expand a non-overloaded potential renaming for SPARK.
1727
17282016-04-27 Ed Schonberg <schonberg@adacore.com>
1729
1730 * sem_ch3.adb (Constrain_Discriminated_Type): In an instance,
1731 check full view for the presence of defaulted discriminants,
1732 even when the partial view of a private type has no visible and
1733 no unknown discriminants.
1734
c6c8d059
AC
17352016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1736
1737 * lib-xref.adb, exp_ch3.adb: Minor reformatting.
1738
17392016-04-27 Nicolas Roche <roche@adacore.com>
1740
1741 * rtinit.c: Add weak symbol __gnat_do_argv_expansion.
1742
caa64a44
AC
17432016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1744
1745 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Code
1746 cleanup. Check the original node when trying to determine the node kind
1747 of pragma Volatile's argument to account for untagged derivations
1748 where the type is transformed into a constrained subtype.
1749
17502016-04-27 Olivier Hainque <hainque@adacore.com>
1751
1752 * mkdir.c (__gnat_mkdir): Rework the vxworks section to use a
1753 consistent posix interface on the caller side.
1754
17552016-04-27 Ed Schonberg <schonberg@adacore.com>
1756
1757 * sem_ch10.adb (Build_Limited_View, Decorate_Type): If this
1758 is a limited view of a type, initialize the Limited_Dependents
1759 field to catch misuses of the type in a client unit.
1760
17612016-04-27 Thomas Quinot <quinot@adacore.com>
1762
1763 * a-strunb-shared.adb (Finalize): add missing Reference call.
1764 * s-strhas.adb: minor grammar fix and extension of comment
1765 * sem_ch8.adb: minor whitespace fixes
1766
17672016-04-27 Ed Schonberg <schonberg@adacore.com>
1768
1769 * lib-xref.adb (Get_Type_Reference): Handle properly the case
1770 of an object declaration whose type definition is a class-wide
1771 subtype and whose expression is a function call that returns a
1772 classwide type.
1773
17742016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1775
1776 * sem_util.ads, sem_util.adb (Output_Entity): New routine.
1777 (Output_Name): New routine.
1778
17792016-04-27 Bob Duff <duff@adacore.com>
1780
1781 * exp_ch3.adb (Rewrite_As_Renaming): Disable previous change for now.
1782
a6ac7311
AC
17832016-04-27 Vincent Celier <celier@adacore.com>
1784
1785 * gnatcmd.adb: For "gnat ls -V -P", recognize switch
1786 --unchecked-shared-lib-imports and set the flag
1787 Opt.Unchecked_Shared_Lib_Imports accordingly.
1788
17892016-04-27 Ed Schonberg <schonberg@adacore.com>
1790
1791 * sem_prag.adb (Analyze_Pre_Post_Condition_In_Decl_Part):
1792 A generic subprogram is never a primitive operation, and thus
1793 a classwide condition for it is not legal.
1794
17952016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1796
1797 * sem_aggr.adb, sem_dim.adb, sem_dim.ads, einfo.adb: Minor
1798 reformatting.
1799
888be6b1
AC
18002016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1801
1802 * sem_res.adb (Flag_Effectively_Volatile_Objects): New routine.
1803 (Resolve_Actuals): Flag effectively volatile objects with enabled
1804 property Async_Writers or Effective_Reads as illegal.
1805 * sem_util.adb (Is_OK_Volatile_Context): Comment reformatting.
1806
18072016-04-27 Javier Miranda <miranda@adacore.com>
1808
1809 * exp_ch3.adb (Make_Predefined_Primitive_Specs):
1810 Do not generate the profile of the equality operator if it has
1811 been explicitly defined as abstract in the parent type. Required
1812 to avoid reporting an spurious error.
1813
18142016-04-27 Ed Schonberg <schonberg@adacore.com>
1815
1816 * sem_dim.ads, sem_dim.adb (Check_Expression_Dimensions): New
1817 procedure to compute the dimension vector of a scalar expression
1818 and compare it with the dimensions if its expected subtype. Used
1819 for the ultimate components of a multidimensional aggregate,
1820 whose components typically are themselves aggregates that are
1821 expanded separately. Previous to this patch, dimensionality
1822 checking on such aggregates generated spurious errors.
1823 * sem_aggr.adb (Resolve_Array_Aggregate): Use
1824 Check_Expression_Dimensions when needed.
1825
18262016-04-27 Javier Miranda <miranda@adacore.com>
1827
1828 * einfo.ads, einfo.adb (Corresponding_Function): New attribute
1829 (applicable to E_Procedure).
1830 (Corresponding_Procedure): New attribute (applicable to E_Function).
1831 * exp_util.adb (Build_Procedure_Form): Link the function with
1832 its internally built proc and viceversa.
1833 * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
1834 attribute Rewritten_For_C and Corresponding_Procedure to the body.
1835 * exp_ch6.adb (Rewritten_For_C_Func_Id): Removed.
1836 (Rewritten_For_C_Proc_Id): Removed.
1837 * exp_unst.adb (Note_Uplevel_Ref): Use the new attribute to
1838 locate the corresponding procedure.
1839
c7518e6f
AC
18402016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1841
1842 * sem_ch13.adb (Analyze_Aspect_Export_Import): Signal that there is no
1843 corresponding pragma.
1844
18452016-04-27 Bob Duff <duff@adacore.com>
1846
1847 * exp_ch3.adb: Minor comment improvement.
1848
18492016-04-27 Ed Schonberg <schonberg@adacore.com>
1850
1851 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): If the
1852 return type is an untagged limited record with only access
1853 discriminants and no controlled components, the return value does not
1854 need to use the secondary stack.
1855
18562016-04-27 Javier Miranda <miranda@adacore.com>
1857
1858 * exp_util.adb (Remove_Side_Effects): When
1859 generating C code handle object declarations that have
1860 discriminants and are initialized by means of a call to a
1861 function.
1862
18632016-04-27 Ed Schonberg <schonberg@adacore.com>
1864
1865 * a-textio.adb (Get_Line function): Handle properly the case of
1866 a line that has the same length as the buffer (or a multiple
1867 thereof) and there is no line terminator.
1868 * a-tigeli.adb (Get_Line procedure): Do not store an end_of_file
1869 in the string when there is no previous line terminator and we
1870 need at most one additional character.
1871
814cc240
AC
18722016-04-27 Arnaud Charlet <charlet@adacore.com>
1873
1874 * s-rident.ads: Make No_Implicit_Loops non partition wide.
1875
18762016-04-27 Arnaud Charlet <charlet@adacore.com>
1877
1878 * sem_ch11.adb (Analyze_Handled_Statements): check useless
1879 assignments also in entries and task bodies, not only in
1880 procedures and declaration blocks.
1881 * sem_ch5.adb (Analyze_Block_Statement): check useless
1882 assignements in declaration blocks as part of processing their
1883 handled statement sequence, just like it was done for procedures
1884 and now is also done for entries and task bodies.
1885 * sem_warn.adb (Warn_On_Useless_Assignment): detect boundries
1886 of entries and task bodies just like of procedures.
1887
18882016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1889
1890 * sem_util.adb (Is_Volatile_Function): Recognize
1891 a function declared within a protected type as well as the
1892 protected/unprotected version of a function.
1893
24d2fbbe
BD
18942016-04-27 Bob Duff <duff@adacore.com>
1895
1896 * exp_ch3.adb (Expand_N_Object_Declaration): Rewrite an object
1897 declaration of the form "X : T := Func (...);", where T is
1898 controlled, as a renaming.
1899 * a-strunb-shared.adb (Finalize): Set the Unbounded_String Object
1900 to be an empty string, instead of null-ing out the Reference.
1901 * exp_util.adb (Needs_Finalization): Remove redundant code.
1902
2e885a6f
AC
19032016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1904
1905 * aspects.ads Aspects Export and Import do not require delay. They
1906 were classified as delayed aspects, but treated as non-delayed
1907 by the analysis of aspects.
1908 * freeze.adb (Copy_Import_Pragma): New routine.
1909 (Wrap_Imported_Subprogram): Copy the import pragma by first
1910 resetting all semantic fields to avoid an infinite loop when
1911 performing the copy.
1912 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Add
1913 comment on the processing of aspects Export and Import
1914 at the freeze point.
1915 (Analyze_Aspect_Convention: New routine.
1916 (Analyze_Aspect_Export_Import): New routine.
1917 (Analyze_Aspect_External_Link_Name): New routine.
1918 (Analyze_Aspect_External_Or_Link_Name): Removed.
1919 (Analyze_Aspect_Specifications): Factor out the analysis of
1920 aspects Convention, Export, External_Name, Import, and Link_Name
1921 in their respective routines. Aspects Export and Import should
1922 not generate a Boolean pragma because their corresponding pragmas
1923 have a very different syntax.
1924 (Build_Export_Import_Pragma): New routine.
1925 (Get_Interfacing_Aspects): New routine.
1926
19272016-04-27 Eric Botcazou <ebotcazou@adacore.com>
1928
1929 * inline.adb (Add_Inlined_Body): Overhaul implementation,
1930 robustify handling of -gnatn1, add special treatment for
1931 expression functions.
1932
19332016-04-27 Doug Rupp <rupp@adacore.com>
1934
1935 * g-traceb.ads: Update comment.
1936 * exp_ch2.adb: minor style fix in object declaration
1937
2a253c5b
AC
19382016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1939
1940 * sem_elab.adb (Check_Internal_Call): Do not
1941 consider a call when it appears within pragma Initial_Condition
1942 since the pragma is part of the elaboration statements of a
1943 package body and may only call external subprograms or subprograms
1944 whose body is already available.
1945 (Within_Initial_Condition): New routine.
1946
19472016-04-27 Ed Schonberg <schonberg@adacore.com>
1948
1949 * exp_util.adb (Build_Procedure_Form): Prevent double generation
1950 of the procedure form when dealing with an expression function
1951 whose return type is an array.
1952 * sem_ch3.adb: Fix out-of order Has_Predicates setting.
1953 * exp_ch6.adb: Proper conversion for inherited operation in C.
1954 * sem_ch6.adb: Code cleanup.
1955
19562016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1957
1958 * lib-xref.ads, sem_ch10.adb: minor style fix in comment
1959 * g-socket.adb: Minor reformatting.
1960 * sinfo.ads: Minor comment correction.
1961 * sem_warn.ads: minor grammar fix in comment
1962
afc737f0
EB
19632016-04-27 Eric Botcazou <ebotcazou@adacore.com>
1964
1965 * gcc-interface/gigi.h (gnat_to_gnu_entity): Adjust prototype.
1966 (maybe_pad_type): Adjust comment.
1967 (finish_record_type): Likewise.
1968 (rest_of_record_type_compilation): Likewise.
1969 * gcc-interface/decl.c (gnat_to_gnu_entity): Change DEFINITION type
1970 parameter from integer to boolean. Adjust recursive calls.
1971 <E_Subprogram_Type>: Use copy_type and remove redundant assignments.
1972 <E_Signed_Integer_Subtype>: Adjust comment. Remove call to
1973 rest_of_record_type_compilation. Set TYPE_PADDING_P flag earlier.
1974 Pass false to finish_record_type. Set the debug type later.
1975 <E_Record_Subtype>: Remove call to rest_of_record_type_compilation.
1976 (gnat_to_gnu_component_type): Fix formatting.
1977 (gnat_to_gnu_field_decl): Adjust call to gnat_to_gnu_entity.
1978 (gnat_to_gnu_type): Likewise.
1979 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
1980 (Loop_Statement_to_gnu): Likewise.
1981 (Subprogram_Body_to_gnu): Likewise.
1982 (Exception_Handler_to_gnu_fe_sjlj): Likewise.
1983 (Exception_Handler_to_gnu_gcc): Likewise.
1984 (Compilation_Unit_to_gnu): Likewise.
1985 (gnat_to_gnu): Likewise.
1986 (push_exception_label_stack): Likewise.
1987 (elaborate_all_entities_for_package): Likewise.
1988 (process_freeze_entity): Likewise.
1989 (process_decls): Likewise.
1990 (process_type): Likewise.
1991 * gcc-interface/utils.c (struct deferred_decl_context_node): Tweak.
1992 (maybe_pad_type): Adjust comments. Set the debug type later. Remove
1993 call to rest_of_record_type_compilation.
1994 (rest_of_record_type_compilation): Use copy_type.
1995 (copy_type): Use correctly typed constants.
1996 (gnat_signed_or_unsigned_type_for): Use copy_type.
1997 * gcc-interface/utils2.c (nonbinary_modular_operation): Likewise.
1998 (build_goto_raise): Adjust call tognat_to_gnu_entity.
1999
06aed101
EB
20002016-04-27 Eric Botcazou <ebotcazou@adacore.com>
2001
2002 * gcc-interface/misc.c (gnat_init): Do not call
2003 internal_reference_types.
2004
1ee806d8
SS
20052016-04-27 Svante Signell <svante.signell@gmail.com>
2006
2007 * gcc-interface/Makefile.in (x86 GNU/Hurd): Use s-osinte-gnu.adb.
2008 * s-osinte-gnu.ads: Small tweaks.
2009 * s-osinte-gnu.adb: New file.
2010
6c7f7b8c
AC
20112016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
2012
2013 * sem_prag.adb (Match_Constituent): Treat a constant as a legal
2014 constituent even if it is not to prevent spurious errors.
2015
20162016-04-21 Gary Dismukes <dismukes@adacore.com>
2017
2018 * sem_ch4.adb: Minor typo fixes and reformatting.
2019
20202016-04-21 Dmitriy Anisimkov <anisimko@adacore.com>
2021
2022 * g-calend.ads (No_Time): The same value in any timezone.
2023 * g-socket.adb (Raise_Host_Error): Remove ending
2024 dot from original error message before append colon delimited
2025 host name.
2026
0310af44
AC
20272016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
2028
2029 * sem_ch3.adb: Code cleanup.
2030 * sem_ch6.adb: Code cleanup.
2031 (Is_Matching_Limited_View): New routine.
2032 (Matches_Limited_With_View): Reimplemented.
2033 * sem_ch10.adb (Decorate_Type): Code cleanup.
2034
20352016-04-21 Doug Rupp <rupp@adacore.com>
2036
2037 * tracebak.c (PPC ELF): Add macro defs for lynxos178e.
2038
20392016-04-21 Ed Schonberg <schonberg@adacore.com>
2040
2041 * sem_ch4.adb (Try_Container_Indexing): If there are overloaded
2042 indexing functions, collect all overloadings of the call firts,
2043 and then transfer them to indexing node, to prevent interleaving
2044 of the set of interpretations of the nodes involved.
2045 * sem_res.adb (Resolve): Suppress cascaded errors that report
2046 ambiguities when one of the actuals in an overloaded generatlized
2047 indexing operation is illegal and has type Any_Type, as is done
2048 for similar cascaded errors in subprogram calls.
2049 (Valid_Tagged_Conversion): Cleanup conversion checks when one
2050 of the types involved is a class-wide subtype.
2051
20522016-04-21 Ed Schonberg <schonberg@adacore.com>
2053
2054 * sem_ch12.adb (Load_Parent_Of_Generic): When looking for the
2055 subprogram declaration within a wrapper package, skip pragmas
2056 that may have been generated by aspect specifications on the
2057 generic instance.
2058
20592016-04-21 Javier Miranda <miranda@adacore.com>
2060
2061 * exp_aggr.adb (Component_Not_OK_For_Backend): Generating C
2062 code return True for array identifiers since the backend needs
2063 to initialize such component by means of memcpy().
2064
150346bd
AC
20652016-04-21 Arnaud Charlet <charlet@adacore.com>
2066
2067 * a-tasatt.adb, a-tasatt.ads (Fast_Path): Rewritten to avoid reading
2068 potentially uninitialized memory.
2069 * sem_ch3.adb: Minor style fix in comment.
2070
c25f170d
AC
20712016-04-21 Arnaud Charlet <charlet@adacore.com>
2072
2073 * gnat_rm.texi, gnat_ugn.texi,
2074 doc/gnat_ugn/gnat_project_manager.rst,
2075 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2076 doc/gnat_ugn/gnat_and_program_execution.rst,
2077 doc/gnat_ugn/gnat_utility_programs.rst,
2078 doc/gnat_ugn/the_gnat_compilation_model.rst,
2079 doc/gnat_rm/implementation_defined_attributes.rst,
2080 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
2081 doc/gnat_rm/implementation_defined_pragmas.rst,
2082 doc/gnat_rm/the_gnat_library.rst,
2083 doc/gnat_rm/implementation_defined_aspects.rst: Update doc.
2084 * doc/Makefile: Cleanups.
2085
f76647c2
AC
20862016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
2087
2088 * exp_pakd.adb, sem_ch13.adb: Minor reformatting.
2089
20902016-04-21 Ed Schonberg <schonberg@adacore.com>
2091
2092 * exp_dbug.adb, exp_dbug.ads (Qualify_Entity_Name): Add suffixes to
2093 disambiguate local variables that may be hidden from inner visibility
2094 by nested block declarations or loop variables.
2095
22a4f9d5
AC
20962016-04-21 Jerome Lambourg <lambourg@adacore.com>
2097
2098 * s-soflin.adb: Initialize the Stack_Limit global variable.
2099
21002016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
2101
2102 * lib-writ.adb: Minor reformatting.
2103
21042016-04-21 Ed Schonberg <schonberg@adacore.com>
2105
2106 * exp_pakd.adb (Compute_Number_Components): New function to
2107 build an expression that computes the number of a components of
2108 an array that may be multidimensional.
2109 (Expan_Packed_Eq): Use it.
2110
21112016-04-21 Arnaud Charlet <charlet@adacore.com>
2112
2113 * g-traceb.ads: Update list of supported platforms.
2114
21152016-04-21 Ed Schonberg <schonberg@adacore.com>
2116
2117 * sem_ch13.adb (Add_Predicates): if the type is declared in
2118 an inner package it may be frozen outside of the package, and
2119 the generated pragma has not been analyzed yet, the expression
2120 for the predicate must be captured and added to the predicate
2121 function at this point.
2122
21232016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
2124
2125 * contracts.adb (Analyze_Package_Body_Contract): Do not check
2126 for a missing package refinement because 1) packages do not have
2127 "refinement" and 2) the check for proper state refinement is
2128 performed in a different place.
2129 * einfo.adb (Has_Non_Null_Visible_Refinement): Reimplemented.
2130 (Has_Null_Visible_Refinement): Reimplemented.
2131 * sem_ch3.adb (Analyze_Declarations): Determine whether all
2132 abstract states have received a refinement and if not, emit
2133 errors.
2134 * sem_ch7.adb (Analyze_Package_Declaration): Code
2135 cleanup. Determine whether all abstract states of the
2136 package and any nested packages have received a refinement
2137 and if not, emit errors.
2138 (Requires_Completion_In_Body): Add new formal parameter
2139 Do_Abstract_States. Update the comment on usage. Propagate the
2140 Do_Abstract_States flag to all Unit_Requires_Body calls.
2141 (Unit_Requires_Body): Remove formal
2142 parameter Ignore_Abstract_States. Add new formal paramter
2143 Do_Abstract_States. Propagate the Do_Abstract_States flag to
2144 all Requires_Completion_In calls.
2145 * sem_ch7.ads (Unit_Requires_Body): Remove formal
2146 parameter Ignore_Abstract_States. Add new formal paramter
2147 Do_Abstract_States. Update the comment on usage.
2148 * sem_ch9.adb (Analyze_Single_Protected_Declaration): Do
2149 not initialize the constituent list as this is now done on a
2150 need-to-add-element basis.
2151 (Analyze_Single_Task_Declaration):
2152 Do not initialize the constituent list as this is now done on
2153 a need-to-add-element basis.
2154 * sem_ch10.adb (Decorate_State): Do not initialize the constituent
2155 lists as this is now done on a need-to-add-element basis.
2156 * sem_prag.adb (Analyze_Constituent): Set the
2157 refinement constituents when adding a new element.
2158 (Analyze_Part_Of_In_Decl_Part): Set the Part_Of constituents when
2159 adding a new element.
2160 (Analyze_Part_Of_Option): Set the Part_Of
2161 constituents when adding a new element.
2162 (Analyze_Pragma): Set the Part_Of constituents when adding a new
2163 element.
2164 (Check_Constituent_Usage (all versions)): Reimplemented.
2165 (Collect_Constituent): Set the refinement constituents when adding
2166 a new element.
2167 (Create_Abstract_State): Do not initialize the
2168 constituent lists as this is now done on a need-to-add-element basis.
2169 (Propagate_Part_Of): Set the Part_Of constituents when
2170 adding a new element.
2171 * sem_util.adb (Check_State_Refinements): New routine.
2172 (Has_Non_Null_Refinement): Reimplemented.
2173 (Has_Null_Refinement): Reimplemented.
2174 (Requires_State_Refinement): Removed.
2175 * sem_util.ads (Check_State_Refinements): New routine.
2176 (Requires_State_Refinement): Removed.
2177
c4dc2125
HK
21782016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
2179
2180 * lib-writ.adb, sem_ch6.adb: Minor reformatting and code cleanup.
2181 * sem.adb: Fix comment.
2182
c42aba6b
AC
21832016-04-21 Ed Schonberg <schonberg@adacore.com>
2184
2185 * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype
2186 declaration with no aspects, whose subtype_mark is a subtype
2187 with predicates, inherits the list of subprograms for the type.
2188
21892016-04-21 Arnaud Charlet <charlet@adacore.com>
2190
2191 * exp_aggr.adb (Has_Per_Object_Constraint): Refine previous
2192 change.
2193
21942016-04-21 Thomas Quinot <quinot@adacore.com>
2195
2196 * g-socket.adb (Raise_Host_Error): Include additional Name parameter.
2197
21982016-04-21 Ed Schonberg <schonberg@adacore.com>
2199
2200 * lib-writ.adb (Write_ALI): Do not record in ali file units
2201 that are present in the files table but not analyzed. These
2202 units are present because they appear in the context of units
2203 named in limited_with clauses, and the unit being compiled does
2204 not depend semantically on them.
2205
22062016-04-21 Ed Schonberg <schonberg@adacore.com>
2207
2208 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Simplify code to
2209 create the procedure body for an function returning an array type,
2210 when generating C code. Reuse the subprogram body rather than
2211 creating a new one, both as an efficiency measure and because
2212 in an instance the body may contain global references that must
2213 be preserved.
2214
bbe008b6
HK
22152016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
2216
2217 * sem_ch3.adb, exp_attr.adb, exp_ch6.adb, exp_aggr.adb: Minor
2218 reformatting.
2219
35f4f238
JM
22202016-04-21 Javier Miranda <miranda@adacore.com>
2221
2222 * exp_aggr.adb (Component_Check): Extend
2223 the check that verifies that the aggregate has no function
2224 calls to handle transformations performed by the frontend.
2225 (Ultimate_Original_Expression): New subprogram.
2226
a1ad79ed
AC
22272016-04-21 Philippe Gil <gil@adacore.com>
2228
2229 * krunch.adb (Krunch): Fix krunching of i-java.
2230
22312016-04-21 Arnaud Charlet <charlet@adacore.com>
2232
2233 * exp_ch8.adb (Evaluation_Required): Always return
2234 True when Modify_Tree_For_C.
2235
9b7924dd
AC
22362016-04-21 Eric Botcazou <ebotcazou@adacore.com>
2237
2238 * gnatlink.adb (Gnatlink): Robustify detection of Windows target.
2239 * alloc.ads: Minor comment fixes.
2240 * einfo.ads: Fix typo.
2241
22422016-04-21 Arnaud Charlet <charlet@adacore.com>
2243
2244 * exp_aggr.adb (Component_Not_OK_For_Backend): Redo previous
2245 changes to handle all cases of components depending on the
2246 discriminant, not just string literals.
2247
22482016-04-21 Ed Schonberg <schonberg@adacore.com>
2249
2250 * sem_ch3.adb (Analyze_Subtype_Declaration): If the subtype
2251 declaration is the generated declaration for a generic actual,
2252 inherit predicates from the actual if it is a predicated subtype.
2253
22542016-04-21 Ed Schonberg <schonberg@adacore.com>
2255
2256 * exp_ch6.adb (Rewrite_Function_Call_For_C): If the function is
2257 inherited and its result is controlling, introduce a conversion
2258 on the actual for the corresponding procedure call, to avoid
2259 spurious type errors.
2260
22612016-04-21 Jerome Lambourg <lambourg@adacore.com>
2262
2263 * krunch.adb (Krunch): Fix krunching of i-vxworks.
2264
d74716b3
AC
22652016-04-21 Gary Dismukes <dismukes@adacore.com>
2266
2267 * exp_aggr.adb: Minor reformatting and code cleanup.
2268
22692016-04-21 Ed Schonberg <schonberg@adacore.com>
2270
2271 * sem_ch13.adb (Resolve_Name): Omit quantified expressions from
2272 resolution, because they introduce local names. Full resolution
2273 will take place when predicate function is constructed.
2274
0ef5cd0a 22752016-04-21 Arnaud Charlet <charlet@adacore.com>
2d6aa715 2276
0ef5cd0a
AC
2277 * exp_aggr.adb (Component_Not_OK_For_Backend): Refine previous
2278 change to take into account Per_Object_Constraint field rather
2279 than special casing strings.
2280 * exp_ch6.adb: Fix typo in Replace_Returns.
2d6aa715 2281
0ef5cd0a 22822016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
2d6aa715 2283
0ef5cd0a 2284 * sem_ch5.adb: Minor reformatting.
2d6aa715
AC
2285
22862016-04-21 Arnaud Charlet <charlet@adacore.com>
2287
2288 * exp_aggr.adb (Backend_Processing_Possible): Return False
2289 when generating C and aggregate contains function calls.
2290
22912016-04-21 Tristan Gingold <gingold@adacore.com>
2292
2293 * krunch.adb (Krunch): Only partially krunch children of
2294 Interfaces that aren't known.
2295
22962016-04-21 Ed Schonberg <schonberg@adacore.com>
2297
2298 * sem_prag.adb (Make_Inline): Handle properly the instantiation
2299 of a generic subpprogram that carries an Inline aspect. Place
2300 inline info on the anonymous subprogram that is constructed in
2301 the wrapper package.
2302 (Analyze_Pragma, case Pure): Do not check placement if pragma
2303 appears within an instantiation, which can be nested at any level.
2304 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not copy Freeze
2305 node from anonymous subprogram to its visible renaming. The
2306 freeze node will be constructed if the subprogram carries
2307 delayed aspects.
2308 (Set_Global): Preserve dimension information if present (from
2309 code reading).
2310
23112016-04-21 Vasiliy Fofanov <fofanov@adacore.com>
2312
2313 * gnatlink.adb: Change wording of the warning message on
2314 problematic filenames to be more neutral. Add a new substring
2315 "patch" introduced on Windows 10.
2316
08f52d9f
AC
23172016-04-21 Philippe Gil <gil@adacore.com>
2318
2319 * tracebak.c (__gnat_backtrace): handle bad RIP values (win64 only)
2320
23212016-04-21 Javier Miranda <miranda@adacore.com>
2322
2323 * exp_aggr.adb (Component_Not_OK_For_Backend): Return true for string
2324 literals.
2325
23262016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
2327
2328 * einfo.adb (Has_Non_Null_Abstract_State): New routine.
2329 * einfo.ads New synthesized attribute
2330 Has_Non_Null_Abstract_State along with occurrences in entities.
2331 (Has_Non_Null_Abstract_State): New routine.
2332 * sem_ch7.adb (Unit_Requires_Body): Add local variable
2333 Requires_Body. A package declaring an abstract state requires
2334 a body only when the state is non-null and the package contains
2335 at least one other construct that requires completion in a body.
2336 * sem_util.adb (Mode_Is_Off): Removed.
2337 (Requires_State_Refinement): Remove an obsolete check. Code
2338 cleanup.
2339
23402016-04-21 Bob Duff <duff@adacore.com>
2341
2342 * sem_attr.adb (Analyze_Attribute): In processing
2343 the 'Old attribute, a warning is given for infinite recursion. Fix
2344 the code to not crash when the prefix of 'Old denotes a protected
2345 function.
2346 * sem_ch5.adb (Analyze_Iterator_Specification):
2347 Avoid calling Is_Dependent_Component_Of_Mutable_Object in cases
2348 where the parameter would not be an object.
2349
23502016-04-21 Eric Botcazou <ebotcazou@adacore.com>
2351
2352 * sem_eval.adb (Compile_Time_Compare): Be prepared for an empty
2353 Etype or Underlying_Type of the operands.
2354
23552016-04-21 Eric Botcazou <ebotcazou@adacore.com>
2356
2357 * atree.adb (Print_Statistics): Protect against overflows and
2358 print the memory consumption in bytes.
2359 * table.adb (Reallocate): Do the intermediate calculation of the new
2360 size using the Memory.size_t type.
2361
b943a971
AC
23622016-04-21 Gary Dismukes <dismukes@adacore.com>
2363
2364 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Suppress
2365 expansion of Attribute_Machine and Attribute_Model for AAMP.
2366
23672016-04-21 Ed Schonberg <schonberg@adacore.com>
2368
2369 * freeze.adb: Disable previous change for now.
2370
23712016-04-21 Ed Schonberg <schonberg@adacore.com>
2372
2373 * sem_ch8.adb (Find_Selected_Component): If prefix has an
2374 access type and designated type is a limited view, introduce
2375 an explicit dereference before continuing the analysis, and
2376 set its type to the non-limited view of the designated type,
2377 if we are in context where it is available.
2378
78bc7fe6
ES
23792016-04-21 Ed Schonberg <schonberg@adacore.com>
2380
2381 * freeze.adb: Freeze profile in ASIS mode.
2382
6dc87f5f
AC
23832016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
2384
2385 * sem_aux.ads, sem_aux.adb (Has_Rep_Item): New variant.
2386 * sem_util.adb (Inherit_Rep_Item_Chain): Reimplemented.
2387
23882016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
2389
2390 * exp_ch6.adb: Minor reformatting.
2391
23922016-04-21 Ed Schonberg <schonberg@adacore.com>
2393
2394 * sem_ch13.adb: Minor comment update.
2395
23962016-04-21 Ed Schonberg <schonberg@adacore.com>
2397
2398 * freeze.ads, freeze.adb (Freeze_Entity, Freeze_Before): Add
2399 boolean parameter to determine whether freezing an overloadable
2400 entity freezes its profile as well. This is required by
2401 AI05-019. The call to Freeze_Profile within Freeze_Entity is
2402 conditioned by the value of this flag, whose default is True.
2403 * sem_attr.adb (Resolve_Attribute, case 'Access): The attribute
2404 reference freezes the prefix, but it the prefix is a subprogram
2405 it does not freeze its profile.
2406
a14bbbb4
AC
24072016-04-21 Javier Miranda <miranda@adacore.com>
2408
2409 * exp_util.adb (Build_Procedure_Form): No action needed for
2410 subprogram renamings since the backend can generate the call
2411 using the renamed subprogram. This leaves the tree more clean
2412 to the backend.
2413 * exp_ch6.adb (Expand_Call): Extend previous patch for
2414 rewritten-for-c entities to handle subprogram renamings.
2415 (Rewrite_Function_Call_For_C): Handle subprogram renamings.
2416
24172016-04-21 Ed Schonberg <schonberg@adacore.com>
2418
2419 * sem_ch13.adb: Code cleanup.
2420
17fd72ce
ES
24212016-04-21 Ed Schonberg <schonberg@adacore.com>
2422
2423 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
2424 created for SPARK_To_C, the entity must remain invisible so it
2425 does not overload subsequent references to the original function.
2426 * exp_ch6.adb (Build_Procedure_Body_Form, Replace_Returns):
2427 Handle Extended_Return_Statements by replacing it with a block
2428 with assignments and a simple return statement.
2429 * exp_util.adb (Build_Procedure_Form): Make procedure entity
2430 invisible after analyzing declaration, to prevent improper
2431 overloading.
2432
aeb98f1d
JM
24332016-04-21 Javier Miranda <miranda@adacore.com>
2434
2435 * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
2436 attribute Rewritten_For_C to the body since since the expander
2437 may generate calls using that entity.
2438 * exp_ch6.adb (Expand_Call): For internally generated
2439 calls ensure that they reference the entity of the spec
2440 of the called function.
2441 (Rewritten_For_C_Func_Id): New subprogram.
2442 (Rewritten_For_C_Proc_Id): New subprogram.
2443 (Rewrite_Function_Call_For_C): Invoke the new subprogram to
2444 ensure that we skip freezing entities.
2445 * exp_util.adb (Build_Procedure_Form): No action needed if the
2446 procedure was already built.
2447
2cc7967f
AC
24482016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
2449
2450 * sem_ch3.adb, exp_util.adb, sem_ch13.adb, exp_unst.adb: Minor
2451 reformatting.
2452
24532016-04-21 Ed Schonberg <schonberg@adacore.com>
2454
2455 * sem_util.adb (Denotes_Iterator): Use root type to determine
2456 whether the ultimate ancestor is the predefined iterator
2457 interface pakage.
2458 * exp_ch5.adb (Expand_Iterator_Over_Container): simplify code
2459 and avoid reuse of Pack local variable.
2460
24612016-04-21 Olivier Hainque <hainque@adacore.com>
2462
2463 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
2464 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
2465 system-vxworks-mips.ads, system-vxworks-x86.ads: Define
2466 Executable_Extension to ".out".
2467
29a56f61
JM
24682016-04-21 Javier Miranda <miranda@adacore.com>
2469
2470 * frontend.adb: Update call to Unnest_Subprograms.
2471 * exp_ch6.ads, exp_ch6.adb, exp_unst.ads, exp_unst.adb
2472 (Unnest_Subprograms): Moved to package exp_unst.
2473 * exp_unst.ads (Unnest_Subprogram): Moved to the body of the
2474 package.
2475 * exp_dbug.adb (Qualify_Entity_Name): Enable qualification of
2476 enumeration literals when generating C code.
2477
e379beb5
AC
24782016-04-21 Javier Miranda <miranda@adacore.com>
2479
2480 * frontend.adb: Remove call to initialize Exp_Ch6.
2481 * exp_ch6.ads, exp_ch6.adb (Initialize): removed.
2482 (Unest_Entry/Unest_Bodies): Removed.
2483 (Unnest_Subprograms): Code cleanup.
2484
24852016-04-21 Arnaud Charlet <charlet@adacore.com>
2486
2487 * set_targ.adb (Read_Target_Dependent_Values):
2488 close target description file once its contents is read.
2489 * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File
2490 and Stderr_File): Close local file descriptors before spawning
2491 child process.
2492 * exp_util.adb (Containing_Package_With_Ext_Axioms): Limit scope of
2493 local variables to make the code easier to understand and avoid
2494 duplicated calls to Parent and Generic_Parent.
2495
6905a049
AC
24962016-04-20 Bob Duff <duff@adacore.com>
2497
2498 * s-os_lib.ads: Minor comment fix.
2499
25002016-04-20 Ed Schonberg <schonberg@adacore.com>
2501
2502 * exp_ch5.adb (Expand_N_Assignment_Statement): Do no generate
2503 a discriminant check for a type whose partial view has unknown
2504 discriminants when the full view has discriminants with defaults.
2505
25062016-04-20 Javier Miranda <miranda@adacore.com>
2507
2508 * exp_util.adb (Remove_Side_Effects): When generating C code
2509 remove side effect of type conversion of access to unconstrained
2510 array type.
2511 (Side_Effect_Free): Return false for the type
2512 conversion of access to unconstrained array type when generating
2513 C code.
2514 * sem_res.adb (Resolved_Type_Conversion): Remove side effects
2515 of access to unconstrained array type conversion when generating
2516 C code.
2517
25182016-04-20 Ed Schonberg <schonberg@adacore.com>
2519
2520 * sem_ch13.adb (Build_Predicate_Function_Declaration): New
2521 function, to construct the declaration of a predicate function
2522 at the end of the current declarative part rather than at the
2523 (possibly later) freeze point of the type. This also allows uses
2524 of a type with predicates in instantiations elsewhere.
2525 (Resolve_Aspect_Expression): New procedure to detect visiblity
2526 errors in aspect expressions, at the end of the declarative part
2527 that includes the type declaration.
2528 * sem_ch3.adb (Complete_Private_Subtype): Propagate properly the
2529 predicate function from private to full view.
2530 * einfo.adb (Predicate_Function): Refine search for predicate
2531 function when type has a full view and predicate function may
2532 be defined on either view.
2533
25342016-04-20 Javier Miranda <miranda@adacore.com>
2535
2536 * frontend.adb: Passing the root of the tree to
2537 Unnest_Subprograms().
2538 * exp_ch6.adb (Expand_N_Subprogram_Body): Remove code that
2539 took care of adding subprograms to the Unest_Bodies table since
2540 performing such action too early disables the ability to process
2541 generic instantiations.
2542 (Unnest_Subprograms): Adding parameter.
2543 (Search_Unnesting_Subprograms): New subprogram.
2544 * exp_ch6.ads (Unnest_Subrograms): Update documentation.
2545
268aeaa9
AC
25462016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2547
2548 * exp_util.adb, freeze.adb, sem_util.adb: Minor reformatting.
2549
25502016-04-20 Ed Schonberg <schonberg@adacore.com>
2551
2552 * exp_unst.adb (Check_Static_Type): For a private type, check
2553 full view.
2554
25552016-04-20 Ed Schonberg <schonberg@adacore.com>
2556
2557 * sem_attr.adb (Check_Type): Reject an attribute reference in
2558 an aspect expression, when the prefix of the reference is the
2559 current instance of the type to which the aspect applies.
2560
51b42ffa
AC
25612016-04-20 Bob Duff <duff@adacore.com>
2562
2563 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about
2564 hiding unless we're actually hiding something. The previous
2565 code would (for example) warn about a "<" on a record type
2566 because it incorrectly thought it was hiding the "<" on Boolean
2567 in Standard. We need to check that the homonym S is in fact a
2568 homograph of a predefined operator.
2569
25702016-04-20 Ed Schonberg <schonberg@adacore.com>
2571
2572 * exp_util.ads, exp_util.adb (Build_Procedure_Form): Moved here
2573 from exp_ch6.adb, for use in SPARK_To_C mode when creating the
2574 procedure equivalent to a function returning an array, when this
2575 construction is deferred to the freeze point of the function.
2576 * sem_util.adb (Is_Unchecked_Conversion_Instance): Include a
2577 function that renames an instance of Unchecked_Conversion.
2578 * freeze.adb (Freeze_Subprogram): Generate the proper procedure
2579 declaration for a function returning an array.
2580 * exp_ch6.adb (Build_Procedure_Form): Moved to exp_util.
2581
f73dc37f
ES
25822016-04-20 Ed Schonberg <schonberg@adacore.com>
2583
2584 * sem_util.ads, sem_util.adb (Is_Expanded_Priority_Attribute):
2585 New predicate to determine that in a context with full run-time,
2586 a function call is an expansion of a reference to attribute
2587 Priority.
2588 * sem_ch5.adb (Analyze_Function_Call): use it.
2589 * exp_ch5.adb (Expand_N_Subprogram_Call): use it.
2590
75a957f5
AC
25912016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2592
2593 * einfo.adb Flag286 is now used as Is_Exception_Handler.
2594 (Is_Exception_Handler): New routine.
2595 (Set_Is_Exception_Handler): New routine.
2596 (Write_Entity_Flags): Output the status of Is_Exception_Handler.
2597 * einfo.ads New attribute Is_Exception_Handler along with
2598 occurrences in entities.
2599 (Is_Exception_Handler): New routine along with pragma Inline.
2600 (Set_Is_Exception_Handler): New routine along with pragma Inline.
2601 * exp_ch7.adb (Make_Transient_Block): Ignore blocks generated
2602 for exception handlers with a choice parameter.
2603 * sem_ch11.adb (Analyze_Exception_Handlers): Mark the scope
2604 generated for a choice parameter as an exception handler.
2605
26062016-04-20 Ed Schonberg <schonberg@adacore.com>
2607
2608 * sem_ch3.adb (Build_Derived_Access_Type): Remove dead code.
2609 (Constrain_Discriminated_Type): In an instance, if the type has
2610 unknown discriminants, use its full view.
2611 (Process_Subtype): Check that the base type is private before
2612 adding subtype to Private_Dependents list.
2613
26142016-04-20 Bob Duff <duff@adacore.com>
2615
2616 * sem_ch13.adb: Minor comment fix.
2617
bc795e3e
YM
26182016-04-20 Yannick Moy <moy@adacore.com>
2619
2620 * sem_ch4.adb: Fix typos in comments.
2621 * sem_res.adb (Resolve_Case_Expression): Fix type of case alternatives.
2622
0f8b3e5d
AC
26232016-04-20 Ed Schonberg <schonberg@adacore.com>
2624
2625 * sem_ch4.adb (Analyze_Selected_Component): A reference to the
2626 current instance of a task type is legal if the prefix is an
2627 expression of that task type and the selector is an entry or
2628 entry family.
2629
26302016-04-20 Arnaud Charlet <charlet@adacore.com>
2631
2632 * a-cfdlli.ads (List): Type is no longer tagged, not needed. Move
2633 varsize field at the end for efficiency.
2634
0c61772a
AC
26352016-04-20 Vincent Celier <celier@adacore.com>
2636
2637 * gnatcmd.adb: Do not invoke gprls when the invocation of "gnat
2638 ls" includes the switch -V.
2639 * clean.adb: "<target>-gnatclean -P" now calls "gprclean
2640 --target=<target>"
2641 * make.adb: "<target>-gnatmake -P" now calls "gprbuild
2642 --target=<target>"
2643
26442016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2645
2646 * sem_ch12.adb (Qualify_Type): Do not perform
2647 partial qualification when the immediate scope is a generic unit.
2648
61d1b085
HK
26492016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2650
2651 * exp_unst.adb: Minor reformatting.
2652
18431dc5
AC
26532016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2654
2655 * exp_ch4.adb (Expand_Allocator_Expression): Ensure that the
2656 tag assignment and adjustment preceed the accessibility check.
2657 * exp_ch7.adb (Is_Subprogram_Call): Reimplemented.
2658
26592016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2660
2661 * exp_prag.adb (Expand_Attributes): Ensure that
2662 the temporary used to capture the value of attribute 'Old's
2663 prefix is properly initialized.
2664
26652016-04-20 Javier Miranda <miranda@adacore.com>
2666
2667 * exp_unst.ads, exp_unst.adb (Get_Level, Subp_Index): Moved to library
2668 level.
2669
dfbc6cbe
AC
26702016-04-20 Arnaud Charlet <charlet@adacore.com>
2671
2672 * sem_ch9.adb (Analyze_Task_Type_Declaration): Shut down warning
2673 in codepeer mode.
2674
26752016-04-20 Vincent Celier <celier@adacore.com>
2676
2677 * make.adb: Code cleanup.
2678
26792016-04-20 Arnaud Charlet <charlet@adacore.com>
2680
2681 * exp_ch4.adb (Expand_Allocator_Expression): Help C code
2682 generation.
2683
06f6c43f
AC
26842016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2685
2686 * sem_ch12.adb (Copy_Generic_Node): Handle the special
2687 qualification installed for universal literals that act as
2688 operands in binary or unary operators. (Qualify_Operand): Mark
2689 the qualification to signal the instantiation mechanism how to
2690 handle global reference propagation.
2691 * sinfo.adb (Is_Qualified_Universal_Literal): New routine.
2692 (Set_Is_Qualified_Universal_Literal): New routine.
2693 * sinfo.ads New attribute Is_Qualified_Universal_Literal along
2694 with occurrences in nodes.
2695 (Is_Qualified_Universal_Literal):
2696 New routine along with pragma Inline.
2697 (Set_Is_Qualified_Universal_Literal): New routine along with
2698 pragma Inline.
2699
27002016-04-20 Ed Schonberg <schonberg@adacore.com>
2701
2702 * sem.adb (Do_Analyze): Save and restore Style_Max_Line_Length
2703 so that the corresponding checks are preserved across compilations
2704 that include System.Constants in their context.
2705
27062016-04-20 Gary Dismukes <dismukes@adacore.com>
2707
2708 * sem_type.adb: Minor typo fix and reformatting.
2709 * a-conhel.ads: Update comment.
2710
27112016-04-20 Bob Duff <duff@adacore.com>
2712
2713 * a-cihama.adb, a-cihase.adb, a-coinve.adb (Copy): Rewrite the
2714 code so it doesn't trigger an "uninit var" warning.
2715
71129dde
AC
27162016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2717
2718 * sem_attr.ads Add new table Universal_Type_Attribute.
2719 * sem_util.adb (Yields_Universal_Type): Use a table lookup when
2720 checking attributes.
2721
27222016-04-20 Ed Schonberg <schonberg@adacore.com>
2723
2724 * exp_aggr.adb (Init_Stored_Discriminants,
2725 Init_Visible_Discriminants): New procedures, subsidiary of
2726 Build_Record_Aggr_Code, to handle properly the construction
2727 of aggregates for a derived type that constrains some parent
2728 discriminants and renames others.
2729
5c63aafa
HK
27302016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2731
2732 * sem_ch12.adb (Qualify_Universal_Operands): New routine.
2733 (Save_References_In_Operator): Add explicit qualifications in
2734 the generic template for all operands of universal type.
2735 * sem_type.adb (Disambiguate): Update the call to Matches.
2736 (Matches): Reimplemented.
2737 * sem_util.ads, sem_util.adb (Yields_Universal_Type): New routine.
2738
7e22a38c
AC
27392016-04-20 Ed Schonberg <schonberg@adacore.com>
2740
2741 * sem_ch13.adb (Rep_Item_Too_Late): Better error message for
2742 an illegal aspect that freezes the entity to which it applies.
2743
27442016-04-20 Bob Duff <duff@adacore.com>
2745
2746 * a-stwibo.ads, a-stzbou.ads
2747 ("="): Add overriding keyword before function to avoid crash when
2748 compiler is called with -gnatyO (check overriding indicators).
2749
27502016-04-20 Ed Schonberg <schonberg@adacore.com>
2751
2752 * sem_prag.adb (Analyze_Pragma, case Check_Policy): If this
2753 is a configuration pragma and it uses the ARG syntax, insert
2754 the rewritten pragma after the current one rather than using
2755 Insert_Actions.
2756
27572016-04-20 Arnaud Charlet <charlet@adacore.com>
2758
2759 * exp_aggr.adb (Backend_Processing_Possible): Add handling of
2760 C back-end.
2761
b83dd5ec
HK
27622016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2763
2764 * s-imgllu.adb, sem_util.adb, s-imgint.adb, s-imguns.adb,
2765 s-imglli.adb: Minor reformatting.
2766
d566e90a
HK
27672016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2768
2769 * sem_res.adb (Rewrite_Renamed_Operator): Do not rewrite the
2770 renamed operator when the associated node appears within a
2771 pre/postcondition.
2772 * sem_util.ads, sem_util.adb (In_Pre_Post_Condition): New routine.
2773
9a476d75
AC
27742016-04-20 Yannick Moy <moy@adacore.com>
2775
2776 * osint.adb (Relocate_Path): Fix test when Path is shorter than Prefix.
2777 * einfo.adb (Set_Overridden_Operation): Add assertion.
2778 * sem_util.adb (Unique_Entity): for renaming-as-body return the spec
2779 entity.
2780
27812016-04-20 Javier Miranda <miranda@adacore.com>
2782
2783 * exp_unst.adb (Append_Unique_Call): New subprogram.
2784 (Unnest_Subprogram): Replace the unique occurrence
2785 of Call.Append() by Append_Unique_Call() which protects us from
2786 adding to the Calls table duplicated entries.
2787
27882016-04-20 Arnaud Charlet <charlet@adacore.com>
2789
2790 * exp_attr.adb (Is_GCC_Target): Fix for C backend.
2791 * xref_lib.ads (Dependencies_Tables): instantiate
2792 Table package with types that guarantee its safe use.
2793 * s-imgllu.adb, s-imgint.adb, s-imguns.adb, s-imglli.adb: Avoid nested
2794 procedures.
2795
88438c0e
AC
27962016-04-20 Arnaud Charlet <charlet@adacore.com>
2797
2798 * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]):
2799 Disable expansion when generating C code.
2800 * sinfo.ads, inline.ads: Minor editing.
2801
c37e6613
HK
28022016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2803
2804 * sem_util.adb, contracts.adb, ghost.adb, exp_ch6.adb: Minor
2805 reformatting.
2806
7f5e1dee
JM
28072016-04-20 Javier Miranda <miranda@adacore.com>
2808
2809 * contracts.adb (Build_Postconditions_Procedure): Code cleanup.
2810 * ghost.adb (Os_OK_Ghost_Context.Is_OK_Declaration): Handle the
2811 declaration of the internally built _postcondition procedure.
2812
31ae1b46
AC
28132016-04-20 Arnaud Charlet <charlet@adacore.com>
2814
2815 * snames.ads-tmpl (Internal_Attribute_Id, Attribute_Class_Array): Fix
2816 indentation.
2817 * sem_util.adb (Is_Unchecked_Conversion_Instance):
2818 defense against library-level renamings of other functions,
2819 which are never instances of Unchecked_Conversion.
2820 * einfo.ads: minor fix of casing in comment
2821
28222016-04-20 Ed Schonberg <schonberg@adacore.com>
2823
2824 * exp_ch6.adb (Expand_N_Subprogram_Stub): Do not expand a body
2825 that has been analyzed and expanded already. Qualify the names
2826 in the proper body for use in the generation of C code.
2827
1ba563f5
AC
28282016-04-20 Javier Miranda <miranda@adacore.com>
2829
2830 * contracts.adb (Build_Postconditions_Procedure): Force its
2831 inlining when generating C code.
2832 * sem_attr.adb (Analyze_Attribute_Old_Result): Handle inlined
2833 _postconditions when generating C code.
2834 * exp_ch6.adb (Inlined_Subprogram): Inline calls to
2835 _postconditions when generating C code.
2836 * sinfo.ads, sinfo.adb (Corresponding_Spec, Set_Corresponding_Spec):
2837 types of return value and argument changed from Node_Id to
2838 Entity_Id.
2839
28402016-04-20 Vincent Celier <celier@adacore.com>
2841
2842 * make.adb, clean.adb, gnatname.adb: Revert previous change for now.
2843
28442016-04-20 Eric Botcazou <ebotcazou@adacore.com>
2845
2846 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
2847 the Has_Delayed_Freeze flag on the anonymous instance node.
2848
e361e9a1
AC
28492016-04-20 Javier Miranda <miranda@adacore.com>
2850
2851 * sem_ch5.adb (Analyze_Iterator_Specification): Remove transient
2852 scope associated with the renaming object declaration.
2853 * exp_util.adb (Insert_Actions): Remove handling of iterator
2854 loop marked as requiring the secondary stack.
2855
28562016-04-20 Ed Schonberg <schonberg@adacore.com>
2857
2858 * sem_attr.adb (Analyze_Attribute, case 'Image): Implement
2859 AI12-0124, which extends the functionality of the attribute so it
2860 reflects the semantics of GNAT 'Img when applied to scalar types.
2861 * lib-xref.adb: minor whitespace layout fix.
2862
d67ffa88
AC
28632016-04-20 Vincent Celier <celier@adacore.com>
2864
2865 * clean.adb (Gnatclean): Fail if project file specified and
2866 gprclean is not available.
2867 * gnatname.adb: Fail is -P is used and gprname is not available.
2868 * make.adb (Initialize): Fail if project file specified and
2869 gprbuild is not available.
2870
28712016-04-20 Bob Duff <duff@adacore.com>
2872
2873 * sem_ch5.adb (Analyze_Iterator_Specification): Do not use secondary
2874 stack when possible.
2875
93e90bf4
AC
28762016-04-20 Gary Dismukes <dismukes@adacore.com>
2877
2878 * par_sco.adb, sem_util.adb, sem_ch13.adb: Minor typo corrections and
2879 reformatting.
2880
28812016-04-20 Ed Schonberg <schonberg@adacore.com>
2882
2883 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
2884 If the pragma comes from an aspect specification, verify that
2885 the aspect applies to an entity with a declarative part.
2886 * exp_ch5.adb: Code cleanup.
2887
28882016-04-20 Ed Schonberg <schonberg@adacore.com>
2889
2890 * sem_res.adb (Resolve_If_Expression): If first expression is
2891 universal, resolve subsequent ones with the corresponding class
2892 type (Any_Integer or Any_Real).
2893
28942016-04-20 Ed Schonberg <schonberg@adacore.com>
2895
2896 * sem_ch5.adb (Analyze_Iterator_Specification): If expansion is
2897 disabled, complete the analysis of the iterator name to ensure
2898 that reference for entities within are properly generated.
2899
29002016-04-20 Arnaud Charlet <charlet@adacore.com>
2901
2902 * a-dispat.ads (Yield): add Global contract.
2903 * a-calend.ads, a-reatim.ads: Added Initializes => Clock_Time.
2904 * a-taside.adb: Added Initializes => Tasking_State.
2905
ae3d8837
HK
29062016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2907
2908 * sem_ch13.adb (Build_Invariant_Procedure):
2909 Reimplement the invariant procedure spec and body insertion.
2910
776fbb74
AC
29112016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2912
2913 * sem_ch13.adb (Add_Invariant): Do not replace
2914 the saved expression of an invariatn aspect when inheriting
2915 a class-wide type invariant as this clobbers the existing
2916 expression. Do not use New_Copy_List as it is unnecessary
2917 and leaves the parent pointers referencing the wrong part of
2918 the tree. Do not replace the type references for ASIS when
2919 inheriting a class-wide type invariant as this clobbers the
2920 existing replacement.
2921
29222016-04-20 Ed Schonberg <schonberg@adacore.com>
2923
2924 * sem_util.adb (Build_Explicit_Dereference): If the designated
2925 expression is an entity name, generate reference to the entity
2926 because it will not be resolved again.
2927
a0176903
AC
29282016-04-19 Arnaud Charlet <charlet@adacore.com>
2929
2930 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
2931 gnat_rm.texi: Update documentation.
2932
009c0268
AC
29332016-04-19 Olivier Hainque <hainque@adacore.com>
2934
2935 * par_sco.adb (Traverse_One, case N_Case_Statement):
2936 Skip pragmas before the first alternative.
2937 (Traverse_Handled_Statement_Sequence, Exception_Handlers): Likewise.
2938
29392016-04-19 Tristan Gingold <gingold@adacore.com>
2940
2941 * adaint.c (__gnat_lwp_self): New function (for darwin).
2942 * s-osinte-darwin.ads, s-osinte-darwin.adb (lwp_self): Import
2943 of __gnat_lwp_self.
2944
27b95a65
OH
29452016-04-19 Olivier Hainque <hainque@adacore.com>
2946
2947 * sem_util.adb (Build_Elaboration_Entity): Always request an
2948 elab counter when preserving control-flow.
2949
29502016-04-19 Olivier Hainque <hainque@adacore.com>
2951
2952 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set
2953 Needs_Debug_Info when producing SCOs.
2954 * par_sco.adb (Traverse_Aspects): Fix categorization of
2955 Type_Invariant to match actual processing as activated depending
2956 on pragma Assertion_Policy.
2957 * sem_prag.adb (Analyze_Pragma): Remove special case for
2958 Name_Invariant regarding SCO generation, which completely disabled
2959 the production of SCOs for Invariant pragmas and aspects.
2960
b4213ffd
AC
29612016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
2962
2963 * checks.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
2964 reformatting.
2965
29662016-04-19 Ed Schonberg <schonberg@adacore.com>
2967
2968 * freeze.adb (Freeze_Profile): Refine predicate that checks
2969 whether a function that returns a limited view is declared in
2970 another unit and cannot be frozen at this point.
2971
29722016-04-19 Ed Schonberg <schonberg@adacore.com>
2973
2974 * exp_aggr.adb (Component_Count): Handle properly superflat
2975 arrays, i.e. empty arrays where Hi < Lo - 1, to ensure that the
2976 return value of the function is Natural, rather than leaving
2977 the handling of such arrays to the caller of this function.
2978
b3143037
AC
29792016-04-19 Arnaud Charlet <charlet@adacore.com>
2980
2981 * sem_prag.adb, sem_attr.adb, par-prag.adb, exp_aggr.adb, sem_type.adb
2982 sem_ch12.adb, sem_ch3.adb, exp_ch7.adb, exp_ch9.adb: Code cleanup.
2983 * sem_res.adb, sem_util.ads, sem_util.adb (Is_OK_Volatile_Context):
2984 Promoted from being a nested subprogram in Sem_Res.Resolve_Entity_Name
2985 to publicly visible routine in Sem_Util.
2986
29872016-04-19 Ed Schonberg <schonberg@adacore.com>
2988
2989 * checks.adb (Apply_Parameter_Aliasing_Checks): Do not apply
2990 the check if the type of the actual is By_Reference.
2991
e90e9503
AC
29922016-04-19 Arnaud Charlet <charlet@adacore.com>
2993
2994 * sem_res.adb (Within_Subprogram_Call): Detect
2995 also nodes that appear in entry calls.
2996 (Resolve_Actuals, Insert_Default): Propagate
2997 dimension information if any, from default expression to the
2998 copy that appears in the list of actuals.
2999 * uintp.ads: minor whitespace fix in comment.
3000 * sem_prag.adb, stringt.adb, inline.adb, lib-xref-spark_specific.adb:
3001 Minor code cleanup.
3002 * set_targ.adb (Set_Targ): convert directly from
3003 Natural to Pos, without intermediate conversion to Int.
3004
db7e3721
AC
30052016-04-19 Arnaud Charlet <charlet@adacore.com>
3006
3007 * sem_ch6.adb (Process_Formals): Mark suspicious reference to
3008 SPARK RM in comment.
3009 * sem_prag.adb (Analyze_Global_Item): Fix reference to SPARK RM
3010 in comment.
3011 * sem_res.adb (Property_Error, Resolve_Actuals): Fix reference
3012 to SPARK RM in both comment and error message.
3013
68101499
EB
30142016-04-19 Eric Botcazou <ebotcazou@adacore.com>
3015
3016 * sem_ch6.adb (Possible_Freeze): If the type is an incomplete
3017 CW type, then the subprogram must have a delayed freeze. This
3018 ensures that the backend can properly recover the full view when
3019 elaborating the access subprogram declaration.
3020
16e764a7
AC
30212016-04-19 Ed Schonberg <schonberg@adacore.com>
3022
3023 * sem_attr.adb (Resolve_Attribute, case 'Access): Freeze
3024 overloadable entity if originally overloaded.
3025
30262016-04-19 Arnaud Charlet <charlet@adacore.com>
3027
3028 * exp_aggr.adb, exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_code.adb,
3029 exp_fixd.adb, namet.adb, osint.adb, osint.ads, par-ch2.adb,
3030 sem_ch10.adb, sem_ch12.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb
3031 sem_util.adb, styleg.adb, styleg.ads, stylesw.ads: Minor code
3032 clean up.
3033
4754d4e8
AC
30342016-04-19 Arnaud Charlet <charlet@adacore.com>
3035
3036 * sem_util.adb (Copy_Node_With_Replacement):
3037 use Set_Comes_From_Source instead of directly manipulating
3038 internals of the node table.
3039 * sem_util.adb (Within_Scope): refactored to remove duplicated code.
3040 * sem_aux.adb (Get_Rep_Pragma,
3041 Subprogram_Body_Entity, Subprogram_Spec): declare variables that
3042 do not change as constants and initialize them in the declaration.
3043 (Get_Rep_Pragma, Subprogram_Body_Entity, Subprogram_Spec): declare
3044 variables that do not change as constants and initialize them
3045 in the declaration.
3046
87fd6836
AC
30472016-04-19 Ed Schonberg <schonberg@adacore.com>
3048
3049 * sem_res.adb (Resolve_Entry_Call): If the entry has
3050 preconditions it is rewritten by means of a wrapper that
3051 incorporates the original call. Before rewriting generate a
3052 reference to the entry being called to prevent spurious warnings
3053 and provide correct cross-reference information.
3054
30552016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
3056
3057 * sem_disp.adb (Check_Dispatching_Context): Code cleanup. Add
3058 local constant Scop. Ignore any internally generated loops when
3059 performing the check concerning an abstract subprogram call
3060 without a controlling argument.
3061 * sem_util.ads, sem_util.adb (Current_Scope_No_Loops): New routine.
3062
b35e5dcb
AC
30632016-04-19 Bob Duff <duff@adacore.com>
3064
3065 * sem_elab.adb (Check_A_Call): There are cases where we have No
3066 (Ent) after the Alias loop, even when there was no previous error,
3067 so we can't assert that there was an error.
3068
30692016-04-19 Ed Schonberg <schonberg@adacore.com>
3070
3071 * sem_attr.adb (Analyze_Access_Attribute, OK_Self_Reference):
3072 Reject use of type name as a prefix to 'access within an aggregate
3073 in a context that is not the declarative region of a type.
3074
30752016-04-19 Vincent Celier <celier@adacore.com>
3076
3077 * gnatcmd.adb: Make "gnat ls -P" invoke gprls Make "gnat bind
3078 -P" invoke "gprbuild -b" Make "gnat link -P" invoke "gprbuild
3079 -l" Fail if the invocation is "gnat find -P" or "gnat xref -P"
3080 Remove anything related to project files
3081 * g-mbdira.adb: minor whitespace cleanup
3082 * g-spipat.adb: minor removal of extra spaces after closing paren
3083
30842016-04-19 Ed Schonberg <schonberg@adacore.com>
3085
3086 * exp_ch6.adb (Expand_Actuals): If post-statements are present
3087 and the enclosing context is a function call or indexing, build
3088 an Expression_With_Actions for the call.
3089
30902016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
3091
3092 * lib-writ.adb (Write_With_Lines): Code cleanup. Do not generate
3093 a with line for an ignored Ghost unit.
3094 * sem_ch7.adb (Analyze_Package_Declaration): Add local constant
3095 Par. A child package is Ghost when its parent is Ghost.
3096 * sem_prag.adb (Analyze_Pragma): Pragma Ghost can now apply to
3097 a subprogram declaration that acts as a compilation unit.
3098
fe37c7af
MM
30992016-04-18 Michael Matz <matz@suse.de>
3100
3101 * gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN.
3102 (gnat_to_gnu_field): Ditto.
3103 (components_to_record): Ditto.
3104 (create_variant_part_from): Ditto.
3105 (copy_and_substitute_in_size): Ditto.
3106 (substitute_in_type): Ditto.
3107 * gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN.
3108 (make_packable_type): Ditto.
3109 (maybe_pad_type): Ditto.
3110 (finish_fat_pointer_type): Ditto.
3111 (finish_record_type): Ditto and use SET_DECL_ALIGN.
3112 (rest_of_record_type_compilation): Use SET_TYPE_ALIGN.
3113 (create_field_decl): Use SET_DECL_ALIGN.
3114
be035558
AC
31152016-04-18 Arnaud Charlet <charlet@adacore.com>
3116
3117 * einfo.adb (Overridden_Operation): assert that
3118 function is called for valid arguments.
3119 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_type.adb,
3120 s-osinte-vxworks.ads, a-ngcefu.adb, sem_ch10.adb, einfo.ads,
3121 sem_prag.adb, sem_ch12.adb, sem.adb, i-cobol.ads, freeze.adb,
3122 sem_util.adb, a-chtgop.ads, s-rannum.adb, exp_ch6.adb, s-bignum.adb,
3123 s-osinte-freebsd.ads, par-ch5.adb, a-chtgbo.ads, a-cofove.adb:
3124 No space after closing parenthesis except where required for
3125 layout.
3126 * sem_res.adb: Minor reformatting.
3127
31282016-04-18 Arnaud Charlet <charlet@adacore.com>
3129
3130 * exp_ch4.adb (Expand_N_Case_Expression): Convert into a case
3131 statement when relevant.
3132
31332016-04-18 Bob Duff <duff@adacore.com>
3134
3135 * a-cuprqu.adb (Enqueue): Properly handle the
3136 case where the new element has a unique priority.
3137
31382016-04-18 Tristan Gingold <gingold@adacore.com>
3139
3140 * adaint.h: Define stat structures and functions for iOS
3141 simulator.
3142
9d4f9832
AC
31432016-04-18 Arnaud Charlet <charlet@adacore.com>
3144
3145 * sem_res.adb (Resolve_Entry_Call): reset
3146 Is_Overloaded flag after resolving calls to overloaded protected
3147 operations.
3148 * exp_spark.adb (Expand_SPARK): call
3149 Qualify_Entity_Names for tasking nodes, i.e. protected types,
3150 task types and entries.
3151 * exp_ch4.adb (Expand_N_If_Expression): Refine previous change
3152 in case of an unconstrained type.
3153
31542016-04-18 Yannick Moy <moy@adacore.com>
3155
3156 * sem_eval.adb, sem_eval.ads (Check_Non_Static_Context): Add
3157 comment to document usage of subprogram in GNATprove.
3158
a65dcb0d
AC
31592016-04-18 Ed Schonberg <schonberg@adacore.com>
3160
3161 * sem_prag.adb (Analyze_Pragma, case Test_Case): Improve error
3162 message for wrong placement of aspect Test_Case.
3163
31642016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3165
3166 * einfo.ads: Update the documentation of attribute Renamed_Object.
3167 * exp_spark.adb (Expand_Potential_Renaming): Reimplemented.
3168
31692016-04-18 Gary Dismukes <dismukes@adacore.com>
3170
3171 * exp_ch4.adb (Optimize_Length_Comparison): Return immediately
3172 in the case of AAMP (same as for use of the -gnatd.P switch) to
3173 suppress this optimization, which avoids creating a dependence
3174 on the 64-bit arithmetic package.
3175
7548f2cb
AC
31762016-04-18 Arnaud Charlet <charlet@adacore.com>
3177
3178 * exp_ch4.adb: Update comment.
3179
31802016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3181
3182 * exp_ch6.adb (Expand_Call): Make sure instantiations are
3183 registered only once as pending here.
3184
f916243b
AC
31852016-04-18 Arnaud Charlet <charlet@adacore.com>
3186
3187 * exp_ch4.adb, gnat1drv.adb, opt.ads, sem_res.adb
3188 (Minimize_Expression_With_Actions): New flag.
3189 (Adjust_Global_Switches): Set Minimize_Expression_With_Actions
3190 when generating C.
3191 (Resolve_Short_Circuit): Redo previous change
3192 using Minimize_Expression_With_Actions.
3193 (Expand_N_If_Expression,
3194 Expand_Short_Circuit_Operator): Restore old code to avoid
3195 Expression_With_Actions when Minimize_Expression_With_Actions
3196 is set.
3197
31982016-04-18 Vincent Celier <celier@adacore.com>
3199
3200 * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File and
3201 Stderr_File): Close local file descriptors when no longer needed.
3202
32032016-04-18 Ed Schonberg <schonberg@adacore.com>
3204
3205 * sem_ch5.adb (Analyze_Iterator_Specification): Remove SPARK
3206 mode check that the type of the cursor in an iteration over
3207 a formal container is not volatile. The proper check on the
3208 element type is done elsewhere.
3209
32102016-04-18 Ed Schonberg <schonberg@adacore.com>
3211
3212 * sem_ch6.adb (Process_Formals): Do not set a delay freeze on
3213 a subprogram that returns a class-wide type, if the subprogram
3214 is a compilation unit, because otherwise gigi will treat the
3215 subprogram as external, leading to link errors.
3216
22071092
AC
32172016-04-18 Arnaud Charlet <charlet@adacore.com>
3218
3219 * sem_res.adb (Resolve_Short_Circuit): Do not use
3220 expression-with-actions when generating C.
3221
ad81cb78
AC
32222016-04-18 Yannick Moy <moy@adacore.com>
3223
3224 * sem_util.adb (Apply_Compile_Time_Constraint_Error): Do not generate
3225 raise node in GNATprove mode.
3226
32272016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3228
3229 * s-fileio.adb: Minor reformatting.
3230 * sem_prag.adb (Analyze_Input_Item): Add local
3231 variable Input_OK. Do not consider mappings of generic formal
3232 parameters to actuals.
3233
32342016-04-18 Ed Schonberg <schonberg@adacore.com>
3235
3236 * sem_ch5.adb (Get_Cursor_Type): If iterator type is a derived
3237 type, the cursor is declared in the scope of the parent type.
3238 (Analyze_Parameter_Specification): A qualified expression with an
3239 iterator type indicates an iteration over a container (explicit
3240 or implicit).
3241
520c0201
AC
32422016-04-18 Arnaud Charlet <charlet@adacore.com>
3243
3244 * osint-c.ads, osint-c.adb (Delete_C_File, Delete_H_File): New.
3245 * gnat1drv.adb (Gnat1drv): Delete old C files before regenerating them.
3246 * debug.adb: Reserve -gnatd.4 to force generation of C files.
3247
32482016-04-18 Yannick Moy <moy@adacore.com>
3249
3250 * sem_eval.adb (Eval_Arithmetic_Op): Do not issue error on static
3251 division by zero, instead possibly issue a warning.
3252 * sem_res.adb (Resolve_Arithmetic_Op): Do not issue error on
3253 static division by zero, instead add check flag on original
3254 expression.
3255 * sem_util.adb, sem_util.ads (Compile_Time_Constraint_Error):
3256 Only issue error when both SPARK_Mode is On and Warn is False.
3257
32582016-04-18 Yannick Moy <moy@adacore.com>
3259
3260 * checks.adb (Apply_Scalar_Range_Check): Force
3261 warning instead of error when SPARK_Mode is On, on index out of
3262 bounds, and set check flag for GNATprove.
3263
274c2cda
AC
32642016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3265
3266 * sem_prag.adb (Check_In_Out_States.Check_Constituent_Usage):
3267 Update the comment on usage. Reimplemented.
3268 (Check_Input_States.Check_Constituent_Usage): Update the comment
3269 on usage. A Proof_In constituent can now refine an Input state
3270 as long as there is at least one Input constituent present.
3271
32722016-04-18 Ed Schonberg <schonberg@adacore.com>
3273
3274 * sem_ch6.adb (Check_Inline_Pragma): Use the Sloc of the
3275 body id as the sloc of the entity in the generated subprogram
3276 declaration, to avoid spurious conformance errors when style
3277 checks are enabled.
3278
a6363ed3
AC
32792016-04-18 Ed Schonberg <schonberg@adacore.com>
3280
3281 * sem_ch4.adb (Analyze_Selected_Component, Has_Dereference):
3282 Refine check on illegal calls to entities within a task body,
3283 when the entity is declared in an object of the same type. In
3284 a generic context there might be no explicit dereference but if
3285 the prefix includes an access type the construct is legal.
3286
32872016-04-18 Arnaud Charlet <charlet@adacore.com>
3288
3289 * rtsfind.ads, rtsfind.adb (RE_Id, RE_Unit_Table): add
3290 RE_Default_Priority.
3291
32922016-04-18 Bob Duff <duff@adacore.com>
3293
3294 * sem_prag.adb (Check_Arg_Is_Local_Name): Don't do the check
3295 if the pragma came from an aspect specification.
3296
32972016-04-18 Gary Dismukes <dismukes@adacore.com>
3298
3299 * gnat1drv.adb, contracts.adb: Minor reformatting and wording fixes.
3300
33012016-04-18 Ed Schonberg <schonberg@adacore.com>
3302
3303 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): To suppress
3304 superfluous conformance check on an inlined body with a previous
3305 spec, use the fact that the generated declaration does not come
3306 from source. We must treat the entity as coming from source to
3307 enable some back-end inlining when pragma appears after the body.
3308
4afcf3a5
AC
33092016-04-18 Gary Dismukes <dismukes@adacore.com>
3310
3311 * lib-xref-spark_specific.adb, par-ch2.adb, errout.ads,
3312 exp_intr.adb: Minor reformatting and typo corrections.
3313
33142016-04-18 Ed Schonberg <schonberg@adacore.com>
3315
3316 * sem_ch6.adb: Code cleanup.
3317
33182016-04-18 Thomas Quinot <quinot@adacore.com>
3319
3320 * sem_ch13.adb: Minor reformatting and error message tweaking
3321 (remove extraneous spaces).
3322
33232016-04-18 Johannes Kanig <kanig@adacore.com>
3324
3325 * gnat1drv.adb (Gnat1drv): Force loading of System unit for SPARK.
3326
33272016-04-18 Bob Duff <duff@adacore.com>
3328
3329 * s-fileio.adb (Fopen_Mode): If Mode = Out_File, and the file
3330 exists, and it's a fifo, we use "w" as the open string instead of
3331 "r+". This is necessary to make a write to the fifo block until
3332 a reader is ready.
3333
33342016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3335
3336 * sem_attr.adb (Denote_Same_Function): Account
3337 for a special case where a primitive of a tagged type inherits
3338 a class-wide postcondition from a parent type.
3339
58ba2415
HK
33402016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3341
3342 * par-ch2.adb (P_Expression_Or_Reserved_Word): New routine.
3343 (P_Pragma): Signal Scan_Pragma_Argument_Association when the use
3344 of reserved words is OK.
3345 (Scan_Pragma_Argument_Association):
3346 Add new formal Reserved_Words_OK and update the comment on
3347 usage. Code cleanup. Parse an expression or a reserved word in
3348 identifier form for pragmas Restriction_Warnings and Restrictions
3349 No_Use_Of_Attribute.
3350 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
3351 Reimplemented. (Check_Restriction_No_Use_Of_Pragma): Code cleanup.
3352 (Set_Restriction_No_Specification_Of_Aspect): Properly set the warning
3353 flag for an aspect.
3354 (Set_Restriction_No_Use_Of_Attribute): Properly set the warning
3355 flag for an attribute. (Set_Restriction_No_Use_Of_Entity):
3356 Update the parameter profile.
3357 (Set_Restriction_No_Use_Of_Pragma): Properly set the warning flag for
3358 a pragma.
3359 * restrict.ads (Check_Restriction_No_Use_Of_Attribute): Update
3360 the comment on usage.
3361 (Set_Restriction_No_Use_Of_Entity): Update the parameter profile.
3362 * sem_attr.adb (Analyze_Attribute): Check restriction
3363 No_Use_Of_Attribute.
3364 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
3365 restriction No_Use_Of_Attribute before any rewritings have
3366 taken place.
3367 * sem_prag.adb (Analyze_Pragma): Check restriction
3368 No_Use_Of_Pragma before any rewritings have taken place.
3369
b269f477
BD
33702016-04-18 Bob Duff <duff@adacore.com>
3371
3372 * sem_ch6.adb (Is_Inline_Pragma): The pragma
3373 argument can be a selected component, which has no Chars field,
3374 so we need to deal with that case (use the Selector_Name).
3375 (Check_Inline_Pragma): We need to test Is_List_Member before
3376 calling In_Same_List, because in case of a library unit, they're
3377 not in lists, so In_Same_List fails an assertion.
3378
33792016-04-18 Bob Duff <duff@adacore.com>
3380
3381 * namet.ads, namet.adb: Add an Append that appends a
3382 Bounded_String onto a Bounded_String. Probably a little more
3383 efficient than "Append(X, +Y);". Also minor cleanup.
3384 (Append_Decoded, Append_Decoded_With_Brackets, Append_Unqualified,
3385 Append_Unqualified_Decoded): Make sure these work with non-empty
3386 buffers.
3387 * casing.ads, casing.adb (Set_Casing): Pass a Bounded_String
3388 parameter, defaulting to Global_Name_Buffer.
3389 * errout.ads, errout.adb (Adjust_Name_Case): Pass a
3390 Bounded_String parameter, no default.
3391 * exp_ch11.adb (Expand_N_Raise_Statement): Use local
3392 Bounded_String instead of Global_Name_Buffer.
3393 * exp_intr.ads, exp_intr.adb (Write_Entity_Name): Rename it
3394 to Append_Entity_Name, and pass a Bounded_String parameter,
3395 instead of using globals.
3396 (Add_Source_Info): Pass a Bounded_String parameter, instead of
3397 using globals.
3398 (Expand_Source_Info): Use local instead of globals.
3399 * stringt.ads, stringt.adb (Append): Add an Append procedure
3400 for appending a String_Id onto a Bounded_String.
3401 (String_To_Name_Buffer, Add_String_To_Name_Buffer): Rewrite in
3402 terms of Append.
3403 * sem_prag.adb (Set_Error_Msg_To_Profile_Name): Adjust for new
3404 Adjust_Name_Case parameter.
3405 * erroutc.adb, uname.adb: Don't pass D => Mixed_Case to
3406 Set_Casing; that's the default.
3407 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Pretend that calls to
3408 protected subprograms are entry calls; otherwise it is not possible to
3409 distinguish them from regular subprogram calls.
3410
876f1624
AC
34112016-04-18 Gary Dismukes <dismukes@adacore.com>
3412
3413 * sem_ch13.adb (Has_Good_Profile): Improvement
3414 of error message. Now indicates subtype_mark of formal parameter
3415 rather than the formal's name, plus minor rewording.
3416
34172016-04-18 Pascal Obry <obry@adacore.com>
3418
3419 * adaint.c, adaint.h, s-os_lib.ads: Add new routine Current_Process_Id.
3420
77039fe2
AC
34212016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3422
3423 * stringt.adb, exp_ch6.adb, sem_ch13.adb: Minor reformatting.
3424
34252016-04-18 Gary Dismukes <dismukes@adacore.com>
3426
3427 * par-ch4.adb, sem_prag.adb: Minor reformatting.
3428
ea102799
BD
34292016-04-18 Bob Duff <duff@adacore.com>
3430
3431 * sinput.ads, sinput.adb (Build_Location_String): Take a
3432 parameter instead of using a global variable. The function
3433 version no longer destroys the Name_Buffer.
3434 * stringt.ads, stringt.adb (String_From_Name_Buffer): Take a
3435 parameter, which defaults to the Global_Name_Buffer, so some
3436 calls can avoid the global.
3437 * exp_ch11.adb, exp_intr.adb: Use new interfaces above
3438 to avoid using globals. All but one call to Build_Location_String
3439 avoids the global. Only one call to String_From_Name_Buffer
3440 avoids it.
3441
87feba05
AC
34422016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3443
3444 * namet.adb, namet.ads, exp_unst.adb: Minor reformatting.
3445
34462016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3447
3448 * sem_eval.adb (Choice_Matches): Check the expression
3449 against the predicate values when the choice denotes a
3450 subtype with a static predicate.
3451 (Eval_Membership_Op): Code cleanup. Remove the suspicious guard which
3452 tests for predicates.
3453 (Is_OK_Static_Subtype): A subtype with a dynamic predicate
3454 is not static. (Is_Static_Subtype): A subtype with a dynamic
3455 predicate is not static.
3456 * sem_eval.ads (Is_OK_Static_Subtype): Update the comment on usage.
3457 (Is_Static_Subtype): Update the comment on usage.
3458
34592016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3460
3461 * sem_prag.adb (Analyze_Input_Item): Allow
3462 generic formals to appear as initialization items.
3463
34642016-04-18 Ed Schonberg <schonberg@adacore.com>
3465
3466 * sem_ch13.adb (Analyze_Stream_TSS_Definition,
3467 Has_Good_Profile): Additional error message to indicate that
3468 the second parameter of the subprogram must be a first subtype.
3469
34702016-04-18 Ed Schonberg <schonberg@adacore.com>
3471
3472 * sem_ch6.adb (Analyze_Subprogram_Body_Helper, Is_Inline_Pragma):
3473 Use the pragma lookahead that determines whether a subprogram
3474 is to be inlined, when some level of backend optimization is
3475 required.
3476 * sem_ch12.ads, sem_ch12.adb (Add_Pending_Instantiation): Factorize
3477 code used to create an instance body when needed for inlining.
3478 * exp_ch6.adb (Expand_Call): When a call is to be inlined, and the
3479 call appears within an instantiation that is not a compilation
3480 unit, add a pending instantiation for the enclosing instance,
3481 so the backend can inline in turn the calls contained in the
3482 inlined body.
3483
3e20cb68
AC
34842016-04-18 Ed Schonberg <schonberg@adacore.com>
3485
3486 * sem_prag.adb (Build_Pragma_Check_Equivalent): The mapping
3487 that relates operations of the parent type to the operations of
3488 the derived type has three distinct sources:
3489 a) explicit operations of the derived type carry an
3490 Overridden_Operation that designates the operation in the
3491 ancestor.
3492 b) Implicit operations that are inherited by the derived type
3493 carry an alias that may be an explicit subprogram (in which case
3494 it may have an Overridden_ Operation indicator) or may also be
3495 inherited and carry its own alias.
3496 c) If the parent type is an interface, the operation of the
3497 derived type does not override, but the interface operation
3498 indicates the operation that implements it.
3499 * sem_prag.adb: Minor reformatting.
3500 * sem_prag.adb (Check_External_Property): Update
3501 the comment on usage. Reimplement.
3502
35032016-04-18 Ed Schonberg <schonberg@adacore.com>
3504
3505 * exp_ch5.adb (Expand_Assignment_Statement): In restricted
3506 profiles such as ZFP, ceiling priority is not available.
3507
35082016-04-18 Bob Duff <duff@adacore.com>
3509
3510 * namet-sp.ads: Minor typo fix, ironically in 'Spelling_Checker'.
3511
35122016-04-18 Bob Duff <duff@adacore.com>
3513
3514 * sem_elab.adb (Output_Calls): Use
3515 Get_Name_String, to clearly indicate that the global Name_Buffer
3516 is being used. The previous code used Is_Internal_Name, which
3517 returns a Boolean, but also has a side effect of setting the
3518 Name_Buffer. Then it called the other Is_Internal_Name, which uses
3519 the Name_Buffer for its input. And then it called Error_Msg_N,
3520 again using the Name_Buffer. We haven't eliminated the global
3521 usage here, but we've made it a bit clearer.
3522 This also allows us to have a side-effect-free version of
3523 Is_Internal_Name.
3524 * namet.ads, namet.adb: Provide a type Bounded_String, along with
3525 routines that can be used without using global variables. Provide
3526 Global_Name_Buffer so existing code can continue to use the
3527 global. Mark the routines that use globals as obsolete. New code
3528 shouldn't call the obsolete ones, and we should clean up existing
3529 code from time to time.
3530 Name_Find_Str is renamed as Name_Find.
3531 * namet.h: Changed as necessary to interface to the new version
3532 of Namet.
3533 * bindgen.adb, exp_unst.adb: Name_Find_Str is renamed as
3534 Name_Find.
3535
1f55088d
AC
35362016-04-18 Yannick Moy <moy@adacore.com>
3537
3538 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization): used
3539 outside of GNATprove, hence it should not be removed.
3540
35412016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3542
3543 * sem_prag.adb (Analyze_Refinement_Clause):
3544 The refinement of an external abstract state can now mention
3545 non-external constituents.
3546 (Check_External_Property): Update all SPARK RM references.
3547
35482016-04-18 Bob Duff <duff@adacore.com>
3549
3550 * exp_intr.adb: Remove some duplicated code.
3551
35522016-04-18 Yannick Moy <moy@adacore.com>
3553
3554 * a-nudira.adb, a-nudira.ads, a-nuflra.adb, a-nuflra.ads: Mark
3555 package spec and body out of SPARK.
3556
35572016-04-18 Johannes Kanig <kanig@adacore.com>
3558
3559 * spark_xrefs.ads: Minor comment update.
3560
35612016-04-18 Johannes Kanig <kanig@adacore.com>
3562
3563 * gnat1drv.adb (Gnat1drv): Force loading of System
3564 unit for SPARK.
3565
35662016-04-18 Bob Duff <duff@adacore.com>
3567
3568 * a-cuprqu.adb: Correction to previous change. If a new node
3569 is inserted at the front of the queue (because it is higher
3570 priority than the previous front node), we need to update
3571 Header.Next_Unequal -- not just in the case where the queue was
3572 previously empty.
3573
142870f5
AC
35742016-04-18 Bob Duff <duff@adacore.com>
3575
3576 * a-cuprqu.ads: Change the representation of List_Type from a
3577 singly-linked list to a doubly-linked list. In addition, add a
3578 pointer Next_Unequal, which points past a possibly-long chain
3579 of equal-priority items. This increases efficiency, especially
3580 in the case of many equal-priority items.
3581 * a-cuprqu.adb (Dequeue, Enqueue): Rewrite algorithms to take
3582 advantage of new data structure.
3583 (Finalize): Rewrite in terms of Dequeue, for simplicity.
3584
35852016-04-18 Yannick Moy <moy@adacore.com>
3586
3587 * contracts.adb (Analyze_Object_Contract,
3588 Analyze_Protected_Contract): Remove tests performed in GNATprove.
3589 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization):
3590 Remove query for tests performed in GNATprove.
3591
ec3c7387
AC
35922016-04-18 Ed Schonberg <schonberg@adacore.com>
3593
3594 * sem_aggr.adb (Resolve_Record_Aggregate): If
3595 Warn_On_Redundant_Constructs is enabled, report a redundant box
3596 association that does not cover any components, as it done for
3597 redundant others associations in case statements.
3598
35992016-04-18 Ed Schonberg <schonberg@adacore.com>
3600
3601 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions):
3602 Analyze the generated Check pragma for an inherited condition so
3603 that it does not freeze the dispatching type of the primitive
3604 operation, because it is pre-analyzed at the point of the
3605 subprogram declaration (and not in the subprogram body, as is
3606 done during regular expansion).
3607
36082016-04-18 Vincent Celier <celier@adacore.com>
3609
3610 * ali.ads: Increase the range of all _Id types to 100 millions.
3611
36122016-04-18 Gary Dismukes <dismukes@adacore.com>
3613
3614 * sem_warn.adb (Check_References): Change warning to suggest
3615 using pragma Export rather than saying "volatile has no effect".
3616
36172016-04-18 Bob Duff <duff@adacore.com>
3618
3619 * g-souinf.ads (Compilation_ISO_Date): New function to return
3620 the current date in ISO form.
3621 * exp_intr.adb (Expand_Source_Info, Add_Source_Info): Expand
3622 a call to Compilation_ISO_Date into a string literal containing
3623 the current date in ISO form.
3624 * exp_intr.ads (Add_Source_Info): Improve documentation.
3625 * sem_intr.adb (Check_Intrinsic_Subprogram): Recognize
3626 Compilation_ISO_Date.
3627 * snames.ads-tmpl (Name_Compilation_ISO_Date): New Name_Id.
3628
0f6251c7
AC
36292016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3630
3631 * layout.adb (Set_Elem_Alignment): Extend setting of alignment
3632 to subtypes that are not first subtypes.
3633
36342016-04-18 Ed Schonberg <schonberg@adacore.com>
3635
3636 * sem_prag.ads (Collect_Inherited_Class_Wide_Conditions):
3637 Simplify interface.
3638 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Insert
3639 generated pragmas after subprogram declaration, rather than in
3640 the corresponding subprogram body.
3641 * sem_ch6.adb (New_Overloaded_Entity): In GNATProve
3642 mode, if the operation is overridding, call
3643 Collect_Inherited_Class_Wide_Conditions to generate the
3644 corresponding pragmas immediately after the corresponding
3645 subprogram declaration.
3646
36472016-04-18 Arnaud Charlet <charlet@adacore.com>
3648
3649 * spark_xrefs.ads (Xref_Index, Scope_Index, File_Index): restrict
3650 type to natural numbers.
3651 (Stype): document code characters for concurrent entities.
3652
36532016-04-18 Olivier Hainque <hainque@adacore.com>
3654
3655 * targparm.ads: Update the Frontend_Exceptions default internal
3656 value.
3657 (Frontend_Exceptions_On_Target): Change default value to True.
3658
36592016-04-18 Ed Schonberg <schonberg@adacore.com>
3660
3661 * sem_ch4.adb (Analyze_Selected_Component): Refine error
3662 detection when a selected component in the body of a synchronized
3663 type is a reference to an object of the same type declared
3664 elsewhere. The construct is legal if the prefix of the selected
3665 component includes an explicit dereference at any point.
3666
070d862d
HK
36672016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3668
3669 * sem_ch3.adb (Analyze_Object_Declaration): Do not consider
3670 internally generated expressions when trying to determine whether
3671 a formal parameter of a tagged type subject to Extensions_Visible
3672 False is used to initialize an object.
3673 * sem_ch4.adb (Analyze_Type_Conversion): Do not consider
3674 internally generated expressions when trying to determine whether
3675 a formal parameter of a tagged type subject to Extensions_Visible
3676 False is used in a type conversion.
3677
933aa0ac
AC
36782016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3679
3680 * sem_res.adb (Is_Protected_Operation_Call):
3681 Add guards to account for a non-decorated selected component.
3682
36832016-04-18 Yannick Moy <moy@adacore.com>
3684
3685 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve
3686 implementation of Body_Has_SPARK_Mode_On.
3687 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_From_Annotation):
3688 New function replacing previous Get_SPARK_Mode_From_Pragma, that
3689 deals also with aspects.
3690 (Get_SPARK_Mode_Type): Make function internal again.
3691 * inline.adb, sem_ch7.adb, sem_util.adb: Use new
3692 Get_SPARK_Mode_From_Annotation.
3693
4179af27
HK
36942016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3695
3696 * contracts.adb (Analyze_Object_Contract): Update references to
3697 SPARK RM.
3698 * freeze.adb (Freeze_Entity): Update references to SPARK RM.
3699 * ghost.adb Add with and use clauses for Sem_Disp.
3700 (Check_Ghost_Derivation): Removed.
3701 (Check_Ghost_Overriding):
3702 Reimplemented. (Check_Ghost_Policy): Update references to SPARK RM.
3703 (Check_Ghost_Primitive): New routine.
3704 (Check_Ghost_Refinement): New routine. (Is_OK_Ghost_Context):
3705 Update references to SPARK RM. (Is_OK_Pragma): Update references
3706 to SPARK RM. Predicates are now a valid context for references
3707 to Ghost entities.
3708 * ghost.ads (Check_Ghost_Derivation): Removed.
3709 (Check_Ghost_Overriding): Update the comment on usage.
3710 (Check_Ghost_Primitive): New routine.
3711 (Check_Ghost_Refinement): New routine.
3712 (Remove_Ignored_Ghost_Code): Update references to SPARK RM.
3713 * sem_ch3.adb (Process_Full_View): Remove the now obsolete check
3714 related to Ghost derivations
3715 * sem_ch6.adb (Check_Conformance): Remove now obsolete check
3716 related to the convention-like behavior of pragma Ghost.
3717 (Check_For_Primitive_Subprogram): Verify that the Ghost policy
3718 of a tagged type and its primitive agree.
3719 * sem_prag.adb (Analyze_Pragma): Update references to SPARK
3720 RM. Move the verification of pragma Assertion_Policy Ghost
3721 to the proper place. Remove the now obsolete check related
3722 to Ghost derivations.
3723 (Collect_Constituent): Add a call to Check_Ghost_Refinement.
3724 * sem_res.adb (Resolve_Actuals): Update references to SPARK RM.
3725
0d6014fa
AC
37262016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3727
3728 * layout.adb: Fix more minor typos in comments.
3729
37302016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3731
3732 * a-calend.ads, sem_prag.adb, sem_ch6.adb: Minor reformatting.
3733
539ca5ec
AC
37342016-04-18 Ed Schonberg <schonberg@adacore.com>
3735
3736 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): In GNATprove
3737 mode, collect inherited class-wide conditions to generate the
3738 corresponding pragmas.
3739 * sem_prag.ads (Build_Pragma_Check_Equivalent): Moved from contracts
3740 * contracts.adb (Collect_Inherited_Class_Wide_Conditions): New
3741 procedure for overriding subprograms, used to generate the pragmas
3742 corresponding to an inherited class- wide pre- or postcondition.
3743 * sem_prag.adb (Build_Pragma_Check_Equivalent): moved here
3744 from contracts.adb (Replace_Condition_Entities): Subsidiary
3745 Build_Pragma_Check_Equivalent, to implement the proper semantics
3746 of inherited class-wide conditions, as given in AI12-0113.
3747 (Process_Class_Wide_Condition): Removed.
3748 (Collect_Inherited_Class_Wide_Conditions): Iterate over pragmas
3749 in contract of subprogram, to collect inherited class-wide
3750 conditions.
3751 (Build_Pragma_Check_Equivalent): Moved to sem_prag.adb
3752
37532016-04-18 Yannick Moy <moy@adacore.com>
3754
3755 * a-calend.adb (Ada.Calendar): Mark package body as SPARK_Mode Off.
3756 * a-calend.ads (Ada.Calendar): Mark package spec as
3757 SPARK_Mode and add synchronous external abstract state Clock_Time.
3758
fd22e260
AC
37592016-04-18 Yannick Moy <moy@adacore.com>
3760
3761 * sem_res.adb (Resolve_Call): Prevent inlining of
3762 calls inside expression functions. Factor previous code issuing
3763 errors to call Cannot_Inline instead, which does appropriate
3764 processing of message for GNATprove.
3765
37662016-04-18 Arnaud Charlet <charlet@adacore.com>
3767
3768 * einfo.ads, sem_ch3.adb, sem_ch8.adb, osint-l.adb, rtsfind.adb,
3769 osint-b.adb: Cleanups.
3770
37712016-04-18 Yannick Moy <moy@adacore.com>
3772
3773 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only create
3774 body to inline in GNATprove mode when SPARK_Mode On applies to
3775 subprogram body.
3776 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_Type): Make function
3777 public.
3778
37792016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3780
3781 * layout.adb: Fix minor typo in comment.
3782 * inline.adb: Fix minor pasto.
3783 * sem_ch12.ads: Fix minor typos in comments.
3784
0d66b596
AC
37852016-04-18 Ed Schonberg <schonberg@adacore.com>
3786
3787 * sem_disp.adb (Check_Dispatching_Call): Major rewriting to
3788 handle some complex cases of tag indeterminate calls that are
3789 actuals in other dispatching calls that are themselves tag
3790 indeterminate.
3791 (Check_Dispatching_Context): Add parameter to support recursive
3792 check for an enclosing construct that may provide a tag for a
3793 tag-indeterminate call.
3794
37952016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3796
3797 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
3798 Add global variables Task_Input_Seen and Task_Output_Seen.
3799 (Analyze_Global_Item): Detect an illegal use of the current
3800 instance of a single protected/task type in a global annotation.
3801 (Analyze_Input_Output): Inputs and output related to the current
3802 instance of a task unit are now tracked.
3803 (Check_Usage): Require
3804 the presence of the current instance of a task unit only when
3805 one input/output is available. (Current_Task_Instance_Seen):
3806 New routine.
3807 (Is_CCT_Instance): New parameter profile. Update
3808 the comment on usage. The routine now properly recognizes several
3809 cases related to single protected/task types.
3810
38112016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3812
3813 * freeze.adb (Freeze_Entity): Use New_Freeze_Node
3814 to create a brand new freeze node. This handles a case where an
3815 ignored Ghost context is freezing something which is not ignored
3816 Ghost and whose freeze node should not be removed from the tree.
3817 (New_Freeze_Node): New routine.
3818
38192016-04-18 Jerome Lambourg <lambourg@adacore.com>
3820
3821 * sigtramp.h (__gnat_set_is_vxsim) New function to
3822 tell sigtramp-vxworks to handle vxsim signal contexts. *
3823 sigtramp-vxworks.c (__gnat_sigtramp) Take into account the
3824 differences in the sigcontext structure between the expected
3825 regular x86 or x86_64 ones and the ones received in case of
3826 exexution on the vxworks simulator.
3827 * init.c: also compute is_vxsim in case of x86_64-vx7 target. Provide
3828 this information to sigtramp-vxworks.c. Remove the old mechanism for
3829 vxsim.
3830 * init-vxsim.c, sigtramp-vxworks-vxsim.c: remove, now obsolete.
3831
38322016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3833
3834 * exp_ch3.adb (Inline_Init_Proc): New function returning
3835 whether the initialization procedure of a type should be
3836 inlined. Return again True for controlled type themselves.
3837 (Build_Array_Init_Proc): Call it to set Set_Is_Inlined on Init_Proc.
3838 (Build_Record_Init_Proc): Likewise.
3839
a86c18d9
AC
38402016-04-18 Arnaud Charlet <charlet@adacore.com>
3841
3842 * gnatvsn.ads (Library_Version): Bump to 7.
3843
88fa9a24
ES
38442016-04-18 Ed Schonberg <schonberg@adacore.com>
3845
3846 * sem_ch6.adb (Analyze_Expression_Function): Set Inlined flag
3847 on the entity of a subprogram declaration that is completed by
3848 an expression function.
3849
38502016-04-18 Ed Schonberg <schonberg@adacore.com>
3851
3852 * sem_util.adb (Is_Current_Instance): A entity given by a subtype
3853 declaration can appear in an aspect specification for a dynamic
3854 predicate, and a pragma for aspect Predicate_Failure.
3855 * exp_util.adb (Replace_Subtype_References): Replace current
3856 occurrences of the subtype to which a dynamic predicate applies,
3857 byt the expression that triggers a predicate check. Needed to
3858 implement new aspect Predicate_Failure.
3859
7b47778e
AC
38602016-04-18 Arnaud Charlet <charlet@adacore.com>
3861
3862 * a-intsig.ads, a-intsig.adb: Removed, no longer used.
3863 * Makefile.rtl: update accordingly.
3864
38652016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3866
3867 * sem_type.adb (Disambiguate): Call Covers only when necessary
3868 for standard operators.
3869
38702016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3871
3872 * atree.ads (Num_Extension_Nodes): Add couple of figures
3873 to comment.
3874 * atree.adb: Add GNAT.Heap_Sort_G dependency.
3875 (Print_Statistics): New exported procedure to print statistics.
3876
38772016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3878
3879 * exp_ch3.adb (Build_Record_Init_Proc): Do not mark the procedure
3880 as to be inlined if the type needs finalization.
3881
84538074
JL
38822016-04-18 Jerome Lambourg <lambourg@adacore.com>
3883
3884 * sigtramp-vxworks-target.inc: sigtramp-vxworks: force the stack
3885 alignment for x86_64.
3886 * init.c: Better fix for guard page reset on x86_64-vx7.
3887 Do not try to retrieve the page that actually raised
3888 the signal as the probing mechanism used on x86_64 do not allow
3889 such retrieval. We thus just test if the guard page is active,
3890 and re-activate it if not.
3891
230ad369
AC
38922016-04-18 Arnaud Charlet <charlet@adacore.com>
3893
3894 * a-sytaco.adb (Suspension_Object): Aspect Default_Initial_Condition
3895 added.
3896
38972016-04-18 Jerome Lambourg <lambourg@adacore.com>
3898
3899 * affinity.c: Use the proper type for task id.
3900 * init.c (__gnat_inum_to_ivec): ivec is a pointer.
3901
d9d25d04
AC
39022016-04-18 Arnaud Charlet <charlet@adacore.com>
3903
3904 * sem_prag.adb (Process_Convention): Relax rule on exporting
3905 Intrinsic types if Relaxed_RM_Semantics is True.
3906
39072016-04-18 Vincent Celier <celier@adacore.com>
3908
3909 * sem_ch3.adb, lib.ads, sinfo.ads, sem_ch10.adb, einfo.adb, einfo.ads,
3910 checks.ads, sem_ch12.adb, sem.adb, sem_util.adb, sem_util.ads,
3911 sem_res.adb, sem_attr.adb, par.adb, exp_ch4.adb, errout.ads,
3912 sem_ch4.adb, atree.adb, atree.ads, sem_warn.adb, treepr.adb,
3913 exp_ch3.ads, exp_unst.adb: Change "descendent" to
3914 "descendant" in comments, error messages and identifiers.
6e9ecd1f 3915 * gcc-interface/decl.c: Ditto.
d9d25d04
AC
3916
39172016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3918
3919 * sem_type.adb (Operator_Matches_Spec): Call First_Formal on
3920 New_S only once at the beginning of the function.
3921
7d9979e6
EB
39222016-04-02 Eric Botcazou <ebotcazou@adacore.com>
3923
3924 * gcc-interface/decl.c (components_to_record): Restrict the previous
3925 change to fields with variable size.
3926
a1799e5e
EB
39272016-03-27 Eric Botcazou <ebotcazou@adacore.com>
3928
7d9979e6 3929 * gcc-interface/decl.c (components_to_record): Add special case for
a1799e5e
EB
3930 single field with representation clause at offset 0.
3931
b462f860
SS
39322016-03-16 Svante Signell <svante.signell@gmail.com>
3933
3934 * gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
3935 * s-osinte-gnu.ads: New file.
3936
3488bd6b
EB
39372016-03-13 Eric Botcazou <ebotcazou@adacore.com>
3938
3939 * system-vxworks-m68k.ads (Stack_Check_Probes): Set to True.
3940 (Stack_Check_Limits): Set to False.
3941 * system-vxworks-mips.ads (Stack_Check_Probes): Set to True.
3942 (Stack_Check_Limits): Set to False.
3943 * system-vxworks-ppc.ads (Stack_Check_Probes): Set to True.
3944 (Stack_Check_Limits): Set to False.
3945 * system-vxworks-sparcv9.ads (Stack_Check_Probes): Set to True.
3946 (Stack_Check_Limits): Set to False.
3947 * system-vxworks-x86.ads (Stack_Check_Probes): Set to True.
3948 (Stack_Check_Limits): Set to False.
3949
4c335163
EB
39502016-03-07 Eric Botcazou <ebotcazou@adacore.com>
3951
3952 * gcc-interface/trans.c (statement_node_p): New predicate.
3953 (gnat_to_gnu): Invoke it to detect statement nodes. In ASIS mode, do
3954 not return dummy results for expressions attached to packed array
3955 implementation types.
3956
1878be32
EB
39572016-03-07 Eric Botcazou <ebotcazou@adacore.com>
3958
3959 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always mark
3960 the expression of a renaming manually in case #3.
3961
22e3fa19
DV
39622016-03-02 Dominik Vogt <vogt@linux.vnet.ibm.com>
3963
3488bd6b 3964 * system-linux-s390.ads: Enable Stack_Check_Probes.
22e3fa19
DV
3965 * system-linux-s390.ads: Likewise.
3966
4232ebbb
ML
39672016-02-29 Martin Liska <mliska@suse.cz>
3968
3969 * gcc-interface/utils.c (set_reverse_storage_order_on_pad_type):
3970 Replace ENABLE_CHECKING macro with flag_checking.
3971
8ea456b9
EB
39722016-02-29 Eric Botcazou <ebotcazou@adacore.com>
3973
3974 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Retrofit
3975 handling of unconstrained array types as designated types into common
3976 processing. Also handle array types as incomplete designated types.
3977
68ec5613
EB
39782016-02-29 Eric Botcazou <ebotcazou@adacore.com>
3979
3980 * gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
3981 ASIS mode, fully lay out the minimal record type.
3982
5d2a63dc
EB
39832016-02-29 Eric Botcazou <ebotcazou@adacore.com>
3984
3985 * gcc-interface/trans.c (finalize_nrv_r): Remove obsolete code.
3986 (build_return_expr): Likewise.
3987 (Call_to_gnu): If this is a function call and there is no target,
3988 create a temporary for the return value for all aggregate types,
3989 but never create it for a return statement. Push a binding level
3990 around the call in more cases. Remove obsolete code.
3991
93e708f9
EB
39922016-02-29 Eric Botcazou <ebotcazou@adacore.com>
3993
3994 * gcc-interface/ada-tree.h (DECL_RETURN_VALUE_P): New macro.
3995 * gcc-interface/gigi.h (gigi): Remove useless attribute.
3996 (gnat_gimplify_expr): Likewise.
3997 (gnat_to_gnu_external): Declare.
3998 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Factor out
3999 code dealing with the expression of external constants into...
4000 Invoke gnat_to_gnu_external instead.
4001 <E_Variable>: Invoke gnat_to_gnu_external to translate renamed objects
4002 when not for a definition. Deal with COMPOUND_EXPR and variables with
4003 DECL_RETURN_VALUE_P set for renamings and with the case of a dangling
4004 'reference to a function call in a renaming. Remove obsolete test and
4005 adjust associated comment.
4006 * gcc-interface/trans.c (Call_to_gnu): Set DECL_RETURN_VALUE_P on the
4007 temporaries created to hold the return value, if any.
4008 (gnat_to_gnu_external): ...this. New function.
4009 * gcc-interface/utils.c (create_var_decl): Detect a constant created
4010 to hold 'reference to function call.
4011 * gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Add folding
4012 for COMPOUND_EXPR in the DECL_RETURN_VALUE_P case.
4013
e2f0522e
EB
40142016-02-17 Eric Botcazou <ebotcazou@adacore.com>
4015
81ec91f3 4016 * exp_ch4.adb (Expand_N_Indexed_Component): Activate synchronization if
e2f0522e
EB
4017 the prefix denotes an entity which Has_Atomic_Components.
4018 * gcc-interface/trans.c (node_is_atomic): Return true if the prefix
4019 denotes an entity which Has_Atomic_Components.
4020
bf17fe3f
EB
40212016-02-17 Eric Botcazou <ebotcazou@adacore.com>
4022
4023 * gcc-interface/utils2.c (gnat_protect_expr): Make a SAVE_EXPR only
4024 for fat pointer or scalar types.
4025
7005800c
EB
40262016-02-16 Eric Botcazou <ebotcazou@adacore.com>
4027
4028 * gcc-interface/gigi.h (maybe_debug_type): New inline function.
4029 * gcc-interface/misc.c (gnat_get_array_descr_info): Use it.
4030 Call maybe_character_value on the array bounds. Get to the base type
4031 of the index type and call maybe_debug_type on it.
4032 * gcc-interface/utils.c (finish_character_type): Add special treatment
4033 for char_type_node.
4034
8c7eac62
EB
40352016-02-16 Eric Botcazou <ebotcazou@adacore.com>
4036
4037 * gcc-interface/misc.c (gnat_enum_underlying_base_type): New function.
4038 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define to above.
4039
9c582551
JJ
40402016-02-12 Jakub Jelinek <jakub@redhat.com>
4041
4042 * prj-tree.ads: Spelling fixes - behaviour -> behavior and
4043 neighbour -> neighbor.
4044 * prep.adb: Likewise.
4045 * prj.ads: Likewise.
4046 * prepcomp.adb: Likewise.
4047 * g-socket.ads: Likewise.
4048 * s-imgrea.adb: Likewise.
4049 * a-calend.adb: Likewise.
4050 * exp_disp.adb: Likewise.
4051 * doc/gnat_ugn/gnat_utility_programs.rst: Likewise.
4052 * g-socket.adb: Likewise.
4053 * sem_ch12.adb: Likewise.
4054 * terminals.c: Likewise.
4055
2746ac67
BS
40562016-02-08 Bernd Schmidt <bschmidt@redhat.com>
4057
4058 * gcc-interface/misc.c (gnat_init): Remove second argument in call to
4059 build_common_tree_nodes.
4060
ffe9a0a7
EB
40612016-02-08 Eric Botcazou <ebotcazou@adacore.com>
4062
4063 * gcc-interface/utils.c (create_var_decl): Set again DECL_COMMON and
4064 DECL_IGNORED_P last.
4065
e0ef6912
EB
40662016-01-28 Eric Botcazou <ebotcazou@adacore.com>
4067
4068 * gcc-interface/gigi.h (enum attr_type): Rename into...
4069 (enum attrib_type): ...this.
4070 (struct attrib): Adjust.
4071 * gcc-interface/decl.c (prepend_one_attribute): Likewise.
4072
825da0d2
EB
40732016-01-20 Eric Botcazou <ebotcazou@adacore.com>
4074
4075 * exp_ch2.adb (Expand_Current_Value): Make an appropriate character
4076 literal if the entity is of a character type.
4077 * gcc-interface/lang.opt (fsigned-char): New option.
4078 * gcc-interface/misc.c (gnat_handle_option): Accept it.
4079 (gnat_init): Adjust comment.
4080 * gcc-interface/gigi.h (finish_character_type): New prototype.
4081 (maybe_character_type): New inline function.
4082 (maybe_character_value): Likewise.
4083 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>: For
4084 a character of CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
4085 Set TYPE_ARTIFICIAL early and call finish_character_type on the type.
4086 <E_Enumeration_Subtype>: For a subtype of character with RM_Size and
4087 Esize equal to CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
4088 Copy TYPE_STRING_FLAG from type to subtype.
4089 <E_Array_Type>: Deal with character index types.
4090 <E_Array_Subtype>: Likewise.
4091 * gcc-interface/trans.c (gigi): Replace unsigned_char_type_node with
4092 char_type_node throughout.
4093 (build_raise_check): Likewise.
4094 (get_type_length): Deal with character types.
4095 (Attribute_to_gnu) <Attr_Pos>: Likewise. Remove obsolete range check
4096 code. Minor tweak.
4097 <Attr_Pred>: Likewise.
4098 (Loop_Statement_to_gnu): Likewise.
4099 (Raise_Error_to_gnu): Likewise.
4100 <N_Indexed_Component>: Deal with character index types. Remove
4101 obsolete code.
4102 <N_Slice>: Likewise.
4103 <N_Type_Conversion>: Deal with character types. Minor tweak.
4104 <N_Unchecked_Type_Conversion>: Likewise.
4105 <N_In>: Likewise.
4106 <N_Op_Eq>: Likewise.
4107 (emit_index_check): Delete.
4108 * gcc-interface/utils.c (finish_character_type): New function.
4109 (gnat_signed_or_unsigned_type_for): Deal with built-in character types.
4110 * gcc-interface/utils2.c (expand_sloc): Replace unsigned_char_type_node
4111 with char_type_node.
4112 (build_call_raise): Likewise.
4113 (build_call_raise_column): Likewise.
4114 (build_call_raise_range): Likewise.
4115
9a1bdc31
EB
41162016-01-18 Eric Botcazou <ebotcazou@adacore.com>
4117
4118 * gcc-interface/gigi.h (build_call_raise_column): Adjust prototype.
4119 (build_call_raise_range): Likewise.
4120 (gnat_unsigned_type): Delete.
4121 (gnat_signed_type): Likewise.
4122 (gnat_signed_or_unsigned_type_for): New prototype.
4123 (gnat_unsigned_type_for): New inline function.
4124 (gnat_signed_type_for): Likewise.
4125 * gcc-interface/cuintp.c (build_cst_from_int): Call build_int_cst.
4126 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
4127 (gnat_to_gnu_entity) <E_Array_Type>: Always translate the index types
4128 and compute their base type from that.
4129 <E_Array_Subtype>: Remove duplicate declaration.
4130 * gcc-interface/misc.c (get_array_bit_stride): Call build_int_cst.
4131 * gcc-interface/trans.c (get_type_length): Likewise.
4132 (Attribute_to_gnu): Likewise.
4133 (Loop_Statement_to_gnu): Likewise.
4134 (Call_to_gnu): Likewise.
4135 (gnat_to_gnu): Call build_real, build_int_cst, gnat_unsigned_type_for
4136 and gnat_signed_type_for. Minor tweaks.
4137 (build_binary_op_trapv): Likewise.
4138 (emit_check): Likewise.
4139 (convert_with_check): Likewise.
4140 (Raise_Error_to_gnu): Adjust calls to the build_call_raise family of
4141 functions. Minor tweaks.
4142 (Case_Statement_to_gnu): Remove dead code.
4143 (gnat_to_gnu): Call gnat_unsigned_type_for and gnat_signed_type_for.
4144 (init_code_table): Minor reordering.
4145 * gcc-interface/utils.c (gnat_unsigned_type): Delete.
4146 (gnat_signed_type): Likewise.
4147 (gnat_signed_or_unsigned_type_for): New function.
4148 (unchecked_convert): Use directly the size in the test for precision
4149 vs size adjustments.
4150 (install_builtin_elementary_types): Call gnat_signed_type_for.
4151 * gcc-interface/utils2.c (nonbinary_modular_operation): Call
4152 build_int_cst.
4153 (build_goto_raise): New function taken from...
4154 (build_call_raise): ...here. Call it.
4155 (build_call_raise_column): Add KIND parameter and call it.
4156 (build_call_raise_range): Likewise.
4157
7c775aca
EB
41582016-01-18 Eric Botcazou <ebotcazou@adacore.com>
4159
4160 * gcc-interface/ada-tree.h (TYPE_IMPLEMENTS_PACKED_ARRAY_P): Rename to
4161 (TYPE_IMPL_PACKED_ARRAY_P): ...this.
4162 (TYPE_CAN_HAVE_DEBUG_TYPE_P): Do not test TYPE_DEBUG_TYPE.
4163 * gcc-interface/decl.c (gnat_to_gnu_entity): Simplify NULL_TREE tests
4164 and tweak gnat_encodings tests throughout.
4165 (initial_value_needs_conversion): Likewise.
4166 (intrin_arglists_compatible_p): Likewise.
4167 * gcc-interface/misc.c (gnat_print_type): Likewise.
4168 (gnat_get_debug_type): Likewise.
4169 (gnat_get_fixed_point_type_info): Likewise.
4170 (gnat_get_array_descr_info): Likewise.
4171 (get_array_bit_stride): Likewise.
4172 (gnat_get_type_bias): Fix formatting.
4173 (enumerate_modes): Likewise.
4174 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
4175 (add_decl_expr): Simplify NULL_TREE test.
4176 (end_stmt_group): Likewise.
4177 (build_binary_op_trapv): Fix formatting.
4178 (get_exception_label): Use switch statement.
4179 (init_code_table): Move around.
4180 * gcc-interface/utils.c (global_bindings_p): Simplify NULL_TREE test.
4181 (gnat_poplevel): Likewise.
4182 (gnat_set_type_context): Likewise.
4183 (defer_or_set_type_context): Fix formatting.
4184 (gnat_pushdecl): Simplify NULL_TREE test.
4185 (maybe_pad_type): Likewise.
4186 (add_parallel_type): Likewise.
4187 (create_range_type): Likewise.
4188 (process_deferred_decl_context): Likewise.
4189 (convert): Likewise.
4190 (def_builtin_1): Likewise.
4191 * gcc-interface/utils2.c (find_common_type): Likewise.
4192 (build_binary_op): Likewise.
4193 (gnat_rewrite_reference): Likewise.
4194 (get_inner_constant_reference): Likewise.
4195
ae5a77fa
EB
41962016-01-18 Eric Botcazou <ebotcazou@adacore.com>
4197
4198 PR ada/69219
4199 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Consider
4200 the parent function instead of the current function in order to issue
4201 the warning or the error. Add guard for ignored functions.
4202
e9dcf0a4
JJ
42032016-01-17 Jakub Jelinek <jakub@redhat.com>
4204
4205 * adaint.c (__gnat_killprocesstree): Avoid -Wparentheses warning.
4206
4c0f272c
JJ
42072016-01-15 Jakub Jelinek <jakub@redhat.com>
4208
4209 * adaint.c (__gnat_locate_exec_on_path): Use const char * instead
4210 of char * for path_val to avoid warnings.
4211
396a2ee2
PMR
42122016-01-06 Pierre-Marie de Rodat <derodat@adacore.com>
4213
4214 * gcc-interface/utils.c: Bump copyright year.
4215 (rest_of_record_type_compilation): Add XVE/XVU parallel types to
4216 the current lexical scope.
4217
21fa2a29
JJ
42182016-01-04 Jakub Jelinek <jakub@redhat.com>
4219
4220 * gnat_ugn.texi: Bump @copying's copyright year.
4221 * gnat_rm.texi: Likewise.
4222
783bfcce 42232016-01-02 Eric Botcazou <ebotcazou@adacore.com>
6260b90c
AC
4224
4225 * gnatvsn.ads: Bump copyright year.
4226
ad41bd84 4227\f
783bfcce 4228Copyright (C) 2016 Free Software Foundation, Inc.
ad41bd84
JM
4229
4230Copying and distribution of this file, with or without modification,
4231are permitted in any medium without royalty provided the copyright
4232notice and this notice are preserved.