1 2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
3 * gcc-interface/trans.c (gnat_to_gnu) <N_Qualified_Expression>: If the
4 type is tagged, mark it as used for debugging purposes.
5 <N_Allocator>: Likewise for a qualified expression.
7 2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
9 * gcc-interface/trans.c (call_to_gnu): Create the temporary for the
10 return value in the by-reference return type case if this isn't the
11 expression of an object declaration. Tidy up.
13 2012-02-09 Tristan Gingold <gingold@adacore.com>
15 * gcc-interface/Makefile.in: Remove .sym rule (not used).
16 Remove adamsg.o object (requires native message compiler).
17 * init.c (CMA$_EXIT_THREAD, MTH$_FLOOVEMAT, SS$_INTDIV): Define as a
18 macro instead of as extern int.
19 (ADA$_ALREADY_OPEN, ADA$_CONSTRAINT_ERRO, ADA$_DATA_ERROR)
20 (ADA$_DEVICE_ERROR, ADA$_END_ERROR, ADA$_FAC_MODE_MISMAT)
21 (ADA$_IOSYSFAILED, ADA$_KEYSIZERR, ADA$_KEY_MISMATCH)
22 (ADA$_LAYOUT_ERROR, ADA$_LINEXCMRS, ADA$_MAXLINEXC)
23 (ADA$_MODE_ERROR, ADA$_MRN_MISMATCH, ADA$_MRS_MISMATCH)
24 (ADA$_NAME_ERROR, ADA$_NOT_OPEN, ADA$_ORG_MISMATCH)
25 (ADA$_PROGRAM_ERROR, ADA$_RAT_MISMATCH, ADA$_RFM_MISMATCH)
26 (ADA$_STAOVF, ADA$_STATUS_ERROR, ADA$_STORAGE_ERROR)
27 (ADA$_UNSUPPORTED, ADA$_USE_ERROR): Likewise.
28 (struct cond_except): Field cond is now an unsigned int.
29 (dec_ada_cond_except_table): Adjust.
30 (cond_except_table): Likewise.
31 (cond_resignal_table): Likewise.
32 (__gnat_default_resignal_p): Fix style.
34 2012-02-08 Vincent Celier <celier@adacore.com>
36 * gcc-interface/Make-lang.in: Add g-byorma.o to gnatbind objects
37 (g-buorma is now imported by sinput).
39 * scn.adb (Initialize_Scanner): Call Check_For_BOM
40 * sinput-p.adb (Source_File_Is_Subunit): Call Check_For_BOM
41 * sinput.adb: New procedure Check_For_BOM
42 * sinput.ads: New procedure Check_For_BOM
44 2012-02-08 Vincent Pucci <pucci@adacore.com>
46 * impunit.adb: Dimension package names updated
47 * Makefile.rtl: s-dim added
48 * sem_dim.adb (Is_Procedure_Put_Call): minor changes
49 (Is_Dim_IO_Package_Instantiation): minor changes
50 * sem_dim.ads: minor changes in comments
51 * snames.ads-tmpl: Name_Dim added Name_Dim_Float_IO and
52 Name_Dim_Integer_IO removed
53 * s-dim.ads: New package. Define the dimension terminology.
54 * s-diflio.adb, s-diinio.adb, s-dimkio.ads, s-dimmks.ads,
55 * s-dmotpr.ads: Package names updated.
56 * s-diflio.ads, s-diinio.ads: Documentation added and package
59 2012-02-08 Gary Dismukes <dismukes@adacore.com>
61 * gcc-interface/utils2.c (build_call_alloc_dealloc_proc): Revise test
62 for storage pools to test for an underlying record type rather than
63 testing Is_Tagged_Type, so that simple storage pools will be handled
64 the same as normal Ada storage pools.
66 2012-02-08 Yannick Moy <moy@adacore.com>
68 * gnat_rm.texi: Minor reshuffling to place restriction at
71 2012-02-08 Bob Duff <duff@adacore.com>
73 * warnsw.adb (Set_Warning_Switch): Set Warn_On_Suspicious_Modulus_Value
74 False for '-gnatwA', to suppress these warnings.
76 2012-02-08 Vincent Celier <celier@adacore.com>
78 * sinput-p.adb (Source_File_Is_Subunit): Check for BOM before
79 starting to scan, so that UTF8 encoding is taken into account.
81 2012-02-08 Arnaud Charlet <charlet@adacore.com>
83 * s-tasren.adb, s-tasren.ads (Internal_Complete_Rendezvous): New
85 (Complete_Rendezvous): Now call Internal_Complete_Rendezvous.
86 (Exceptional_Complete_Rendezvous): Mark No_Return.
88 2012-02-08 Eric Botcazou <ebotcazou@adacore.com>
90 * exp_aggr.adb (Compile_Time_Known_Composite_Value):
91 New predicate to compute whether a composite value can be
92 evaluated at compile time.
93 (Component_Not_OK_For_Backend): Use Compile_Time_Known_Value for all
94 expressions of elementary type and Compile_Time_Known_Composite_Value
95 for all other expressions.
96 (Expand_Record_Aggregate): Convert to assignments in the case
97 of a type with mutable components if the aggregate cannot be
100 2012-02-08 Gary Dismukes <dismukes@adacore.com>
102 * aspects.ads (type Aspect_Id): Add Simple_Storage_Pool_Type.
103 (Impl_Defined_Aspects): Add association for
104 Aspect_Simple_Storage_Pool_Type.
106 association for Aspect_Simple_Storage_Pool_Type.
108 (Canonical_Aspect): Add association for Simple_Storage_Pool_Type.
109 * exp_attr.adb (Expand_N_Attribute_Reference):
110 Change name to Name_Simple_Storage_Pool_Type.
111 * exp_ch4.adb (Expand_N_Allocator): Change
112 name to Name_Simple_Storage_Pool_Type.
113 * exp_intr.adb (Expand_Unc_Deallocation): Change name to
114 Name_Simple_Storage_Pool_Type. * freeze.adb (Freeze_Entity):
115 Change names to Name_Simple_Storage_Pool_Type. * par-prag.adb:
116 Change names to Name_Simple_Storage_Pool_Type. * sem_attr.adb:
117 (Analyze_Attribute): Change name to Name_Simple_Storage_Pool_Type.
118 * sem_ch13.adb (Analyze_Attribute_Definition_Clause):
119 Change name to Name_Simple_Storage_Pool_Type.
121 (Analyze_Pragma): Change name to Name_Simple_Storage_Pool_Type.
122 (Sig_Flags): Change name to Name_Simple_Storage_Pool_Type.
123 * sem_res.adb (Resolve_Allocator): Change name to
124 Name_Simple_Storage_Pool_Type. * snames.ads-tmpl:
125 (Name_Simple_Storage_Pool_Type): New name constant.
126 (type Pragma_Id): Change name to Name_Simple_Storage_Pool_Type and
127 move to main pragma section because it no longer matches the
129 * snames.adb-tmpl (Get_Pragma_Id): Remove test for
130 Name_Simple_Storage_Pool.
131 (Is_Pragma_Name): Remove test for Name_Simple_Storage_Pool.
133 2012-02-08 Robert Dewar <dewar@adacore.com>
135 * gnat_ugn.texi: Add some clarification to -gnatwA and -gnatws.
137 2012-02-08 Pascal Obry <obry@adacore.com>
139 * prj.adb (Compute_All_Imported_Projects): Use new
140 For_Project_And_Aggregated_Context to ensure proper context is
141 used for encapsulated aggregate libraries.
142 * prj-proc.adb (Recursive_Process): Call
143 Process_Aggregated_Projects earlier to ensure that all dependent
144 projects are set with the proper encapsulated status.
146 2012-02-08 Pascal Obry <obry@adacore.com>
148 * s-os_lib.adb (Normalize_Arguments): Properly escape last \ in null
151 2012-02-08 Pascal Obry <obry@adacore.com>
153 * prj.ads, prj.adb (For_Project_And_Aggregated_Context): New
154 generic routine with a context parameter.
156 2012-02-08 Robert Dewar <dewar@adacore.com>
158 * a-coinve.adb, sem_util.adb, sem_ch8.adb, a-cobove.adb,
159 a-convec.adb: Minor reformatting and code reorganization.
161 2012-02-08 Steve Baird <baird@adacore.com>
163 * sem_cat.adb (In_Preelaborated_Unit): A child
164 unit instantiation does not inherit preelaboration requirements
167 2012-02-08 Gary Dismukes <dismukes@adacore.com>
169 * aspects.ads (type Aspect_Id): Add Aspect_Simple_Storage_Pool.
170 (Impl_Defined_Aspects): Add entry for Aspect_Simple_Storage_Pool.
171 (Aspect_Argument): Add Name entry for Aspect_Simple_Storage_Pool.
172 (Aspect_Names): Add entry for Aspect_Simple_Storage_Pool.
173 * aspects.adb (Canonical_Aspect): Add entry for
174 Aspect_Simple_Storage_Pool.
175 * exp_attr.adb (Expand_N_Attribute_Reference): Handle case of
176 Attribute_Simple_Storage_Pool in the same way as Storage_Pool
177 (add conversion, analyze/resolve). For the Storage_Size attribute,
178 for the simple pool case, locate and use the simple pool type's
179 Storage_Size function (if any), otherwise evaluate to zero.
180 * exp_ch4.adb (Expand_N_Allocator): In the case of an allocator
181 for an access type with an associated simple storage pool,
182 locate and use the pool type's Allocate.
183 * exp_intr.adb (Expand_Unc_Deallocation): In the case where the
184 access type has a simple storage pool, locate the pool type's
185 Deallocate procedure (if present) and use it as the procedure
186 to call on the Free operation.
187 * freeze.adb (Freeze_Entity): In the case of a full type for
188 a private type defined with pragma Simple_Storage_Pool, check
189 that the full type is also appropriate for the pragma. For
190 a simple storage pool type, validate that the operations
191 Allocate, Deallocate (if present), and Storage_Size
192 (if present) are defined with appropriate expected profiles.
193 (Validate_Simple_Pool_Op_Formal): New procedure
194 (Validate_Simple_Pool_Operation): New procedure Add with and
196 * par-prag.adb: Add Pragma_Simple_Storage_Pool to case statement
197 (no action required).
198 * sem_attr.adb (Analyze_Attribute): For the case of the
199 Storage_Pool attribute, give a warning if the prefix type has an
200 associated simple storage pool, and rewrite the attribute as a
201 raise of Program_Error. In the case of the Simple_Storage_Pool
202 attribute, check that the prefix type has an associated simple
203 storage pool, and set the attribute type to the pool's type.
204 * sem_ch13.adb (Analyze_Aspect_Specifications): Add
205 Aspect_Simple_Storage_Pool case choice.
206 (Analyze_Attribute_Definition_Clause): Add
207 Aspect_Simple_Storage_Pool to case for Ignore_Rep_Clauses
208 (no action). Add handling for Simple_Storage_Pool attribute
209 definition, requiring the name to denote a simple storage pool
211 (Check_Aspect_At_Freeze_Point): For a simple storage pool
212 aspect, set the type to that of the name specified for the aspect.
213 * sem_prag.adb (Analyze_Pragma): Add handling for pragma
214 Simple_Storage_Pool, requiring that it applies to a library-level
215 type declared in a package declaration that is a limited private
216 or limited record type.
217 * sem_res.adb (Resolve_Allocator): Flag an attempt to call a
218 build-in-place function in an allocator for an access type with
219 a simple storage pool as unsupported.
220 * snames.ads-tmpl: Add Name_Simple_Storage_Pool.
221 (type Attribute_Id): Add Attribute_Simple_Storage_Pool.
222 (type Pragma_Id): Add Pragma_Simple_Storage_Pool.
223 * snames.adb-tmpl (Get_Pragma_Id): Handle case of
224 Name_Simple_Storage_Pool.
225 (Is_Pragma_Name): Return True for Name_Simple_Storage_Pool.
227 2012-02-08 Cyrille Comar <comar@adacore.com>
229 * projects.texi: Clarify doc for interfaces.
231 2012-02-07 Eric Botcazou <ebotcazou@adacore.com>
233 * gcc-interface/Make-lang.in (GCC_LINKERFLAGS): New variable.
236 2012-02-01 Tristan Gingold <gingold@adacore.com>
238 * gcc-interface/trans.c (Loop_Statement_to_gnu): Use sizetype
239 instead of size_type_node.
241 2012-01-30 Nicolas Roche <roche@adacore.com>
243 * gcc-interface/Make-lang.in: Update dependencies.
244 * gcc-interface/Makefile.in: Use system-vxworks-system-ppc-mils.ads
246 Remove Linker_Options -crtbe when building sjlj run-time.
248 2012-01-30 Robert Dewar <dewar@adacore.com>
250 * sem.adb (Analyze): Call Analyze_Mod for N_Op_Mod mode.
251 * sem_ch3.adb (Modular_Type_Declaration): Warn on mod value of
252 form 2 * small-literal.
253 * sem_ch4.adb (Analyze_Mod): New procedure (warn on suspicious
255 * sem_ch4.ads (Analyze_Mod): New procedure.
257 2012-01-30 Ed Schonberg <schonberg@adacore.com>
259 * sem_ch6.adb: sem_ch6.adb (Analyze_Expression_Function): Copy
260 types and return expression when building spec for implicit
261 body, to preserve global references that may be present in an
264 2012-01-30 Matthew Heaney <heaney@adacore.com>
266 * a-convec.adb, a-coinve.adb, a-cobove.adb (Sort,
267 Reverse_Elements): Check for cursor tampering.
269 2012-01-30 Ed Schonberg <schonberg@adacore.com>
271 * sem_util.adb (Is_Fully_Initialized_Type): In Ada 2012, a
272 type with aspect Default_Value or Default_Component_Value is
273 fully initialized, and use of variables of such types do not
276 2012-01-30 Javier Miranda <miranda@adacore.com>
279 * sem_ch8.adb (Analyze_Subprogram_Renaming):
280 Handle self-renaming when the renamed entity is referenced using
283 2012-01-30 Vincent Celier <celier@adacore.com>
285 * projects.texi: Add documentation for attribute Interfaces.
287 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
289 * exp_ch7.adb (Build_Finalizer_Call): Set loc again.
290 * exp_ch11.adb (Expand_At_End_Handler): Do not provide a source
291 location for the wrapped call to the original AT_END routine
292 and the subsequent return statement.
294 2012-01-30 Pascal Obry <obry@adacore.com>
296 * s-rannum.adb: Minor reformatting.
298 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
300 * a-calend-vms.adb, a-calend.adb: Increment the number of leap seconds
301 to 25 and add the hard time value for 2012-06-30.
303 2012-01-30 Robert Dewar <dewar@adacore.com>
305 * a-strhas.ads, einfo.adb, einfo.ads, exp_ch7.adb, exp_ch9.adb,
306 freeze.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-proc.adb, s-llflex.ads,
307 s-ransee.adb, s-ransee.ads, sem_ch13.adb, sem_dim.adb, sem_prag.adb:
308 Minor reformatting/code reorganization.
310 2012-01-30 Thomas Quinot <quinot@adacore.com>
312 * s-rannum.adb, s-ransee.adb, s-ransee.ads (Get_Seed): Return
313 Unsigned_64 rather than Duration.
314 (System.Random_Numbers.Reset): Use full value of seed
315 (do not truncate sub-second bits).
317 2012-01-30 Thomas Quinot <quinot@adacore.com>
319 * sem_cat.adb, sem_ch12.adb: Minor reformatting.
321 2012-01-30 Yannick Moy <moy@adacore.com>
323 * gnat_ugn.texi: Minor correction of GNAT UG, to take into
324 account changes to -gnatwa and more recent warnings.
326 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
328 * exp_ch7.adb (Build_Finalizer_Call): Do not provide a source
329 location when creating a call to a finalizer.
330 * exp_ch11.adb (Expand_Exception_Handlers): Do not provide
331 a source location for the first actual of Save_Occurrence for
334 2012-01-30 Ed Schonberg <schonberg@adacore.com>
336 * einfo.ads, einfo,adb: New attribute on scalar types:
337 Default_Aspect_Value New attribute on array types:
338 Default_Aspect_Component_Value Move attribute Related_Array_Object
339 to a different position to accomodate new aspect attributes.
340 * freeze.adb (Freeze_Entity): Use new attributes to retrieve value
341 of defaults set with an aspect specification, rather than using
342 the list of aspects attached to the type, to prevent issues with
344 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
345 Default_Value and Default_Component _Value, store corresponding
346 expression in type entity.
347 (Check_Aspect_At_End_Of_Declaration): If the default aspects
348 are declared on the full view, use the full view to resolve the
349 correseponding expression.
350 * exp_ch3.adb (Init_Component): Use attribute
351 Default_Aspect_Component_Value to perform default initialization,
352 rather than relying on the rep item list for the type.
353 (Get_Simple_Init_Val): Ditto.
355 2012-01-30 Thomas Quinot <quinot@adacore.com>
357 * a-strhas.ads: Document risk of collision attack.
359 2012-01-30 Yannick Moy <moy@adacore.com>
361 * gnat_ugn.texi: Minor update wrt warning switches.
363 2012-01-30 Vincent Celier <celier@adacore.com>
365 * prj-nmsc.adb (Check_Interfaces): Report an error when a
366 unit from Library_Interface is not a unit of the project.
368 2012-01-30 Vincent Pucci <pucci@adacore.com>
370 * sem_prag.adb (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Parent
371 links fixed inside PPC pragmas.
372 * sem_ch12.adb: Move call to Make_Aspect_For_PPC_In_Gen_Sub_Decl.
374 2012-01-30 Thomas Quinot <quinot@adacore.com>
376 * s-ransee.ads: Minor reformatting.
378 2012-01-30 Pascal Obry <obry@adacore.com>
380 * prj.ads, prj.adb (For_Each_Source): Add support for skipping
381 sources coming from an encapsulated library.
383 2012-01-30 Ed Schonberg <schonberg@adacore.com>
385 * sem_ch3.adb (Process-Full_View): fix typo.
386 * sem_ch13.adb (Aalyze_Aspect_Specifications): if predicates
387 appear on a private type and the full view is available, ensure
388 existence of freeze node for full view.
389 (Build_Predicate_Function): Attach predicate function to both
390 views of a private type.
392 2012-01-30 Vincent Celier <celier@adacore.com>
394 * prj-nmsc.adb (Check_Interfaces): Compute the Lib_Interface_ALIs
395 for the project if either attribute Library_Interface or
396 Interfaces is declared.
397 (Check_Stand_Alone_Library): Use Lib_Interface_ALIs computed in
400 2012-01-30 Pascal Obry <obry@adacore.com>
402 * prj-proc.adb (Recursive_Process): Set From_Encapsulated_Lib
403 boolean value to true in the process list created by this routine.
404 * prj.ads (Project_List_Element): New field From_Encapsulated_Lib.
405 Continued work for KA06-021.
406 * prj.adb (Compute_All_Imported_Projects): Set
407 From_Encapsulated_Lib boolean flag.
409 2012-01-30 Vincent Pucci <pucci@adacore.com>
411 * sem_dim.adb (Expand_Put_Call_With_Dimension_Symbol): Minor
413 * s-diflio.ads: Minor change.
415 2012-01-30 Javier Miranda <miranda@adacore.com>
417 * exp_ch9.adb (Build_Dispatching_Requeue): Add missing call
418 to Get_Entry_Index. Required to generate code which provides
419 the correct value of Entry_Index in the target entry.
421 2012-01-30 Nicolas Roche <roche@adacore.com>
423 * system-vxworks-ppc.ads: Add pragma Linker_Options -crtbe to
424 fix issue with zcx on VxWorks5.
426 2012-01-30 Pascal Obry <obry@adacore.com>
428 * prj.ads, prj.adb (For_Every_Project_Imported): Remove
430 (For_Every_Project_Imported_Context): New generic routine with
432 * prj-nmsc.adb: Revert to use For_Every_Project_Imported Avoid
433 distributed complexity.
434 * prj-env.adb, prj-conf.adb, makeutl.adb, gnatcmd.adb: Ditto.
436 2012-01-30 Thomas Quinot <quinot@adacore.com>
438 * exp_aggr.adb (Expand_Record_Aggregate): After creating the
439 _parent aggregate for an extension aggregate, check whether it
440 requires delayed (top-down) expansion.
442 2012-01-30 Vincent Pucci <pucci@adacore.com>
444 * sem_dim.adb (Expand_Put_Call_With_Dimension_Symbol): Rewritten.
445 * snames.ads-tmpl: Name_Item and Name_Symbols added.
446 * s-diflio.adb, s-diflio.ads, s-diinio.adb, s-diinio.ads: Rename
447 and change the position of parameter Symbols in every Put routine.
448 * s-dimmks.ads: Convert long float type Mks_Type into long
450 * s-llflex.ads: Modifications in comments.
452 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
454 * sem_ch12.adb (Earlier): Do not use the
455 top level source locations of the two input nodes.
457 2012-01-30 Robert Dewar <dewar@adacore.com>
459 * einfo.ads, sem_prag.adb, sem_attr.adb, aspects.ads,
460 sem_cat.adb, sem_aggr.adb, exp_aggr.adb: Minor reformatting.
462 2012-01-30 Robert Dewar <dewar@adacore.com>
464 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb: Minor reformatting.
466 2012-01-30 Olivier Hainque <hainque@adacore.com>
468 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Add rule for r1 back +
471 2012-01-30 Thomas Quinot <quinot@adacore.com>
473 * gnat_rm.texi, sem_dist.adb, sem_dist.ads, einfo.ads, sem_prag.adb,
474 sem_ch12.adb, sem_attr.adb, aspects.adb, aspects.ads, par-prag.adb,
475 sem_cat.adb, snames.ads-tmpl (Sem_Dist.Is_Valid_Remote_Object_Type):
476 New subprogram (extracted from
477 Sem_Cat.Validate_Remote_Access_Object_Type_Declaration).
478 (Einfo.Is_Remote_Types): Now applies to generic types. Update
479 documentation accordingly.
480 (Sem_Ch12.Analyze_Associations): A RACW type is acceptable as
481 actual for a formal type to which a pragma Remote_Access_Type
483 (Aspects, Par.Prag, Sem_Prag): Support for new pramga/aspect
485 (Sem_Attr.Analyze_Attribute, case Stub_Type): Attribute can
486 be applied to a generic type if pragma Remote_Access_Type
487 applies, in which case the type of the attribute is
488 System.Partition_Interface.RACW_Stub_Type.
490 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
492 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Do not set
493 an alignment on fields of the RETURN type built for the CICO mechanism.
495 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
497 * gcc-interface/trans.c (gnat_to_gnu): Avoid making a SAVE_EXPR for
498 a call to a function that returns an unconstrained type with default
499 discriminant. Similarly, avoid doing the conversion to the nominal
500 result type in this case.
502 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
504 * gcc-interface/ada-tree.h (DECL_ALIASED_P): New flag.
505 * gcc-interface/decl.c (is_variable_size): Rename to...
506 (type_has_variable_size): ...this.
507 (adjust_packed): Adjust to above renaming.
508 (gnat_to_gnu_field): Set DECL_ALIASED_P on the field.
509 (field_is_artificial): New predicate.
510 (field_is_aliased): Likewise.
511 (field_has_self_size): Likewise.
512 (field_has_variable_size): Likewise.
513 (components_to_record): Record information for the final layout during
514 the first pass on fields.
515 If there is an aliased field placed after a field whose length depends
516 on discriminants, put all the fields of the latter sort, last.
518 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
520 * gcc-interface/gigi.h (get_minimal_subprog_decl): Declare.
521 * gcc-interface/decl.c (get_minimal_subprog_decl): New function.
522 * gcc-interface/trans.c (Attribute_to_gnu): Use it for the prefix of an
523 Access-like attribute in a dispatch table if the subprogram is public.
525 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
527 * gcc-interface/gigi.h (create_label_decl): Adjust.
528 * gcc-interface/utils.c (create_label_decl): Add GNAT_NODE parameter
529 and invoke gnat_pushdecl on it. Remove obsolete settings.
530 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Label>: Adjust call to
532 * gcc-interface/trans.c (gnat_to_gnu) <N_Null): Likewise. Ignore the
533 label for debugging purposes.
535 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
537 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: For an aliased
538 object with an unconstrained nominal subtype and if optimization isn't
539 enabled, create a special VAR_DECL for debugging purposes.
541 2012-01-23 Robert Dewar <dewar@adacore.com>
543 * sem_prag.ads, sem_prag.adb: Minor reformatting.
545 2012-01-23 Robert Dewar <dewar@adacore.com>
547 * sem_ch13.adb (Analyze_Aspect_Specifications): Check for
548 language defined aspect applied to renaming or formal type
549 declaration (not permitted)
551 2012-01-23 Matthew Heaney <heaney@adacore.com>
553 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Vet): Replaced
554 comment with pragma Assert.
556 2012-01-23 Vincent Pucci <pucci@adacore.com>
558 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Call
559 to Make_Aspect_For_PPC_In_Gen_Sub_Decl added in ASIS mode.
560 * sem_prag.adb, sem_prag.ads (Make_Aspect_For_PPC_In_Gen_Sub_Decl): New
561 routine. In ASIS mode, convert any PPC pragmas into aspects in generic
562 subprogram declaration in order to enable the analysis of PPC boolean
565 2012-01-23 Robert Dewar <dewar@adacore.com>
567 * sem_ch3.adb (Analyze_Object_Declaration): Properly
568 handle Current_Value for volatile variables (also propagate
569 Treat_As_Volatile from type to object).
571 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
573 * sem_ch12.adb (Install_Body): Detect the case
574 where the enclosing context is a package with a stub body that
575 has already been replaced by the actual body. In such cases,
576 the freeze node for the enclosing context must be inserted after
579 2012-01-23 Ed Schonberg <schonberg@adacore.com>
581 * sem_prag.adb (Analyze_Pragma, case Debug): Freeze the called
582 subprogram before expanding the pragma into an if-statement with
583 a block, to ensure that when the subprogram is null its body is
584 properly generated before expansion.
586 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
588 * sem_ch12.adb (Analyze_Associations): Alphabetize local variables and
589 constants. Rename Actual_Types to Actuals_To_Freeze. Rename Next_Formal
591 Freeze all eligible subprograms which appear as actuals in
593 (Has_Fully_Defined_Profile): New routine.
594 (Renames_Standard_Subprogram): New routine.
595 (Earlier): Add local variable N. Comment update. Do not use source
596 locations when trying to determine whether one node precedes another.
598 2012-01-23 Gary Dismukes <dismukes@adacore.com>
600 * exp_ch4.adb (Expand_Concatenate): In the case
601 where the result of a concatentation can be null, set the to
602 result have both the low and high bounds of the right operand (not
603 just the high bound, as was the case prior to this fix). Also,
604 fix the saved high bound setting (Last_Opnd_High_Bound) in the
605 empty string literal case (should have been low bound minus one,
606 rather than plus one).
608 2012-01-23 Thomas Quinot <quinot@adacore.com>
610 * scos.ads, put_scos.adb, get_scos.adb (Get_SCOs, Put_SCOs): Do not
611 omit statement SCOs for disabled pragmas.
613 2012-01-23 Matthew Heaney <heaney@adacore.com>
615 * a-cohase.ads, a-cihase.ads, a-cbhase.ads, a-coorse.ads,
616 a-ciorse.ads, a-cborse.ads, a-cohama.ads, a-cihama.ads, a-cbhama.ads,
617 a-coorma.ads, a-ciorma.ads, a-cborma.ads, a-cdlili.ads, a-cidlli.ads,
618 a-cbdlli.ads, a-convec.ads, a-coinve.ads, a-cobove.ads (Cursor'Read,
619 Cursor'Write): Declare in private part.
620 (Reference_Type'Read, Reference_Type'Write): Ditto.
621 (Constant_Reference_Type'Read, Constant_Reference_Type'Write): Ditto.
623 2012-01-23 Robert Dewar <dewar@adacore.com>
625 * a-catizo.ads, a-calend.adb, a-calend.ads, par-ch13.adb: Minor
628 2012-01-23 Ed Schonberg <schonberg@adacore.com>
630 * sem_ch6.adb (Analyze_Subprogram_Declaration): Do not set the
631 Corresponding_Body on a defaulted null formal subprogram.
632 * sem_ch12.adb (Check_Formal_Package_Instance): No check needed
633 on a defaulted formal subprogram that is a null procedure.
635 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
637 * exp_ch9.adb: Update the comments involving pragma Implemented.
638 * sem_ch3.adb (Check_Pragma_Implemented (Entity_Id)): Add local
639 constant Subp_Alias and local variable Impl_Subp. Properly
640 handle aliases of synchronized wrappers. Code cleanup.
641 (Check_Pragma_Implemented (Entity_Id; Entity_Id)): Add
642 Name_Optional as part of the condition.
643 * sem_prag.adb (Analyze_Pragma): Add "Optional" as one of the
644 valid choices of implementation kind.
645 (Check_Arg_Is_One_Of): New routine.
646 * snames.ads-tmlp: Add Name_Optional.
648 2012-01-23 Ed Schonberg <schonberg@adacore.com>
650 * par-ch13.adb: Better error recovery in illegal aspect
653 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
655 * a-calend.adb: Add with clause for Interfaces.C. Add constant
657 (Day_Of_Week): Call the internal UTC_Time_Offset.
658 (Split): Call the internal UTC_Time_Offset.
659 (Time_Of): Call the internal UTC_Time_Offset.
660 (Time_Zone_Operations.UTC_Time_Offset): Call internal UTC_Time_Offset.
661 (UTC_Time_Offset): New library-level routine.
662 * a-calend.ads (UTC_Time_Offset): Remove parameter
663 Is_Historic. Update related comment on usage.
664 * a-catizo.adb (UTC_Time_Offset): Removed.
665 (UTC_Time_Offset (Time)): Call Time_Zone_Operations.UTC_Time_Offset.
666 * a-caltizo.ads (UTC_Time_Offset): Removed.
667 (UTC_Time_Offset (Time)): Add back the default expression of parameter
670 2012-01-23 Robert Dewar <dewar@adacore.com>
672 * sprint.ads, sprint.adb (Sprint_Node_List): Add New_Lines parameter
673 (pg,po,ps): Make sure each entry starts on new line.
675 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
677 * a-calend.ads, a-calend.adb: Define types int and int_Pointer. Update
678 the parameter profile of procedure localtime_tzoff and its associated
680 (Day_Of_Week): Do not treat the input date as historical
681 with respect to time zones.
682 (Split): Do not treat the input
683 date as historical with respect to time zones. (Time_Of): Do
684 not treat the input constituents as forming a historical date
685 with respect to time zones.
686 (UTC_Time_Offset): Add new formal
687 parameter Is_Historic. Add local variable Flag. Update the call
689 * a-catizo.ads, a-catizo.adb (UTC_Time_Offset): New routine.
690 (UTC_Time_Offset (Time)): Update the call to
691 Time_Zone_Operations.UTC_Time_Offset.
692 * sysdep.c (__gnat_localtime_tzoff): Update parameter
693 profile. Split the processing of offsets on Windows into two - one
694 part of historic time stamps and the other for the current time.
696 2012-01-23 Robert Dewar <dewar@adacore.com>
698 * a-calend.adb: Minor reformatting.
700 2012-01-23 Ed Schonberg <schonberg@adacore.com>
702 * exp_ch9.adb, sem_ch9.adb: Handle array of access to synchronized
703 interface in requeue statement.
705 2012-01-23 Cyrille Comar <comar@adacore.com>
707 * projects.texi: Remove references to main units and replace
708 with references to main programs to be coherent with the
711 2012-01-23 Robert Dewar <dewar@adacore.com>
713 * s-utf_32.adb: Minor reformatting.
715 2012-01-23 Vincent Celier <celier@adacore.com>
717 * snames.ads-tmpl: Minor comment addition Indicate that
718 Name_Library_Encapsulated_Options is only used in gprbuild.
720 2012-01-23 Robert Dewar <dewar@adacore.com>
722 * sem_ch10.adb (Analyze_Subunit): Properly save/restore cunit
725 2012-01-23 Ed Schonberg <schonberg@adacore.com>
727 * snames.ads-tmpl: Add Name_Synchronization.
728 * aspects.ads, aspects.adb: Add Aspect_Synchronization to
729 enumeration type and related maps.
730 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle Aspect
731 Synchronization, build corresponding pragma Implemented.
732 * sem_util.adb (Implementation_Kind): Handle both explicit and
733 implicit pragma_argument association to retrieve the given
734 synchronization mode.
736 2012-01-23 Robert Dewar <dewar@adacore.com>
738 * sem_ch10.adb, errout.adb: Minor reformatting.
740 2012-01-23 Ed Schonberg <schonberg@adacore.com>
742 * sem_res.adb (Resolve_Actuals): An actual in a call to an
743 Ada 2012 Reference function does not lead to a dangerous order
746 2012-01-23 Gary Dismukes <dismukes@adacore.com>
748 * exp_util.adb (Is_Iterated_Container): Test
749 Is_Entity_Name when searching for calls to the default iterator,
750 to avoid blowing up on indirect calls which have an explicit
751 dereference as the call name.
753 2012-01-23 Thomas Quinot <quinot@adacore.com>
755 * errout.adb (Set_Msg_Node): For an N_Expanded_Name, output
756 the complete expanded name, rather than just its Selector_Name.
758 2012-01-23 Thomas Quinot <quinot@adacore.com>
760 * a-textio.adb (Put): Rewrite one-parameter Character version to
761 just call the two-parameter one with Current_Out.
763 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
765 * freeze.adb (Check_Current_Instance): Issue an
766 error when the prefix of 'Unchecked_Access or 'Access does not
767 denote a legal aliased view of a type.
768 (Freeze_Record_Type): Do not halt the processing of record components
769 once the Has_Controlled_Component is set as this bypasses the remaining
771 (Is_Aliased_View_Of_Type): New routine.
773 2012-01-23 Thomas Quinot <quinot@adacore.com>
775 * errout.ads, freeze.adb: Minor reformatting.
777 2012-01-23 Thomas Quinot <quinot@adacore.com>
779 * sem_ch10.adb, sem_prag.adb: Remove redundant apostrophes in error
782 2012-01-23 Olivier Hainque <hainque@adacore.com>
784 * adadecode.c (__gnat_decode): Deal with empty input early,
785 preventing potential erroneous memory access later on.
787 2012-01-21 Eric Botcazou <ebotcazou@adacore.com>
790 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: In the case of a
791 renaming, preserve the volatileness through the indirection, if any.
793 2012-01-14 Andreas Schwab <schwab@linux-m68k.org>
795 * gcc-interface/Makefile.in (OSCONS_EXTRACT): Add
798 2012-01-10 Pascal Obry <obry@adacore.com>
800 * prj-nmsc.adb (Check_Library_Attributes):
801 Kill check for object/source directories for aggregate libraries.
803 2012-01-10 Matthew Heaney <heaney@adacore.com>
805 * a-cdlili.adb, a-cdlili.ads, a-cihama.adb, a-cihama.ads, a-coinve.adb,
806 a-coinve.ads, a-ciorse.adb, a-ciorse.ads, a-coorma.adb, a-coorma.ads,
807 a-cborma.adb, a-cborma.ads, a-cidlli.adb, a-cidlli.ads, a-cimutr.adb,
808 a-cimutr.ads, a-cihase.adb, a-cihase.ads, a-cohama.adb, a-cohama.ads,
809 a-coorse.adb, a-coorse.ads, a-cbhama.adb, a-cbhama.ads, a-cborse.adb,
810 a-cborse.ads, a-comutr.adb, a-comutr.ads, a-ciorma.adb, a-cobove.adb,
811 a-ciorma.ads, a-cobove.ads, a-convec.adb, a-convec.ads, a-cohase.adb,
812 a-cohase.ads, a-cbdlli.adb, a-cbdlli.ads, a-cbmutr.adb, a-cbmutr.ads,
813 a-cbhase.adb, a-cbhase.ads (Reference, Constant_Reference): Declare
814 container parameter as aliased in/in out.
817 2012-01-10 Bob Duff <duff@adacore.com>
819 * s-os_lib.ads: Improve comment.
821 2012-01-10 Geert Bosch <bosch@adacore.com>
823 * s-gearop.adb (Forward_Eliminate): Avoid improper aliasing
826 2012-01-10 Bob Duff <duff@adacore.com>
828 * sem_intr.adb (Check_Shift): Use RM_Size instead of Esize, when
829 checking that the 'Size is correct. If the type is "mod 2**12",
830 for example, it's illegal, but Esize is the 'Object_Size, which
831 will be something like 16 or 32, so the error ('Size = 12) was
833 * gnat_rm.texi: Improve documentation of shift
834 and rotate intrinsics.
836 2012-01-10 Pascal Obry <obry@adacore.com>
838 * prj.adb (For_Every_Project_Imported): Fix
839 implementation to make sure we return each project only once
840 for aggragte libraries. It is fine to return a project twice for
841 aggregate projects, this was the case as a Project_Id is different
842 in each project tree. The new implementation use a table based on
843 the project name to ensure proper detection of duplicate project
844 in aggregate library. A new context is then created to continue
845 retrurning duplicate project for aggregate libraries.
847 2012-01-09 Eric Botcazou <ebotcazou@adacore.com>
849 * gcc-interface/trans.c (call_to_gnu): Create the temporary for the
850 return value in the variable-sized return type case if the target is
851 an array with fixed size. However, do not create it if this is the
852 expression of an object declaration.
854 2012-01-09 Eric Botcazou <ebotcazou@adacore.com>
856 * gcc-interface/trans.c (addressable_p) <COMPONENT_REF>: Fix thinko.
858 2012-01-06 Robert Dewar <dewar@adacore.com>
860 * a-wichha.ads, a-wichun.ads, a-zchhan.ads, a-zchuni.ads,
861 s-utf_32.ads: Add pragma Pure
862 * s-utf_32.adb: Suppress warnings on non-static constants (now
865 2012-01-06 Bob Duff <duff@adacore.com>
867 * s-rpc.ads (Read, Write): Add overriding indicators.
869 2012-01-06 Robert Dewar <dewar@adacore.com>
871 * gnat_rm.texi: Add documentation for conventions
872 Ada_Pass_By_Copy and Ada_Pass_By_Reference.
874 2012-01-06 Gary Dismukes <dismukes@adacore.com>
876 * a-tienio.adb (Put): Add exception message on
877 raise statements. Remove unneeded blocks and object declarations.
879 2012-01-06 Robert Dewar <dewar@adacore.com>
881 * sem_prag.adb: Minor reformatting.
883 2012-01-06 Ed Schonberg <schonberg@adacore.com>
885 * sinfo.ads, sinfo.adb (Has_Prefixed_Call): New flag to indicate
886 that a selected component within a generic unit has been resolved
887 as a prefixed call with local references.
888 * sem_ch3.adb (Is_Visible_Component): In an instance body a selected
889 component is always visible.
890 * sem_ch4.adb (Analyze_Selected_Component): If the node is a
891 prefixed call in an instance, do not look for visible components
893 * sem_ch12.adb (Reset_Entity): If a selected component has resolved
894 to a prefixed call, mark the node accordingly when prefix and
895 selector are local references.
897 2012-01-02 Eric Botcazou <ebotcazou@adacore.com>
899 * gnatvsn.ads (Current_Year): Bump to 2012.
901 Copyright (C) 2012 Free Software Foundation, Inc.
903 Copying and distribution of this file, with or without modification,
904 are permitted in any medium without royalty provided the copyright
905 notice and this notice are preserved.