1 2012-05-15 Tristan Gingold <gingold@adacore.com>
3 * exp_ch7.adb (Build_Exception_Handler): Save current
4 occurrence only if -gnateE.
5 (Build_Object_Declaration): Declare E_Id only if -gnateE.
6 (Build_Raise_Statement): Call Raise_From_Controlled_Operation only if
7 -gnateE (else raise PE).
8 * s-soflin.adb (Save_Library_Occurrence): Handle null occurrence
10 * a-except-2005.adb (Reraise_Library_Exception_If_Any): Call
11 Raise_From_Controlled_Operation only if the saved occurrence is
12 not null, otherwise raise PE.
14 2012-05-15 Yannick Moy <moy@adacore.com>
16 * exp_alfa.ads: Add comments describing the Alfa mode.
18 2012-05-15 Tristan Gingold <gingold@adacore.com>
20 * s-soflin.ads, s-soflin.adb (Save_Library_Occurrence): Parameter
21 E is now of type Exception_Occurrence_Access.
22 * exp_ch7.ads, exp_ch7.adb (Build_Exception_Handler): Adjust generated
23 call to Save_Library_Occurrence.
25 2012-05-15 Thomas Quinot <quinot@adacore.com>
27 * exp_ch4.adb (Rewrite_Coextension): Use Insert_Action to
28 insert temporary variable decl at the proper place in the tree.
30 2012-05-15 Hristian Kirtchev <kirtchev@adacore.com>
32 * g-calend.adb (Split_At_Locale): New routine.
33 (Time_Of_At_Locale): New routine.
34 * g-calend.ads (Split_At_Locale): New routine.
35 (Time_Of_At_Locale): New routine.
37 2012-05-15 Gary Dismukes <dismukes@adacore.com>
39 * a-except.ads: Minor reformatting.
41 2012-05-15 Ed Schonberg <schonberg@adacore.com>
43 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the loop
44 parameter specification is part of a quantified expression, and it
45 already carries a type, do not repeat the analysis to preserve
46 type information: a range attribute reference may have been
47 rewritten as a range with static bounds, and its re-analysis may
48 type it as Integer by default, instead of the original index type.
50 2012-05-15 Robert Dewar <dewar@adacore.com>
52 * s-osprim-mingw.adb: Minor reformatting.
54 2012-05-15 Arnaud Charlet <charlet@adacore.com>
56 * a-except.adb, a-except.ads (Reraise_Library_Exception_If_Any): New.
57 Mark this unit preelaborate.
58 * s-soflin.ads: Make package Preelaborate.
60 2012-05-15 Robert Dewar <dewar@adacore.com>
62 * s-osprim-mingw.adb, sem_eval.adb, a-calend-vms.ads: Minor reformatting
64 2012-05-15 Ed Schonberg <schonberg@adacore.com>
66 * sem_eval.adb (Subtypes_Statically_Match): In Ada 2012, static
67 matching requires matching of static subtype predicates as well.
69 2012-05-15 Ed Schonberg <schonberg@adacore.com>
71 * sem_case.adb (Analyze_Choices): If the subtype of the
72 expression has a non-static predicate, the case alternatives
73 must cover the base type.
75 2012-05-15 Tristan Gingold <gingold@adacore.com>
77 * a-calend-vms.ads: Add pragma export to Split and Time_Of.
78 Merge comments from a-calend.ads to minimize differences.
80 2012-05-15 Sergey Rybin <rybin@adacore.com frybin>
82 * gnat_ugn.texi: gnatmetric: add a small example that demonstrates
83 the difference between control coupling and unit coupling.
85 2012-05-15 Tristan Gingold <gingold@adacore.com>
87 * bindgen.adb (Gen_Header): Remove code to emit LE_Set.
88 (Gen_Finalize_Library): Replace test with
89 a call to __gnat_reraise_library_exception_if_any.
90 * s-soflin.ads (Library_Exception): Do not export.
91 (Library_Exception_Set): Likewise.
92 * a-except-2005.ads, a-except-2005.adb
93 (Reraise_Library_Exception_If_Any): New procedure.
95 2012-05-15 Geert Bosch <bosch@adacore.com>
97 * sem_ch9.adb (Allows_Lock_Free_Implementation): out or in out
98 parameters can be access types as well, not just scalar types,
99 so relax the test to Is_Elementary_Type.
101 2012-05-15 Bob Duff <duff@adacore.com>
103 * s-atacco.ads s-atacco.adb: Replace pragma Elaborate_Body
105 (Xyz): Remove Xyz, which is apparently unnecessary.
107 2012-05-15 Tristan Gingold <gingold@adacore.com>
109 * a-calend-vms.adb: Complete previous change.
111 2012-05-15 Bob Duff <duff@adacore.com>
113 * s-win32.ads: Minor comment fix.
114 * s-osprim-mingw.adb: Minor editing.
116 2012-05-15 Robert Dewar <dewar@adacore.com>
118 * exp_ch9.adb, sem_ch9.adb, sem_ch13.adb: Minor reformatting.
120 2012-05-15 Robert Dewar <dewar@adacore.com>
122 * g-comlin.adb, g-comlin.ads: Minor reformatting.
124 2012-05-15 Vincent Pucci <pucci@adacore.com>
126 * aspects.adb, aspects.adb: Reordering of the Aspect_Idi list. New
127 aspect Aspect_Lock_Free.
128 * einfo.adb, einfo.ads: New flag Uses_Lock_Free (flag 188).
129 (Set_Uses_Lock_Free): New routine.
130 (Uses_Lock_Free): New routine.
131 * exp_ch7.adb (Is_Simple_Protected_Type): Return False for
132 lock-free implementation.
133 * exp_ch9.adb (Allows_Lock_Free_Implementation): Moved to Sem_Ch9.
134 (Build_Lock_Free_Unprotected_Subprogram_Body): Protected
135 procedure uses __sync_synchronise. Check both Object_Size
137 (Expand_N_Protected_Body): Lock_Free_Active
138 renames Lock_Free_On.
139 (Expand_N_Protected_Type_Declaration):
140 _Object field removed for lock-free implementation.
141 (Install_Private_Data_Declarations): Protection object removed
142 for lock-free implementation.
143 (Make_Initialize_Protection):
144 Protection object initialization removed for lock-free implementation.
145 * rtsfind.ads: RE_Atomic_Synchronize and RE_Relaxed added.
146 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect_Lock_Free
148 * sem_ch9.adb (Allows_Lock_Free_Implementation): New routine.
149 (Analyze_Protected_Body): Allows_Lock_Free_Implementation call added.
150 (Analyze_Protected_Type_Declaration):
151 Allows_Lock_Free_Implementation call added.
152 (Analyze_Single_Protected_Declaration): Second analysis of
154 * s-atopri.ads: Header added.
155 (Atomic_Synchronize): New routine.
157 2012-05-15 Robert Dewar <dewar@adacore.com>
159 * exp_ch7.ads: Add comment.
161 2012-05-15 Hristian Kirtchev <kirtchev@adacore.com>
163 * a-calend.adb (Day_Of_Week): The routine once again treats
164 all dates as historic. (Formatting_Operations.Split): All
165 calls to UTC_Time_Offset are now controlled through formal
166 parameter Is_Historic. (Formatting_Operations.Time_Of):
167 All calls to UTC_Time_Offset are now handled through
168 formal parameter Is_Historic.
169 (Split): Update the call to Formatting_Operations.Split.
170 (Time_Of): Update the call to Formatting_Operations.Time_Of.
171 (To_Ada_Time): Update the call to Formatting_Operations.Time_Of.
172 (To_Strict_Tm): Update the call to Formatting_Operations.Split.
173 * a-calend.ads (Split): Add new formal Is_Historic along with
174 comment on usage. This routine is now exported for the purposes
175 of GNAT.Calendar.Locale.
176 (Time_Of): Remove defaults. Add new
177 formal Is_Historic along with comment on usage. This routine is
178 now exported for the purposes of GNAT.Calendar.Locale.
179 * a-calend-vms.adb (Split): Update the call to
180 Formatting_Operations.Split.
181 (Time_Of): Update the call to Formatting_Operations.Time_Of.
182 * a-calend-vms.ads (Split): Add new formal Is_Historic along
183 with comment on usage. (Time_Of): Remove defaults. Add new
184 formal Is_Historic along with comment on usage.
185 * a-calfor.adb (Split): Update the call to
186 Formatting_Operations.Split.
187 (Time_Of): Update the call to Formatting_Operations.Time_Of.
189 2012-05-15 Vincent Celier <celier@adacore.com>
191 * prj-nmsc.adb (Add_Source): Always add the source if it is
192 excluded, to avoid incorrect duplicate checks.
194 2012-05-15 Yannick Moy <moy@adacore.com>
196 * sem_aux.ads: Correct typo.
197 * sem_eval.adb (Compile_Time_Known_Value): Return False in Alfa
198 mode for a deferred constant when outside of the scope of its
201 2012-05-15 Emmanuel Briot <briot@adacore.com>
203 * g-comlin.adb, g-comlin.ads (Define_Switch): Allow specifying the name
204 of the argument, for the automatic help message.
205 (Getopt): do not systematically initialize switches with string values
206 to the empty string, when the user has already specified a default.
208 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
211 * gcc-interface/misc.c: Include opts.h and options.h before tm.h.
212 (gnat_handle_option): Call lang-specific generated function.
214 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
216 * gcc-interface/lang.opt (I): Comment out help text with no effect.
217 (nostdinc): Comment out help text with no effect.
219 2012-05-12 Eric Botcazou <ebotcazou@adacore.com>
221 * gcc-interface/Makefile.in (TOOLS_LIBS): Add ../../ggc-none.o.
223 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
226 * gcc-interface/misc.c (gnat_parse_file): Move before ...
227 (gnat_handle_option): ... this. Use handle_generated_option.
229 2012-05-10 Richard Guenther <rguenther@suse.de>
231 * gcc-interface/cuintp.c (UI_From_gnu): Remove TYPE_IS_SIZETYPE use.
233 2012-05-06 Tristan Gingold <gingold@adacore.com>
235 * gcc-interface/trans.c (gigi): Decorate reraise_zcx_decl.
237 2012-05-06 Eric Botcazou <ebotcazou@adacore.com>
239 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: In the renaming
240 case, use the padded type if the renamed object has an unconstrained
241 type with default discriminant.
243 2012-05-06 Eric Botcazou <ebotcazou@adacore.com>
245 * gcc-interface/trans.c (Loop_Statement_to_gnu): Also handle invariant
246 conditions with only one bound.
247 (Raise_Error_to_gnu): Likewise. New function extracted from...
248 (gnat_to_gnu) <N_Raise_Constraint_Error>: ...here. Call above function
249 in regular mode only.
251 2012-05-06 Eric Botcazou <ebotcazou@adacore.com>
253 * gcc-interface/misc.c (gnat_post_options): Disable caret by default.
255 2012-05-06 Eric Botcazou <ebotcazou@adacore.com>
257 * gcc-interface/gigi.h (make_packable_type): Declare.
258 (make_type_from_size): Likewise.
259 (relate_alias_sets): Likewise.
260 (maybe_pad_type): Adjust.
261 (init_gnat_to_gnu): Delete.
262 (destroy_gnat_to_gnu): Likewise.
263 (init_dummy_type): Likewise.
264 (destroy_dummy_type): Likewise.
265 (init_gnat_utils): Declare.
266 (destroy_gnat_utils): Likewise.
267 (ceil_pow2): New inline function.
268 * gcc-interface/decl.c (gnat_to_gnu_entity): Use ceil_pow2.
269 <object>: Pass True for the final processing of alignment and size.
270 <E_Subprogram_Type>: Only create the TYPE_DECL for a padded return
272 (round_up_to_align): Delete.
273 (ceil_alignment): Likewise.
274 (relate_alias_sets): Move to...
275 (make_aligning_type): Likewise.
276 (make_packable_type): Likewise.
277 (maybe_pad_type): Likewise.
278 (make_type_from_size): Likewise.
279 * gcc-interface/utils.c (MAX_BITS_PER_WORD): Delete.
280 (struct pad_type_hash): New type.
281 (pad_type_hash_table): New static variable.
282 (init_gnat_to_gnu): Merge into...
283 (init_dummy_type): Likewise.
284 (init_gnat_utils): ...this. New function.
285 (destroy_gnat_to_gnu): Merge into...
286 (destroy_dummy_type): Likewise.
287 (destroy_gnat_utils): ...this. New function.
288 (pad_type_hash_marked_p): New function.
289 (pad_type_hash_hash): Likewise.
290 (pad_type_hash_eq): Likewise.
291 (relate_alias_sets): ...here.
292 (make_aligning_type): Likewise.
293 (make_packable_type): Likewise.
294 (maybe_pad_type): Likewise. Change same_rm_size parameter into
295 set_rm_size; do not set TYPE_ADA_SIZE if it is false. Do not set
296 null as Ada size. Do not set TYPE_VOLATILE on the padded type. If it
297 is complete and has constant size, canonicalize it. Bail out earlier
298 if a warning need not be issued.
299 (make_type_from_size): Likewise.
300 <INTEGER_TYPE>: Bail out if size is too large
301 (gnat_types_compatible_p): Do not deal with padded types.
302 (convert): Compare main variants for padded types.
303 * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_utils.
304 (gnat_to_gnu): Do not convert at the end for a call to a function that
305 returns an unconstrained type with default discriminant.
306 (Attribute_to_gnu) <Attr_Size>: Simplify handling of padded objects.
307 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Likewise.
308 Do not use the padded type if it is BLKmode and the inner type is
311 2012-05-02 Pascal Obry <obry@adacore.com>
314 2012-02-24 Dave Korn <dave.korn.cygwin@gmail.com>
316 * gcc-interface/Makefile.in (WIN_SO_PREFIX [windows targets]): New
317 Windows-specific make variable.
318 (WIN_SO_INSTALL_DIR [windows targets]): Likewise.
319 (install-gnatlib): Respect the above during installation when set,
320 and also install any windows import library that has been built.
321 (gnatlib-shared-win32): Use WIN_SO_PREFIX to name output DLL and also
322 build a corresponding import library.
324 2012-04-30 Jan Hubicka <jh@suse.cz>
326 * gcc-interface/utils.c (rest_of_subprog_body_compilation): Update
328 (gnat_write_global_declarations): Use finalize_compilation_unit.
330 2012-04-30 Eric Botcazou <ebotcazou@adacore.com>
332 * gcc-interface/decl.c (gnat_to_gnu_entity): In type annotation mode,
333 do not adjust the size of a tagged type if there is a representation
334 clause on it. Otherwise, round the adjustment up to the alignment
335 of the first field and use the appropriate helper routine.
336 (maybe_pad_type): Do not warn in type annotation mode on a tagged type.
337 (gnat_to_gnu_field): Do not error out under the same circumstances.
338 (annotate_rep): In type annotation mode, do not adjust the offset of
339 components of a tagged type with representation clause. Otherwise,
340 round the adjustment up to the alignment of the first field.
342 2012-04-30 Eric Botcazou <ebotcazou@adacore.com>
344 * gcc-interface/utils.c (finish_record_type): Force the traditional GCC
345 layout for bitfields on the type if it is packed or has a representation
346 clause and an alternate layout is available.
348 2012-04-30 Eric Botcazou <ebotcazou@adacore.com>
350 * gcc-interface/gigi.h (mark_out_of_scope): Delete.
351 (destroy_gnat_to_gnu): Declare.
352 (destroy_dummy_type): Likewise.
353 * gcc-interface/decl.c (mark_out_of_scope): Delete.
354 * gcc-interface/utils.c (destroy_gnat_to_gnu): New function.
355 (destroy_dummy_type): Likewise.
356 * gcc-interface/trans.c (gnat_validate_uc_list): New variable.
357 (gigi): Call validate_unchecked_conversion on gnat_validate_uc_list
358 after the translation is completed. Call destroy_gnat_to_gnu and
359 destroy_dummy_type at the end.
360 (Subprogram_Body_to_gnu): Do not call mark_out_of_scope.
361 (gnat_to_gnu) <N_Block_Statement>: Likewise.
362 <N_Validate_Unchecked_Conversion>: Do not process the node, only push
363 it onto gnat_validate_uc_list.
364 (validate_unchecked_conversion): New function.
366 2012-04-26 Tristan Gingold <gingold@adacore.com>
368 * gcc-interface/Make-lang.in: Update dependencies.
369 Remove s-traceb and tracebak objects from gnat1 and gnatbind (not used).
370 Remove s-tasdeb and s-vaflop rules (not used).
372 2012-04-26 Olivier Hainque <hainque@adacore.com>
374 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Default to
375 DOUBLE_TYPE_SIZE instead of LONG_DOUBLE_TYPE_SIZE.
377 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
379 * a-calend.adb (Day_Of_Week): Keep the internal
380 usage of UTC_Time_Offset consistent with Time_Of and Split.
382 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
384 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Do not freeze
385 the loop variable while preanalyzing a quantified expression.
387 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
389 * a-calend.adb (Split, Time_Of): Rename parameter Is_Ada_05
390 to Use_TZ to better illustrate its function. Update all
391 references to the parameter.
392 (To_Ada_Time): Update the call to Formatting_Operations.Time_Of.
393 * a-calend.ads (Split, Time_Of): Rename parameter Is_Ada_05
394 to Use_TZ to better illustrate its function. Update the related
396 * a-calend-vms.adb (Split, Time_Of): Rename parameter
397 Is_Ada_05 to Use_TZ to better illustrate its function. Update
398 all references to the parameter.
399 (To_Ada_Time): Update the call to Formatting_Operations.Time_Of.
400 * a-calend-vms.ads (Split, Time_Of): Rename parameter Is_Ada_05
401 to Use_TZ to better illustrate its function. Update the related
403 * a-calfor.adb (Split, Time_Of): Update the call to
404 Formatting_Operations.Time_Of.
405 * sysdep.c (__gnat_localtime_tzoff): Dereference pointer
406 "is_historic" and rewrite the check as a comparison. Add a
407 comment on flag values.
409 2012-04-26 Robert Dewar <dewar@adacore.com>
411 * exp_ch2.adb, sem_ch8.adb: Minor reformatting.
413 2012-04-26 Vasiliy Fofanov <fofanov@adacore.com>
415 * a-stzunb-shared.adb, gnat_ugn.texi, a-strunb-shared.adb,
416 a-strunb-shared.ads, uintp.adb, a-stwiun-shared.adb,
417 a-stwiun-shared.ads, a-cbhama.ads, vms_data.ads, a-cobove.adb,
418 a-convec.adb, sem_ch13.adb, a-cbhase.ads: Fix common misuses of the
419 word "then" where "than" should be used in English.
421 2012-04-26 Robert Dewar <dewar@adacore.com>
423 * sem_ch5.adb (Check_Unreachable_Code): Skip past pragmas.
425 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
427 * s-finroo.ads: Remove with clause for
428 Ada.Streams. Type Root_Controlled is now abstract tagged null
429 record. Remove internal package Stream_Attributes. Root_Controlled
430 doesn't need stream attribute redeclaration and avoids the
431 dependency on streams.
433 2012-04-26 Tristan Gingold <gingold@adacore.com>
435 * adaint.c (to_host_path_spec): Removed (unused).
438 2012-04-26 Steve Baird <baird@adacore.com>
440 * gnat_rm.texi Improve description of Valid_Scalars attribute.
442 2012-04-26 Ed Schonberg <schonberg@adacore.com>
444 * sem_ch6.adb (Can_Override_Operator): If the formal is a
445 generic type the operator cannot be overriding.
447 2012-04-26 Ed Schonberg <schonberg@adacore.com>
449 * sem_ch8.adb (Spec_Reloaded_For_Body): Check whether the type
450 is declared in a package specification, and current unit is the
451 corresponding package body. The use clauses themselves may be
452 within a nested package.
454 2012-04-26 Bob Duff <duff@adacore.com>
456 * exp_ch2.adb (Param_Entity): Take into account the case where
457 the type of the entry parameter has a representation clause.
459 2012-04-26 Ed Schonberg <schonberg@adacore.com>
461 * gnat_ugn.texi: Tweak dimensionality doc.
463 2012-04-26 Robert Dewar <dewar@adacore.com>
465 * sem_eval.adb: Minor reformatting.
467 2012-04-26 Robert Dewar <dewar@adacore.com>
469 * einfo.adb, einfo.ads, sem_res.adb, sem_ch4.adb,
470 sem_eval.adb: Minor reformatting.
472 2012-04-26 Thomas Quinot <quinot@adacore.com>
474 * freeze.adb: Minor change in error wording.
476 2012-04-26 Ed Schonberg <schonberg@adacore.com>
478 * gnat_ugn.texi: Documentation on dimensional analysis.
480 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
482 * einfo.adb, einfo.ads: Remove synthesized attribute
483 Proper_First_Index along with its associations in various nodes.
484 (Proper_First_Index): Removed.
485 * sem_ch4.adb (Analyze_Slice): Alphabetize constants. Add new
486 local variable Index_Type. The index type of a string literal
487 subtype is that of the stored low bound.
488 * sem_eval (Get_Static_Length): Remove the use of Proper_First_Index.
489 * sem_res.adb (Resolve_Slice): Alphabetize constants. Add
490 new local variable Index_Type. The index type of a
491 string literal subtype is that of the stored low bound.
492 (Set_String_Literal_Subtype): Code reformatting.
494 2012-04-26 Robert Dewar <dewar@adacore.com>
496 * exp_aggr.adb: Minor reformatting.
498 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
500 * exp_ch7.adb (Expand_Cleanup_Actions): Update the call to
501 Requires_Cleanup_Actions.
502 * exp_util.adb (Requires_Cleanup_Actions (List_Id; Boolean;
503 Boolean)): Rename formal parameter For_Package to Lib_Level to
504 better reflect its purpose. Update the related comment and all
505 occurrences of For_Package in the body.
506 (Requires_Cleanup_Actions
507 (Node_Id; Boolean)): Add new formal parameter Lib_Level. Add
508 local constant At_Lib_Level to keep monitor whether the path
509 taken from the top-most context to the current construct involves
510 package constructs. Update all calls to Requires_Cleanup_Actions.
511 * exp_util.ads (Requires_Cleanup_Actions): Add new formal
512 parameter Lib_Level and associated comment.
514 2012-04-26 Ed Schonberg <schonberg@adacore.com>
516 * sem_ch6.adb (Process_Formals): If the type of the formal is
517 a non null access type, mark the generated subtype as having a
518 delayed freeze only if the designated type is not frozen yet.
520 2012-04-26 Vincent Celier <celier@adacore.com>
522 * prj-attr.adb: New package Clean with attributes
523 Object_Artifact_Extensions and Source_Artifact_Extensions.
524 * prj-nmsc.adb (Process_Clean): Process new package Clean
525 * prj.ads (Language_Config): New components
526 Clean_Object_Artifacts and Clean_Source_Artifacts.
527 * snames.ads-tmpl: New standard names Clean,
528 Object_Artifact_Extensions and Source_Artifact_Extensions.
530 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
532 * einfo.adb (Proper_First_Index): Moved from Sem_Util.
533 * einfo.ads: Add new synthesized attribute Proper_First_Index
534 along with usage in nodes.
535 (Proper_First_Index): Moved from Sem_Util.
536 * sem_util.ads, sem_util.adb (Proper_First_Index): Moved to Einfo.
538 2012-04-26 Gary Dismukes <dismukes@adacore.com>
540 * layout.adb (Layout_Component_List): Test for the case of a
541 single variant and the size of its component list was computed
542 as an integer literal, and use that size (which is in bits)
543 as is rather than converting to storage units.
545 2012-04-26 Robert Dewar <dewar@adacore.com>
547 * exp_aggr.adb: Minor reformatting.
549 2012-04-26 Robert Dewar <dewar@adacore.com>
551 * sem_util.adb: Minor reformatting.
553 2012-04-26 Thomas Quinot <quinot@adacore.com>
555 * exp_aggr.adb, exp_pakd.adb (Setup_Inline_Packed_Array_Reference,
556 Packed_Array_Aggregate_Handled.Get_Component_Val):
557 Reverse bit numbering within PAT when Reverse_Storage_Order
558 applies to the enclosing record.
560 2012-04-26 Thomas Quinot <quinot@adacore.com>
562 * freeze.adb (Freeze_Record_Type): Improve error message for
563 Scalar_Storage_Order inconsistent with Bit_Order.
565 2012-04-25 Gary Dismukes <dismukes@adacore.com>
567 * exp_ch9.adb: Add comments on the usage of the
568 lock-free data structures.
570 2012-04-25 Vincent Pucci <pucci@adacore.com>
572 * exp_intr.adb (Expand_Shift): Convert the left
573 operand and the operator when the type of the call differs from
574 the type of the operator.
576 2012-04-25 Geert Bosch <bosch@adacore.com>
578 * stand.ads: Minor comment fix.
580 2012-04-25 Hristian Kirtchev <kirtchev@adacore.com>
582 * sem_ch4.adb (Analyze_Slice): Handle the case where the prefix
583 is a string literal. Retrieve the first index from the base type
584 when slicing a string literal.
585 * sem_ch12.adb (Check_Private_View): Move the initialization
586 of the type inside the loop to reflect the changing index.
587 * sem_eval.adb (Eval_Relational_Op): Retrieve the first index
588 from the base type when dealing with a string literal.
589 * sem_res.adb (Resolve_Slice): Retrieve the first index from
590 the base type when slicing a string literal.
591 * sem_util.adb (Is_Internally_Generated_Renaming): New routine.
592 (Is_Object_Reference): String literals may act
593 as object references only when they are renamed internally.
594 (Proper_First_Index): New routine.
595 * sem_util.ads (Proper_First_Index): New routine.
597 2012-04-25 Robert Dewar <dewar@adacore.com>
599 * sem_ch3.adb, csinfo.adb, lib-writ.adb, sem_ch12.adb,
600 lib-xref.adb: Minor reformatting.
602 2012-04-25 Hristian Kirtchev <kirtchev@adacore.com>
604 * exp_ch9.adb: Rename Lock_Free_Sub_Type
605 to Lock_Free_Subprogram. Remove type Subprogram_Id.
606 Rename LF_Sub_Table to Lock_Free_Subprogram_Table.
607 (Allow_Lock_Free_Implementation): Renamed to
608 Allows_Lock_Free_Implementation. Update the comment on
609 lock-free restrictions. Code clean up and restructuring.
610 (Build_Lock_Free_Protected_Subprogram_Body): Update the
611 profile and related comments. Code clean up and restructuring.
612 (Build_Lock_Free_Unprotected_Subprogram_Body): Update the
613 profile and related comments. Code clean up and restructuring.
616 2012-04-25 Vincent Celier <celier@adacore.com>
618 * sem_ch12.adb (Inherit_Context): Compare library units, not
619 names of units, when checking if a unit is already in the context.
621 2012-04-25 Thomas Quinot <quinot@adacore.com>
623 * sem_ch3.adb: Reverse_Storage_Order must be propagated to
624 untagged derived record types.
626 2012-04-25 Ed Schonberg <schonberg@adacore.com>
628 * lib-xref.adb: Adjust position of end label.
630 2012-04-22 Jan Hubicka <jh@suse.cz>
632 * gcc-interface/utils.c (gnat_write_global_declarations): Do not mark
635 2012-04-20 Jan Hubicka <jh@suse.cz>
637 * gcc-interface/utils.c (gnat_write_global_declarations): Update for new
638 force_output placement.
640 2012-04-14 Jan Hubicka <jh@suse.cz>
642 * gcc-interface/trans.c (finalize_nrv): Update field referenced for new
643 cgraph/varpool layout.
645 2012-04-09 Mike Stump <mikestump@comcast.net>
647 * a-assert.ads: Remove execute permission.
648 * a-chacon.ads: Likewise.
649 * a-coteio.ads: Likewise.
650 * a-envvar.ads: Likewise.
651 * a-exetim-mingw.ads: Likewise.
652 * a-fzteio.ads: Likewise.
653 * a-izteio.ads: Likewise.
654 * a-lcteio.ads: Likewise.
655 * a-llctio.ads: Likewise.
656 * a-scteio.ads: Likewise.
657 * a-suenco.ads: Likewise.
658 * a-suenst.ads: Likewise.
659 * a-suewst.ads: Likewise.
660 * a-suezst.ads: Likewise.
661 * a-tirsfi.ads: Likewise.
662 * a-wichha.ads: Likewise.
663 * a-zchara.ads: Likewise.
664 * a-zchhan.ads: Likewise.
665 * a-zchuni.ads: Likewise.
666 * a-zrstfi.ads: Likewise.
667 * aspects.ads: Likewise.
668 * g-byorma.ads: Likewise.
669 * g-decstr.ads: Likewise.
670 * g-encstr.ads: Likewise.
671 * g-spchge.ads: Likewise.
672 * g-u3spch.ads: Likewise.
673 * g-wispch.ads: Likewise.
674 * g-zspche.ads: Likewise.
675 * namet-sp.ads: Likewise.
676 * s-os_lib.ads: Likewise.
677 * s-regexp.ads: Likewise.
678 * s-regpat.ads: Likewise.
679 * s-string.ads: Likewise.
680 * s-tasloc.ads: Likewise.
681 * s-utf_32.ads: Likewise.
682 * sem_aux.ads: Likewise.
683 * a-assert.adb: Likewise.
684 * a-chacon.adb: Likewise.
685 * a-envvar.adb: Likewise.
686 * a-exetim-mingw.adb: Likewise.
687 * a-suenco.adb: Likewise.
688 * a-suenst.adb: Likewise.
689 * a-suewst.adb: Likewise.
690 * a-suezst.adb: Likewise.
691 * a-tirsfi.adb: Likewise.
692 * a-wichha.adb: Likewise.
693 * a-zchhan.adb: Likewise.
694 * a-zchuni.adb: Likewise.
695 * a-zrstfi.adb: Likewise.
696 * aspects.adb: Likewise.
697 * g-byorma.adb: Likewise.
698 * g-decstr.adb: Likewise.
699 * g-encstr.adb: Likewise.
700 * g-spchge.adb: Likewise.
701 * g-u3spch.adb: Likewise.
702 * g-wispch.adb: Likewise.
703 * g-zspche.adb: Likewise.
704 * namet-sp.adb: Likewise.
705 * s-except.adb: Likewise.
706 * s-inmaop-vxworks.adb: Likewise.
707 * s-os_lib.adb: Likewise.
708 * s-regexp.adb: Likewise.
709 * s-regpat.adb: Likewise.
710 * s-string.adb: Likewise.
711 * s-tasloc.adb: Likewise.
712 * s-utf_32.adb: Likewise.
713 * s-wchcon.adb: Likewise.
714 * sem_aux.adb: Likewise.
716 2012-04-02 Robert Dewar <dewar@adacore.com>
718 * s-atopri.ads: Minor reformatting.
720 2012-04-02 Thomas Quinot <quinot@adacore.com>
722 * sem_util.adb: Minor reformatting, minor code cleanup.
724 2012-04-02 Ed Schonberg <schonberg@adacore.com>
726 * lib-xref.adb (Generate_Reference): For a reference to an
727 operator symbol, set the sloc to point to the first character
728 of the operator name, and not to the initial quaote.
729 (Output_References): Ditto for the definition of an operator
732 2012-04-02 Vincent Celier <celier@adacore.com>
734 * ali.adb (Scan_Ali): Recognize Z lines. Set
735 Implicit_With_From_Instantiation to True in the With_Record for
737 * ali.ads (With_Record): New Boolean component
738 Implicit_With_From_Instantiation, defaulted to False.
739 * csinfo.adb: Indicate that Implicit_With_From_Instantiation
741 * lib-writ.adb (Write_ALI): New array Implicit_With.
742 (Collect_Withs): Set Implicit_With for the unit is it is not Yes.
743 (Write_With_Lines): Write a Z line instead of a W line if
744 Implicit_With is Yes for the unit.
745 * sem_ch12.adb (Inherit_Context): Only add a unit in the context
746 if it is not there yet.
747 * sinfo.ads: New flag Implicit_With_From_Instantiation (Flag12)
750 2012-04-02 Yannick Moy <moy@adacore.com>
752 * osint.adb, osint.ads (Add_Default_Search_Dirs): Add library
753 search dirs in file specified with option -gnateO.
755 2012-04-02 Robert Dewar <dewar@adacore.com>
757 * sem_ch5.adb, exp_util.adb, sem_util.adb, exp_ch4.adb: Minor
760 2012-04-02 Olivier Hainque <hainque@adacore.com>
762 * g-sse.ads: Add x86-solaris and x86_64-darwin to the set of
763 platforms where the use of this spec is supported. Add current
764 year to the copyright notice.
765 * gcc-interfaces/Makefile.in: Add g-sse.o and g-ssvety.o to
766 EXTRA_GNATRTL_NONTASKING_OBJS on x86 32/64 targets that support
767 it and where they were missing (x86-solaris, x86-freebsd,
768 x86_64-freebsd, and x86-darwin).
770 2012-04-02 Gary Dismukes <dismukes@adacore.com>
772 * bindgen.adb (Gen_Ada_Init): When compiling for the AAMP small
773 library, where we no longer suppress the Standard_Library,
774 generate an empty body rather than the usual generation of
775 assignments to imported globals, since those aren't present in
778 2012-04-02 Ed Schonberg <schonberg@adacore.com>
780 * sinfo.ads: Minor documentation fix.
782 2012-04-02 Hristian Kirtchev <kirtchev@adacore.com>
784 * sem_res.adb (Resolve_Conditional_Expression): Add local variables
785 Else_Typ and Then_Typ. Add missing type conversions to the "then" and
786 "else" expressions when their respective types are scalar.
788 2012-04-02 Vincent Pucci <pucci@adacore.com>
790 * exp_ch9.adb: Reordering of the local subprograms. New Table
791 for the lock free implementation that maps each protected
792 subprograms with the protected component it references.
793 (Allow_Lock_Free_Implementation): New routine. Check if
794 the protected body enables the lock free implementation.
795 (Build_Lock_Free_Protected_Subprogram_Body): New routine.
796 (Build_Lock_Free_Unprotected_Subprogram_Body): New routine.
797 (Comp_Of): New routine.
798 * Makefile.rtl: Add s-atopri.o
799 * debug.adb: New compiler debug flag -gnatd9 for lock free
801 * rtsfind.ads: RE_Atomic_Compare_Exchange_8,
802 RE_Atomic_Compare_Exchange_16, RE_Atomic_Compare_Exchange_32,
803 RE_Atomic_Compare_Exchange_64, RE_Atomic_Load_8,
804 RE_Atomic_Load_16, RE_Atomic_Load_32, RE_Atomic_Load_64, RE_Uint8,
805 RE_Uint16, RE_Uint32, RE_Uint64 added.
806 * s-atropi.ads: New file. Defines atomic primitives used
807 by the lock free implementation.
809 2012-04-02 Emmanuel Briot <briot@adacore.com>
811 * g-expect.adb (Expect_Internal): Fix leak of the input file descriptor.
813 2012-04-02 Hristian Kirtchev <kirtchev@adacore.com>
815 * exp_ch4.adb (Expand_N_Quantified_Expression): Reimplemented.
816 The expansion no longer uses the copy of the original QE created
818 * sem.adb (Analyze): Add processing for loop parameter specifications.
819 * sem_ch4.adb (Analyze_Quantified_Expression): Reimplemented. The
820 routine no longer creates a copy of the original QE. All
821 constituents of a QE are now preanalyzed and resolved.
822 * sem_ch5.adb (Analyze_Iteration_Scheme): Remove the guard which
823 bypasses all processing when the iteration scheme is related to a
824 QE. Relovate the code which analyzes loop parameter specifications
825 to a separate routine. (Analyze_Iterator_Specification):
826 Preanalyze the iterator name. This action was originally
827 done in Analyze_Iteration_Scheme. Update the check which
828 detects an iterator specification in the context of a QE.
829 (Analyze_Loop_Parameter_Specification): New routine. This
830 procedure allows for a stand-alone analysis of a loop parameter
831 specification without the need of a parent iteration scheme. Add
832 code to update the type of the loop variable when the range
833 generates an itype and the context is a QE.
834 (Pre_Analyze_Range): Renamed to Preanalyze_Range. Update all references
836 * sem_ch5.ads: Code reformatting.
837 (Analyze_Loop_Parameter_Specification): New routine.
838 * sem_ch6.adb (Fully_Conformant_Expressions): Detect a case
839 when establishing conformance between two QEs utilizing different
841 * sem_res.adb (Proper_Current_Scope): New routine.
842 (Resolve): Do not resolve a QE as there is nothing to be done now.
843 Ignore any loop scopes generated for QEs when detecting an expression
844 function as the scopes are cosmetic and do not appear in the tree.
845 (Resolve_Quantified_Expression): Removed. All resolution of
846 QE constituents is now performed during analysis. This ensures
847 that loop variables appearing in array aggregates are properly
850 2012-04-02 Ed Schonberg <schonberg@adacore.com>
852 * sem_util.adb (Build_Default_Subtype): If the base type is
853 private and its full view is available, use the full view in
854 the subtype declaration.
856 2012-04-02 Jose Ruiz <ruiz@adacore.com>
858 * gnat_ugn.texi: Add some minimal documentation about how to
859 use GNATtest for cross platforms.
861 2012-04-02 Vincent Celier <celier@adacore.com>
863 * opt.ads (Object_Path_File_Name): New variable.
864 * prj-attr.adb: New Compiler attribute Object_Path_Switches.
865 * prj-nmsc.adb (Process_Compiler): Recognize new attribute
866 Object_Path_Switches.
867 * snames.ads-tmpl: New standard name Object_Path_Switches.
868 * switch-c.adb (Scan_Front_End_Switches): Recognize new switch
869 -gnateO= and put its value in Opt.Object_Path_File_Name.
871 2012-04-02 Hristian Kirtchev <kirtchev@adacore.com>
873 * exp_ch7.adb (Process_Declarations): Detect a case where
874 a source object was initialized by another source object,
875 but the expression was rewritten as a class-wide conversion
876 of Ada.Tags.Displace.
877 * exp_util.adb (Initialized_By_Ctrl_Function): Removed.
878 (Is_Controlled_Function_Call): New routine.
879 (Is_Displacement_Of_Ctrl_Function_Result): Removed.
880 (Is_Displacement_Of_Object_Or_Function_Result): New routine.
881 (Is_Source_Object): New routine.
882 (Requires_Cleanup_Actions): Detect a case where a source object was
883 initialized by another source object, but the expression was rewritten
884 as a class-wide conversion of Ada.Tags.Displace.
885 * exp_util.ads (Is_Displacement_Of_Ctrl_Function_Result): Removed.
886 (Is_Displacement_Of_Object_Or_Function_Result): New routine.
888 2012-04-02 Ed Schonberg <schonberg@adacore.com>
890 * sem_res.adb (Resolve_Call): A call to an expression function
891 does not freeze if it appears in a different scope from the
892 expression function itself. Such calls appear in the generated
893 bodies of other expression functions, or in pre/postconditions
894 of subsequent subprograms.
896 2012-04-02 Yannick Moy <moy@adacore.com>
898 * lib-xref-alfa.adb: Code clean up.
900 2012-04-02 Ed Schonberg <schonberg@adacore.com>
902 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Do not suppress
903 style checks, because the subprogram instance itself may contain
904 violations of syle rules.
905 * style.adb (Missing_Overriding): Check for missing overriding
906 indicator on a subprogram instance.
908 2012-04-02 Hristian Kirtchev <kirtchev@adacore.com>
910 * sem_ch6.adb (Last_Implicit_Declaration): New routine.
911 (Process_PPCs): Insert the body of _postconditions after the
912 last internally generated declaration. This ensures that actual
913 subtypes created for formal parameters are visible and properly
914 frozen as _postconditions may reference them.
916 2012-04-02 Robert Dewar <dewar@adacore.com>
918 * einfo.adb (First_Component_Or_Discriminant) Now applies to
919 all types with discriminants, not just records.
920 * exp_attr.adb (Expand_N_Attribute): Add Scalar_Values handling
921 for arrays, scalars and non-variant records.
922 * sem_attr.adb (Analyze_Attribute): Handle Valid_Scalars
923 * sem_attr.ads (Valid_Scalars): Update description
924 * sem_util.ads, sem_util.adb (No_Scalar_Parts): New function.
926 2012-03-31 Eric Botcazou <ebotcazou@adacore.com>
929 2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
931 * gcc-interface/decl.c (SS_MARK_NAME): New define.
932 (gnat_to_gnu_entity) <E_Function>: Prepend leaf attribute on entities
933 whose name is SS_MARK_NAME.
935 2012-03-30 Robert Dewar <dewar@adacore.com>
937 * exp_ch5.adb, sem_util.adb, exp_ch4.adb: Minor comment updates.
939 2012-03-30 Yannick Moy <moy@adacore.com>
941 * lib-xref-alfa.adb (Add_Alfa_File): Treat possibly 2 units at the same
942 time, putting all scopes in the same Alfa file.
943 (Add_Alfa_Xrefs): Correct errors in comparison function. Correct value
945 (Collect_Alfa): Possibly pass 2 units to Add_Alfa_File.
947 2012-03-30 Hristian Kirtchev <kirtchev@adacore.com>
949 * exp_util.adb (Is_Secondary_Stack_BIP_Func_Call): Handle a case where
950 a build-in-place call appears as Prefix'Reference'Reference.
952 2012-03-30 Yannick Moy <moy@adacore.com>
954 * lib-xref-alfa.adb: Minor refactoring to remove internal package.
956 2012-03-30 Hristian Kirtchev <kirtchev@adacore.com>
958 * sem_ch5.adb (Analyze_Iteration_Scheme): Preanalyze the subtype
959 definition of a loop when the context is a quantified expression.
961 2012-03-30 Vincent Celier <celier@adacore.com>
963 * prj.ads: Minor comment update.
965 2012-03-30 Yannick Moy <moy@adacore.com>
967 * lib-xref-alfa.adb, alloc.ads, lib-xref.ads: Minor addition of
968 comments and refactoring.
970 2012-03-30 Robert Dewar <dewar@adacore.com>
972 * lib-xref.adb, lib-xref-alfa.adb: Minor reformatting & code
975 2012-03-30 Yannick Moy <moy@adacore.com>
977 * lib-xref-alfa.adb (Generate_Dereference): Use Get_Code_Unit
978 instead of Get_Source_Unit to get file for reference.
979 (Traverse_Compilation_Unit): Do not add scopes for generic units.
980 * lib-xref.adb (Generate_Reference): Use Get_Code_Unit instead
981 of Get_Source_Unit to get file for reference.
982 * sem_ch12.adb (Analyze_Package_Instantiation): Enable
983 instantiation in Alfa mode.
985 2012-03-30 Hristian Kirtchev <kirtchev@adacore.com>
987 * exp_ch7.adb (Process_Declarations): Replace
988 the call to Is_Null_Access_BIP_Func_Call with
989 Is_Secondary_Stack_BIP_Func_Call. Update the related comment.
990 * exp_util.adb (Is_Null_Access_BIP_Func_Call): Removed.
991 (Is_Secondary_Stack_BIP_Func_Call): New routine.
992 (Requires_Cleanup_Actions): Replace
993 the call to Is_Null_Access_BIP_Func_Call with
994 Is_Secondary_Stack_BIP_Func_Call. Update the related comment.
995 * exp_util.ads (Is_Null_Access_BIP_Func_Call): Removed.
996 (Is_Secondary_Stack_BIP_Func_Call): New routine.
998 2012-03-30 Yannick Moy <moy@adacore.com>
1000 * lib-xref-alfa.adb, lib-xref.adb: Code clean ups.
1002 2012-03-30 Gary Dismukes <dismukes@adacore.com>
1004 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): For the case of a
1005 loop entity which is rewritten as a renaming
1006 of the indexed array, explicitly mark the entity as needing
1007 debug info so that Materialize entity will be set later by
1008 Debug_Renaming_Declaration when the renaming is expanded.
1010 2012-03-30 Robert Dewar <dewar@adacore.com>
1012 * sem_attr.ads: Update comment.
1014 2012-03-30 Vincent Celier <celier@adacore.com>
1016 * prj.ads: New Dependency_Kind: ALI_Closure.
1018 2012-03-30 Thomas Quinot <quinot@adacore.com>
1020 * exp_pakd.adb: Minor reformatting.
1022 2012-03-30 Yannick Moy <moy@adacore.com>
1024 * lib-xref-alfa.adb (Add_Alfa_File): Take into account possible absence
1025 of compilation unit for unit in Sdep_Table.
1027 2012-03-30 Thomas Quinot <quinot@adacore.com>
1029 * freeze.adb (Freeze_Record_Type): For a type with reversed bit
1030 order and reversed storage order, disable front-end relayout.
1032 2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
1034 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Copy
1035 the TYPE_PACKED flag from the base type.
1037 2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
1039 * gcc-interface/decl.c (SS_MARK_NAME): New define.
1040 (gnat_to_gnu_entity) <E_Function>: Prepend leaf attribute on entities
1041 whose name is SS_MARK_NAME.
1043 2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
1045 * gcc-interface/utils.c (add_parallel_type): Take a TYPE instead of a
1046 DECL and adjust. Move around.
1047 (has_parallel_type): New predicate.
1048 (rest_of_record_type_compilation): Return early if the type already
1049 has a parallel type.
1050 * gcc-interface/gigi.h (add_parallel_type): Adjust.
1051 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust for above changes.
1053 2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
1055 * gcc-interface/utils.c (finish_record_type): Return early for padded
1058 2012-03-20 Arnaud Charlet <charlet@adacore.com>
1060 * hlo.ads, hlo.adb: Removed, no longer used.
1061 * gcc-interface/Make-lang.in: Remove hlo.o. Update dependencies.
1062 * gcc-interface/Makefile.in: Remove EXTRA_LIBGNAT_SRCS (temporarly)
1063 and compute it from EXTRA_LIBGNAT_OBJS.
1064 Clean up comments, reorder LIBGNAT_SRCS and LIBGNAT_OBJS.
1066 2012-03-20 Yannick Moy <moy@adacore.com>
1068 * gnat_rm.texi, sem_attr.ads: Update documentation.
1070 2012-03-19 Yannick Moy <moy@adacore.com>
1072 * sem_ch6.adb: Minor code clean up.
1074 2012-03-19 Vincent Celier <celier@adacore.com>
1076 * make.adb (Scan_Make_Arg): Make sure all significant -m switches
1077 on the command line are counted.
1079 2012-03-19 Robert Dewar <dewar@adacore.com>
1081 * sem_elab.adb (Generate_Elab_Warnings): Fix spec, fix attribute
1084 2012-03-19 Robert Dewar <dewar@adacore.com>
1086 * par-ch4.adb (Check_Bad_Exp): New procedure
1088 2012-03-19 Robert Dewar <dewar@adacore.com>
1090 * exp_attr.adb, sem_attr.adb, sem_attr.ads, snames.ads-tmpl: Add
1091 initial framework for Valid_Scalars attribute.
1093 2012-03-19 Robert Dewar <dewar@adacore.com>
1095 * scng.adb (Scan): Recognize incorrect preprocessor directive
1097 2012-03-19 Robert Dewar <dewar@adacore.com>
1099 * atree.adb (Allocate_Initialize_Node): Use Num_Extension_Nodes
1100 * atree.ads (Num_Extension_Nodes): New variable
1101 * debug.adb: New debug flag -gnatd.N
1102 * gnat1drv.adb (Adjust_Global_Switches): Adjust
1103 Num_Extension_Nodes if -gnatd.N set
1105 2012-03-19 Eric Botcazou <ebotcazou@adacore.com>
1107 * einfo.ads: Minor update to First_Rep_Item and Has_Gigi_Rep_Item
1110 2012-03-19 Robert Dewar <dewar@adacore.com>
1112 * opt.ads: Remove HLO_Active flag.
1113 * sem.adb: Remove call of high level optimizer.
1114 * sem.ads (New_Nodes_OK): Removed.
1115 * sem_ch10.adb: Remove references to New_Nodes_OK.
1116 * switch-c.adb: Remove handling of -gnatH switch.
1118 2012-03-19 Yannick Moy <moy@adacore.com>
1120 * sem_ch6.adb (Check_Subprogram_Contract): Do not emit warnings
1121 on trivially True or False postconditions and Ensures components
1124 2012-03-19 Robert Dewar <dewar@adacore.com>
1126 * gnat_ugn.texi: Fix index entry for -gnatei (now we have
1129 2012-03-19 Hristian Kirtchev <kirtchev@adacore.com>
1131 * sem_ch3.adb (Get_Discriminant_Value): Instead of looking
1132 at the immediate correcponsing discriminant, traverse a
1133 potential chain of discriminants produced by type derivations.
1134 (Root_Corresponding_Discriminant): Traverse a chain of inherited
1135 discriminants and return the topmost discriminant.
1137 2012-03-19 Bob Duff <duff@adacore.com>
1139 * debug.adb: Minor comment change.
1140 * gnat_ugn.texi: Update documentation for elaboration regarding
1143 2012-03-19 Gary Dismukes <dismukes@adacore.com>
1145 * exp_ch3.adb (Expand_N_Object_Declaration): In
1146 the case of an object of a class-wide interface type, where the
1147 declaration is rewritten as a renaming, call Set_Debug_Info_Needed
1148 on the renaming entity so that Materialize_Entity will be
1149 set. Also, change existing call (for other than interface cases)
1150 to call Set_Debug_Info_Needed rather than Set_Needs_Debug_Info
1151 (as specified for that flag).
1153 2012-03-19 Hristian Kirtchev <kirtchev@adacore.com>
1155 * sem_ch4.adb (Analyze_Allocator): Detect an allocator generated
1156 by the build-in-place machinery where the designated type is
1157 indefinite, but the underlying type is not. Do not emit errors
1158 related to missing initialization in this case.
1160 2012-03-19 Robert Dewar <dewar@adacore.com>
1162 * gnat_ugn.texi: Add documentation for -gnateinnn switch.
1163 * sem_elab.adb, put_alfa.adb, lib-xref-alfa.adb: Minor reformatting.
1164 * sem_prag.adb: Minor comment update.
1166 2012-03-15 Robert Dewar <dewar@adacore.com>
1168 * errout.ads: Add entry for translating -gnateinn to
1169 /MAX_INSTANTIATIONS for VMS.
1170 * hostparm.ads (Max_Instantiations): Moved to Opt.
1171 * opt.ads (Maximum_Instantiations): Moved from Hostparm, and renamed.
1172 * sem_ch12.adb (Maximum_Instantiations): New name of
1173 Max_Instantiations (Analyze_Package_Instantiation): Change error
1174 msg for too many instantiations (mention -gnateinn switch).
1175 * switch-c.adb (Scan_Front_End_Switches): Implement -gnateinn switch.
1176 * switch.ads: Minor comment update.
1177 * usage.adb (Usage): Output line for -maxeinn switch.
1178 * vms_data.ads: Add entry for MAX_INSTANTIATIONS (-gnateinn).
1180 2012-03-15 Yannick Moy <moy@adacore.com>
1182 * alfa.ads Update the decription of ALI sections.
1183 (Alfa_File_Record): Add a component Unit_File_Name to store the
1184 unit file name for subunits.
1185 * get_alfa.adb, put_alfa.adb Adapt to the possible presence of
1187 * lib-xref-alfa.adb (Add_Alfa_File): For subunits, retrieve the
1188 file name of the unit.
1190 2012-03-15 Yannick Moy <moy@adacore.com>
1192 * sem_ch6.adb (Check_Subprogram_Contract): Do
1193 not issue warning on missing 'Result in postcondition if all
1194 postconditions and contract-cases already get a warning for only
1195 referring to pre-state.
1197 2012-03-15 Bob Duff <duff@adacore.com>
1199 * debug.adb: Add new debug switch -gnatd.U, which disables the
1200 support added below, in case someone trips over a cycle, and needs
1202 * sem_attr.adb (Analyze_Access_Attribute):
1203 Treat Subp'Access as a call for elaboration purposes.
1204 * sem_elab.ads, sem_elab.adb (Check_Elab_Call): Add support
1207 2012-03-15 Vincent Pucci <pucci@adacore.com>
1209 * sem.ads, sem.adb (Preanalyze): New routine.
1210 * sem_ch4.adb (Analyze_Quantified_Expression): Call to the
1211 Preanalyze routine in Sem added. Renaming of Needs_Expansion
1212 into Need_Preanalysis.
1213 * sem_ch6.adb (Preanalyze): Removed.
1215 2012-03-15 Robert Dewar <dewar@adacore.com>
1217 * sem_ch4.adb (Analyze_Quantified_Expression): Add comment.
1218 * sem_prag.adb: Minor comment additions.
1219 * sem_attr.adb (Check_First_Last_Valid): Make sure prefix type
1222 2012-03-15 Vincent Pucci <pucci@adacore.com>
1224 * sem_ch4.adb (Analyze_Quantified_Expression):
1225 Preanalyze the condition when the quantified expression will be
1228 2012-03-15 Yannick Moy <moy@adacore.com>
1230 * sem_prag.adb, sem_util.adb, sem_util.ads, sem_attr.adb, sem_ch6.adb,
1231 sem_warn.adb: Minor refactoring, renaming Case_Pragma in CTC_Pragma,
1232 to refer to both Test_Case pragma and Contract_Case pragma (same
1233 acronym as in Spec_CTC_List).
1235 2012-03-15 Robert Dewar <dewar@adacore.com>
1237 * sem_prag.adb, sem_prag.ads, sem_util.ads, sem_attr.adb, sem_ch6.adb,
1238 sem_warn.adb: Minor reformatting.
1240 2012-03-15 Hristian Kirtchev <kirtchev@adacore.com>
1242 * exp_util.adb (Initialized_By_Ctrl_Function): Do not loop over
1243 selector names as the function call always appears at the top selected
1246 2012-03-15 Ed Schonberg <schonberg@adacore.com>
1248 * sem_ch12.adb (Validate_Access_Subprogram_Instance): keep
1249 Mode_Conformance check for older versions of the language.
1251 2012-03-15 Yannick Moy <moy@adacore.com>
1253 * gnat_ugn.texi Document the extension of option -gnatw.t.
1254 * sem_ch3.adb (Analyze_Declaration): Check for suspicious
1255 contracts only after contract cases have been semantically
1257 * sem_ch6.adb (Check_Subprogram_Contract): Consider also Ensures
1258 components of contract cases for detecting suspicious contracts.
1260 2012-03-15 Yannick Moy <moy@adacore.com>
1262 * aspects.adb, aspects.ads (Aspect_Id): New GNAT aspect
1263 Aspect_Contract_Case.
1264 * gnat_rm.texi Document the new pragma/aspect
1265 Contract_Case. Correct the documentation of the existing
1266 pragma/aspect Test_Case with the new semantics.
1267 * sem_attr.adb (Analyze_Attribute): Allow use of 'Result in the
1268 Ensures component of a Contract_Case pragma.
1269 * sem_ch13.adb (Analyze_Aspect_Specifications): Check new aspect
1270 and translate it into a pragma.
1271 (Check_Aspect_At_Freeze_Point): Take into account the new aspect.
1272 * sem_ch3.adb, sinfo.adb, sinfo.ads Renaming of TC (for test case)
1273 into CTC (for contract and test case).
1274 * sem_ch6.adb (Process_PPCs): Generate Check pragmas from
1275 Contract_Case pragmas, similarly to what is done already for
1277 * sem_prag.adb, sem_prag.ads (Check_Contract_Or_Test_Case):
1278 Renaming of Check_Test_Case.
1279 (Analyze_Pragma, Sig_Flags): Take into account the new pragma.
1280 * sem_util.adb, sem_util.ads Renaming to take into account the
1281 new pragma, so that functions which applied only to Test_Case
1282 now apply to both Test_Case and Contract_Case.
1283 * par-prag.adb, sem_warn.adb, snames.ads-tmpl Take into account
1286 2012-03-15 Robert Dewar <dewar@adacore.com>
1288 * sem_ch6.ads: Minor comment updates.
1289 * sem_ch12.adb: Minor comment clarification.
1291 2012-03-15 Robert Dewar <dewar@adacore.com>
1293 * sem_ch5.adb: Minor reformatting.
1295 2012-03-15 Ed Schonberg <schonberg@adacore.com>
1297 * exp_ch3.adb (Expand_N_Object_Declaration): When rewriting the
1298 declaration of a class-wide object, retain the Ekind to prevent
1299 subsequent misuse of constants.
1301 2012-03-15 Yannick Moy <moy@adacore.com>
1303 * gnat_rm.texi, gnat_ugn.texi: Minor correction of invariant
1306 2012-03-15 Hristian Kirtchev <kirtchev@adacore.com>
1308 * exp_util.adb (Initialized_By_Ctrl_Function): Add code to
1309 process the case when a function call appears in object.operation
1312 2012-03-15 Ed Schonberg <schonberg@adacore.com>
1314 * sem_ch6.ads, sem_ch6.adb (Check_Subtype_Conformant): add
1315 Get_Inst formal, so that conformance within an instantiation
1316 follows renamings of formals. This is similar to what is already
1317 done in Check_Mode_conformant.
1318 * sem_ch12.adb (Vailidate_Access_Subprogram_Instance): check that
1319 formal and actual are subtype conformant. Previously only mode
1320 conformance was required.
1322 2012-03-15 Robert Dewar <dewar@adacore.com>
1324 * par-ch6.adb, einfo.ads, sem_eval.adb, sem_eval.ads,
1325 sem_case.adb: Minor reformatting.
1327 2012-03-15 Robert Dewar <dewar@adacore.com>
1329 * exp_attr.adb (Expand_N_Attribute_Reference): Add handling
1330 of First_Valid/Last_Valid.
1331 * sem_attr.adb (Check_First_Last_Valid): New procedure
1332 (Analyze_Attribute): Add handling of First_Valid and Last_Valid
1333 (Eval_Attribute): ditto.
1334 * snames.ads-tmpl: Add entries for First_Valid and Last_Valid.
1336 2012-03-15 Ed Schonberg <schonberg@adacore.com>
1338 * exp_ch5.adb (Expand_Predicated_Loop): Suppress warnings on
1339 loop variable, for the unusual case where the range has a single
1340 element and the loop variable has no visible assignment to it.
1342 2012-03-15 Vincent Pucci <pucci@adacore.com>
1344 * exp_ch4.adb (Expand_N_Quantified_Expression): Expand the
1345 original quantified expression node.
1346 * sem_ch4.adb (Analyze_Quantified_Expression): Properly analyze
1347 the quantified expression and preserve the original non-analyzed
1348 quantified expression when an expansion is needed.
1349 * sem_ch5.adb (Analyze_Iteration_Scheme): Special treatment
1350 for quantified expressions.
1351 (Analyze_Iterator_Specification): Special treatment for quantified
1354 2012-03-15 Ed Falis <falis@adacore.com>
1356 * s-vxwork-ppc.ads: Update FP_CONTEXT so name of former pad
1357 field matches VxWorks headers.
1359 2012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1361 * gcc-interface/Makefile.in (mips-sgi-irix6*): Remove.
1363 * a-intnam-irix.ads, mlib-tgt-specific-irix.adb,
1364 s-intman-irix.adb, s-mastop-irix.adb, s-osinte-irix.adb,
1365 s-osinte-irix.ads, s-proinf-irix-athread.adb,
1366 s-proinf-irix-athread.ads, s-taprop-irix.adb, s-tasinf-irix.ads,
1367 system-irix-n32.ads, system-irix-n64.ads, system-irix-o32.ads:
1370 * adaint.c [__mips && __sgi]: Remove.
1371 (__gnat_number_of_cpus) [__mips && __sgi]: Remove.
1372 [IS_CROSS && !(__mips && __sgi)]: Remove.
1373 * adaint.h [sgi && _LFAPI]: Remove.
1374 * cstreams.c (__gnat_full_name) [sgi]: Remove.
1375 * env.c (__gnat_unsetenv) [__mips && __sgi]: Remove.
1376 (__gnat_clearenv) [__mips && __sgi]: Remove.
1377 * errno.c (_SGI_MP_SOURCE): Remove.
1378 * gsocket.h [sgi]: Remove.
1379 * init.c: Remove IRIX reference.
1381 * link.c [sgi]: Remove.
1382 * s-oscons-tmplt.c [__mips && __sgi] (IOV_MAX): Don't define.
1383 (main) [__mips && __sgi] (MAX_tv_sec): Don't define.
1384 (CLOCK_SGI_FAST, CLOCK_SGI_CYCLE): Remove.
1385 * sysdep.c [sgi]: Remove.
1386 (getc_immediate_common) [sgi]: Remove.
1387 (__gnat_localtime_tzoff) [sgi]: Remove.
1388 * terminals.c [__mips && __sgi] (IRIX): Don't define.
1389 [IRIX] (USE_GETPTY): Don't define.
1390 (allocate_pty_desc) [USE_GETPTY]: Remove.
1392 * g-traceb.ads: Remove IRIX reference.
1393 * g-trasym.ads: Likewise.
1394 * memtrack.adb: Likewise.
1395 * s-interr-sigaction.adb: Likewise.
1397 * gnat_rm.texi (Implementation Advice): Remove SGI info.
1398 (Implementation Defined Characteristics): Likewise.
1399 * gnat_ugn.texi (Summary of Run-Time Configurations, mips-irix):
1401 (Irix-Specific Considerations): Remove.
1403 2012-03-13 Tristan Gingold <gingold@adacore.com>
1405 * gcc-interface/gigi.h (flag_vms_malloc64): Refine condition.
1407 2012-03-13 Tristan Gingold <gingold@adacore.com>
1409 * sysdep.c: Adjust condition after removal of __osf__.
1411 2012-03-12 Eric Botcazou <ebotcazou@adacore.com>
1413 * gcc-interface/gigi.h (shift_unc_components_for_thin_pointers): Kill.
1414 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Remove call
1416 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Pool_Address>: Adjust
1417 handling of thin pointers.
1418 <Attr_Descriptor_Size>: Likewise.
1419 (gnat_to_gnu) <N_Free_Statement>: Likewise.
1420 * gcc-interface/utils.c (shift_unc_components_for_thin_pointers): Kill.
1421 (convert_to_fat_pointer): Adjust handling of thin pointers.
1422 (convert) <POINTER_TYPE>: Likewise.
1423 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
1425 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1427 * gcc-interface/Makefile.in (alpha*-dec-osf*): Remove.
1428 * a-intnam-tru64.ads, mlib-tgt-specific-tru64.adb,
1429 s-mastop-tru64.adb, s-osinte-tru64.adb, s-osinte-tru64.ads,
1430 s-taprop-tru64.adb, s-tasinf-tru64.ads, s-taspri-tru64.ads,
1431 system-tru64.ads: Remove.
1433 * adaint.c (__gnat_number_of_cpus) [__alpha__ && __osf__]:
1435 [IS_CROSS] [!(__alpha__ && __osf__)]: Remove.
1436 * env.c [__alpha__ && __osf__]: Remove.
1437 * gsocket.h (_OSF_SOURCE): Remove.
1438 (HAVE_THREAD_SAFE_GETxxxBYyyy) [__osf__]: Remove.
1439 * init.c [__alpha__ && __osf__]: Remove.
1440 * link.c [__osf__]: Remove.
1441 * s-oscons-tmplt.c [__alpha__ && __osf__]: Remove.
1442 [__osf__ && !_SS_MAXSIZE]: Remove.
1443 * sysdep.c [__osf__]: Remove.
1444 * terminals.c [__alpha__ && __osf__]: Remove.
1447 * g-traceb.ads: Remove Tru64 reference.
1448 * g-trasym.ads: Likewise.
1449 * gnat_ugn.texi (Linking a Mixed C++ & Ada Program): Likewise.
1450 (Summary of Run-Time Configurations): Likewise.
1451 * memtrack.adb: Likewise.
1453 2012-03-12 Tristan Gingold <gingold@adacore.com>
1455 * gcc-interface/decl.c (gnat_to_gnu_param): Use flag_vms_malloc64
1456 instead of TARGET_MALLOC64.
1457 * gcc-interface/gigi.h (flag_vms_malloc64): Define instead
1460 2012-03-09 Robert Dewar <dewar@adacore.com>
1462 * a-direct.adb, comperr.adb, freeze.adb: Minor reformatting.
1464 2012-03-09 Arnaud Charlet <charlet@adacore.com>
1466 * s-taskin.adb (Initialize_ATCB): Set Task_Image_Len to
1467 0 so that we never access this field uninitialized (e.g. in
1468 Task_Primitives.Operations.Enter_Task for the environment task).
1470 2012-03-09 Vincent Pucci <pucci@adacore.com>
1472 * exp_ch5.adb (Expand_Iterator_Loop):
1473 Call to Expand_Iterator_Loop_Over_Array added.
1474 (Expand_Iterator_Loop_Over_Array): New routine. Expansion of
1475 "of" iterator loop over arrays. Multidimensional array case added.
1477 2012-03-09 Eric Botcazou <ebotcazou@adacore.com>
1479 * uintp.ads: Fix minor pasto in comment.
1481 2012-03-09 Vasiliy Fofanov <fofanov@adacore.com>
1483 * a-direct.adb: Do not strip the trailing directory separator
1484 from path, as this is already done inside Normalize_Pathname;
1485 doing it again produces the wrong result on Windows for the
1486 drive's root dir (i.e. "X:\" becomes "X:").
1488 2012-03-09 Thomas Quinot <quinot@adacore.com>
1490 * exp_attr.adb, freeze.adb, sem_attr.adb, aspects.adb, aspects.ads,
1491 sem_ch13.adb, snames.ads-tmpl (Exp_Attr.Expand_N_Attribute_Reference):
1492 Add Attribute_Scalar_Storage_Order.
1493 (Sem_Attr.Analyze_Attribute, Eval_Attribute): Ditto.
1494 (Aspects): Add Aspect_Scalar_Storage_Order (Snames): Add
1495 Name_Scalar_Storage_Order and Attribute_Scalar_Storage_Order.
1496 (Sem_Ch13.Analyze_Attribute_Definition_Clause): Add processing
1497 for Scalar_Storage_Order.
1498 (Freeze): If Scalar_Storage_Order is specified, check that it
1499 is compatible with Bit_Order.
1501 2012-03-09 Robert Dewar <dewar@adacore.com>
1503 * s-osinte-linux.ads, sem_util.adb, s-taprop-linux.adb, exp_ch4.adb,
1504 a-strsup.ads, sem_ch6.adb, a-stwisu.ads, exp_ch3.adb,
1505 a-stzsup.ads: Minor reformatting.
1507 2012-03-09 Thomas Quinot <quinot@adacore.com>
1509 * s-ransee-vms.adb: Minor reformatting.
1511 2012-03-09 Arnaud Charlet <charlet@adacore.com>
1513 * comperr.adb (Delete_SCIL_Files): Fix handling of
1514 N_Package_Renaming_Declaration and N_Generic_Package_Declaration.
1516 2012-03-09 Javier Miranda <miranda@adacore.com>
1518 * sem_ch6.adb (Check_Body_To_Inline): In AAMP and VM targets
1519 use frontend inlining at all optimization levels.
1520 * sem_util.adb (Must_Inline): In AAMP and VM targets, given that
1521 there is no inlining support in the backend, use also frontend
1522 inlining when compiling with optimizations enabled.
1523 * exp_ch6.adb (Expand_Call): Minor code reorganization.
1525 2012-03-09 Eric Botcazou <ebotcazou@adacore.com>
1527 * gcc-interface/ada-tree.h (TYPE_VAX_FLOATING_POINT_P): Move around.
1528 (TYPE_UNCONSTRAINED_ARRAY): Adjust comment.
1529 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Pool_Address>: Tidy
1530 up. Add comment and use canonical predicate for thin pointers.
1531 (gnat_to_gnu) <N_Free_Statement>: Tidy up and reorder. Add comment
1532 and use canonical predicate for thin pointers.
1533 * gcc-interface/utils.c (convert_to_fat_pointer): Remove superfluous
1534 'else' and use standard name.
1535 (convert_to_thin_pointer): Delete.
1536 (convert) <POINTER_TYPE>: Do the difference in sizetype directly and
1537 change obsolete idioms. Do not call above function.
1538 (unchecked_convert): Fix formatting.
1539 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: In the thin
1540 pointer case, use byte_position to get the field position.
1542 2012-03-07 Eric Botcazou <ebotcazou@adacore.com>
1544 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set flags on the
1545 DECL node built for a type which has a non-trivial equivalent type.
1547 2012-03-07 Eric Botcazou <ebotcazou@adacore.com>
1549 * gcc-interface/gigi.h (rest_of_type_decl_compilation): Delete.
1550 * gcc-interface/decl.c (defer_finalize_level): Likewise.
1551 (defer_finalize_list): Likewise.
1552 (gnat_to_gnu_entity): Delete references to above variables and do not
1553 call rest_of_type_decl_compilation.
1554 (rest_of_type_decl_compilation): Delete.
1555 (rest_of_type_decl_compilation_no_defer): Likewise.
1556 * gcc-interface/utils.c (rest_of_record_type_compilation): Do not call
1557 rest_of_type_decl_compilation.
1558 (create_type_decl): Likewise.
1559 (update_pointer_to): Likewise.
1561 2012-03-07 Eric Botcazou <ebotcazou@adacore.com>
1563 * gcc-interface/trans.c (Identifier_to_gnu): Don't unshare initializer.
1564 (add_decl_expr): Mark external DECLs as used.
1565 * gcc-interface/utils.c (convert) <CONSTRUCTOR>: Copy the vector.
1567 2012-03-07 Tristan Gingold <gingold@adacore.com>
1569 * s-ransee-vms.adb: New file.
1570 * gcc-interface/Makefile.in: Use s-ransee-vms.adb on VMS.
1571 * gcc-interface/Make-lang.in: Update dependencies.
1573 2012-03-07 Bob Duff <duff@adacore.com>
1575 * rtsfind.ads: Add support for finding Super_String types.
1576 * sem_util.ads, sem_util.adb (Is_Bounded_String): New function
1577 to determine whether a given type is a bounded string type.
1578 (Is_Fully_Initialized_Type): Return True for bounded
1579 string types, to suppress bogus warnings.
1580 * exp_ch4.adb (Expand_Composite_Equality): Special case for bounded
1581 strings: equality composes. This allows us to remove default values in
1583 * a-strsup.ads, a-stwisu.ads, a-stzsup.ads: Update comments.
1584 * exp_ch3.adb (Expand_Freeze_Record_Type): Comment.
1586 2012-03-07 Robert Dewar <dewar@adacore.com>
1588 * sem_util.adb, exp_ch4.adb, exp_ch6.adb, sem_ch6.adb: Minor
1591 2012-03-07 Sergey Rybin <rybin@adacore.com frybin>
1593 * gnat_ugn.texi: gnatpp: fix paragraph about sources with
1594 preprocessor directives.
1596 2012-03-07 Arnaud Charlet <charlet@adacore.com>
1598 * s-osinte-linux.ads, s-taprop-linux.adb (prctl): New function.
1599 (Enter_Task): Call prctl when relevant.
1601 2012-03-07 Tristan Gingold <gingold@adacore.com>
1603 * s-osinte-vms.ads: pthread_mutex_setname_np: new function.
1605 2012-03-07 Ed Schonberg <schonberg@adacore.com>
1607 * sem_ch6.adb (Process_Formals): a generic subprogram with
1608 a formal incomplete type does not require a freeze node.
1610 2012-03-07 Bob Duff <duff@adacore.com>
1612 * sem_util.ads: Minor reformatting.
1614 2012-03-07 Geert Bosch <bosch@adacore.com>
1616 * targparm.ads: New target parameter Atomic_Sync_Default,
1618 * targparm.adb (Get_Target_Parameters): Add processing for
1619 Atomic_Sync_Default.
1620 * gnat1drv.adb (Adjust_Global_Switches): Adjust Supress_Options
1623 2012-03-07 Javier Miranda <miranda@adacore.com>
1625 * sem_ch3.adb (Analyze_Object_Declaration): If the object
1626 declaration has an init expression then stop the analysis of the
1627 object declaration if the expression which initializes the object
1628 is a call to an inlined function which returns an unconstrained
1629 and has been expanded into a procedure call.
1630 * sem_ch5.adb (Has_Call_Using_Secondary_Stack): Add missing
1631 support to handle selected components.
1632 * sem_ch6.ads (Cannot_Inline): Adding parameter Is_Serious plus
1634 * sem_ch6.adb (Check_And_Build_Body_To_Inline): New
1635 subprogram which implements the checks required by the
1636 new rules for frontend inlining and builds the body to inline.
1637 (Analyze_Subprogram_Body_Helper): Move code that
1638 checks inlining of subprogram that has nested subprogram
1639 to Check_And_Build_Body_To_Inline. Replace call to
1640 Build_Body_To_Inline by call to the new subprogram
1641 Check_And_Build_Body_To_Inline.
1642 (Cannot_Inline): New implementation.
1643 * sem_ch12.adb (Analyze_Package_Instantiation.Must_Inline_Subp):
1645 * sem_util.ad[sb] (Must_Inline): New subprogram.
1646 (Returns_Unconstrained_Type): New subprogram.
1647 * sem_res.adb (Resolve_Call): Do not create a transient scope
1649 * inline.ads (Analyzing_Inlined_Bodies): Remove unreferenced variable.
1650 * inline.adb (Analyze_Inlined_Bodies, Initialize): Remove setting
1651 to false the variable Analyzing_Inlined_Bodies. Fix comments.
1652 * exp_ch4.adb (Expand_N_Allocator): Fix handling of finalization master.
1653 * exp_ch6.ads (List_Inlining_Info): New subprogram.
1654 * exp_ch6.adb (Expand_Call.Do_Inline): New subprogram.
1655 (Expand_Call.Do_Inline_Always): New subprogram.
1656 (In_Unfrozen_Instance): Move the declaration of this subprogram.
1657 (Expand_Inlined_Call.Reset_Dispatching_Calls): New subprogram.
1658 (Expand_Inlined_Call): Adding new support for inlining functions
1659 that return unconstrained types.
1660 (List_Inlining_Info): New subprogram.
1661 * debug.adb Document flags -gnatd.j and -gnatd.k
1662 * gnat1drv.adb Add call to generate the new listing of inlined
1663 calls and calls passed to the backend.
1665 2012-03-07 Robert Dewar <dewar@adacore.com>
1667 * sem_ch5.adb, s-vaflop.adb, s-taprop-vms.adb, exp_ch6.adb,
1668 s-gearop.adb, sem_ch6.adb, g-trasym.adb: Minor reformatting.
1670 2012-03-07 Javier Miranda <miranda@adacore.com>
1672 * a-ngrear.ads: Add documentation.
1674 2012-03-07 Tristan Gingold <gingold@adacore.com>
1676 * s-taprop-vms.adb (Create_Task): set thread name.
1677 * s-osinte-vms.ads (pthread_attr_setname_np): Declare.
1679 2012-03-07 Arnaud Charlet <charlet@adacore.com>
1681 * g-trasym.adb: Minor reformatting.
1683 2012-03-07 Robert Dewar <dewar@adacore.com>
1685 * a-ngrear.ads: Minor addition of ??? comment.
1687 2012-03-07 Gary Dismukes <dismukes@adacore.com>
1689 * exp_ch4.adb (Apply_Accessibility_Check): Call
1690 Remove_Side_Effects in the build-in-place case, to ensure that
1691 we capture the call and don't end up with two calls.
1693 2012-03-07 Javier Miranda <miranda@adacore.com>
1695 * exp_ch6.adb (Expand_Inlined_Call): Skip inlining of functions
1696 that return unconstrained types using an extended return statement
1697 since the support for inlining these functions has not been yet
1698 added to the frontend.
1699 * s-vaflop.adb, s-vaflop-vms-alpha.adb: Code reorganization.
1700 * a-ngrear.ads: Replace all the Inline_Always pragmas by pragma
1702 * a-ngrear.adb (Eigenvalues, Transpose): Restructured to use
1703 extended return statement.
1704 * a-strsup.adb, a-stzsup.adb, a-stwisu.adb (Concat, Super_Slice,
1705 Super_To_String): Restructured to use extended return statement.
1706 * a-chahan.adb (To_Basic, To_Lower, To_Upper): Restructured to
1707 use extended return statement.
1708 * s-gearop.adb (Diagonal, Matrix_Elementwise_Operation,
1709 Vector_Elementwise_Operation, Matrix_Elementwise_Operation,
1710 Matrix_Matrix_Scalar_Elementwise_Operation,
1711 Vector_Vector_Elementwise_Operation,
1712 Vector_Vector_Scalar_Elementwise_Operation,
1713 Matrix_Scalar_Elementwise_Operation,
1714 Vector_Scalar_Elementwise_Operation,
1715 Scalar_Matrix_Elementwise_Operation,
1716 Scalar_Vector_Elementwise_Operation, Matrix_Matrix_Product,
1717 Matrix_Vector_Product, Outer_Product, Unit_Matrix, Unit_Vector,
1718 Vector_Matrix_Product): Restructured to use extended return
1721 2012-03-07 Vincent Pucci <pucci@adacore.com>
1723 * sem_ch5.adb (One_Bound): Minor reformatting.
1725 2012-03-07 Tristan Gingold <gingold@adacore.com>
1727 * s-osinte-vms-ia64.adb, s-osinte-vms-ia64.ads, s-osinte-vms.adb,
1728 s-osinte-vms.ads, gcc-interface/Makefile.in: Merge s-osinte-vms and
1731 2012-03-07 Ed Schonberg <schonberg@adacore.com>
1733 * checks.adb (Apply_Predicate_Check): Do not generate a predicate
1734 check is the context is an internally generated type-specific
1736 * sem_ch6.adb (Process_PPCs); the formals of internally generated
1737 type-specific functions do not get assertion checks.
1739 2012-03-07 Yannick Moy <moy@adacore.com>
1741 * gnat_rm.texi: Minor renaming of title.
1742 * gnat_ugn.texi: Minor correction.
1744 2012-03-07 Vincent Pucci <pucci@adacore.com>
1746 * exp_ch4.adb (Expand_N_Quantified_Expression): Minor
1748 * sem_ch4.adb (Analyze_Quantified_Expression): Creation and
1749 analysis of the iteration scheme added in all cases.
1750 * sem_ch5.adb (Analyze_Iteration_Scheme): Minor reformating.
1751 (Analyze_Iterator_Specification): Minor reformating.
1752 * sem_res.adb (Resolve_Quantified_Expression): Resolution of
1753 the condition added in all cases.
1755 2012-03-07 Thomas Quinot <quinot@adacore.com>
1757 * einfo.adb, einfo.ads: Add flag Reverse_Storage_Order.
1759 2012-03-07 Yannick Moy <moy@adacore.com>
1761 * gnat_rm.texi, gnat_ugn.texi: Rewording of GNAT UG and GNAT RM to
1762 account for Ada 2012 assertions, and their pragma counterparts in GNAT.
1764 2012-03-07 Thomas Quinot <quinot@adacore.com>
1766 * exp_attr.adb, sem_attr.adb: Minor reformatting.
1768 2012-03-07 Bob Duff <duff@adacore.com>
1770 * hostparm.ads (Max_Instantiations): Increase parameter.
1772 2012-03-07 Bob Duff <duff@adacore.com>
1774 * par-prag.adb: Minor code rearrangement.
1776 2012-03-07 Bob Duff <duff@adacore.com>
1778 * a-strsup.ads, a-stwisu.ads, a-stzsup.ads (Super_String):
1779 Remove default initial value for Data. It is no longer needed
1780 because "=" now composes properly for untagged records. This
1781 default has caused efficiency problems.
1783 2012-03-07 Ed Schonberg <schonberg@adacore.com>
1785 * sem_res.adb (Resolve_Actuals): If the actual is a selected
1786 component of an anonymous access type, whose prefix is a variable,
1787 treat the variable as if it may be modified by the call, to
1788 suppress spurious warnings that a variable might be declared as
1791 2012-03-07 Thomas Quinot <quinot@adacore.com>
1793 * einfo.adb, einfo.ads: Remove unused entity flags.
1795 2012-03-07 Eric Botcazou <ebotcazou@adacore.com>
1797 * gnat_ugn.texi (Inline Assembler): Fix swapping of Input and
1798 Output operands throughout.
1800 2012-03-07 Hristian Kirtchev <kirtchev@adacore.com>
1802 * sem_ch12.adb (Earlier): When two nodes come from the same
1803 generic instantiation, compare their locations. Otherwise always
1804 use the top level locations of the nodes.
1806 2012-03-07 Thomas Quinot <quinot@adacore.com>
1808 * einfo.ads, sem_prag.adb: Minor reformatting.
1810 2012-03-05 Jason Merrill <jason@redhat.com>
1812 * gcc-interface/Make-lang.in (doc/gnat_ugn.texi): Build xgnatugn
1815 2012-03-04 Eric Botcazou <ebotcazou@adacore.com>
1817 * gnatvsn.ads (Library_Version): Bump to 4.8.
1819 2012-03-03 H.J. Lu <hongjiu.lu@intel.com>
1821 * init.c (__gnat_adjust_context_for_raise): Also check
1822 "orq $0x0,(%esp)" for x32.
1824 * link.c (__gnat_default_libgcc_subdir): Set to libx32 for x32.
1826 * gcc-interface/Makefile.in (arch): Set to x32 if MULTISUBDIR
1827 is /x32 and add support for x32.
1829 2012-02-29 Eric Botcazou <ebotcazou@adacore.com>
1831 * gcc-interface/decl.c (components_to_record): Add ARTIFICIAL parameter
1832 and set TYPE_ARTIFICIAL according to it. Adjust recursive call.
1833 (gnat_to_gnu_entity) <E_Record_Type>: Adjust call to above function.
1834 * gcc-interface/utils.c (rest_of_record_type_compilation): Do not
1835 invoke rest_of_type_decl_compilation on the parallel type, if any.
1837 2012-02-29 Eric Botcazou <ebotcazou@adacore.com>
1839 * gcc-interface/utils.c (gnat_write_global_declarations): Make sure the
1840 dummy global built for global types is preserved.
1842 2012-02-27 Tristan Gingold <gingold@adacore.com>
1844 * gcc-interface/decl.c (gnat_to_gnu_entity) [E_String_Type,
1845 E_Array_Type]: Reuse dummy fat type for gnu_ptr_template and
1848 2012-02-27 Eric Botcazou <ebotcazou@adacore.com>
1850 * gcc-interface/ada-tree.h (TYPE_PACKED_ARRAY_TYPE_P): Add checking.
1851 (TYPE_BY_REFERENCE_P): New flag.
1852 (TYPE_IS_BY_REFERENCE_P): New macro.
1853 (TYPE_DUMMY_P): Add checking and remove VOID_TYPE.
1854 (TYPE_IS_DUMMY_P): Adjust for above change.
1855 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_BY_REFERENCE_P
1856 and TYPE_IS_BY_REFERENCE_P instead of TREE_ADDRESSABLE.
1857 (gnat_to_gnu_param): Likewise.
1858 (maybe_pad_type): Likewise.
1859 (make_type_from_size): Use TYPE_IS_PACKED_ARRAY_TYPE_P.
1860 * gcc-interface/misc.c (must_pass_by_ref): Use TYPE_IS_BY_REFERENCE_P
1861 instead of TREE_ADDRESSABLE.
1862 * gcc-interface/trans.c (finalize_nrv): Likewise.
1863 (call_to_gnu): Likewise. Do not create a temporary for return values
1864 with by-reference type here.
1865 (gnat_to_gnu): Test TYPE_IS_DUMMY_P instead of TYPE_DUMMY_P.
1866 (gnat_gimplify_expr) <ADDR_EXPR>: Don't do anything for non-constant
1867 CONSTRUCTORs and calls.
1868 * gcc-interface/utils.c (make_dummy_type): Get the equivalent type of
1869 the underlying type and use it throughout. Use TYPE_IS_BY_REFERENCE_P
1870 instead of TREE_ADDRESSABLE.
1871 * gcc-interface/utils2.c (build_cond_expr): Deal with by-reference
1874 2012-02-27 Eric Botcazou <ebotcazou@adacore.com>
1876 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Revert previous
1877 change that creates a special VAR_DECL for debugging purposes. For an
1878 aliased object with an unconstrained nominal subtype, make its type a
1879 thin reference to the underlying object.
1880 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Deal with
1881 expressions built for the initialization of above objects.
1883 2012-02-24 Dave Korn <dave.korn.cygwin@gmail.com>
1885 * gcc-interface/Makefile.in (WIN_SO_PREFIX [windows targets]): New
1886 Windows-specific make variable.
1887 (WIN_SO_INSTALL_DIR [windows targets]): Likewise.
1888 (install-gnatlib): Respect the above during installation when set,
1889 and also install any windows import library that has been built.
1890 (gnatlib-shared-win32): Use WIN_SO_PREFIX to name output DLL and also
1891 build a corresponding import library.
1893 2012-02-22 Robert Dewar <dewar@adacore.com>
1895 * exp_util.adb, make.adb, sem_dim.adb, sem_ch4.adb, exp_disp.adb: Minor
1898 2012-02-22 Geert Bosch <bosch@adacore.com>
1900 * g-bytswa-x86.adb, g-bytswa.adb, gcc-interface/Makefile.in: Remove
1901 x86-specific version of byteswap and use GCC builtins instead.
1903 2012-02-22 Tristan Gingold <gingold@adacore.com>
1905 * gcc-interface/decl.c (gnat_to_gnu_entity) [E_String_Type,
1906 E_Array_Type]: Translate component ealier.
1908 2012-02-22 Robert Dewar <dewar@adacore.com>
1910 * par-ch3.adb (P_Signed_Integer_Type_Definition): Specialize
1911 error message for 'Range.
1913 2012-02-22 Pascal Obry <obry@adacore.com>
1915 * s-taprop-mingw.adb (Finalize_TCB): Do not wait on thread handle as
1916 this is our own thread.
1918 2012-02-22 Sergey Rybin <rybin@adacore.com frybin>
1920 * tree_io.ads: Update ASIS_Version_Number because of the changes
1923 2012-02-22 Hristian Kirtchev <kirtchev@adacore.com>
1925 * exp_ch7.adb (Create_Finalizer): Suppress elaboration checks on
1926 stack-related finalizers.
1928 2012-02-22 Ed Schonberg <schonberg@adacore.com>
1930 * sem_ch6.adb (Analyze_Expression_Function): If the construct
1931 is a completion, indicate that its formals are the formals of
1932 a completion, and as such do not get a cross- reference entry.
1933 (Analyze_Subprogram_Specification): Do not generate a definition
1934 for the entity of an expression function, because it may be a
1935 completion. Definition will be generated if needed when analyzing
1936 the generated subprogram declaration.
1938 2012-02-22 Vincent Celier <celier@adacore.com>
1940 * make.adb (Check): When checking if an object file is in the
1941 correct object directory, get the unit name from a previous call
1942 to Check_Source_Info_In_ALI.
1943 * makeutl.adb (Check_Source_Info_In_ALI): Return the name of
1944 the unit when everything is OK, otherwise return No_Name.
1945 * makeutl.ads (Check_Source_Info_In_ALI): Return Name_Id instead
1948 2012-02-22 Ed Schonberg <schonberg@adacore.com>
1950 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): In an
1951 instance, the operator is visible if an operand is of some
1952 numeric type which is not in use or directly visible, and the
1953 other operand is a numeric literal.
1955 2012-02-22 Tristan Gingold <gingold@adacore.com>
1957 * init.c: Minor code clean up.
1958 * gcc-interface/Make-lang.in: Update dependencies.
1960 2012-02-22 Arnaud Charlet <charlet@adacore.com>
1962 * gnatlink.adb (Gnatlink): Use -gnatcC in CodePeer_Node,
1963 otherwise GCC will generate an object file.
1965 2012-02-22 Vincent Celier <celier@adacore.com>
1967 * projects.texi: Correct typo related to "**" in Source_Dirs.
1969 2012-02-22 Steve Baird <baird@adacore.com>
1971 * sem_prag.adb (Analyze_PPC_In_Decl_Part): Clean up generation of
1974 2012-02-22 Vincent Pucci <pucci@adacore.com>
1976 * rtsfind.adb (Get_Unit_Name): Ada_Numerics_Child and
1977 System_Dim_Child cases added.
1978 * rtsfind.ads: Ada_Numerics,
1979 Ada_Numerics_Generic_Elementary_Functions, System_Dim,
1980 System_Dim_Float_IO and System_Dim_Integer_IO added to the list
1981 of RTU_Id. Ada_Numerics_Child and System_Dim_Child added as
1982 new RTU_Id subtypes.
1983 * sem_dim.adb (Is_Dim_IO_Package_Entity): Use of
1984 Rtsfind to verify the package entity is located either
1985 in System.Dim.Integer_IO or in System.Dim.Float_IO.
1986 (Is_Dim_IO_Package_Instantiation): Minor
1987 changes. (Is_Elementary_Function_Call): Removed.
1988 (Is_Elementary_Function_Entity): New routine.
1989 (Is_Procedure_Put_Call): Is_Dim_IO_Package_Entity call added.
1990 * snames.ads-tmpl: Name_Dim and Name_Generic_Elementary_Functions
1993 2012-02-22 Vincent Pucci <pucci@adacore.com>
1995 * sem_prag.adb: Minor reformatting.
1997 2012-02-22 Ed Schonberg <schonberg@adacore.com>
1999 * sem_ch3.adb (Find_Type_Name): When analyzing a private type
2000 declaration that is the completion of a tagged incomplete type, do
2001 not associate the class-wide type already created with the private
2002 type to prevent order-of-elaboration issues in the back-end.
2003 * exp_disp.adb (Find_Specific_Type): Find specific type of
2004 a class-wide type, and handle the case of an incomplete type
2005 coming either from a limited_with clause or from an incomplete
2006 type declaration. Used when expanding a dispatchin call and
2007 generating tag checks (minor refactoring).
2009 2012-02-22 Robert Dewar <dewar@adacore.com>
2011 * exp_ch5.adb: Add comment.
2012 * sem_ch12.adb, exp_ch6.adb: minor reformatting
2014 2012-02-22 Ed Schonberg <schonberg@adacore.com>
2016 * freeze.adb (Freeze_Entity): Do not perform type layout within
2019 2012-02-22 Eric Botcazou <ebotcazou@adacore.com>
2021 * init.c (__gnat_error_handler) [Linux]: Map SIGBUS to
2024 2012-02-22 Ed Schonberg <schonberg@adacore.com>
2026 * exp_ch5.adb (Expand_N_Assignment_Statement): Reject an
2027 assignment to a classwide type whose type is limited, as
2028 can happen in an instantiation in programs that run afoul or
2031 2012-02-17 Ed Schonberg <schonberg@adacore.com>
2033 * exp_ch6.adb (Legal_Copy): If layout is not
2034 determined in the front-end, do not emit error message when
2035 by-reference actual is potentially unaligned.
2036 * gcc-interface/decl.c (gnat_to_gnu_field): Better error message for
2037 illegal representation clause on tagged or aliased component, or on
2038 by-reference type with forced alignment.
2040 2012-02-17 Nicolas Roche <roche@adacore.com>
2042 * gcc-interface/Makefile.in: Ensure FORCE_DEBUG_ADAFLAGS variables is
2043 propagated by gnatlib-sjlj and gnatlib-zcx targets.
2044 * gcc-interface/Make-lang.in: Update dependencies.
2046 2012-02-17 Thomas Quinot <quinot@adacore.com>
2048 * sem_ch12.adb (Analyze_Package_Instantiation): For an
2049 instantiation in an RCI library unit, omit the instance body
2050 if the RCI library unit is the instance itself (E.2.3(18)),
2051 but include the body if the instantiation is within the RCI
2052 declaration (12.3(12)).
2054 2012-02-17 Steve Baird <baird@adacore.com>
2056 * sem_prag.adb (Analyze_PPC_In_Decl_Part): Pre'Class and
2057 Post'Class aspects can only be specified for a primitive operation
2060 2012-02-17 Yannick Moy <moy@adacore.com>
2062 * gnat_rm.texi: Minor shuffling.
2064 2012-02-17 Ed Schonberg <schonberg@adacore.com>
2066 * aspects.adb: Expression functions can carry pre/postconditions.
2067 * par-ch6.adb (P_Subprogram): look for optional pre/postconditions
2068 in an expression function.
2069 * sem_prag (Check_Precondition_Postcondition): legal on expression
2072 2012-02-17 Vincent Pucci <pucci@adacore.com>
2074 * a-cdlili.adb, a-cidlli.adb, a-cihama.adb, a-cimutr.adb,
2075 * a-ciorma.adb, a-cohama.adb, a-coinve.adb, a-comutr.adb,
2076 * a-convec.adb, a-coorma.adb (Adjust): New routine.
2077 (Constant_Reference): Increment Busy and Lock counters.
2078 (Reference): Increase Busy and Lock counters.
2079 (Finalize): New routine.
2080 * a-cihase.adb, a-ciorse.adb, a-cohase.adb, a-coorse.adb:
2081 (Adjust): New routine. (Constant_Reference): Increment Busy
2083 (Finalize): New routine.
2084 * a-cdlili.ads, a-cidlli.ads, a-cihama.ads, a-cihase.ads,
2085 * a-cimutr.ads, a-ciorma.ads, a-ciorse.ads, a-cohama.ads,
2086 * a-cohase.ads, a-coinve.ads, a-comutr.ads, a-convec.ads,
2087 * a-coorma.ads, a-coorse: Controlled component added to the
2090 2012-02-17 Robert Dewar <dewar@adacore.com>
2092 * restrict.adb (Check_Restriction): Add special handling for
2093 No_Obsolescent_Features.
2095 2012-02-17 Hristian Kirtchev <kirtchev@adacore.com>
2097 * exp_util.adb (Find_Finalize_Address): When dealing with an
2098 internally built full view for a type with unknown discriminants,
2099 use the original record type.
2101 2012-02-17 Robert Dewar <dewar@adacore.com>
2103 * sem_dim.adb: Minor reformatting.
2105 2012-02-17 Yannick Moy <moy@adacore.com>
2107 * gnat_rm.texi: Minor rewording.
2109 2012-02-17 Thomas Quinot <quinot@adacore.com>
2111 * sem_aggr.adb: Minor reformatting.
2113 2012-02-17 Robert Dewar <dewar@adacore.com>
2115 * gnat_ugn.texi: Update doc for -gnatw.m to include 2*x case.
2117 2012-02-17 Vincent Pucci <pucci@adacore.com>
2119 * sem_dim.adb (Is_Dim_IO_Package_Entity): New routine.
2120 (Is_Dim_IO_Package_Instantiation): Is_Dim_IO_Package_Entity
2122 (Is_Procedure_Put_Call): Is_Dim_IO_Package_Entity
2124 * s-dim.ads: Make package Pure.
2126 2012-02-17 Gary Dismukes <dismukes@adacore.com>
2128 * prj-nmsc.adb: Minor reformatting.
2130 2012-02-17 Yannick Moy <moy@adacore.com>
2132 * gnat_rm.texi: Update GNAT RM with a separate chapter on restrictions.
2134 2012-02-17 Yannick Moy <moy@adacore.com>
2136 * gnat_ugn.texi: Fix typos.
2138 2012-02-17 Pascal Obry <obry@adacore.com>
2140 * prj-nmsc.adb: prj-nmsc.adb (Check_Aggregated): Check that an
2141 aggregate is not Externally_Built.
2143 2012-02-17 Ed Schonberg <schonberg@adacore.com>
2145 * sem_aggr.adb (Resolve_Record_Aggregate): If a composite
2146 component has a box association, copy the default value using
2147 the current scope as the scope of internal types, to prevent
2148 scoping anomalies in gigi.
2150 2012-02-17 Robert Dewar <dewar@adacore.com>
2152 * sem_dim.adb, sem_dim.ads, s-tasren.adb, prj.adb, prj.ads, freeze.adb,
2153 sem_res.adb, exp_ch4.adb, sinput.adb, sinput.ads, exp_aggr.adb,
2154 exp_intr.adb, s-os_lib.adb: Minor reformatting.
2156 2012-02-17 Ed Schonberg <schonberg@adacore.com>
2158 * sem_ch6.adb (Is_Non_Overriding_Operation): Add warning if the
2159 old operation is abstract, the relevant type is not abstract,
2160 and the new subprogram fails to override.
2162 2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
2164 * gcc-interface/trans.c (Identifier_to_gnu): Move block retrieving the
2165 type of the result to the end and execute it for a deferred constant of
2166 a discriminated type whose full view can be elaborated statically.
2168 2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
2170 * gcc-interface/trans.c (gnat_to_gnu) <N_Qualified_Expression>: If the
2171 type is tagged, mark it as used for debugging purposes.
2172 <N_Allocator>: Likewise for a qualified expression.
2174 2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
2176 * gcc-interface/trans.c (call_to_gnu): Create the temporary for the
2177 return value in the by-reference return type case if this isn't the
2178 expression of an object declaration. Tidy up.
2180 2012-02-09 Tristan Gingold <gingold@adacore.com>
2182 * gcc-interface/Makefile.in: Remove .sym rule (not used).
2183 Remove adamsg.o object (requires native message compiler).
2184 * init.c (CMA$_EXIT_THREAD, MTH$_FLOOVEMAT, SS$_INTDIV): Define as a
2185 macro instead of as extern int.
2186 (ADA$_ALREADY_OPEN, ADA$_CONSTRAINT_ERRO, ADA$_DATA_ERROR)
2187 (ADA$_DEVICE_ERROR, ADA$_END_ERROR, ADA$_FAC_MODE_MISMAT)
2188 (ADA$_IOSYSFAILED, ADA$_KEYSIZERR, ADA$_KEY_MISMATCH)
2189 (ADA$_LAYOUT_ERROR, ADA$_LINEXCMRS, ADA$_MAXLINEXC)
2190 (ADA$_MODE_ERROR, ADA$_MRN_MISMATCH, ADA$_MRS_MISMATCH)
2191 (ADA$_NAME_ERROR, ADA$_NOT_OPEN, ADA$_ORG_MISMATCH)
2192 (ADA$_PROGRAM_ERROR, ADA$_RAT_MISMATCH, ADA$_RFM_MISMATCH)
2193 (ADA$_STAOVF, ADA$_STATUS_ERROR, ADA$_STORAGE_ERROR)
2194 (ADA$_UNSUPPORTED, ADA$_USE_ERROR): Likewise.
2195 (struct cond_except): Field cond is now an unsigned int.
2196 (dec_ada_cond_except_table): Adjust.
2197 (cond_except_table): Likewise.
2198 (cond_resignal_table): Likewise.
2199 (__gnat_default_resignal_p): Fix style.
2201 2012-02-08 Vincent Celier <celier@adacore.com>
2203 * gcc-interface/Make-lang.in: Add g-byorma.o to gnatbind objects
2204 (g-buorma is now imported by sinput).
2205 Update dependencies.
2206 * scn.adb (Initialize_Scanner): Call Check_For_BOM
2207 * sinput-p.adb (Source_File_Is_Subunit): Call Check_For_BOM
2208 * sinput.adb: New procedure Check_For_BOM
2209 * sinput.ads: New procedure Check_For_BOM
2211 2012-02-08 Vincent Pucci <pucci@adacore.com>
2213 * impunit.adb: Dimension package names updated
2214 * Makefile.rtl: s-dim added
2215 * sem_dim.adb (Is_Procedure_Put_Call): minor changes
2216 (Is_Dim_IO_Package_Instantiation): minor changes
2217 * sem_dim.ads: minor changes in comments
2218 * snames.ads-tmpl: Name_Dim added Name_Dim_Float_IO and
2219 Name_Dim_Integer_IO removed
2220 * s-dim.ads: New package. Define the dimension terminology.
2221 * s-diflio.adb, s-diinio.adb, s-dimkio.ads, s-dimmks.ads,
2222 * s-dmotpr.ads: Package names updated.
2223 * s-diflio.ads, s-diinio.ads: Documentation added and package
2226 2012-02-08 Gary Dismukes <dismukes@adacore.com>
2228 * gcc-interface/utils2.c (build_call_alloc_dealloc_proc): Revise test
2229 for storage pools to test for an underlying record type rather than
2230 testing Is_Tagged_Type, so that simple storage pools will be handled
2231 the same as normal Ada storage pools.
2233 2012-02-08 Yannick Moy <moy@adacore.com>
2235 * gnat_rm.texi: Minor reshuffling to place restriction at
2238 2012-02-08 Bob Duff <duff@adacore.com>
2240 * warnsw.adb (Set_Warning_Switch): Set Warn_On_Suspicious_Modulus_Value
2241 False for '-gnatwA', to suppress these warnings.
2243 2012-02-08 Vincent Celier <celier@adacore.com>
2245 * sinput-p.adb (Source_File_Is_Subunit): Check for BOM before
2246 starting to scan, so that UTF8 encoding is taken into account.
2248 2012-02-08 Arnaud Charlet <charlet@adacore.com>
2250 * s-tasren.adb, s-tasren.ads (Internal_Complete_Rendezvous): New
2252 (Complete_Rendezvous): Now call Internal_Complete_Rendezvous.
2253 (Exceptional_Complete_Rendezvous): Mark No_Return.
2255 2012-02-08 Eric Botcazou <ebotcazou@adacore.com>
2257 * exp_aggr.adb (Compile_Time_Known_Composite_Value):
2258 New predicate to compute whether a composite value can be
2259 evaluated at compile time.
2260 (Component_Not_OK_For_Backend): Use Compile_Time_Known_Value for all
2261 expressions of elementary type and Compile_Time_Known_Composite_Value
2262 for all other expressions.
2263 (Expand_Record_Aggregate): Convert to assignments in the case
2264 of a type with mutable components if the aggregate cannot be
2267 2012-02-08 Gary Dismukes <dismukes@adacore.com>
2269 * aspects.ads (type Aspect_Id): Add Simple_Storage_Pool_Type.
2270 (Impl_Defined_Aspects): Add association for
2271 Aspect_Simple_Storage_Pool_Type.
2273 association for Aspect_Simple_Storage_Pool_Type.
2275 (Canonical_Aspect): Add association for Simple_Storage_Pool_Type.
2276 * exp_attr.adb (Expand_N_Attribute_Reference):
2277 Change name to Name_Simple_Storage_Pool_Type.
2278 * exp_ch4.adb (Expand_N_Allocator): Change
2279 name to Name_Simple_Storage_Pool_Type.
2280 * exp_intr.adb (Expand_Unc_Deallocation): Change name to
2281 Name_Simple_Storage_Pool_Type. * freeze.adb (Freeze_Entity):
2282 Change names to Name_Simple_Storage_Pool_Type. * par-prag.adb:
2283 Change names to Name_Simple_Storage_Pool_Type. * sem_attr.adb:
2284 (Analyze_Attribute): Change name to Name_Simple_Storage_Pool_Type.
2285 * sem_ch13.adb (Analyze_Attribute_Definition_Clause):
2286 Change name to Name_Simple_Storage_Pool_Type.
2288 (Analyze_Pragma): Change name to Name_Simple_Storage_Pool_Type.
2289 (Sig_Flags): Change name to Name_Simple_Storage_Pool_Type.
2290 * sem_res.adb (Resolve_Allocator): Change name to
2291 Name_Simple_Storage_Pool_Type. * snames.ads-tmpl:
2292 (Name_Simple_Storage_Pool_Type): New name constant.
2293 (type Pragma_Id): Change name to Name_Simple_Storage_Pool_Type and
2294 move to main pragma section because it no longer matches the
2296 * snames.adb-tmpl (Get_Pragma_Id): Remove test for
2297 Name_Simple_Storage_Pool.
2298 (Is_Pragma_Name): Remove test for Name_Simple_Storage_Pool.
2300 2012-02-08 Robert Dewar <dewar@adacore.com>
2302 * gnat_ugn.texi: Add some clarification to -gnatwA and -gnatws.
2304 2012-02-08 Pascal Obry <obry@adacore.com>
2306 * prj.adb (Compute_All_Imported_Projects): Use new
2307 For_Project_And_Aggregated_Context to ensure proper context is
2308 used for encapsulated aggregate libraries.
2309 * prj-proc.adb (Recursive_Process): Call
2310 Process_Aggregated_Projects earlier to ensure that all dependent
2311 projects are set with the proper encapsulated status.
2313 2012-02-08 Pascal Obry <obry@adacore.com>
2315 * s-os_lib.adb (Normalize_Arguments): Properly escape last \ in null
2318 2012-02-08 Pascal Obry <obry@adacore.com>
2320 * prj.ads, prj.adb (For_Project_And_Aggregated_Context): New
2321 generic routine with a context parameter.
2323 2012-02-08 Robert Dewar <dewar@adacore.com>
2325 * a-coinve.adb, sem_util.adb, sem_ch8.adb, a-cobove.adb,
2326 a-convec.adb: Minor reformatting and code reorganization.
2328 2012-02-08 Steve Baird <baird@adacore.com>
2330 * sem_cat.adb (In_Preelaborated_Unit): A child
2331 unit instantiation does not inherit preelaboration requirements
2334 2012-02-08 Gary Dismukes <dismukes@adacore.com>
2336 * aspects.ads (type Aspect_Id): Add Aspect_Simple_Storage_Pool.
2337 (Impl_Defined_Aspects): Add entry for Aspect_Simple_Storage_Pool.
2338 (Aspect_Argument): Add Name entry for Aspect_Simple_Storage_Pool.
2339 (Aspect_Names): Add entry for Aspect_Simple_Storage_Pool.
2340 * aspects.adb (Canonical_Aspect): Add entry for
2341 Aspect_Simple_Storage_Pool.
2342 * exp_attr.adb (Expand_N_Attribute_Reference): Handle case of
2343 Attribute_Simple_Storage_Pool in the same way as Storage_Pool
2344 (add conversion, analyze/resolve). For the Storage_Size attribute,
2345 for the simple pool case, locate and use the simple pool type's
2346 Storage_Size function (if any), otherwise evaluate to zero.
2347 * exp_ch4.adb (Expand_N_Allocator): In the case of an allocator
2348 for an access type with an associated simple storage pool,
2349 locate and use the pool type's Allocate.
2350 * exp_intr.adb (Expand_Unc_Deallocation): In the case where the
2351 access type has a simple storage pool, locate the pool type's
2352 Deallocate procedure (if present) and use it as the procedure
2353 to call on the Free operation.
2354 * freeze.adb (Freeze_Entity): In the case of a full type for
2355 a private type defined with pragma Simple_Storage_Pool, check
2356 that the full type is also appropriate for the pragma. For
2357 a simple storage pool type, validate that the operations
2358 Allocate, Deallocate (if present), and Storage_Size
2359 (if present) are defined with appropriate expected profiles.
2360 (Validate_Simple_Pool_Op_Formal): New procedure
2361 (Validate_Simple_Pool_Operation): New procedure Add with and
2363 * par-prag.adb: Add Pragma_Simple_Storage_Pool to case statement
2364 (no action required).
2365 * sem_attr.adb (Analyze_Attribute): For the case of the
2366 Storage_Pool attribute, give a warning if the prefix type has an
2367 associated simple storage pool, and rewrite the attribute as a
2368 raise of Program_Error. In the case of the Simple_Storage_Pool
2369 attribute, check that the prefix type has an associated simple
2370 storage pool, and set the attribute type to the pool's type.
2371 * sem_ch13.adb (Analyze_Aspect_Specifications): Add
2372 Aspect_Simple_Storage_Pool case choice.
2373 (Analyze_Attribute_Definition_Clause): Add
2374 Aspect_Simple_Storage_Pool to case for Ignore_Rep_Clauses
2375 (no action). Add handling for Simple_Storage_Pool attribute
2376 definition, requiring the name to denote a simple storage pool
2378 (Check_Aspect_At_Freeze_Point): For a simple storage pool
2379 aspect, set the type to that of the name specified for the aspect.
2380 * sem_prag.adb (Analyze_Pragma): Add handling for pragma
2381 Simple_Storage_Pool, requiring that it applies to a library-level
2382 type declared in a package declaration that is a limited private
2383 or limited record type.
2384 * sem_res.adb (Resolve_Allocator): Flag an attempt to call a
2385 build-in-place function in an allocator for an access type with
2386 a simple storage pool as unsupported.
2387 * snames.ads-tmpl: Add Name_Simple_Storage_Pool.
2388 (type Attribute_Id): Add Attribute_Simple_Storage_Pool.
2389 (type Pragma_Id): Add Pragma_Simple_Storage_Pool.
2390 * snames.adb-tmpl (Get_Pragma_Id): Handle case of
2391 Name_Simple_Storage_Pool.
2392 (Is_Pragma_Name): Return True for Name_Simple_Storage_Pool.
2394 2012-02-08 Cyrille Comar <comar@adacore.com>
2396 * projects.texi: Clarify doc for interfaces.
2398 2012-02-07 Eric Botcazou <ebotcazou@adacore.com>
2400 * gcc-interface/Make-lang.in (GCC_LINKERFLAGS): New variable.
2403 2012-02-01 Tristan Gingold <gingold@adacore.com>
2405 * gcc-interface/trans.c (Loop_Statement_to_gnu): Use sizetype
2406 instead of size_type_node.
2408 2012-01-30 Nicolas Roche <roche@adacore.com>
2410 * gcc-interface/Make-lang.in: Update dependencies.
2411 * gcc-interface/Makefile.in: Use system-vxworks-system-ppc-mils.ads
2413 Remove Linker_Options -crtbe when building sjlj run-time.
2415 2012-01-30 Robert Dewar <dewar@adacore.com>
2417 * sem.adb (Analyze): Call Analyze_Mod for N_Op_Mod mode.
2418 * sem_ch3.adb (Modular_Type_Declaration): Warn on mod value of
2419 form 2 * small-literal.
2420 * sem_ch4.adb (Analyze_Mod): New procedure (warn on suspicious
2422 * sem_ch4.ads (Analyze_Mod): New procedure.
2424 2012-01-30 Ed Schonberg <schonberg@adacore.com>
2426 * sem_ch6.adb: sem_ch6.adb (Analyze_Expression_Function): Copy
2427 types and return expression when building spec for implicit
2428 body, to preserve global references that may be present in an
2431 2012-01-30 Matthew Heaney <heaney@adacore.com>
2433 * a-convec.adb, a-coinve.adb, a-cobove.adb (Sort,
2434 Reverse_Elements): Check for cursor tampering.
2436 2012-01-30 Ed Schonberg <schonberg@adacore.com>
2438 * sem_util.adb (Is_Fully_Initialized_Type): In Ada 2012, a
2439 type with aspect Default_Value or Default_Component_Value is
2440 fully initialized, and use of variables of such types do not
2443 2012-01-30 Javier Miranda <miranda@adacore.com>
2446 * sem_ch8.adb (Analyze_Subprogram_Renaming):
2447 Handle self-renaming when the renamed entity is referenced using
2450 2012-01-30 Vincent Celier <celier@adacore.com>
2452 * projects.texi: Add documentation for attribute Interfaces.
2454 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
2456 * exp_ch7.adb (Build_Finalizer_Call): Set loc again.
2457 * exp_ch11.adb (Expand_At_End_Handler): Do not provide a source
2458 location for the wrapped call to the original AT_END routine
2459 and the subsequent return statement.
2461 2012-01-30 Pascal Obry <obry@adacore.com>
2463 * s-rannum.adb: Minor reformatting.
2465 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
2467 * a-calend-vms.adb, a-calend.adb: Increment the number of leap seconds
2468 to 25 and add the hard time value for 2012-06-30.
2470 2012-01-30 Robert Dewar <dewar@adacore.com>
2472 * a-strhas.ads, einfo.adb, einfo.ads, exp_ch7.adb, exp_ch9.adb,
2473 freeze.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-proc.adb, s-llflex.ads,
2474 s-ransee.adb, s-ransee.ads, sem_ch13.adb, sem_dim.adb, sem_prag.adb:
2475 Minor reformatting/code reorganization.
2477 2012-01-30 Thomas Quinot <quinot@adacore.com>
2479 * s-rannum.adb, s-ransee.adb, s-ransee.ads (Get_Seed): Return
2480 Unsigned_64 rather than Duration.
2481 (System.Random_Numbers.Reset): Use full value of seed
2482 (do not truncate sub-second bits).
2484 2012-01-30 Thomas Quinot <quinot@adacore.com>
2486 * sem_cat.adb, sem_ch12.adb: Minor reformatting.
2488 2012-01-30 Yannick Moy <moy@adacore.com>
2490 * gnat_ugn.texi: Minor correction of GNAT UG, to take into
2491 account changes to -gnatwa and more recent warnings.
2493 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
2495 * exp_ch7.adb (Build_Finalizer_Call): Do not provide a source
2496 location when creating a call to a finalizer.
2497 * exp_ch11.adb (Expand_Exception_Handlers): Do not provide
2498 a source location for the first actual of Save_Occurrence for
2501 2012-01-30 Ed Schonberg <schonberg@adacore.com>
2503 * einfo.ads, einfo,adb: New attribute on scalar types:
2504 Default_Aspect_Value New attribute on array types:
2505 Default_Aspect_Component_Value Move attribute Related_Array_Object
2506 to a different position to accomodate new aspect attributes.
2507 * freeze.adb (Freeze_Entity): Use new attributes to retrieve value
2508 of defaults set with an aspect specification, rather than using
2509 the list of aspects attached to the type, to prevent issues with
2511 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
2512 Default_Value and Default_Component _Value, store corresponding
2513 expression in type entity.
2514 (Check_Aspect_At_End_Of_Declaration): If the default aspects
2515 are declared on the full view, use the full view to resolve the
2516 correseponding expression.
2517 * exp_ch3.adb (Init_Component): Use attribute
2518 Default_Aspect_Component_Value to perform default initialization,
2519 rather than relying on the rep item list for the type.
2520 (Get_Simple_Init_Val): Ditto.
2522 2012-01-30 Thomas Quinot <quinot@adacore.com>
2524 * a-strhas.ads: Document risk of collision attack.
2526 2012-01-30 Yannick Moy <moy@adacore.com>
2528 * gnat_ugn.texi: Minor update wrt warning switches.
2530 2012-01-30 Vincent Celier <celier@adacore.com>
2532 * prj-nmsc.adb (Check_Interfaces): Report an error when a
2533 unit from Library_Interface is not a unit of the project.
2535 2012-01-30 Vincent Pucci <pucci@adacore.com>
2537 * sem_prag.adb (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Parent
2538 links fixed inside PPC pragmas.
2539 * sem_ch12.adb: Move call to Make_Aspect_For_PPC_In_Gen_Sub_Decl.
2541 2012-01-30 Thomas Quinot <quinot@adacore.com>
2543 * s-ransee.ads: Minor reformatting.
2545 2012-01-30 Pascal Obry <obry@adacore.com>
2547 * prj.ads, prj.adb (For_Each_Source): Add support for skipping
2548 sources coming from an encapsulated library.
2550 2012-01-30 Ed Schonberg <schonberg@adacore.com>
2552 * sem_ch3.adb (Process-Full_View): fix typo.
2553 * sem_ch13.adb (Aalyze_Aspect_Specifications): if predicates
2554 appear on a private type and the full view is available, ensure
2555 existence of freeze node for full view.
2556 (Build_Predicate_Function): Attach predicate function to both
2557 views of a private type.
2559 2012-01-30 Vincent Celier <celier@adacore.com>
2561 * prj-nmsc.adb (Check_Interfaces): Compute the Lib_Interface_ALIs
2562 for the project if either attribute Library_Interface or
2563 Interfaces is declared.
2564 (Check_Stand_Alone_Library): Use Lib_Interface_ALIs computed in
2567 2012-01-30 Pascal Obry <obry@adacore.com>
2569 * prj-proc.adb (Recursive_Process): Set From_Encapsulated_Lib
2570 boolean value to true in the process list created by this routine.
2571 * prj.ads (Project_List_Element): New field From_Encapsulated_Lib.
2572 Continued work for KA06-021.
2573 * prj.adb (Compute_All_Imported_Projects): Set
2574 From_Encapsulated_Lib boolean flag.
2576 2012-01-30 Vincent Pucci <pucci@adacore.com>
2578 * sem_dim.adb (Expand_Put_Call_With_Dimension_Symbol): Minor
2580 * s-diflio.ads: Minor change.
2582 2012-01-30 Javier Miranda <miranda@adacore.com>
2584 * exp_ch9.adb (Build_Dispatching_Requeue): Add missing call
2585 to Get_Entry_Index. Required to generate code which provides
2586 the correct value of Entry_Index in the target entry.
2588 2012-01-30 Nicolas Roche <roche@adacore.com>
2590 * system-vxworks-ppc.ads: Add pragma Linker_Options -crtbe to
2591 fix issue with zcx on VxWorks5.
2593 2012-01-30 Pascal Obry <obry@adacore.com>
2595 * prj.ads, prj.adb (For_Every_Project_Imported): Remove
2597 (For_Every_Project_Imported_Context): New generic routine with
2598 a context parameter.
2599 * prj-nmsc.adb: Revert to use For_Every_Project_Imported Avoid
2600 distributed complexity.
2601 * prj-env.adb, prj-conf.adb, makeutl.adb, gnatcmd.adb: Ditto.
2603 2012-01-30 Thomas Quinot <quinot@adacore.com>
2605 * exp_aggr.adb (Expand_Record_Aggregate): After creating the
2606 _parent aggregate for an extension aggregate, check whether it
2607 requires delayed (top-down) expansion.
2609 2012-01-30 Vincent Pucci <pucci@adacore.com>
2611 * sem_dim.adb (Expand_Put_Call_With_Dimension_Symbol): Rewritten.
2612 * snames.ads-tmpl: Name_Item and Name_Symbols added.
2613 * s-diflio.adb, s-diflio.ads, s-diinio.adb, s-diinio.ads: Rename
2614 and change the position of parameter Symbols in every Put routine.
2615 * s-dimmks.ads: Convert long float type Mks_Type into long
2617 * s-llflex.ads: Modifications in comments.
2619 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
2621 * sem_ch12.adb (Earlier): Do not use the
2622 top level source locations of the two input nodes.
2624 2012-01-30 Robert Dewar <dewar@adacore.com>
2626 * einfo.ads, sem_prag.adb, sem_attr.adb, aspects.ads,
2627 sem_cat.adb, sem_aggr.adb, exp_aggr.adb: Minor reformatting.
2629 2012-01-30 Robert Dewar <dewar@adacore.com>
2631 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb: Minor reformatting.
2633 2012-01-30 Olivier Hainque <hainque@adacore.com>
2635 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Add rule for r1 back +
2638 2012-01-30 Thomas Quinot <quinot@adacore.com>
2640 * gnat_rm.texi, sem_dist.adb, sem_dist.ads, einfo.ads, sem_prag.adb,
2641 sem_ch12.adb, sem_attr.adb, aspects.adb, aspects.ads, par-prag.adb,
2642 sem_cat.adb, snames.ads-tmpl (Sem_Dist.Is_Valid_Remote_Object_Type):
2643 New subprogram (extracted from
2644 Sem_Cat.Validate_Remote_Access_Object_Type_Declaration).
2645 (Einfo.Is_Remote_Types): Now applies to generic types. Update
2646 documentation accordingly.
2647 (Sem_Ch12.Analyze_Associations): A RACW type is acceptable as
2648 actual for a formal type to which a pragma Remote_Access_Type
2650 (Aspects, Par.Prag, Sem_Prag): Support for new pramga/aspect
2652 (Sem_Attr.Analyze_Attribute, case Stub_Type): Attribute can
2653 be applied to a generic type if pragma Remote_Access_Type
2654 applies, in which case the type of the attribute is
2655 System.Partition_Interface.RACW_Stub_Type.
2657 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
2659 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Do not set
2660 an alignment on fields of the RETURN type built for the CICO mechanism.
2662 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
2664 * gcc-interface/trans.c (gnat_to_gnu): Avoid making a SAVE_EXPR for
2665 a call to a function that returns an unconstrained type with default
2666 discriminant. Similarly, avoid doing the conversion to the nominal
2667 result type in this case.
2669 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
2671 * gcc-interface/ada-tree.h (DECL_ALIASED_P): New flag.
2672 * gcc-interface/decl.c (is_variable_size): Rename to...
2673 (type_has_variable_size): ...this.
2674 (adjust_packed): Adjust to above renaming.
2675 (gnat_to_gnu_field): Set DECL_ALIASED_P on the field.
2676 (field_is_artificial): New predicate.
2677 (field_is_aliased): Likewise.
2678 (field_has_self_size): Likewise.
2679 (field_has_variable_size): Likewise.
2680 (components_to_record): Record information for the final layout during
2681 the first pass on fields.
2682 If there is an aliased field placed after a field whose length depends
2683 on discriminants, put all the fields of the latter sort, last.
2685 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
2687 * gcc-interface/gigi.h (get_minimal_subprog_decl): Declare.
2688 * gcc-interface/decl.c (get_minimal_subprog_decl): New function.
2689 * gcc-interface/trans.c (Attribute_to_gnu): Use it for the prefix of an
2690 Access-like attribute in a dispatch table if the subprogram is public.
2692 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
2694 * gcc-interface/gigi.h (create_label_decl): Adjust.
2695 * gcc-interface/utils.c (create_label_decl): Add GNAT_NODE parameter
2696 and invoke gnat_pushdecl on it. Remove obsolete settings.
2697 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Label>: Adjust call to
2699 * gcc-interface/trans.c (gnat_to_gnu) <N_Null): Likewise. Ignore the
2700 label for debugging purposes.
2702 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
2704 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: For an aliased
2705 object with an unconstrained nominal subtype and if optimization isn't
2706 enabled, create a special VAR_DECL for debugging purposes.
2708 2012-01-23 Robert Dewar <dewar@adacore.com>
2710 * sem_prag.ads, sem_prag.adb: Minor reformatting.
2712 2012-01-23 Robert Dewar <dewar@adacore.com>
2714 * sem_ch13.adb (Analyze_Aspect_Specifications): Check for
2715 language defined aspect applied to renaming or formal type
2716 declaration (not permitted)
2718 2012-01-23 Matthew Heaney <heaney@adacore.com>
2720 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Vet): Replaced
2721 comment with pragma Assert.
2723 2012-01-23 Vincent Pucci <pucci@adacore.com>
2725 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Call
2726 to Make_Aspect_For_PPC_In_Gen_Sub_Decl added in ASIS mode.
2727 * sem_prag.adb, sem_prag.ads (Make_Aspect_For_PPC_In_Gen_Sub_Decl): New
2728 routine. In ASIS mode, convert any PPC pragmas into aspects in generic
2729 subprogram declaration in order to enable the analysis of PPC boolean
2732 2012-01-23 Robert Dewar <dewar@adacore.com>
2734 * sem_ch3.adb (Analyze_Object_Declaration): Properly
2735 handle Current_Value for volatile variables (also propagate
2736 Treat_As_Volatile from type to object).
2738 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
2740 * sem_ch12.adb (Install_Body): Detect the case
2741 where the enclosing context is a package with a stub body that
2742 has already been replaced by the actual body. In such cases,
2743 the freeze node for the enclosing context must be inserted after
2746 2012-01-23 Ed Schonberg <schonberg@adacore.com>
2748 * sem_prag.adb (Analyze_Pragma, case Debug): Freeze the called
2749 subprogram before expanding the pragma into an if-statement with
2750 a block, to ensure that when the subprogram is null its body is
2751 properly generated before expansion.
2753 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
2755 * sem_ch12.adb (Analyze_Associations): Alphabetize local variables and
2756 constants. Rename Actual_Types to Actuals_To_Freeze. Rename Next_Formal
2758 Freeze all eligible subprograms which appear as actuals in
2760 (Has_Fully_Defined_Profile): New routine.
2761 (Renames_Standard_Subprogram): New routine.
2762 (Earlier): Add local variable N. Comment update. Do not use source
2763 locations when trying to determine whether one node precedes another.
2765 2012-01-23 Gary Dismukes <dismukes@adacore.com>
2767 * exp_ch4.adb (Expand_Concatenate): In the case
2768 where the result of a concatentation can be null, set the to
2769 result have both the low and high bounds of the right operand (not
2770 just the high bound, as was the case prior to this fix). Also,
2771 fix the saved high bound setting (Last_Opnd_High_Bound) in the
2772 empty string literal case (should have been low bound minus one,
2773 rather than plus one).
2775 2012-01-23 Thomas Quinot <quinot@adacore.com>
2777 * scos.ads, put_scos.adb, get_scos.adb (Get_SCOs, Put_SCOs): Do not
2778 omit statement SCOs for disabled pragmas.
2780 2012-01-23 Matthew Heaney <heaney@adacore.com>
2782 * a-cohase.ads, a-cihase.ads, a-cbhase.ads, a-coorse.ads,
2783 a-ciorse.ads, a-cborse.ads, a-cohama.ads, a-cihama.ads, a-cbhama.ads,
2784 a-coorma.ads, a-ciorma.ads, a-cborma.ads, a-cdlili.ads, a-cidlli.ads,
2785 a-cbdlli.ads, a-convec.ads, a-coinve.ads, a-cobove.ads (Cursor'Read,
2786 Cursor'Write): Declare in private part.
2787 (Reference_Type'Read, Reference_Type'Write): Ditto.
2788 (Constant_Reference_Type'Read, Constant_Reference_Type'Write): Ditto.
2790 2012-01-23 Robert Dewar <dewar@adacore.com>
2792 * a-catizo.ads, a-calend.adb, a-calend.ads, par-ch13.adb: Minor
2795 2012-01-23 Ed Schonberg <schonberg@adacore.com>
2797 * sem_ch6.adb (Analyze_Subprogram_Declaration): Do not set the
2798 Corresponding_Body on a defaulted null formal subprogram.
2799 * sem_ch12.adb (Check_Formal_Package_Instance): No check needed
2800 on a defaulted formal subprogram that is a null procedure.
2802 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
2804 * exp_ch9.adb: Update the comments involving pragma Implemented.
2805 * sem_ch3.adb (Check_Pragma_Implemented (Entity_Id)): Add local
2806 constant Subp_Alias and local variable Impl_Subp. Properly
2807 handle aliases of synchronized wrappers. Code cleanup.
2808 (Check_Pragma_Implemented (Entity_Id; Entity_Id)): Add
2809 Name_Optional as part of the condition.
2810 * sem_prag.adb (Analyze_Pragma): Add "Optional" as one of the
2811 valid choices of implementation kind.
2812 (Check_Arg_Is_One_Of): New routine.
2813 * snames.ads-tmlp: Add Name_Optional.
2815 2012-01-23 Ed Schonberg <schonberg@adacore.com>
2817 * par-ch13.adb: Better error recovery in illegal aspect
2820 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
2822 * a-calend.adb: Add with clause for Interfaces.C. Add constant
2824 (Day_Of_Week): Call the internal UTC_Time_Offset.
2825 (Split): Call the internal UTC_Time_Offset.
2826 (Time_Of): Call the internal UTC_Time_Offset.
2827 (Time_Zone_Operations.UTC_Time_Offset): Call internal UTC_Time_Offset.
2828 (UTC_Time_Offset): New library-level routine.
2829 * a-calend.ads (UTC_Time_Offset): Remove parameter
2830 Is_Historic. Update related comment on usage.
2831 * a-catizo.adb (UTC_Time_Offset): Removed.
2832 (UTC_Time_Offset (Time)): Call Time_Zone_Operations.UTC_Time_Offset.
2833 * a-caltizo.ads (UTC_Time_Offset): Removed.
2834 (UTC_Time_Offset (Time)): Add back the default expression of parameter
2837 2012-01-23 Robert Dewar <dewar@adacore.com>
2839 * sprint.ads, sprint.adb (Sprint_Node_List): Add New_Lines parameter
2840 (pg,po,ps): Make sure each entry starts on new line.
2842 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
2844 * a-calend.ads, a-calend.adb: Define types int and int_Pointer. Update
2845 the parameter profile of procedure localtime_tzoff and its associated
2847 (Day_Of_Week): Do not treat the input date as historical
2848 with respect to time zones.
2849 (Split): Do not treat the input
2850 date as historical with respect to time zones. (Time_Of): Do
2851 not treat the input constituents as forming a historical date
2852 with respect to time zones.
2853 (UTC_Time_Offset): Add new formal
2854 parameter Is_Historic. Add local variable Flag. Update the call
2856 * a-catizo.ads, a-catizo.adb (UTC_Time_Offset): New routine.
2857 (UTC_Time_Offset (Time)): Update the call to
2858 Time_Zone_Operations.UTC_Time_Offset.
2859 * sysdep.c (__gnat_localtime_tzoff): Update parameter
2860 profile. Split the processing of offsets on Windows into two - one
2861 part of historic time stamps and the other for the current time.
2863 2012-01-23 Robert Dewar <dewar@adacore.com>
2865 * a-calend.adb: Minor reformatting.
2867 2012-01-23 Ed Schonberg <schonberg@adacore.com>
2869 * exp_ch9.adb, sem_ch9.adb: Handle array of access to synchronized
2870 interface in requeue statement.
2872 2012-01-23 Cyrille Comar <comar@adacore.com>
2874 * projects.texi: Remove references to main units and replace
2875 with references to main programs to be coherent with the
2878 2012-01-23 Robert Dewar <dewar@adacore.com>
2880 * s-utf_32.adb: Minor reformatting.
2882 2012-01-23 Vincent Celier <celier@adacore.com>
2884 * snames.ads-tmpl: Minor comment addition Indicate that
2885 Name_Library_Encapsulated_Options is only used in gprbuild.
2887 2012-01-23 Robert Dewar <dewar@adacore.com>
2889 * sem_ch10.adb (Analyze_Subunit): Properly save/restore cunit
2892 2012-01-23 Ed Schonberg <schonberg@adacore.com>
2894 * snames.ads-tmpl: Add Name_Synchronization.
2895 * aspects.ads, aspects.adb: Add Aspect_Synchronization to
2896 enumeration type and related maps.
2897 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle Aspect
2898 Synchronization, build corresponding pragma Implemented.
2899 * sem_util.adb (Implementation_Kind): Handle both explicit and
2900 implicit pragma_argument association to retrieve the given
2901 synchronization mode.
2903 2012-01-23 Robert Dewar <dewar@adacore.com>
2905 * sem_ch10.adb, errout.adb: Minor reformatting.
2907 2012-01-23 Ed Schonberg <schonberg@adacore.com>
2909 * sem_res.adb (Resolve_Actuals): An actual in a call to an
2910 Ada 2012 Reference function does not lead to a dangerous order
2913 2012-01-23 Gary Dismukes <dismukes@adacore.com>
2915 * exp_util.adb (Is_Iterated_Container): Test
2916 Is_Entity_Name when searching for calls to the default iterator,
2917 to avoid blowing up on indirect calls which have an explicit
2918 dereference as the call name.
2920 2012-01-23 Thomas Quinot <quinot@adacore.com>
2922 * errout.adb (Set_Msg_Node): For an N_Expanded_Name, output
2923 the complete expanded name, rather than just its Selector_Name.
2925 2012-01-23 Thomas Quinot <quinot@adacore.com>
2927 * a-textio.adb (Put): Rewrite one-parameter Character version to
2928 just call the two-parameter one with Current_Out.
2930 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
2932 * freeze.adb (Check_Current_Instance): Issue an
2933 error when the prefix of 'Unchecked_Access or 'Access does not
2934 denote a legal aliased view of a type.
2935 (Freeze_Record_Type): Do not halt the processing of record components
2936 once the Has_Controlled_Component is set as this bypasses the remaining
2938 (Is_Aliased_View_Of_Type): New routine.
2940 2012-01-23 Thomas Quinot <quinot@adacore.com>
2942 * errout.ads, freeze.adb: Minor reformatting.
2944 2012-01-23 Thomas Quinot <quinot@adacore.com>
2946 * sem_ch10.adb, sem_prag.adb: Remove redundant apostrophes in error
2949 2012-01-23 Olivier Hainque <hainque@adacore.com>
2951 * adadecode.c (__gnat_decode): Deal with empty input early,
2952 preventing potential erroneous memory access later on.
2954 2012-01-21 Eric Botcazou <ebotcazou@adacore.com>
2957 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: In the case of a
2958 renaming, preserve the volatileness through the indirection, if any.
2960 2012-01-14 Andreas Schwab <schwab@linux-m68k.org>
2962 * gcc-interface/Makefile.in (OSCONS_EXTRACT): Add
2965 2012-01-10 Pascal Obry <obry@adacore.com>
2967 * prj-nmsc.adb (Check_Library_Attributes):
2968 Kill check for object/source directories for aggregate libraries.
2970 2012-01-10 Matthew Heaney <heaney@adacore.com>
2972 * a-cdlili.adb, a-cdlili.ads, a-cihama.adb, a-cihama.ads, a-coinve.adb,
2973 a-coinve.ads, a-ciorse.adb, a-ciorse.ads, a-coorma.adb, a-coorma.ads,
2974 a-cborma.adb, a-cborma.ads, a-cidlli.adb, a-cidlli.ads, a-cimutr.adb,
2975 a-cimutr.ads, a-cihase.adb, a-cihase.ads, a-cohama.adb, a-cohama.ads,
2976 a-coorse.adb, a-coorse.ads, a-cbhama.adb, a-cbhama.ads, a-cborse.adb,
2977 a-cborse.ads, a-comutr.adb, a-comutr.ads, a-ciorma.adb, a-cobove.adb,
2978 a-ciorma.ads, a-cobove.ads, a-convec.adb, a-convec.ads, a-cohase.adb,
2979 a-cohase.ads, a-cbdlli.adb, a-cbdlli.ads, a-cbmutr.adb, a-cbmutr.ads,
2980 a-cbhase.adb, a-cbhase.ads (Reference, Constant_Reference): Declare
2981 container parameter as aliased in/in out.
2984 2012-01-10 Bob Duff <duff@adacore.com>
2986 * s-os_lib.ads: Improve comment.
2988 2012-01-10 Geert Bosch <bosch@adacore.com>
2990 * s-gearop.adb (Forward_Eliminate): Avoid improper aliasing
2993 2012-01-10 Bob Duff <duff@adacore.com>
2995 * sem_intr.adb (Check_Shift): Use RM_Size instead of Esize, when
2996 checking that the 'Size is correct. If the type is "mod 2**12",
2997 for example, it's illegal, but Esize is the 'Object_Size, which
2998 will be something like 16 or 32, so the error ('Size = 12) was
3000 * gnat_rm.texi: Improve documentation of shift
3001 and rotate intrinsics.
3003 2012-01-10 Pascal Obry <obry@adacore.com>
3005 * prj.adb (For_Every_Project_Imported): Fix
3006 implementation to make sure we return each project only once
3007 for aggragte libraries. It is fine to return a project twice for
3008 aggregate projects, this was the case as a Project_Id is different
3009 in each project tree. The new implementation use a table based on
3010 the project name to ensure proper detection of duplicate project
3011 in aggregate library. A new context is then created to continue
3012 retrurning duplicate project for aggregate libraries.
3014 2012-01-09 Eric Botcazou <ebotcazou@adacore.com>
3016 * gcc-interface/trans.c (call_to_gnu): Create the temporary for the
3017 return value in the variable-sized return type case if the target is
3018 an array with fixed size. However, do not create it if this is the
3019 expression of an object declaration.
3021 2012-01-09 Eric Botcazou <ebotcazou@adacore.com>
3023 * gcc-interface/trans.c (addressable_p) <COMPONENT_REF>: Fix thinko.
3025 2012-01-06 Robert Dewar <dewar@adacore.com>
3027 * a-wichha.ads, a-wichun.ads, a-zchhan.ads, a-zchuni.ads,
3028 s-utf_32.ads: Add pragma Pure
3029 * s-utf_32.adb: Suppress warnings on non-static constants (now
3032 2012-01-06 Bob Duff <duff@adacore.com>
3034 * s-rpc.ads (Read, Write): Add overriding indicators.
3036 2012-01-06 Robert Dewar <dewar@adacore.com>
3038 * gnat_rm.texi: Add documentation for conventions
3039 Ada_Pass_By_Copy and Ada_Pass_By_Reference.
3041 2012-01-06 Gary Dismukes <dismukes@adacore.com>
3043 * a-tienio.adb (Put): Add exception message on
3044 raise statements. Remove unneeded blocks and object declarations.
3046 2012-01-06 Robert Dewar <dewar@adacore.com>
3048 * sem_prag.adb: Minor reformatting.
3050 2012-01-06 Ed Schonberg <schonberg@adacore.com>
3052 * sinfo.ads, sinfo.adb (Has_Prefixed_Call): New flag to indicate
3053 that a selected component within a generic unit has been resolved
3054 as a prefixed call with local references.
3055 * sem_ch3.adb (Is_Visible_Component): In an instance body a selected
3056 component is always visible.
3057 * sem_ch4.adb (Analyze_Selected_Component): If the node is a
3058 prefixed call in an instance, do not look for visible components
3060 * sem_ch12.adb (Reset_Entity): If a selected component has resolved
3061 to a prefixed call, mark the node accordingly when prefix and
3062 selector are local references.
3064 2012-01-02 Eric Botcazou <ebotcazou@adacore.com>
3066 * gnatvsn.ads (Current_Year): Bump to 2012.
3068 Copyright (C) 2012 Free Software Foundation, Inc.
3070 Copying and distribution of this file, with or without modification,
3071 are permitted in any medium without royalty provided the copyright
3072 notice and this notice are preserved.