a8d4a00a1b6ecf66a52b9671d669d660b163f160
[gcc.git] / gcc / ada / ChangeLog
1 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
2
3 * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
4 sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
5 snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
6 s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
7 Reverted previous change for now.
8
9 2017-01-06 Ed Schonberg <schonberg@adacore.com>
10
11 * exp_ch3.adb (Build_Initialization_Call): Apply predicate
12 check to default discriminant value if checks are enabled.
13 (Build_Assignment): If type of component has static predicate,
14 apply check to its default value, if any.
15
16 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
17
18 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
19 * exp_ch3.adb (Build_Init_Statements): As part of initialising
20 the value record of a task, set its _Secondary_Stack_Size field
21 if present.
22 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
23 a _Secondary_Stack_Size field in the value record of
24 the task if a Secondary_Stack_Size rep item is present.
25 (Make_Task_Create_Call): Include secondary stack size
26 parameter. If No_Secondary_Stack restriction is in place, passes
27 stack size of 0.
28 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
29 Secondary_Stack_Size.
30 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
31 function to define the overhead of the secondary stack.
32 * s-tarest.adb (Create_Restricted_Task,
33 Create_Restricted_Task_Sequential): Functions now include
34 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
35 * s-tarest.adb (Create_Restricted_Task,
36 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
37 now include Secondary_Stack_Size parameter.
38 (Task_Wrapper):
39 Secondary stack now allocated to the size specified by the
40 Secondary_Stack_Size parameter in the task's ATCB.
41 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
42 Secondary_Stack_Size component.
43 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
44 Create_Restricted_Task_Sequential): Function now include
45 Secondary_Stack_Size parameter.
46 (Task_Wrapper): Secondary stack
47 now allocated to the size specified by the Secondary_Stack_Size
48 parameter in the task's ATCB.
49 * sem_ch13.adb (Analyze_Aspect_Specification): Add support
50 for Secondary_Stack_Size aspect, turning the aspect into its
51 corresponding internal attribute.
52 (Analyze_Attribute_Definition):
53 Process Secondary_Stack_Size attribute.
54 * snames.adb-tmpl, snames.ads-tmpl: Added names
55 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
56 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
57
58 2017-01-06 Pascal Obry <obry@adacore.com>
59
60 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
61 Sequential_IO and Direct_IO.
62
63 2017-01-06 Bob Duff <duff@adacore.com>
64
65 * snames.ads-tmpl (Renamed): New name for the pragma argument.
66 * par-ch2.adb: Allow the new pragma (with analysis deferred
67 to Sem_Prag).
68 * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
69 Keep a mapping from new pragma names to old names.
70 * sem_prag.adb: Check legality of pragma Rename_Pragma, and
71 implement it by calling Map_Pragma_Name.
72 * checks.adb, contracts.adb, einfo.adb, errout.adb,
73 * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
74 * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
75 * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
76 * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
77 * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
78 * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
79 as appropriate.
80
81 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
82
83 * exp_ch9.adb: Minor reformatting.
84
85 2017-01-06 Tristan Gingold <gingold@adacore.com>
86
87 * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
88 * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
89 (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
90 (unused).
91 * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
92 Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
93 * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
94 Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
95
96 2017-01-06 Bob Duff <duff@adacore.com>
97
98 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
99 dummy implementation of Map_Pragma_Name.
100
101 2017-01-06 Tristan Gingold <gingold@adacore.com>
102
103 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
104 entry_body variable constant.
105 * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
106 * s-tpoben.ads (Protected_Entry_Body_Access): Now access
107 to constant.
108 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
109 now access to constant.
110
111 2017-01-06 Gary Dismukes <dismukes@adacore.com>
112
113 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
114 reformatting and typo fixes.
115
116 2017-01-06 Bob Duff <duff@adacore.com>
117
118 * snames.ads-tmpl: New names for pragma renaming.
119 * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
120 * par-prag.adb: Add new pragma name to case statement.
121 * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
122 of the pragma.
123 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
124 Dummy implementation of Pragma_Name_Mapped.
125
126 2017-01-06 Ed Schonberg <schonberg@adacore.com>
127
128 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
129 better detect call within an entry_wrapper.
130 * sem_res.adb (Resolve_Call): A protected call within an
131 entity_wrapper is analyzed in the context of the protected
132 object but corresponds to a pre-analysis and is not an access
133 before elaboration.
134 * sem_attr.adb: Minor reformatting.
135
136 2017-01-06 Justin Squirek <squirek@adacore.com>
137
138 * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
139 Finalization_Size to allow a prefix of any non-class-wide type.
140 * sem_attr.ads Modify comment for Finalization_Size to include
141 definite type use case.
142
143 2017-01-06 Ed Schonberg <schonberg@adacore.com>
144
145 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
146 on procedures that are wrappers created for entries that have
147 preconditions.
148 * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
149 body is an entry_wrapper, compile it in the context of the
150 synchronized type, because a precondition may refer to funtions
151 of the type.
152 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
153 body entity.
154 * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
155 within an Entry_Wrapper this is an external call whose target
156 is the synchronized object that is the actual in the call to
157 the wrapper.
158
159 2017-01-06 Yannick Moy <moy@adacore.com>
160
161 * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
162 in tree, which means not analyzing the previous prefix if the node has
163 been rewritten into its prefix.
164
165 2017-01-06 Gary Dismukes <dismukes@adacore.com>
166
167 * s-tpobop.adb: Minor reformatting.
168
169 2017-01-06 Ed Schonberg <schonberg@adacore.com>
170
171 * checks.adb (Ensure_Valid): Do not generate a validity check
172 within a generated predicate function, validity checks will have
173 been applied earlier when required.
174
175 2017-01-06 Tristan Gingold <gingold@adacore.com>
176
177 * s-tpoben.ads (Protection_Entries): Add comment and reorder
178 components for performances.
179 * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
180 semantic.
181
182 2017-01-06 Ed Schonberg <schonberg@adacore.com>
183
184 * sem_eval.adb (Check_Expression_Against_Static_Predicate):
185 If expression is compile-time known and obeys a static predicate
186 it must be labelled as static, to prevent spurious warnings and
187 run-time errors, e.g. in case statements. This is relevant when
188 the expression is the result of constant-folding a type conversion
189 whose expression is a variable with a known static value.
190
191 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
192
193 * exp_attr.adb, sem_attr.ads: Minor reformatting.
194
195 2017-01-06 Justin Squirek <squirek@adacore.com>
196
197 * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
198 expansion of Finalization_Size attribute.
199 * sem_attr.adb (Analyze_Attribute): Add entry to check the
200 semantics of Finalization_Size.
201 (Eval_Attribute): Add null entry for Finalization_Size.
202 * sem_attr.ads: Add Finalization_Size to the implementation
203 dependent attribute list.
204 * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
205
206 2017-01-06 Ed Schonberg <schonberg@adacore.com>
207
208 * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
209 iterator specification with a serious syntactic error, transform
210 construct into an infinite loop in order to continue analysis
211 and prevent a compiler abort.
212
213 2017-01-06 Tristan Gingold <gingold@adacore.com>
214
215 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
216 max_queue_lengths_array if unused.
217
218 2017-01-06 Bob Duff <duff@adacore.com>
219
220 * errout.adb (Set_Msg_Text): Protect against out-of-bounds
221 array access, in case "\" is at the end of Text.
222 * stylesw.adb (Set_Style_Check_Options): Don't include input
223 characters in the error message template, because they could
224 be control characters such as "\", which Errout will try to
225 interpret.
226
227 2017-01-06 Ed Schonberg <schonberg@adacore.com>
228
229 * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
230 For a private type examine the visible declarations that follow
231 the partial view, not just the private declarations that follow
232 the full view.
233
234 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
235
236 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
237 code cleanup.
238
239 2017-01-06 Ed Schonberg <schonberg@adacore.com>
240
241 * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
242 alias of the inherited op is the parent iterator, no need to
243 examine dispatch table positions which might not be established
244 yet if type is not frozen.
245 * sem_disp.adb (Check_Controlling_Formals): The formal of a
246 predicate function may be a subtype of a tagged type.
247 * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
248 of representation items for the completion of a type extension
249 where a predicate applies to the partial view.
250 * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
251 parameter that designates function whose actual receives a
252 predicate check, to improve warning message when the check will
253 lead to infinite recursion.
254 * sem_res.adb (Resolve_Actuals): Pass additional parameter to
255 Apply_Predicate_Check.
256
257 2017-01-06 Tristan Gingold <gingold@adacore.com>
258
259 * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
260 Gnat_Extended_Ravenscar.
261 * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
262
263 2017-01-06 Gary Dismukes <dismukes@adacore.com>
264
265 * sem_util.ads: Minor typo fix and reformatting.
266
267 2017-01-06 Yannick Moy <moy@adacore.com>
268
269 * ghost.adb Minor fixing of references to SPARK RM.
270 (Check_Ghost_Context): Check whether reference is to a lvalue
271 before issuing an error about violation of SPARK RM 6.9(13)
272 when declaration has Ghost policy Check and reference has Ghost
273 policy Ignore.
274 * sem_util.adb Minor indentation.
275 * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
276 Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
277 * sem_util.ads (Unique_Defining_Entity): Document the result
278 for package body stubs.
279
280 2017-01-06 Tristan Gingold <gingold@adacore.com>
281
282 * raise-gcc.c (abort): Macro to call Abort_Propagation.
283 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
284 constant.
285 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
286 Do not generate the Entry_Max_Queue_Lengths_Array if all default
287 values.
288 * exp_util.adb (Corresponding_Runtime_Package): Consider
289 Max_Queue_Length pragma.
290
291 2017-01-06 Justin Squirek <squirek@adacore.com>
292
293 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
294 Remove declaration generation in the case of
295 System_Tasking_Protected_Objects_Single_Entry being used,
296 and add a warning message when this is detected to occur.
297 (Make_Initialize_Protection): Remove reference pass in the case
298 of System_Tasking_Protected_Objects_Single_Entry.
299 * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
300 * s-tposen.adb (Initialize_Protection_Entry): Remove
301 Entry_Queue_Max parameter.
302 * s-tposen.ads: Remove the types use to store the entry queue
303 maximum.
304 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
305
306 2017-01-06 Yannick Moy <moy@adacore.com>
307
308 * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
309 behavior of function, to also accept out of range positions
310 and raise Constraint_Error in such case, and to copy sloc from
311 literal if No_Location passed as location.
312 * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
313 of functions to raise Constraint_Error in case of value not in
314 appropriate range.
315
316 2017-01-06 Tristan Gingold <gingold@adacore.com>
317
318 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
319 Invalidate_Stack_Cache.
320
321 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
322
323 * s-os_lib.adb: Minor fix to the signature of Readlink.
324
325 2017-01-06 Javier Miranda <miranda@adacore.com>
326
327 * sem_ch6.adb (Conforming_Types): Handle another
328 confusion between views in a nested instance with an actual
329 private type whose full view is not in scope.
330
331 2017-01-06 Arnaud Charlet <charlet@adacore.com>
332
333 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
334 mark a rewritten if statement as explicit (Comes_From_Source).
335
336 2017-01-06 Gary Dismukes <dismukes@adacore.com>
337
338 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
339
340 2017-01-06 Tristan Gingold <gingold@adacore.com>
341
342 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
343
344 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
345
346 * sem_case.adb: Minor reformatting.
347
348 2017-01-06 Thomas Quinot <quinot@adacore.com>
349
350 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
351
352 2017-01-06 Justin Squirek <squirek@adacore.com>
353
354 * aspects.adb: Register aspect in Canonical_Aspect.
355 * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
356 into respective tables.
357 * einfo.ads, einfo.adb: Add a new attribute for
358 handling the parameters for Pragma_Max_Entry_Queue
359 (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
360 for accessing and setting were added as well.
361 * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
362 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
363 declaration for pramga arguments and store them in the protected
364 type node.
365 (Make_Initialize_Protection): Pass a reference to
366 the Entry_Max_Queue_Lengths_Array in the protected type node to
367 the runtime.
368 * rtsfind.adb: Minor grammar fix.
369 * rtsfind.ads: Register new types taken from the
370 runtime libraries RE_Protected_Entry_Queue_Max and
371 RE_Protected_Entry_Queue_Max_Array
372 * s-tposen.adb, s-tpoben.adb
373 (Initialize_Protection_Entry/Initialize_Protection_Entries):
374 Add extra parameter and add assignment to local object.
375 * s-tposen.ads, s-tpoben.ads: Add new types to
376 store entry queue maximums and a field to the entry object record.
377 * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
378 for Aspect_Max_Queue_Length.
379 (Check_Aspect_At_Freeze_Point):
380 Add aspect to list of aspects that don't require delayed analysis.
381 * sem_prag.adb (Analyze_Pragma): Add case statement for
382 Pragma_Max_Queue_Length, check semantics, and register arugments
383 in the respective entry nodes.
384 * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
385 and Has_Max_Queue_Length
386 * snames.ads-tmpl: Add constant for the new aspect-name
387 Name_Max_Queue_Length and corrasponding pragma.
388
389 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
390
391 * exp_util.adb (Is_Controlled_Function_Call):
392 Reimplemented. Consider any node which has an entity as the
393 function call may appear in various ways.
394
395 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
396
397 * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
398 an unchecked type conversion when performing a view conversion
399 to/from a private type. In all other cases use a regular type
400 conversion to ensure that any relevant checks are properly
401 installed.
402
403 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
404
405 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
406
407 2017-01-06 Ed Schonberg <schonberg@adacore.com>
408
409 * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
410 error on case expression that is an entity, when coverage is
411 incomplete and entity has a static value obtained by local
412 propagation.
413 (Handle_Static_Predicate): New procedure, subsidiary of
414 Check_Choices, to handle case alternatives that are either
415 subtype names or subtype indications involving subtypes that
416 have static predicates.
417
418 2017-01-06 Thomas Quinot <quinot@adacore.com>
419
420 * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
421 (GNAT.Socket): Add support for Busy_Polling and Generic_Option
422
423 2017-01-06 Bob Duff <duff@adacore.com>
424
425 * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
426 Elaborate_All(P) to P itself. That could happen in obscure cases,
427 and always introduced a cycle (P body must be elaborated before
428 P body).
429 * lib-writ.ads: Comment clarification.
430 * ali-util.ads: Minor comment fix.
431 * ali.adb: Minor reformatting.
432
433 2017-01-06 Tristan Gingold <gingold@adacore.com>
434
435 * a-exexpr-gcc.adb: Improve comment.
436
437 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
438
439 * s-linux-mips.ads: Use correct signal and errno constants.
440 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
441
442 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
443
444 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
445 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
446 sections.
447
448 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
449
450 * gnatvsn.ads: Bump copyright year.
451
452 2017-01-01 Jakub Jelinek <jakub@redhat.com>
453
454 * gnat_ugn.texi: Bump @copying's copyright year.
455 * gnat_rm.texi: Likewise.
456 \f
457 Copyright (C) 2017 Free Software Foundation, Inc.
458
459 Copying and distribution of this file, with or without modification,
460 are permitted in any medium without royalty provided the copyright
461 notice and this notice are preserved.