93e1eeb7f74615b9674de9f51f0ac5eeb1cc7156
[platform/upstream/gcc.git] / gcc / ada / ChangeLog
1 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
2
3         * sem_ch13.adb (Build_Invariant_Procedure):
4         Reimplement the invariant procedure spec and body insertion.
5
6 2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
7
8         * sem_ch13.adb (Add_Invariant): Do not replace
9         the saved expression of an invariatn aspect when inheriting
10         a class-wide type invariant as this clobbers the existing
11         expression. Do not use New_Copy_List as it is unnecessary
12         and leaves the parent pointers referencing the wrong part of
13         the tree. Do not replace the type references for ASIS when
14         inheriting a class-wide type invariant as this clobbers the
15         existing replacement.
16
17 2016-04-20  Ed Schonberg  <schonberg@adacore.com>
18
19         * sem_util.adb (Build_Explicit_Dereference): If the designated
20         expression is an entity name, generate reference to the entity
21         because it will not be resolved again.
22
23 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
24
25         * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
26         gnat_rm.texi: Update documentation.
27
28 2016-04-19  Olivier Hainque  <hainque@adacore.com>
29
30         * par_sco.adb (Traverse_One, case N_Case_Statement):
31         Skip pragmas before the first alternative.
32         (Traverse_Handled_Statement_Sequence, Exception_Handlers): Likewise.
33
34 2016-04-19  Tristan Gingold  <gingold@adacore.com>
35
36         * adaint.c (__gnat_lwp_self): New function (for darwin).
37         * s-osinte-darwin.ads, s-osinte-darwin.adb (lwp_self): Import
38         of __gnat_lwp_self.
39
40 2016-04-19  Olivier Hainque  <hainque@adacore.com>
41
42         * sem_util.adb (Build_Elaboration_Entity): Always request an
43         elab counter when preserving control-flow.
44
45 2016-04-19  Olivier Hainque  <hainque@adacore.com>
46
47         * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set
48         Needs_Debug_Info when producing SCOs.
49         * par_sco.adb (Traverse_Aspects): Fix categorization of
50         Type_Invariant to match actual processing as activated depending
51         on pragma Assertion_Policy.
52         * sem_prag.adb (Analyze_Pragma): Remove special case for
53         Name_Invariant regarding SCO generation, which completely disabled
54         the production of SCOs for Invariant pragmas and aspects.
55
56 2016-04-19  Hristian Kirtchev  <kirtchev@adacore.com>
57
58         * checks.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
59         reformatting.
60
61 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
62
63         * freeze.adb (Freeze_Profile): Refine predicate that checks
64         whether a function that returns a limited view is declared in
65         another unit and cannot be frozen at this point.
66
67 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
68
69         * exp_aggr.adb (Component_Count): Handle properly superflat
70         arrays, i.e. empty arrays where Hi < Lo - 1, to ensure that the
71         return value of the function is Natural, rather than leaving
72         the handling of such arrays to the caller of this function.
73
74 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
75
76         * sem_prag.adb, sem_attr.adb, par-prag.adb, exp_aggr.adb, sem_type.adb
77         sem_ch12.adb, sem_ch3.adb, exp_ch7.adb, exp_ch9.adb: Code cleanup.
78         * sem_res.adb, sem_util.ads, sem_util.adb (Is_OK_Volatile_Context):
79         Promoted from being a nested subprogram in Sem_Res.Resolve_Entity_Name
80         to publicly visible routine in Sem_Util.
81
82 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
83
84         * checks.adb (Apply_Parameter_Aliasing_Checks): Do not apply
85         the check if the type of the actual is By_Reference.
86
87 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
88
89         * sem_res.adb (Within_Subprogram_Call): Detect
90         also nodes that appear in entry calls.
91         (Resolve_Actuals, Insert_Default): Propagate
92         dimension information if any, from default expression to the
93         copy that appears in the list of actuals.
94         * uintp.ads: minor whitespace fix in comment.
95         * sem_prag.adb, stringt.adb, inline.adb, lib-xref-spark_specific.adb:
96         Minor code cleanup.
97         * set_targ.adb (Set_Targ): convert directly from
98         Natural to Pos, without intermediate conversion to Int.
99
100 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
101
102         * sem_ch6.adb (Process_Formals): Mark suspicious reference to
103         SPARK RM in comment.
104         * sem_prag.adb (Analyze_Global_Item): Fix reference to SPARK RM
105         in comment.
106         * sem_res.adb (Property_Error, Resolve_Actuals): Fix reference
107         to SPARK RM in both comment and error message.
108
109 2016-04-19  Eric Botcazou  <ebotcazou@adacore.com>
110
111         * sem_ch6.adb (Possible_Freeze): If the type is an incomplete
112         CW type, then the subprogram must have a delayed freeze. This
113         ensures that the backend can properly recover the full view when
114         elaborating the access subprogram declaration.
115
116 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
117
118         * sem_attr.adb (Resolve_Attribute, case 'Access): Freeze
119         overloadable entity if originally overloaded.
120
121 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
122
123         * exp_aggr.adb, exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_code.adb,
124         exp_fixd.adb, namet.adb, osint.adb, osint.ads, par-ch2.adb,
125         sem_ch10.adb, sem_ch12.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb
126         sem_util.adb, styleg.adb, styleg.ads, stylesw.ads: Minor code
127         clean up.
128
129 2016-04-19  Arnaud Charlet  <charlet@adacore.com>
130
131         * sem_util.adb (Copy_Node_With_Replacement):
132         use Set_Comes_From_Source instead of directly manipulating
133         internals of the node table.
134         * sem_util.adb (Within_Scope): refactored to remove duplicated code.
135         * sem_aux.adb (Get_Rep_Pragma,
136         Subprogram_Body_Entity, Subprogram_Spec): declare variables that
137         do not change as constants and initialize them in the declaration.
138         (Get_Rep_Pragma, Subprogram_Body_Entity, Subprogram_Spec): declare
139         variables that do not change as constants and initialize them
140         in the declaration.
141
142 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
143
144         * sem_res.adb (Resolve_Entry_Call): If the entry has
145         preconditions it is rewritten by means of a wrapper that
146         incorporates the original call. Before rewriting generate a
147         reference to the entry being called to prevent spurious warnings
148         and provide correct cross-reference information.
149
150 2016-04-19  Hristian Kirtchev  <kirtchev@adacore.com>
151
152         * sem_disp.adb (Check_Dispatching_Context): Code cleanup. Add
153         local constant Scop. Ignore any internally generated loops when
154         performing the check concerning an abstract subprogram call
155         without a controlling argument.
156         * sem_util.ads, sem_util.adb (Current_Scope_No_Loops): New routine.
157
158 2016-04-19  Bob Duff  <duff@adacore.com>
159
160         * sem_elab.adb (Check_A_Call): There are cases where we have No
161         (Ent) after the Alias loop, even when there was no previous error,
162         so we can't assert that there was an error.
163
164 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
165
166         * sem_attr.adb (Analyze_Access_Attribute, OK_Self_Reference):
167         Reject use of type name as a prefix to 'access within an aggregate
168         in a context that is not the declarative region of a type.
169
170 2016-04-19  Vincent Celier  <celier@adacore.com>
171
172         * gnatcmd.adb: Make "gnat ls -P" invoke gprls Make "gnat bind
173         -P" invoke "gprbuild -b" Make "gnat link -P" invoke "gprbuild
174         -l" Fail if the invocation is "gnat find -P" or "gnat xref -P"
175         Remove anything related to project files
176         * g-mbdira.adb: minor whitespace cleanup
177         * g-spipat.adb: minor removal of extra spaces after closing paren
178
179 2016-04-19  Ed Schonberg  <schonberg@adacore.com>
180
181         * exp_ch6.adb (Expand_Actuals):  If post-statements are present
182         and the enclosing context is a function call or indexing, build
183         an Expression_With_Actions for the call.
184
185 2016-04-19  Hristian Kirtchev  <kirtchev@adacore.com>
186
187         * lib-writ.adb (Write_With_Lines): Code cleanup. Do not generate
188         a with line for an ignored Ghost unit.
189         * sem_ch7.adb (Analyze_Package_Declaration): Add local constant
190         Par. A child package is Ghost when its parent is Ghost.
191         * sem_prag.adb (Analyze_Pragma): Pragma Ghost can now apply to
192         a subprogram declaration that acts as a compilation unit.
193
194 2016-04-18  Michael Matz  <matz@suse.de>
195
196         * gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN.
197         (gnat_to_gnu_field): Ditto.
198         (components_to_record): Ditto.
199         (create_variant_part_from): Ditto.
200         (copy_and_substitute_in_size): Ditto.
201         (substitute_in_type): Ditto.
202         * gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN.
203         (make_packable_type): Ditto.
204         (maybe_pad_type): Ditto.
205         (finish_fat_pointer_type): Ditto.
206         (finish_record_type): Ditto and use SET_DECL_ALIGN.
207         (rest_of_record_type_compilation): Use SET_TYPE_ALIGN.
208         (create_field_decl): Use SET_DECL_ALIGN.
209
210 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
211
212         * einfo.adb (Overridden_Operation): assert that
213         function is called for valid arguments.
214         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_type.adb,
215         s-osinte-vxworks.ads, a-ngcefu.adb, sem_ch10.adb, einfo.ads,
216         sem_prag.adb, sem_ch12.adb, sem.adb, i-cobol.ads, freeze.adb,
217         sem_util.adb, a-chtgop.ads, s-rannum.adb, exp_ch6.adb, s-bignum.adb,
218         s-osinte-freebsd.ads, par-ch5.adb, a-chtgbo.ads, a-cofove.adb:
219         No space after closing parenthesis except where required for
220         layout.
221         * sem_res.adb: Minor reformatting.
222
223 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
224
225         * exp_ch4.adb (Expand_N_Case_Expression): Convert into a case
226         statement when relevant.
227
228 2016-04-18  Bob Duff  <duff@adacore.com>
229
230         * a-cuprqu.adb (Enqueue): Properly handle the
231         case where the new element has a unique priority.
232
233 2016-04-18  Tristan Gingold  <gingold@adacore.com>
234
235         * adaint.h: Define stat structures and functions for iOS
236         simulator.
237
238 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
239
240         * sem_res.adb (Resolve_Entry_Call): reset
241         Is_Overloaded flag after resolving calls to overloaded protected
242         operations.
243         * exp_spark.adb (Expand_SPARK): call
244         Qualify_Entity_Names for tasking nodes, i.e. protected types,
245         task types and entries.
246         * exp_ch4.adb (Expand_N_If_Expression): Refine previous change
247         in case of an unconstrained type.
248
249 2016-04-18  Yannick Moy  <moy@adacore.com>
250
251         * sem_eval.adb, sem_eval.ads (Check_Non_Static_Context): Add
252         comment to document usage of subprogram in GNATprove.
253
254 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
255
256         * sem_prag.adb (Analyze_Pragma, case Test_Case): Improve error
257         message for wrong placement of aspect Test_Case.
258
259 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
260
261         * einfo.ads: Update the documentation of attribute Renamed_Object.
262         * exp_spark.adb (Expand_Potential_Renaming): Reimplemented.
263
264 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
265
266         * exp_ch4.adb (Optimize_Length_Comparison): Return immediately
267         in the case of AAMP (same as for use of the -gnatd.P switch) to
268         suppress this optimization, which avoids creating a dependence
269         on the 64-bit arithmetic package.
270
271 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
272
273         * exp_ch4.adb: Update comment.
274
275 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
276
277         * exp_ch6.adb (Expand_Call): Make sure instantiations are
278         registered only once as pending here.
279
280 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
281
282         * exp_ch4.adb, gnat1drv.adb, opt.ads, sem_res.adb
283         (Minimize_Expression_With_Actions): New flag.
284         (Adjust_Global_Switches): Set Minimize_Expression_With_Actions
285         when generating C.
286         (Resolve_Short_Circuit): Redo previous change
287         using Minimize_Expression_With_Actions.
288         (Expand_N_If_Expression,
289         Expand_Short_Circuit_Operator): Restore old code to avoid
290         Expression_With_Actions when Minimize_Expression_With_Actions
291         is set.
292
293 2016-04-18  Vincent Celier  <celier@adacore.com>
294
295         * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File and
296         Stderr_File): Close local file descriptors when no longer needed.
297
298 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
299
300         * sem_ch5.adb (Analyze_Iterator_Specification): Remove SPARK
301         mode check that the type of the cursor in an iteration over
302         a formal container is not volatile. The proper check on the
303         element type is done elsewhere.
304
305 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
306
307         * sem_ch6.adb (Process_Formals): Do not set a delay freeze on
308         a subprogram that returns a class-wide type, if the subprogram
309         is a compilation unit, because otherwise gigi will treat the
310         subprogram as external, leading to link errors.
311
312 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
313
314         * sem_res.adb (Resolve_Short_Circuit): Do not use
315         expression-with-actions when generating C.
316
317 2016-04-18  Yannick Moy  <moy@adacore.com>
318
319         * sem_util.adb (Apply_Compile_Time_Constraint_Error): Do not generate
320         raise node in GNATprove mode.
321
322 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
323
324         * s-fileio.adb: Minor reformatting.
325         * sem_prag.adb (Analyze_Input_Item): Add local
326         variable Input_OK. Do not consider mappings of generic formal
327         parameters to actuals.
328
329 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
330
331         * sem_ch5.adb (Get_Cursor_Type): If iterator type is a derived
332         type, the cursor is declared in the scope of the parent type.
333         (Analyze_Parameter_Specification): A qualified expression with an
334         iterator type indicates an iteration over a container (explicit
335         or implicit).
336
337 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
338
339         * osint-c.ads, osint-c.adb (Delete_C_File, Delete_H_File): New.
340         * gnat1drv.adb (Gnat1drv): Delete old C files before regenerating them.
341         * debug.adb: Reserve -gnatd.4 to force generation of C files.
342
343 2016-04-18  Yannick Moy  <moy@adacore.com>
344
345         * sem_eval.adb (Eval_Arithmetic_Op): Do not issue error on static
346         division by zero, instead possibly issue a warning.
347         * sem_res.adb (Resolve_Arithmetic_Op): Do not issue error on
348         static division by zero, instead add check flag on original
349         expression.
350         * sem_util.adb, sem_util.ads (Compile_Time_Constraint_Error):
351         Only issue error when both SPARK_Mode is On and Warn is False.
352
353 2016-04-18  Yannick Moy  <moy@adacore.com>
354
355         * checks.adb (Apply_Scalar_Range_Check): Force
356         warning instead of error when SPARK_Mode is On, on index out of
357         bounds, and set check flag for GNATprove.
358
359 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
360
361         * sem_prag.adb (Check_In_Out_States.Check_Constituent_Usage):
362         Update the comment on usage.  Reimplemented.
363         (Check_Input_States.Check_Constituent_Usage): Update the comment
364         on usage. A Proof_In constituent can now refine an Input state
365         as long as there is at least one Input constituent present.
366
367 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
368
369         * sem_ch6.adb (Check_Inline_Pragma): Use the Sloc of the
370         body id as the sloc of the entity in the generated subprogram
371         declaration, to avoid spurious conformance errors when style
372         checks are enabled.
373
374 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
375
376         * sem_ch4.adb (Analyze_Selected_Component, Has_Dereference):
377         Refine check on illegal calls to entities within a task body,
378         when the entity is declared in an object of the same type. In
379         a generic context there might be no explicit dereference but if
380         the prefix includes an access type the construct is legal.
381
382 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
383
384         * rtsfind.ads, rtsfind.adb (RE_Id, RE_Unit_Table): add
385         RE_Default_Priority.
386
387 2016-04-18  Bob Duff  <duff@adacore.com>
388
389         * sem_prag.adb (Check_Arg_Is_Local_Name): Don't do the check
390         if the pragma came from an aspect specification.
391
392 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
393
394         * gnat1drv.adb, contracts.adb: Minor reformatting and wording fixes.
395
396 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
397
398         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): To suppress
399         superfluous conformance check on an inlined body with a previous
400         spec, use the fact that the generated declaration does not come
401         from source. We must treat the entity as coming from source to
402         enable some back-end inlining when pragma appears after the body.
403
404 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
405
406         * lib-xref-spark_specific.adb, par-ch2.adb, errout.ads,
407         exp_intr.adb: Minor reformatting and typo corrections.
408
409 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
410
411         * sem_ch6.adb: Code cleanup.
412
413 2016-04-18  Thomas Quinot  <quinot@adacore.com>
414
415         * sem_ch13.adb: Minor reformatting and error message tweaking
416         (remove extraneous spaces).
417
418 2016-04-18  Johannes Kanig  <kanig@adacore.com>
419
420         * gnat1drv.adb (Gnat1drv): Force loading of System unit for SPARK.
421
422 2016-04-18  Bob Duff  <duff@adacore.com>
423
424         * s-fileio.adb (Fopen_Mode): If Mode = Out_File, and the file
425         exists, and it's a fifo, we use "w" as the open string instead of
426         "r+". This is necessary to make a write to the fifo block until
427         a reader is ready.
428
429 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
430
431         * sem_attr.adb (Denote_Same_Function): Account
432         for a special case where a primitive of a tagged type inherits
433         a class-wide postcondition from a parent type.
434
435 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
436
437         * par-ch2.adb (P_Expression_Or_Reserved_Word): New routine.
438         (P_Pragma): Signal Scan_Pragma_Argument_Association when the use
439         of reserved words is OK.
440         (Scan_Pragma_Argument_Association):
441         Add new formal Reserved_Words_OK and update the comment on
442         usage. Code cleanup. Parse an expression or a reserved word in
443         identifier form for pragmas Restriction_Warnings and Restrictions
444         No_Use_Of_Attribute.
445         * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
446         Reimplemented.  (Check_Restriction_No_Use_Of_Pragma): Code cleanup.
447         (Set_Restriction_No_Specification_Of_Aspect): Properly set the warning
448         flag for an aspect.
449         (Set_Restriction_No_Use_Of_Attribute): Properly set the warning
450         flag for an attribute.  (Set_Restriction_No_Use_Of_Entity):
451         Update the parameter profile.
452         (Set_Restriction_No_Use_Of_Pragma): Properly set the warning flag for
453         a pragma.
454         * restrict.ads (Check_Restriction_No_Use_Of_Attribute): Update
455         the comment on usage.
456         (Set_Restriction_No_Use_Of_Entity): Update the parameter profile.
457         * sem_attr.adb (Analyze_Attribute): Check restriction
458         No_Use_Of_Attribute.
459         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
460         restriction No_Use_Of_Attribute before any rewritings have
461         taken place.
462         * sem_prag.adb (Analyze_Pragma): Check restriction
463         No_Use_Of_Pragma before any rewritings have taken place.
464
465 2016-04-18  Bob Duff  <duff@adacore.com>
466
467         * sem_ch6.adb (Is_Inline_Pragma): The pragma
468         argument can be a selected component, which has no Chars field,
469         so we need to deal with that case (use the Selector_Name).
470         (Check_Inline_Pragma): We need to test Is_List_Member before
471         calling In_Same_List, because in case of a library unit, they're
472         not in lists, so In_Same_List fails an assertion.
473
474 2016-04-18  Bob Duff  <duff@adacore.com>
475
476         * namet.ads, namet.adb: Add an Append that appends a
477         Bounded_String onto a Bounded_String. Probably a little more
478         efficient than "Append(X, +Y);". Also minor cleanup.
479         (Append_Decoded, Append_Decoded_With_Brackets, Append_Unqualified,
480         Append_Unqualified_Decoded): Make sure these work with non-empty
481         buffers.
482         * casing.ads, casing.adb (Set_Casing): Pass a Bounded_String
483         parameter, defaulting to Global_Name_Buffer.
484         * errout.ads, errout.adb (Adjust_Name_Case): Pass a
485         Bounded_String parameter, no default.
486         * exp_ch11.adb (Expand_N_Raise_Statement): Use local
487         Bounded_String instead of Global_Name_Buffer.
488         * exp_intr.ads, exp_intr.adb (Write_Entity_Name): Rename it
489         to Append_Entity_Name, and pass a Bounded_String parameter,
490         instead of using globals.
491         (Add_Source_Info): Pass a Bounded_String parameter, instead of
492         using globals.
493         (Expand_Source_Info): Use local instead of globals.
494         * stringt.ads, stringt.adb (Append): Add an Append procedure
495         for appending a String_Id onto a Bounded_String.
496         (String_To_Name_Buffer, Add_String_To_Name_Buffer): Rewrite in
497         terms of Append.
498         * sem_prag.adb (Set_Error_Msg_To_Profile_Name): Adjust for new
499         Adjust_Name_Case parameter.
500         * erroutc.adb, uname.adb: Don't pass D => Mixed_Case to
501         Set_Casing; that's the default.
502         * lib-xref-spark_specific.adb (Add_SPARK_Scope): Pretend that calls to
503         protected subprograms are entry calls; otherwise it is not possible to
504         distinguish them from regular subprogram calls.
505
506 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
507
508         * sem_ch13.adb (Has_Good_Profile): Improvement
509         of error message. Now indicates subtype_mark of formal parameter
510         rather than the formal's name, plus minor rewording.
511
512 2016-04-18  Pascal Obry  <obry@adacore.com>
513
514         * adaint.c, adaint.h, s-os_lib.ads: Add new routine Current_Process_Id.
515
516 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
517
518         * stringt.adb, exp_ch6.adb, sem_ch13.adb: Minor reformatting.
519
520 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
521
522         * par-ch4.adb, sem_prag.adb: Minor reformatting.
523
524 2016-04-18  Bob Duff  <duff@adacore.com>
525
526         * sinput.ads, sinput.adb (Build_Location_String): Take a
527         parameter instead of using a global variable.  The function
528         version no longer destroys the Name_Buffer.
529         * stringt.ads, stringt.adb (String_From_Name_Buffer): Take a
530         parameter, which defaults to the Global_Name_Buffer, so some
531         calls can avoid the global.
532         * exp_ch11.adb, exp_intr.adb: Use new interfaces above
533         to avoid using globals. All but one call to Build_Location_String
534         avoids the global. Only one call to String_From_Name_Buffer
535         avoids it.
536
537 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
538
539         * namet.adb, namet.ads, exp_unst.adb: Minor reformatting.
540
541 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
542
543         * sem_eval.adb (Choice_Matches): Check the expression
544         against the predicate values when the choice denotes a
545         subtype with a static predicate.
546         (Eval_Membership_Op): Code cleanup. Remove the suspicious guard which
547         tests for predicates.
548         (Is_OK_Static_Subtype): A subtype with a dynamic predicate
549         is not static.  (Is_Static_Subtype): A subtype with a dynamic
550         predicate is not static.
551         * sem_eval.ads (Is_OK_Static_Subtype): Update the comment on usage.
552         (Is_Static_Subtype): Update the comment on usage.
553
554 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
555
556         * sem_prag.adb (Analyze_Input_Item): Allow
557         generic formals to appear as initialization items.
558
559 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
560
561         * sem_ch13.adb (Analyze_Stream_TSS_Definition,
562         Has_Good_Profile): Additional error message to indicate that
563         the second parameter of the subprogram must be a first subtype.
564
565 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
566
567         * sem_ch6.adb (Analyze_Subprogram_Body_Helper, Is_Inline_Pragma):
568         Use the pragma lookahead that determines whether a subprogram
569         is to be inlined, when some level of backend optimization is
570         required.
571         * sem_ch12.ads, sem_ch12.adb (Add_Pending_Instantiation): Factorize
572         code used to create an instance body when needed for inlining.
573         * exp_ch6.adb (Expand_Call): When a call is to be inlined, and the
574         call appears within an instantiation that is not a compilation
575         unit, add a pending instantiation for the enclosing instance,
576         so the backend can inline in turn the calls contained in the
577         inlined body.
578
579 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
580
581         * sem_prag.adb (Build_Pragma_Check_Equivalent): The mapping
582         that relates operations of the parent type to the operations of
583         the derived type has three distinct sources:
584         a) explicit operations of the derived type carry an
585         Overridden_Operation that designates the operation in the
586         ancestor.
587         b) Implicit operations that are inherited by the derived type
588         carry an alias that may be an explicit subprogram (in which case
589         it may have an Overridden_ Operation indicator) or may also be
590         inherited and carry its own alias.
591         c) If the parent type is an interface, the operation of the
592         derived type does not override, but the interface operation
593         indicates the operation that implements it.
594         * sem_prag.adb: Minor reformatting.
595         * sem_prag.adb (Check_External_Property): Update
596         the comment on usage. Reimplement.
597
598 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
599
600         * exp_ch5.adb (Expand_Assignment_Statement): In restricted
601         profiles such as ZFP, ceiling priority is not available.
602
603 2016-04-18  Bob Duff  <duff@adacore.com>
604
605         * namet-sp.ads: Minor typo fix, ironically in 'Spelling_Checker'.
606
607 2016-04-18  Bob Duff  <duff@adacore.com>
608
609         * sem_elab.adb (Output_Calls): Use
610         Get_Name_String, to clearly indicate that the global Name_Buffer
611         is being used. The previous code used Is_Internal_Name, which
612         returns a Boolean, but also has a side effect of setting the
613         Name_Buffer. Then it called the other Is_Internal_Name, which uses
614         the Name_Buffer for its input. And then it called Error_Msg_N,
615         again using the Name_Buffer. We haven't eliminated the global
616         usage here, but we've made it a bit clearer.
617         This also allows us to have a side-effect-free version of
618         Is_Internal_Name.
619         * namet.ads, namet.adb: Provide a type Bounded_String, along with
620         routines that can be used without using global variables. Provide
621         Global_Name_Buffer so existing code can continue to use the
622         global. Mark the routines that use globals as obsolete.  New code
623         shouldn't call the obsolete ones, and we should clean up existing
624         code from time to time.
625         Name_Find_Str is renamed as Name_Find.
626         * namet.h: Changed as necessary to interface to the new version
627         of Namet.
628         * bindgen.adb, exp_unst.adb: Name_Find_Str is renamed as
629         Name_Find.
630
631 2016-04-18  Yannick Moy  <moy@adacore.com>
632
633         * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization): used
634         outside of GNATprove, hence it should not be removed.
635
636 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
637
638         * sem_prag.adb (Analyze_Refinement_Clause):
639         The refinement of an external abstract state can now mention
640         non-external constituents.
641         (Check_External_Property): Update all SPARK RM references.
642
643 2016-04-18  Bob Duff  <duff@adacore.com>
644
645         * exp_intr.adb: Remove some duplicated code.
646
647 2016-04-18  Yannick Moy  <moy@adacore.com>
648
649         * a-nudira.adb, a-nudira.ads, a-nuflra.adb, a-nuflra.ads: Mark
650         package spec and body out of SPARK.
651
652 2016-04-18  Johannes Kanig  <kanig@adacore.com>
653
654         * spark_xrefs.ads: Minor comment update.
655
656 2016-04-18  Johannes Kanig  <kanig@adacore.com>
657
658         * gnat1drv.adb (Gnat1drv): Force loading of System
659         unit for SPARK.
660
661 2016-04-18  Bob Duff  <duff@adacore.com>
662
663         * a-cuprqu.adb: Correction to previous change. If a new node
664         is inserted at the front of the queue (because it is higher
665         priority than the previous front node), we need to update
666         Header.Next_Unequal -- not just in the case where the queue was
667         previously empty.
668
669 2016-04-18  Bob Duff  <duff@adacore.com>
670
671         * a-cuprqu.ads: Change the representation of List_Type from a
672         singly-linked list to a doubly-linked list. In addition, add a
673         pointer Next_Unequal, which points past a possibly-long chain
674         of equal-priority items. This increases efficiency, especially
675         in the case of many equal-priority items.
676         * a-cuprqu.adb (Dequeue, Enqueue): Rewrite algorithms to take
677         advantage of new data structure.
678         (Finalize): Rewrite in terms of Dequeue, for simplicity.
679
680 2016-04-18  Yannick Moy  <moy@adacore.com>
681
682         * contracts.adb (Analyze_Object_Contract,
683         Analyze_Protected_Contract): Remove tests performed in GNATprove.
684         * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization):
685         Remove query for tests performed in GNATprove.
686
687 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
688
689         * sem_aggr.adb (Resolve_Record_Aggregate): If
690         Warn_On_Redundant_Constructs is enabled, report a redundant box
691         association that does not cover any components, as it done for
692         redundant others associations in case statements.
693
694 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
695
696         * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions):
697         Analyze the generated Check pragma for an inherited condition so
698         that it does not freeze the dispatching type of the primitive
699         operation, because it is pre-analyzed at the point of the
700         subprogram declaration (and not in the subprogram body, as is
701         done during regular expansion).
702
703 2016-04-18  Vincent Celier  <celier@adacore.com>
704
705         * ali.ads: Increase the range of all _Id types to 100 millions.
706
707 2016-04-18  Gary Dismukes  <dismukes@adacore.com>
708
709         * sem_warn.adb (Check_References): Change warning to suggest
710         using pragma Export rather than saying "volatile has no effect".
711
712 2016-04-18  Bob Duff  <duff@adacore.com>
713
714         * g-souinf.ads (Compilation_ISO_Date): New function to return
715         the current date in ISO form.
716         * exp_intr.adb (Expand_Source_Info, Add_Source_Info): Expand
717         a call to Compilation_ISO_Date into a string literal containing
718         the current date in ISO form.
719         * exp_intr.ads (Add_Source_Info): Improve documentation.
720         * sem_intr.adb (Check_Intrinsic_Subprogram): Recognize
721         Compilation_ISO_Date.
722         * snames.ads-tmpl (Name_Compilation_ISO_Date): New Name_Id.
723
724 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
725
726         * layout.adb (Set_Elem_Alignment): Extend setting of alignment
727         to subtypes that are not first subtypes.
728
729 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
730
731         * sem_prag.ads (Collect_Inherited_Class_Wide_Conditions):
732         Simplify interface.
733         * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Insert
734         generated pragmas after subprogram declaration, rather than in
735         the corresponding subprogram body.
736         * sem_ch6.adb (New_Overloaded_Entity): In GNATProve
737         mode, if the operation is overridding, call
738         Collect_Inherited_Class_Wide_Conditions to generate the
739         corresponding pragmas immediately after the corresponding
740         subprogram declaration.
741
742 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
743
744         * spark_xrefs.ads (Xref_Index, Scope_Index, File_Index): restrict
745         type to natural numbers.
746         (Stype): document code characters for concurrent entities.
747
748 2016-04-18  Olivier Hainque  <hainque@adacore.com>
749
750         * targparm.ads: Update the Frontend_Exceptions default internal
751         value.
752         (Frontend_Exceptions_On_Target): Change default value to True.
753
754 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
755
756         * sem_ch4.adb (Analyze_Selected_Component): Refine error
757         detection when a selected component in the body of a synchronized
758         type is a reference to an object of the same type declared
759         elsewhere. The construct is legal if the prefix of the selected
760         component includes an explicit dereference at any point.
761
762 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
763
764         * sem_ch3.adb (Analyze_Object_Declaration): Do not consider
765         internally generated expressions when trying to determine whether
766         a formal parameter of a tagged type subject to Extensions_Visible
767         False is used to initialize an object.
768         * sem_ch4.adb (Analyze_Type_Conversion): Do not consider
769         internally generated expressions when trying to determine whether
770         a formal parameter of a tagged type subject to Extensions_Visible
771         False is used in a type conversion.
772
773 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
774
775         * sem_res.adb (Is_Protected_Operation_Call):
776         Add guards to account for a non-decorated selected component.
777
778 2016-04-18  Yannick Moy  <moy@adacore.com>
779
780         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve
781         implementation of Body_Has_SPARK_Mode_On.
782         * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_From_Annotation):
783         New function replacing previous Get_SPARK_Mode_From_Pragma, that
784         deals also with aspects.
785         (Get_SPARK_Mode_Type): Make function internal again.
786         * inline.adb, sem_ch7.adb, sem_util.adb: Use new
787         Get_SPARK_Mode_From_Annotation.
788
789 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
790
791         * contracts.adb (Analyze_Object_Contract): Update references to
792         SPARK RM.
793         * freeze.adb (Freeze_Entity): Update references to SPARK RM.
794         * ghost.adb Add with and use clauses for Sem_Disp.
795         (Check_Ghost_Derivation): Removed.
796         (Check_Ghost_Overriding):
797         Reimplemented.  (Check_Ghost_Policy): Update references to SPARK RM.
798         (Check_Ghost_Primitive): New routine.
799         (Check_Ghost_Refinement): New routine.  (Is_OK_Ghost_Context):
800         Update references to SPARK RM.  (Is_OK_Pragma): Update references
801         to SPARK RM. Predicates are now a valid context for references
802         to Ghost entities.
803         * ghost.ads (Check_Ghost_Derivation): Removed.
804         (Check_Ghost_Overriding): Update the comment on usage.
805         (Check_Ghost_Primitive): New routine.
806         (Check_Ghost_Refinement): New routine.
807         (Remove_Ignored_Ghost_Code): Update references to SPARK RM.
808         * sem_ch3.adb (Process_Full_View): Remove the now obsolete check
809         related to Ghost derivations
810         * sem_ch6.adb (Check_Conformance): Remove now obsolete check
811         related to the convention-like behavior of pragma Ghost.
812         (Check_For_Primitive_Subprogram): Verify that the Ghost policy
813         of a tagged type and its primitive agree.
814         * sem_prag.adb (Analyze_Pragma): Update references to SPARK
815         RM. Move the verification of pragma Assertion_Policy Ghost
816         to the proper place. Remove the now obsolete check related
817         to Ghost derivations.
818         (Collect_Constituent): Add a call to Check_Ghost_Refinement.
819         * sem_res.adb (Resolve_Actuals): Update references to SPARK RM.
820
821 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
822
823         * layout.adb: Fix more minor typos in comments.
824
825 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
826
827         * a-calend.ads, sem_prag.adb, sem_ch6.adb: Minor reformatting.
828
829 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
830
831         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): In GNATprove
832         mode, collect inherited class-wide conditions to generate the
833         corresponding pragmas.
834         * sem_prag.ads (Build_Pragma_Check_Equivalent): Moved from contracts
835         * contracts.adb (Collect_Inherited_Class_Wide_Conditions): New
836         procedure for overriding subprograms, used to generate the pragmas
837         corresponding to an inherited class- wide pre- or postcondition.
838         * sem_prag.adb (Build_Pragma_Check_Equivalent): moved here
839         from contracts.adb (Replace_Condition_Entities): Subsidiary
840         Build_Pragma_Check_Equivalent, to implement the proper semantics
841         of inherited class-wide conditions, as given in AI12-0113.
842         (Process_Class_Wide_Condition): Removed.
843         (Collect_Inherited_Class_Wide_Conditions): Iterate over pragmas
844         in contract of subprogram, to collect inherited class-wide
845         conditions.
846         (Build_Pragma_Check_Equivalent): Moved to sem_prag.adb
847
848 2016-04-18  Yannick Moy  <moy@adacore.com>
849
850         * a-calend.adb (Ada.Calendar): Mark package body as SPARK_Mode Off.
851         * a-calend.ads (Ada.Calendar): Mark package spec as
852         SPARK_Mode and add synchronous external abstract state Clock_Time.
853
854 2016-04-18  Yannick Moy  <moy@adacore.com>
855
856         * sem_res.adb (Resolve_Call): Prevent inlining of
857         calls inside expression functions.  Factor previous code issuing
858         errors to call Cannot_Inline instead, which does appropriate
859         processing of message for GNATprove.
860
861 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
862
863         * einfo.ads, sem_ch3.adb, sem_ch8.adb, osint-l.adb, rtsfind.adb,
864         osint-b.adb: Cleanups.
865
866 2016-04-18  Yannick Moy  <moy@adacore.com>
867
868         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only create
869         body to inline in GNATprove mode when SPARK_Mode On applies to
870         subprogram body.
871         * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_Type): Make function
872         public.
873
874 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
875
876         * layout.adb: Fix minor typo in comment.
877         * inline.adb: Fix minor pasto.
878         * sem_ch12.ads: Fix minor typos in comments.
879
880 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
881
882         * sem_disp.adb (Check_Dispatching_Call): Major rewriting to
883         handle some complex cases of tag indeterminate calls that are
884         actuals in other dispatching calls that are themselves tag
885         indeterminate.
886         (Check_Dispatching_Context): Add parameter to support recursive
887         check for an enclosing construct that may provide a tag for a
888         tag-indeterminate call.
889
890 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
891
892         * sem_prag.adb (Analyze_Depends_In_Decl_Part):
893         Add global variables Task_Input_Seen and Task_Output_Seen.
894         (Analyze_Global_Item): Detect an illegal use of the current
895         instance of a single protected/task type in a global annotation.
896         (Analyze_Input_Output): Inputs and output related to the current
897         instance of a task unit are now tracked.
898         (Check_Usage): Require
899         the presence of the current instance of a task unit only when
900         one input/output is available.  (Current_Task_Instance_Seen):
901         New routine.
902         (Is_CCT_Instance): New parameter profile. Update
903         the comment on usage. The routine now properly recognizes several
904         cases related to single protected/task types.
905
906 2016-04-18  Hristian Kirtchev  <kirtchev@adacore.com>
907
908         * freeze.adb (Freeze_Entity): Use New_Freeze_Node
909         to create a brand new freeze node. This handles a case where an
910         ignored Ghost context is freezing something which is not ignored
911         Ghost and whose freeze node should not be removed from the tree.
912         (New_Freeze_Node): New routine.
913
914 2016-04-18  Jerome Lambourg  <lambourg@adacore.com>
915
916         * sigtramp.h (__gnat_set_is_vxsim) New function to
917         tell sigtramp-vxworks to handle vxsim signal contexts.  *
918         sigtramp-vxworks.c (__gnat_sigtramp) Take into account the
919         differences in the sigcontext structure between the expected
920         regular x86 or x86_64 ones and the ones received in case of
921         exexution on the vxworks simulator.
922         * init.c: also compute is_vxsim in case of x86_64-vx7 target. Provide
923         this information to sigtramp-vxworks.c. Remove the old mechanism for
924         vxsim.
925         * init-vxsim.c, sigtramp-vxworks-vxsim.c: remove, now obsolete.
926
927 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
928
929         * exp_ch3.adb (Inline_Init_Proc): New function returning
930         whether the initialization procedure of a type should be
931         inlined.  Return again True for controlled type themselves.
932         (Build_Array_Init_Proc): Call it to set Set_Is_Inlined on Init_Proc.
933         (Build_Record_Init_Proc): Likewise.
934
935 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
936
937         * gnatvsn.ads (Library_Version): Bump to 7.
938
939 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
940
941         * sem_ch6.adb (Analyze_Expression_Function): Set Inlined flag
942         on the entity of a subprogram declaration that is completed by
943         an expression function.
944
945 2016-04-18  Ed Schonberg  <schonberg@adacore.com>
946
947         * sem_util.adb (Is_Current_Instance): A entity given by a subtype
948         declaration can appear in an aspect specification for a dynamic
949         predicate, and a pragma for aspect Predicate_Failure.
950         * exp_util.adb (Replace_Subtype_References): Replace current
951         occurrences of the subtype to which a dynamic predicate applies,
952         byt the expression that triggers a predicate check. Needed to
953         implement new aspect Predicate_Failure.
954
955 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
956
957         * a-intsig.ads, a-intsig.adb: Removed, no longer used.
958         * Makefile.rtl: update accordingly.
959
960 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
961
962         * sem_type.adb (Disambiguate): Call Covers only when necessary
963         for standard operators.
964
965 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
966
967         * atree.ads (Num_Extension_Nodes): Add couple of figures
968         to comment.
969         * atree.adb: Add GNAT.Heap_Sort_G dependency.
970         (Print_Statistics): New exported procedure to print statistics.
971
972 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
973
974         * exp_ch3.adb (Build_Record_Init_Proc): Do not mark the procedure
975         as to be inlined if the type needs finalization.
976
977 2016-04-18  Jerome Lambourg  <lambourg@adacore.com>
978
979         * sigtramp-vxworks-target.inc: sigtramp-vxworks: force the stack
980         alignment for x86_64.
981         * init.c: Better fix for guard page reset on x86_64-vx7.
982         Do not try to retrieve the page that actually raised
983         the signal as the probing mechanism used on x86_64 do not allow
984         such retrieval. We thus just test if the guard page is active,
985         and re-activate it if not.
986
987 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
988
989         * a-sytaco.adb (Suspension_Object): Aspect Default_Initial_Condition
990         added.
991
992 2016-04-18  Jerome Lambourg  <lambourg@adacore.com>
993
994         * affinity.c: Use the proper type for task id.
995         * init.c (__gnat_inum_to_ivec): ivec is a pointer.
996
997 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
998
999         * sem_prag.adb (Process_Convention): Relax rule on exporting
1000         Intrinsic types if Relaxed_RM_Semantics is True.
1001
1002 2016-04-18  Vincent Celier  <celier@adacore.com>
1003
1004         * sem_ch3.adb, lib.ads, sinfo.ads, sem_ch10.adb, einfo.adb, einfo.ads,
1005         checks.ads, sem_ch12.adb, sem.adb, sem_util.adb, sem_util.ads,
1006         sem_res.adb, sem_attr.adb, par.adb, exp_ch4.adb, errout.ads,
1007         sem_ch4.adb, atree.adb, atree.ads, sem_warn.adb, treepr.adb,
1008         exp_ch3.ads, exp_unst.adb: Change "descendent" to
1009         "descendant" in comments, error messages and identifiers.
1010         * gcc-interface/decl.c: Ditto.
1011
1012 2016-04-18  Eric Botcazou  <ebotcazou@adacore.com>
1013
1014         * sem_type.adb (Operator_Matches_Spec): Call First_Formal on
1015         New_S only once at the beginning of the function.
1016
1017 2016-04-02  Eric Botcazou  <ebotcazou@adacore.com>
1018
1019         * gcc-interface/decl.c (components_to_record): Restrict the previous
1020         change to fields with variable size.
1021
1022 2016-03-27  Eric Botcazou  <ebotcazou@adacore.com>
1023
1024         * gcc-interface/decl.c (components_to_record): Add special case for
1025         single field with representation clause at offset 0.
1026
1027 2016-03-16  Svante Signell  <svante.signell@gmail.com>
1028
1029         * gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
1030         * s-osinte-gnu.ads: New file.
1031
1032 2016-03-13  Eric Botcazou  <ebotcazou@adacore.com>
1033
1034         * system-vxworks-m68k.ads (Stack_Check_Probes): Set to True.
1035         (Stack_Check_Limits): Set to False.
1036         * system-vxworks-mips.ads (Stack_Check_Probes): Set to True.
1037         (Stack_Check_Limits): Set to False.
1038         * system-vxworks-ppc.ads (Stack_Check_Probes): Set to True.
1039         (Stack_Check_Limits): Set to False.
1040         * system-vxworks-sparcv9.ads (Stack_Check_Probes): Set to True.
1041         (Stack_Check_Limits): Set to False.
1042         * system-vxworks-x86.ads (Stack_Check_Probes): Set to True.
1043         (Stack_Check_Limits): Set to False.
1044
1045 2016-03-07  Eric Botcazou  <ebotcazou@adacore.com>
1046
1047         * gcc-interface/trans.c (statement_node_p): New predicate.
1048         (gnat_to_gnu): Invoke it to detect statement nodes.  In ASIS mode, do
1049         not return dummy results for expressions attached to packed array
1050         implementation types.
1051
1052 2016-03-07  Eric Botcazou  <ebotcazou@adacore.com>
1053
1054         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always mark
1055         the expression of a renaming manually in case #3.
1056
1057 2016-03-02  Dominik Vogt  <vogt@linux.vnet.ibm.com>
1058
1059         * system-linux-s390.ads: Enable Stack_Check_Probes.
1060         * system-linux-s390.ads: Likewise.
1061
1062 2016-02-29  Martin Liska  <mliska@suse.cz>
1063
1064         * gcc-interface/utils.c (set_reverse_storage_order_on_pad_type):
1065         Replace ENABLE_CHECKING macro with flag_checking.
1066
1067 2016-02-29  Eric Botcazou  <ebotcazou@adacore.com>
1068
1069         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Retrofit
1070         handling of unconstrained array types as designated types into common
1071         processing.  Also handle array types as incomplete designated types.
1072
1073 2016-02-29  Eric Botcazou  <ebotcazou@adacore.com>
1074
1075         * gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
1076         ASIS mode, fully lay out the minimal record type.
1077
1078 2016-02-29  Eric Botcazou  <ebotcazou@adacore.com>
1079
1080         * gcc-interface/trans.c (finalize_nrv_r): Remove obsolete code.
1081         (build_return_expr): Likewise.
1082         (Call_to_gnu): If this is a function call and there is no target,
1083         create a temporary for the return value for all aggregate types,
1084         but never create it for a return statement.  Push a binding level
1085         around the call in more cases.  Remove obsolete code.
1086
1087 2016-02-29  Eric Botcazou  <ebotcazou@adacore.com>
1088
1089         * gcc-interface/ada-tree.h (DECL_RETURN_VALUE_P): New macro.
1090         * gcc-interface/gigi.h (gigi): Remove useless attribute.
1091         (gnat_gimplify_expr): Likewise.
1092         (gnat_to_gnu_external): Declare.
1093         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Factor out
1094         code dealing with the expression of external constants into...
1095         Invoke gnat_to_gnu_external instead.
1096         <E_Variable>: Invoke gnat_to_gnu_external to translate renamed objects
1097         when not for a definition.  Deal with COMPOUND_EXPR and variables with
1098         DECL_RETURN_VALUE_P set for renamings and with the case of a dangling
1099         'reference to a function call in a renaming.  Remove obsolete test and
1100         adjust associated comment.
1101         * gcc-interface/trans.c (Call_to_gnu): Set DECL_RETURN_VALUE_P on the
1102         temporaries created to hold the return value, if any.
1103         (gnat_to_gnu_external): ...this.  New function.
1104         * gcc-interface/utils.c (create_var_decl): Detect a constant created
1105         to hold 'reference to function call.
1106         * gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Add folding
1107         for COMPOUND_EXPR in the DECL_RETURN_VALUE_P case.
1108
1109 2016-02-17  Eric Botcazou  <ebotcazou@adacore.com>
1110
1111         * exp_ch4.adb (Expand_N_Indexed_Component): Activate synchronization if
1112         the prefix denotes an entity which Has_Atomic_Components.
1113         * gcc-interface/trans.c (node_is_atomic): Return true if the prefix
1114         denotes an entity which Has_Atomic_Components.
1115
1116 2016-02-17  Eric Botcazou  <ebotcazou@adacore.com>
1117
1118         * gcc-interface/utils2.c (gnat_protect_expr): Make a SAVE_EXPR only
1119         for fat pointer or scalar types.
1120
1121 2016-02-16  Eric Botcazou  <ebotcazou@adacore.com>
1122
1123         * gcc-interface/gigi.h (maybe_debug_type): New inline function.
1124         * gcc-interface/misc.c (gnat_get_array_descr_info): Use it.
1125         Call maybe_character_value on the array bounds.  Get to the base type
1126         of the index type and call maybe_debug_type on it.
1127         * gcc-interface/utils.c (finish_character_type): Add special treatment
1128         for char_type_node.
1129
1130 2016-02-16  Eric Botcazou  <ebotcazou@adacore.com>
1131
1132         * gcc-interface/misc.c (gnat_enum_underlying_base_type): New function.
1133         (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define to above.
1134
1135 2016-02-12  Jakub Jelinek  <jakub@redhat.com>
1136
1137         * prj-tree.ads: Spelling fixes - behaviour -> behavior and
1138         neighbour -> neighbor.
1139         * prep.adb: Likewise.
1140         * prj.ads: Likewise.
1141         * prepcomp.adb: Likewise.
1142         * g-socket.ads: Likewise.
1143         * s-imgrea.adb: Likewise.
1144         * a-calend.adb: Likewise.
1145         * exp_disp.adb: Likewise.
1146         * doc/gnat_ugn/gnat_utility_programs.rst: Likewise.
1147         * g-socket.adb: Likewise.
1148         * sem_ch12.adb: Likewise.
1149         * terminals.c: Likewise.
1150
1151 2016-02-08  Bernd Schmidt  <bschmidt@redhat.com>
1152
1153         * gcc-interface/misc.c (gnat_init): Remove second argument in call to
1154         build_common_tree_nodes.
1155
1156 2016-02-08  Eric Botcazou  <ebotcazou@adacore.com>
1157
1158         * gcc-interface/utils.c (create_var_decl): Set again DECL_COMMON and
1159         DECL_IGNORED_P last.
1160
1161 2016-01-28  Eric Botcazou  <ebotcazou@adacore.com>
1162
1163         * gcc-interface/gigi.h (enum attr_type): Rename into...
1164         (enum attrib_type): ...this.
1165         (struct attrib): Adjust.
1166         * gcc-interface/decl.c (prepend_one_attribute): Likewise.
1167
1168 2016-01-20  Eric Botcazou  <ebotcazou@adacore.com>
1169
1170         * exp_ch2.adb (Expand_Current_Value): Make an appropriate character
1171         literal if the entity is of a character type.
1172         * gcc-interface/lang.opt (fsigned-char): New option.
1173         * gcc-interface/misc.c (gnat_handle_option): Accept it.
1174         (gnat_init): Adjust comment.
1175         * gcc-interface/gigi.h (finish_character_type): New prototype.
1176         (maybe_character_type): New inline function.
1177         (maybe_character_value): Likewise.
1178         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>: For
1179         a character of CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
1180         Set TYPE_ARTIFICIAL early and call finish_character_type on the type.
1181         <E_Enumeration_Subtype>: For a subtype of character with RM_Size and
1182         Esize equal to CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
1183         Copy TYPE_STRING_FLAG from type to subtype.
1184         <E_Array_Type>: Deal with character index types.
1185         <E_Array_Subtype>: Likewise.
1186         * gcc-interface/trans.c (gigi): Replace unsigned_char_type_node with
1187         char_type_node throughout.
1188         (build_raise_check): Likewise.
1189         (get_type_length): Deal with character types.
1190         (Attribute_to_gnu) <Attr_Pos>: Likewise.  Remove obsolete range check
1191         code.  Minor tweak.
1192         <Attr_Pred>: Likewise.
1193         (Loop_Statement_to_gnu): Likewise.
1194         (Raise_Error_to_gnu): Likewise.
1195         <N_Indexed_Component>: Deal with character index types.  Remove
1196         obsolete code.
1197         <N_Slice>: Likewise.
1198         <N_Type_Conversion>: Deal with character types.  Minor tweak.
1199         <N_Unchecked_Type_Conversion>: Likewise.
1200         <N_In>: Likewise.
1201         <N_Op_Eq>: Likewise.
1202         (emit_index_check): Delete.
1203         * gcc-interface/utils.c (finish_character_type): New function.
1204         (gnat_signed_or_unsigned_type_for): Deal with built-in character types.
1205         * gcc-interface/utils2.c (expand_sloc): Replace unsigned_char_type_node
1206         with char_type_node.
1207         (build_call_raise): Likewise.
1208         (build_call_raise_column): Likewise.
1209         (build_call_raise_range): Likewise.
1210
1211 2016-01-18  Eric Botcazou  <ebotcazou@adacore.com>
1212
1213         * gcc-interface/gigi.h (build_call_raise_column): Adjust prototype.
1214         (build_call_raise_range): Likewise.
1215         (gnat_unsigned_type): Delete.
1216         (gnat_signed_type): Likewise.
1217         (gnat_signed_or_unsigned_type_for): New prototype.
1218         (gnat_unsigned_type_for): New inline function.
1219         (gnat_signed_type_for): Likewise.
1220         * gcc-interface/cuintp.c (build_cst_from_int): Call build_int_cst.
1221         * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
1222         (gnat_to_gnu_entity) <E_Array_Type>: Always translate the index types
1223         and compute their base type from that.
1224         <E_Array_Subtype>: Remove duplicate declaration.
1225         * gcc-interface/misc.c (get_array_bit_stride): Call build_int_cst.
1226         * gcc-interface/trans.c (get_type_length): Likewise.
1227         (Attribute_to_gnu): Likewise.
1228         (Loop_Statement_to_gnu): Likewise.
1229         (Call_to_gnu): Likewise.
1230         (gnat_to_gnu): Call build_real, build_int_cst, gnat_unsigned_type_for
1231         and gnat_signed_type_for.  Minor tweaks.
1232         (build_binary_op_trapv): Likewise.
1233         (emit_check): Likewise.
1234         (convert_with_check): Likewise.
1235         (Raise_Error_to_gnu): Adjust calls to the build_call_raise family of
1236         functions.  Minor tweaks.
1237         (Case_Statement_to_gnu): Remove dead code.
1238         (gnat_to_gnu): Call gnat_unsigned_type_for and gnat_signed_type_for.
1239         (init_code_table): Minor reordering.
1240         * gcc-interface/utils.c (gnat_unsigned_type): Delete.
1241         (gnat_signed_type): Likewise.
1242         (gnat_signed_or_unsigned_type_for): New function.
1243         (unchecked_convert): Use directly the size in the test for precision
1244         vs size adjustments.
1245         (install_builtin_elementary_types): Call gnat_signed_type_for.
1246         * gcc-interface/utils2.c (nonbinary_modular_operation): Call
1247         build_int_cst.
1248         (build_goto_raise): New function taken from...
1249         (build_call_raise): ...here.  Call it.
1250         (build_call_raise_column): Add KIND parameter and call it.
1251         (build_call_raise_range): Likewise.
1252
1253 2016-01-18  Eric Botcazou  <ebotcazou@adacore.com>
1254
1255         * gcc-interface/ada-tree.h (TYPE_IMPLEMENTS_PACKED_ARRAY_P): Rename to
1256         (TYPE_IMPL_PACKED_ARRAY_P): ...this.
1257         (TYPE_CAN_HAVE_DEBUG_TYPE_P): Do not test TYPE_DEBUG_TYPE.
1258         * gcc-interface/decl.c (gnat_to_gnu_entity): Simplify NULL_TREE tests
1259         and tweak gnat_encodings tests throughout.
1260         (initial_value_needs_conversion): Likewise.
1261         (intrin_arglists_compatible_p): Likewise.
1262         * gcc-interface/misc.c (gnat_print_type): Likewise.
1263         (gnat_get_debug_type): Likewise.
1264         (gnat_get_fixed_point_type_info): Likewise.
1265         (gnat_get_array_descr_info): Likewise.
1266         (get_array_bit_stride): Likewise.
1267         (gnat_get_type_bias): Fix formatting.
1268         (enumerate_modes): Likewise.
1269         * gcc-interface/trans.c (gnat_to_gnu): Likewise.
1270         (add_decl_expr): Simplify NULL_TREE test.
1271         (end_stmt_group): Likewise.
1272         (build_binary_op_trapv): Fix formatting.
1273         (get_exception_label): Use switch statement.
1274         (init_code_table): Move around.
1275         * gcc-interface/utils.c (global_bindings_p): Simplify NULL_TREE test.
1276         (gnat_poplevel): Likewise.
1277         (gnat_set_type_context): Likewise.
1278         (defer_or_set_type_context): Fix formatting.
1279         (gnat_pushdecl): Simplify NULL_TREE test.
1280         (maybe_pad_type): Likewise.
1281         (add_parallel_type): Likewise.
1282         (create_range_type): Likewise.
1283         (process_deferred_decl_context): Likewise.
1284         (convert): Likewise.
1285         (def_builtin_1): Likewise.
1286         * gcc-interface/utils2.c (find_common_type): Likewise.
1287         (build_binary_op): Likewise.
1288         (gnat_rewrite_reference): Likewise.
1289         (get_inner_constant_reference): Likewise.
1290
1291 2016-01-18  Eric Botcazou  <ebotcazou@adacore.com>
1292
1293         PR ada/69219
1294         * gcc-interface/trans.c (check_inlining_for_nested_subprog): Consider
1295         the parent function instead of the current function in order to issue
1296         the warning or the error.  Add guard for ignored functions.
1297
1298 2016-01-17  Jakub Jelinek  <jakub@redhat.com>
1299
1300         * adaint.c (__gnat_killprocesstree): Avoid -Wparentheses warning.
1301
1302 2016-01-15  Jakub Jelinek  <jakub@redhat.com>
1303
1304         * adaint.c (__gnat_locate_exec_on_path): Use const char * instead
1305         of char * for path_val to avoid warnings.
1306
1307 2016-01-06  Pierre-Marie de Rodat  <derodat@adacore.com>
1308
1309         * gcc-interface/utils.c: Bump copyright year.
1310         (rest_of_record_type_compilation): Add XVE/XVU parallel types to
1311         the current lexical scope.
1312
1313 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
1314
1315         * gnat_ugn.texi: Bump @copying's copyright year.
1316         * gnat_rm.texi: Likewise.
1317
1318 2016-01-02  Eric Botcazou  <ebotcazou@adacore.com>
1319
1320         * gnatvsn.ads: Bump copyright year.
1321
1322 \f
1323 Copyright (C) 2016 Free Software Foundation, Inc.
1324
1325 Copying and distribution of this file, with or without modification,
1326 are permitted in any medium without royalty provided the copyright
1327 notice and this notice are preserved.