1 2016-10-12 Hristian Kirtchev <kirtchev@adacore.com>
3 * exp_ch5.adb, sem_ch3.adb, exp_ch9.adb, a-tags.adb, sem_prag.adb,
4 sem_ch12.adb, xref_lib.adb, a-strunb-shared.adb, rtsfind.adb,
5 freeze.adb, sem_attr.adb, sem_case.adb, exp_ch4.adb, ghost.adb,
6 exp_ch6.adb, sem_ch4.adb, restrict.adb, s-os_lib.adb: Minor
9 2016-10-12 Justin Squirek <squirek@adacore.com>
11 * sem_ch10.adb (Remove_Limited_With_Clause): Add a check to
12 detect accidental visibility.
14 2016-10-12 Ed Schonberg <schonberg@adacore.com>
16 * exp_ch4.adb (Expand_Allocator): If the expression is a qualified
17 expression, add a predicate check after the constraint check.
18 * sem_res.adb (Resolve_Qualified_Expression): If context is an
19 allocator, do not apply predicate check, as it will be done when
20 allocator is expanded.
22 2016-10-12 Bob Duff <duff@adacore.com>
24 * xref_lib.adb: Use renamings-of-slices to ensure
25 that all references to Tables are properly bounds checked (when
26 checks are turned on).
27 * g-dyntab.ads, g-dyntab.adb: Default-initialize the array
28 components, so we don't get uninitialized pointers in case
29 of Tables containing access types. Misc cleanup of the code
32 2016-10-12 Ed Schonberg <schonberg@adacore.com>
34 * sem_attr.adb (Analyze_Attribute, case 'Type_Key): Implement
35 functionality of attribute, to provide a reasonably unique key
36 for a given type and detect any changes in the semantics of the
37 type or any of its subcomponents from version to version.
39 2016-10-12 Bob Duff <duff@adacore.com>
41 * sem_case.adb (Check_Choice_Set): Separate
42 checking for duplicates out into a separate pass from checking
43 full coverage, because the check for duplicates does not depend
44 on predicates. Therefore, we shouldn't do it separately for the
45 predicate vs. no-predicate case; we should share code. The code
46 for the predicate case was wrong.
48 2016-10-12 Jerome Lambourg <lambourg@adacore.com>
50 * init.c: Make sure to call finit on x86_64-vx7 to reinitialize
53 2016-10-12 Arnaud Charlet <charlet@adacore.com>
55 * lib-load.adb (Load_Unit): Generate an error message even when
58 2016-10-12 Ed Schonberg <schonberg@adacore.com>
60 * lib-writ.adb (Write_ALI): Disable optimization related to transitive
61 limited_with clauses for now.
63 2016-10-12 Javier Miranda <miranda@adacore.com>
65 * sem_attr.adb (Analyze_Attribute_Old_Result): Generating C
66 code handle 'old located in inlined _postconditions procedures.
67 (Analyze_Attribute [Attribute_Result]): Handle 'result when
68 rewriting the attribute as a reference to the formal parameter
69 _Result of inlined _postconditions procedures.
71 2016-10-12 Tristan Gingold <gingold@adacore.com>
73 * s-rident.ads (Profile_Info): Remove
74 Max_Protected_Entries restriction from GNAT_Extended_Ravenscar
75 * sem_ch9.adb (Analyze_Protected_Type_Declaration):
76 Not a controlled type on restricted runtimes.
78 2016-10-12 Gary Dismukes <dismukes@adacore.com>
80 * sem_ch3.adb (Derive_Subprogram): Add test
81 for Is_Controlled of Parent_Type when determining whether an
82 inherited subprogram with one of the special names Initialize,
83 Adjust, or Finalize should be derived with its normal name even
84 when inherited as a private operation (which would normally
85 result in the inherited operation having a special "hidden" name).
87 2016-10-12 Ed Schonberg <schonberg@adacore.com>
89 * sem_res.adb (Resolve_Call): If a function call returns a
90 limited view of a type replace it with the non-limited view,
91 which must be available when compiling call. This was already
92 done elsewhere for non-overloaded calls, but needs to be done
93 after resolution if function name is overloaded.
95 2016-10-12 Javier Miranda <miranda@adacore.com>
97 * a-tags.adb (IW_Membership [private]): new overloaded
98 subprogram that factorizes the code needed to check if a
99 given type implements an interface type.
101 [public]): invoke the new internal IW_Membership function.
102 (Is_Descendant_At_Same_Level): Fix this routine to implement RM
105 2016-10-12 Tristan Gingold <gingold@adacore.com>
107 * exp_ch9.adb (Expand_N_Delay_Relative_Statement): Add support
108 for a secondary procedure in case of missing Ada.Calendar.Delays
109 * rtsfind.ads (RTU_Id): Add System_Relative_Delays.
110 (RE_Id): Add RO_RD_Delay_For.
111 * rtsfind.adb (Output_Entity_Name): Handle correctly units RO_XX.
112 * s-rident.ads: Remove No_Relative_Delays
113 restriction for GNAT_Extended_Ravenscar.
115 2016-10-12 Ed Schonberg <schonberg@adacore.com>
117 * sem_elab.adb (Within_Initial_Condition): When deternining
118 the context of the expression, use the original node if it is
119 a pragma, because Check pragmas are rewritten as conditionals
120 when assertions are not enabled.
122 2016-10-12 Bob Duff <duff@adacore.com>
124 * spitbol_table.ads, spitbol_table.adb (Adjust, Finalize): Add
127 2016-10-12 Bob Duff <duff@adacore.com>
129 * a-strunb-shared.ads, a-strunb-shared.adb (Finalize):
130 Make sure Finalize is idempotent.
131 (Unreference): Check for
132 Empty_Shared_String, in case the reference count of the empty
134 Also add "not null" in various places that can't be null.
136 2016-10-12 Jerome Lambourg <lambourg@adacore.com>
138 * init.c: Fix sigtramp with the x86_64-vx7-vxsim target on
141 2016-10-12 Vadim Godunko <godunko@adacore.com>
143 * s-os_lib.ads (Is_Owner_Readable_File): Renamed from
145 (Is_Owner_Writable_File): Renamed from Is_Writable_File.
146 (Is_Readable_File): Renames Is_Read_Accessible_File.
147 (Is_Writable_File): Renames Is_Write_Accessible_File.
149 2016-10-12 Ed Schonberg <schonberg@adacore.com>
151 * sem_ch12.adb (Check_Formal_Package_Instance): Skip an internal
152 formal entity without a parent only if the corresponding actual
153 entity has a different kind.
154 * exp_ch9.adb (Build_Class_Wide_Master): If the master is
155 declared locally, insert the renaming declaration after the
156 master declaration, to prevent access before elaboration in gigi.
158 2016-10-12 Ed Schonberg <schonberg@adacore.com>
160 * contracts.adb (Analyze_Contracts): For a type declaration, analyze
161 an iterable aspect when present.
163 2016-10-12 Ed Schonberg <schonberg@adacore.com>
165 * sem_ch12.adb (Check_Formal_Package_Instance): Handle properly
166 an instance of a formal package with defaults, when defaulted
167 parameters include tagged private types and array types.
169 2016-10-12 Eric Botcazou <ebotcazou@adacore.com>
172 * exp_ch5.adb (Is_Non_Local_Array): Return true for every array
173 that is not a component or slice of an entity in the current
176 2016-10-12 Tristan Gingold <gingold@adacore.com>
178 * restrict.ads, restrict.adb (Restricted_Profile): Adjust
179 comment, use Restricted_Tasking to compare restrictions.
180 * s-rident.ads (Profile_Name): Add Restricted_Tasking and
182 (Profile_Info): Set restrictions for Restricted_Tasking.
184 2016-10-12 Ed Schonberg <schonberg@adacore.com>
186 * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Ghost status
187 of type before elaborating inherited operations, so that the
188 Ghost status is set properly for them.
189 * ghost.adb (Check_Ghost_Overriding): A ghost subprogram can
190 override an abstract subprogram coming from an interface
193 2016-10-11 Eric Botcazou <ebotcazou@adacore.com>
195 * system-linux-armeb.ads (Backend_Overflow_Checks): Change to True.
196 * system-linux-mips.ads (Backend_Overflow_Checks): Likewise.
197 * system-linux-mips64el.ads (Backend_Overflow_Checks): Likewise.
198 * system-linux-mipsel.ads (Backend_Overflow_Checks): Likewise.
199 * system-linux-sparcv9.ads (Backend_Overflow_Checks): Likewise.
200 * system-rtems.ads: Likewise.
202 2016-10-11 Andris Pavenis <andris.pavenis@iki.fi>
204 * adaint.c: Include process.h, signal.h, dir.h and utime.h for DJGPP.
205 ISALPHA: include <ctype.h> and define to isalpha for DJGPP when IN_RTS
207 (DIR_SEPARATOR) define to '\\' for DJGPP.
208 (__gnat_get_file_names_case_sensitive): Return 0 for DJGPP unless
209 overriden in environment.
210 (__gnat_is_absolute_path): Support MS-DOS absolute paths for DJGPP.
211 (__gnat_portable_spawn): Use spewnvp for DJGPP.
212 (__gnat_portable_no_block_spawn): Use spawnvp for DJGPP.
213 (__gnat_portable_wait): Return 0 for DJGPP.
215 2016-10-11 Andris Pavenis <andris.pavenis@iki.fi>
217 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS): Define for DJGPP.
218 (EH_MECHANISM): Define to -gcc for DJGPP.
219 * system-djgpp.ads: New file.
221 2016-10-11 Andris Pavenis <andris.pavenis@iki.fi>
223 * ctrl_c.c: Do not use macro SA_RESTART for DJGPP.
224 * gsocket.h: Do not support sockets for DJGPP.
225 * init.c (__gnat_install_handler): Implememt for DJGPP.
226 * sysdep.c: Include <io.h> for DJGPP.
227 (_setmode): Define to setmode for DJGPP.
228 (__gnat_set_mode): Add implementation for DJGPP.
229 (__gnat_localtime_tzoff): Use localtime_r for DJGPP.
230 * terminals.c: Add DJGPP to list of unsupported platforms.
231 * env.c (__gnat_clearenv): Use _gnat_unsetenv on all entries for DJGPP.
233 2016-10-11 Pierre-Marie de Rodat <derodat@adacore.com>
235 * exp_dbug.adb (Debug_Renaming_Declaration): Process underlying types.
236 Emit GNAT encodings for object renamings involving record components
237 whose normalized bit offset is not null.
238 * uintp.h (UI_No_Uint): Declare.
239 * gcc-interface/gigi.h (can_materialize_object_renaming_p): Likewise.
240 * gcc-interface/utils.c (can_materialize_object_renaming_p): New
242 * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Renaming_Declaration>:
243 In code generation mode, materialize all renamings as long as they need
244 debug info and we are not optimizing.
246 2016-10-11 Pierre-Marie de Rodat <derodat@adacore.com>
248 * gcc-interface/utils2.c (build_binary_op): Add a NO_FOLD argument.
249 Disable folding when it is true.
250 * gcc-interface/gigi.h (choices_to_gnu): Remove declaration.
251 (build_binary_op): Update signature and comment.
252 * gcc-interface/decl.c (choices_to_gnu): Make static. Disable
253 folding in calls to build_binary_op.
255 2016-10-11 Tristan Gingold <gingold@adacore.com>
257 * fe.h (Constant_Value): Declare.
258 * gcc-interface/decl.c (compile_time_known_address_p): Also consider
259 references to constants.
261 2016-10-11 Eric Botcazou <ebotcazou@adacore.com>
263 * gcc-interface/trans.c (gnat_to_gnu) <N_Op_Add>: Adjust comment.
264 <N_Op_Minus>: Add comment and missing guard.
265 * gcc-interface/trans.c (build_binary_op_trapv): Use an explicit test.
267 2016-10-11 Eric Botcazou <ebotcazou@adacore.com>
269 * gcc-interface/utils.c (type_unsigned_for_rm): New predicate.
270 (make_type_from_size): Use it.
271 (unchecked_convert): Likewise. Do not skip the extension step if the
272 source type is not integral.
274 2016-10-11 Eric Botcazou <ebotcazou@adacore.com>
275 Tristan Gingold <gingold@adacore.com>
277 * system-linux-ppc64.ads: Delete.
278 * system-linux-ppc.ads: Make 32-bit/64-bit neutral.
279 * gcc-interface/Makefile.in (PowerPC/Linux): Simplify.
281 2016-10-10 Eric Botcazou <ebotcazou@adacore.com>
283 * gcc-interface/decl.c (gnat_to_gnu_entity): Put volatile qualifier
284 on types at the very end of the processing.
285 (gnat_to_gnu_param): Remove redundant test.
286 (change_qualified_type): Do nothing for unconstrained array types.
288 2016-10-10 Eric Botcazou <ebotcazou@adacore.com>
290 * gcc-interface/utils2.c (find_common_type): Do not return the LHS type
291 if it's an array with non-constant lower bound and the RHS type is an
292 array with a constant one.
294 2016-10-10 Eric Botcazou <ebotcazou@adacore.com>
296 * gcc-interface/utils.c (convert): For a biased input type, convert the
297 bias itself to the base type before adding it.
299 2016-10-08 Eric Botcazou <ebotcazou@adacore.com>
301 * gcc-interface/utils.c (convert) <VECTOR_CST>: Add missing break.
304 2016-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
306 * gcc-interface/decl.c: Fix fall through comment formatting.
307 * gcc-interface/misc.c: Likewise.
308 * gcc-interface/trans.c: Likewise.
309 * gcc-interface/utils.c: Likewise.
310 * gcc-interface/utils2.c: Likewise.
312 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
314 * gcc-interface/misc.c (gnat_post_options): Remove special case for
315 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard.
317 2016-09-27 Jakub Jelinek <jakub@redhat.com>
319 * terminals.c (is_gui_app): Remove break after return.
321 2016-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
323 * gcc-interface/decl.c: Fix fall through comment formatting.
324 * gcc-interface/misc.c: Likewise.
325 * gcc-interface/trans.c: Likewise.
326 * gcc-interface/utils.c: Likewise.
327 * gcc-interface/utils2.c: Likewise.
329 2016-09-23 Jakub Jelinek <jakub@redhat.com>
331 * gcc-interface/decl.c (gnat_to_gnu_entity): Use
332 CONSTRUCTOR_NELTS (...) instead of
333 vec_safe_length (CONSTRUCTOR_ELTS (...)).
335 2016-07-14 Eric Botcazou <ebotcazou@adacore.com>
337 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Also use
338 the void pointer type if the designated type is incomplete and has no
339 full view in LTO mode.
340 <E_Access_Protected_Subprogram_Type>: Adjust comment.
341 <E_Incomplete_Type>: Likewise.
342 * gcc-interface/trans.c (Call_to_gnu): Do not convert to the type of
343 the actual if it is a dummy type.
345 2016-07-11 Bernd Edlinger <bernd.edlinger@hotmail.de>
347 * gcc-interface/ada-tree.h (TYPE_ALIGN_OK): Define.
348 * gcc-interface/trans.c (Attribute_to_gnu): Adjust call to
350 * gcc-interface/utils2.c (build_unary_op): Likewise.
352 2016-07-11 Eric Botcazou <ebotcazou@adacore.com>
354 * gcc-interface/trans.c (add_decl_expr): Minor tweak.
355 * gcc-interface/utils.c (create_var_decl): For an external variable,
356 also clear TREE_READONLY in LTO mode if the initializer is not a valid
357 constant and set DECL_READONLY_ONCE_ELAB instead.
359 2016-07-11 Eric Botcazou <ebotcazou@adacore.com>
362 * adaint.c (__gnat_is_read_accessible_file): Add parentheses.
363 (__gnat_is_write_accessible_file): Likewise.
365 2016-07-07 Ed Schonberg <schonberg@adacore.com>
367 * exp_ch6.adb (Expand_Internal_Init_Call): Subsidiary procedure
368 to Expand_Protected_ Subprogram_Call, to handle properly a
369 call to a protected function that provides the initialization
370 expression for a private component of the same protected type.
371 * sem_ch9.adb (Analyze_Protected_Definition): Layout must be
372 applied to itypes generated for a private operation of a protected
373 type that has a formal of an anonymous access to subprogram,
374 because these itypes have no freeze nodes and are frozen in place.
375 * sem_ch4.adb (Analyze_Selected_Component): If prefix is a
376 protected type and it is not a current instance, do not examine
377 the first private component of the type.
379 2016-07-07 Arnaud Charlet <charlet@adacore.com>
381 * exp_imgv.adb, g-dynhta.adb, s-regexp.adb, s-fatgen.adb, s-poosiz.adb:
382 Minor removal of extra whitespace.
383 * einfo.ads: minor removal of repeated "as" in comment
385 2016-07-07 Vadim Godunko <godunko@adacore.com>
387 * adaint.c: Complete previous change.
389 2016-07-07 Vadim Godunko <godunko@adacore.com>
391 * adainit.h, adainit.c (__gnat_is_read_accessible_file): New
393 (__gnat_is_write_accessible_file): New subprogram.
394 * s-os_lib.ads, s-os_lib.adb (Is_Read_Accessible_File): New subprogram.
395 (Is_Write_Accessible_File): New subprogram.
397 2016-07-07 Justin Squirek <squirek@adacore.com>
399 * sem_ch12.adb (Install_Body): Minor refactoring in the order
401 (In_Same_Scope): Change loop condition to be more expressive.
403 2016-07-07 Gary Dismukes <dismukes@adacore.com>
405 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, prj-ext.adb, freeze.adb,
406 sem_attr.adb: Minor reformatting, fix typos.
408 2016-07-07 Justin Squirek <squirek@adacore.com>
410 * sem_ch12.adb (In_Same_Scope): Created this function to check
411 a generic package definition against an instantiation for scope
413 (Install_Body): Add function In_Same_Scope and
414 amend conditional in charge of delaying the package instance.
415 (Is_In_Main_Unit): Add guard to check if parent is present in
416 assignment of Current_Unit.
418 2016-07-07 Eric Botcazou <ebotcazou@adacore.com>
420 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove redundant test,
421 adjust comments and formatting.
422 * sem_prag.adb (Inlining_Not_Possible): Do not test Front_End_Inlining
424 (Make_Inline): ...here before calling Inlining_Not_Possible instead.
425 (Set_Inline_Flags): Remove useless test.
426 (Analyze_Pragma) <Pragma_Inline>: Add comment about -gnatn switch.
428 2016-07-07 Ed Schonberg <schonberg@adacore.com>
430 * sem_prag.ads, sem_prag.adb (Build_Classwide_Expression): Include
431 overridden operation as parameter, in order to map formals of
432 the overridden and overring operation properly prior to rewriting
433 the inherited condition.
434 * freeze.adb (Check_Inherited_Cnonditions): Change call to
435 Build_Class_Wide_Expression accordingly. In Spark_Mode, add
436 call to analyze the contract of the parent operation, prior to
437 mapping formals between operations.
439 2016-07-07 Arnaud Charlet <charlet@adacore.com>
441 * adabkend.adb (Scan_Back_End_Switches): Ignore -o/-G switches
442 as done in back_end.adb.
443 (Scan_Compiler_Args): Remove special case for CodePeer/SPARK, no longer
444 needed, and prevents proper handling of multi-unit sources.
446 2016-07-07 Thomas Quinot <quinot@adacore.com>
448 * g-sechas.adb, g-sechas.ads (GNAT.Secure_Hashes.H): Add Hash_Stream
449 type with Write primitive calling Update on the underlying context
450 (and dummy Read primitive raising P_E).
452 2016-07-07 Thomas Quinot <quinot@adacore.com>
454 * sem_ch13.adb: Minor reformatting.
456 2016-07-07 Thomas Quinot <quinot@adacore.com>
458 * g-socket.ads: Document performance consideration for stream
461 2016-07-07 Arnaud Charlet <charlet@adacore.com>
463 * osint-c.ads (Set_File_Name): Clarify spec.
465 2016-07-07 Eric Botcazou <ebotcazou@adacore.com>
467 * freeze.adb: Reenable code.
469 2016-07-07 Yannick Moy <moy@adacore.com>
471 * sem_ch6.adb (Process_Formals): Set ghost flag
472 on formal entities of ghost subprograms.
473 * ghost.adb (Check_Ghost_Context.Is_OK_Ghost_Context): Accept ghost
474 entities in use type clauses.
476 2016-07-06 Javier Miranda <miranda@adacore.com>
478 * sem_ch6.adb (Check_Inline_Pragma): if the subprogram has no spec
479 then move its aspects to the internally built subprogram spec.
481 2016-07-06 Yannick Moy <moy@adacore.com>
483 * sem_ch6.adb (Analyze_Expression_Function): Mark body of
484 expression function as ghost if needed when created.
485 * sem_prag.adb (Analyze_Pragma.Process_Inline.Set_Inline_Flags):
488 2016-07-06 Arnaud Charlet <charlet@adacore.com>
490 * lib.adb (Check_Same_Extended_Unit): Complete previous change.
491 * sem_intr.adb (Errint): New parameter Relaxed. Refine previous
492 change to only disable errors selectively.
493 * sem_util.adb: minor style fix in object declaration
495 2016-07-06 Yannick Moy <moy@adacore.com>
497 * sem_warn.adb (Check_Infinite_Loop_Warning.Find_Var): Special case a
498 call to a volatile function, so that it does not lead to a warning in
501 2016-07-06 Hristian Kirtchev <kirtchev@adacore.com>
503 * sem_ch12.adb, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
505 2016-07-06 Hristian Kirtchev <kirtchev@adacore.com>
507 * gnat1drv.adb: Code clean up. Do not emit any
508 code generation errors when the unit is ignored Ghost.
510 2016-07-06 Ed Schonberg <schonberg@adacore.com>
512 * sem_eval.adb (Check_Non_Static_Context): If the expression
513 is a real literal of a floating point type that is part of a
514 larger expression and is not a static expression, transform it
515 into a machine number now so that the rest of the computation,
516 even if other components are static, is not evaluated with
519 2016-07-06 Javier Miranda <miranda@adacore.com>
521 * sem_ch13.adb (Freeze_Entity_Checks): Undo previous patch and move the
522 needed functionality to Analyze_Freeze_Generic_Entity.
523 (Analyze_Freeze_Generic_Entity): If the entity is not already frozen
524 and has delayed aspects then analyze them.
526 2016-07-06 Yannick Moy <moy@adacore.com>
528 * sem_prag.adb (Analyze_Pragma.Process_Inline.Set_Inline_Flags):
529 Special case for unanalyzed body entity of ghost expression function.
531 2016-07-06 Javier Miranda <miranda@adacore.com>
533 * sem_ch7.adb (Analyze_Package_Specification): Insert its
534 freezing nodes after the last declaration. Needed to ensure
535 that global entities referenced in aspects of frozen types are
537 * freeze.adb (Freeze_Entity): Minor code reorganization to ensure
538 that freezing nodes of generic packages are handled.
539 * sem_ch13.adb (Freeze_Entity_Checks): Handle N_Freeze_Generic nodes.
540 * sem_ch12.adb (Save_References_In_Identifier): Handle selected
541 components which denote a named number that is constant folded
542 in the analyzed copy of the tree.
544 2016-07-06 Hristian Kirtchev <kirtchev@adacore.com>
546 * exp_aggr.adb Remove with and use clauses for Exp_Ch11 and Inline.
547 (Initialize_Array_Component): Protect the initialization
548 statements in an abort defer / undefer block when the associated
549 component is controlled.
550 (Initialize_Record_Component): Protect the initialization statements
551 in an abort defer / undefer block when the associated component is
553 (Process_Transient_Component_Completion): Use Build_Abort_Undefer_Block
554 to create an abort defer / undefer block.
555 * exp_ch3.adb Remove with and use clauses for Exp_ch11 and Inline.
556 (Default_Initialize_Object): Use Build_Abort_Undefer_Block to
557 create an abort defer / undefer block.
558 * exp_ch5.adb (Expand_N_Assignment_Statement): Mark an abort
559 defer / undefer block as such.
560 * exp_ch9.adb (Find_Enclosing_Context): Do not consider an abort
561 defer / undefer block as a suitable context for an activation
563 * exp_util.adb Add with and use clauses for Exp_Ch11.
564 (Build_Abort_Undefer_Block): New routine.
565 * exp_util.ads (Build_Abort_Undefer_Block): New routine.
566 * sinfo.adb (Is_Abort_Block): New routine.
567 (Set_Is_Abort_Block): New routine.
568 * sinfo.ads New attribute Is_Abort_Block along with occurrences
570 (Is_Abort_Block): New routine along with pragma Inline.
571 (Set_Is_Abort_Block): New routine along with pragma Inline.
573 2016-07-06 Justin Squirek <squirek@adacore.com>
575 * sem_ch4.adb (Analyze_One_Call): Add a conditional to handle
578 2016-07-06 Hristian Kirtchev <kirtchev@adacore.com>
580 * einfo.adb Flag252 is now used as Is_Finalized_Transient. Flag295
581 is now used as Is_Ignored_Transient.
582 (Is_Finalized_Transient): New routine.
583 (Is_Ignored_Transient): New routine.
584 (Is_Processed_Transient): Removed.
585 (Set_Is_Finalized_Transient): New routine.
586 (Set_Is_Ignored_Transient): New routine.
587 (Set_Is_Processed_Transient): Removed.
588 (Write_Entity_Flags): Output Flag252 and Flag295.
589 * einfo.ads: New attributes Is_Finalized_Transient
590 and Is_Ignored_Transient along with occurrences in
591 entities. Remove attribute Is_Processed_Transient.
592 (Is_Finalized_Transient): New routine along with pragma Inline.
593 (Is_Ignored_Transient): New routine along with pragma Inline.
594 (Is_Processed_Transient): Removed along with pragma Inline.
595 (Set_Is_Finalized_Transient): New routine along with pragma Inline.
596 (Set_Is_Ignored_Transient): New routine along with pragma Inline.
597 (Set_Is_Processed_Transient): Removed along with pragma Inline.
598 * exp_aggr.adb Add with and use clauses for Exp_Ch11 and Inline.
599 (Build_Record_Aggr_Code): Change the handling
600 of controlled record components.
601 (Ctrl_Init_Expression): Removed.
602 (Gen_Assign): Add new formal parameter In_Loop
603 along with comment on usage. Remove local variables Stmt and
604 Stmt_Expr. Change the handling of controlled array components.
605 (Gen_Loop): Update the call to Gen_Assign.
606 (Gen_While): Update the call to Gen_Assign.
607 (Initialize_Array_Component): New routine.
608 (Initialize_Ctrl_Array_Component): New routine.
609 (Initialize_Ctrl_Record_Component): New routine.
610 (Initialize_Record_Component): New routine.
611 (Process_Transient_Component): New routine.
612 (Process_Transient_Component_Completion): New routine.
613 * exp_ch4.adb (Process_Transient_In_Expression): New routine.
614 (Process_Transient_Object): Removed. Replace all existing calls
615 to this routine with calls to Process_Transient_In_Expression.
616 * exp_ch6.adb (Expand_Ctrl_Function_Call): Remove local constant
617 Is_Elem_Ref. Update the comment on ignoring transients.
618 * exp_ch7.adb (Process_Declarations): Do not process ignored
619 or finalized transient objects.
620 (Process_Transient_In_Scope): New routine.
621 (Process_Transients_In_Scope): New routine.
622 (Process_Transient_Objects): Removed. Replace all existing calls
623 to this routine with calls to Process_Transients_In_Scope.
624 * exp_util.adb (Build_Transient_Object_Statements): New routine.
625 (Is_Finalizable_Transient): Do not consider a transient object
626 which has been finalized.
627 (Requires_Cleanup_Actions): Do not consider ignored or finalized
629 * exp_util.ads (Build_Transient_Object_Statements): New routine.
630 * sem_aggr.adb: Major code clean up.
631 * sem_res.adb: Update documentation.
633 2016-07-06 Ed Schonberg <schonberg@adacore.com>
635 * sem_ch3.adb (Analyze_Subtype_Declaration): For generated
636 subtypes, such as actual subtypes of unconstrained formals,
637 inherit predicate functions, if any, from the parent type rather
638 than creating redundant new ones.
640 2016-07-06 Hristian Kirtchev <kirtchev@adacore.com>
642 * exp_attr.adb, sem_attr.adb, sem_ch13.adb: Minor reformatting.
644 2016-07-06 Arnaud Charlet <charlet@adacore.com>
646 * lib.adb (Check_Same_Extended_Unit): Prevent looping forever.
647 * gnatbind.adb: Disable some consistency checks in codepeer mode,
648 which are not needed.
650 2016-07-06 Ed Schonberg <schonberg@adacore.com>
652 * sem_ch12.adb (Check_Fixed_Point_Actual): Add a warning when
653 a formal fixed point type is instantiated with a type that has
654 a user-defined arithmetic operations, but the generic has no
655 corresponding formal functions. This is worth a warning because
656 of the special semantics of fixed-point operators.
658 2016-07-06 Bob Duff <duff@adacore.com>
660 * sem_attr.adb (Analyze_Attribute): Allow any expression of
662 * exp_attr.adb (Expand_N_Attribute_Reference): Change the
663 constant-folding code to correctly handle cases newly allowed
664 by Analyze_Attribute.
666 2016-07-05 Eric Botcazou <ebotcazou@adacore.com>
668 * gcc-interface/decl.c (gnat_to_gnu_entity): Invoke global_bindings_p
669 last when possible. Do not call elaborate_expression_2 on offsets in
670 local record types and avoid useless processing for constant offsets.
672 2016-07-04 Arnaud Charlet <charlet@adacore.com>
674 * gnat_rm.texi, gnat_ugn.texi,
675 doc/gnat_ugn/gnat_project_manager.rst,
676 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
677 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
678 doc/gnat_ugn/about_this_guide.rst,
679 doc/gnat_ugn/platform_specific_information.rst,
680 doc/gnat_ugn/tools_supporting_project_files.rst,
681 doc/gnat_ugn/gnat_and_program_execution.rst,
682 doc/gnat_ugn/gnat_utility_programs.rst,
683 doc/gnat_ugn/the_gnat_compilation_model.rst,
684 doc/gnat_rm/implementation_defined_attributes.rst,
685 doc/gnat_rm/implementation_defined_pragmas.rst,
686 doc/gnat_rm/representation_clauses_and_pragmas.rst,
687 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
688 doc/gnat_ugn.rst: Update documentation.
690 2016-07-04 Arnaud Charlet <charlet@adacore.com>
692 * gcc-interface/Makefile.in: Cleanups.
694 2016-07-04 Ed Schonberg <schonberg@adacore.com>
696 * sem_attr.adb (Analyze_Attribute_Old_Result): The attributes can
697 appear in the postcondition of a subprogram renaming declaration,
698 when the renamed entity is an attribute reference that is a
699 function (such as 'Value).
700 * sem_attr.adb (Eval_Attribute): It doesn't
701 need to be static, just known at compile time, so use
702 Compile_Time_Known_Value instead of Is_Static_Expression.
703 This is an efficiency improvement over the previous bug fix.
704 * sem_ch13.adb (Analyze_One_Aspect): Use Original_Node to detect
705 illegal aspects on subprogram renaming declarations that may
706 have been rewritten as bodies.
708 2016-07-04 Arnaud Charlet <charlet@adacore.com>
710 * sem_intr.adb (Errint): Do not emit error message in
711 Relaxed_RM_Semantics mode.
713 2016-07-04 Bob Duff <duff@adacore.com>
715 * sem_attr.adb (Eval_Attribute): The code was assuming
716 that X'Enum_Rep, where X denotes a constant, can be constant
717 folded. Fix it so it makes that assumption only when X denotes
720 2016-07-04 Ed Schonberg <schonberg@adacore.com>
722 * sem_ch4.adb (Compatible_Types_In_Predicate): New function
723 to handle cases where a formal of a predicate function and the
724 corresponding actual have different views of the same type.
726 2016-07-04 Philippe Gil <gil@adacore.com>
728 * g-debpoo.adb (Free_Blocks) free blocks also until
729 Logically_Deallocated less than Maximum_Logically_Freed_Memory
730 (Dump) add dump of number of traceback & validity elements
733 2016-07-04 Justin Squirek <squirek@adacore.com>
735 * sem_ch12.adb (Instantiate_Package_Body): Add
736 a guard to ignore Itypes which fail when installing primitives.
738 2016-07-04 Bob Duff <duff@adacore.com>
740 * sem_eval.adb (Decompose_Expr): Set 'out' parameters
741 Kind and Cons to valid values, to avoid use of uninit vars.
742 (Extract_Length): Reorder the check to make it clearer that
743 we're depending on BOTH Ent1 and Ent2 to be Present.
744 * sem_aggr.adb (Resolve_Aggregate): Remove dead code.
745 (Check_Misspelled_Component): Remove exit statement, because
746 it's covered by the 'while' condition.
747 * checks.adb (Apply_Selected_Range_Checks): Remove useless
748 condition "or else not Checks_On".
749 (Selected_Range_Checks):
750 Initialize Known_LB and Known_HB to False, because they are
751 tested unconditionally; avoid use of uninit vars.
752 * frontend.adb (Frontend): Removed useless condition
753 "Operating_Mode = Check_Semantics and then", and added an Assert
754 to clarify why it was useless.
755 * prep.adb (Preprocess): Remove redundant condition. Add an
757 * sem_ch10.adb (Analyze_Proper_Body): Moved redundant condition
758 "Original_Operating_Mode = Generate_Code" to an Assert.
759 (Process_Spec_Clauses, Process_Body_Clauses): Change parameters
760 from 'in out' to 'out', and don't initialize actuals.
761 * sem_ch12.adb (Is_In_Main_Unit): Removed useless condition
762 "Unum = Main_Unit or else".
763 (Save_Global_Descendant): Moved
764 redundant condition "D = Union_Id (No_List)" to an Assert.
765 * sem_ch4.adb (Check_Misspelled_Selector): Remove exit
766 statement, because it's covered by the 'while' condition.
767 (Analyze_Case_Expression): Initialize Wrong_Alt to Empty,
768 because it looks like it is used uninitialized otherwise.
769 * sem_ch6.adb (Check_Return_Subtype_Indication): Moved redundant
770 condition "not R_Type_Is_Anon_Access" to an Assert.
771 * sem_elim.adb (Line_Num_Match): Moved redundant condition
772 "Sloc_Trace (Idx) = '['" to an Assert.
773 * sem_util.adb (Compile_Time_Constraint_Error): Change "J" to
774 "J - 1". This code is trying to replace "?" with "<", but not if
775 the "?" is quoted, as in "'?", so we want to check the PREVIOUS
777 * snames.adb-tmpl (Is_Pragma_Name): Remove useless condition
778 "or else N = Name_Relative_Deadline". It's useless because
779 Name_Relative_Deadline is in the range First_Pragma_Name
781 * treepr.adb (Visit_Node): Moved redundant condition "D =
782 Union_Id (No_List)" to an Assert.
783 * sem_ch3.adb (Derive_Subprogram, Derive_Subprograms): Change
784 parameters from 'in out' to 'out'.
785 * errout.adb (Error_Msg_Internal): Replace redundant test with Assert.
786 * inline.adb (Add_Inlined_Body): Code cleanup.
788 2016-07-04 Hristian Kirtchev <kirtchev@adacore.com>
790 * g-sercom-mingw.adb, sem_ch6.adb: Minor reformatting.
792 2016-07-04 Olivier Hainque <hainque@adacore.com>
794 * g-sercom-mingw.adb (Set): Fix port configuration for the
795 non-blocking + null-timeout case, request of immediate return.
797 2016-07-04 Ed Schonberg <schonberg@adacore.com>
799 * sem_ch6.adb (Is_Non_Overriding_Operation): Add guard to test
800 of generic parent type when operation is a parameterless function
801 that may dispatch on result.
803 2016-07-04 Hristian Kirtchev <kirtchev@adacore.com>
805 * freeze.adb, ghost.adb, sem_ch13.adb: Minor reformatting.
807 2016-07-04 Pascal Obry <obry@adacore.com>
809 * g-forstr.ads: More documentation for the Formatted_String
812 2016-07-04 Justin Squirek <squirek@adacore.com>
814 * sem_ch7.adb (Install_Parent_Private_Declarations): When
815 instantiating a child unit, do not install private declaration of
816 a non-generic ancestor of the generic that is also an ancestor
817 of the current unit: its private part will be installed when
818 private part of ancestor itself is analyzed.
820 2016-07-04 Ed Schonberg <schonberg@adacore.com>
822 * sem_ch12.adb (Instantiate_Object): In SPARK mode add a guard
823 to verify that the actual is an object reference before checking
825 (Check_Generic_Child_Unit): Prevent cascaded errors when prefix
828 2016-07-04 Gary Dismukes <dismukes@adacore.com>
830 * sem_ch12.ads, freeze.adb: Minor reformatting and typo fixes.
832 2016-07-04 Ed Schonberg <schonberg@adacore.com>
834 * sem_ch13.adb (New_Stream_Subprogram): If the attribute
835 definition clause comes from an aspect specification, place the
836 generated subprogram renaming in the freeze actions of the type.
838 2016-07-04 Philippe Gil <gil@adacore.com>
840 * g-debpoo.adb (Dump.Do_Report) - add space prefix to backtrace
841 address dump - avoid new line sent directly to stdout.
843 2016-07-04 Arnaud Charlet <charlet@adacore.com>
845 * gnat1drv.adb, sem_ch12.adb, sem_elab.adb, sem_prag.adb, sem_res.adb:
846 Relax elaboration checks in SPARK_Mode so that we rely on the
847 static elaboration model (if used). We'll have a more precise
848 check performed in flow analysis of gnat2why.
850 2016-07-04 Ed Schonberg <schonberg@adacore.com>
852 * ghost.adb (Prune_Node): A freeze node for an ignored ghost
853 entity must be pruned as well.
855 2016-07-04 Gary Dismukes <dismukes@adacore.com>
857 * sem_type.adb, einfo.ads, freeze.adb, exp_ch6.adb: Minor reformatting
860 2016-07-04 Hristian Kirtchev <kirtchev@adacore.com>
862 * sem_ch3.adb, sem_type.adb, sem_ch12.adb, xref_lib.adb,
863 freeze.adb, sinput-l.adb, sinput-l.ads, sem_ch4.adb, sem_ch8.adb:
866 2016-07-04 Justin Squirek <squirek@adacore.com>
868 * sem_prag.adb (Analyze_Unmodified_Or_Unused and
869 Analyze_Unreferenced_Or_Unused): Change warning message to be
870 more clear about pragma duplicates.
872 2016-07-04 Yannick Moy <moy@adacore.com>
874 * sinput-l.adb (Create_Instantiation_Source): Set component
875 Inlined_Call for inherited pragma case.
876 * sinput.adb, sinput.ads (Instantiation): Return component
877 Inlined_Call for inherited pragma case.
879 2016-07-04 Bob Duff <duff@adacore.com>
881 * sem_type.adb (Remove_Conversions): Protect
882 the call to Left_Opnd by checking for Nkind in N_Unary_Op --
883 unary operators do not have a left operand.
885 2016-07-04 Ed Schonberg <schonberg@adacore.com>
887 * sem_ch3.adb (Analyze_Object_Declaration): A declaration of a
888 constant in a protected operation may be a homonym of a private
889 component of the enclosing protected type. This declaration hides
890 the component renaming constructed within the protected operation.
892 2016-07-04 Bob Duff <duff@adacore.com>
894 * xref_lib.adb (Parse_X_Filename, Parse_Identifier_Info): Ignore
895 unknown files. Check that File_Nr is in the range of files we
896 know about. The previous code was checking the lower bound,
897 but not the upper bound.
899 2016-07-04 Arnaud Charlet <charlet@adacore.com>
901 * tracebak.c: Minor reformatting.
903 2016-07-04 Yannick Moy <moy@adacore.com>
905 * sem_ch12.adb, sem_ch12.ads Update calls to
906 Create_Instantiation_Source to use default argument.
907 (Adjust_Inherited_Pragma_Sloc): New function to adjust sloc
909 (Set_Copied_Sloc_For_Inherited_Pragma):
910 New function that wraps call to Create_Instantiation_Source for
911 copying an inherited pragma.
912 (Set_Copied_Sloc_For_Inlined_Body): Update call to
913 Create_Instantiation_Source with new arguments.
914 * sem_prag.adb (Build_Pragma_Check_Equivalent): In the case
915 of inherited pragmas, use the generic machinery to get chained
916 locations for the pragma and its sub-expressions.
917 * sinput-c.adb: Adapt to new type Source_File_Record.
918 * sinput-l.adb, sinput-l.ads (Create_Instantiation_Source):
919 Add parameter Inherited_Pragma and make parameter Inlined_Body
921 * sinput.adb, sinput.ads (Comes_From_Inherited_Pragma): New
922 function to return when a location comes from an inherited pragma.
923 (Inherited_Pragma): New function to detect when a location comes
924 from an inherited pragma.
925 (Source_File_Record): New component Inherited_Pragma.
927 2016-07-04 Yannick Moy <moy@adacore.com>
929 * sem_elab.adb: Register existence of quickfix for error message.
931 2016-07-04 Ed Schonberg <schonberg@adacore.com>
933 * sem_ch4.adb (Resolve_One_Call): In the context of a predicate
934 function the formal and the actual in a call may have different
935 views of the same type, because of the delayed analysis of
936 predicates aspects. Extend the patch that handles this potential
937 discrepancy to handle private and full views as well.
938 * sem_ch8.adb (Find_Selected_Component): Refine predicate that
939 produces additional error when an illegal selected component
940 looks like a prefixed call whose first formal is untagged.
942 2016-07-04 Justin Squirek <squirek@adacore.com>
944 * einfo.adb (Has_Pragma_Unused): Create this function as a setter
945 for a new flag294 (Set_Has_Pragma_Unused): Create this procedure
946 as a getter for flag294 (Write_Entity_Flags): Register the new
948 * einfo.ads Add comment documenting Has_Pragma_Unused (flag294)
949 and subsequent getter and setter declarations.
950 * lib-xref.adb (Generate_Reference): Recognize Has_Pragma_Unused
951 flag to print appropriate warning messages.
952 * par-prag.adb (Prag): Classify Pragma_Unused into "All Other
954 * snames.ads-tmpl Add a new name to the name constants and a
955 new pramga to Pragma_Id for pramga Unused.
956 * sem_prag.adb (Analyze_Pragma): Create case for Pragma_Unused
957 and move the block for Pragma_Unmodified and Pragma_Unreferenced
958 out and into local subprograms.
959 (Analyze_Unmodified, Analyze_Unreferenced): From the old pragma blocks
960 that have been separated in to local subprograms add a parameter to
961 indicate the if they are being called in the context of Pragma_Unused
962 and handle it accordingly.
963 (Is_Non_Significant_Pragma_Reference): Add an entry for Pragma_Unused
964 and correct the position of Pragma_Unevaluated_Use_Of_Old.
965 * sem_util.adb (Note_Possible_Modification): Recognize
966 Has_Pragma_Unused flag to print appropriate warning messages.
968 2016-07-04 Ed Schonberg <schonberg@adacore.com>
970 * freeze.adb (Check_Inherited_Conditions): Perform two passes over
971 the primitive operations of the type: one over source overridings
972 to build the primitives mapping, and one over inherited operations
973 to check for the need to create wrappers, and to check legality
974 of inherited condition in SPARK.
975 * sem_prag.ads (Update_Primitive_Mapping): Make public, for use
977 * sem_prag.adb (Build_Pragma_Check_Equivalent): Refine error
978 message in the case of an inherited condition in SPARK that
979 includes a call to some other overriding primitive.
981 2016-07-04 Hristian Kirtchev <kirtchev@adacore.com>
983 * exp_aggr.adb (Ctrl_Init_Expression): New routine.
984 (Gen_Assign): Code cleanup. Perform in-place side effect removal when
985 the expression denotes a controlled function call.
986 * exp_util.adb (Remove_Side_Effects): Do not remove side effects
987 on a function call which has this behavior suppressed.
988 * sem_aggr.adb Code cleanup.
989 * sinfo.adb (No_Side_Effect_Removal): New routine.
990 (Set_Side_Effect_Removal): New routine.
991 * sinfo.ads New attribute No_Side_Effect_Removal along with
993 (No_Side_Effect_Removal): New routine along with pragma Inline.
994 (Set_Side_Effect_Removal): New routine along with pragma Inline.
996 2016-07-04 Arnaud Charlet <charlet@adacore.com>
998 * opt.ads, sem_prag.adb (Universal_Addressing_On_AAMP): Removed.
999 Remove support for pragma No_Run_Time. Update comments.
1001 2016-07-04 Pascal Obry <obry@adacore.com>
1003 * g-forstr.ads: More documentation for the Formatted_String
1006 2016-07-04 Ed Schonberg <schonberg@adacore.com>
1008 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
1009 'Address): If the address comes from an aspect specification
1010 and not a source attribute definition clause, do not remove
1011 side effects from the expression, because the expression must
1012 be elaborated at the freeze point of the object and not at the
1013 object declaration, because of the delayed analysis of aspect
1016 2016-06-29 Eric Botcazou <ebotcazou@adacore.com>
1020 * gcc-interface/gigi.h (enum standard_datatypes): Add ADT_realloc_decl
1021 (realloc_decl): New macro.
1022 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Use local
1023 variable for the entity type and translate it as void pointer if the
1024 entity has convention C.
1025 (gnat_to_gnu_entity) <E_Function>: If this is not a definition and the
1026 external name matches that of malloc_decl or realloc_decl, return the
1027 correspoding node directly.
1028 (gnat_to_gnu_subprog_type): Likewise for parameter and return types.
1029 * gcc-interface/trans.c (gigi): Initialize void_list_node here, not...
1030 Initialize realloc_decl.
1031 * gcc-interface/utils.c (install_builtin_elementary_types): ...here.
1032 (build_void_list_node): Delete.
1033 * gcc-interface/utils2.c (known_alignment) <CALL_EXPR>: Return the
1034 alignment of the system allocator for malloc_decl and realloc_decl.
1035 Do not take alignment from void pointer types either.
1037 2016-06-29 Eric Botcazou <ebotcazou@adacore.com>
1039 * gcc-interface/misc.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): Reorder.
1040 (LANG_HOOKS_INIT_TS): Likewise.
1042 2016-06-22 Arnaud Charlet <charlet@adacore.com>
1044 * sem_prag.adb: Revert unwanted change in previous commit,
1045 only keep message fix.
1047 2016-06-22 Ed Schonberg <schonberg@adacore.com>
1049 * sem_prag.ads (Build_Classwide_Expression): new procedure to
1050 build the expression for an inherited classwide condition, and
1051 to validate such expressions when they apply to an inherited
1052 operation that is not overridden.
1053 * sem_prag.adb (Primitives_Mapping): new data structure to
1054 handle the mapping between operations of a root type and the
1055 corresponding overriding operations of a type extension. Used
1056 to construct the expression for an inherited classwide condition.
1057 (Update_Primitives_Mapping): add to Primitives_Mapping the links
1058 between primitive operations of a root type and those of a given
1060 (Build_Pragma_Check_Equivalent): use Primitives_Mapping.
1061 * sem_ch6.adb (New_Overloaded_Entity): Remove call to
1062 Collect_Iherited_Class_Wide_Conditions in GNATprove_Mode. This
1063 needs to be done at freeze point of the type.
1064 * freeze.adb (Check_Inherited_Conditions): new procedure to
1065 verify the legality of inherited classwide conditions. In normal
1066 compilation mode the procedure determines whether an inherited
1067 operation needs a wrapper to handle an inherited condition that
1068 differs from the condition of the root type. In SPARK mode
1069 the routine invokes Collect_Inherited_Class_Wide_Conditions to
1070 produce the SPARK version of these inherited conditions.
1071 (Freeze_Record_Type): For a type extension, call
1072 Check_Inherited_Conditions.
1074 2016-06-22 Hristian Kirtchev <kirtchev@adacore.com>
1076 * sem_ch3.adb, sem_type.adb, sem.adb, freeze.adb, sem_util.adb,
1077 s-htable.adb, exp_ch11.adb, s-secsta.adb, restrict.adb, exp_disp.adb,
1078 sem_ch8.adb, s-tpobop.adb, exp_aggr.ads, sem_ch13.adb: Minor
1081 2016-06-22 Yannick Moy <moy@adacore.com>
1083 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Inverse order of
1084 treatments so that files without compilation unit are simply skipped
1085 before more elaborate treatments.
1087 2016-06-22 Bob Duff <duff@adacore.com>
1089 * s-memory.ads: Minor typo fixes in comments.
1090 * s-memory.adb: Code cleanup.
1092 2016-05-22 Olivier Hainque <hainque@adacore.com>
1094 * vxworks-crtbe-link.spec: Removed, no longer used.
1096 2016-06-22 Justin Squirek <squirek@adacore.com>
1098 * sem_ch8.adb (Push_Scope): Add a check for when the
1099 scope table is empty to assign the global variable
1100 Configuration_Component_Alignment.
1101 * sem.adb (Do_Analyze): Add Configuration_Component_Alignment
1102 to be assigned when the environment is cleaned instead of the
1104 * sem.ads Add a global variable Configuration_Component_Alignment
1105 to store the value given by pragma Component_Alignment in the
1106 context of a configuration file.
1107 * sem_prag.adb (Analyze_Pragma): Correct the case for
1108 Component_Alignment so that the pragma is verified and add
1109 comments to explain how it is applied to the scope stack.
1111 2016-06-22 Justin Squirek <squirek@adacore.com>
1113 * sprint.adb (Sprint_Node_Actual): Add check in
1114 the case of an N_Object_Declaration when evaluating an expression
1115 to properly ignore errors.
1117 2016-06-22 Bob Duff <duff@adacore.com>
1119 * g-comlin.ads (Parameter_Type): Change subtype of Last to
1121 * g-comlin.adb (Set_Parameter): Change subtype of Last to
1123 (Getopt): Check for Arg = "", and Switches /= "".
1124 (Internal_Initialize_Option_Scan): Check for Argument (Parser,
1127 2016-06-22 Gary Dismukes <dismukes@adacore.com>
1129 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
1131 2016-06-22 Ed Schonberg <schonberg@adacore.com>
1133 * einfo.ads, einfo.adb (Is_Actual_Subtype): New flag, defined
1134 on subtypes that are created within subprogram bodies to handle
1135 unconstrained composite formals.
1136 * checks.adb (Apply_Predicate_Check): Do not generate a check on
1137 an object whose type is an actual subtype.
1138 * sem_ch6.adb (Set_Actual_Subtypes): Do not generate an
1139 actual subtype for a formal whose base type is private.
1140 Set Is_Actual_Subtype on corresponding entity after analyzing
1143 2016-06-22 Justin Squirek <squirek@adacore.com>
1145 * sem_prag.adb (Check_Expr_Is_OK_Static_Expression): Fix ordering
1146 of if-block and add in a condition to test for errors during
1148 * sem_res.adb (Resolution_Failed): Add comment to explain why
1149 the type of a node which failed to resolve is set to the desired
1150 type instead of Any_Type.
1151 * sem_ch8.adb (Analyze_Object_Renaming): Add a check for Any_Type
1152 to prevent crashes on Is_Access_Constant.
1154 2016-06-22 Hristian Kirtchev <kirtchev@adacore.com>
1156 * lib-xref-spark_specific.adb, checks.adb, sem_ch13.adb: Minor
1158 * exp_ch7.adb: Minor typo fix.
1159 * lib.ads (Get_Top_Level_Code_Unit): Add comment.
1161 2016-06-22 Bob Duff <duff@adacore.com>
1163 * s-tassta.adb (Task_Wrapper): Fix handling of Fall_Back_Handler
1164 wrt independent tasks.
1166 2016-06-22 Ed Schonberg <schonberg@adacore.com>
1168 * sem_dim.adb (Analyze_Dimension): Propagate dimension for
1169 explicit_dereference nodes when they do not come from source,
1170 to handle correctly dimensional analysis on iterators over
1171 containers whose elements have declared dimensions.
1173 2016-06-22 Arnaud Charlet <charlet@adacore.com>
1175 * spark_xrefs.ads (Scope_Num): type refined to positive integers.
1176 * lib-xref-spark_specific.adb (Detect_And_Add_SPARK_Scope):
1177 moved into scope of Collect_SPARK_Xrefs.
1178 (Add_SPARK_Scope): moved into scope of Collect_SPARK_Xrefs;
1179 now uses Dspec and Scope_Id from Collect_SPARK_Xrefs.
1180 (Collect_SPARK_Xrefs): refactored to avoid retraversing the list
1182 (Traverse_Compilation_Unit): refactored as a generic procedure.
1183 * types.ads (Unit_Number_Type): range refined.
1185 2016-06-22 Hristian Kirtchev <kirtchev@adacore.com>
1187 * lib-xref-spark_specific.adb, a-cuprqu.ads, sem_ch6.adb: Minor
1190 2016-06-22 Eric Botcazou <ebotcazou@adacore.com>
1192 * sem_util.ads (Address_Value): Declare new function.
1193 * sem_util.adb (Address_Value): New function extracted
1194 unmodified from Apply_Address_Clause_Check, which returns the
1195 underlying value of the expression of an address clause.
1196 * checks.adb (Compile_Time_Bad_Alignment): Delete.
1197 (Apply_Address_Clause_Check): Call Address_Value on
1198 the expression. Do not issue the main warning here and
1199 issue the secondary warning only when the value of the
1200 expression is not known at compile time.
1201 * sem_ch13.adb (Address_Clause_Check_Record): Add A component and
1202 adjust the description.
1203 (Analyze_Attribute_Definition_Clause): In the case
1204 of an address, move up the code creating an entry in the table of
1205 address clauses. Also create an entry for an absolute address.
1206 (Validate_Address_Clauses): Issue the warning for absolute
1207 addresses here too. Tweak condition associated with overlays
1210 2016-06-22 Ed Schonberg <schonberg@adacore.com>
1212 * sem_ch13.adb (Is_Predicate_Static): An inherited predicate
1213 can be static only if it applies to a scalar type.
1215 2016-06-22 Ed Schonberg <schonberg@adacore.com>
1217 * exp_util.adb (Adjust_Result_Type): Convert operand to base
1218 type to prevent spurious constraint checks on subtypes of Boolean.
1220 2016-06-22 Bob Duff <duff@adacore.com>
1222 * debug.adb: Document debug switch -gnatd.o.
1223 * sem_elab.adb (Check_Internal_Call): Debug switch -gnatd.o
1224 now causes a more conservative treatment of indirect calls,
1225 treating P'Access as a call to P in more cases. We Can't make
1226 this the default, because it breaks common idioms, for example
1228 * sem_util.adb: Add an Assert.
1230 2016-06-22 Bob Duff <duff@adacore.com>
1232 * a-cuprqu.ads, a-cuprqu.adb: Completely rewrite this package. Use
1233 red-black trees, which gives O(lg N) worst-case performance on
1234 Enqueue and Dequeue. The previous version had O(N) Enqueue in
1237 2016-06-22 Arnaud Charlet <charlet@adacore.com>
1239 * sem_warn.adb: minor style fix in comment.
1240 * spark_xrefs.ads (Scope_Num): type refined to positive integers.
1241 * lib-xref-spark_specific.adb (Detect_And_Add_SPARK_Scope):
1242 moved into scope of Collect_SPARK_Xrefs.
1243 (Add_SPARK_Scope): moved into scope of Collect_SPARK_Xrefs;
1244 now uses Dspec and Scope_Id from Collect_SPARK_Xrefs.
1245 (Collect_SPARK_Xrefs): refactored to avoid retraversing the list
1247 * sem_ch3.adb (Build_Discriminal): Set Parent of the discriminal.
1249 2016-06-22 Arnaud Charlet <charlet@adacore.com>
1251 * lib-xref-spark_specific.adb (Generate_Dereference): Assignment to not
1252 commented local variables replaced with direct uses of their values.
1254 2016-06-22 Hristian Kirtchev <kirtchev@adacore.com>
1256 * exp_ch7.adb (Add_Invariant): Replace the
1257 current type instance with the _object parameter even in ASIS mode.
1258 (Build_Invariant_Procedure_Body): Do not insert the
1259 invariant procedure body into the tree for ASIS and GNATprove.
1260 (Build_Invariant_Procedure_Declaration): Do not insert the
1261 invariant procedure declaration into the tree for ASIS and
1263 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Update comment.
1265 2016-06-22 Ed Schonberg <schonberg@adacore.com>
1267 * sem_ch6.adb (Set_Actual_Subtypes): If the type of the actual
1268 has predicates, the actual subtype must be frozen properly
1269 because of the generated tests that may follow. The predicate
1270 may be specified by an explicit aspect, or may be inherited in
1273 2016-06-22 Ed Schonberg <schonberg@adacore.com>
1275 * exp_ch4.adb (In_Range_Chec)): New predicate, subsidiary of
1276 Expand_N_In: within an expanded range check that might raise
1277 Constraint_Error do not generate a predicate check as well. It
1278 is redundant because the context will add an explicit predicate
1279 check, and it will raise the wrong exception if it fails.
1280 * lib-xref-spark_specific.adb (Add_SPARK_File): Remove useless checks
1281 since dependency units always have an associated compilation unit.
1283 2016-06-22 Arnaud Charlet <charlet@adacore.com>
1285 * lib.ads: Code cleanup.
1286 * inline.adb: Type refinement for a counter variable.
1287 * lib-xref-spark_specific.adb (Add_SPARK_File): removal of no-op code.
1290 2016-06-21 Eric Botcazou <ebotcazou@adacore.com>
1292 * gcc-interface/decl.c (set_nonaliased_component_on_array_type): New
1294 (set_reverse_storage_order_on_array_type): Likewise.
1295 (gnat_to_gnu_entity) <E_Array_Type>: Call them to set the flags.
1296 <E_Array_Subtype>: Likewise.
1297 <E_String_Literal_Subtype>: Likewise.
1298 (substitute_in_type) <ARRAY_TYPE>: Likewise.
1299 * gcc-interface/utils.c (gnat_pushdecl): Always create a variant for
1300 the DECL_ORIGINAL_TYPE of a type.
1302 2016-06-20 Hristian Kirtchev <kirtchev@adacore.com>
1304 * make.adb, gnatbind.adb, g-socket.adb, sem_ch13.adb: Minor
1306 * lib.ads, sem_util.adb: Minor typo in comment.
1308 2016-06-20 Yannick Moy <moy@adacore.com>
1310 * sem_prag.adb, sem_prag.ads (Build_Pragma_Check_Equivalent):
1311 Add parameter Keep_Pragma_Id to optionally keep
1312 the identifier of the pragma instead of converting
1313 to pragma Check. Also set type of new function call
1314 appropriately. (Collect_Inherited_Class_Wide_Conditions):
1315 Call Build_Pragma_Check_Equivalent with the new parameter
1316 Keep_Pragma_Id set to True to keep the identifier of the copied
1318 * sinfo.ads: Add comment.
1320 2016-06-20 Hristian Kirtchev <kirtchev@adacore.com>
1322 * exp_ch7.adb (Build_Invariant_Procedure_Body):
1323 Always install the scope of the invariant procedure
1324 in order to produce better error messages. Do not
1325 insert the body when the context is a generic unit.
1326 (Build_Invariant_Procedure_Declaration): Perform minimal
1327 decoration of the invariant procedure and its formal parameter
1328 in case they are not analyzed. Do not insert the declaration
1329 when the context is a generic unit.
1331 2016-06-20 Ed Schonberg <schonberg@adacore.com>
1333 * sem_ch13.adb (Visible_Component): New procedure, subsidiary
1334 of Replace_Type_References_ Generic, to determine whether an
1335 identifier in a predicate or invariant expression is a visible
1336 component of the type to which the predicate or invariant
1337 applies. Implements the visibility rule stated in RM 13.1.1
1340 2016-06-20 Hristian Kirtchev <kirtchev@adacore.com>
1342 * s-regpat.adb, sem_prag.adb, pprint.adb, sem_ch13.adb: Minor
1345 2016-06-20 Tristan Gingold <gingold@adacore.com>
1347 * make.adb (Check_Standard_Library): Consider system.ads
1348 if s-stalib.adb is not available.
1349 * gnatbind.adb (Add_Artificial_ALI_File): New procedure extracted from
1352 2016-06-20 Thomas Quinot <quinot@adacore.com>
1354 * g-socket.adb (Is_IP_Address): A string consisting in digits only is
1357 2016-06-20 Arnaud Charlet <charlet@adacore.com>
1359 * exp_ch7.adb (Build_Invariant_Procedure_Body):
1360 decorate invariant procedure body with typical properties of
1363 2016-06-20 Arnaud Charlet <charlet@adacore.com>
1365 * a-exetim-darwin.adb: New file.
1367 2016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
1369 * atree.ads, atree.adb (Elist29): New routine.
1370 (Set_Elist29): New routine.
1371 * atree.h New definition for Elist29.
1372 * einfo.adb Subprograms_For_Type is now an Elist rather than
1373 a node. Has_Invariants is now a synthesized attribute
1374 and does not require a flag. Has_Own_Invariants
1375 is now Flag232. Has_Inherited_Invariants is
1376 Flag291. Is_Partial_Invariant_Procedure is Flag292.
1377 (Default_Init_Cond_Procedure): Reimplemented.
1378 (Has_Inherited_Invariants): New routine.
1379 (Has_Invariants): Reimplemented.
1380 (Has_Own_Invariants): New routine.
1381 (Invariant_Procedure): Reimplemented.
1382 (Is_Partial_Invariant_Procedure): New routine.
1383 (Partial_Invariant_Procedure): Reimplemented.
1384 (Predicate_Function): Reimplemented.
1385 (Predicate_Function_M): Reimplemented.
1386 (Set_Default_Init_Cond_Procedure): Reimplemented.
1387 (Set_Has_Inherited_Invariants): New routine.
1388 (Set_Has_Invariants): Removed.
1389 (Set_Has_Own_Invariants): New routine.
1390 (Set_Invariant_Procedure): Reimplemented.
1391 (Set_Is_Partial_Invariant_Procedure): New routine.
1392 (Set_Partial_Invariant_Procedure): Reimplemented.
1393 (Set_Predicate_Function): Reimplemented.
1394 (Set_Predicate_Function_M): Reimplemented.
1395 (Set_Subprograms_For_Type): Reimplemented.
1396 (Subprograms_For_Type): Reimplemented.
1397 (Write_Entity_Flags): Output Flag232 and Flag291.
1398 * einfo.ads Add new attributes Has_Inherited_Invariants
1399 Has_Own_Invariants Is_Partial_Invariant_Procedure
1400 Partial_Invariant_Procedure Change the documentation
1401 of attributes Has_Inheritable_Invariants Has_Invariants
1402 Invariant_Procedure Is_Invariant_Procedure Subprograms_For_Type
1403 (Has_Inherited_Invariants): New routine along with pragma Inline.
1404 (Has_Own_Invariants): New routine along with pragma Inline.
1405 (Is_Partial_Invariant_Procedure): New routine along with pragma Inline.
1406 (Partial_Invariant_Procedure): New routine.
1407 (Set_Has_Inherited_Invariants): New routine along with pragma Inline.
1408 (Set_Has_Invariants): Removed along with pragma Inline.
1409 (Set_Has_Own_Invariants): New routine along with pragma Inline.
1410 (Set_Is_Partial_Invariant_Procedure): New routine
1411 along with pragma Inline.
1412 (Set_Partial_Invariant_Procedure): New routine.
1413 (Set_Subprograms_For_Type): Update the signature.
1414 (Subprograms_For_Type): Update the signature.
1415 * exp_ch3.adb Remove with and use clauses for Sem_Ch13.
1416 (Build_Array_Invariant_Proc): Removed.
1417 (Build_Record_Invariant_Proc): Removed.
1418 (Freeze_Type): Build the body of the invariant procedure.
1419 (Insert_Component_Invariant_Checks): Removed.
1420 * exp_ch7.adb Add with and use clauses for Sem_Ch6, Sem_Ch13,
1422 (Build_Invariant_Procedure_Body): New routine.
1423 (Build_Invariant_Procedure_Declaration): New routine.
1424 * exp_ch7.ads (Build_Invariant_Procedure_Body): New routine.
1425 (Build_Invariant_Procedure_Declaration): New routine.
1426 * exp_ch9.adb (Build_Corresponding_Record): Do not propagate
1427 attributes related to invariants to the corresponding record
1428 when building the corresponding record. This is done by
1429 Build_Invariant_Procedure_Declaration.
1430 * exp_util.adb (Make_Invariant_Call): Reimplemented.
1431 * freeze.adb (Freeze_Array_Type): An array type requires an
1432 invariant procedure when its component type has invariants.
1433 (Freeze_Record_Type): A record type requires an invariant
1434 procedure when at least one of its components has an invariant.
1435 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Inherit
1436 invariant-related attributes.
1437 (Analyze_Subtype_Declaration):
1438 Inherit invariant-related attributes.
1439 (Build_Derived_Record_Type): Inherit invariant-related attributes.
1440 (Check_Duplicate_Aspects): Reimplemented.
1441 (Get_Partial_View_Aspect): New routine.
1442 (Process_Full_View): Inherit invariant-related attributes. Reimplement
1443 the check on hidden inheritance of class-wide invariants.
1444 (Remove_Default_Init_Cond_Procedure): Reimplemented.
1445 * sem_ch6.adb (Analyze_Subprogram_Specification): Do not modify
1446 the controlling type for an invariant procedure declaration
1448 (Is_Invariant_Procedure_Or_Body): New routine.
1449 * sem_ch7.adb (Analyze_Package_Specification): Build the partial
1450 invariant body in order to preanalyze and resolve all invariants
1451 of a private type at the end of the visible declarations. Build
1452 the full invariant body in order to preanalyze and resolve
1453 all invariants of a private type's full view at the end of
1454 the private declarations.
1455 (Preserve_Full_Attributes): Inherit invariant-related attributes.
1456 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Ensure that
1457 aspects are analyzed with the proper view when the protected type
1458 is a completion of a private type. Inherit invariant-related attributes.
1459 (Analyze_Task_Type_Declaration): Ensure that
1460 aspects are analyzed with the proper view when the task type
1461 is a completion of a private type. Inherit invariant-related
1463 * sem_ch13.adb Remove with and use clauses for Stringt.
1464 (Build_Invariant_Procedure_Declaration): Removed.
1465 (Build_Invariant_Procedure): Removed.
1466 (Freeze_Entity_Checks): Do not build the body of the invariant
1468 The body is built when the type is frozen in Freeze_Type.
1469 (Inherit_Aspects_At_Freeze_Point): Do not inherit any attributes
1470 related to invariants here because this leads to erroneous
1472 (Replace_Node): Rename to Replace_Type_Ref.
1473 * sem_ch13.ads (Build_Invariant_Procedure_Declaration): Removed.
1474 (Build_Invariant_Procedure): Removed.
1475 * sem_prag.adb Add with and use clauses for Exp_Ch7.
1476 (Analyze_Pragma): Reimplement the analysis of pragma Invariant.
1477 * sem_res.adb (Resolve_Actuals): Emit a specialized error when
1478 the context is an invariant.
1479 * sem_util.adb (Get_Views): New routine.
1480 (Incomplete_Or_Partial_View): Consider generic packages when
1481 examining declarations.
1482 (Inspect_Decls): Consider full type
1483 declarations because they may denote a derivation from a
1485 (Propagate_Invariant_Attributes): New routine.
1486 * sem_util.ads (Get_Views): New routine.
1487 (Propagate_Invariant_Attributes): New routine.
1489 2016-06-16 Arnaud Charlet <charlet@adacore.com>
1491 * pprint.adb (Expression_Image): Add better handling of UCs,
1492 we don't want to strip them all for clarity.
1495 2016-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1497 * exp_util.adb (Safe_Unchecked_Type_Conversion): Use "alignment"
1498 instead of "alignement".
1500 2016-06-16 Gary Dismukes <dismukes@adacore.com>
1502 * sem_util.adb: Minor typo fix.
1504 2016-06-16 Emmanuel Briot <briot@adacore.com>
1506 * s-regpat.adb: Further fix for invalid index in GNAT.Regexp.
1508 2016-06-16 Eric Botcazou <ebotcazou@adacore.com>
1510 * sem_ch13.adb (Validate_Address_Clauses): Use the same logic to
1511 issue the warning on the offset for the size as for the alignment
1512 and tweak the wording for the sake of consistency.
1514 2016-06-16 Ed Schonberg <schonberg@adacore.com>
1516 * sem_prag.adb (Check_Class_Wide_COndition): New procedure,
1517 subsidiary of Analyze_Pre_Post_ Condition_In_Decl_Part, to
1518 check legality rules that follow from the revised semantics of
1519 class-wide pre/postconditions described in AI12-0113.
1520 (Build_Pragma_Check_Equivalent): Abstract subprogram declarations
1521 must be included in list of overriding primitives of a derived
1524 2016-06-16 Ed Schonberg <schonberg@adacore.com>
1526 * sem_util.adb (May_Be_Lvalue): An actual in an unexpanded
1527 attribute reference 'Read is an assignment and must be considered
1528 a modification of the object.
1530 2016-06-16 Gary Dismukes <dismukes@adacore.com>
1532 * einfo.adb: Minor editorial.
1534 2016-06-16 Ed Schonberg <schonberg@adacore.com>
1536 * sem_prag.adb (Overridden_Ancestor): Clean up code to use
1537 controlling type of desired primitive rather than its scope,
1538 because the primitive that inherits the classwide condition may
1539 comes from several derivation steps.
1541 2016-06-16 Javier Miranda <miranda@adacore.com>
1543 * einfo.adb (Set_Default_Init_Cond_Procedure): Allow calls setting
1544 this attribute to Empty (only if the attribute has not been set).
1545 * sem_util.adb (Build_Default_Init_Cond_Procedure_Body):
1546 No action needed if the spec was not built.
1547 (Build_Default_Init_Cond_Procedure_Declaration): The spec is
1548 not built if DIC is set to NULL or no condition was specified.
1549 * exp_ch3.adb (Expand_N_Object_Declaration): Check availability
1550 of the Init_Cond procedure before generating code to call it.
1552 2016-06-16 Emmanuel Briot <briot@adacore.com>
1554 * s-regpat.adb: Fix invalid index check when matching end-of-line
1557 2016-06-16 Arnaud Charlet <charlet@adacore.com>
1559 * gnat1drv.adb: Minor reformatting.
1561 2016-06-16 Ed Schonberg <schonberg@adacore.com>
1563 * sem_ch3.adb (Check_Entry_Contracts): New procedure, subsidiary
1564 of Analyze_Declarations, that performs pre-analysis of
1565 pre/postconditions on entry declarations before full analysis
1566 is performed after entries have been converted into procedures.
1567 Done solely to capture semantic errors.
1568 * sem_attr.adb (Analyze_Attribute, case 'Result): Add guard to
1569 call to Denote_Same_Function.
1571 2016-06-16 Emmanuel Briot <briot@adacore.com>
1573 * g-comlin.adb: Fix minor memory leak in GNAT.Command_Line.
1575 2016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
1577 * exp_ch7.adb (Find_Last_Init): Remove obsolete code. The
1578 logic is now performed by Process_Object_Declaration.
1579 (Process_Declarations): Recognize a controlled deferred
1580 constant which is in fact initialized by means of a
1581 build-in-place function call as needing finalization actions.
1582 (Process_Object_Declaration): Insert the counter after the
1583 build-in-place initialization call for a controlled object. This
1584 was previously done in Find_Last_Init.
1585 * exp_util.adb (Requires_Cleanup_Actions): Recognize a controlled
1586 deferred constant which is in fact initialized by means of a
1587 build-in-place function call as needing finalization actions.
1589 2016-06-16 Justin Squirek <squirek@adacore.com>
1591 * exp_aggr.adb (Expand_Array_Aggregate): Minor comment changes and
1592 additional style fixes.
1593 * exp_ch7.adb: Minor typo fixes and reformatting.
1595 2016-06-16 Justin Squirek <squirek@adacore.com>
1597 * sem_ch3.adb (Analyze_Object_Declaration): Add a missing check
1598 for optimized aggregate arrays with qualified expressions.
1599 * exp_aggr.adb (Expand_Array_Aggregate): Fix block and
1600 conditional statement in charge of deciding whether to perform
1601 in-place expansion. Specifically, use Parent_Node to jump over
1602 the qualified expression to the object declaration node. Also,
1603 a check has been inserted to skip the optimization if SPARK 2005
1604 is being used in strict adherence to RM 4.3(5).
1606 2016-06-16 Tristan Gingold <gingold@adacore.com>
1608 * sem_prag.adb (Analyze_Pragma): Simplify code
1609 for Pragma_Priority.
1611 2016-06-16 Eric Botcazou <ebotcazou@adacore.com>
1613 * sem_util.ads (Indexed_Component_Bit_Offset): Declare.
1614 * sem_util.adb (Indexed_Component_Bit_Offset): New
1615 function returning the offset of an indexed component.
1616 (Has_Compatible_Alignment_Internal): Call it.
1617 * sem_ch13.adb (Offset_Value): New function returning the offset of an
1618 Address attribute reference from the underlying entity.
1619 (Validate_Address_Clauses): Call it and take the offset into
1620 account for the size warning.
1622 2016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
1624 * bindgen.adb, exp_util.adb, sem_ch9.adb, sem_util.adb: Minor
1627 2016-06-16 Gary Dismukes <dismukes@adacore.com>
1629 * sem_ch9.adb, sem_util.ads, sem_res.adb: Minor reformatting and typo
1632 2016-06-16 Javier Miranda <miranda@adacore.com>
1634 * sem_res.adb (Resolve): Under relaxed RM semantics silently
1635 replace occurrences of null by System.Null_Address.
1636 * sem_ch4.adb (Analyze_One_Call, Operator_Check): Under
1637 relaxed RM semantics silently replace occurrences of null by
1638 System.Null_Address.
1639 * sem_util.ad[sb] (Null_To_Null_Address_Convert_OK): New subprogram.
1640 (Replace_Null_By_Null_Address): New subprogram.
1642 2016-06-16 Bob Duff <duff@adacore.com>
1644 * exp_util.adb (Is_Controlled_Function_Call):
1645 This was missing the case where the call is in prefix format,
1646 with named notation, as in Obj.Func (Formal => Actual).
1648 2016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
1650 * exp_attr.adb, inline.adb, sem_attr.adb, sem_elab.adb: Minor
1653 2016-06-16 Bob Duff <duff@adacore.com>
1655 * sem_util.adb (Collect): Avoid Empty Full_T. Otherwise Etype
1656 (Full_T) crashes when assertions are on.
1657 * sem_ch12.adb (Matching_Actual): Correctly handle the case where
1658 "others => <>" appears in a generic formal package, other than
1661 2016-06-16 Arnaud Charlet <charlet@adacore.com>
1663 * usage.adb: Remove confusing comment in usage line.
1664 * bindgen.adb: Fix binder generated file in codepeer mode wrt
1667 2016-06-16 Javier Miranda <miranda@adacore.com>
1669 * restrict.adb (Check_Restriction_No_Use_Of_Entity): Avoid
1670 never-ending loop, code cleanup; adding also support for Text_IO.
1671 * sem_ch8.adb (Find_Expanded_Name): Invoke
1672 Check_Restriction_No_Use_Entity.
1674 2016-06-16 Tristan Gingold <gingold@adacore.com>
1676 * exp_ch9.adb: Minor comment fix.
1677 * einfo.ads (Has_Protected): Clarify comment.
1678 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Do not
1679 consider private protected types declared in the runtime for
1680 the No_Local_Protected_Types restriction.
1682 2016-06-14 Ed Schonberg <schonberg@adacore.com>
1684 * sem_ch6.adb (Set_Actual_Subtypes): Do not generate actual
1685 subtypes for unconstrained formals when analyzing the generated
1686 body of an expression function, because it may lead to premature
1687 and misplaced freezing of the types of formals.
1689 2016-06-14 Gary Dismukes <dismukes@adacore.com>
1691 * sem_elab.adb, sem_ch4.adb: Minor reformatting and typo fix.
1693 2016-06-14 Tristan Gingold <gingold@adacore.com>
1695 * einfo.adb (Set_Has_Timing_Event): Add assertion.
1696 * sem_util.ads, sem_util.adb (Propagate_Concurrent_Flags): New
1697 name for Propagate_Type_Has_Flags.
1698 * exp_ch3.adb, sem_ch3.adb, sem_ch7.adb, sem_ch9.adb: Adjust after
1701 2016-06-14 Bob Duff <duff@adacore.com>
1703 * sem_elab.adb (Check_A_Call): Do nothing if the callee is
1704 (or is in) an instance, and the caller is outside. Misc cleanup.
1706 2016-06-14 Javier Miranda <miranda@adacore.com>
1708 * sem_ch4.adb (Analyze_Quantified_Expression):
1709 Generating C code avoid spurious warning on loop variable of
1710 inlinined postconditions.
1712 2016-06-14 Javier Miranda <miranda@adacore.com>
1714 * sem_attr.adb (Analyze_Attribute_Old_Result): Adding assertion.
1715 (Analyze_Attribute [Attribute_Old]): Generating C handle
1716 analysis of 'old in inlined postconditions.
1717 (Analyze_Attribute [Attribute_Result]): Generating C handle analysis
1718 of 'result in inlined postconditions.
1719 * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Old]):
1720 Generating C handle expansion of 'old in inlined postconditions.
1721 * inline.adb (Declare_Postconditions_Result): New subprogram.
1722 * sem_ch12.adb (Copy_Generic_Node): Copy pragmas generated from
1723 aspects when generating C code since pre/post conditions are
1724 inlined and the frontend inlining relies on this routine to
1726 * exp_ch6.adb (Inlined_Subprogram): Replace Generate_C_Code
1727 by Modify_Tree_For_C.
1728 * exp_unst.adb (Visit_Node): Searching for up-level references
1729 skip entities defined in inlined subprograms.
1731 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
1733 * sem_ch7.adb, sem_ch12.adb, freeze.adb, lib-xref.ads, exp_ch3.adb:
1736 2016-06-14 Bob Duff <duff@adacore.com>
1738 * sem_elab.adb: Do nothing if the callee is intrinsic.
1739 * sinfo.ads, einfo.ads: Minor comment fixes.
1741 2016-06-14 Ed Schonberg <schonberg@adacore.com>
1743 * contracts.adb (Has_Null_Body): Move to sem_util, for general
1745 * sem_util.ads, sem_util.adb (Has_Null_Body): Predicate to
1746 determine when an internal procedure created for some assertion
1747 checking (e.g. type invariant) is a null procedure. Used to
1748 eliminate redundant calls to such procedures when they apply to
1749 components of composite types.
1750 * exp_ch3.adb (Build_Component_Invariant_Call): Do not add call
1751 if invariant procedure has a null body.
1753 2016-06-14 Thomas Quinot <quinot@adacore.com>
1755 * g-socket.ads (Check_Selector): Clarify effect on IN OUT socket
1758 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
1760 * exp_ch4.adb (Process_Action): Pass the action
1761 list to Process_Transient_Object.
1762 (Process_If_Case_Statements): Pass the action list to
1763 Process_Transient_Object.
1764 (Process_Transient_Object): Add new parameter Stmts and update the
1765 comment on usage. When the context is a Boolean evaluation, insert
1766 any finalization calls after the last statement of the construct.
1768 2016-06-14 Tristan Gingold <gingold@adacore.com>
1770 * einfo.adb, einfo.ads (Has_Timing_Event,
1771 Set_Has_Timing_Event): Add Has_Timing_Event flag.
1772 (Write_Entity_Flags): Display * sem_util.ads, sem_util.adb:
1773 (Propagate_Type_Has_Flags): New procedure to factorize code.
1774 * exp_ch3.adb (Expand_Freeze_Array_Type,
1775 Expand_Freeze_Record_Type): Call Propagate_Type_Has_Flags.
1776 * sem_ch3.adb (Access_Type_Decalaration): Initialize
1777 Has_Timing_Event flag. (Analyze_Object_Declaration):
1778 Move code that check No_Local_Timing_Events near
1779 the code that check No_Local_Protected_Objects.
1780 (Analyze_Private_Extension_Declaration, Array_Type_Declaration)
1781 (Build_Derived_Type, Copy_Array_Base_Type_Attributes,
1782 Process_Full_View) (Record_Type_Definition): Call
1783 Propagate_Type_Has_Flags.
1784 * sem_ch4.adb (Analyze_Allocator): Check No_Local_Timing_Events.
1785 * sem_ch7.adb (New_Private_Type): Set Has_Timing_Event on the
1787 (Uninstall_Declaration): Call Propagate_Type_Has_Flags.
1788 * sem_ch9.adb (Analyze_Protected_Definition): Call
1789 Propagate_Type_Has_Flags.
1791 2016-06-14 Arnaud Charlet <charlet@adacore.com>
1793 * sem.ads: Minor style fix.
1795 2016-06-14 Ed Schonberg <schonberg@adacore.com>
1797 * sem_ch12.adb (Analyze_Associations): An actual parameter
1798 with a box must be included in the count of actuals, to detect
1799 possible superfluous named actuals that do not match any of the
1800 formals of the generic unit in a formal package declaration.
1802 2016-06-14 Justin Squirek <squirek@adacore.com>
1804 * sem_ch3.adb (Analyze_Object_Declaration): Fix formatting
1805 of error output related to SPARK RM 6.1.7(3) and pragma
1807 * sem_ch4.adb (Analyze_Type_Conversion): Fix formatting of error
1808 output related to SPARK RM 6.1.7(3) and pragma Extensions_Visible.
1809 * sem_prag.adb (Analyze_Pragma): Fix formatting of error output
1810 related to SPARK RM 7.1.2(15) and pragma Volatile_Function
1811 so that the values True and False are no longer surrounded by
1813 * sem_res.adb (Resolve_Actuals): Fix formatting of error output
1814 related to SPARK RM 6.1.7(3) and pragma Extensions_Visible.
1816 2016-06-14 Arnaud Charlet <charlet@adacore.com>
1818 * gnat1drv.adb (Adjust_Global_Switches): Enable access checks
1820 * freeze.adb: Minor grammar fix in comment.
1821 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
1823 * lib.adb: Minor reformatting.
1824 * sem_util.adb (Is_OK_Volatile_Context): Do
1825 include Address in the supported attributes.
1827 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
1829 * exp_ch4.adb (Expand_N_Case_Expression):
1830 Code cleanup. Finalize any transient controlled
1831 objects on exit from a case expression alternative.
1832 (Expand_N_If_Expression): Code cleanup.
1833 (Process_Actions): Removed.
1834 (Process_If_Case_Statements): New routine.
1835 (Process_Transient_Object): Change the name of formal Rel_Node to
1836 N and update all occurrences. Update the comment on usage. When
1837 the type of the context is Boolean, the proper insertion point
1838 for the finalization call is after the last declaration.
1840 2016-06-14 Ed Schonberg <schonberg@adacore.com>
1842 * lib-xref.ads, lib-xref.adb (Has_Deferred_Reference): new
1843 predicate to determine whether an entity appears in a context
1844 for which a Deferred_Reference was created, because it is not
1845 possible to determine when reference is analyzed whether it
1846 appears in a context in which the entity is modified.
1847 * sem_ch5.adb (Analyze_Statement): Do not emit a useless warning
1848 on assignment for an entity that has a deferred_reference.
1850 2016-06-14 Javier Miranda <miranda@adacore.com>
1852 * sem_res.adb (Resolve_Actuals): Generate a reference to actuals that
1853 come from source. Previously the reference was generated only if the
1854 call comes from source but the call may be rewritten by the expander
1855 thus causing the notification of spurious warnings.
1857 2016-06-14 Arnaud Charlet <charlet@adacore.com>
1859 * gnat1drv.adb: Remove further references to AAMP.
1860 * checks.adb (Apply_Scalar_Range_Check): Take
1861 Check_Float_Overflow info account.
1862 * live.ads, live.adb Added subprogram headers and
1863 start-of-processing-for comments.
1864 * sem_ch12.adb (Instantiate_Package_Body): Do not suppress
1865 checks when instantiating runtime units in CodePeer mode.
1867 2016-06-14 Arnaud Charlet <charlet@adacore.com>
1869 * exp_ch3.adb (Expand_N_Object_Declaration): Only consider
1872 2016-06-14 Arnaud Charlet <charlet@adacore.com>
1874 * switch-c.adb, gnat1drv.adb (Adjust_Global_Switches): Only disable
1875 simple value propagation in CodePeer mode when warnings are disabled.
1876 (Scan_Front_End_Switches): Enable relevant front-end switches
1879 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
1881 * sem_util.adb (Is_OK_Volatile_Context): A
1882 reference to a volatile object is considered OK if appears as
1883 the prefix of attributes Address, Alignment, Component_Size,
1884 First_Bit, Last_Bit, Position, Size, Storage_Size.
1886 2016-06-14 Yannick Moy <moy@adacore.com>
1888 * lib-xref-spark_specific.adb (Add_SPARK_File): Do not traverse
1889 subunits directly, as they are already traversed as part of the
1890 top-level unit to which they belong.
1891 (Add_SPARK_Xrefs): Add assertions to ensure correct sorting.
1892 (Generate_Dereference): Use unique definition place for special
1893 variable __HEAP, to ensure correct sorting of references.
1894 * lib-xref.adb (Generate_Reference): Use top-level unit in case
1896 * lib.adb, lib.ads (Get_Top_Level_Code_Unit): New functions that
1897 compute the top-level code unit for a source location of AST node,
1898 that go past subunits.
1900 2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
1902 * gcc-interface/decl.c (gnat_to_gnu_subprog_type): Build only a minimal
1903 PARM_DECL when the parameter type is dummy.
1904 * gcc-interface/trans.c (Call_to_gnu): Translate formal types before
1907 2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
1909 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
1910 PLUS_EXPR in the expression of a renaming.
1912 2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
1914 * gcc-interface/utils2.c (known_alignment) <CALL_EXPR>: Deal specially
1915 with calls to malloc.
1917 2016-06-11 Eric Botcazou <ebotcazou@adacore.com>
1919 * gcc-interface/trans.c (build_binary_op_trapv): If no operand is a
1920 constant, use the generic implementation of the middle-end; otherwise
1921 turn the dynamic conditions into static conditions and simplify.
1923 2016-06-11 Eric Botcazou <ebotcazou@adacore.com>
1925 * gcc-interface/trans.c (Case_Statement_to_gnu): Deal with characters.
1927 2016-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1929 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not clobber
1930 gnat_entity_name with temporary names for XUP and XUT types.
1932 2016-06-10 Martin Sebor <msebor@redhat.com>
1935 * gcc/ada/gcc-interface/utils.c (handle_nonnull_attribute): Accept
1936 the nonnull attribute in type-generic builtins.
1938 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
1940 * gcc-interface/decl.c (Gigi_Equivalent_Type): Make sure equivalent
1941 types are present before returning them. Remove final assertion.
1942 (gnat_to_gnu_entity) <E_Access_Protected_Subprogram_Type>: Adjust to
1944 <E_Protected_Type>: Likewise.
1946 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
1948 * gcc-interface/trans.c (elaborate_all_entities_for_package): Also do
1949 not elaborate Itypes.
1951 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
1953 * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
1954 for noinline and noclone attributes.
1955 (handle_noinline_attribute): New handler.
1956 (handle_noclone_attribute): Likewise.
1958 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
1960 * gcc-interface/trans.c (process_type): Beef up comment.
1962 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
1964 * gcc-interface/utils2.c (build_call_alloc_dealloc): Do not substitute
1965 placeholder expressions here but...
1966 * gcc-interface/trans.c (gnat_to_gnu) <N_Free_Statement>: ...here.
1967 Make an exception to the protection of a CALL_EXPR result with an
1968 unconstrained type only in the same cases as Call_to_gnu.
1970 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
1972 * gcc-interface/trans.c (gnat_to_gnu): Rework special code dealing
1973 with boolean rvalues and set the location directly. Do not set the
1974 location in the other cases for a simple name.
1975 (gnat_to_gnu_external): Clear the location on the expression.
1977 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
1979 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Remove
1980 useless 'else' statements and tidy up.
1981 <E_Array_Subtype>: Fully deal with the declaration here.
1982 <E_Incomplete_Type>: Use properly-typed constant.
1983 Assert that we don't apply the special type treatment to dummy types.
1984 Separate this treatment from the final back-annotation and simplify
1985 the condition for the RM size.
1986 (gnat_to_gnu_param): Add GNU_PARAM_TYPE parameter and adjust.
1987 (gnat_to_gnu_subprog_type): Ajust call to gnat_to_gnu_param.
1988 * gcc-interface/trans.c (gnat_to_gnu) <N_Subprogram_Declaration>: Add
1990 (process_freeze_entity): Remove obsolete code.
1991 (process_type): Minor tweaks.
1993 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
1995 * einfo.ads (Returns_Limited_View): Remove.
1996 (Set_Returns_Limited_View ): Likewise.
1997 * einfo.adb (Returns_Limited_View): Likewise.
1998 (Set_Returns_Limited_View ): Likewise.
1999 * freeze.adb (Late_Freeze_Subprogram): Remove.
2000 (Freeze_Entity): Do not defer the freezing of functions returning an
2001 incomplete type coming from a limited context.
2003 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
2005 * gcc-interface/gigi.h (finish_subprog_decl): Add ASM_NAME parameter.
2006 * gcc-interface/decl.c (gnu_ext_name_for_subprog): New function.
2007 (gnat_to_gnu_entity) <E_Subprogram_Type>: Do not check compatibility
2008 of profiles for builtins here... Call gnu_ext_name_for_subprog.
2009 Also update profiles if pointers to limited_with'ed types are
2011 (gnat_to_gnu_param): Restore the correct source location information
2012 for vector ABI warnings.
2013 (associate_subprog_with_dummy_type): Add comment about AI05-019.
2014 Set TYPE_DUMMY_IN_PROFILE_P flag unconditionally.
2015 (update_profile): Deal with builtin declarations.
2016 Call gnu_ext_name_for_subprog. Adjust call to finish_subprog_decl.
2017 (update_profiles_with): Add comment.
2018 (gnat_to_gnu_subprog_type): Reuse the return type if it is complete.
2019 Likewise for parameter declarations in most cases. Do not change
2020 the return type for the CICO mechanism if the profile is incomplete.
2021 ...but here instead. Always reset the slot for the parameters.
2022 * gcc-interface/utils.c (create_subprog_decl): Call
2023 gnu_ext_name_for_subprog. Do not set the assembler name here but...
2024 (finish_subprog_decl): ...but here instead. Add ASM_NAME parameter.
2026 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
2028 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Insert the
2029 declaration of the corresponding record type before that of the
2030 unprotected version of the subprograms that operate on it.
2031 (Expand_Access_Protected_Subprogram_Type): Declare the Equivalent_Type
2032 just before the original type.
2033 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Point the current
2034 declaration to the newly created declaration for the primitive.
2035 (Analyze_Subtype_Declaration): Remove obsolete code forcing the
2036 freezing of the subtype before its declaration.
2037 (Replace_Anonymous_Access_To_Protected_Subprogram): Insert the new
2038 declaration in the nearest enclosing scope for formal parameters too.
2039 (Build_Derived_Access_Type): Restore the status of the created Itype
2040 after it is erased by Copy_Node.
2041 * sem_ch6.adb (Exchange_Limited_Views): Remove guard on entry.
2042 (Analyze_Subprogram_Body_Helper): Call Exchange_Limited_Views only if
2043 the specification is present.
2044 Move around the code changing the designated view of the return type
2045 and save the original view. Restore it on exit.
2046 * sem_ch13.adb (Build_Predicate_Function_Declaration): Always insert
2047 the declaration right after that of the type.
2049 2016-06-01 Simon Wright <simon@pushface.org>
2052 * g-comlin.adb (Display_Section_Help): Do not dereference
2053 Config.Switches if it's null.
2056 2016-05-31 Eric Botcazou <ebotcazou@adacore.com>
2058 * s-osinte-kfreebsd-gnu.ads (clock_getres): Define.
2059 (Get_Page_Size): Remove duplicate and return int.
2061 2016-05-31 Jan Sommer <soja-lists@aries.uberspace.de>
2064 * s-osinte-rtems.ads (clock_getres): Define.
2065 (Get_Page_Size): Remove duplicate and return int.
2067 2016-05-20 Eric Botcazou <ebotcazou@adacore.com>
2069 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
2070 Make same-sized subtypes of signed base types signed.
2071 * gcc-interface/utils.c (make_type_from_size): Adjust to above change.
2072 (unchecked_convert): Likewise.
2074 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
2076 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Do not build
2077 a specific type for the object if it is deemed a constant.
2079 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
2081 * freeze.adb (Freeze_Record_Type): Extend pragma Implicit_Packing to
2082 components of any elementary types and of composite types.
2084 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
2086 * freeze.adb (Freeze_Array_Type): Call Addressable predicate instead
2087 of testing for individual sizes.
2088 (Freeze_Entity): Rework implementation of pragma Implicit_Packing for
2089 array types, in particular test for suitable sizes upfront and do not
2090 mimic the processing that will be redone later in Freeze_Array_Type.
2092 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
2094 * gcc-interface/trans.c (elaborate_all_entities_for_package): Also skip
2097 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
2099 * doc/gnat_rm/implementation_defined_attributes.rst
2100 (Scalar_Storage_Order): Adjust restriction for packed array types.
2101 * einfo.ads (Is_Bit_Packed_Array): Adjust description.
2102 (Is_Packed): Likewise.
2103 (Is_Packed_Array_Impl_Type): Likewise.
2104 (Packed_Array_Impl_Type): Likewise.
2105 * exp_ch4.adb (Expand_N_Indexed_Component): Do not do anything special
2106 if the prefix is not a packed array implemented specially.
2107 * exp_ch6.adb (Expand_Actuals): Expand indexed components only for
2108 bit-packed array types.
2109 * exp_pakd.adb (Install_PAT): Set Is_Packed_Array_Impl_Type flag on
2110 the PAT before analyzing its declaration.
2111 (Create_Packed_Array_Impl_Type): Remove redundant statements.
2112 * freeze.adb (Check_Component_Storage_Order): Reject packed array
2113 components only if they are bit packed.
2114 (Freeze_Array_Type): Fix logic detecting bit packing and do not bit
2115 pack for composite types whose size is multiple of a byte.
2116 Create the implementation type for packed array types only when it is
2117 needed, i.e. bit packing or packing because of holes in index types.
2118 Make sure the Has_Non_Standard_Rep and Is_Packed flags agree.
2119 * gcc-interface/gigi.h (make_packable_type): Add MAX_ALIGN parameter.
2120 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
2121 Call maybe_pad_type instead of building the padding type manually.
2122 (gnat_to_gnu_entity) <E_Array_Subtype>: Do not assert that
2123 Packed_Array_Impl_Type is present for packed arrays.
2124 (gnat_to_gnu_component_type): Also handle known alignment for packed
2125 types by passing it to make_packable_type.
2126 * gcc-interface/utils.c (make_packable_type): Add MAX_ALIGN parameter
2127 and deal with it in the array case. Adjust recursive call. Simplify
2128 computation of new size and cap the alignment to BIGGEST_ALIGNMENT.
2130 2016-05-16 Thomas Quinot <quinot@adacore.com>
2132 * freeze.adb (Check_Component_Storage_Order): Also get full view of
2135 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
2137 * exp_util.adb (Remove_Side_Effects): Also make a constant if we need
2138 to capture the value for a small not by-reference record type.
2139 * freeze.ads (Check_Compile_Time_Size): Adjust comment.
2140 * freeze.adb (Set_Small_Size): Likewise. Accept a size in the range
2142 (Check_Compile_Time_Size): Merge scalar and access type cases. Change
2143 variable name in array type case. For the computation of the packed
2144 size, deal with record components and remove redundant test.
2145 (Freeze_Array_Type): Also adjust packing status when the size of the
2146 component type is in the range 33 .. 64 bits.
2147 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Turn primitive
2148 into elementary type throughout. Minor tweaks.
2149 (Alignment Clauses): Document actual alignment of packed array types.
2150 (Pragma Pack for Arrays): List only the 3 main cases and adjust. Add
2151 "simple" to the record case. Document effect on non packable types.
2152 (Pragma Pack for Records): Likewise. Add record case and adjust.
2154 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
2156 * gcc-interface/Make-lang.in (GNATMAKE_FOR_HOST): In the canadian
2157 cross case, use host_noncanonical instead of host as prefix.
2158 (GNATBIND_FOR_HOST): Likewise.
2159 (GNATLINK_FOR_HOST): Likewise.
2160 (GNATLS_FOR_HOST): Likewise.
2162 2016-05-06 Eric Botcazou <ebotcazou@adacore.com>
2165 * system-darwin-ppc64.ads: Add pragma No_Elaboration_Code_All.
2166 * system-linux-armeb.ads: Likewise.
2167 * system-linux-mips64el.ads: Likewise.
2168 * system-linux-mips.ads: Likewise.
2169 * system-linux-mipsel.ads: Likewise.
2170 * system-linux-ppc64.ads: Likewise.
2171 * system-linux-sparcv9.ads: Likewise.
2172 * system-rtems.ads: Likewise.
2174 2016-05-04 Samuel Thibault <samuel.thibault@ens-lyon.org>
2176 * s-osinte-gnu.ads (Get_Page_Size): Return int and use getpagesize
2177 instead of __getpagesize.
2179 2016-05-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2181 * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
2184 2016-05-02 Tristan Gingold <gingold@adacore.com>
2186 * fname.adb (Is_Predefined_File_Name): Also consider non-krunched
2189 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2191 * sem_util.adb (Aggregate_Constraint_Checks): Separate
2192 accessibility checks and non-null checks for aggregate components,
2193 to prevent spurious accessibility errors.
2195 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2197 * sem_ch3.adb (OK_For_Limited_Init): A type conversion is not
2198 always legal in the in-place initialization of a limited entity
2199 (e.g. an allocator).
2200 * sem_res.adb (Resolve_Allocator): Improve error message with RM
2201 reference when allocator expression is illegal.
2203 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2205 * exp_ch6.adb (Expand_Call): When inlining a call to a function
2206 declared in a package instance, locate the instance node of the
2207 package after the actual package declaration. skipping over
2208 pragmas that may have been introduced when the generic unit
2209 carries aspects that are transformed into pragmas.
2211 2016-05-02 Bob Duff <duff@adacore.com>
2213 * s-memory.adb (Alloc, Realloc): Move checks
2214 for Size = 0 or size_t'Last into the Result = System.Null_Address
2215 path for efficiency. Improve comments (based on actual C language
2216 requirements for malloc).
2217 * exp_util.adb (Build_Allocate_Deallocate_Proc): Optimize the
2218 case where we are using the default Global_Pool_Object, and we
2219 don't need the heavy finalization machinery.
2221 2016-05-02 Gary Dismukes <dismukes@adacore.com>
2223 * exp_util.ads, sem_ch12.adb: Minor reformatting.
2225 2016-05-02 Javier Miranda <miranda@adacore.com>
2227 * exp_util.ads, exp_util.adb (Force_Evaluation): Adding new formal.
2228 (Remove_Side_Effects): Adding a new formal.
2229 * exp_ch6.adb (Expand_Simple_Function_Return): Generating the
2230 call to the _Postconditions procedure ensure that side-effects
2231 are unconditionally removed.
2233 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2235 * sem_ch12.adb (Check_Formal_Package_Instance, Check_Mismatch):
2236 Use original node to determine whether the declaration is for
2237 a formal type declaration, to take into account that formwl
2238 private types are rewritten as private extension declarations
2239 to simplify semantic analysis.
2241 2016-05-02 Gary Dismukes <dismukes@adacore.com>
2243 * exp_ch9.adb, sem_ch6.adb, sem_ch6.ads: Minor reformatting and typo
2246 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2248 * sem_ch3.adb, exp_ch9.adb, einfo.adb, sem_ch4.adb, sem_ch6.adb: Minor
2251 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2253 * exp_ch4.adb (Expand_N_Allocator): If the designated type
2254 is a private derived type with no discriminants, examine its
2255 underlying_full_view to determine whether the full view has
2256 defaulted discriminants, so their defaults can be used in the
2257 call to the initialization procedure for the designated object.
2259 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2261 * exp_prag.adb, comperr.adb: Minor reformatting.
2263 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2265 * exp_pakd.adb (Rj_Unchecked_Convert_To): Do not perform an
2266 unchecked conversion if the source size is 0 (indicating that
2267 its RM size is unknown). This will happen with packed arrays of
2268 non-discrete types, in which case the component type is known
2271 2016-05-02 Arnaud Charlet <charlet@adacore.com>
2273 * debug.adb: Reserve -gnatd.V.
2275 2016-05-02 Javier Miranda <miranda@adacore.com>
2277 * sem_ch3.adb (Process_Full_View): Remove from visibility
2278 wrappers of synchronized types to avoid spurious errors with
2279 their wrapped entity.
2280 * exp_ch9.adb (Build_Wrapper_Spec): Do not generate the wrapper
2281 if no interface primitive is covered by the subprogram and this is
2282 not a primitive declared between two views; see Process_Full_View.
2283 (Build_Protected_Sub_Specification): Link the dispatching
2284 subprogram with its original non-dispatching protected subprogram
2285 since their names differ.
2286 (Expand_N_Protected_Type_Declaration):
2287 If a protected subprogram overrides an interface primitive then
2288 do not build a wrapper if it was already built.
2289 * einfo.ads, einfo.adb (Original_Protected_Subprogram): New attribute.
2290 * sem_ch4.adb (Names_Match): New subprogram.
2291 * sem_ch6.adb (Check_Synchronized_Overriding): Moved
2292 to library level and defined in the public part of the
2293 package to invoke it from Exp_Ch9.Build_Wrapper_Spec
2294 (Has_Matching_Entry_Or_Subprogram): New subprogram.
2295 (Report_Conflict): New subprogram.
2297 2016-05-02 Jerome Lambourg <lambourg@adacore.com>
2299 * s-unstyp.ads: Code cleanups.
2301 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2303 * sem_ch13.adb (Size_Too_Small_Error): Fix the error message format.
2305 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2307 * exp_prag.adb (Expand_attributes_In_Consequence,
2308 Expand_Attributes): If the prefix of'Old is an unconstrained type,
2309 for example an unconstrained formal of the enclosing subprogram,
2310 create an object declaration with an expression to obtain the
2311 actual subtype of the temporary.
2313 2016-05-02 Arnaud Charlet <charlet@adacore.com>
2315 * comperr.adb (Delete_SCIL_Files): Add missing handling of
2316 N_Subprogram_Declaration.
2318 2016-05-02 Gary Dismukes <dismukes@adacore.com>
2320 * exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, checks.adb, sem_attr.adb,
2321 gnat1drv.adb, sem_ch4.adb, sem_ch13.adb: Minor reformatting and typo
2323 * sem_prag.adb, sem_ch12.adb: Minor typo fixes.
2325 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2327 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): The
2328 function call may be wrapped in an explicit type conversion.
2330 2016-05-02 Jerome Lambourg <lambourg@adacore.com>
2332 * interfac.ads: use pragma No_Elaboration_Code_All.
2333 * s-unstyp.ads: s-unstyp.ads: use pragma No_Elaboration_Code_All.
2335 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2337 * sem.adb (Analyze: If node is an error node previously created
2338 by the parser, disable expansion to prevent subsequent glitches
2341 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2343 * sem_ch13.adb (Alignment_Error): Removed.
2344 (Get_Alignment_Value): Code cleanup.
2346 2016-05-02 Tristan Gingold <gingold@adacore.com>
2348 * sem_ch3.adb (Analyze_Object_Declaration): Use Has_Protected
2349 to check for the no local protected objects restriction.
2351 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2353 * einfo.adb Anonymous_Master now uses Node35.
2354 (Anonymous_Master): Update the assertion and node reference.
2355 (Set_Anonymous_Master): Update the assertion and node reference.
2356 (Write_Field35_Name): Add output for Anonymous_Master.
2357 (Write_Field36_Name): The output is now undefined.
2358 * einfo.ads Update the node and description of attribute
2359 Anonymous_Master. Remove prior occurrences in entities as this
2360 is now a type attribute.
2361 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove local variable
2362 Ins_Node. Anonymous access- to-controlled component types no
2363 longer need finalization masters. The master is now built when
2364 a related allocator is expanded.
2365 (Expand_Freeze_Record_Type): Remove local variable Has_AACC. Do not
2366 detect whether the record type has at least one component of anonymous
2367 access-to- controlled type. These types no longer need finalization
2368 masters. The master is now built when a related allocator is expanded.
2369 * exp_ch4.adb Remove with and use clauses for Lib and Sem_Ch8.
2370 (Current_Anonymous_Master): Removed.
2371 (Expand_N_Allocator): Call Build_Anonymous_Master to create a
2372 finalization master for an anonymous access-to-controlled type.
2373 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
2374 Call routine Build_Anonymous_Master to create a finalization master
2375 for an anonymous access-to-controlled type.
2376 * exp_ch7.adb (Allows_Finalization_Master): New routine.
2377 (Build_Anonymous_Master): New routine.
2378 (Build_Finalization_Master): Remove formal parameter
2379 For_Anonymous. Use Allows_Finalization_Master to determine whether
2380 circumstances warrant a finalization master. This routine no
2381 longer creates masters for anonymous access-to-controlled types.
2382 (In_Deallocation_Instance): Removed.
2383 * exp_ch7.ads (Build_Anonymous_Master): New routine.
2384 (Build_Finalization_Master): Remove formal parameter For_Anonymous
2385 and update the comment on usage.
2386 * sem_util.adb (Get_Qualified_Name): New routines.
2387 (Output_Name): Reimplemented.
2388 (Output_Scope): Removed.
2389 * sem_util.ads (Get_Qualified_Name): New routines.
2391 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2393 * debug.adb: Document the use of switch -gnatd.H.
2394 * gnat1drv.adb (Adjust_Global_Switches): Set ASIS_GNSA mode when
2395 -gnatd.H is present.
2396 (Gnat1drv): Suppress the call to gigi when ASIS_GNSA mode is active.
2397 * opt.ads: Add new option ASIS_GNSA_Mode.
2398 * sem_ch13.adb (Alignment_Error): New routine.
2399 (Analyze_Attribute_Definition_Clause): Suppress certain errors in
2400 ASIS mode for attribute clause Alignment, Machine_Radix, Size, and
2402 (Check_Size): Use routine Size_Too_Small_Error to
2403 suppress certain errors in ASIS mode.
2404 (Get_Alignment_Value): Use routine Alignment_Error to suppress certain
2405 errors in ASIS mode.
2406 (Size_Too_Small_Error): New routine.
2408 2016-05-02 Arnaud Charlet <charlet@adacore.com>
2410 * spark_xrefs.ads Description of the spark cross-references
2411 clarified; small style fixes.
2412 * lib-xref-spark_specific.adb (Add_SPARK_Scope,
2413 Detect_And_Add_SPARK_Scope): consider protected types and bodies
2414 as yet another scopes.
2415 (Enclosing_Subprogram_Or_Library_Package): refactored using
2416 Hristian's suggestions; added support for scopes of protected
2417 types and bodies; fix for entries to return the scope of the
2418 enclosing concurrent type, which is consistent with what is
2419 returned for protected subprograms.
2420 * sem_intr.adb: Minor style fix in comment.
2422 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2424 * lib-xref.ads, lib-xref-spark_specific.adb, get_spark_xrefs.adb,
2425 put_spark_xrefs.adb: Minor reformatting.
2427 2016-05-02 Doug Rupp <rupp@adacore.com>
2429 * g-traceb.ads: Document traceback for ARM.
2431 2016-05-02 Javier Miranda <miranda@adacore.com>
2433 * exp_disp.adb (Make_Tags): Do not generate the
2434 external name of interface tags adding the suffix counter since
2435 it causes problems at link time when the IP routines are inlined
2436 across units with optimization.
2438 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2440 * einfo.ads, einfo.adb (Predicates_Ignared): new flag to indicate
2441 that predicate checking is disabled for predicated subtypes in
2442 the context of an Assertion_Policy pragma.
2443 * checks.adb (Apply_Predicate_Check): Do nothing if
2444 Predicates_Ignored is true.
2445 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): If
2446 Predicates_Ignores is true, the function Rep_To_Pos does raise
2447 an exception for invalid data.
2448 * exp_ch4.adb (Expand_N_Type_Conversion): IF target is a predicated
2449 type do not apply check if Predicates_Ignored is true.
2450 * exp_ch5.adb (Expand_N_Case_Statement): If Predicates_Ignored
2451 is true, sem_prag.adb:
2452 * sem_ch3.adb (Analyze_Object_Declaration): If Predicates_Ignored
2453 is true do not emit predicate check on initializing expression.
2455 2016-05-02 Arnaud Charlet <charlet@adacore.com>
2457 * get_spark_xrefs.adb (Get_Nat, Get_Name): Initialize variables when
2458 they are declared; refine type of a counter from Integer to Natural.
2459 * sem_ch5.adb, gnatcmd.adb, s-intman-posix.adb, eval_fat.adb,
2460 prj.adb, sem_util.adb, s-intman-android.adb, prj-nmsc.adb, sem_ch8.adb,
2461 exp_ch3.adb: Minor editing.
2463 2016-05-02 Yannick Moy <moy@adacore.com>
2465 * a-tigeli.adb (Get_Line): Always set Last prior to returning.
2467 2016-05-02 Yannick Moy <moy@adacore.com>
2469 * lib-xref.adb: Minor style fix in whitespace of declarations.
2470 * put_spark_xrefs.adb (Put_SPARK_Xrefs): printing of strings
2471 refactored without loops.
2472 * put_spark_xrefs.ads (Write_Info_Str): new formal argument of
2474 * spark_xrefs.adb (Write_Info_Str): new actual in instantiation
2475 of generic procedure.
2477 2016-05-02 Arnaud Charlet <charlet@adacore.com>
2479 * lib-xref-spark_specific.adb (Add_SPARK_Scope): add task type scope.
2480 (Detect_And_Add_SPARK_Scope): detect and add task type scope.
2481 (Enclosing_Subprogram_Or_Package): Respect boundaries of task
2482 and entry declarations.
2483 * spark_xrefs.ads: minor typo in comment.
2485 2016-05-02 Arnaud Charlet <charlet@adacore.com>
2487 * make.adb: Minor: avoid an exception when calling gnatmake with
2488 no argument and gnatmake is built with checks on.
2489 * lib-xref-spark_specific.adb: Minor code cleanup.
2491 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2493 * sem_util.adb (Normalize_Actuals): Take into account extra
2494 actuals that may have been introduced previously. Normally extra
2495 actuals are introduced when a call is expanded, but a validity
2496 check may copy and reanalyze a call that carries an extra actual
2497 (e.g. an accessibility parameter) before the call itself is
2498 marked Analzyed, and the analysis of the copy has to be able to
2499 cope with the added actual.
2501 2016-05-02 Bob Duff <duff@adacore.com>
2503 * sem_ch10.adb (Analyze_Compilation_Unit): Preserve
2504 treeishness. Previous version had Context_Items shared between
2507 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2509 * sem_aggr.adb (Resolve_Aggr_Expression): For both array and
2510 record cases, apply predicate check on component for expression
2511 only if expression has been analyzed already. For expressions
2512 that need to be duplicated when they cover multiple components,
2513 resolution and predicate checking take place later.
2515 2016-05-02 Olivier Hainque <hainque@adacore.com>
2517 * a-direct.adb (Delete_Tree): Use full names to designate subdirs
2518 and files therein, instead of local names after a change of
2521 2016-05-02 Thomas Quinot <quinot@adacore.com>
2523 * freeze.adb (Check_Component_Storage_Order): Get full view of
2526 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2528 * checks.adb, freeze.adb, sem_res.adb, s-stposu.adb, repinfo.adb:
2531 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
2533 * sem_ch4.adb (Find_Indexing_Operations): Use the underlying type
2534 of the container base type in case the container is a subtype.
2535 * sem_ch5.adb (Analyze_Iterator_Specification): Ensure that
2536 the selector has an entity when checking for a component of a
2539 2016-05-02 Arnaud Charlet <charlet@adacore.com>
2542 * opt.ads (Latest_Ada_Only): New flag.
2543 * sem_prag.adb, par-prag.adb: Ignore pragma Ada_xx under this flag.
2544 * usage.adb, switch-c.adb: Disable support for -gnatxx under this flag.
2545 * einfo.ads (Has_Predicates, Predicate_Function):
2546 Clarify that Has_Predicates does not imply that Predicate_Function
2547 will return a non-empty entity.
2549 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2551 * sem_res.adb (Resolve_Qualified_Expression): Generate a predicate
2552 check if type requires it.
2553 * checks.adb (Apply_Predicate_Check): Disable checks in the
2554 object declaration created for an expression with side-effects
2555 that requires a predicate check to prevent infinite recursion
2558 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2560 * sem_ch6.adb (Process_Formals): Check properly the type of a
2561 formal to determine whether a given convention applies to it.
2563 2016-05-02 Doug Rupp <rupp@adacore.com>
2565 * tracebak.c: Add incantations for arm-vxworks[67] traceback.
2567 2016-05-02 Thomas Quinot <quinot@adacore.com>
2569 * freeze.adb (Check_Component_Storage_Order): Make it a warning, not an
2570 error, to have a component with implicit SSO within a composite type
2571 that has explicit SSO.
2573 2016-05-02 Bob Duff <duff@adacore.com>
2575 * s-stposu.adb (Allocate_Any_Controlled): Don't lock/unlock twice.
2577 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2579 * repinfo.adb (List_Entities): Make procedure recursive, to
2580 provide representation information for subprograms declared
2581 within subprogram bodies.
2583 2016-05-02 Arnaud Charlet <charlet@adacore.com>
2585 * exp_ch5.adb, layout.adb, gnatcmd.adb exp_attr.adb, make.adb,
2586 bindgen.adb, debug.adb, exp_pakd.adb, freeze.adb, sem_util.adb,
2587 gnatlink.adb, switch-m.adb, exp_ch4.adb, repinfo.adb, adabkend.adb,
2588 osint.adb: Remove dead code.
2590 2016-05-02 Yannick Moy <moy@adacore.com>
2592 * a-tigeli.adb (Get_Line): Fix bound for test to
2593 decide when to compensate for character 0 added by call to fgets.
2595 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2597 * sem_ch4.adb (Analyze_Allocator): If the expression does not
2598 have a subtype indication and the type is an unconstrained tagged
2599 type with defaulted discriminants, create an explicit constraint
2600 for it during analysis to prevent out-of-order freezing actions
2601 on generated classwide types.
2603 2016-05-02 Javier Miranda <miranda@adacore.com>
2605 * exp_ch5.adb (Expand_N_Assignment_Statement):
2606 In the runtime check that ensures that the tags of source an
2607 target match, add missing displacement of the pointer to the
2608 objects if they cover interface types.
2610 2016-05-02 Ed Schonberg <schonberg@adacore.com>
2612 * sem_attr.adb (Analyze_Attribute, case 'Old): Do not use
2613 base type for attribute when type is discrete: transformation
2614 is not needed for such types, and leads to spurious errors if
2615 the context is a case construct.
2617 2016-05-02 Eric Botcazou <ebotcazou@adacore.com>
2619 * gcc-interface/decl.c (elaborate_reference_1): Do not bother about
2620 operand #2 for COMPONENT_REF.
2621 * gcc-interface/utils2.c (gnat_save_expr): Likewise.
2622 (gnat_protect_expr): Likewise.
2623 (gnat_stabilize_reference_1): Likewise.
2624 (gnat_rewrite_reference): Do not bother about operand #3 for ARRAY_REF.
2625 (get_inner_constant_reference): Likewise.
2626 (gnat_invariant_expr): Likewise.
2627 * gcc-interface/trans.c (fold_constant_decl_in_expr): Likewise.
2629 2016-05-02 Eric Botcazou <ebotcazou@adacore.com>
2631 * gcc-interface/trans.c (Range_to_gnu): New static function.
2632 (Raise_Error_to_gnu) <N_In>: Call it to translate the range.
2633 (gnat_to_gnu) <N_In>: Likewise.
2635 2016-04-30 Eric Botcazou <ebotcazou@adacore.com>
2637 * gcc-interface/Make-lang.in (ACATSCMD): New variable.
2638 (check-acats): Use it.
2639 (check_acats_targets): Likewise.
2641 2016-04-28 Eric Botcazou <ebotcazou@adacore.com>
2644 * a-textio.adb (Get_Immediate): Add missing 'not' in expression.
2646 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
2648 * sem_aux.adb (Is_By_Reference_Type): Also return true for a tagged
2649 incomplete type without full view.
2650 * sem_ch6.adb (Exchange_Limited_Views): Change into a function and
2651 return the list of changes.
2652 (Restore_Limited_Views): New procedure to undo the transformation made
2653 by Exchange_Limited_Views.
2654 (Analyze_Subprogram_Body_Helper): Adjust call to Exchange_Limited_Views
2655 and call Restore_Limited_Views at the end, if need be.
2656 (Possible_Freeze): Do not delay freezing because of incomplete types.
2657 (Process_Formals): Remove kludges for class-wide types.
2658 * types.h (By_Copy_Return): Delete.
2659 * gcc-interface/ada-tree.h (TYPE_MAX_ALIGN): Move around.
2660 (TYPE_DUMMY_IN_PROFILE_P): New macro.
2661 * gcc-interface/gigi.h (update_profiles_with): Declare.
2662 (finish_subprog_decl): Likewise.
2663 (get_minimal_subprog_decl): Delete.
2664 (create_subprog_type): Likewise.
2665 (create_param_decl): Adjust prototype.
2666 (create_subprog_decl): Likewise.
2667 * gcc-interface/decl.c (defer_limited_with): Rename into...
2668 (defer_limited_with_list): ...this.
2669 (gnat_to_gnu_entity): Adjust to above renaming.
2670 (finalize_from_limited_with): Likewise.
2671 (tree_entity_vec_map): New structure.
2672 (gt_pch_nx): New helpers.
2673 (dummy_to_subprog_map): New hash table.
2674 (gnat_to_gnu_param): Set the SLOC here. Remove MECH parameter and
2675 add FIRST parameter. Deal with the mechanism here instead of...
2676 Do not make read-only variant of types. Simplify expressions.
2677 In the by-ref case, test the mechanism before must_pass_by_ref
2678 and also TYPE_IS_BY_REFERENCE_P before building the reference type.
2679 (gnat_to_gnu_subprog_type): New static function extracted from...
2680 Do not special-case the type_annotate_only mode. Call
2681 gnat_to_gnu_profile_type instead of gnat_to_gnu_type on return type.
2682 Deal with dummy return types. Likewise for parameter types. Deal
2683 with by-reference types explicitly and add a kludge for null procedures
2684 with untagged incomplete types. Remove assertion on the types and be
2685 prepared for multiple elaboration of the declarations. Skip the whole
2686 CICO processing if the profile is incomplete. Handle the completion of
2687 a previously incomplete profile.
2688 (gnat_to_gnu_entity) <E_Variable>: Rename local variable.
2689 Adjust couple of calls to create_param_decl.
2690 <E_Access_Subprogram_Type, E_Anonymous_Access_Subprogram_Type>:
2691 Remove specific deferring code.
2692 <E_Access_Type>: Also deal with E_Subprogram_Type designated type.
2693 Simplify handling of dummy types and remove obsolete comment.
2694 Constify a couple of variables. Do not set TYPE_UNIVERSAL_ALIASING_P
2696 <E_Access_Subtype>: Tweak comment and simplify condition.
2697 <E_Subprogram_Type>: ...here. Call it and clean up handling. Remove
2698 obsolete comment and adjust call to gnat_to_gnu_param. Adjust call to
2699 create_subprog_decl.
2700 <E_Incomplete_Type>: Add a couple of 'const' qualifiers and get rid of
2701 inner break statements. Tidy up condition guarding direct use of the
2703 (get_minimal_subprog_decl): Delete.
2704 (finalize_from_limited_with): Call update_profiles_with on dummy types
2705 with TYPE_DUMMY_IN_PROFILE_P set.
2706 (is_from_limited_with_of_main): Delete.
2707 (associate_subprog_with_dummy_type): New function.
2708 (update_profile): Likewise.
2709 (update_profiles_with): Likewise.
2710 (gnat_to_gnu_profile_type): Likewise.
2711 (init_gnat_decl): Initialize dummy_to_subprog_map.
2712 (destroy_gnat_decl): Destroy dummy_to_subprog_map.
2713 * gcc-interface/misc.c (gnat_get_alias_set): Add guard for accessing
2714 TYPE_UNIVERSAL_ALIASING_P.
2715 (gnat_get_array_descr_info): Minor tweak.
2716 * gcc-interface/trans.c (gigi): Adjust calls to create_subprog_decl.
2717 (build_raise_check): Likewise.
2718 (Compilation_Unit_to_gnu): Likewise.
2719 (Identifier_to_gnu): Accept mismatches coming from a limited context.
2720 (Attribute_to_gnu): Remove kludge for dispatch table entities.
2721 (process_freeze_entity): Do not retrieve old definition if there is an
2722 address clause on the entity. Call update_profiles_with on dummy types
2723 with TYPE_DUMMY_IN_PROFILE_P set.
2724 * gcc-interface/utils.c (build_dummy_unc_pointer_types): Also set
2725 TYPE_REFERENCE_TO to the fat pointer type.
2726 (create_subprog_type): Delete.
2727 (create_param_decl): Remove READONLY parameter.
2728 (finish_subprog_decl): New function extracted from...
2729 (create_subprog_decl): ...here. Call it. Remove CONST_FLAG and
2730 VOLATILE_FLAG parameters and adjust.
2731 (update_pointer_to): Also clear TYPE_REFERENCE_TO in the unconstrained
2734 2016-04-27 Arnaud Charlet <charlet@adacore.com>
2736 * aa_util.adb, aa_util.ads: Removed, no longer used.
2738 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2740 * sem_prag.adb (Analyze_Pragma): An object
2741 renaming declaration resulting from the expansion of an object
2742 declaration is a suitable context for pragma Ghost.
2744 2016-04-27 Doug Rupp <rupp@adacore.com>
2746 * init.c: Refine last checkin so the only requirement is the
2747 signaling compilation unit is compiled with the same mode as
2748 the compilation unit containing the initial landing pad.
2750 2016-04-27 Ed Schonberg <schonberg@adacore.com>
2752 * sem_ch13.adb (Valid_Default_Iterator): Better filter of illegal
2753 specifications for Default_Iterator, including overloaded cases
2754 where no interpretations are legal, and return types that are
2757 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2759 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not install
2760 an accessibility check when the left hand side of the assignment
2761 denotes a container cursor.
2762 * exp_util.ads, exp_util.adb (Find_Primitive_Operations): Removed.
2763 * sem_ch4.adb (Find_Indexing_Operations): New routine.
2764 (Try_Container_Indexing): Code cleanup.
2766 2016-04-27 Arnaud Charlet <charlet@adacore.com>
2768 * sem_ch10.adb, sem_case.adb: Mark messages udner -gnatwr when needed.
2770 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2772 * errout.adb, errutil.adb: Minor reformatting.
2774 2016-04-27 Ed Schonberg <schonberg@adacore.com>
2776 * sem_ch13.adb (Analyze_Aspect_Specifications, case Pre/Post):
2777 Check that the classwide version is illegal when the prefix is
2778 an operation of an untagged synchronized type.
2780 2016-04-27 Arnaud Charlet <charleT@adacore.com>
2782 * sinput-l.ads, sem_ch13.adb: Minor editing.
2784 2016-04-27 Doug Rupp <rupp@adacore.com>
2786 * init.c (__gnat_adjust_context_for_raise) [arm-linux thumb]:
2787 Bump the pc so the lower order bit is set.
2789 2016-04-27 Ed Schonberg <schonberg@adacore.com>
2791 * sem_case.adb, sem_case.ads (NO_Op): If appropriate warning is
2792 enabled, report an empty range in a case construct.
2794 2016-04-27 Arnaud Charlet <charlet@adacore.com>
2796 * sinput.ads, a-cfdlli.adb, a-crbtgo.adb, a-chtgop.adb, a-cbhama.adb,
2797 a-rbtgbo.adb, a-crdlli.adb, a-chtgbo.adb: Minor editing.
2799 2016-04-27 Bob Duff <duff@adacore.com>
2801 * a-chtgop.adb (Adjust): Zero the tampering counts on assignment,
2802 as is done for the other containers.
2804 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2806 * ghost.adb (In_Subprogram_Body_Profile): New routine.
2807 (Is_OK_Declaration): Treat an unanalyzed expression
2808 function as an OK context. Treat a reference to a Ghost entity
2809 as OK when it appears within the profile of a subprogram body.
2811 2016-04-27 Bob Duff <duff@adacore.com>
2813 * errout.ads: Document the fact that informational messages
2814 don't have to be warnings.
2815 * errout.adb (Error_Msg_Internal): In statistics counts, deal
2816 correctly with informational messages that are not warnings.
2817 (Error_Msg_NEL): Remove useless 'if' aroung Set_Posted, because
2818 Set_Posted already checks for errors and ignores others.
2819 * erroutc.adb (Prescan_Message): Set Is_Serious_Error to False
2820 if Is_Info_Msg; the previous code was assuming that Is_Info_Msg
2821 implies Is_Warning_Msg.
2822 * errutil.adb (Error_Msg): In statistics counts, deal correctly
2823 with informational messages that are not warnings.
2825 2016-04-27 Ed Schonberg <schonberg@adacore.com>
2827 * sem_util.ads, sem_util.adb (Is_Null_Record_Type): New predicate
2828 to determine whether a record type is a null record.
2829 * sem_ch3.adb (Analyze_Object_Declaration): If the type is a
2830 null record and there is no expression in the declaration,
2831 no predicate check applies to the object.
2833 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2835 * sem_ch7.adb (Analyze_Package_Body_Helper): The body of an
2836 instantiated package should not cause freezing of previous contracts.
2838 2016-04-27 Ed Schonberg <schonberg@adacore.com>
2840 * sem_dim.adb (Analyze_Dimension): Handle subtype declarations
2841 that do not come from source.
2842 (Analyze_Dimension_Subtype_Declaration): Allow confirming
2843 dimensions on subtype entity, either inherited from base type
2844 or provided by aspect specification.
2846 2016-04-27 Ed Schonberg <schonberg@adacore.com>
2848 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
2849 Add scalar formal object Zero, to allow detection and report
2850 when the matrix is singular.
2851 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
2852 Raise Constraint_Error if the Forward_Eliminate pass has
2853 determined that determinant is Zero.o
2854 * s-ngrear.adb (Solve): Add actual for Zero in corresponding
2856 * s-ngcoar.adb (Solve): Ditto.
2858 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2860 * sem_ch3.adb: Minor reformatting.
2862 2016-04-27 Ed Schonberg <schonberg@adacore.com>
2864 * sem_dim.adb (Analyze_Dimension, case N_Identifier): Check
2865 that identifier has a usable type before analysis, to handle
2866 properly identifiers introduced after some lexical/syntactic
2867 recovery that created new identifiers.
2869 2016-04-27 Bob Duff <duff@adacore.com>
2871 * a-coinve.adb, a-comutr.adb, a-conhel.adb, a-convec.adb,
2872 exp_util.adb: Remove assertions that can fail in obscure cases when
2873 assertions are turned on but tampering checks are turned off.
2875 2016-04-27 Javier Miranda <miranda@adacore.com>
2877 * exp_ch6.adb (Add_Call_By_Copy_Code,
2878 Add_Simple_Call_By_Copy_Code, Expand_Actuals): Handle formals
2879 whose type comes from the limited view.
2881 2016-04-27 Yannick Moy <moy@adacore.com>
2883 * a-textio.adb: Complete previous patch.
2885 2016-04-27 Yannick Moy <moy@adacore.com>
2887 * inline.adb (Expand_Inlined_Call): Use Cannot_Inline instead of
2888 Error_Msg_N to issue message about impossibility to inline call,
2889 with slight change of message.
2891 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2893 * exp_spark.adb (Expand_Potential_Renaming): Removed.
2894 (Expand_SPARK): Update the call to expand a potential renaming.
2895 (Expand_SPARK_Potential_Renaming): New routine.
2896 * exp_spark.ads (Expand_SPARK_Potential_Renaming): New routine.
2897 * sem.adb Add with and use clauses for Exp_SPARK.
2898 (Analyze): Expand a non-overloaded potential renaming for SPARK.
2900 2016-04-27 Ed Schonberg <schonberg@adacore.com>
2902 * sem_ch3.adb (Constrain_Discriminated_Type): In an instance,
2903 check full view for the presence of defaulted discriminants,
2904 even when the partial view of a private type has no visible and
2905 no unknown discriminants.
2907 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2909 * lib-xref.adb, exp_ch3.adb: Minor reformatting.
2911 2016-04-27 Nicolas Roche <roche@adacore.com>
2913 * rtinit.c: Add weak symbol __gnat_do_argv_expansion.
2915 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2917 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Code
2918 cleanup. Check the original node when trying to determine the node kind
2919 of pragma Volatile's argument to account for untagged derivations
2920 where the type is transformed into a constrained subtype.
2922 2016-04-27 Olivier Hainque <hainque@adacore.com>
2924 * mkdir.c (__gnat_mkdir): Rework the vxworks section to use a
2925 consistent posix interface on the caller side.
2927 2016-04-27 Ed Schonberg <schonberg@adacore.com>
2929 * sem_ch10.adb (Build_Limited_View, Decorate_Type): If this
2930 is a limited view of a type, initialize the Limited_Dependents
2931 field to catch misuses of the type in a client unit.
2933 2016-04-27 Thomas Quinot <quinot@adacore.com>
2935 * a-strunb-shared.adb (Finalize): add missing Reference call.
2936 * s-strhas.adb: minor grammar fix and extension of comment
2937 * sem_ch8.adb: minor whitespace fixes
2939 2016-04-27 Ed Schonberg <schonberg@adacore.com>
2941 * lib-xref.adb (Get_Type_Reference): Handle properly the case
2942 of an object declaration whose type definition is a class-wide
2943 subtype and whose expression is a function call that returns a
2946 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2948 * sem_util.ads, sem_util.adb (Output_Entity): New routine.
2949 (Output_Name): New routine.
2951 2016-04-27 Bob Duff <duff@adacore.com>
2953 * exp_ch3.adb (Rewrite_As_Renaming): Disable previous change for now.
2955 2016-04-27 Vincent Celier <celier@adacore.com>
2957 * gnatcmd.adb: For "gnat ls -V -P", recognize switch
2958 --unchecked-shared-lib-imports and set the flag
2959 Opt.Unchecked_Shared_Lib_Imports accordingly.
2961 2016-04-27 Ed Schonberg <schonberg@adacore.com>
2963 * sem_prag.adb (Analyze_Pre_Post_Condition_In_Decl_Part):
2964 A generic subprogram is never a primitive operation, and thus
2965 a classwide condition for it is not legal.
2967 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2969 * sem_aggr.adb, sem_dim.adb, sem_dim.ads, einfo.adb: Minor
2972 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2974 * sem_res.adb (Flag_Effectively_Volatile_Objects): New routine.
2975 (Resolve_Actuals): Flag effectively volatile objects with enabled
2976 property Async_Writers or Effective_Reads as illegal.
2977 * sem_util.adb (Is_OK_Volatile_Context): Comment reformatting.
2979 2016-04-27 Javier Miranda <miranda@adacore.com>
2981 * exp_ch3.adb (Make_Predefined_Primitive_Specs):
2982 Do not generate the profile of the equality operator if it has
2983 been explicitly defined as abstract in the parent type. Required
2984 to avoid reporting an spurious error.
2986 2016-04-27 Ed Schonberg <schonberg@adacore.com>
2988 * sem_dim.ads, sem_dim.adb (Check_Expression_Dimensions): New
2989 procedure to compute the dimension vector of a scalar expression
2990 and compare it with the dimensions if its expected subtype. Used
2991 for the ultimate components of a multidimensional aggregate,
2992 whose components typically are themselves aggregates that are
2993 expanded separately. Previous to this patch, dimensionality
2994 checking on such aggregates generated spurious errors.
2995 * sem_aggr.adb (Resolve_Array_Aggregate): Use
2996 Check_Expression_Dimensions when needed.
2998 2016-04-27 Javier Miranda <miranda@adacore.com>
3000 * einfo.ads, einfo.adb (Corresponding_Function): New attribute
3001 (applicable to E_Procedure).
3002 (Corresponding_Procedure): New attribute (applicable to E_Function).
3003 * exp_util.adb (Build_Procedure_Form): Link the function with
3004 its internally built proc and viceversa.
3005 * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
3006 attribute Rewritten_For_C and Corresponding_Procedure to the body.
3007 * exp_ch6.adb (Rewritten_For_C_Func_Id): Removed.
3008 (Rewritten_For_C_Proc_Id): Removed.
3009 * exp_unst.adb (Note_Uplevel_Ref): Use the new attribute to
3010 locate the corresponding procedure.
3012 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3014 * sem_ch13.adb (Analyze_Aspect_Export_Import): Signal that there is no
3015 corresponding pragma.
3017 2016-04-27 Bob Duff <duff@adacore.com>
3019 * exp_ch3.adb: Minor comment improvement.
3021 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3023 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): If the
3024 return type is an untagged limited record with only access
3025 discriminants and no controlled components, the return value does not
3026 need to use the secondary stack.
3028 2016-04-27 Javier Miranda <miranda@adacore.com>
3030 * exp_util.adb (Remove_Side_Effects): When
3031 generating C code handle object declarations that have
3032 discriminants and are initialized by means of a call to a
3035 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3037 * a-textio.adb (Get_Line function): Handle properly the case of
3038 a line that has the same length as the buffer (or a multiple
3039 thereof) and there is no line terminator.
3040 * a-tigeli.adb (Get_Line procedure): Do not store an end_of_file
3041 in the string when there is no previous line terminator and we
3042 need at most one additional character.
3044 2016-04-27 Arnaud Charlet <charlet@adacore.com>
3046 * s-rident.ads: Make No_Implicit_Loops non partition wide.
3048 2016-04-27 Arnaud Charlet <charlet@adacore.com>
3050 * sem_ch11.adb (Analyze_Handled_Statements): check useless
3051 assignments also in entries and task bodies, not only in
3052 procedures and declaration blocks.
3053 * sem_ch5.adb (Analyze_Block_Statement): check useless
3054 assignements in declaration blocks as part of processing their
3055 handled statement sequence, just like it was done for procedures
3056 and now is also done for entries and task bodies.
3057 * sem_warn.adb (Warn_On_Useless_Assignment): detect boundries
3058 of entries and task bodies just like of procedures.
3060 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3062 * sem_util.adb (Is_Volatile_Function): Recognize
3063 a function declared within a protected type as well as the
3064 protected/unprotected version of a function.
3066 2016-04-27 Bob Duff <duff@adacore.com>
3068 * exp_ch3.adb (Expand_N_Object_Declaration): Rewrite an object
3069 declaration of the form "X : T := Func (...);", where T is
3070 controlled, as a renaming.
3071 * a-strunb-shared.adb (Finalize): Set the Unbounded_String Object
3072 to be an empty string, instead of null-ing out the Reference.
3073 * exp_util.adb (Needs_Finalization): Remove redundant code.
3075 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3077 * aspects.ads Aspects Export and Import do not require delay. They
3078 were classified as delayed aspects, but treated as non-delayed
3079 by the analysis of aspects.
3080 * freeze.adb (Copy_Import_Pragma): New routine.
3081 (Wrap_Imported_Subprogram): Copy the import pragma by first
3082 resetting all semantic fields to avoid an infinite loop when
3083 performing the copy.
3084 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Add
3085 comment on the processing of aspects Export and Import
3086 at the freeze point.
3087 (Analyze_Aspect_Convention: New routine.
3088 (Analyze_Aspect_Export_Import): New routine.
3089 (Analyze_Aspect_External_Link_Name): New routine.
3090 (Analyze_Aspect_External_Or_Link_Name): Removed.
3091 (Analyze_Aspect_Specifications): Factor out the analysis of
3092 aspects Convention, Export, External_Name, Import, and Link_Name
3093 in their respective routines. Aspects Export and Import should
3094 not generate a Boolean pragma because their corresponding pragmas
3095 have a very different syntax.
3096 (Build_Export_Import_Pragma): New routine.
3097 (Get_Interfacing_Aspects): New routine.
3099 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
3101 * inline.adb (Add_Inlined_Body): Overhaul implementation,
3102 robustify handling of -gnatn1, add special treatment for
3103 expression functions.
3105 2016-04-27 Doug Rupp <rupp@adacore.com>
3107 * g-traceb.ads: Update comment.
3108 * exp_ch2.adb: minor style fix in object declaration
3110 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3112 * sem_elab.adb (Check_Internal_Call): Do not
3113 consider a call when it appears within pragma Initial_Condition
3114 since the pragma is part of the elaboration statements of a
3115 package body and may only call external subprograms or subprograms
3116 whose body is already available.
3117 (Within_Initial_Condition): New routine.
3119 2016-04-27 Ed Schonberg <schonberg@adacore.com>
3121 * exp_util.adb (Build_Procedure_Form): Prevent double generation
3122 of the procedure form when dealing with an expression function
3123 whose return type is an array.
3124 * sem_ch3.adb: Fix out-of order Has_Predicates setting.
3125 * exp_ch6.adb: Proper conversion for inherited operation in C.
3126 * sem_ch6.adb: Code cleanup.
3128 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3130 * lib-xref.ads, sem_ch10.adb: minor style fix in comment
3131 * g-socket.adb: Minor reformatting.
3132 * sinfo.ads: Minor comment correction.
3133 * sem_warn.ads: minor grammar fix in comment
3135 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
3137 * gcc-interface/gigi.h (gnat_to_gnu_entity): Adjust prototype.
3138 (maybe_pad_type): Adjust comment.
3139 (finish_record_type): Likewise.
3140 (rest_of_record_type_compilation): Likewise.
3141 * gcc-interface/decl.c (gnat_to_gnu_entity): Change DEFINITION type
3142 parameter from integer to boolean. Adjust recursive calls.
3143 <E_Subprogram_Type>: Use copy_type and remove redundant assignments.
3144 <E_Signed_Integer_Subtype>: Adjust comment. Remove call to
3145 rest_of_record_type_compilation. Set TYPE_PADDING_P flag earlier.
3146 Pass false to finish_record_type. Set the debug type later.
3147 <E_Record_Subtype>: Remove call to rest_of_record_type_compilation.
3148 (gnat_to_gnu_component_type): Fix formatting.
3149 (gnat_to_gnu_field_decl): Adjust call to gnat_to_gnu_entity.
3150 (gnat_to_gnu_type): Likewise.
3151 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
3152 (Loop_Statement_to_gnu): Likewise.
3153 (Subprogram_Body_to_gnu): Likewise.
3154 (Exception_Handler_to_gnu_fe_sjlj): Likewise.
3155 (Exception_Handler_to_gnu_gcc): Likewise.
3156 (Compilation_Unit_to_gnu): Likewise.
3157 (gnat_to_gnu): Likewise.
3158 (push_exception_label_stack): Likewise.
3159 (elaborate_all_entities_for_package): Likewise.
3160 (process_freeze_entity): Likewise.
3161 (process_decls): Likewise.
3162 (process_type): Likewise.
3163 * gcc-interface/utils.c (struct deferred_decl_context_node): Tweak.
3164 (maybe_pad_type): Adjust comments. Set the debug type later. Remove
3165 call to rest_of_record_type_compilation.
3166 (rest_of_record_type_compilation): Use copy_type.
3167 (copy_type): Use correctly typed constants.
3168 (gnat_signed_or_unsigned_type_for): Use copy_type.
3169 * gcc-interface/utils2.c (nonbinary_modular_operation): Likewise.
3170 (build_goto_raise): Adjust call tognat_to_gnu_entity.
3172 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
3174 * gcc-interface/misc.c (gnat_init): Do not call
3175 internal_reference_types.
3177 2016-04-27 Svante Signell <svante.signell@gmail.com>
3179 * gcc-interface/Makefile.in (x86 GNU/Hurd): Use s-osinte-gnu.adb.
3180 * s-osinte-gnu.ads: Small tweaks.
3181 * s-osinte-gnu.adb: New file.
3183 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3185 * sem_prag.adb (Match_Constituent): Treat a constant as a legal
3186 constituent even if it is not to prevent spurious errors.
3188 2016-04-21 Gary Dismukes <dismukes@adacore.com>
3190 * sem_ch4.adb: Minor typo fixes and reformatting.
3192 2016-04-21 Dmitriy Anisimkov <anisimko@adacore.com>
3194 * g-calend.ads (No_Time): The same value in any timezone.
3195 * g-socket.adb (Raise_Host_Error): Remove ending
3196 dot from original error message before append colon delimited
3199 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3201 * sem_ch3.adb: Code cleanup.
3202 * sem_ch6.adb: Code cleanup.
3203 (Is_Matching_Limited_View): New routine.
3204 (Matches_Limited_With_View): Reimplemented.
3205 * sem_ch10.adb (Decorate_Type): Code cleanup.
3207 2016-04-21 Doug Rupp <rupp@adacore.com>
3209 * tracebak.c (PPC ELF): Add macro defs for lynxos178e.
3211 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3213 * sem_ch4.adb (Try_Container_Indexing): If there are overloaded
3214 indexing functions, collect all overloadings of the call firts,
3215 and then transfer them to indexing node, to prevent interleaving
3216 of the set of interpretations of the nodes involved.
3217 * sem_res.adb (Resolve): Suppress cascaded errors that report
3218 ambiguities when one of the actuals in an overloaded generatlized
3219 indexing operation is illegal and has type Any_Type, as is done
3220 for similar cascaded errors in subprogram calls.
3221 (Valid_Tagged_Conversion): Cleanup conversion checks when one
3222 of the types involved is a class-wide subtype.
3224 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3226 * sem_ch12.adb (Load_Parent_Of_Generic): When looking for the
3227 subprogram declaration within a wrapper package, skip pragmas
3228 that may have been generated by aspect specifications on the
3231 2016-04-21 Javier Miranda <miranda@adacore.com>
3233 * exp_aggr.adb (Component_Not_OK_For_Backend): Generating C
3234 code return True for array identifiers since the backend needs
3235 to initialize such component by means of memcpy().
3237 2016-04-21 Arnaud Charlet <charlet@adacore.com>
3239 * a-tasatt.adb, a-tasatt.ads (Fast_Path): Rewritten to avoid reading
3240 potentially uninitialized memory.
3241 * sem_ch3.adb: Minor style fix in comment.
3243 2016-04-21 Arnaud Charlet <charlet@adacore.com>
3245 * gnat_rm.texi, gnat_ugn.texi,
3246 doc/gnat_ugn/gnat_project_manager.rst,
3247 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
3248 doc/gnat_ugn/gnat_and_program_execution.rst,
3249 doc/gnat_ugn/gnat_utility_programs.rst,
3250 doc/gnat_ugn/the_gnat_compilation_model.rst,
3251 doc/gnat_rm/implementation_defined_attributes.rst,
3252 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
3253 doc/gnat_rm/implementation_defined_pragmas.rst,
3254 doc/gnat_rm/the_gnat_library.rst,
3255 doc/gnat_rm/implementation_defined_aspects.rst: Update doc.
3256 * doc/Makefile: Cleanups.
3258 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3260 * exp_pakd.adb, sem_ch13.adb: Minor reformatting.
3262 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3264 * exp_dbug.adb, exp_dbug.ads (Qualify_Entity_Name): Add suffixes to
3265 disambiguate local variables that may be hidden from inner visibility
3266 by nested block declarations or loop variables.
3268 2016-04-21 Jerome Lambourg <lambourg@adacore.com>
3270 * s-soflin.adb: Initialize the Stack_Limit global variable.
3272 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3274 * lib-writ.adb: Minor reformatting.
3276 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3278 * exp_pakd.adb (Compute_Number_Components): New function to
3279 build an expression that computes the number of a components of
3280 an array that may be multidimensional.
3281 (Expan_Packed_Eq): Use it.
3283 2016-04-21 Arnaud Charlet <charlet@adacore.com>
3285 * g-traceb.ads: Update list of supported platforms.
3287 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3289 * sem_ch13.adb (Add_Predicates): if the type is declared in
3290 an inner package it may be frozen outside of the package, and
3291 the generated pragma has not been analyzed yet, the expression
3292 for the predicate must be captured and added to the predicate
3293 function at this point.
3295 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3297 * contracts.adb (Analyze_Package_Body_Contract): Do not check
3298 for a missing package refinement because 1) packages do not have
3299 "refinement" and 2) the check for proper state refinement is
3300 performed in a different place.
3301 * einfo.adb (Has_Non_Null_Visible_Refinement): Reimplemented.
3302 (Has_Null_Visible_Refinement): Reimplemented.
3303 * sem_ch3.adb (Analyze_Declarations): Determine whether all
3304 abstract states have received a refinement and if not, emit
3306 * sem_ch7.adb (Analyze_Package_Declaration): Code
3307 cleanup. Determine whether all abstract states of the
3308 package and any nested packages have received a refinement
3309 and if not, emit errors.
3310 (Requires_Completion_In_Body): Add new formal parameter
3311 Do_Abstract_States. Update the comment on usage. Propagate the
3312 Do_Abstract_States flag to all Unit_Requires_Body calls.
3313 (Unit_Requires_Body): Remove formal
3314 parameter Ignore_Abstract_States. Add new formal paramter
3315 Do_Abstract_States. Propagate the Do_Abstract_States flag to
3316 all Requires_Completion_In calls.
3317 * sem_ch7.ads (Unit_Requires_Body): Remove formal
3318 parameter Ignore_Abstract_States. Add new formal paramter
3319 Do_Abstract_States. Update the comment on usage.
3320 * sem_ch9.adb (Analyze_Single_Protected_Declaration): Do
3321 not initialize the constituent list as this is now done on a
3322 need-to-add-element basis.
3323 (Analyze_Single_Task_Declaration):
3324 Do not initialize the constituent list as this is now done on
3325 a need-to-add-element basis.
3326 * sem_ch10.adb (Decorate_State): Do not initialize the constituent
3327 lists as this is now done on a need-to-add-element basis.
3328 * sem_prag.adb (Analyze_Constituent): Set the
3329 refinement constituents when adding a new element.
3330 (Analyze_Part_Of_In_Decl_Part): Set the Part_Of constituents when
3331 adding a new element.
3332 (Analyze_Part_Of_Option): Set the Part_Of
3333 constituents when adding a new element.
3334 (Analyze_Pragma): Set the Part_Of constituents when adding a new
3336 (Check_Constituent_Usage (all versions)): Reimplemented.
3337 (Collect_Constituent): Set the refinement constituents when adding
3339 (Create_Abstract_State): Do not initialize the
3340 constituent lists as this is now done on a need-to-add-element basis.
3341 (Propagate_Part_Of): Set the Part_Of constituents when
3342 adding a new element.
3343 * sem_util.adb (Check_State_Refinements): New routine.
3344 (Has_Non_Null_Refinement): Reimplemented.
3345 (Has_Null_Refinement): Reimplemented.
3346 (Requires_State_Refinement): Removed.
3347 * sem_util.ads (Check_State_Refinements): New routine.
3348 (Requires_State_Refinement): Removed.
3350 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3352 * lib-writ.adb, sem_ch6.adb: Minor reformatting and code cleanup.
3353 * sem.adb: Fix comment.
3355 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3357 * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype
3358 declaration with no aspects, whose subtype_mark is a subtype
3359 with predicates, inherits the list of subprograms for the type.
3361 2016-04-21 Arnaud Charlet <charlet@adacore.com>
3363 * exp_aggr.adb (Has_Per_Object_Constraint): Refine previous
3366 2016-04-21 Thomas Quinot <quinot@adacore.com>
3368 * g-socket.adb (Raise_Host_Error): Include additional Name parameter.
3370 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3372 * lib-writ.adb (Write_ALI): Do not record in ali file units
3373 that are present in the files table but not analyzed. These
3374 units are present because they appear in the context of units
3375 named in limited_with clauses, and the unit being compiled does
3376 not depend semantically on them.
3378 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3380 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Simplify code to
3381 create the procedure body for an function returning an array type,
3382 when generating C code. Reuse the subprogram body rather than
3383 creating a new one, both as an efficiency measure and because
3384 in an instance the body may contain global references that must
3387 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3389 * sem_ch3.adb, exp_attr.adb, exp_ch6.adb, exp_aggr.adb: Minor
3392 2016-04-21 Javier Miranda <miranda@adacore.com>
3394 * exp_aggr.adb (Component_Check): Extend
3395 the check that verifies that the aggregate has no function
3396 calls to handle transformations performed by the frontend.
3397 (Ultimate_Original_Expression): New subprogram.
3399 2016-04-21 Philippe Gil <gil@adacore.com>
3401 * krunch.adb (Krunch): Fix krunching of i-java.
3403 2016-04-21 Arnaud Charlet <charlet@adacore.com>
3405 * exp_ch8.adb (Evaluation_Required): Always return
3406 True when Modify_Tree_For_C.
3408 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
3410 * gnatlink.adb (Gnatlink): Robustify detection of Windows target.
3411 * alloc.ads: Minor comment fixes.
3412 * einfo.ads: Fix typo.
3414 2016-04-21 Arnaud Charlet <charlet@adacore.com>
3416 * exp_aggr.adb (Component_Not_OK_For_Backend): Redo previous
3417 changes to handle all cases of components depending on the
3418 discriminant, not just string literals.
3420 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3422 * sem_ch3.adb (Analyze_Subtype_Declaration): If the subtype
3423 declaration is the generated declaration for a generic actual,
3424 inherit predicates from the actual if it is a predicated subtype.
3426 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3428 * exp_ch6.adb (Rewrite_Function_Call_For_C): If the function is
3429 inherited and its result is controlling, introduce a conversion
3430 on the actual for the corresponding procedure call, to avoid
3431 spurious type errors.
3433 2016-04-21 Jerome Lambourg <lambourg@adacore.com>
3435 * krunch.adb (Krunch): Fix krunching of i-vxworks.
3437 2016-04-21 Gary Dismukes <dismukes@adacore.com>
3439 * exp_aggr.adb: Minor reformatting and code cleanup.
3441 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3443 * sem_ch13.adb (Resolve_Name): Omit quantified expressions from
3444 resolution, because they introduce local names. Full resolution
3445 will take place when predicate function is constructed.
3447 2016-04-21 Arnaud Charlet <charlet@adacore.com>
3449 * exp_aggr.adb (Component_Not_OK_For_Backend): Refine previous
3450 change to take into account Per_Object_Constraint field rather
3451 than special casing strings.
3452 * exp_ch6.adb: Fix typo in Replace_Returns.
3454 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3456 * sem_ch5.adb: Minor reformatting.
3458 2016-04-21 Arnaud Charlet <charlet@adacore.com>
3460 * exp_aggr.adb (Backend_Processing_Possible): Return False
3461 when generating C and aggregate contains function calls.
3463 2016-04-21 Tristan Gingold <gingold@adacore.com>
3465 * krunch.adb (Krunch): Only partially krunch children of
3466 Interfaces that aren't known.
3468 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3470 * sem_prag.adb (Make_Inline): Handle properly the instantiation
3471 of a generic subpprogram that carries an Inline aspect. Place
3472 inline info on the anonymous subprogram that is constructed in
3473 the wrapper package.
3474 (Analyze_Pragma, case Pure): Do not check placement if pragma
3475 appears within an instantiation, which can be nested at any level.
3476 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not copy Freeze
3477 node from anonymous subprogram to its visible renaming. The
3478 freeze node will be constructed if the subprogram carries
3480 (Set_Global): Preserve dimension information if present (from
3483 2016-04-21 Vasiliy Fofanov <fofanov@adacore.com>
3485 * gnatlink.adb: Change wording of the warning message on
3486 problematic filenames to be more neutral. Add a new substring
3487 "patch" introduced on Windows 10.
3489 2016-04-21 Philippe Gil <gil@adacore.com>
3491 * tracebak.c (__gnat_backtrace): handle bad RIP values (win64 only)
3493 2016-04-21 Javier Miranda <miranda@adacore.com>
3495 * exp_aggr.adb (Component_Not_OK_For_Backend): Return true for string
3498 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3500 * einfo.adb (Has_Non_Null_Abstract_State): New routine.
3501 * einfo.ads New synthesized attribute
3502 Has_Non_Null_Abstract_State along with occurrences in entities.
3503 (Has_Non_Null_Abstract_State): New routine.
3504 * sem_ch7.adb (Unit_Requires_Body): Add local variable
3505 Requires_Body. A package declaring an abstract state requires
3506 a body only when the state is non-null and the package contains
3507 at least one other construct that requires completion in a body.
3508 * sem_util.adb (Mode_Is_Off): Removed.
3509 (Requires_State_Refinement): Remove an obsolete check. Code
3512 2016-04-21 Bob Duff <duff@adacore.com>
3514 * sem_attr.adb (Analyze_Attribute): In processing
3515 the 'Old attribute, a warning is given for infinite recursion. Fix
3516 the code to not crash when the prefix of 'Old denotes a protected
3518 * sem_ch5.adb (Analyze_Iterator_Specification):
3519 Avoid calling Is_Dependent_Component_Of_Mutable_Object in cases
3520 where the parameter would not be an object.
3522 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
3524 * sem_eval.adb (Compile_Time_Compare): Be prepared for an empty
3525 Etype or Underlying_Type of the operands.
3527 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
3529 * atree.adb (Print_Statistics): Protect against overflows and
3530 print the memory consumption in bytes.
3531 * table.adb (Reallocate): Do the intermediate calculation of the new
3532 size using the Memory.size_t type.
3534 2016-04-21 Gary Dismukes <dismukes@adacore.com>
3536 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Suppress
3537 expansion of Attribute_Machine and Attribute_Model for AAMP.
3539 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3541 * freeze.adb: Disable previous change for now.
3543 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3545 * sem_ch8.adb (Find_Selected_Component): If prefix has an
3546 access type and designated type is a limited view, introduce
3547 an explicit dereference before continuing the analysis, and
3548 set its type to the non-limited view of the designated type,
3549 if we are in context where it is available.
3551 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3553 * freeze.adb: Freeze profile in ASIS mode.
3555 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3557 * sem_aux.ads, sem_aux.adb (Has_Rep_Item): New variant.
3558 * sem_util.adb (Inherit_Rep_Item_Chain): Reimplemented.
3560 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3562 * exp_ch6.adb: Minor reformatting.
3564 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3566 * sem_ch13.adb: Minor comment update.
3568 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3570 * freeze.ads, freeze.adb (Freeze_Entity, Freeze_Before): Add
3571 boolean parameter to determine whether freezing an overloadable
3572 entity freezes its profile as well. This is required by
3573 AI05-019. The call to Freeze_Profile within Freeze_Entity is
3574 conditioned by the value of this flag, whose default is True.
3575 * sem_attr.adb (Resolve_Attribute, case 'Access): The attribute
3576 reference freezes the prefix, but it the prefix is a subprogram
3577 it does not freeze its profile.
3579 2016-04-21 Javier Miranda <miranda@adacore.com>
3581 * exp_util.adb (Build_Procedure_Form): No action needed for
3582 subprogram renamings since the backend can generate the call
3583 using the renamed subprogram. This leaves the tree more clean
3585 * exp_ch6.adb (Expand_Call): Extend previous patch for
3586 rewritten-for-c entities to handle subprogram renamings.
3587 (Rewrite_Function_Call_For_C): Handle subprogram renamings.
3589 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3591 * sem_ch13.adb: Code cleanup.
3593 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3595 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
3596 created for SPARK_To_C, the entity must remain invisible so it
3597 does not overload subsequent references to the original function.
3598 * exp_ch6.adb (Build_Procedure_Body_Form, Replace_Returns):
3599 Handle Extended_Return_Statements by replacing it with a block
3600 with assignments and a simple return statement.
3601 * exp_util.adb (Build_Procedure_Form): Make procedure entity
3602 invisible after analyzing declaration, to prevent improper
3605 2016-04-21 Javier Miranda <miranda@adacore.com>
3607 * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
3608 attribute Rewritten_For_C to the body since since the expander
3609 may generate calls using that entity.
3610 * exp_ch6.adb (Expand_Call): For internally generated
3611 calls ensure that they reference the entity of the spec
3612 of the called function.
3613 (Rewritten_For_C_Func_Id): New subprogram.
3614 (Rewritten_For_C_Proc_Id): New subprogram.
3615 (Rewrite_Function_Call_For_C): Invoke the new subprogram to
3616 ensure that we skip freezing entities.
3617 * exp_util.adb (Build_Procedure_Form): No action needed if the
3618 procedure was already built.
3620 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3622 * sem_ch3.adb, exp_util.adb, sem_ch13.adb, exp_unst.adb: Minor
3625 2016-04-21 Ed Schonberg <schonberg@adacore.com>
3627 * sem_util.adb (Denotes_Iterator): Use root type to determine
3628 whether the ultimate ancestor is the predefined iterator
3630 * exp_ch5.adb (Expand_Iterator_Over_Container): simplify code
3631 and avoid reuse of Pack local variable.
3633 2016-04-21 Olivier Hainque <hainque@adacore.com>
3635 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
3636 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
3637 system-vxworks-mips.ads, system-vxworks-x86.ads: Define
3638 Executable_Extension to ".out".
3640 2016-04-21 Javier Miranda <miranda@adacore.com>
3642 * frontend.adb: Update call to Unnest_Subprograms.
3643 * exp_ch6.ads, exp_ch6.adb, exp_unst.ads, exp_unst.adb
3644 (Unnest_Subprograms): Moved to package exp_unst.
3645 * exp_unst.ads (Unnest_Subprogram): Moved to the body of the
3647 * exp_dbug.adb (Qualify_Entity_Name): Enable qualification of
3648 enumeration literals when generating C code.
3650 2016-04-21 Javier Miranda <miranda@adacore.com>
3652 * frontend.adb: Remove call to initialize Exp_Ch6.
3653 * exp_ch6.ads, exp_ch6.adb (Initialize): removed.
3654 (Unest_Entry/Unest_Bodies): Removed.
3655 (Unnest_Subprograms): Code cleanup.
3657 2016-04-21 Arnaud Charlet <charlet@adacore.com>
3659 * set_targ.adb (Read_Target_Dependent_Values):
3660 close target description file once its contents is read.
3661 * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File
3662 and Stderr_File): Close local file descriptors before spawning
3664 * exp_util.adb (Containing_Package_With_Ext_Axioms): Limit scope of
3665 local variables to make the code easier to understand and avoid
3666 duplicated calls to Parent and Generic_Parent.
3668 2016-04-20 Bob Duff <duff@adacore.com>
3670 * s-os_lib.ads: Minor comment fix.
3672 2016-04-20 Ed Schonberg <schonberg@adacore.com>
3674 * exp_ch5.adb (Expand_N_Assignment_Statement): Do no generate
3675 a discriminant check for a type whose partial view has unknown
3676 discriminants when the full view has discriminants with defaults.
3678 2016-04-20 Javier Miranda <miranda@adacore.com>
3680 * exp_util.adb (Remove_Side_Effects): When generating C code
3681 remove side effect of type conversion of access to unconstrained
3683 (Side_Effect_Free): Return false for the type
3684 conversion of access to unconstrained array type when generating
3686 * sem_res.adb (Resolved_Type_Conversion): Remove side effects
3687 of access to unconstrained array type conversion when generating
3690 2016-04-20 Ed Schonberg <schonberg@adacore.com>
3692 * sem_ch13.adb (Build_Predicate_Function_Declaration): New
3693 function, to construct the declaration of a predicate function
3694 at the end of the current declarative part rather than at the
3695 (possibly later) freeze point of the type. This also allows uses
3696 of a type with predicates in instantiations elsewhere.
3697 (Resolve_Aspect_Expression): New procedure to detect visiblity
3698 errors in aspect expressions, at the end of the declarative part
3699 that includes the type declaration.
3700 * sem_ch3.adb (Complete_Private_Subtype): Propagate properly the
3701 predicate function from private to full view.
3702 * einfo.adb (Predicate_Function): Refine search for predicate
3703 function when type has a full view and predicate function may
3704 be defined on either view.
3706 2016-04-20 Javier Miranda <miranda@adacore.com>
3708 * frontend.adb: Passing the root of the tree to
3709 Unnest_Subprograms().
3710 * exp_ch6.adb (Expand_N_Subprogram_Body): Remove code that
3711 took care of adding subprograms to the Unest_Bodies table since
3712 performing such action too early disables the ability to process
3713 generic instantiations.
3714 (Unnest_Subprograms): Adding parameter.
3715 (Search_Unnesting_Subprograms): New subprogram.
3716 * exp_ch6.ads (Unnest_Subrograms): Update documentation.
3718 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
3720 * exp_util.adb, freeze.adb, sem_util.adb: Minor reformatting.
3722 2016-04-20 Ed Schonberg <schonberg@adacore.com>
3724 * exp_unst.adb (Check_Static_Type): For a private type, check
3727 2016-04-20 Ed Schonberg <schonberg@adacore.com>
3729 * sem_attr.adb (Check_Type): Reject an attribute reference in
3730 an aspect expression, when the prefix of the reference is the
3731 current instance of the type to which the aspect applies.
3733 2016-04-20 Bob Duff <duff@adacore.com>
3735 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about
3736 hiding unless we're actually hiding something. The previous
3737 code would (for example) warn about a "<" on a record type
3738 because it incorrectly thought it was hiding the "<" on Boolean
3739 in Standard. We need to check that the homonym S is in fact a
3740 homograph of a predefined operator.
3742 2016-04-20 Ed Schonberg <schonberg@adacore.com>
3744 * exp_util.ads, exp_util.adb (Build_Procedure_Form): Moved here
3745 from exp_ch6.adb, for use in SPARK_To_C mode when creating the
3746 procedure equivalent to a function returning an array, when this
3747 construction is deferred to the freeze point of the function.
3748 * sem_util.adb (Is_Unchecked_Conversion_Instance): Include a
3749 function that renames an instance of Unchecked_Conversion.
3750 * freeze.adb (Freeze_Subprogram): Generate the proper procedure
3751 declaration for a function returning an array.
3752 * exp_ch6.adb (Build_Procedure_Form): Moved to exp_util.
3754 2016-04-20 Ed Schonberg <schonberg@adacore.com>
3756 * sem_util.ads, sem_util.adb (Is_Expanded_Priority_Attribute):
3757 New predicate to determine that in a context with full run-time,
3758 a function call is an expansion of a reference to attribute
3760 * sem_ch5.adb (Analyze_Function_Call): use it.
3761 * exp_ch5.adb (Expand_N_Subprogram_Call): use it.
3763 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
3765 * einfo.adb Flag286 is now used as Is_Exception_Handler.
3766 (Is_Exception_Handler): New routine.
3767 (Set_Is_Exception_Handler): New routine.
3768 (Write_Entity_Flags): Output the status of Is_Exception_Handler.
3769 * einfo.ads New attribute Is_Exception_Handler along with
3770 occurrences in entities.
3771 (Is_Exception_Handler): New routine along with pragma Inline.
3772 (Set_Is_Exception_Handler): New routine along with pragma Inline.
3773 * exp_ch7.adb (Make_Transient_Block): Ignore blocks generated
3774 for exception handlers with a choice parameter.
3775 * sem_ch11.adb (Analyze_Exception_Handlers): Mark the scope
3776 generated for a choice parameter as an exception handler.
3778 2016-04-20 Ed Schonberg <schonberg@adacore.com>
3780 * sem_ch3.adb (Build_Derived_Access_Type): Remove dead code.
3781 (Constrain_Discriminated_Type): In an instance, if the type has
3782 unknown discriminants, use its full view.
3783 (Process_Subtype): Check that the base type is private before
3784 adding subtype to Private_Dependents list.
3786 2016-04-20 Bob Duff <duff@adacore.com>
3788 * sem_ch13.adb: Minor comment fix.
3790 2016-04-20 Yannick Moy <moy@adacore.com>
3792 * sem_ch4.adb: Fix typos in comments.
3793 * sem_res.adb (Resolve_Case_Expression): Fix type of case alternatives.
3795 2016-04-20 Ed Schonberg <schonberg@adacore.com>
3797 * sem_ch4.adb (Analyze_Selected_Component): A reference to the
3798 current instance of a task type is legal if the prefix is an
3799 expression of that task type and the selector is an entry or
3802 2016-04-20 Arnaud Charlet <charlet@adacore.com>
3804 * a-cfdlli.ads (List): Type is no longer tagged, not needed. Move
3805 varsize field at the end for efficiency.
3807 2016-04-20 Vincent Celier <celier@adacore.com>
3809 * gnatcmd.adb: Do not invoke gprls when the invocation of "gnat
3810 ls" includes the switch -V.
3811 * clean.adb: "<target>-gnatclean -P" now calls "gprclean
3813 * make.adb: "<target>-gnatmake -P" now calls "gprbuild
3816 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
3818 * sem_ch12.adb (Qualify_Type): Do not perform
3819 partial qualification when the immediate scope is a generic unit.
3821 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
3823 * exp_unst.adb: Minor reformatting.
3825 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
3827 * exp_ch4.adb (Expand_Allocator_Expression): Ensure that the
3828 tag assignment and adjustment preceed the accessibility check.
3829 * exp_ch7.adb (Is_Subprogram_Call): Reimplemented.
3831 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
3833 * exp_prag.adb (Expand_Attributes): Ensure that
3834 the temporary used to capture the value of attribute 'Old's
3835 prefix is properly initialized.
3837 2016-04-20 Javier Miranda <miranda@adacore.com>
3839 * exp_unst.ads, exp_unst.adb (Get_Level, Subp_Index): Moved to library
3842 2016-04-20 Arnaud Charlet <charlet@adacore.com>
3844 * sem_ch9.adb (Analyze_Task_Type_Declaration): Shut down warning
3847 2016-04-20 Vincent Celier <celier@adacore.com>
3849 * make.adb: Code cleanup.
3851 2016-04-20 Arnaud Charlet <charlet@adacore.com>
3853 * exp_ch4.adb (Expand_Allocator_Expression): Help C code
3856 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
3858 * sem_ch12.adb (Copy_Generic_Node): Handle the special
3859 qualification installed for universal literals that act as
3860 operands in binary or unary operators. (Qualify_Operand): Mark
3861 the qualification to signal the instantiation mechanism how to
3862 handle global reference propagation.
3863 * sinfo.adb (Is_Qualified_Universal_Literal): New routine.
3864 (Set_Is_Qualified_Universal_Literal): New routine.
3865 * sinfo.ads New attribute Is_Qualified_Universal_Literal along
3866 with occurrences in nodes.
3867 (Is_Qualified_Universal_Literal):
3868 New routine along with pragma Inline.
3869 (Set_Is_Qualified_Universal_Literal): New routine along with
3872 2016-04-20 Ed Schonberg <schonberg@adacore.com>
3874 * sem.adb (Do_Analyze): Save and restore Style_Max_Line_Length
3875 so that the corresponding checks are preserved across compilations
3876 that include System.Constants in their context.
3878 2016-04-20 Gary Dismukes <dismukes@adacore.com>
3880 * sem_type.adb: Minor typo fix and reformatting.
3881 * a-conhel.ads: Update comment.
3883 2016-04-20 Bob Duff <duff@adacore.com>
3885 * a-cihama.adb, a-cihase.adb, a-coinve.adb (Copy): Rewrite the
3886 code so it doesn't trigger an "uninit var" warning.
3888 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
3890 * sem_attr.ads Add new table Universal_Type_Attribute.
3891 * sem_util.adb (Yields_Universal_Type): Use a table lookup when
3892 checking attributes.
3894 2016-04-20 Ed Schonberg <schonberg@adacore.com>
3896 * exp_aggr.adb (Init_Stored_Discriminants,
3897 Init_Visible_Discriminants): New procedures, subsidiary of
3898 Build_Record_Aggr_Code, to handle properly the construction
3899 of aggregates for a derived type that constrains some parent
3900 discriminants and renames others.
3902 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
3904 * sem_ch12.adb (Qualify_Universal_Operands): New routine.
3905 (Save_References_In_Operator): Add explicit qualifications in
3906 the generic template for all operands of universal type.
3907 * sem_type.adb (Disambiguate): Update the call to Matches.
3908 (Matches): Reimplemented.
3909 * sem_util.ads, sem_util.adb (Yields_Universal_Type): New routine.
3911 2016-04-20 Ed Schonberg <schonberg@adacore.com>
3913 * sem_ch13.adb (Rep_Item_Too_Late): Better error message for
3914 an illegal aspect that freezes the entity to which it applies.
3916 2016-04-20 Bob Duff <duff@adacore.com>
3918 * a-stwibo.ads, a-stzbou.ads
3919 ("="): Add overriding keyword before function to avoid crash when
3920 compiler is called with -gnatyO (check overriding indicators).
3922 2016-04-20 Ed Schonberg <schonberg@adacore.com>
3924 * sem_prag.adb (Analyze_Pragma, case Check_Policy): If this
3925 is a configuration pragma and it uses the ARG syntax, insert
3926 the rewritten pragma after the current one rather than using
3929 2016-04-20 Arnaud Charlet <charlet@adacore.com>
3931 * exp_aggr.adb (Backend_Processing_Possible): Add handling of
3934 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
3936 * s-imgllu.adb, sem_util.adb, s-imgint.adb, s-imguns.adb,
3937 s-imglli.adb: Minor reformatting.
3939 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
3941 * sem_res.adb (Rewrite_Renamed_Operator): Do not rewrite the
3942 renamed operator when the associated node appears within a
3944 * sem_util.ads, sem_util.adb (In_Pre_Post_Condition): New routine.
3946 2016-04-20 Yannick Moy <moy@adacore.com>
3948 * osint.adb (Relocate_Path): Fix test when Path is shorter than Prefix.
3949 * einfo.adb (Set_Overridden_Operation): Add assertion.
3950 * sem_util.adb (Unique_Entity): for renaming-as-body return the spec
3953 2016-04-20 Javier Miranda <miranda@adacore.com>
3955 * exp_unst.adb (Append_Unique_Call): New subprogram.
3956 (Unnest_Subprogram): Replace the unique occurrence
3957 of Call.Append() by Append_Unique_Call() which protects us from
3958 adding to the Calls table duplicated entries.
3960 2016-04-20 Arnaud Charlet <charlet@adacore.com>
3962 * exp_attr.adb (Is_GCC_Target): Fix for C backend.
3963 * xref_lib.ads (Dependencies_Tables): instantiate
3964 Table package with types that guarantee its safe use.
3965 * s-imgllu.adb, s-imgint.adb, s-imguns.adb, s-imglli.adb: Avoid nested
3968 2016-04-20 Arnaud Charlet <charlet@adacore.com>
3970 * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]):
3971 Disable expansion when generating C code.
3972 * sinfo.ads, inline.ads: Minor editing.
3974 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
3976 * sem_util.adb, contracts.adb, ghost.adb, exp_ch6.adb: Minor
3979 2016-04-20 Javier Miranda <miranda@adacore.com>
3981 * contracts.adb (Build_Postconditions_Procedure): Code cleanup.
3982 * ghost.adb (Os_OK_Ghost_Context.Is_OK_Declaration): Handle the
3983 declaration of the internally built _postcondition procedure.
3985 2016-04-20 Arnaud Charlet <charlet@adacore.com>
3987 * snames.ads-tmpl (Internal_Attribute_Id, Attribute_Class_Array): Fix
3989 * sem_util.adb (Is_Unchecked_Conversion_Instance):
3990 defense against library-level renamings of other functions,
3991 which are never instances of Unchecked_Conversion.
3992 * einfo.ads: minor fix of casing in comment
3994 2016-04-20 Ed Schonberg <schonberg@adacore.com>
3996 * exp_ch6.adb (Expand_N_Subprogram_Stub): Do not expand a body
3997 that has been analyzed and expanded already. Qualify the names
3998 in the proper body for use in the generation of C code.
4000 2016-04-20 Javier Miranda <miranda@adacore.com>
4002 * contracts.adb (Build_Postconditions_Procedure): Force its
4003 inlining when generating C code.
4004 * sem_attr.adb (Analyze_Attribute_Old_Result): Handle inlined
4005 _postconditions when generating C code.
4006 * exp_ch6.adb (Inlined_Subprogram): Inline calls to
4007 _postconditions when generating C code.
4008 * sinfo.ads, sinfo.adb (Corresponding_Spec, Set_Corresponding_Spec):
4009 types of return value and argument changed from Node_Id to
4012 2016-04-20 Vincent Celier <celier@adacore.com>
4014 * make.adb, clean.adb, gnatname.adb: Revert previous change for now.
4016 2016-04-20 Eric Botcazou <ebotcazou@adacore.com>
4018 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
4019 the Has_Delayed_Freeze flag on the anonymous instance node.
4021 2016-04-20 Javier Miranda <miranda@adacore.com>
4023 * sem_ch5.adb (Analyze_Iterator_Specification): Remove transient
4024 scope associated with the renaming object declaration.
4025 * exp_util.adb (Insert_Actions): Remove handling of iterator
4026 loop marked as requiring the secondary stack.
4028 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4030 * sem_attr.adb (Analyze_Attribute, case 'Image): Implement
4031 AI12-0124, which extends the functionality of the attribute so it
4032 reflects the semantics of GNAT 'Img when applied to scalar types.
4033 * lib-xref.adb: minor whitespace layout fix.
4035 2016-04-20 Vincent Celier <celier@adacore.com>
4037 * clean.adb (Gnatclean): Fail if project file specified and
4038 gprclean is not available.
4039 * gnatname.adb: Fail is -P is used and gprname is not available.
4040 * make.adb (Initialize): Fail if project file specified and
4041 gprbuild is not available.
4043 2016-04-20 Bob Duff <duff@adacore.com>
4045 * sem_ch5.adb (Analyze_Iterator_Specification): Do not use secondary
4046 stack when possible.
4048 2016-04-20 Gary Dismukes <dismukes@adacore.com>
4050 * par_sco.adb, sem_util.adb, sem_ch13.adb: Minor typo corrections and
4053 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4055 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
4056 If the pragma comes from an aspect specification, verify that
4057 the aspect applies to an entity with a declarative part.
4058 * exp_ch5.adb: Code cleanup.
4060 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4062 * sem_res.adb (Resolve_If_Expression): If first expression is
4063 universal, resolve subsequent ones with the corresponding class
4064 type (Any_Integer or Any_Real).
4066 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4068 * sem_ch5.adb (Analyze_Iterator_Specification): If expansion is
4069 disabled, complete the analysis of the iterator name to ensure
4070 that reference for entities within are properly generated.
4072 2016-04-20 Arnaud Charlet <charlet@adacore.com>
4074 * a-dispat.ads (Yield): add Global contract.
4075 * a-calend.ads, a-reatim.ads: Added Initializes => Clock_Time.
4076 * a-taside.adb: Added Initializes => Tasking_State.
4078 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4080 * sem_ch13.adb (Build_Invariant_Procedure):
4081 Reimplement the invariant procedure spec and body insertion.
4083 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
4085 * sem_ch13.adb (Add_Invariant): Do not replace
4086 the saved expression of an invariatn aspect when inheriting
4087 a class-wide type invariant as this clobbers the existing
4088 expression. Do not use New_Copy_List as it is unnecessary
4089 and leaves the parent pointers referencing the wrong part of
4090 the tree. Do not replace the type references for ASIS when
4091 inheriting a class-wide type invariant as this clobbers the
4092 existing replacement.
4094 2016-04-20 Ed Schonberg <schonberg@adacore.com>
4096 * sem_util.adb (Build_Explicit_Dereference): If the designated
4097 expression is an entity name, generate reference to the entity
4098 because it will not be resolved again.
4100 2016-04-19 Arnaud Charlet <charlet@adacore.com>
4102 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
4103 gnat_rm.texi: Update documentation.
4105 2016-04-19 Olivier Hainque <hainque@adacore.com>
4107 * par_sco.adb (Traverse_One, case N_Case_Statement):
4108 Skip pragmas before the first alternative.
4109 (Traverse_Handled_Statement_Sequence, Exception_Handlers): Likewise.
4111 2016-04-19 Tristan Gingold <gingold@adacore.com>
4113 * adaint.c (__gnat_lwp_self): New function (for darwin).
4114 * s-osinte-darwin.ads, s-osinte-darwin.adb (lwp_self): Import
4117 2016-04-19 Olivier Hainque <hainque@adacore.com>
4119 * sem_util.adb (Build_Elaboration_Entity): Always request an
4120 elab counter when preserving control-flow.
4122 2016-04-19 Olivier Hainque <hainque@adacore.com>
4124 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set
4125 Needs_Debug_Info when producing SCOs.
4126 * par_sco.adb (Traverse_Aspects): Fix categorization of
4127 Type_Invariant to match actual processing as activated depending
4128 on pragma Assertion_Policy.
4129 * sem_prag.adb (Analyze_Pragma): Remove special case for
4130 Name_Invariant regarding SCO generation, which completely disabled
4131 the production of SCOs for Invariant pragmas and aspects.
4133 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
4135 * checks.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
4138 2016-04-19 Ed Schonberg <schonberg@adacore.com>
4140 * freeze.adb (Freeze_Profile): Refine predicate that checks
4141 whether a function that returns a limited view is declared in
4142 another unit and cannot be frozen at this point.
4144 2016-04-19 Ed Schonberg <schonberg@adacore.com>
4146 * exp_aggr.adb (Component_Count): Handle properly superflat
4147 arrays, i.e. empty arrays where Hi < Lo - 1, to ensure that the
4148 return value of the function is Natural, rather than leaving
4149 the handling of such arrays to the caller of this function.
4151 2016-04-19 Arnaud Charlet <charlet@adacore.com>
4153 * sem_prag.adb, sem_attr.adb, par-prag.adb, exp_aggr.adb, sem_type.adb
4154 sem_ch12.adb, sem_ch3.adb, exp_ch7.adb, exp_ch9.adb: Code cleanup.
4155 * sem_res.adb, sem_util.ads, sem_util.adb (Is_OK_Volatile_Context):
4156 Promoted from being a nested subprogram in Sem_Res.Resolve_Entity_Name
4157 to publicly visible routine in Sem_Util.
4159 2016-04-19 Ed Schonberg <schonberg@adacore.com>
4161 * checks.adb (Apply_Parameter_Aliasing_Checks): Do not apply
4162 the check if the type of the actual is By_Reference.
4164 2016-04-19 Arnaud Charlet <charlet@adacore.com>
4166 * sem_res.adb (Within_Subprogram_Call): Detect
4167 also nodes that appear in entry calls.
4168 (Resolve_Actuals, Insert_Default): Propagate
4169 dimension information if any, from default expression to the
4170 copy that appears in the list of actuals.
4171 * uintp.ads: minor whitespace fix in comment.
4172 * sem_prag.adb, stringt.adb, inline.adb, lib-xref-spark_specific.adb:
4174 * set_targ.adb (Set_Targ): convert directly from
4175 Natural to Pos, without intermediate conversion to Int.
4177 2016-04-19 Arnaud Charlet <charlet@adacore.com>
4179 * sem_ch6.adb (Process_Formals): Mark suspicious reference to
4180 SPARK RM in comment.
4181 * sem_prag.adb (Analyze_Global_Item): Fix reference to SPARK RM
4183 * sem_res.adb (Property_Error, Resolve_Actuals): Fix reference
4184 to SPARK RM in both comment and error message.
4186 2016-04-19 Eric Botcazou <ebotcazou@adacore.com>
4188 * sem_ch6.adb (Possible_Freeze): If the type is an incomplete
4189 CW type, then the subprogram must have a delayed freeze. This
4190 ensures that the backend can properly recover the full view when
4191 elaborating the access subprogram declaration.
4193 2016-04-19 Ed Schonberg <schonberg@adacore.com>
4195 * sem_attr.adb (Resolve_Attribute, case 'Access): Freeze
4196 overloadable entity if originally overloaded.
4198 2016-04-19 Arnaud Charlet <charlet@adacore.com>
4200 * exp_aggr.adb, exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_code.adb,
4201 exp_fixd.adb, namet.adb, osint.adb, osint.ads, par-ch2.adb,
4202 sem_ch10.adb, sem_ch12.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb
4203 sem_util.adb, styleg.adb, styleg.ads, stylesw.ads: Minor code
4206 2016-04-19 Arnaud Charlet <charlet@adacore.com>
4208 * sem_util.adb (Copy_Node_With_Replacement):
4209 use Set_Comes_From_Source instead of directly manipulating
4210 internals of the node table.
4211 * sem_util.adb (Within_Scope): refactored to remove duplicated code.
4212 * sem_aux.adb (Get_Rep_Pragma,
4213 Subprogram_Body_Entity, Subprogram_Spec): declare variables that
4214 do not change as constants and initialize them in the declaration.
4215 (Get_Rep_Pragma, Subprogram_Body_Entity, Subprogram_Spec): declare
4216 variables that do not change as constants and initialize them
4219 2016-04-19 Ed Schonberg <schonberg@adacore.com>
4221 * sem_res.adb (Resolve_Entry_Call): If the entry has
4222 preconditions it is rewritten by means of a wrapper that
4223 incorporates the original call. Before rewriting generate a
4224 reference to the entry being called to prevent spurious warnings
4225 and provide correct cross-reference information.
4227 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
4229 * sem_disp.adb (Check_Dispatching_Context): Code cleanup. Add
4230 local constant Scop. Ignore any internally generated loops when
4231 performing the check concerning an abstract subprogram call
4232 without a controlling argument.
4233 * sem_util.ads, sem_util.adb (Current_Scope_No_Loops): New routine.
4235 2016-04-19 Bob Duff <duff@adacore.com>
4237 * sem_elab.adb (Check_A_Call): There are cases where we have No
4238 (Ent) after the Alias loop, even when there was no previous error,
4239 so we can't assert that there was an error.
4241 2016-04-19 Ed Schonberg <schonberg@adacore.com>
4243 * sem_attr.adb (Analyze_Access_Attribute, OK_Self_Reference):
4244 Reject use of type name as a prefix to 'access within an aggregate
4245 in a context that is not the declarative region of a type.
4247 2016-04-19 Vincent Celier <celier@adacore.com>
4249 * gnatcmd.adb: Make "gnat ls -P" invoke gprls Make "gnat bind
4250 -P" invoke "gprbuild -b" Make "gnat link -P" invoke "gprbuild
4251 -l" Fail if the invocation is "gnat find -P" or "gnat xref -P"
4252 Remove anything related to project files
4253 * g-mbdira.adb: minor whitespace cleanup
4254 * g-spipat.adb: minor removal of extra spaces after closing paren
4256 2016-04-19 Ed Schonberg <schonberg@adacore.com>
4258 * exp_ch6.adb (Expand_Actuals): If post-statements are present
4259 and the enclosing context is a function call or indexing, build
4260 an Expression_With_Actions for the call.
4262 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
4264 * lib-writ.adb (Write_With_Lines): Code cleanup. Do not generate
4265 a with line for an ignored Ghost unit.
4266 * sem_ch7.adb (Analyze_Package_Declaration): Add local constant
4267 Par. A child package is Ghost when its parent is Ghost.
4268 * sem_prag.adb (Analyze_Pragma): Pragma Ghost can now apply to
4269 a subprogram declaration that acts as a compilation unit.
4271 2016-04-18 Michael Matz <matz@suse.de>
4273 * gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN.
4274 (gnat_to_gnu_field): Ditto.
4275 (components_to_record): Ditto.
4276 (create_variant_part_from): Ditto.
4277 (copy_and_substitute_in_size): Ditto.
4278 (substitute_in_type): Ditto.
4279 * gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN.
4280 (make_packable_type): Ditto.
4281 (maybe_pad_type): Ditto.
4282 (finish_fat_pointer_type): Ditto.
4283 (finish_record_type): Ditto and use SET_DECL_ALIGN.
4284 (rest_of_record_type_compilation): Use SET_TYPE_ALIGN.
4285 (create_field_decl): Use SET_DECL_ALIGN.
4287 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4289 * einfo.adb (Overridden_Operation): assert that
4290 function is called for valid arguments.
4291 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_type.adb,
4292 s-osinte-vxworks.ads, a-ngcefu.adb, sem_ch10.adb, einfo.ads,
4293 sem_prag.adb, sem_ch12.adb, sem.adb, i-cobol.ads, freeze.adb,
4294 sem_util.adb, a-chtgop.ads, s-rannum.adb, exp_ch6.adb, s-bignum.adb,
4295 s-osinte-freebsd.ads, par-ch5.adb, a-chtgbo.ads, a-cofove.adb:
4296 No space after closing parenthesis except where required for
4298 * sem_res.adb: Minor reformatting.
4300 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4302 * exp_ch4.adb (Expand_N_Case_Expression): Convert into a case
4303 statement when relevant.
4305 2016-04-18 Bob Duff <duff@adacore.com>
4307 * a-cuprqu.adb (Enqueue): Properly handle the
4308 case where the new element has a unique priority.
4310 2016-04-18 Tristan Gingold <gingold@adacore.com>
4312 * adaint.h: Define stat structures and functions for iOS
4315 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4317 * sem_res.adb (Resolve_Entry_Call): reset
4318 Is_Overloaded flag after resolving calls to overloaded protected
4320 * exp_spark.adb (Expand_SPARK): call
4321 Qualify_Entity_Names for tasking nodes, i.e. protected types,
4322 task types and entries.
4323 * exp_ch4.adb (Expand_N_If_Expression): Refine previous change
4324 in case of an unconstrained type.
4326 2016-04-18 Yannick Moy <moy@adacore.com>
4328 * sem_eval.adb, sem_eval.ads (Check_Non_Static_Context): Add
4329 comment to document usage of subprogram in GNATprove.
4331 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4333 * sem_prag.adb (Analyze_Pragma, case Test_Case): Improve error
4334 message for wrong placement of aspect Test_Case.
4336 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4338 * einfo.ads: Update the documentation of attribute Renamed_Object.
4339 * exp_spark.adb (Expand_Potential_Renaming): Reimplemented.
4341 2016-04-18 Gary Dismukes <dismukes@adacore.com>
4343 * exp_ch4.adb (Optimize_Length_Comparison): Return immediately
4344 in the case of AAMP (same as for use of the -gnatd.P switch) to
4345 suppress this optimization, which avoids creating a dependence
4346 on the 64-bit arithmetic package.
4348 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4350 * exp_ch4.adb: Update comment.
4352 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
4354 * exp_ch6.adb (Expand_Call): Make sure instantiations are
4355 registered only once as pending here.
4357 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4359 * exp_ch4.adb, gnat1drv.adb, opt.ads, sem_res.adb
4360 (Minimize_Expression_With_Actions): New flag.
4361 (Adjust_Global_Switches): Set Minimize_Expression_With_Actions
4363 (Resolve_Short_Circuit): Redo previous change
4364 using Minimize_Expression_With_Actions.
4365 (Expand_N_If_Expression,
4366 Expand_Short_Circuit_Operator): Restore old code to avoid
4367 Expression_With_Actions when Minimize_Expression_With_Actions
4370 2016-04-18 Vincent Celier <celier@adacore.com>
4372 * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File and
4373 Stderr_File): Close local file descriptors when no longer needed.
4375 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4377 * sem_ch5.adb (Analyze_Iterator_Specification): Remove SPARK
4378 mode check that the type of the cursor in an iteration over
4379 a formal container is not volatile. The proper check on the
4380 element type is done elsewhere.
4382 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4384 * sem_ch6.adb (Process_Formals): Do not set a delay freeze on
4385 a subprogram that returns a class-wide type, if the subprogram
4386 is a compilation unit, because otherwise gigi will treat the
4387 subprogram as external, leading to link errors.
4389 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4391 * sem_res.adb (Resolve_Short_Circuit): Do not use
4392 expression-with-actions when generating C.
4394 2016-04-18 Yannick Moy <moy@adacore.com>
4396 * sem_util.adb (Apply_Compile_Time_Constraint_Error): Do not generate
4397 raise node in GNATprove mode.
4399 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4401 * s-fileio.adb: Minor reformatting.
4402 * sem_prag.adb (Analyze_Input_Item): Add local
4403 variable Input_OK. Do not consider mappings of generic formal
4404 parameters to actuals.
4406 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4408 * sem_ch5.adb (Get_Cursor_Type): If iterator type is a derived
4409 type, the cursor is declared in the scope of the parent type.
4410 (Analyze_Parameter_Specification): A qualified expression with an
4411 iterator type indicates an iteration over a container (explicit
4414 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4416 * osint-c.ads, osint-c.adb (Delete_C_File, Delete_H_File): New.
4417 * gnat1drv.adb (Gnat1drv): Delete old C files before regenerating them.
4418 * debug.adb: Reserve -gnatd.4 to force generation of C files.
4420 2016-04-18 Yannick Moy <moy@adacore.com>
4422 * sem_eval.adb (Eval_Arithmetic_Op): Do not issue error on static
4423 division by zero, instead possibly issue a warning.
4424 * sem_res.adb (Resolve_Arithmetic_Op): Do not issue error on
4425 static division by zero, instead add check flag on original
4427 * sem_util.adb, sem_util.ads (Compile_Time_Constraint_Error):
4428 Only issue error when both SPARK_Mode is On and Warn is False.
4430 2016-04-18 Yannick Moy <moy@adacore.com>
4432 * checks.adb (Apply_Scalar_Range_Check): Force
4433 warning instead of error when SPARK_Mode is On, on index out of
4434 bounds, and set check flag for GNATprove.
4436 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4438 * sem_prag.adb (Check_In_Out_States.Check_Constituent_Usage):
4439 Update the comment on usage. Reimplemented.
4440 (Check_Input_States.Check_Constituent_Usage): Update the comment
4441 on usage. A Proof_In constituent can now refine an Input state
4442 as long as there is at least one Input constituent present.
4444 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4446 * sem_ch6.adb (Check_Inline_Pragma): Use the Sloc of the
4447 body id as the sloc of the entity in the generated subprogram
4448 declaration, to avoid spurious conformance errors when style
4451 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4453 * sem_ch4.adb (Analyze_Selected_Component, Has_Dereference):
4454 Refine check on illegal calls to entities within a task body,
4455 when the entity is declared in an object of the same type. In
4456 a generic context there might be no explicit dereference but if
4457 the prefix includes an access type the construct is legal.
4459 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4461 * rtsfind.ads, rtsfind.adb (RE_Id, RE_Unit_Table): add
4462 RE_Default_Priority.
4464 2016-04-18 Bob Duff <duff@adacore.com>
4466 * sem_prag.adb (Check_Arg_Is_Local_Name): Don't do the check
4467 if the pragma came from an aspect specification.
4469 2016-04-18 Gary Dismukes <dismukes@adacore.com>
4471 * gnat1drv.adb, contracts.adb: Minor reformatting and wording fixes.
4473 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4475 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): To suppress
4476 superfluous conformance check on an inlined body with a previous
4477 spec, use the fact that the generated declaration does not come
4478 from source. We must treat the entity as coming from source to
4479 enable some back-end inlining when pragma appears after the body.
4481 2016-04-18 Gary Dismukes <dismukes@adacore.com>
4483 * lib-xref-spark_specific.adb, par-ch2.adb, errout.ads,
4484 exp_intr.adb: Minor reformatting and typo corrections.
4486 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4488 * sem_ch6.adb: Code cleanup.
4490 2016-04-18 Thomas Quinot <quinot@adacore.com>
4492 * sem_ch13.adb: Minor reformatting and error message tweaking
4493 (remove extraneous spaces).
4495 2016-04-18 Johannes Kanig <kanig@adacore.com>
4497 * gnat1drv.adb (Gnat1drv): Force loading of System unit for SPARK.
4499 2016-04-18 Bob Duff <duff@adacore.com>
4501 * s-fileio.adb (Fopen_Mode): If Mode = Out_File, and the file
4502 exists, and it's a fifo, we use "w" as the open string instead of
4503 "r+". This is necessary to make a write to the fifo block until
4506 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4508 * sem_attr.adb (Denote_Same_Function): Account
4509 for a special case where a primitive of a tagged type inherits
4510 a class-wide postcondition from a parent type.
4512 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4514 * par-ch2.adb (P_Expression_Or_Reserved_Word): New routine.
4515 (P_Pragma): Signal Scan_Pragma_Argument_Association when the use
4516 of reserved words is OK.
4517 (Scan_Pragma_Argument_Association):
4518 Add new formal Reserved_Words_OK and update the comment on
4519 usage. Code cleanup. Parse an expression or a reserved word in
4520 identifier form for pragmas Restriction_Warnings and Restrictions
4521 No_Use_Of_Attribute.
4522 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
4523 Reimplemented. (Check_Restriction_No_Use_Of_Pragma): Code cleanup.
4524 (Set_Restriction_No_Specification_Of_Aspect): Properly set the warning
4526 (Set_Restriction_No_Use_Of_Attribute): Properly set the warning
4527 flag for an attribute. (Set_Restriction_No_Use_Of_Entity):
4528 Update the parameter profile.
4529 (Set_Restriction_No_Use_Of_Pragma): Properly set the warning flag for
4531 * restrict.ads (Check_Restriction_No_Use_Of_Attribute): Update
4532 the comment on usage.
4533 (Set_Restriction_No_Use_Of_Entity): Update the parameter profile.
4534 * sem_attr.adb (Analyze_Attribute): Check restriction
4535 No_Use_Of_Attribute.
4536 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
4537 restriction No_Use_Of_Attribute before any rewritings have
4539 * sem_prag.adb (Analyze_Pragma): Check restriction
4540 No_Use_Of_Pragma before any rewritings have taken place.
4542 2016-04-18 Bob Duff <duff@adacore.com>
4544 * sem_ch6.adb (Is_Inline_Pragma): The pragma
4545 argument can be a selected component, which has no Chars field,
4546 so we need to deal with that case (use the Selector_Name).
4547 (Check_Inline_Pragma): We need to test Is_List_Member before
4548 calling In_Same_List, because in case of a library unit, they're
4549 not in lists, so In_Same_List fails an assertion.
4551 2016-04-18 Bob Duff <duff@adacore.com>
4553 * namet.ads, namet.adb: Add an Append that appends a
4554 Bounded_String onto a Bounded_String. Probably a little more
4555 efficient than "Append(X, +Y);". Also minor cleanup.
4556 (Append_Decoded, Append_Decoded_With_Brackets, Append_Unqualified,
4557 Append_Unqualified_Decoded): Make sure these work with non-empty
4559 * casing.ads, casing.adb (Set_Casing): Pass a Bounded_String
4560 parameter, defaulting to Global_Name_Buffer.
4561 * errout.ads, errout.adb (Adjust_Name_Case): Pass a
4562 Bounded_String parameter, no default.
4563 * exp_ch11.adb (Expand_N_Raise_Statement): Use local
4564 Bounded_String instead of Global_Name_Buffer.
4565 * exp_intr.ads, exp_intr.adb (Write_Entity_Name): Rename it
4566 to Append_Entity_Name, and pass a Bounded_String parameter,
4567 instead of using globals.
4568 (Add_Source_Info): Pass a Bounded_String parameter, instead of
4570 (Expand_Source_Info): Use local instead of globals.
4571 * stringt.ads, stringt.adb (Append): Add an Append procedure
4572 for appending a String_Id onto a Bounded_String.
4573 (String_To_Name_Buffer, Add_String_To_Name_Buffer): Rewrite in
4575 * sem_prag.adb (Set_Error_Msg_To_Profile_Name): Adjust for new
4576 Adjust_Name_Case parameter.
4577 * erroutc.adb, uname.adb: Don't pass D => Mixed_Case to
4578 Set_Casing; that's the default.
4579 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Pretend that calls to
4580 protected subprograms are entry calls; otherwise it is not possible to
4581 distinguish them from regular subprogram calls.
4583 2016-04-18 Gary Dismukes <dismukes@adacore.com>
4585 * sem_ch13.adb (Has_Good_Profile): Improvement
4586 of error message. Now indicates subtype_mark of formal parameter
4587 rather than the formal's name, plus minor rewording.
4589 2016-04-18 Pascal Obry <obry@adacore.com>
4591 * adaint.c, adaint.h, s-os_lib.ads: Add new routine Current_Process_Id.
4593 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4595 * stringt.adb, exp_ch6.adb, sem_ch13.adb: Minor reformatting.
4597 2016-04-18 Gary Dismukes <dismukes@adacore.com>
4599 * par-ch4.adb, sem_prag.adb: Minor reformatting.
4601 2016-04-18 Bob Duff <duff@adacore.com>
4603 * sinput.ads, sinput.adb (Build_Location_String): Take a
4604 parameter instead of using a global variable. The function
4605 version no longer destroys the Name_Buffer.
4606 * stringt.ads, stringt.adb (String_From_Name_Buffer): Take a
4607 parameter, which defaults to the Global_Name_Buffer, so some
4608 calls can avoid the global.
4609 * exp_ch11.adb, exp_intr.adb: Use new interfaces above
4610 to avoid using globals. All but one call to Build_Location_String
4611 avoids the global. Only one call to String_From_Name_Buffer
4614 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4616 * namet.adb, namet.ads, exp_unst.adb: Minor reformatting.
4618 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4620 * sem_eval.adb (Choice_Matches): Check the expression
4621 against the predicate values when the choice denotes a
4622 subtype with a static predicate.
4623 (Eval_Membership_Op): Code cleanup. Remove the suspicious guard which
4624 tests for predicates.
4625 (Is_OK_Static_Subtype): A subtype with a dynamic predicate
4626 is not static. (Is_Static_Subtype): A subtype with a dynamic
4627 predicate is not static.
4628 * sem_eval.ads (Is_OK_Static_Subtype): Update the comment on usage.
4629 (Is_Static_Subtype): Update the comment on usage.
4631 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4633 * sem_prag.adb (Analyze_Input_Item): Allow
4634 generic formals to appear as initialization items.
4636 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4638 * sem_ch13.adb (Analyze_Stream_TSS_Definition,
4639 Has_Good_Profile): Additional error message to indicate that
4640 the second parameter of the subprogram must be a first subtype.
4642 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4644 * sem_ch6.adb (Analyze_Subprogram_Body_Helper, Is_Inline_Pragma):
4645 Use the pragma lookahead that determines whether a subprogram
4646 is to be inlined, when some level of backend optimization is
4648 * sem_ch12.ads, sem_ch12.adb (Add_Pending_Instantiation): Factorize
4649 code used to create an instance body when needed for inlining.
4650 * exp_ch6.adb (Expand_Call): When a call is to be inlined, and the
4651 call appears within an instantiation that is not a compilation
4652 unit, add a pending instantiation for the enclosing instance,
4653 so the backend can inline in turn the calls contained in the
4656 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4658 * sem_prag.adb (Build_Pragma_Check_Equivalent): The mapping
4659 that relates operations of the parent type to the operations of
4660 the derived type has three distinct sources:
4661 a) explicit operations of the derived type carry an
4662 Overridden_Operation that designates the operation in the
4664 b) Implicit operations that are inherited by the derived type
4665 carry an alias that may be an explicit subprogram (in which case
4666 it may have an Overridden_ Operation indicator) or may also be
4667 inherited and carry its own alias.
4668 c) If the parent type is an interface, the operation of the
4669 derived type does not override, but the interface operation
4670 indicates the operation that implements it.
4671 * sem_prag.adb: Minor reformatting.
4672 * sem_prag.adb (Check_External_Property): Update
4673 the comment on usage. Reimplement.
4675 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4677 * exp_ch5.adb (Expand_Assignment_Statement): In restricted
4678 profiles such as ZFP, ceiling priority is not available.
4680 2016-04-18 Bob Duff <duff@adacore.com>
4682 * namet-sp.ads: Minor typo fix, ironically in 'Spelling_Checker'.
4684 2016-04-18 Bob Duff <duff@adacore.com>
4686 * sem_elab.adb (Output_Calls): Use
4687 Get_Name_String, to clearly indicate that the global Name_Buffer
4688 is being used. The previous code used Is_Internal_Name, which
4689 returns a Boolean, but also has a side effect of setting the
4690 Name_Buffer. Then it called the other Is_Internal_Name, which uses
4691 the Name_Buffer for its input. And then it called Error_Msg_N,
4692 again using the Name_Buffer. We haven't eliminated the global
4693 usage here, but we've made it a bit clearer.
4694 This also allows us to have a side-effect-free version of
4696 * namet.ads, namet.adb: Provide a type Bounded_String, along with
4697 routines that can be used without using global variables. Provide
4698 Global_Name_Buffer so existing code can continue to use the
4699 global. Mark the routines that use globals as obsolete. New code
4700 shouldn't call the obsolete ones, and we should clean up existing
4701 code from time to time.
4702 Name_Find_Str is renamed as Name_Find.
4703 * namet.h: Changed as necessary to interface to the new version
4705 * bindgen.adb, exp_unst.adb: Name_Find_Str is renamed as
4708 2016-04-18 Yannick Moy <moy@adacore.com>
4710 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization): used
4711 outside of GNATprove, hence it should not be removed.
4713 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4715 * sem_prag.adb (Analyze_Refinement_Clause):
4716 The refinement of an external abstract state can now mention
4717 non-external constituents.
4718 (Check_External_Property): Update all SPARK RM references.
4720 2016-04-18 Bob Duff <duff@adacore.com>
4722 * exp_intr.adb: Remove some duplicated code.
4724 2016-04-18 Yannick Moy <moy@adacore.com>
4726 * a-nudira.adb, a-nudira.ads, a-nuflra.adb, a-nuflra.ads: Mark
4727 package spec and body out of SPARK.
4729 2016-04-18 Johannes Kanig <kanig@adacore.com>
4731 * spark_xrefs.ads: Minor comment update.
4733 2016-04-18 Johannes Kanig <kanig@adacore.com>
4735 * gnat1drv.adb (Gnat1drv): Force loading of System
4738 2016-04-18 Bob Duff <duff@adacore.com>
4740 * a-cuprqu.adb: Correction to previous change. If a new node
4741 is inserted at the front of the queue (because it is higher
4742 priority than the previous front node), we need to update
4743 Header.Next_Unequal -- not just in the case where the queue was
4746 2016-04-18 Bob Duff <duff@adacore.com>
4748 * a-cuprqu.ads: Change the representation of List_Type from a
4749 singly-linked list to a doubly-linked list. In addition, add a
4750 pointer Next_Unequal, which points past a possibly-long chain
4751 of equal-priority items. This increases efficiency, especially
4752 in the case of many equal-priority items.
4753 * a-cuprqu.adb (Dequeue, Enqueue): Rewrite algorithms to take
4754 advantage of new data structure.
4755 (Finalize): Rewrite in terms of Dequeue, for simplicity.
4757 2016-04-18 Yannick Moy <moy@adacore.com>
4759 * contracts.adb (Analyze_Object_Contract,
4760 Analyze_Protected_Contract): Remove tests performed in GNATprove.
4761 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization):
4762 Remove query for tests performed in GNATprove.
4764 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4766 * sem_aggr.adb (Resolve_Record_Aggregate): If
4767 Warn_On_Redundant_Constructs is enabled, report a redundant box
4768 association that does not cover any components, as it done for
4769 redundant others associations in case statements.
4771 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4773 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions):
4774 Analyze the generated Check pragma for an inherited condition so
4775 that it does not freeze the dispatching type of the primitive
4776 operation, because it is pre-analyzed at the point of the
4777 subprogram declaration (and not in the subprogram body, as is
4778 done during regular expansion).
4780 2016-04-18 Vincent Celier <celier@adacore.com>
4782 * ali.ads: Increase the range of all _Id types to 100 millions.
4784 2016-04-18 Gary Dismukes <dismukes@adacore.com>
4786 * sem_warn.adb (Check_References): Change warning to suggest
4787 using pragma Export rather than saying "volatile has no effect".
4789 2016-04-18 Bob Duff <duff@adacore.com>
4791 * g-souinf.ads (Compilation_ISO_Date): New function to return
4792 the current date in ISO form.
4793 * exp_intr.adb (Expand_Source_Info, Add_Source_Info): Expand
4794 a call to Compilation_ISO_Date into a string literal containing
4795 the current date in ISO form.
4796 * exp_intr.ads (Add_Source_Info): Improve documentation.
4797 * sem_intr.adb (Check_Intrinsic_Subprogram): Recognize
4798 Compilation_ISO_Date.
4799 * snames.ads-tmpl (Name_Compilation_ISO_Date): New Name_Id.
4801 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
4803 * layout.adb (Set_Elem_Alignment): Extend setting of alignment
4804 to subtypes that are not first subtypes.
4806 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4808 * sem_prag.ads (Collect_Inherited_Class_Wide_Conditions):
4810 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Insert
4811 generated pragmas after subprogram declaration, rather than in
4812 the corresponding subprogram body.
4813 * sem_ch6.adb (New_Overloaded_Entity): In GNATProve
4814 mode, if the operation is overridding, call
4815 Collect_Inherited_Class_Wide_Conditions to generate the
4816 corresponding pragmas immediately after the corresponding
4817 subprogram declaration.
4819 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4821 * spark_xrefs.ads (Xref_Index, Scope_Index, File_Index): restrict
4822 type to natural numbers.
4823 (Stype): document code characters for concurrent entities.
4825 2016-04-18 Olivier Hainque <hainque@adacore.com>
4827 * targparm.ads: Update the Frontend_Exceptions default internal
4829 (Frontend_Exceptions_On_Target): Change default value to True.
4831 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4833 * sem_ch4.adb (Analyze_Selected_Component): Refine error
4834 detection when a selected component in the body of a synchronized
4835 type is a reference to an object of the same type declared
4836 elsewhere. The construct is legal if the prefix of the selected
4837 component includes an explicit dereference at any point.
4839 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4841 * sem_ch3.adb (Analyze_Object_Declaration): Do not consider
4842 internally generated expressions when trying to determine whether
4843 a formal parameter of a tagged type subject to Extensions_Visible
4844 False is used to initialize an object.
4845 * sem_ch4.adb (Analyze_Type_Conversion): Do not consider
4846 internally generated expressions when trying to determine whether
4847 a formal parameter of a tagged type subject to Extensions_Visible
4848 False is used in a type conversion.
4850 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4852 * sem_res.adb (Is_Protected_Operation_Call):
4853 Add guards to account for a non-decorated selected component.
4855 2016-04-18 Yannick Moy <moy@adacore.com>
4857 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve
4858 implementation of Body_Has_SPARK_Mode_On.
4859 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_From_Annotation):
4860 New function replacing previous Get_SPARK_Mode_From_Pragma, that
4861 deals also with aspects.
4862 (Get_SPARK_Mode_Type): Make function internal again.
4863 * inline.adb, sem_ch7.adb, sem_util.adb: Use new
4864 Get_SPARK_Mode_From_Annotation.
4866 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4868 * contracts.adb (Analyze_Object_Contract): Update references to
4870 * freeze.adb (Freeze_Entity): Update references to SPARK RM.
4871 * ghost.adb Add with and use clauses for Sem_Disp.
4872 (Check_Ghost_Derivation): Removed.
4873 (Check_Ghost_Overriding):
4874 Reimplemented. (Check_Ghost_Policy): Update references to SPARK RM.
4875 (Check_Ghost_Primitive): New routine.
4876 (Check_Ghost_Refinement): New routine. (Is_OK_Ghost_Context):
4877 Update references to SPARK RM. (Is_OK_Pragma): Update references
4878 to SPARK RM. Predicates are now a valid context for references
4880 * ghost.ads (Check_Ghost_Derivation): Removed.
4881 (Check_Ghost_Overriding): Update the comment on usage.
4882 (Check_Ghost_Primitive): New routine.
4883 (Check_Ghost_Refinement): New routine.
4884 (Remove_Ignored_Ghost_Code): Update references to SPARK RM.
4885 * sem_ch3.adb (Process_Full_View): Remove the now obsolete check
4886 related to Ghost derivations
4887 * sem_ch6.adb (Check_Conformance): Remove now obsolete check
4888 related to the convention-like behavior of pragma Ghost.
4889 (Check_For_Primitive_Subprogram): Verify that the Ghost policy
4890 of a tagged type and its primitive agree.
4891 * sem_prag.adb (Analyze_Pragma): Update references to SPARK
4892 RM. Move the verification of pragma Assertion_Policy Ghost
4893 to the proper place. Remove the now obsolete check related
4894 to Ghost derivations.
4895 (Collect_Constituent): Add a call to Check_Ghost_Refinement.
4896 * sem_res.adb (Resolve_Actuals): Update references to SPARK RM.
4898 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
4900 * layout.adb: Fix more minor typos in comments.
4902 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4904 * a-calend.ads, sem_prag.adb, sem_ch6.adb: Minor reformatting.
4906 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4908 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): In GNATprove
4909 mode, collect inherited class-wide conditions to generate the
4910 corresponding pragmas.
4911 * sem_prag.ads (Build_Pragma_Check_Equivalent): Moved from contracts
4912 * contracts.adb (Collect_Inherited_Class_Wide_Conditions): New
4913 procedure for overriding subprograms, used to generate the pragmas
4914 corresponding to an inherited class- wide pre- or postcondition.
4915 * sem_prag.adb (Build_Pragma_Check_Equivalent): moved here
4916 from contracts.adb (Replace_Condition_Entities): Subsidiary
4917 Build_Pragma_Check_Equivalent, to implement the proper semantics
4918 of inherited class-wide conditions, as given in AI12-0113.
4919 (Process_Class_Wide_Condition): Removed.
4920 (Collect_Inherited_Class_Wide_Conditions): Iterate over pragmas
4921 in contract of subprogram, to collect inherited class-wide
4923 (Build_Pragma_Check_Equivalent): Moved to sem_prag.adb
4925 2016-04-18 Yannick Moy <moy@adacore.com>
4927 * a-calend.adb (Ada.Calendar): Mark package body as SPARK_Mode Off.
4928 * a-calend.ads (Ada.Calendar): Mark package spec as
4929 SPARK_Mode and add synchronous external abstract state Clock_Time.
4931 2016-04-18 Yannick Moy <moy@adacore.com>
4933 * sem_res.adb (Resolve_Call): Prevent inlining of
4934 calls inside expression functions. Factor previous code issuing
4935 errors to call Cannot_Inline instead, which does appropriate
4936 processing of message for GNATprove.
4938 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4940 * einfo.ads, sem_ch3.adb, sem_ch8.adb, osint-l.adb, rtsfind.adb,
4941 osint-b.adb: Cleanups.
4943 2016-04-18 Yannick Moy <moy@adacore.com>
4945 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only create
4946 body to inline in GNATprove mode when SPARK_Mode On applies to
4948 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_Type): Make function
4951 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
4953 * layout.adb: Fix minor typo in comment.
4954 * inline.adb: Fix minor pasto.
4955 * sem_ch12.ads: Fix minor typos in comments.
4957 2016-04-18 Ed Schonberg <schonberg@adacore.com>
4959 * sem_disp.adb (Check_Dispatching_Call): Major rewriting to
4960 handle some complex cases of tag indeterminate calls that are
4961 actuals in other dispatching calls that are themselves tag
4963 (Check_Dispatching_Context): Add parameter to support recursive
4964 check for an enclosing construct that may provide a tag for a
4965 tag-indeterminate call.
4967 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4969 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
4970 Add global variables Task_Input_Seen and Task_Output_Seen.
4971 (Analyze_Global_Item): Detect an illegal use of the current
4972 instance of a single protected/task type in a global annotation.
4973 (Analyze_Input_Output): Inputs and output related to the current
4974 instance of a task unit are now tracked.
4975 (Check_Usage): Require
4976 the presence of the current instance of a task unit only when
4977 one input/output is available. (Current_Task_Instance_Seen):
4979 (Is_CCT_Instance): New parameter profile. Update
4980 the comment on usage. The routine now properly recognizes several
4981 cases related to single protected/task types.
4983 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
4985 * freeze.adb (Freeze_Entity): Use New_Freeze_Node
4986 to create a brand new freeze node. This handles a case where an
4987 ignored Ghost context is freezing something which is not ignored
4988 Ghost and whose freeze node should not be removed from the tree.
4989 (New_Freeze_Node): New routine.
4991 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
4993 * sigtramp.h (__gnat_set_is_vxsim) New function to
4994 tell sigtramp-vxworks to handle vxsim signal contexts. *
4995 sigtramp-vxworks.c (__gnat_sigtramp) Take into account the
4996 differences in the sigcontext structure between the expected
4997 regular x86 or x86_64 ones and the ones received in case of
4998 exexution on the vxworks simulator.
4999 * init.c: also compute is_vxsim in case of x86_64-vx7 target. Provide
5000 this information to sigtramp-vxworks.c. Remove the old mechanism for
5002 * init-vxsim.c, sigtramp-vxworks-vxsim.c: remove, now obsolete.
5004 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
5006 * exp_ch3.adb (Inline_Init_Proc): New function returning
5007 whether the initialization procedure of a type should be
5008 inlined. Return again True for controlled type themselves.
5009 (Build_Array_Init_Proc): Call it to set Set_Is_Inlined on Init_Proc.
5010 (Build_Record_Init_Proc): Likewise.
5012 2016-04-18 Arnaud Charlet <charlet@adacore.com>
5014 * gnatvsn.ads (Library_Version): Bump to 7.
5016 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5018 * sem_ch6.adb (Analyze_Expression_Function): Set Inlined flag
5019 on the entity of a subprogram declaration that is completed by
5020 an expression function.
5022 2016-04-18 Ed Schonberg <schonberg@adacore.com>
5024 * sem_util.adb (Is_Current_Instance): A entity given by a subtype
5025 declaration can appear in an aspect specification for a dynamic
5026 predicate, and a pragma for aspect Predicate_Failure.
5027 * exp_util.adb (Replace_Subtype_References): Replace current
5028 occurrences of the subtype to which a dynamic predicate applies,
5029 byt the expression that triggers a predicate check. Needed to
5030 implement new aspect Predicate_Failure.
5032 2016-04-18 Arnaud Charlet <charlet@adacore.com>
5034 * a-intsig.ads, a-intsig.adb: Removed, no longer used.
5035 * Makefile.rtl: update accordingly.
5037 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
5039 * sem_type.adb (Disambiguate): Call Covers only when necessary
5040 for standard operators.
5042 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
5044 * atree.ads (Num_Extension_Nodes): Add couple of figures
5046 * atree.adb: Add GNAT.Heap_Sort_G dependency.
5047 (Print_Statistics): New exported procedure to print statistics.
5049 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
5051 * exp_ch3.adb (Build_Record_Init_Proc): Do not mark the procedure
5052 as to be inlined if the type needs finalization.
5054 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
5056 * sigtramp-vxworks-target.inc: sigtramp-vxworks: force the stack
5057 alignment for x86_64.
5058 * init.c: Better fix for guard page reset on x86_64-vx7.
5059 Do not try to retrieve the page that actually raised
5060 the signal as the probing mechanism used on x86_64 do not allow
5061 such retrieval. We thus just test if the guard page is active,
5062 and re-activate it if not.
5064 2016-04-18 Arnaud Charlet <charlet@adacore.com>
5066 * a-sytaco.adb (Suspension_Object): Aspect Default_Initial_Condition
5069 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
5071 * affinity.c: Use the proper type for task id.
5072 * init.c (__gnat_inum_to_ivec): ivec is a pointer.
5074 2016-04-18 Arnaud Charlet <charlet@adacore.com>
5076 * sem_prag.adb (Process_Convention): Relax rule on exporting
5077 Intrinsic types if Relaxed_RM_Semantics is True.
5079 2016-04-18 Vincent Celier <celier@adacore.com>
5081 * sem_ch3.adb, lib.ads, sinfo.ads, sem_ch10.adb, einfo.adb, einfo.ads,
5082 checks.ads, sem_ch12.adb, sem.adb, sem_util.adb, sem_util.ads,
5083 sem_res.adb, sem_attr.adb, par.adb, exp_ch4.adb, errout.ads,
5084 sem_ch4.adb, atree.adb, atree.ads, sem_warn.adb, treepr.adb,
5085 exp_ch3.ads, exp_unst.adb: Change "descendent" to
5086 "descendant" in comments, error messages and identifiers.
5087 * gcc-interface/decl.c: Ditto.
5089 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
5091 * sem_type.adb (Operator_Matches_Spec): Call First_Formal on
5092 New_S only once at the beginning of the function.
5094 2016-04-02 Eric Botcazou <ebotcazou@adacore.com>
5096 * gcc-interface/decl.c (components_to_record): Restrict the previous
5097 change to fields with variable size.
5099 2016-03-27 Eric Botcazou <ebotcazou@adacore.com>
5101 * gcc-interface/decl.c (components_to_record): Add special case for
5102 single field with representation clause at offset 0.
5104 2016-03-16 Svante Signell <svante.signell@gmail.com>
5106 * gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
5107 * s-osinte-gnu.ads: New file.
5109 2016-03-13 Eric Botcazou <ebotcazou@adacore.com>
5111 * system-vxworks-m68k.ads (Stack_Check_Probes): Set to True.
5112 (Stack_Check_Limits): Set to False.
5113 * system-vxworks-mips.ads (Stack_Check_Probes): Set to True.
5114 (Stack_Check_Limits): Set to False.
5115 * system-vxworks-ppc.ads (Stack_Check_Probes): Set to True.
5116 (Stack_Check_Limits): Set to False.
5117 * system-vxworks-sparcv9.ads (Stack_Check_Probes): Set to True.
5118 (Stack_Check_Limits): Set to False.
5119 * system-vxworks-x86.ads (Stack_Check_Probes): Set to True.
5120 (Stack_Check_Limits): Set to False.
5122 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
5124 * gcc-interface/trans.c (statement_node_p): New predicate.
5125 (gnat_to_gnu): Invoke it to detect statement nodes. In ASIS mode, do
5126 not return dummy results for expressions attached to packed array
5127 implementation types.
5129 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
5131 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always mark
5132 the expression of a renaming manually in case #3.
5134 2016-03-02 Dominik Vogt <vogt@linux.vnet.ibm.com>
5136 * system-linux-s390.ads: Enable Stack_Check_Probes.
5137 * system-linux-s390.ads: Likewise.
5139 2016-02-29 Martin Liska <mliska@suse.cz>
5141 * gcc-interface/utils.c (set_reverse_storage_order_on_pad_type):
5142 Replace ENABLE_CHECKING macro with flag_checking.
5144 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
5146 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Retrofit
5147 handling of unconstrained array types as designated types into common
5148 processing. Also handle array types as incomplete designated types.
5150 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
5152 * gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
5153 ASIS mode, fully lay out the minimal record type.
5155 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
5157 * gcc-interface/trans.c (finalize_nrv_r): Remove obsolete code.
5158 (build_return_expr): Likewise.
5159 (Call_to_gnu): If this is a function call and there is no target,
5160 create a temporary for the return value for all aggregate types,
5161 but never create it for a return statement. Push a binding level
5162 around the call in more cases. Remove obsolete code.
5164 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
5166 * gcc-interface/ada-tree.h (DECL_RETURN_VALUE_P): New macro.
5167 * gcc-interface/gigi.h (gigi): Remove useless attribute.
5168 (gnat_gimplify_expr): Likewise.
5169 (gnat_to_gnu_external): Declare.
5170 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Factor out
5171 code dealing with the expression of external constants into...
5172 Invoke gnat_to_gnu_external instead.
5173 <E_Variable>: Invoke gnat_to_gnu_external to translate renamed objects
5174 when not for a definition. Deal with COMPOUND_EXPR and variables with
5175 DECL_RETURN_VALUE_P set for renamings and with the case of a dangling
5176 'reference to a function call in a renaming. Remove obsolete test and
5177 adjust associated comment.
5178 * gcc-interface/trans.c (Call_to_gnu): Set DECL_RETURN_VALUE_P on the
5179 temporaries created to hold the return value, if any.
5180 (gnat_to_gnu_external): ...this. New function.
5181 * gcc-interface/utils.c (create_var_decl): Detect a constant created
5182 to hold 'reference to function call.
5183 * gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Add folding
5184 for COMPOUND_EXPR in the DECL_RETURN_VALUE_P case.
5186 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
5188 * exp_ch4.adb (Expand_N_Indexed_Component): Activate synchronization if
5189 the prefix denotes an entity which Has_Atomic_Components.
5190 * gcc-interface/trans.c (node_is_atomic): Return true if the prefix
5191 denotes an entity which Has_Atomic_Components.
5193 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
5195 * gcc-interface/utils2.c (gnat_protect_expr): Make a SAVE_EXPR only
5196 for fat pointer or scalar types.
5198 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
5200 * gcc-interface/gigi.h (maybe_debug_type): New inline function.
5201 * gcc-interface/misc.c (gnat_get_array_descr_info): Use it.
5202 Call maybe_character_value on the array bounds. Get to the base type
5203 of the index type and call maybe_debug_type on it.
5204 * gcc-interface/utils.c (finish_character_type): Add special treatment
5207 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
5209 * gcc-interface/misc.c (gnat_enum_underlying_base_type): New function.
5210 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define to above.
5212 2016-02-12 Jakub Jelinek <jakub@redhat.com>
5214 * prj-tree.ads: Spelling fixes - behaviour -> behavior and
5215 neighbour -> neighbor.
5216 * prep.adb: Likewise.
5217 * prj.ads: Likewise.
5218 * prepcomp.adb: Likewise.
5219 * g-socket.ads: Likewise.
5220 * s-imgrea.adb: Likewise.
5221 * a-calend.adb: Likewise.
5222 * exp_disp.adb: Likewise.
5223 * doc/gnat_ugn/gnat_utility_programs.rst: Likewise.
5224 * g-socket.adb: Likewise.
5225 * sem_ch12.adb: Likewise.
5226 * terminals.c: Likewise.
5228 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
5230 * gcc-interface/misc.c (gnat_init): Remove second argument in call to
5231 build_common_tree_nodes.
5233 2016-02-08 Eric Botcazou <ebotcazou@adacore.com>
5235 * gcc-interface/utils.c (create_var_decl): Set again DECL_COMMON and
5236 DECL_IGNORED_P last.
5238 2016-01-28 Eric Botcazou <ebotcazou@adacore.com>
5240 * gcc-interface/gigi.h (enum attr_type): Rename into...
5241 (enum attrib_type): ...this.
5242 (struct attrib): Adjust.
5243 * gcc-interface/decl.c (prepend_one_attribute): Likewise.
5245 2016-01-20 Eric Botcazou <ebotcazou@adacore.com>
5247 * exp_ch2.adb (Expand_Current_Value): Make an appropriate character
5248 literal if the entity is of a character type.
5249 * gcc-interface/lang.opt (fsigned-char): New option.
5250 * gcc-interface/misc.c (gnat_handle_option): Accept it.
5251 (gnat_init): Adjust comment.
5252 * gcc-interface/gigi.h (finish_character_type): New prototype.
5253 (maybe_character_type): New inline function.
5254 (maybe_character_value): Likewise.
5255 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>: For
5256 a character of CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
5257 Set TYPE_ARTIFICIAL early and call finish_character_type on the type.
5258 <E_Enumeration_Subtype>: For a subtype of character with RM_Size and
5259 Esize equal to CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
5260 Copy TYPE_STRING_FLAG from type to subtype.
5261 <E_Array_Type>: Deal with character index types.
5262 <E_Array_Subtype>: Likewise.
5263 * gcc-interface/trans.c (gigi): Replace unsigned_char_type_node with
5264 char_type_node throughout.
5265 (build_raise_check): Likewise.
5266 (get_type_length): Deal with character types.
5267 (Attribute_to_gnu) <Attr_Pos>: Likewise. Remove obsolete range check
5269 <Attr_Pred>: Likewise.
5270 (Loop_Statement_to_gnu): Likewise.
5271 (Raise_Error_to_gnu): Likewise.
5272 <N_Indexed_Component>: Deal with character index types. Remove
5274 <N_Slice>: Likewise.
5275 <N_Type_Conversion>: Deal with character types. Minor tweak.
5276 <N_Unchecked_Type_Conversion>: Likewise.
5278 <N_Op_Eq>: Likewise.
5279 (emit_index_check): Delete.
5280 * gcc-interface/utils.c (finish_character_type): New function.
5281 (gnat_signed_or_unsigned_type_for): Deal with built-in character types.
5282 * gcc-interface/utils2.c (expand_sloc): Replace unsigned_char_type_node
5283 with char_type_node.
5284 (build_call_raise): Likewise.
5285 (build_call_raise_column): Likewise.
5286 (build_call_raise_range): Likewise.
5288 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
5290 * gcc-interface/gigi.h (build_call_raise_column): Adjust prototype.
5291 (build_call_raise_range): Likewise.
5292 (gnat_unsigned_type): Delete.
5293 (gnat_signed_type): Likewise.
5294 (gnat_signed_or_unsigned_type_for): New prototype.
5295 (gnat_unsigned_type_for): New inline function.
5296 (gnat_signed_type_for): Likewise.
5297 * gcc-interface/cuintp.c (build_cst_from_int): Call build_int_cst.
5298 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
5299 (gnat_to_gnu_entity) <E_Array_Type>: Always translate the index types
5300 and compute their base type from that.
5301 <E_Array_Subtype>: Remove duplicate declaration.
5302 * gcc-interface/misc.c (get_array_bit_stride): Call build_int_cst.
5303 * gcc-interface/trans.c (get_type_length): Likewise.
5304 (Attribute_to_gnu): Likewise.
5305 (Loop_Statement_to_gnu): Likewise.
5306 (Call_to_gnu): Likewise.
5307 (gnat_to_gnu): Call build_real, build_int_cst, gnat_unsigned_type_for
5308 and gnat_signed_type_for. Minor tweaks.
5309 (build_binary_op_trapv): Likewise.
5310 (emit_check): Likewise.
5311 (convert_with_check): Likewise.
5312 (Raise_Error_to_gnu): Adjust calls to the build_call_raise family of
5313 functions. Minor tweaks.
5314 (Case_Statement_to_gnu): Remove dead code.
5315 (gnat_to_gnu): Call gnat_unsigned_type_for and gnat_signed_type_for.
5316 (init_code_table): Minor reordering.
5317 * gcc-interface/utils.c (gnat_unsigned_type): Delete.
5318 (gnat_signed_type): Likewise.
5319 (gnat_signed_or_unsigned_type_for): New function.
5320 (unchecked_convert): Use directly the size in the test for precision
5321 vs size adjustments.
5322 (install_builtin_elementary_types): Call gnat_signed_type_for.
5323 * gcc-interface/utils2.c (nonbinary_modular_operation): Call
5325 (build_goto_raise): New function taken from...
5326 (build_call_raise): ...here. Call it.
5327 (build_call_raise_column): Add KIND parameter and call it.
5328 (build_call_raise_range): Likewise.
5330 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
5332 * gcc-interface/ada-tree.h (TYPE_IMPLEMENTS_PACKED_ARRAY_P): Rename to
5333 (TYPE_IMPL_PACKED_ARRAY_P): ...this.
5334 (TYPE_CAN_HAVE_DEBUG_TYPE_P): Do not test TYPE_DEBUG_TYPE.
5335 * gcc-interface/decl.c (gnat_to_gnu_entity): Simplify NULL_TREE tests
5336 and tweak gnat_encodings tests throughout.
5337 (initial_value_needs_conversion): Likewise.
5338 (intrin_arglists_compatible_p): Likewise.
5339 * gcc-interface/misc.c (gnat_print_type): Likewise.
5340 (gnat_get_debug_type): Likewise.
5341 (gnat_get_fixed_point_type_info): Likewise.
5342 (gnat_get_array_descr_info): Likewise.
5343 (get_array_bit_stride): Likewise.
5344 (gnat_get_type_bias): Fix formatting.
5345 (enumerate_modes): Likewise.
5346 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
5347 (add_decl_expr): Simplify NULL_TREE test.
5348 (end_stmt_group): Likewise.
5349 (build_binary_op_trapv): Fix formatting.
5350 (get_exception_label): Use switch statement.
5351 (init_code_table): Move around.
5352 * gcc-interface/utils.c (global_bindings_p): Simplify NULL_TREE test.
5353 (gnat_poplevel): Likewise.
5354 (gnat_set_type_context): Likewise.
5355 (defer_or_set_type_context): Fix formatting.
5356 (gnat_pushdecl): Simplify NULL_TREE test.
5357 (maybe_pad_type): Likewise.
5358 (add_parallel_type): Likewise.
5359 (create_range_type): Likewise.
5360 (process_deferred_decl_context): Likewise.
5361 (convert): Likewise.
5362 (def_builtin_1): Likewise.
5363 * gcc-interface/utils2.c (find_common_type): Likewise.
5364 (build_binary_op): Likewise.
5365 (gnat_rewrite_reference): Likewise.
5366 (get_inner_constant_reference): Likewise.
5368 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
5371 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Consider
5372 the parent function instead of the current function in order to issue
5373 the warning or the error. Add guard for ignored functions.
5375 2016-01-17 Jakub Jelinek <jakub@redhat.com>
5377 * adaint.c (__gnat_killprocesstree): Avoid -Wparentheses warning.
5379 2016-01-15 Jakub Jelinek <jakub@redhat.com>
5381 * adaint.c (__gnat_locate_exec_on_path): Use const char * instead
5382 of char * for path_val to avoid warnings.
5384 2016-01-06 Pierre-Marie de Rodat <derodat@adacore.com>
5386 * gcc-interface/utils.c: Bump copyright year.
5387 (rest_of_record_type_compilation): Add XVE/XVU parallel types to
5388 the current lexical scope.
5390 2016-01-04 Jakub Jelinek <jakub@redhat.com>
5392 * gnat_ugn.texi: Bump @copying's copyright year.
5393 * gnat_rm.texi: Likewise.
5395 2016-01-02 Eric Botcazou <ebotcazou@adacore.com>
5397 * gnatvsn.ads: Bump copyright year.
5400 Copyright (C) 2016 Free Software Foundation, Inc.
5402 Copying and distribution of this file, with or without modification,
5403 are permitted in any medium without royalty provided the copyright
5404 notice and this notice are preserved.