1 2012-09-07 Eric Botcazou <ebotcazou@adacore.com>
3 * gcc-interface/trans.c (Loop_Statement_to_gnu): Revert to using
4 size_type_node instead of sizetype.
6 2012-07-19 Eric Botcazou <ebotcazou@adacore.com>
8 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Try to ensure
9 that an object of CW type initialized to a value is sufficiently
10 aligned for this value.
12 2012-07-19 Eric Botcazou <ebotcazou@adacore.com>
14 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Do not
15 look up the REP part of the base type in advance. Deal with that of
17 (get_rep_part): Be prepared for record types with fields.
19 2012-07-03 Eric Botcazou <ebotcazou@adacore.com>
21 * gcc-interface/trans.c (Call_to_gnu): Robustify test for function case
22 if the CICO mechanism is used.
24 2012-07-03 Eric Botcazou <ebotcazou@adacore.com>
26 * gcc-interface/utils2.c (build_simple_component_ref): Do not look
27 through an extension if the type contains a placeholder.
29 2012-07-03 Eric Botcazou <ebotcazou@adacore.com>
31 * exp_disp.adb (Expand_Dispatching_Call): Propagate the convention on
32 the designated subprogram type and also set Is_Dispatch_Table_Entity.
33 (Expand_Interface_Thunk): Propagate the convention on the thunk.
34 (Set_CPP_Constructors_Old): Set Is_Constructor and Convention_CPP on
35 the internal view of the constructors.
36 (Set_CPP_Constructors): Likewise.
37 * sem_prag.adb (Analyze_Pragma) <Pragma_CPP_Constructor>: Set the
38 convention on the function.
39 * gcc-interface/gigi.h (is_cplusplus_method): Declare.
40 * gcc-interface/decl.c (Has_Thiscall_Convention): New macro.
41 (gnat_to_gnu_entity) <E_Subprogram_Type>: Test it to set the `thiscall'
43 (get_minimal_subprog_decl): Likewise.
44 (is_cplusplus_method): New predicate.
45 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Access>: Issue an
46 error on access to C++ constructor or member function.
48 2012-07-03 Eric Botcazou <ebotcazou@adacore.com>
50 * gcc-interface/utils.c (gnat_pushdecl): Set TYPE_CONTEXT for types
51 attached to a TYPE_DECL.
53 2012-06-15 Eric Botcazou <ebotcazou@adacore.com>
56 * gcc-interface/gigi.h (maybe_vector_array): Make static inline.
57 * gcc-interface/utils.c (maybe_vector_array): Delete.
58 * gcc-interface/trans.c (gnat_to_gnu) <N_Indexed_Component>: Mark the
59 array object as addressable if it has vector type and is on the LHS.
61 2012-06-14 Jakub Jelinek <jakub@redhat.com>
63 * gcc-interface/Makefile.in (gnatlib-shared-default): Append
64 $(PICFLAG_FOR_TARGET) to GNATLIBCFLAGS_FOR_C passed to submake.
66 2012-06-14 Release Manager
70 2012-06-13 Eric Botcazou <ebotcazou@adacore.com>
73 2012-05-19 Eric Botcazou <ebotcazou@adacore.com>
75 * gcc-interface/decl.c (Has_Thiscall_Convention): New macro.
76 (gnat_to_gnu_entity) <E_Subprogram_Type>: Test it to set the thiscall
78 (get_minimal_subprog_decl): Likewise.
79 (gnat_first_param_is_class): New predicate.
81 2012-06-12 Olivier Hainque <hainque@adacore.com>
83 * gcc-interface/Makefile.in (GNATLIBCFLAGS_FOR_C): Remove
84 $(PIC_FLAG_FOR_TARGET).
85 (gnatlib-shared-default): Add $(PIC_FLAG_FOR_TARGET) to
86 GNATLIBCFLAGS_FOR_C passed to gnatlib.
87 (gnatlib-shared-win32): Likewise.
88 (gnatlib-shared-darwin): Likewise.
89 (gnatlib-shared-dual-win32): Pass PIC_FLAG_FOR_TARGET to
92 2012-05-26 Eric Botcazou <ebotcazou@adacore.com>
94 * gcc-interface/decl.c (variant_desc): Rename 'record' to 'new_type'.
95 (build_variant_list): Adjust to above renaming.
96 (gnat_to_gnu_entity) <E_Record_Subtype>: Likewise. Give a unique name
97 to the type of the variant containers.
98 (create_variant_part_from): Likewise. Give a unique name to the type
101 2012-05-25 Eric Botcazou <ebotcazou@adacore.com>
104 * link.c (__gnat_object_file_option): Set to "-Wl,@" for GNU linker.
105 (__gnat_using_gnu_linker): Delete.
106 * gnatlink.adb (Gnatlink): Declare Object_File_Option_Ptr here...
107 Declare Object_File_Option string constant and Using_GNU_response_file
109 (Process_Binder_File): ...instead of here. Delete Using_GNU_Linker,
110 Opening and Closing local variables. Do not handle the GNU linker
112 (Write_RF): New procedure to write into the response file. Escape some
113 characters if a GNU response file is used. Keep track of error status.
114 Invoke Write_RF to write into the response file. Delete the file only
115 if the link was successful.
116 * mlib-utl.adb: Do not `with' package System.
117 (Gcc): Likewise. Declare Object_File_Option string constant and
118 Using_GNU_response_file boolean constant.
119 (Write_RF): Take a string instead of address and length. Escape some
120 characters if a GNU response file is used.
121 Invoke Write_RF to write into the response file. Delete the file only
122 if the link was successful. Do not warn if it cannot be deleted.
124 2012-05-20 Eric Botcazou <ebotcazou@adacore.com>
126 * gcc-interface/utils.c (gnat_write_global_declarations): Put a name
127 on the dummy global variable.
129 2012-05-19 Eric Botcazou <ebotcazou@adacore.com>
131 * gcc-interface/decl.c (Has_Thiscall_Convention): New macro.
132 (gnat_to_gnu_entity) <E_Subprogram_Type>: Test it to set the thiscall
134 (get_minimal_subprog_decl): Likewise.
135 (gnat_first_param_is_class): New predicate.
137 Backport from mainline
138 2012-05-15 Javier Miranda <miranda@adacore.com>
140 * exp_ch3.adb (Build_Offset_To_Top): Modify the
141 expansion of the offset_to_top functions to ensure that their
142 profile is conformant with the profile specified in Ada.Tags. No
143 change in functionality.
145 2012-05-18 Eric Botcazou <ebotcazou@adacore.com>
147 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: For an object at
148 global level with unconstrained nominal subtype and a non-fixed size,
149 make a variable for the size.
151 2012-05-15 Andris Pavenis <andris.pavenis@iki.fi>
154 * s-taprop-dummy.adb (Specific): New package.
156 2012-05-15 Eric Botcazou <ebotcazou@adacore.com>
158 * sem_prag.adb (Process_Atomic_Shared_Volatile): Propagate
159 atomicity from an object to its underlying type only if it
162 2012-05-06 Pascal Obry <obry@adacore.com>
165 2012-02-24 Dave Korn <dave.korn.cygwin@gmail.com>
167 * gcc-interface/Makefile.in (WIN_SO_PREFIX [windows targets]): New
168 Windows-specific make variable.
169 (WIN_SO_INSTALL_DIR [windows targets]): Likewise.
170 (install-gnatlib): Respect the above during installation when set,
171 and also install any windows import library that has been built.
172 (gnatlib-shared-win32): Use WIN_SO_PREFIX to name output DLL and also
173 build a corresponding import library.
175 2012-04-30 Eric Botcazou <ebotcazou@adacore.com>
177 * gcc-interface/utils.c (finish_record_type): Force the traditional GCC
178 layout for bitfields on the type if it is packed or has a representation
179 clause and an alternate layout is available.
181 2012-04-09 Mike Stump <mikestump@comcast.net>
183 * a-assert.ads: Remove execute permission.
184 * a-chacon.ads: Likewise.
185 * a-coteio.ads: Likewise.
186 * a-envvar.ads: Likewise.
187 * a-exetim-mingw.ads: Likewise.
188 * a-fzteio.ads: Likewise.
189 * a-izteio.ads: Likewise.
190 * a-lcteio.ads: Likewise.
191 * a-llctio.ads: Likewise.
192 * a-scteio.ads: Likewise.
193 * a-suenco.ads: Likewise.
194 * a-suenst.ads: Likewise.
195 * a-suewst.ads: Likewise.
196 * a-suezst.ads: Likewise.
197 * a-tirsfi.ads: Likewise.
198 * a-wichha.ads: Likewise.
199 * a-zchara.ads: Likewise.
200 * a-zchhan.ads: Likewise.
201 * a-zchuni.ads: Likewise.
202 * a-zrstfi.ads: Likewise.
203 * aspects.ads: Likewise.
204 * g-byorma.ads: Likewise.
205 * g-decstr.ads: Likewise.
206 * g-encstr.ads: Likewise.
207 * g-spchge.ads: Likewise.
208 * g-u3spch.ads: Likewise.
209 * g-wispch.ads: Likewise.
210 * g-zspche.ads: Likewise.
211 * namet-sp.ads: Likewise.
212 * s-os_lib.ads: Likewise.
213 * s-regexp.ads: Likewise.
214 * s-regpat.ads: Likewise.
215 * s-string.ads: Likewise.
216 * s-tasloc.ads: Likewise.
217 * s-utf_32.ads: Likewise.
218 * sem_aux.ads: Likewise.
219 * a-assert.adb: Likewise.
220 * a-chacon.adb: Likewise.
221 * a-envvar.adb: Likewise.
222 * a-exetim-mingw.adb: Likewise.
223 * a-suenco.adb: Likewise.
224 * a-suenst.adb: Likewise.
225 * a-suewst.adb: Likewise.
226 * a-suezst.adb: Likewise.
227 * a-tirsfi.adb: Likewise.
228 * a-wichha.adb: Likewise.
229 * a-zchhan.adb: Likewise.
230 * a-zchuni.adb: Likewise.
231 * a-zrstfi.adb: Likewise.
232 * aspects.adb: Likewise.
233 * g-byorma.adb: Likewise.
234 * g-decstr.adb: Likewise.
235 * g-encstr.adb: Likewise.
236 * g-spchge.adb: Likewise.
237 * g-u3spch.adb: Likewise.
238 * g-wispch.adb: Likewise.
239 * g-zspche.adb: Likewise.
240 * namet-sp.adb: Likewise.
241 * s-except.adb: Likewise.
242 * s-inmaop-vxworks.adb: Likewise.
243 * s-os_lib.adb: Likewise.
244 * s-regexp.adb: Likewise.
245 * s-regpat.adb: Likewise.
246 * s-string.adb: Likewise.
247 * s-tasloc.adb: Likewise.
248 * s-utf_32.adb: Likewise.
249 * s-wchcon.adb: Likewise.
250 * sem_aux.adb: Likewise.
252 2012-03-22 Release Manager
254 * GCC 4.7.0 released.
256 2012-02-29 Eric Botcazou <ebotcazou@adacore.com>
258 * gcc-interface/decl.c (components_to_record): Add ARTIFICIAL parameter
259 and set TYPE_ARTIFICIAL according to it. Adjust recursive call.
260 (gnat_to_gnu_entity) <E_Record_Type>: Adjust call to above function.
261 * gcc-interface/utils.c (rest_of_record_type_compilation): Do not
262 invoke rest_of_type_decl_compilation on the parallel type, if any.
264 2012-02-29 Eric Botcazou <ebotcazou@adacore.com>
266 * gcc-interface/utils.c (gnat_write_global_declarations): Make sure the
267 dummy global built for global types is preserved.
269 2012-02-27 Tristan Gingold <gingold@adacore.com>
271 * gcc-interface/decl.c (gnat_to_gnu_entity) [E_String_Type,
272 E_Array_Type]: Reuse dummy fat type for gnu_ptr_template and
275 2012-02-27 Eric Botcazou <ebotcazou@adacore.com>
277 * gcc-interface/ada-tree.h (TYPE_PACKED_ARRAY_TYPE_P): Add checking.
278 (TYPE_BY_REFERENCE_P): New flag.
279 (TYPE_IS_BY_REFERENCE_P): New macro.
280 (TYPE_DUMMY_P): Add checking and remove VOID_TYPE.
281 (TYPE_IS_DUMMY_P): Adjust for above change.
282 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_BY_REFERENCE_P
283 and TYPE_IS_BY_REFERENCE_P instead of TREE_ADDRESSABLE.
284 (gnat_to_gnu_param): Likewise.
285 (maybe_pad_type): Likewise.
286 (make_type_from_size): Use TYPE_IS_PACKED_ARRAY_TYPE_P.
287 * gcc-interface/misc.c (must_pass_by_ref): Use TYPE_IS_BY_REFERENCE_P
288 instead of TREE_ADDRESSABLE.
289 * gcc-interface/trans.c (finalize_nrv): Likewise.
290 (call_to_gnu): Likewise. Do not create a temporary for return values
291 with by-reference type here.
292 (gnat_to_gnu): Test TYPE_IS_DUMMY_P instead of TYPE_DUMMY_P.
293 (gnat_gimplify_expr) <ADDR_EXPR>: Don't do anything for non-constant
294 CONSTRUCTORs and calls.
295 * gcc-interface/utils.c (make_dummy_type): Get the equivalent type of
296 the underlying type and use it throughout. Use TYPE_IS_BY_REFERENCE_P
297 instead of TREE_ADDRESSABLE.
298 * gcc-interface/utils2.c (build_cond_expr): Deal with by-reference
301 2012-02-27 Eric Botcazou <ebotcazou@adacore.com>
303 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Revert previous
304 change that creates a special VAR_DECL for debugging purposes. For an
305 aliased object with an unconstrained nominal subtype, make its type a
306 thin reference to the underlying object.
307 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Deal with
308 expressions built for the initialization of above objects.
310 2012-02-24 Dave Korn <dave.korn.cygwin@gmail.com>
312 * gcc-interface/Makefile.in (WIN_SO_PREFIX [windows targets]): New
313 Windows-specific make variable.
314 (WIN_SO_INSTALL_DIR [windows targets]): Likewise.
315 (install-gnatlib): Respect the above during installation when set,
316 and also install any windows import library that has been built.
317 (gnatlib-shared-win32): Use WIN_SO_PREFIX to name output DLL and also
318 build a corresponding import library.
320 2012-02-22 Robert Dewar <dewar@adacore.com>
322 * exp_util.adb, make.adb, sem_dim.adb, sem_ch4.adb, exp_disp.adb: Minor
325 2012-02-22 Geert Bosch <bosch@adacore.com>
327 * g-bytswa-x86.adb, g-bytswa.adb, gcc-interface/Makefile.in: Remove
328 x86-specific version of byteswap and use GCC builtins instead.
330 2012-02-22 Tristan Gingold <gingold@adacore.com>
332 * gcc-interface/decl.c (gnat_to_gnu_entity) [E_String_Type,
333 E_Array_Type]: Translate component ealier.
335 2012-02-22 Robert Dewar <dewar@adacore.com>
337 * par-ch3.adb (P_Signed_Integer_Type_Definition): Specialize
338 error message for 'Range.
340 2012-02-22 Pascal Obry <obry@adacore.com>
342 * s-taprop-mingw.adb (Finalize_TCB): Do not wait on thread handle as
343 this is our own thread.
345 2012-02-22 Sergey Rybin <rybin@adacore.com frybin>
347 * tree_io.ads: Update ASIS_Version_Number because of the changes
350 2012-02-22 Hristian Kirtchev <kirtchev@adacore.com>
352 * exp_ch7.adb (Create_Finalizer): Suppress elaboration checks on
353 stack-related finalizers.
355 2012-02-22 Ed Schonberg <schonberg@adacore.com>
357 * sem_ch6.adb (Analyze_Expression_Function): If the construct
358 is a completion, indicate that its formals are the formals of
359 a completion, and as such do not get a cross- reference entry.
360 (Analyze_Subprogram_Specification): Do not generate a definition
361 for the entity of an expression function, because it may be a
362 completion. Definition will be generated if needed when analyzing
363 the generated subprogram declaration.
365 2012-02-22 Vincent Celier <celier@adacore.com>
367 * make.adb (Check): When checking if an object file is in the
368 correct object directory, get the unit name from a previous call
369 to Check_Source_Info_In_ALI.
370 * makeutl.adb (Check_Source_Info_In_ALI): Return the name of
371 the unit when everything is OK, otherwise return No_Name.
372 * makeutl.ads (Check_Source_Info_In_ALI): Return Name_Id instead
375 2012-02-22 Ed Schonberg <schonberg@adacore.com>
377 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): In an
378 instance, the operator is visible if an operand is of some
379 numeric type which is not in use or directly visible, and the
380 other operand is a numeric literal.
382 2012-02-22 Tristan Gingold <gingold@adacore.com>
384 * init.c: Minor code clean up.
385 * gcc-interface/Make-lang.in: Update dependencies.
387 2012-02-22 Arnaud Charlet <charlet@adacore.com>
389 * gnatlink.adb (Gnatlink): Use -gnatcC in CodePeer_Node,
390 otherwise GCC will generate an object file.
392 2012-02-22 Vincent Celier <celier@adacore.com>
394 * projects.texi: Correct typo related to "**" in Source_Dirs.
396 2012-02-22 Steve Baird <baird@adacore.com>
398 * sem_prag.adb (Analyze_PPC_In_Decl_Part): Clean up generation of
401 2012-02-22 Vincent Pucci <pucci@adacore.com>
403 * rtsfind.adb (Get_Unit_Name): Ada_Numerics_Child and
404 System_Dim_Child cases added.
405 * rtsfind.ads: Ada_Numerics,
406 Ada_Numerics_Generic_Elementary_Functions, System_Dim,
407 System_Dim_Float_IO and System_Dim_Integer_IO added to the list
408 of RTU_Id. Ada_Numerics_Child and System_Dim_Child added as
410 * sem_dim.adb (Is_Dim_IO_Package_Entity): Use of
411 Rtsfind to verify the package entity is located either
412 in System.Dim.Integer_IO or in System.Dim.Float_IO.
413 (Is_Dim_IO_Package_Instantiation): Minor
414 changes. (Is_Elementary_Function_Call): Removed.
415 (Is_Elementary_Function_Entity): New routine.
416 (Is_Procedure_Put_Call): Is_Dim_IO_Package_Entity call added.
417 * snames.ads-tmpl: Name_Dim and Name_Generic_Elementary_Functions
420 2012-02-22 Vincent Pucci <pucci@adacore.com>
422 * sem_prag.adb: Minor reformatting.
424 2012-02-22 Ed Schonberg <schonberg@adacore.com>
426 * sem_ch3.adb (Find_Type_Name): When analyzing a private type
427 declaration that is the completion of a tagged incomplete type, do
428 not associate the class-wide type already created with the private
429 type to prevent order-of-elaboration issues in the back-end.
430 * exp_disp.adb (Find_Specific_Type): Find specific type of
431 a class-wide type, and handle the case of an incomplete type
432 coming either from a limited_with clause or from an incomplete
433 type declaration. Used when expanding a dispatchin call and
434 generating tag checks (minor refactoring).
436 2012-02-22 Robert Dewar <dewar@adacore.com>
438 * exp_ch5.adb: Add comment.
439 * sem_ch12.adb, exp_ch6.adb: minor reformatting
441 2012-02-22 Ed Schonberg <schonberg@adacore.com>
443 * freeze.adb (Freeze_Entity): Do not perform type layout within
446 2012-02-22 Eric Botcazou <ebotcazou@adacore.com>
448 * init.c (__gnat_error_handler) [Linux]: Map SIGBUS to
451 2012-02-22 Ed Schonberg <schonberg@adacore.com>
453 * exp_ch5.adb (Expand_N_Assignment_Statement): Reject an
454 assignment to a classwide type whose type is limited, as
455 can happen in an instantiation in programs that run afoul or
459 2012-02-17 Ed Schonberg <schonberg@adacore.com>
461 * exp_ch6.adb (Legal_Copy): If layout is not
462 determined in the front-end, do not emit error message when
463 by-reference actual is potentially unaligned.
464 * gcc-interface/decl.c (gnat_to_gnu_field): Better error message for
465 illegal representation clause on tagged or aliased component, or on
466 by-reference type with forced alignment.
468 2012-02-17 Nicolas Roche <roche@adacore.com>
470 * gcc-interface/Makefile.in: Ensure FORCE_DEBUG_ADAFLAGS variables is
471 propagated by gnatlib-sjlj and gnatlib-zcx targets.
472 * gcc-interface/Make-lang.in: Update dependencies.
474 2012-02-17 Thomas Quinot <quinot@adacore.com>
476 * sem_ch12.adb (Analyze_Package_Instantiation): For an
477 instantiation in an RCI library unit, omit the instance body
478 if the RCI library unit is the instance itself (E.2.3(18)),
479 but include the body if the instantiation is within the RCI
480 declaration (12.3(12)).
482 2012-02-17 Steve Baird <baird@adacore.com>
484 * sem_prag.adb (Analyze_PPC_In_Decl_Part): Pre'Class and
485 Post'Class aspects can only be specified for a primitive operation
488 2012-02-17 Yannick Moy <moy@adacore.com>
490 * gnat_rm.texi: Minor shuffling.
492 2012-02-17 Ed Schonberg <schonberg@adacore.com>
494 * aspects.adb: Expression functions can carry pre/postconditions.
495 * par-ch6.adb (P_Subprogram): look for optional pre/postconditions
496 in an expression function.
497 * sem_prag (Check_Precondition_Postcondition): legal on expression
500 2012-02-17 Vincent Pucci <pucci@adacore.com>
502 * a-cdlili.adb, a-cidlli.adb, a-cihama.adb, a-cimutr.adb,
503 * a-ciorma.adb, a-cohama.adb, a-coinve.adb, a-comutr.adb,
504 * a-convec.adb, a-coorma.adb (Adjust): New routine.
505 (Constant_Reference): Increment Busy and Lock counters.
506 (Reference): Increase Busy and Lock counters.
507 (Finalize): New routine.
508 * a-cihase.adb, a-ciorse.adb, a-cohase.adb, a-coorse.adb:
509 (Adjust): New routine. (Constant_Reference): Increment Busy
511 (Finalize): New routine.
512 * a-cdlili.ads, a-cidlli.ads, a-cihama.ads, a-cihase.ads,
513 * a-cimutr.ads, a-ciorma.ads, a-ciorse.ads, a-cohama.ads,
514 * a-cohase.ads, a-coinve.ads, a-comutr.ads, a-convec.ads,
515 * a-coorma.ads, a-coorse: Controlled component added to the
518 2012-02-17 Robert Dewar <dewar@adacore.com>
520 * restrict.adb (Check_Restriction): Add special handling for
521 No_Obsolescent_Features.
523 2012-02-17 Hristian Kirtchev <kirtchev@adacore.com>
525 * exp_util.adb (Find_Finalize_Address): When dealing with an
526 internally built full view for a type with unknown discriminants,
527 use the original record type.
529 2012-02-17 Robert Dewar <dewar@adacore.com>
531 * sem_dim.adb: Minor reformatting.
533 2012-02-17 Yannick Moy <moy@adacore.com>
535 * gnat_rm.texi: Minor rewording.
537 2012-02-17 Thomas Quinot <quinot@adacore.com>
539 * sem_aggr.adb: Minor reformatting.
541 2012-02-17 Robert Dewar <dewar@adacore.com>
543 * gnat_ugn.texi: Update doc for -gnatw.m to include 2*x case.
545 2012-02-17 Vincent Pucci <pucci@adacore.com>
547 * sem_dim.adb (Is_Dim_IO_Package_Entity): New routine.
548 (Is_Dim_IO_Package_Instantiation): Is_Dim_IO_Package_Entity
550 (Is_Procedure_Put_Call): Is_Dim_IO_Package_Entity
552 * s-dim.ads: Make package Pure.
554 2012-02-17 Gary Dismukes <dismukes@adacore.com>
556 * prj-nmsc.adb: Minor reformatting.
558 2012-02-17 Yannick Moy <moy@adacore.com>
560 * gnat_rm.texi: Update GNAT RM with a separate chapter on restrictions.
562 2012-02-17 Yannick Moy <moy@adacore.com>
564 * gnat_ugn.texi: Fix typos.
566 2012-02-17 Pascal Obry <obry@adacore.com>
568 * prj-nmsc.adb: prj-nmsc.adb (Check_Aggregated): Check that an
569 aggregate is not Externally_Built.
571 2012-02-17 Ed Schonberg <schonberg@adacore.com>
573 * sem_aggr.adb (Resolve_Record_Aggregate): If a composite
574 component has a box association, copy the default value using
575 the current scope as the scope of internal types, to prevent
576 scoping anomalies in gigi.
578 2012-02-17 Robert Dewar <dewar@adacore.com>
580 * sem_dim.adb, sem_dim.ads, s-tasren.adb, prj.adb, prj.ads, freeze.adb,
581 sem_res.adb, exp_ch4.adb, sinput.adb, sinput.ads, exp_aggr.adb,
582 exp_intr.adb, s-os_lib.adb: Minor reformatting.
584 2012-02-17 Ed Schonberg <schonberg@adacore.com>
586 * sem_ch6.adb (Is_Non_Overriding_Operation): Add warning if the
587 old operation is abstract, the relevant type is not abstract,
588 and the new subprogram fails to override.
590 2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
592 * gcc-interface/trans.c (Identifier_to_gnu): Move block retrieving the
593 type of the result to the end and execute it for a deferred constant of
594 a discriminated type whose full view can be elaborated statically.
596 2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
598 * gcc-interface/trans.c (gnat_to_gnu) <N_Qualified_Expression>: If the
599 type is tagged, mark it as used for debugging purposes.
600 <N_Allocator>: Likewise for a qualified expression.
602 2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
604 * gcc-interface/trans.c (call_to_gnu): Create the temporary for the
605 return value in the by-reference return type case if this isn't the
606 expression of an object declaration. Tidy up.
608 2012-02-09 Tristan Gingold <gingold@adacore.com>
610 * gcc-interface/Makefile.in: Remove .sym rule (not used).
611 Remove adamsg.o object (requires native message compiler).
612 * init.c (CMA$_EXIT_THREAD, MTH$_FLOOVEMAT, SS$_INTDIV): Define as a
613 macro instead of as extern int.
614 (ADA$_ALREADY_OPEN, ADA$_CONSTRAINT_ERRO, ADA$_DATA_ERROR)
615 (ADA$_DEVICE_ERROR, ADA$_END_ERROR, ADA$_FAC_MODE_MISMAT)
616 (ADA$_IOSYSFAILED, ADA$_KEYSIZERR, ADA$_KEY_MISMATCH)
617 (ADA$_LAYOUT_ERROR, ADA$_LINEXCMRS, ADA$_MAXLINEXC)
618 (ADA$_MODE_ERROR, ADA$_MRN_MISMATCH, ADA$_MRS_MISMATCH)
619 (ADA$_NAME_ERROR, ADA$_NOT_OPEN, ADA$_ORG_MISMATCH)
620 (ADA$_PROGRAM_ERROR, ADA$_RAT_MISMATCH, ADA$_RFM_MISMATCH)
621 (ADA$_STAOVF, ADA$_STATUS_ERROR, ADA$_STORAGE_ERROR)
622 (ADA$_UNSUPPORTED, ADA$_USE_ERROR): Likewise.
623 (struct cond_except): Field cond is now an unsigned int.
624 (dec_ada_cond_except_table): Adjust.
625 (cond_except_table): Likewise.
626 (cond_resignal_table): Likewise.
627 (__gnat_default_resignal_p): Fix style.
629 2012-02-08 Vincent Celier <celier@adacore.com>
631 * gcc-interface/Make-lang.in: Add g-byorma.o to gnatbind objects
632 (g-buorma is now imported by sinput).
634 * scn.adb (Initialize_Scanner): Call Check_For_BOM
635 * sinput-p.adb (Source_File_Is_Subunit): Call Check_For_BOM
636 * sinput.adb: New procedure Check_For_BOM
637 * sinput.ads: New procedure Check_For_BOM
639 2012-02-08 Vincent Pucci <pucci@adacore.com>
641 * impunit.adb: Dimension package names updated
642 * Makefile.rtl: s-dim added
643 * sem_dim.adb (Is_Procedure_Put_Call): minor changes
644 (Is_Dim_IO_Package_Instantiation): minor changes
645 * sem_dim.ads: minor changes in comments
646 * snames.ads-tmpl: Name_Dim added Name_Dim_Float_IO and
647 Name_Dim_Integer_IO removed
648 * s-dim.ads: New package. Define the dimension terminology.
649 * s-diflio.adb, s-diinio.adb, s-dimkio.ads, s-dimmks.ads,
650 * s-dmotpr.ads: Package names updated.
651 * s-diflio.ads, s-diinio.ads: Documentation added and package
654 2012-02-08 Gary Dismukes <dismukes@adacore.com>
656 * gcc-interface/utils2.c (build_call_alloc_dealloc_proc): Revise test
657 for storage pools to test for an underlying record type rather than
658 testing Is_Tagged_Type, so that simple storage pools will be handled
659 the same as normal Ada storage pools.
661 2012-02-08 Yannick Moy <moy@adacore.com>
663 * gnat_rm.texi: Minor reshuffling to place restriction at
666 2012-02-08 Bob Duff <duff@adacore.com>
668 * warnsw.adb (Set_Warning_Switch): Set Warn_On_Suspicious_Modulus_Value
669 False for '-gnatwA', to suppress these warnings.
671 2012-02-08 Vincent Celier <celier@adacore.com>
673 * sinput-p.adb (Source_File_Is_Subunit): Check for BOM before
674 starting to scan, so that UTF8 encoding is taken into account.
676 2012-02-08 Arnaud Charlet <charlet@adacore.com>
678 * s-tasren.adb, s-tasren.ads (Internal_Complete_Rendezvous): New
680 (Complete_Rendezvous): Now call Internal_Complete_Rendezvous.
681 (Exceptional_Complete_Rendezvous): Mark No_Return.
683 2012-02-08 Eric Botcazou <ebotcazou@adacore.com>
685 * exp_aggr.adb (Compile_Time_Known_Composite_Value):
686 New predicate to compute whether a composite value can be
687 evaluated at compile time.
688 (Component_Not_OK_For_Backend): Use Compile_Time_Known_Value for all
689 expressions of elementary type and Compile_Time_Known_Composite_Value
690 for all other expressions.
691 (Expand_Record_Aggregate): Convert to assignments in the case
692 of a type with mutable components if the aggregate cannot be
695 2012-02-08 Gary Dismukes <dismukes@adacore.com>
697 * aspects.ads (type Aspect_Id): Add Simple_Storage_Pool_Type.
698 (Impl_Defined_Aspects): Add association for
699 Aspect_Simple_Storage_Pool_Type.
701 association for Aspect_Simple_Storage_Pool_Type.
703 (Canonical_Aspect): Add association for Simple_Storage_Pool_Type.
704 * exp_attr.adb (Expand_N_Attribute_Reference):
705 Change name to Name_Simple_Storage_Pool_Type.
706 * exp_ch4.adb (Expand_N_Allocator): Change
707 name to Name_Simple_Storage_Pool_Type.
708 * exp_intr.adb (Expand_Unc_Deallocation): Change name to
709 Name_Simple_Storage_Pool_Type. * freeze.adb (Freeze_Entity):
710 Change names to Name_Simple_Storage_Pool_Type. * par-prag.adb:
711 Change names to Name_Simple_Storage_Pool_Type. * sem_attr.adb:
712 (Analyze_Attribute): Change name to Name_Simple_Storage_Pool_Type.
713 * sem_ch13.adb (Analyze_Attribute_Definition_Clause):
714 Change name to Name_Simple_Storage_Pool_Type.
716 (Analyze_Pragma): Change name to Name_Simple_Storage_Pool_Type.
717 (Sig_Flags): Change name to Name_Simple_Storage_Pool_Type.
718 * sem_res.adb (Resolve_Allocator): Change name to
719 Name_Simple_Storage_Pool_Type. * snames.ads-tmpl:
720 (Name_Simple_Storage_Pool_Type): New name constant.
721 (type Pragma_Id): Change name to Name_Simple_Storage_Pool_Type and
722 move to main pragma section because it no longer matches the
724 * snames.adb-tmpl (Get_Pragma_Id): Remove test for
725 Name_Simple_Storage_Pool.
726 (Is_Pragma_Name): Remove test for Name_Simple_Storage_Pool.
728 2012-02-08 Robert Dewar <dewar@adacore.com>
730 * gnat_ugn.texi: Add some clarification to -gnatwA and -gnatws.
732 2012-02-08 Pascal Obry <obry@adacore.com>
734 * prj.adb (Compute_All_Imported_Projects): Use new
735 For_Project_And_Aggregated_Context to ensure proper context is
736 used for encapsulated aggregate libraries.
737 * prj-proc.adb (Recursive_Process): Call
738 Process_Aggregated_Projects earlier to ensure that all dependent
739 projects are set with the proper encapsulated status.
741 2012-02-08 Pascal Obry <obry@adacore.com>
743 * s-os_lib.adb (Normalize_Arguments): Properly escape last \ in null
746 2012-02-08 Pascal Obry <obry@adacore.com>
748 * prj.ads, prj.adb (For_Project_And_Aggregated_Context): New
749 generic routine with a context parameter.
751 2012-02-08 Robert Dewar <dewar@adacore.com>
753 * a-coinve.adb, sem_util.adb, sem_ch8.adb, a-cobove.adb,
754 a-convec.adb: Minor reformatting and code reorganization.
756 2012-02-08 Steve Baird <baird@adacore.com>
758 * sem_cat.adb (In_Preelaborated_Unit): A child
759 unit instantiation does not inherit preelaboration requirements
762 2012-02-08 Gary Dismukes <dismukes@adacore.com>
764 * aspects.ads (type Aspect_Id): Add Aspect_Simple_Storage_Pool.
765 (Impl_Defined_Aspects): Add entry for Aspect_Simple_Storage_Pool.
766 (Aspect_Argument): Add Name entry for Aspect_Simple_Storage_Pool.
767 (Aspect_Names): Add entry for Aspect_Simple_Storage_Pool.
768 * aspects.adb (Canonical_Aspect): Add entry for
769 Aspect_Simple_Storage_Pool.
770 * exp_attr.adb (Expand_N_Attribute_Reference): Handle case of
771 Attribute_Simple_Storage_Pool in the same way as Storage_Pool
772 (add conversion, analyze/resolve). For the Storage_Size attribute,
773 for the simple pool case, locate and use the simple pool type's
774 Storage_Size function (if any), otherwise evaluate to zero.
775 * exp_ch4.adb (Expand_N_Allocator): In the case of an allocator
776 for an access type with an associated simple storage pool,
777 locate and use the pool type's Allocate.
778 * exp_intr.adb (Expand_Unc_Deallocation): In the case where the
779 access type has a simple storage pool, locate the pool type's
780 Deallocate procedure (if present) and use it as the procedure
781 to call on the Free operation.
782 * freeze.adb (Freeze_Entity): In the case of a full type for
783 a private type defined with pragma Simple_Storage_Pool, check
784 that the full type is also appropriate for the pragma. For
785 a simple storage pool type, validate that the operations
786 Allocate, Deallocate (if present), and Storage_Size
787 (if present) are defined with appropriate expected profiles.
788 (Validate_Simple_Pool_Op_Formal): New procedure
789 (Validate_Simple_Pool_Operation): New procedure Add with and
791 * par-prag.adb: Add Pragma_Simple_Storage_Pool to case statement
792 (no action required).
793 * sem_attr.adb (Analyze_Attribute): For the case of the
794 Storage_Pool attribute, give a warning if the prefix type has an
795 associated simple storage pool, and rewrite the attribute as a
796 raise of Program_Error. In the case of the Simple_Storage_Pool
797 attribute, check that the prefix type has an associated simple
798 storage pool, and set the attribute type to the pool's type.
799 * sem_ch13.adb (Analyze_Aspect_Specifications): Add
800 Aspect_Simple_Storage_Pool case choice.
801 (Analyze_Attribute_Definition_Clause): Add
802 Aspect_Simple_Storage_Pool to case for Ignore_Rep_Clauses
803 (no action). Add handling for Simple_Storage_Pool attribute
804 definition, requiring the name to denote a simple storage pool
806 (Check_Aspect_At_Freeze_Point): For a simple storage pool
807 aspect, set the type to that of the name specified for the aspect.
808 * sem_prag.adb (Analyze_Pragma): Add handling for pragma
809 Simple_Storage_Pool, requiring that it applies to a library-level
810 type declared in a package declaration that is a limited private
811 or limited record type.
812 * sem_res.adb (Resolve_Allocator): Flag an attempt to call a
813 build-in-place function in an allocator for an access type with
814 a simple storage pool as unsupported.
815 * snames.ads-tmpl: Add Name_Simple_Storage_Pool.
816 (type Attribute_Id): Add Attribute_Simple_Storage_Pool.
817 (type Pragma_Id): Add Pragma_Simple_Storage_Pool.
818 * snames.adb-tmpl (Get_Pragma_Id): Handle case of
819 Name_Simple_Storage_Pool.
820 (Is_Pragma_Name): Return True for Name_Simple_Storage_Pool.
822 2012-02-08 Cyrille Comar <comar@adacore.com>
824 * projects.texi: Clarify doc for interfaces.
826 2012-02-07 Eric Botcazou <ebotcazou@adacore.com>
828 * gcc-interface/Make-lang.in (GCC_LINKERFLAGS): New variable.
831 2012-02-01 Tristan Gingold <gingold@adacore.com>
833 * gcc-interface/trans.c (Loop_Statement_to_gnu): Use sizetype
834 instead of size_type_node.
836 2012-01-30 Nicolas Roche <roche@adacore.com>
838 * gcc-interface/Make-lang.in: Update dependencies.
839 * gcc-interface/Makefile.in: Use system-vxworks-system-ppc-mils.ads
841 Remove Linker_Options -crtbe when building sjlj run-time.
843 2012-01-30 Robert Dewar <dewar@adacore.com>
845 * sem.adb (Analyze): Call Analyze_Mod for N_Op_Mod mode.
846 * sem_ch3.adb (Modular_Type_Declaration): Warn on mod value of
847 form 2 * small-literal.
848 * sem_ch4.adb (Analyze_Mod): New procedure (warn on suspicious
850 * sem_ch4.ads (Analyze_Mod): New procedure.
852 2012-01-30 Ed Schonberg <schonberg@adacore.com>
854 * sem_ch6.adb: sem_ch6.adb (Analyze_Expression_Function): Copy
855 types and return expression when building spec for implicit
856 body, to preserve global references that may be present in an
859 2012-01-30 Matthew Heaney <heaney@adacore.com>
861 * a-convec.adb, a-coinve.adb, a-cobove.adb (Sort,
862 Reverse_Elements): Check for cursor tampering.
864 2012-01-30 Ed Schonberg <schonberg@adacore.com>
866 * sem_util.adb (Is_Fully_Initialized_Type): In Ada 2012, a
867 type with aspect Default_Value or Default_Component_Value is
868 fully initialized, and use of variables of such types do not
871 2012-01-30 Javier Miranda <miranda@adacore.com>
874 * sem_ch8.adb (Analyze_Subprogram_Renaming):
875 Handle self-renaming when the renamed entity is referenced using
878 2012-01-30 Vincent Celier <celier@adacore.com>
880 * projects.texi: Add documentation for attribute Interfaces.
882 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
884 * exp_ch7.adb (Build_Finalizer_Call): Set loc again.
885 * exp_ch11.adb (Expand_At_End_Handler): Do not provide a source
886 location for the wrapped call to the original AT_END routine
887 and the subsequent return statement.
889 2012-01-30 Pascal Obry <obry@adacore.com>
891 * s-rannum.adb: Minor reformatting.
893 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
895 * a-calend-vms.adb, a-calend.adb: Increment the number of leap seconds
896 to 25 and add the hard time value for 2012-06-30.
898 2012-01-30 Robert Dewar <dewar@adacore.com>
900 * a-strhas.ads, einfo.adb, einfo.ads, exp_ch7.adb, exp_ch9.adb,
901 freeze.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-proc.adb, s-llflex.ads,
902 s-ransee.adb, s-ransee.ads, sem_ch13.adb, sem_dim.adb, sem_prag.adb:
903 Minor reformatting/code reorganization.
905 2012-01-30 Thomas Quinot <quinot@adacore.com>
907 * s-rannum.adb, s-ransee.adb, s-ransee.ads (Get_Seed): Return
908 Unsigned_64 rather than Duration.
909 (System.Random_Numbers.Reset): Use full value of seed
910 (do not truncate sub-second bits).
912 2012-01-30 Thomas Quinot <quinot@adacore.com>
914 * sem_cat.adb, sem_ch12.adb: Minor reformatting.
916 2012-01-30 Yannick Moy <moy@adacore.com>
918 * gnat_ugn.texi: Minor correction of GNAT UG, to take into
919 account changes to -gnatwa and more recent warnings.
921 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
923 * exp_ch7.adb (Build_Finalizer_Call): Do not provide a source
924 location when creating a call to a finalizer.
925 * exp_ch11.adb (Expand_Exception_Handlers): Do not provide
926 a source location for the first actual of Save_Occurrence for
929 2012-01-30 Ed Schonberg <schonberg@adacore.com>
931 * einfo.ads, einfo,adb: New attribute on scalar types:
932 Default_Aspect_Value New attribute on array types:
933 Default_Aspect_Component_Value Move attribute Related_Array_Object
934 to a different position to accomodate new aspect attributes.
935 * freeze.adb (Freeze_Entity): Use new attributes to retrieve value
936 of defaults set with an aspect specification, rather than using
937 the list of aspects attached to the type, to prevent issues with
939 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
940 Default_Value and Default_Component _Value, store corresponding
941 expression in type entity.
942 (Check_Aspect_At_End_Of_Declaration): If the default aspects
943 are declared on the full view, use the full view to resolve the
944 correseponding expression.
945 * exp_ch3.adb (Init_Component): Use attribute
946 Default_Aspect_Component_Value to perform default initialization,
947 rather than relying on the rep item list for the type.
948 (Get_Simple_Init_Val): Ditto.
950 2012-01-30 Thomas Quinot <quinot@adacore.com>
952 * a-strhas.ads: Document risk of collision attack.
954 2012-01-30 Yannick Moy <moy@adacore.com>
956 * gnat_ugn.texi: Minor update wrt warning switches.
958 2012-01-30 Vincent Celier <celier@adacore.com>
960 * prj-nmsc.adb (Check_Interfaces): Report an error when a
961 unit from Library_Interface is not a unit of the project.
963 2012-01-30 Vincent Pucci <pucci@adacore.com>
965 * sem_prag.adb (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Parent
966 links fixed inside PPC pragmas.
967 * sem_ch12.adb: Move call to Make_Aspect_For_PPC_In_Gen_Sub_Decl.
969 2012-01-30 Thomas Quinot <quinot@adacore.com>
971 * s-ransee.ads: Minor reformatting.
973 2012-01-30 Pascal Obry <obry@adacore.com>
975 * prj.ads, prj.adb (For_Each_Source): Add support for skipping
976 sources coming from an encapsulated library.
978 2012-01-30 Ed Schonberg <schonberg@adacore.com>
980 * sem_ch3.adb (Process-Full_View): fix typo.
981 * sem_ch13.adb (Aalyze_Aspect_Specifications): if predicates
982 appear on a private type and the full view is available, ensure
983 existence of freeze node for full view.
984 (Build_Predicate_Function): Attach predicate function to both
985 views of a private type.
987 2012-01-30 Vincent Celier <celier@adacore.com>
989 * prj-nmsc.adb (Check_Interfaces): Compute the Lib_Interface_ALIs
990 for the project if either attribute Library_Interface or
991 Interfaces is declared.
992 (Check_Stand_Alone_Library): Use Lib_Interface_ALIs computed in
995 2012-01-30 Pascal Obry <obry@adacore.com>
997 * prj-proc.adb (Recursive_Process): Set From_Encapsulated_Lib
998 boolean value to true in the process list created by this routine.
999 * prj.ads (Project_List_Element): New field From_Encapsulated_Lib.
1000 Continued work for KA06-021.
1001 * prj.adb (Compute_All_Imported_Projects): Set
1002 From_Encapsulated_Lib boolean flag.
1004 2012-01-30 Vincent Pucci <pucci@adacore.com>
1006 * sem_dim.adb (Expand_Put_Call_With_Dimension_Symbol): Minor
1008 * s-diflio.ads: Minor change.
1010 2012-01-30 Javier Miranda <miranda@adacore.com>
1012 * exp_ch9.adb (Build_Dispatching_Requeue): Add missing call
1013 to Get_Entry_Index. Required to generate code which provides
1014 the correct value of Entry_Index in the target entry.
1016 2012-01-30 Nicolas Roche <roche@adacore.com>
1018 * system-vxworks-ppc.ads: Add pragma Linker_Options -crtbe to
1019 fix issue with zcx on VxWorks5.
1021 2012-01-30 Pascal Obry <obry@adacore.com>
1023 * prj.ads, prj.adb (For_Every_Project_Imported): Remove
1025 (For_Every_Project_Imported_Context): New generic routine with
1026 a context parameter.
1027 * prj-nmsc.adb: Revert to use For_Every_Project_Imported Avoid
1028 distributed complexity.
1029 * prj-env.adb, prj-conf.adb, makeutl.adb, gnatcmd.adb: Ditto.
1031 2012-01-30 Thomas Quinot <quinot@adacore.com>
1033 * exp_aggr.adb (Expand_Record_Aggregate): After creating the
1034 _parent aggregate for an extension aggregate, check whether it
1035 requires delayed (top-down) expansion.
1037 2012-01-30 Vincent Pucci <pucci@adacore.com>
1039 * sem_dim.adb (Expand_Put_Call_With_Dimension_Symbol): Rewritten.
1040 * snames.ads-tmpl: Name_Item and Name_Symbols added.
1041 * s-diflio.adb, s-diflio.ads, s-diinio.adb, s-diinio.ads: Rename
1042 and change the position of parameter Symbols in every Put routine.
1043 * s-dimmks.ads: Convert long float type Mks_Type into long
1045 * s-llflex.ads: Modifications in comments.
1047 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
1049 * sem_ch12.adb (Earlier): Do not use the
1050 top level source locations of the two input nodes.
1052 2012-01-30 Robert Dewar <dewar@adacore.com>
1054 * einfo.ads, sem_prag.adb, sem_attr.adb, aspects.ads,
1055 sem_cat.adb, sem_aggr.adb, exp_aggr.adb: Minor reformatting.
1057 2012-01-30 Robert Dewar <dewar@adacore.com>
1059 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb: Minor reformatting.
1061 2012-01-30 Olivier Hainque <hainque@adacore.com>
1063 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Add rule for r1 back +
1066 2012-01-30 Thomas Quinot <quinot@adacore.com>
1068 * gnat_rm.texi, sem_dist.adb, sem_dist.ads, einfo.ads, sem_prag.adb,
1069 sem_ch12.adb, sem_attr.adb, aspects.adb, aspects.ads, par-prag.adb,
1070 sem_cat.adb, snames.ads-tmpl (Sem_Dist.Is_Valid_Remote_Object_Type):
1071 New subprogram (extracted from
1072 Sem_Cat.Validate_Remote_Access_Object_Type_Declaration).
1073 (Einfo.Is_Remote_Types): Now applies to generic types. Update
1074 documentation accordingly.
1075 (Sem_Ch12.Analyze_Associations): A RACW type is acceptable as
1076 actual for a formal type to which a pragma Remote_Access_Type
1078 (Aspects, Par.Prag, Sem_Prag): Support for new pramga/aspect
1080 (Sem_Attr.Analyze_Attribute, case Stub_Type): Attribute can
1081 be applied to a generic type if pragma Remote_Access_Type
1082 applies, in which case the type of the attribute is
1083 System.Partition_Interface.RACW_Stub_Type.
1085 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
1087 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Do not set
1088 an alignment on fields of the RETURN type built for the CICO mechanism.
1090 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
1092 * gcc-interface/trans.c (gnat_to_gnu): Avoid making a SAVE_EXPR for
1093 a call to a function that returns an unconstrained type with default
1094 discriminant. Similarly, avoid doing the conversion to the nominal
1095 result type in this case.
1097 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
1099 * gcc-interface/ada-tree.h (DECL_ALIASED_P): New flag.
1100 * gcc-interface/decl.c (is_variable_size): Rename to...
1101 (type_has_variable_size): ...this.
1102 (adjust_packed): Adjust to above renaming.
1103 (gnat_to_gnu_field): Set DECL_ALIASED_P on the field.
1104 (field_is_artificial): New predicate.
1105 (field_is_aliased): Likewise.
1106 (field_has_self_size): Likewise.
1107 (field_has_variable_size): Likewise.
1108 (components_to_record): Record information for the final layout during
1109 the first pass on fields.
1110 If there is an aliased field placed after a field whose length depends
1111 on discriminants, put all the fields of the latter sort, last.
1113 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
1115 * gcc-interface/gigi.h (get_minimal_subprog_decl): Declare.
1116 * gcc-interface/decl.c (get_minimal_subprog_decl): New function.
1117 * gcc-interface/trans.c (Attribute_to_gnu): Use it for the prefix of an
1118 Access-like attribute in a dispatch table if the subprogram is public.
1120 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
1122 * gcc-interface/gigi.h (create_label_decl): Adjust.
1123 * gcc-interface/utils.c (create_label_decl): Add GNAT_NODE parameter
1124 and invoke gnat_pushdecl on it. Remove obsolete settings.
1125 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Label>: Adjust call to
1127 * gcc-interface/trans.c (gnat_to_gnu) <N_Null): Likewise. Ignore the
1128 label for debugging purposes.
1130 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
1132 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: For an aliased
1133 object with an unconstrained nominal subtype and if optimization isn't
1134 enabled, create a special VAR_DECL for debugging purposes.
1136 2012-01-23 Robert Dewar <dewar@adacore.com>
1138 * sem_prag.ads, sem_prag.adb: Minor reformatting.
1140 2012-01-23 Robert Dewar <dewar@adacore.com>
1142 * sem_ch13.adb (Analyze_Aspect_Specifications): Check for
1143 language defined aspect applied to renaming or formal type
1144 declaration (not permitted)
1146 2012-01-23 Matthew Heaney <heaney@adacore.com>
1148 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Vet): Replaced
1149 comment with pragma Assert.
1151 2012-01-23 Vincent Pucci <pucci@adacore.com>
1153 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Call
1154 to Make_Aspect_For_PPC_In_Gen_Sub_Decl added in ASIS mode.
1155 * sem_prag.adb, sem_prag.ads (Make_Aspect_For_PPC_In_Gen_Sub_Decl): New
1156 routine. In ASIS mode, convert any PPC pragmas into aspects in generic
1157 subprogram declaration in order to enable the analysis of PPC boolean
1160 2012-01-23 Robert Dewar <dewar@adacore.com>
1162 * sem_ch3.adb (Analyze_Object_Declaration): Properly
1163 handle Current_Value for volatile variables (also propagate
1164 Treat_As_Volatile from type to object).
1166 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
1168 * sem_ch12.adb (Install_Body): Detect the case
1169 where the enclosing context is a package with a stub body that
1170 has already been replaced by the actual body. In such cases,
1171 the freeze node for the enclosing context must be inserted after
1174 2012-01-23 Ed Schonberg <schonberg@adacore.com>
1176 * sem_prag.adb (Analyze_Pragma, case Debug): Freeze the called
1177 subprogram before expanding the pragma into an if-statement with
1178 a block, to ensure that when the subprogram is null its body is
1179 properly generated before expansion.
1181 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
1183 * sem_ch12.adb (Analyze_Associations): Alphabetize local variables and
1184 constants. Rename Actual_Types to Actuals_To_Freeze. Rename Next_Formal
1186 Freeze all eligible subprograms which appear as actuals in
1188 (Has_Fully_Defined_Profile): New routine.
1189 (Renames_Standard_Subprogram): New routine.
1190 (Earlier): Add local variable N. Comment update. Do not use source
1191 locations when trying to determine whether one node precedes another.
1193 2012-01-23 Gary Dismukes <dismukes@adacore.com>
1195 * exp_ch4.adb (Expand_Concatenate): In the case
1196 where the result of a concatentation can be null, set the to
1197 result have both the low and high bounds of the right operand (not
1198 just the high bound, as was the case prior to this fix). Also,
1199 fix the saved high bound setting (Last_Opnd_High_Bound) in the
1200 empty string literal case (should have been low bound minus one,
1201 rather than plus one).
1203 2012-01-23 Thomas Quinot <quinot@adacore.com>
1205 * scos.ads, put_scos.adb, get_scos.adb (Get_SCOs, Put_SCOs): Do not
1206 omit statement SCOs for disabled pragmas.
1208 2012-01-23 Matthew Heaney <heaney@adacore.com>
1210 * a-cohase.ads, a-cihase.ads, a-cbhase.ads, a-coorse.ads,
1211 a-ciorse.ads, a-cborse.ads, a-cohama.ads, a-cihama.ads, a-cbhama.ads,
1212 a-coorma.ads, a-ciorma.ads, a-cborma.ads, a-cdlili.ads, a-cidlli.ads,
1213 a-cbdlli.ads, a-convec.ads, a-coinve.ads, a-cobove.ads (Cursor'Read,
1214 Cursor'Write): Declare in private part.
1215 (Reference_Type'Read, Reference_Type'Write): Ditto.
1216 (Constant_Reference_Type'Read, Constant_Reference_Type'Write): Ditto.
1218 2012-01-23 Robert Dewar <dewar@adacore.com>
1220 * a-catizo.ads, a-calend.adb, a-calend.ads, par-ch13.adb: Minor
1223 2012-01-23 Ed Schonberg <schonberg@adacore.com>
1225 * sem_ch6.adb (Analyze_Subprogram_Declaration): Do not set the
1226 Corresponding_Body on a defaulted null formal subprogram.
1227 * sem_ch12.adb (Check_Formal_Package_Instance): No check needed
1228 on a defaulted formal subprogram that is a null procedure.
1230 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
1232 * exp_ch9.adb: Update the comments involving pragma Implemented.
1233 * sem_ch3.adb (Check_Pragma_Implemented (Entity_Id)): Add local
1234 constant Subp_Alias and local variable Impl_Subp. Properly
1235 handle aliases of synchronized wrappers. Code cleanup.
1236 (Check_Pragma_Implemented (Entity_Id; Entity_Id)): Add
1237 Name_Optional as part of the condition.
1238 * sem_prag.adb (Analyze_Pragma): Add "Optional" as one of the
1239 valid choices of implementation kind.
1240 (Check_Arg_Is_One_Of): New routine.
1241 * snames.ads-tmlp: Add Name_Optional.
1243 2012-01-23 Ed Schonberg <schonberg@adacore.com>
1245 * par-ch13.adb: Better error recovery in illegal aspect
1248 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
1250 * a-calend.adb: Add with clause for Interfaces.C. Add constant
1252 (Day_Of_Week): Call the internal UTC_Time_Offset.
1253 (Split): Call the internal UTC_Time_Offset.
1254 (Time_Of): Call the internal UTC_Time_Offset.
1255 (Time_Zone_Operations.UTC_Time_Offset): Call internal UTC_Time_Offset.
1256 (UTC_Time_Offset): New library-level routine.
1257 * a-calend.ads (UTC_Time_Offset): Remove parameter
1258 Is_Historic. Update related comment on usage.
1259 * a-catizo.adb (UTC_Time_Offset): Removed.
1260 (UTC_Time_Offset (Time)): Call Time_Zone_Operations.UTC_Time_Offset.
1261 * a-caltizo.ads (UTC_Time_Offset): Removed.
1262 (UTC_Time_Offset (Time)): Add back the default expression of parameter
1265 2012-01-23 Robert Dewar <dewar@adacore.com>
1267 * sprint.ads, sprint.adb (Sprint_Node_List): Add New_Lines parameter
1268 (pg,po,ps): Make sure each entry starts on new line.
1270 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
1272 * a-calend.ads, a-calend.adb: Define types int and int_Pointer. Update
1273 the parameter profile of procedure localtime_tzoff and its associated
1275 (Day_Of_Week): Do not treat the input date as historical
1276 with respect to time zones.
1277 (Split): Do not treat the input
1278 date as historical with respect to time zones. (Time_Of): Do
1279 not treat the input constituents as forming a historical date
1280 with respect to time zones.
1281 (UTC_Time_Offset): Add new formal
1282 parameter Is_Historic. Add local variable Flag. Update the call
1284 * a-catizo.ads, a-catizo.adb (UTC_Time_Offset): New routine.
1285 (UTC_Time_Offset (Time)): Update the call to
1286 Time_Zone_Operations.UTC_Time_Offset.
1287 * sysdep.c (__gnat_localtime_tzoff): Update parameter
1288 profile. Split the processing of offsets on Windows into two - one
1289 part of historic time stamps and the other for the current time.
1291 2012-01-23 Robert Dewar <dewar@adacore.com>
1293 * a-calend.adb: Minor reformatting.
1295 2012-01-23 Ed Schonberg <schonberg@adacore.com>
1297 * exp_ch9.adb, sem_ch9.adb: Handle array of access to synchronized
1298 interface in requeue statement.
1300 2012-01-23 Cyrille Comar <comar@adacore.com>
1302 * projects.texi: Remove references to main units and replace
1303 with references to main programs to be coherent with the
1306 2012-01-23 Robert Dewar <dewar@adacore.com>
1308 * s-utf_32.adb: Minor reformatting.
1310 2012-01-23 Vincent Celier <celier@adacore.com>
1312 * snames.ads-tmpl: Minor comment addition Indicate that
1313 Name_Library_Encapsulated_Options is only used in gprbuild.
1315 2012-01-23 Robert Dewar <dewar@adacore.com>
1317 * sem_ch10.adb (Analyze_Subunit): Properly save/restore cunit
1320 2012-01-23 Ed Schonberg <schonberg@adacore.com>
1322 * snames.ads-tmpl: Add Name_Synchronization.
1323 * aspects.ads, aspects.adb: Add Aspect_Synchronization to
1324 enumeration type and related maps.
1325 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle Aspect
1326 Synchronization, build corresponding pragma Implemented.
1327 * sem_util.adb (Implementation_Kind): Handle both explicit and
1328 implicit pragma_argument association to retrieve the given
1329 synchronization mode.
1331 2012-01-23 Robert Dewar <dewar@adacore.com>
1333 * sem_ch10.adb, errout.adb: Minor reformatting.
1335 2012-01-23 Ed Schonberg <schonberg@adacore.com>
1337 * sem_res.adb (Resolve_Actuals): An actual in a call to an
1338 Ada 2012 Reference function does not lead to a dangerous order
1341 2012-01-23 Gary Dismukes <dismukes@adacore.com>
1343 * exp_util.adb (Is_Iterated_Container): Test
1344 Is_Entity_Name when searching for calls to the default iterator,
1345 to avoid blowing up on indirect calls which have an explicit
1346 dereference as the call name.
1348 2012-01-23 Thomas Quinot <quinot@adacore.com>
1350 * errout.adb (Set_Msg_Node): For an N_Expanded_Name, output
1351 the complete expanded name, rather than just its Selector_Name.
1353 2012-01-23 Thomas Quinot <quinot@adacore.com>
1355 * a-textio.adb (Put): Rewrite one-parameter Character version to
1356 just call the two-parameter one with Current_Out.
1358 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
1360 * freeze.adb (Check_Current_Instance): Issue an
1361 error when the prefix of 'Unchecked_Access or 'Access does not
1362 denote a legal aliased view of a type.
1363 (Freeze_Record_Type): Do not halt the processing of record components
1364 once the Has_Controlled_Component is set as this bypasses the remaining
1366 (Is_Aliased_View_Of_Type): New routine.
1368 2012-01-23 Thomas Quinot <quinot@adacore.com>
1370 * errout.ads, freeze.adb: Minor reformatting.
1372 2012-01-23 Thomas Quinot <quinot@adacore.com>
1374 * sem_ch10.adb, sem_prag.adb: Remove redundant apostrophes in error
1377 2012-01-23 Olivier Hainque <hainque@adacore.com>
1379 * adadecode.c (__gnat_decode): Deal with empty input early,
1380 preventing potential erroneous memory access later on.
1382 2012-01-21 Eric Botcazou <ebotcazou@adacore.com>
1385 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: In the case of a
1386 renaming, preserve the volatileness through the indirection, if any.
1388 2012-01-14 Andreas Schwab <schwab@linux-m68k.org>
1390 * gcc-interface/Makefile.in (OSCONS_EXTRACT): Add
1393 2012-01-10 Pascal Obry <obry@adacore.com>
1395 * prj-nmsc.adb (Check_Library_Attributes):
1396 Kill check for object/source directories for aggregate libraries.
1398 2012-01-10 Matthew Heaney <heaney@adacore.com>
1400 * a-cdlili.adb, a-cdlili.ads, a-cihama.adb, a-cihama.ads, a-coinve.adb,
1401 a-coinve.ads, a-ciorse.adb, a-ciorse.ads, a-coorma.adb, a-coorma.ads,
1402 a-cborma.adb, a-cborma.ads, a-cidlli.adb, a-cidlli.ads, a-cimutr.adb,
1403 a-cimutr.ads, a-cihase.adb, a-cihase.ads, a-cohama.adb, a-cohama.ads,
1404 a-coorse.adb, a-coorse.ads, a-cbhama.adb, a-cbhama.ads, a-cborse.adb,
1405 a-cborse.ads, a-comutr.adb, a-comutr.ads, a-ciorma.adb, a-cobove.adb,
1406 a-ciorma.ads, a-cobove.ads, a-convec.adb, a-convec.ads, a-cohase.adb,
1407 a-cohase.ads, a-cbdlli.adb, a-cbdlli.ads, a-cbmutr.adb, a-cbmutr.ads,
1408 a-cbhase.adb, a-cbhase.ads (Reference, Constant_Reference): Declare
1409 container parameter as aliased in/in out.
1412 2012-01-10 Bob Duff <duff@adacore.com>
1414 * s-os_lib.ads: Improve comment.
1416 2012-01-10 Geert Bosch <bosch@adacore.com>
1418 * s-gearop.adb (Forward_Eliminate): Avoid improper aliasing
1421 2012-01-10 Bob Duff <duff@adacore.com>
1423 * sem_intr.adb (Check_Shift): Use RM_Size instead of Esize, when
1424 checking that the 'Size is correct. If the type is "mod 2**12",
1425 for example, it's illegal, but Esize is the 'Object_Size, which
1426 will be something like 16 or 32, so the error ('Size = 12) was
1428 * gnat_rm.texi: Improve documentation of shift
1429 and rotate intrinsics.
1431 2012-01-10 Pascal Obry <obry@adacore.com>
1433 * prj.adb (For_Every_Project_Imported): Fix
1434 implementation to make sure we return each project only once
1435 for aggragte libraries. It is fine to return a project twice for
1436 aggregate projects, this was the case as a Project_Id is different
1437 in each project tree. The new implementation use a table based on
1438 the project name to ensure proper detection of duplicate project
1439 in aggregate library. A new context is then created to continue
1440 retrurning duplicate project for aggregate libraries.
1442 2012-01-09 Eric Botcazou <ebotcazou@adacore.com>
1444 * gcc-interface/trans.c (call_to_gnu): Create the temporary for the
1445 return value in the variable-sized return type case if the target is
1446 an array with fixed size. However, do not create it if this is the
1447 expression of an object declaration.
1449 2012-01-09 Eric Botcazou <ebotcazou@adacore.com>
1451 * gcc-interface/trans.c (addressable_p) <COMPONENT_REF>: Fix thinko.
1453 2012-01-06 Robert Dewar <dewar@adacore.com>
1455 * a-wichha.ads, a-wichun.ads, a-zchhan.ads, a-zchuni.ads,
1456 s-utf_32.ads: Add pragma Pure
1457 * s-utf_32.adb: Suppress warnings on non-static constants (now
1460 2012-01-06 Bob Duff <duff@adacore.com>
1462 * s-rpc.ads (Read, Write): Add overriding indicators.
1464 2012-01-06 Robert Dewar <dewar@adacore.com>
1466 * gnat_rm.texi: Add documentation for conventions
1467 Ada_Pass_By_Copy and Ada_Pass_By_Reference.
1469 2012-01-06 Gary Dismukes <dismukes@adacore.com>
1471 * a-tienio.adb (Put): Add exception message on
1472 raise statements. Remove unneeded blocks and object declarations.
1474 2012-01-06 Robert Dewar <dewar@adacore.com>
1476 * sem_prag.adb: Minor reformatting.
1478 2012-01-06 Ed Schonberg <schonberg@adacore.com>
1480 * sinfo.ads, sinfo.adb (Has_Prefixed_Call): New flag to indicate
1481 that a selected component within a generic unit has been resolved
1482 as a prefixed call with local references.
1483 * sem_ch3.adb (Is_Visible_Component): In an instance body a selected
1484 component is always visible.
1485 * sem_ch4.adb (Analyze_Selected_Component): If the node is a
1486 prefixed call in an instance, do not look for visible components
1488 * sem_ch12.adb (Reset_Entity): If a selected component has resolved
1489 to a prefixed call, mark the node accordingly when prefix and
1490 selector are local references.
1492 2012-01-02 Eric Botcazou <ebotcazou@adacore.com>
1494 * gnatvsn.ads (Current_Year): Bump to 2012.
1496 Copyright (C) 2012 Free Software Foundation, Inc.
1498 Copying and distribution of this file, with or without modification,
1499 are permitted in any medium without royalty provided the copyright
1500 notice and this notice are preserved.