1 2010-06-17 Ed Schonberg <schonberg@adacore.com>
3 * exp_ch4.adb: expand NOT for VMS types.
4 * sem_util.adb: Use OpenVMS_On_Target for IS_VMS_Operator.
6 2010-06-17 Sergey Rybin <rybin@adacore.com>
8 * vms_data.ads: Add qualifier for '--no-elim-dispatch' gnatelim option.
9 * gnat_ugn.texi (gnatelim): add description for --no-elim-dispatch
12 2010-06-17 Ed Schonberg <schonberg@adacore.com>
14 * exp_ch6.adb (Expand_Call): Do not expand a call to an internal
15 protected operation if the subprogram has been eliminated.
17 2010-06-17 Vincent Celier <celier@adacore.com>
19 * prj-nmsc.adb (Check_Library_Attributes): Allow the different
20 directories associated with a library to be any directory when the
21 library project is externally built.
23 2010-06-17 Vincent Celier <celier@adacore.com>
25 * make.adb (Check): If switch -m is used, deallocate the memory that
26 may be allocated when computing the checksum.
28 2010-06-17 Eric Botcazou <ebotcazou@adacore.com>
30 * g-socthi-mingw.adb (C_Recvmsg): Add 'use type' clause for C.size_t;
31 (C_Sendmsg): Likewise.
33 2010-06-17 Thomas Quinot <quinot@adacore.com>
35 * sem_res.adb: Update comments.
37 2010-06-17 Vincent Celier <celier@adacore.com>
39 * back_end.adb (Scan_Compiler_Arguments): Process last argument
41 2010-06-17 Robert Dewar <dewar@adacore.com>
43 * exp_ch3.adb, exp_ch6.adb, exp_smem.adb, exp_util.adb: Use Ekind_In.
44 * layout.adb, freeze.adb: Use Make_Temporary.
46 2010-06-17 Jerome Lambourg <lambourg@adacore.com>
48 * exp_ch11.adb (Expand_N_Raise_Statement): Expand raise statements in
49 .NET/JVM normally as this is now perfectly supported by the backend.
51 2010-06-17 Pascal Obry <obry@adacore.com>
53 * gnat_rm.texi: Fix minor typo, remove duplicate blank lines.
55 2010-06-17 Vincent Celier <celier@adacore.com>
57 * make.adb (Collect_Arguments_And_Compile): Create include path file
58 only when -x is specified.
60 * opt.ads (Use_Include_Path_File): New Boolean flag, initialized to
62 * prj-env.adb (Set_Ada_Paths): New Boolean parameters Include_Path and
63 Objects_Path, defaulted to True. Only create include path file if
64 Include_Path is True, only create objects path file if Objects_Path is
66 * prj-env.ads (Set_Ada_Paths): New Boolean parameters Include_Path and
67 Objects_Path, defaulted to True.
68 * switch-m.adb (Scan_Make_Switches): Set Use_Include_Path_File to True
71 2010-06-17 Ed Schonberg <schonberg@adacore.com>
73 * exp_disp.adb (Build_Interface_Thunk): Use base type of formal to
74 determine whether it has the controlling type, when the formal is an
77 2010-06-17 Eric Botcazou <ebotcazou@adacore.com>
79 * s-crtl.ads (ssize_t): New type.
80 (read): Fix signature.
82 * g-socthi.ads: Add 'with System.CRTL' clause. Remove ssize_t and
83 'use type' directive for C.size_t, add one for System.CRTL.ssize_t.
84 (C_Recvmsg): Replace ssize_t with System.CRTL.ssize_t.
85 (C_Sendmsg): Likewise.
86 * g-socthi.adb (Syscall_Recvmsg): Likewise.
87 (Syscall_Sendmsg): Likewise.
88 (C_Recvmsg): Likewise.
89 (C_Sendmsg): Likewise.
90 * g-socthi-mingw.ads: Add 'with System.CRTL' clause. Remove ssize_t
91 and 'use type' directive for C.size_t, add one for System.CRTL.ssize_t.
92 (C_Recvmsg): Replace ssize_t with System.CRTL.ssize_t.
93 (C_Sendmsg): Likewise.
94 * g-socthi-mingw.adb (C_Recvmsg): Likewise.
95 (C_Sendmsg): Likewise.
96 * g-socthi-vms.ads: Add 'with System.CRTL' clause. Remove ssize_t and
97 'use type' directive for C.size_t, add one for System.CRTL.ssize_t.
98 (C_Recvmsg): Replace ssize_t with System.CRTL.ssize_t.
99 (C_Sendmsg): Likewise.
100 * g-socthi-vms.adb (C_Recvmsg): Likewise.
101 (C_Sendmsg): Likewise.
102 * g-socthi-vxworks.ads Add 'with System.CRTL' clause. Remove ssize_t
103 and 'use type' directive for C.size_t, add one for System.CRTL.ssize_t.
104 (C_Recvmsg): Replace ssize_t with System.CRTL.ssize_t.
105 (C_Sendmsg): Likewise.
106 * g-socthi-vxworks.adb (C_Recvmsg): Likewise.
107 (C_Sendmsg): Likewise.
108 * g-sercom-linux.adb (Read): Use correct types to call 'read'.
109 (Write): Likewise to call 'write'.
110 * s-os_lib.adb (Read): Use correct type to call System.CRTL.read.
111 (Write): Use correct type to call System.CRTL.write.
112 * s-tasdeb.adb (Write): Likewise.
114 2010-06-17 Vincent Celier <celier@adacore.com>
116 * prj-proc.adb (Copy_Package_Declarations): Change argument name
117 Naming_Restricted to Restricted. If Restricted is True, do not copy the
118 value of attribute Linker_Options.
120 2010-06-17 Eric Botcazou <ebotcazou@adacore.com>
122 * gcc-interface/trans.c (push_stack, pop_stack): Delete.
123 (Case_Statement_to_gnu): Adjust.
124 (Loop_Statement_to_gnu): Likewise.
125 (Subprogram_Body_to_gnu): Likewise.
126 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
127 (Compilation_Unit_to_gnu): Likewise.
129 2010-06-17 Robert Dewar <dewar@adacore.com>
131 * exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_pakd.adb, exp_prag.adb,
132 exp_sel.adb, exp_util.adb, sem_ch10.adb, sem_ch12.adb, sem_ch13.adb,
133 sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch8.adb, sem_ch9.adb,
134 sem_dist.adb, sem_util.adb: Use Make_Temporary
135 * itypes.ads, tbuild.ads: Minor comment update
136 * exp_ch9.adb, exp_dist.adb: Minor reformatting
138 2010-06-17 Thomas Quinot <quinot@adacore.com>
140 * exp_imgv.adb, exp_ch7.ads: Minor reformatting.
142 2010-06-17 Robert Dewar <dewar@adacore.com>
144 * exp_ch9.adb, exp_disp.adb, exp_dist.adb: Use Make_Temporary.
146 2010-06-17 Thomas Quinot <quinot@adacore.com>
148 * sprint.adb (pg): Set Dump_Freeze_Null, to be consistent with -gnatdg.
150 2010-06-17 Robert Dewar <dewar@adacore.com>
152 * exp_ch6.adb, exp_ch7.adb, exp_ch5.adb: Use Make_Temporary
153 * tbuild.ads (Make_Temporary): More comment updates
154 * tbuild.adb: Minor reformatting
156 2010-06-17 Robert Dewar <dewar@adacore.com>
158 * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch11.adb,
159 exp_ch3.adb, exp_ch4.adb: Minor code reorganization.
161 * tbuild.ads, tbuild.adb (Make_Temporary): Clean up, use Entity_Id
163 (Make_Temporary): Add more extensive documentation
165 2010-06-17 Robert Dewar <dewar@adacore.com>
167 * sem_intr.adb, sem_prag.adb, sem_res.adb, sem_type.adb, sem_util.adb,
168 sem_warn.adb, sem_eval.adb: Minor reformatting. Use Ekind_In.
169 (Set_Slice_Subtype): Explicitly freeze the slice's itype at the point
170 where the slice's actions are inserted.
171 (Decompose_Expr): Account for possible rewriting of slice bounds
172 resulting from side effects suppression caused by the above freezing,
173 so that folding of bounds is preserved by such rewriting.
175 2010-06-17 Robert Dewar <dewar@adacore.com>
177 * einfo.ads, einfo.adb (Get_Record_Representation_Clause): New function.
178 * freeze.adb (Freeze_Record_Type): Add call to
179 Check_Record_Representation_Clause.
180 * sem_ch13.adb (Check_Record_Representation_Clause): New function
181 (Analyze_Record_Representation_Clause): Split out overlap code into this
183 (Check_Component_Overlap): Moved inside
184 Check_Record_Representation_Clause.
185 * sem_ch13.ads (Check_Record_Representation_Clause): New function.
187 2010-06-17 Robert Dewar <dewar@adacore.com>
189 * back_end.adb, sem_res.adb, switch-c.adb, sem_scil.adb: Minor
191 * sem_attr.adb, sem_cat.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb,
192 sem_eval.adb: Use Ekind_In
194 2010-06-17 Ed Schonberg <schonberg@adacore.com>
196 * sem_ch8.adb: better error message for illegal inherited discriminant
198 2010-06-17 Vincent Celier <celier@adacore.com>
200 * bindusg.adb: Remove lines for -A and -C
201 * gnat_ugn.texi: Remove all documentation and examples of switches -A
202 and -C for gnatbind and gnatlink.
203 * gnatlink.adb (Usage): Remove lines for -A and -C
204 * switch-b.adb (Scan_Binder_Switches): Issue warning when switch -C is
206 * gcc-interface/Make-lang.in: Update dependencies.
208 2010-06-17 Vincent Celier <celier@adacore.com>
210 * back_end.adb (Scan_Compiler_Arguments): Put all arguments in new
211 local Argument_List variable Args.
212 * switch-c.adb (Scan_Front_End_Switches): New Argument_List argument
214 (Switch_Subsequently_Cancelled): New Argument_List argument Args. Look
215 for subsequent switches in Args.
216 * switch-c.ads (Scan_Front_End_Switches): New Argument_List argument
218 * gcc-interface/Make-lang.in: Update dependencies.
220 2010-06-17 Robert Dewar <dewar@adacore.com>
222 * einfo.adb: Minor code fix, allow E_Class_Wide_Type for
223 Equivalent_Type to match documentation.
225 2010-06-17 Robert Dewar <dewar@adacore.com>
227 * sem_ch6.adb, sem_ch7.adb: Minor reformatting.
228 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_ch10.adb, sem_ch12.adb,
229 sem_ch4.adb, sem_ch8.adb, sem_ch13.adb: Make use of Ekind_In.
231 2010-06-17 Thomas Quinot <quinot@adacore.com>
233 * sem_res.adb (Set_Slice_Subtype): Always freeze the slice's itype.
235 2010-06-17 Thomas Quinot <quinot@adacore.com>
237 * freeze.adb (Freeze_Expression): Short circuit operators are valid
238 freeze node insertion points.
240 2010-06-17 Robert Dewar <dewar@adacore.com>
242 * switch-c.ads, switch-c.adb, sem_ch13.adb: Minor reformatting.
243 * sem_ch12.adb: Add pragmas Assert and Check to previous change.
245 2010-06-17 Gary Dismukes <dismukes@adacore.com>
247 * layout.adb (Layout_Type): Broaden test for setting an array type's
248 Component_Size to include all scalar types, not just discrete types
249 (components of real types were missed).
250 * sem_ch3.adb (Constrain_Index): Add missing setting of First_Literal
251 on the itype created for an index (consistent with Make_Index and
252 avoids possible Assert_Failures).
254 2010-06-17 Robert Dewar <dewar@adacore.com>
256 * atree.ads, atree.adb: Add 6-parameter version of Ekind_In
257 * einfo.adb: Minor code reformatting (use Ekind_In)
259 2010-06-17 Robert Dewar <dewar@adacore.com>
261 * sem_warn.adb (Test_Ref): Abandon scan if access subprogram parameter
264 2010-06-17 Vincent Celier <celier@adacore.com>
266 * back_end.adb: Minor comment updates
267 * switch-c.adb: Remove dependencies on gcc C sources
268 * gcc-interface/Make-lang.in: Add a-comlin.o to the object file list
271 2010-06-17 Ed Schonberg <schonberg@adacore.com>
273 * sem_ch12.adb: propagate Pragma_Enabled flag to generic.
274 * get_scos.adb: Set C2 flag in decision entry of pragma to 'e' (enabled)
275 * par_sco.ads, par_sco.adb (Set_SCO_Pragma_Enabled): New procedure
276 Remove use of Node field in SCOs table
277 (Output_Header): Set 'd' to initially disable pragma entry
278 * put_scos.adb (Put_SCOs): New flag indicating if pragma is enabled
279 * scos.ads, scos.adb: Remove Node field from internal SCOs table.
280 Use C2 field of pragma decision header to indicate enabled.
281 * sem_prag.adb: Add calls to Set_SCO_Pragma_Enabled.
282 * gcc-interface/Make-lang.in: Update dependencies.
284 2010-06-17 Vincent Celier <celier@adacore.com>
286 * back_end.adb (Next_Arg): Moved to procedure Scan_Compiler_Arguments
287 (Scan_Compiler_Arguments): Call Scan_Front_End_Switches with Next_Arg
288 (Switch_Subsequently_Cancelled): Function moved to the body of Switch.C
289 * back_end.ads (Scan_Front_End_Switches): Function moved to the body of
291 * switch-c.adb: Copied a number of global declarations from back_end.adb
292 (Len_Arg): New function copied from back_end.adb
293 (Switch_Subsequently_Cancelled): New function moved from back_end.adb
294 (Scan_Front_End_Switches): New parameter Arg_Rank used to call
295 Switch_Subsequently_Cancelled.
296 * switch-c.ads (Scan_Front_End_Switches): New parameter Arg_Rank.
297 * gcc-interface/Makefile.in: Add line so that shared libgnat is linked
300 2010-06-17 Robert Dewar <dewar@adacore.com>
302 * prj.ads, prj.adb: Minor reformatting
304 2010-06-17 Thomas Quinot <quinot@adacore.com>
306 * put_scos.adb: Do not generate a blank line in SCOs when omitting the
307 CP line for a disabled pragma.
309 2010-06-17 Emmanuel Briot <briot@adacore.com>
311 * prj-proc.adb, prj.adb, prj.ads (Check_Or_Set_Typed_Variable): New
313 (Process_Declarative_Item): An invalid value in an typed variable
314 declaration is no longer always fatal.
316 2010-06-16 Arnaud Charlet <charlet@adacore.com>
318 * get_scos.adb, par_sco.adb, par_sco.ads, put_scos.adb, scos.adb,
319 scos.ads, exp_ch4.adb, sem_warn.adb: Code clean up, update
322 2010-06-16 Javier Miranda <miranda@adacore.com>
324 * exp_disp.adb (Expand_Dispatching_Call): Adjust the decoration of the
325 node referenced by the SCIL node of dispatching "=" to skip the tags
328 2010-06-16 Ed Schonberg <schonberg@adacore.com>
330 * sem_ch5.adb (Analyze_Exit_Statement): Return if no enclosing loop,
331 to prevent cascaded errors and compilation aborts.
333 2010-06-16 Robert Dewar <dewar@adacore.com>
335 * back_end.adb (Switch_Subsequently_Cancelled): New function
336 Move declarations to package body level to support this change
337 * back_end.ads (Switch_Subsequently_Cancelled): New function
338 * gnat_ugn.texi: Document -gnat-p switch
339 * switch-c.adb (Scan_Front_End_Switches): Implement -gnat-p switch
340 * ug_words: Add entry for -gnat-p (UNSUPPRESS_ALL)
341 * usage.adb: Add line for -gnat-p switch
342 * vms_data.ads: Add entry for UNSUPPRESS_ALL (-gnat-p)
344 2010-06-16 Robert Dewar <dewar@adacore.com>
346 * sem_warn.adb (Check_Infinite_Loop_Warning): Declaration counts as
349 2010-06-16 Robert Dewar <dewar@adacore.com>
351 * exp_disp.adb: Minor reformatting
353 2010-06-16 Ed Schonberg <schonberg@adacore.com>
355 * sem_ch3.adb (Complete_Private_Subtype): Inherit class_wide type from
356 base type only if it was not previously created for the partial view.
358 2010-06-16 Thomas Quinot <quinot@adacore.com>
360 * tbuild.ads: Minor comment fix
362 2010-06-15 Nathan Froyd <froydnj@codesourcery.com>
364 * gcc-interface/trans.c (gnu_stack_free_list): Delete.
365 (gnu_except_ptr_stack): Change type to VEC. Update comment.
366 (gnu_elab_proc_stack): Likewise.
367 (gnu_return_label_stack): Likewise.
368 (gnu_loop_label_stack): Likewise.
369 (gnu_switch_label_stack): Likewise.
370 (gnu_constraint_label_stack): Likewise.
371 (gnu_storage_error_label_stack): Likewise.
372 (gnu_program_error_label_stack): Likewise.
373 (push_exception_label_stack): Take a VEC ** instead of a tree *.
374 (push_stack): Likewise. Remove unused second parameter. Update
376 (pop_stack): Take a VEC * instead of a tree *. Update callers.
377 (gigi): Initialize stacks as VECs.
378 (Identifier_to_gnu): Use VEC_last instead of TREE_VALUE.
379 (Case_Statement_to_gnu): Likewise.
380 (Subprogram_Body_to_gnu): Likewise.
381 (call_to_gnu): Likewise.
382 (Exception_Handler_to_gnu_sjlj): Likewise.
383 (gnat_to_gnu): Likewise.
384 (get_exception_label): Likewise.
386 2010-06-14 Ed Schonberg <schonberg@adacore.com>
388 * sem_ch3.adb (Build_Derived_Record_Type): if derived type is an
389 anonymous base generated when the parent is a constrained discriminated
390 type, propagate interface list to first subtype because it may appear
391 in a current instance within the extension part of the derived type
392 declaration, and its own subtype declaration has not been elaborated
394 * exp_disp.adb (Build_Interface_Thunk): Use base type of formal to
395 determine whether it has the controlling type.
397 2010-06-14 Jerome Lambourg <lambourg@adacore.com>
399 * exp_ch11.adb (Expand_N_Raise_Statement): Make sure that the explicit
400 raise of CE, SE and PE have the reason correctly set and are properly
401 expanded before stopping the expansions of .NET/JVM exceptions.
403 2010-06-14 Robert Dewar <dewar@adacore.com>
405 * opt.ads (Check_Policy_List): Add some clarifying comments
406 * sem_prag.adb (Analyze_Pragma, case Check): Set Pragma_Enabled flag
407 on rewritten Assert pragma.
409 2010-06-14 Gary Dismukes <dismukes@adacore.com>
411 * sem_ch6.adb (Check_Overriding_Indicator): Add a special check for
412 controlled operations, so that they will be treated as overriding even
413 if the overridden subprogram is marked Is_Hidden, as long as the
414 overridden subprogram's parent subprogram is not hidden.
416 2010-06-14 Robert Dewar <dewar@adacore.com>
418 * debug.adb: Entry for gnatw.d no longer specific for while loops
419 * einfo.adb (First_Exit_Statement): New attribute for E_Loop
420 * einfo.ads (First_Exit_Statement): New attribute for E_Loop
421 * sem_ch5.adb (Analyze_Loop_Statement): Check_Infinite_Loop_Warning has
422 new calling sequence to include test for EXIT WHEN.
423 (Analyze_Exit_Statement): Chain EXIT statement into exit statement chain
424 * sem_warn.ads, sem_warn.adb (Check_Infinite_Loop_Warning): Now handles
426 * sinfo.adb (Next_Exit_Statement): New attribute of N_Exit_Statement
428 * sinfo.ads (N_Pragma): Correct comment on Sloc field (points to
429 PRAGMA, not to pragma identifier).
430 (Next_Exit_Statement): New attribute of N_Exit_Statement node
432 2010-06-14 Robert Dewar <dewar@adacore.com>
434 * sem_res.adb (Resolve_Short_Circuit): Fix sloc of "assertion/check
437 2010-06-14 Robert Dewar <dewar@adacore.com>
439 * par-ch2.adb (Scan_Pragma_Argument_Association): Clarify message for
440 missing pragma argument identifier.
442 2010-06-14 Robert Dewar <dewar@adacore.com>
444 * atree.ads, atree.adb (Ekind_In): New functions.
446 2010-06-14 Robert Dewar <dewar@adacore.com>
448 * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**N in stand alone context
450 2010-06-14 Robert Dewar <dewar@adacore.com>
452 * usage.adb (Usage): Redo documentation of -gnatwa.
454 2010-06-14 Ed Schonberg <schonberg@adacore.com>
456 * sem_ch8.adb (Find_Type): The attribute 'class cannot be applied to
457 an untagged incomplete type that is a limited view.
459 2010-06-14 Sergey Rybin <rybin@adacore.com>
461 * gnat_ugn.texi: Add description of '-cargs gcc_switches' to gnatstub
464 2010-06-14 Thomas Quinot <quinot@adacore.com>
466 * exp_ch4.adb (Expand_Short_Circuit_Operator): New subprogram,
467 factoring duplicated code between...
468 (Expand_N_And_Than, Expand_N_Or_Else): Remove duplicated code.
469 * a-envvar.ads: Minor reformatting
471 2010-06-14 Arnaud Charlet <charlet@adacore.com>
473 * ali.adb, ali.ads, lib-xref.ads: Document new '+' letter for C/C++
475 (Scan_ALI): Take into account new Visibility field.
476 (Visibility_Kind): New type.
477 (Xref_Entity_Record): Replace Lib field by Visibility.
479 * gcc-interface/Make-lang.in: Update dependencies.
481 2010-06-14 Pascal Obry <obry@adacore.com>
483 * raise.h: Remove unused defintions.
485 2010-06-14 Bob Duff <duff@adacore.com>
487 * par-ch10.adb (P_Subunit): If the next token after "separate(X)" is
488 Tok_Not or Tok_Overriding, call P_Subprogram. We had previously given
489 the incorrect error "proper body expected".
490 * par-ch6.adb (P_Subprogram): Suppress "overriding indicator not
491 allowed here" error in case of subunits, which was triggered by the
492 above change to P_Subunit.
494 2010-06-14 Sergey Rybin <rybin@adacore.com>
496 * gnat_ugn.texi, vms_data.ads: Update gnatelim doc.
498 2010-06-14 Thomas Quinot <quinot@adacore.com>
500 * lib-util.adb: Minor code reorganization.
502 2010-06-14 Robert Dewar <dewar@adacore.com>
504 * ali.adb (Scan_ALI): Implement reading and storing of N lines
505 (Known_ALI_Lines): Add entry for 'N' (notes)
506 * ali.ads (Notes): New table to store Notes information
507 * alloc.ads: Add entries for Notes table
508 * lib-util.adb (Write_Info_Int): New procedure
509 (Write_Info_Slit): New procedure
510 (Write_Info_Uint): New procedure
511 * lib-util.ads (Write_Info_Int): New procedure
512 (Write_Info_Slit): New procedure
513 (Write_Info_Uint): New procedure
514 * lib-writ.adb (Write_Unit_Information): Output N (notes) lines
515 * lib-writ.ads: Update documentation for N (Notes) lines
516 * lib.adb (Store_Note): New procedure
517 * lib.ads (Notes): New table
518 (Store_Note): New procedure
519 * sem_prag.adb: Call Store_Note for affected pragmas
521 2010-06-14 Thomas Quinot <quinot@adacore.com>
523 * socket.c: Fix wrong condition in #ifdef
524 * g-socket.adb, g-sothco.ads: Functions imported from socket.c that
525 take or return char* values can't use Interfaces.C.Strings.chars_ptr,
526 because on VMS this type is a 32-bit pointer which is not compatible
527 with the default for C pointers for code compiled with gcc on that
530 2010-06-14 Ed Schonberg <schonberg@adacore.com>
532 * sem_util (Is_VMS_Operator): New predicate to determine whether an
533 operator is an intrinsic operator declared in the DEC system extension.
534 * sem_res.adb (Resolve_Logical_Op): operation is legal on signed types
535 if the operator is a VMS intrinsic.
536 * sem_eval.adb (Eval_Logical_Op): Operation is legal and be
537 constant-folded if the operands are signed and the operator is a VMS
540 2010-06-14 Robert Dewar <dewar@adacore.com>
542 * g-socket.adb, gnatcmd.adb: Minor reformatting.
544 2010-06-14 Pascal Obry <obry@adacore.com>
546 * s-finimp.adb: Fix typo.
547 * raise.h: Remove duplicate blank line.
549 2010-06-14 Vincent Celier <celier@adacore.com>
551 * prj-nmsc.adb (Add_Sources): Always set the object file and the
552 switches file names, as the configuration of the language may change
553 in an extending project.
554 (Process_Naming_Scheme): For sources of projects that are extended, set
555 the configuration of the language from the highest extending project
556 where the language is declared.
558 2010-06-14 Gary Dismukes <dismukes@adacore.com>
560 * sem_res.adb (Resolve_Call): For infinite recursion check, test
561 whether the called subprogram is inherited from a containing subprogram.
562 (Same_Or_Aliased_Subprograms): New function
564 2010-06-14 Ed Schonberg <schonberg@adacore.com>
566 * sem_ch8.adb (End_Use_Type): Before indicating that an operator is not
567 use-visible, check whether it is a primitive for more than one type.
569 2010-06-14 Robert Dewar <dewar@adacore.com>
571 * sem_ch3.adb (Copy_And_Swap): Copy Has_Pragma_Unmodified flag.
573 * sem_ch7.adb (Preserve_Full_Attributes): Preserve
574 Has_Pragma_Unmodified flag.
576 2010-06-14 Thomas Quinot <quinot@adacore.com>
578 * g-sttsne-locking.adb, g-sttsne-locking.ads, g-sttsne.ads,
579 g-sttsne-vxworks.adb, g-sttsne-dummy.ads: Removed. Mutual exclusion is
580 now done in GNAT.Sockets if necessary.
581 * gsocket.h, g-socket.adb, g-sothco.ads (GNAT.Sockets.Get_XXX_By_YYY):
582 Ensure mutual exclusion for netdb operations if the target platform
584 (GNAT.Sockets.Thin_Common): New binding for getXXXbyYYY, treating struct
585 hostent as an opaque type to improve portability.
586 * s-oscons-tmplt.c, socket.c: For the case of Vxworks, emulate
587 gethostbyYYY using proprietary VxWorks API so that a uniform interface
588 is available for the Ada side.
589 * gcc-interface/Makefile.in: Remove g-sttsne-*
590 * gcc-interface/Make-lang.in: Update dependencies.
592 2010-06-14 Vincent Celier <celier@adacore.com>
594 * gnatcmd.adb (Mapping_File): New function.
596 2010-06-14 Javier Miranda <miranda@adacore.com>
598 * sem_ch3.adb (Derive_Subprograms): Remove over-restrictive assertion.
600 2010-06-14 Arnaud Charlet <charlet@adacore.com>
603 * s-auxdec-vms-alpha.adb, scng.ads: Minor reformatting.
605 2010-06-14 Ed Schonberg <schonberg@adacore.com>
607 * sem_ch12.adb: Make Mark_Context transitive, and apply to subprogram
610 * sem_ch8.adb (Find_Expanded_Name): If a candidate compilation unit in
611 the context does not have a homonym of the selector, emit default
614 2010-06-14 Robert Dewar <dewar@adacore.com>
616 * sem.adb, sem_ch12.adb, sem_util.adb: Minor reformatting and
619 2010-06-14 Arnaud Charlet <charlet@adacore.com>
621 * lib-xref.ads: Doc updates:
622 - Allocate 'Q' for #include entity kind
624 - Allocate 'g' for regular macros
625 - Allocate 'G' for function-like macros
627 2010-06-14 Ed Schonberg <schonberg@adacore.com>
629 * sinfo.ads, sinfo.adb (Withed_Body): New attribute of a with_clause.
630 Indicates that there is an instantiation in the current unit that
631 loaded the body of the unit denoted by the with_clause.
632 * sem_ch12.adb (Mark_Context): When instanting a generic body, check
633 whether a with_clause in the current context denotes the unit that
634 holds the generic declaration, and mark the with_clause accordingly.
635 (Instantiate_Package_Body): call Mark_Context.
636 * sem.adb (Process_Bodies_In_Context): Use Withed_Body to determine
637 whether a given body should be traversed before the spec of the main
640 2010-06-14 Ed Falis <falis@adacore.com>
642 * sysdep.c: Fix 653 build against vThreads headers.
644 2010-06-14 Robert Dewar <dewar@adacore.com>
646 * sinfo.ads: Minor reformatting.
648 2010-06-14 Ed Schonberg <schonberg@adacore.com>
650 * sem_ch6.adb (Analyze_Subprogram_Body): Do not check conformance when
651 the spec has been generated for a body without spec that carries an
652 Inline_Always pragma.
654 2010-06-14 Arnaud Charlet <charlet@adacore.com>
656 * lib-xref.ads: Documentation change: allocate 'Z' letter to C/C++
659 2010-06-14 Jerome Lambourg <lambourg@adacore.com>
661 * exp_dbug.adb (Debug_Renaming_Declaration): Do not output any debug
662 declaration for VMs, as those are useless and might lead to duplicated
663 local variable names in the generated code.
664 * gcc-interface/Make-lang.in: Update dependencies.
666 2010-06-14 Robert Dewar <dewar@adacore.com>
668 * opt.ads, sem.adb, sem_elab.adb: Minor reformatting
670 2010-06-14 Robert Dewar <dewar@adacore.com>
672 * exp_aggr.adb (Has_Address_Clause): Moved to Exp_Util, and there it
673 is renamed as Has_Following_Address_Clause.
674 * exp_ch3.adb (Needs_Simple_Initialization): Add Consider_IS argument
675 to allow the caller to avoid Initialize_Scalars having an effect.
676 (Expand_N_Object_Declaration): Do not do Initialize_Scalars stuff for
677 scalars with an address clause specified.
678 * exp_ch3.ads (Needs_Simple_Initialization): Add Consider_IS argument
679 to allow the caller to avoid Initialize_Scalars having an effect.
680 * exp_util.adb (Has_Following_Address_Clause): Moved here from Exp_Aggr
681 (where it was called Has_Address_Clause).
682 * exp_util.ads (Has_Following_Address_Clause): Moved here from Exp_Aggr
683 (where it was called Has_Address_Clause).
684 * freeze.adb (Warn_Overlay): Suppress message about overlaying causing
685 problems for Initialize_Scalars (since we no longer initialize objects
686 with an address clause.
688 2010-06-14 Robert Dewar <dewar@adacore.com>
690 * exp_prag.adb (Expand_Pragma_Check): Set Loc of generated code from
693 2010-06-14 Gary Dismukes <dismukes@adacore.com>
695 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Debug_Info_Needed
696 on the entity of an implicitly generated postcondition procedure.
698 2010-06-14 Thomas Quinot <quinot@adacore.com>
700 * sem_ch7.adb (Preserve_Full_Attributes): Propagate
701 Discriminant_Constraint elist from full view to private view.
703 2010-06-14 Robert Dewar <dewar@adacore.com>
705 * sem_res.adb: Minor reformatting.
707 2010-06-14 Ed Schonberg <schonberg@adacore.com>
709 * sem.adb: New version of unit traversal.
711 * sem_elab.adb (Check_Internal_Call): Do not place a call appearing
712 within a generic unit in the table of delayed calls.
714 2010-06-14 Robert Dewar <dewar@adacore.com>
716 * gnatcmd.adb, sem_util.adb, exp_ch3.adb: Minor reformatting
718 2010-06-14 Ed Schonberg <schonberg@adacore.com>
720 * sem_ch12.adb (Save_References): If an identifier has been rewritten
721 during analysis as an explicit dereference, keep the reference implicit
722 in the generic, but preserve the entity if global. This prevents
723 malformed generic trees in the presence of some nested generics.
725 2010-06-14 Sergey Rybin <rybin@adacore.com>
727 * gnat_ugn.texi: For the GNAT driver, clarify the effect of calling the
728 tool with '-files=' option. Also fix some small errors (wrong brackets)
730 2010-06-14 Vincent Celier <celier@adacore.com>
732 * gnatbind.adb: Call Scan_ALI with Directly_Scanned set to True for all
733 the ALI files on the command line.
735 * ali.adb (Scan_ALI): Set component Directly_Scanned of the unit(s) to
736 the same value as the parameter of the same name.
737 * ali.ads (Scan_ALI): New Boolean parameter Directly_Scanned, defaulted
739 * bindgen.adb (Gen_Versions_Ada): Never emit version symbols for
740 Stand-Alone Library interfaces. When binding Stand-Alone Libraries,
741 emit version symbols only for the units of the library.
742 (Gen_Versions_C): Ditto.
744 2010-06-14 Gary Dismukes <dismukes@adacore.com>
746 * sem_ch4.adb: Fix typo.
748 2010-06-14 Vasiliy Fofanov <fofanov@adacore.com>
750 * s-oscons-tmplt.c (IOV_MAX): redefine on Tru64 and VMS since the
751 vector IO doesn't work at default value properly.
753 2010-06-14 Doug Rupp <rupp@adacore.com>
755 * s-stoele.adb: Remove unnecessary qualification of To_Address for VMS.
757 2010-06-14 Vincent Celier <celier@adacore.com>
759 * gnatcmd.adb (Check_Files): Do not invoke the tool with all the
760 sources of the project if a switch -files= is used.
762 2010-06-14 Thomas Quinot <quinot@adacore.com>
764 * exp_attr.adb: Minor reformatting.
766 2010-06-14 Gary Dismukes <dismukes@adacore.com>
768 * gnat_ugn.texi: Minor typo fixes and wording changes.
770 2010-06-14 Ed Schonberg <schonberg@adacore.com>
772 * sem_ch4.adb (Analyze_One_Call): If the call has been rewritten from a
773 prefixed form, do not re-analyze first actual, which may need an
774 implicit dereference.
775 * sem_ch6.adb (Analyze_Procedure_Call): If the call is given in
776 prefixed notation, the analysis will rewrite the node, and possible
777 errors appear in the rewritten name of the node.
778 * sem_res.adb: If a call is ambiguous because its first parameter is
779 an overloaded call, report list of candidates, to clarify ambiguity of
782 2010-06-14 Doug Rupp <rupp@adacore.com>
784 * s-auxdec-vms-alpha.adb: New package body implementing legacy
785 VAX instructions with Asm insertions.
786 * s-auxdec-vms_64.ads: Inline VAX queue functions
787 * s-stoele.adb: Resolve some ambiguities in To_Addresss with s-suxdec
788 that show up only on VMS.
789 * gcc-interface/Makefile.in: Provide translation for
790 s-auxdec-vms-alpha.adb.
792 2010-06-14 Olivier Hainque <hainque@adacore.com>
794 * initialize.c (VxWorks section): Update comments.
796 2010-06-14 Robert Dewar <dewar@adacore.com>
798 * a-convec.adb, sem_prag.adb, checks.adb: Minor reformatting.
800 2010-06-14 Eric Botcazou <ebotcazou@adacore.com>
802 * init.c: Code clean up.
804 2010-06-14 Ed Schonberg <schonberg@adacore.com>
806 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case Address): Do
807 not insert address clause in table for later validation if type of
808 entity is generic, to prevent possible spurious errors.
810 * sem_ch8.adb: Code clean up.
812 2010-06-14 Ben Brosgol <brosgol@adacore.com>
814 * gnat_ugn.texi: Expanded @ovar macro inline to solve problem with
815 texi2pdf and texi2html.
816 Document how to change scheduling properties on HP-UX.
818 2010-06-14 Thomas Quinot <quinot@adacore.com>
820 * g-socket.ads: Remove misleading comments.
822 2010-06-14 Jerome Lambourg <lambourg@adacore.com>
824 * sem_prag.adb (Check_Duplicated_Export_Name): Remove check for
825 CLI_Target as this prevents proper detection of exported names
826 duplicates when the exported language is different to CIL.
827 (Process_Interface_Name): Add check for CIL convention exports,
828 replacing the old one from Check_Duplicated_Export_Name.
830 2010-06-14 Matthew Heaney <heaney@adacore.com>
832 * a-coinve.adb, a-convec.adb (operator "&"): Check both that new length
833 and new last satisfy constraints.
834 (Delete_Last): prevent overflow for subtraction of index values
835 (To_Vector): prevent overflow for addition of index values
837 2010-06-14 Ed Schonberg <schonberg@adacore.com>
839 * sem_ch4.adb (Complete_Object_Operation): After analyzing the
840 rewritten call, preserve the resulting type to prevent spurious errors,
841 when the call is implicitly dereferenced in the context of an in-out
844 * checks.adb (Apply_Discriminant_Check): If the target of the
845 assignment is a renaming of a heap object, create constrained type for
848 2010-06-14 Pascal Obry <obry@adacore.com>
850 * prj-proc.adb: Fix copy of object directory for extending projects.
852 2010-06-14 Jose Ruiz <ruiz@adacore.com>
854 * init.c (__gnat_alternate_stack): Define this space for PowerPC linux
855 (__gnat_install_handler, PowerPC linux): Activate the alternative
858 2010-06-13 Gerald Pfeifer <gerald@pfeifer.com>
860 * gnat_rm.texi: Move to GFDL version 1.3.
861 * gnat-style.texi: Ditto.
862 * gnat_ugn.texi: Ditto.
867 * gcc-interface/Makefile.in: Add rules for multilib x86/x64
870 2010-06-11 Alexandre Oliva <aoliva@redhat.com>
872 * gcc-interface/utils.c (update_pointer_to): Initialize last.
874 2010-06-09 Eric Botcazou <ebotcazou@adacore.com>
876 * gcc-interface/ada-tree.h: Fix formatting nits.
878 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
880 * gcc-interface/utils.c (init_gnat_to_gnu): Use typed GC
882 (init_dummy_type): Likewise.
883 (gnat_pushlevel): Likewise.
885 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
886 (Subprogram_Body_to_gnu): Likewise.
887 (Compilation_Unit_to_gnu): Likewise.
888 (start_stmt_group): Likewise.
889 (extract_encoding): Likewise.
890 (decode_name): Likewise.
892 * gcc-interface/misc.c (gnat_printable_name): Likewise.
894 * gcc-interface/decl.c (annotate_value): Likewise.
896 * gcc-interface/ada-tree.h (struct lang_type): Add variable_size
898 (struct lang_decl): Likewise.
899 (SET_TYPE_LANG_SPECIFIC): Use typed GC allocation.
900 (SET_DECL_LANG_SPECIFIC): Likewise.
902 2010-06-04 Eric Botcazou <ebotcazou@adacore.com>
904 * gnatlink.adb (gnatlink): Remove support for -fsjlj switch.
905 * gcc-interface/lang-specs.h: Likewise.
907 2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
910 * gcc-interface/decl.c (MAX_FIXED_MODE_SIZE): Removed.
912 2010-06-01 Arnaud Charlet <charlet@adacore.com>
914 * gnat_ugn.texi: Improve doc on -fdump-ada-spec, mention limitations.
916 2010-05-30 Eric Botcazou <ebotcazou@adacore.com>
918 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Task_Type>: Reuse the
919 TYPE_DECL of the equivalent type instead of building a new one.
921 2010-05-30 Eric Botcazou <ebotcazou@adacore.com>
923 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust warning message.
924 Fix nits in comments.
925 * gcc-interface/misc.c (gnat_init_gcc_eh): Likewise.
926 * gcc-interface/trans.c (gigi): Likewise.
927 (Attribute_to_gnu): Likewise.
928 (Case_Statement_to_gnu): Likewise.
929 (gnat_to_gnu): Adjust warning message.
930 * gcc-interface/utils.c (create_var_decl_1): Fix nits in comments.
931 (build_vms_descriptor32): Likewise.
933 2010-05-27 Steven Bosscher <steven@gcc.gnu.org>
935 * gcc-interface/decl.c: Pretend to be a backend file by undefining
936 IN_GCC_FRONTEND (still need rtl.h here).
938 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
940 * gcc-interface/trans.c: Do not include rtl.h, insclude libfuncs.h.
941 (gigi): Adjust call to set_stack_check_libfunc.
943 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
945 * gcc-interface/utils.c: Do not include rtl.h.
947 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
949 * gcc-interface/utils.c: Do not include function.h, pointer-set.h,
950 and gimple.h. Explain why rtl.h has to be included.
951 (handle_vector_size_attribute): Call reconstruct_complex_type directly.
952 * gcc-interface/targtyps.c: Do not include tm_p.h
953 * gcc-interface/utils2.c: Do not include flags.h.
954 * gcc-interface/trans.c: Do not include expr.h. Include rtl.h instead,
955 and explain why it has to be included.
956 * gcc-interface/misc.c: Do not include expr.h, libfuncs.h, cgraph.h,
958 Include function.h and explain why. Explain why except.h is included.
959 (enumerate_modes): Remove unused function.
960 * gcc-interface/gigi.h (enumerate_modes): Remove prototype.
961 * gcc-interface/Make-lang.in: Update dependencies.
963 2010-05-25 Joseph Myers <joseph@codesourcery.com>
965 * gcc-interface/misc.c (internal_error_function): Add context
966 parameter. Use it to access show_column flag and instead of using
967 global_dc. Call warn_if_plugins.
968 * gcc-interface/Make-lang.in (ada/misc.o): Update dependencies.
970 2010-05-19 Eric Botcazou <ebotcazou@adacore.com>
972 * gcc-interface/misc.c (LANG_HOOKS_DEEP_UNSHARING): Redefine.
973 * gcc-interface/trans.c (unshare_save_expr): Delete.
974 (gigi): Do not unshare trees under SAVE_EXPRs here.
976 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
978 * gcc-interface/trans.c (call_to_gnu): Use build_call_vec instead of
980 * gcc-interface/utils.c (build_function_stub): Likewise.
982 2010-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
984 * gcc-interface/misc.c (gnat_handle_option): Remove special logic
985 for Wuninitialized without -O.
987 2010-05-16 Eric Botcazou <ebotcazou@adacore.com>
989 * gcc-interface/gigi.h (enum standard_datatypes): Add new value
990 ADT_exception_data_name_id.
991 (exception_data_name_id): New define.
992 * gcc-interface/trans.c (gigi): Initialize it.
993 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Use the standard
994 exception type for standard exception definitions. Do not make them
996 <E_Record_Type>: Equate fields of types associated with an exception
997 definition to those of the standard exception type.
999 2010-05-13 Andreas Schwab <schwab@linux-m68k.org>
1001 * tracebak.c (__gnat_backtrace): Mark top_stack with ATTRIBUTE_UNUSED.
1003 2010-05-12 Eric Botcazou <ebotcazou@adacore.com>
1005 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Tidy up
1006 code, improve comments and fix formatting nits.
1008 2010-05-12 Eric Botcazou <ebotcazou@adacore.com>
1010 * gcc-interface/utils.c (update_pointer_to): Return early if the old
1011 pointer already points to the new type. Chain the old pointer and its
1012 variants at the end of new pointer's chain after updating them.
1014 2010-05-10 Eric Botcazou <ebotcazou@adacore.com>
1016 * exp_disp.adb (Make_Tags): Mark the imported view of dispatch tables
1017 built for interfaces.
1018 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Use
1019 imported_p instead of Is_Imported when considering constants.
1020 Do not promote alignment of exported objects.
1021 <E_Record_Subtype>: Strip all suffixes for dispatch table entities.
1023 2010-05-08 Eric Botcazou <ebotcazou@adacore.com>
1025 * exp_disp.adb (Make_Tags): Mark the imported view of dispatch tables.
1026 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Make imported
1027 constants really constant.
1028 <E_Record_Subtype>: Strip the suffix for dispatch table entities.
1030 2010-05-08 Eric Botcazou <ebotcazou@adacore.com>
1032 * gcc-interface/decl.c (make_aligning_type): Declare the type.
1034 2010-05-08 Eric Botcazou <ebotcazou@adacore.com>
1036 * gcc-interface/decl.c (gnat_to_gnu_entity): Create variables for size
1037 expressions of variant part of record types declared at library level.
1039 2010-05-08 Eric Botcazou <ebotcazou@adacore.com>
1041 * gcc-interface/gigi.h (create_field_decl): Move PACKED parameter.
1042 * gcc-interface/utils.c (create_field_decl): Move PACKED parameter.
1043 (rest_of_record_type_compilation): Adjust call to create_field_decl.
1044 (make_descriptor_field): Likewise and pass correctly typed constants.
1045 (build_unc_object_type): Likewise.
1046 (unchecked_convert): Likewise.
1047 * gcc-interface/decl.c (elaborate_expression_2): New static function.
1048 (gnat_to_gnu_entity): Use it to make alignment factors explicit.
1049 Adjust call to create_field_decl.
1050 (make_aligning_type): Likewise.
1051 (make_packable_type): Likewise.
1052 (maybe_pad_type): Likewise.
1053 (gnat_to_gnu_field): Likewise.
1054 (components_to_record): Likewise.
1055 (create_field_decl_from): Likewise.
1056 (create_variant_part_from): Remove superfluous test.
1057 * gcc-interface/trans.c (gigi): Adjust call to create_field_decl.
1059 2010-05-08 Eric Botcazou <ebotcazou@adacore.com>
1061 * gcc-interface/gigi.h (build_unc_object_type): Add DEBUG_INFO_P param.
1062 (build_unc_object_type_from_ptr): Likewise.
1063 * gcc-interface/utils.c (build_unc_object_type): Add DEBUG_INFO_P param
1064 and pass it to create_type_decl. Declare the type. Simplify.
1065 (build_unc_object_type_from_ptr): Add DEBUG_INFO_P parameter and pass
1066 it to build_unc_object_type.
1067 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust to above change.
1068 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
1069 (gnat_to_gnu): Likewise.
1070 * gcc-interface/utils2.c (build_allocator): Likewise.
1072 2010-05-07 Eric Botcazou <ebotcazou@adacore.com>
1075 * gcc-interface/misc.c (gnat_handle_option): Fix long line.
1077 2010-05-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1079 * gcc-interface/Makefile.in: Removed mips-sgi-irix5* support.
1081 2010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
1084 * gcc-interface/misc.c (gnat_handle_option): Add argument kind.
1086 2010-05-02 Giuseppe Scrivano <gscrivano@gnu.org>
1088 * gnathtml.pl: Use 755 as mask for new directories.
1090 2010-04-28 Eric Botcazou <ebotcazou@adacore.com>
1092 * gcc-interface/trans.c (gnat_gimplify_expr) <ADDR_EXPR>: Uniquize
1093 constant constructors before taking their address.
1095 2010-04-25 Eric Botcazou <ebotcazou@adacore.com>
1097 * exp_dbug.ads: Fix outdated description. Mention link between XVS
1099 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Set
1100 XVZ variable as unit size of XVS type.
1101 (maybe_pad_type): Likewise.
1103 2010-04-25 Eric Botcazou <ebotcazou@adacore.com>
1105 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Do not
1106 use memmove if the array type is bit-packed.
1108 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
1110 * gcc-interface/misc.c (gnat_init): Remove second argument in call to
1111 build_common_tree_nodes.
1113 2010-04-18 Ozkan Sezer <sezeroz@gmail.com>
1115 * gsocket.h: Make sure that winsock2.h is included before windows.h.
1117 2010-04-17 Eric Botcazou <ebotcazou@adacore.com>
1119 * gcc-interface/utils2.c (build_unary_op) <ATTR_ADDR_EXPR>: Do not
1122 2010-04-17 Eric Botcazou <ebotcazou@adacore.com>
1124 * uintp.h (UI_Lt): Declare.
1125 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do the size
1126 computation in sizetype.
1127 <E_Array_Subtype>: Use unified handling for all index types. Do not
1128 generate MAX_EXPR-based expressions, only COND_EXPR-based ones. Add
1130 (annotate_value): Change test for negative values.
1131 (validate_size): Apply test for negative values on GNAT nodes.
1132 (set_rm_size): Likewise.
1133 * gcc-interface/misc.c (gnat_init): Set unsigned types for sizetypes.
1134 * gcc-interface/utils.c (rest_of_record_type_compilation): Change test
1135 for negative values.
1136 (max_size) <MINUS_EXPR>: Do not reassociate a COND_EXPR on the LHS.
1137 (builtin_type_for_size): Adjust definition of signed_size_type_node.
1138 * gcc-interface/utils2.c (compare_arrays): Optimize comparison of
1139 lengths against zero.
1141 2010-04-17 Eric Botcazou <ebotcazou@adacore.com>
1143 * back-end.adb (Call_Back_End): Pass Standard_Character to gigi.
1144 * gcc-interface/gigi.h (gigi): Add standard_character parameter.
1145 (CHAR_TYPE_SIZE, SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE,
1146 LONG_LONG_TYPE_SIZE, FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE,
1147 LONG_DOUBLE_TYPE_SIZE, SIZE_TYPE): Delete.
1148 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Call
1150 * gcc-interface/misc.c (gnat_init): Set signedness of char as per
1151 flag_signed_char. Tag sizetype with "size_type" moniker.
1152 * gcc-interface/trans.c (gigi): Add standard_character parameter.
1153 Remove useless built-in types. Equate unsigned_char_type_node to
1154 Standard.Character. Use it instead of char_type_node throughout.
1155 (Attribute_to_gnu): Likewise.
1156 (gnat_to_gnu): Likewise.
1157 * gcc-interface/utils2.c (build_call_raise): Likewise.
1159 2010-04-17 Eric Botcazou <ebotcazou@adacore.com>
1161 * gcc-interface/gigi.h (enum standard_datatypes): Add new values
1162 ADT_sbitsize_one_node and ADT_sbitsize_unit_node.
1163 (sbitsize_one_node): New macro.
1164 (sbitsize_unit_node): Likewise.
1165 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Fix
1166 latent bug in the computation of subrange_p. Fold wider_p predicate.
1167 (cannot_be_superflat_p): Use an explicitly signed 64-bit type to do
1168 the final comparison.
1169 (make_aligning_type): Build real negation and use sizetype throughout
1170 the offset computation.
1171 (maybe_pad_type): Do not issue the warning when the new size expression
1173 (annotate_value) <INTEGER_CST>: Simplify code handling negative values.
1174 * gcc-interface/misc.c (gnat_init): Initialize sbitsize_one_node and
1176 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Pool_Address>: Fold
1178 (gnat_to_gnu) <N_Free_Statement>: Likewise.
1179 * gcc-interface/utils.c (convert): Use sbitsize_unit_node.
1180 * gcc-interface/utils2.c (compare_arrays): Compute real lengths and use
1181 constants in sizetype. Remove dead code and tweak comments. Generate
1182 equality instead of inequality comparisons for zero length tests.
1184 2010-04-16 Eric Botcazou <ebotcazou@adacore.com>
1186 * gcc-interface/gigi.h (gnat_init_decl_processing): Delete.
1187 * gcc-interface/decl.c (gnat_to_gnu_entity): Constify a few variables.
1188 <object>: Do not create the fake PARM_DECL if no debug info is needed.
1189 Do not create the corresponding VAR_DECL of a CONST_DECL for debugging
1190 purposes if no debug info is needed.
1191 Fix formatting. Reorder and add comments.
1192 * gcc-interface/trans.c (gnat_to_gnu) <N_Attribute_Reference>: Constify
1193 variable and remove obsolete comment.
1194 * gcc-interface/utils.c (convert_vms_descriptor64): Tweak comment.
1195 (convert_vms_descriptor32): Likewise.
1196 (convert): Remove dead code.
1197 <UNCONSTRAINED_ARRAY_REF>: Pass the field instead of its name to build
1198 the reference to the P_ARRAY pointer.
1199 <POINTER_TYPE>: Likewise.
1200 (maybe_unconstrained_array) <UNCONSTRAINED_ARRAY_TYPE>: Likewise.
1201 (gnat_init_decl_processing): Delete, move contents to...
1202 * gcc-interface/misc.c (gnat_init): ...here.
1204 2010-04-16 Eric Botcazou <ebotcazou@adacore.com>
1206 * gcc-interface/trans.c (unchecked_conversion_nop): Handle function
1207 calls. Return true for conversion from a record subtype to its type.
1209 2010-04-16 Eric Botcazou <ebotcazou@adacore.com>
1211 * gcc-interface/decl.c (gnat_to_gnu_entity): Use boolean_type_node in
1212 lieu of integer_type_node for boolean operations.
1213 (choices_to_gnu): Likewise.
1214 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
1215 (Loop_Statement_to_gnu): Likewise.
1216 (establish_gnat_vms_condition_handler): Likewise.
1217 (Exception_Handler_to_gnu_sjlj): Likewise.
1218 (gnat_to_gnu): Likewise.
1219 (build_unary_op_trapv): Likewise.
1220 (build_binary_op_trapv): Likewise.
1221 (emit_range_check): Likewise.
1222 (emit_index_check): Likewise.
1223 (convert_with_check): Likewise.
1224 * gcc-interface/utils.c (convert_vms_descriptor64): Likewise.
1225 (convert_vms_descriptor32): Likewise.
1226 (convert_vms_descriptor): Likewise.
1227 * gcc-interface/utils2.c (nonbinary_modular_operation): Likewise.
1228 (compare_arrays): Use boolean instead of integer constants.
1229 (build_binary_op) <TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR, TRUTH_AND_EXPR,
1230 TRUTH_OR_EXPR, TRUTH_XOR_EXPR>: New case. Check that the result type
1232 <GE_EXPR, LE_EXPR, GT_EXPR, LT_EXPR>: Remove obsolete assertion.
1233 <EQ_EXPR, NE_EXPR>: Check that the result type is a boolean type.
1234 <PREINC/PREDECREMENT_EXPR, POSTINC/POSTDECREMENT_EXPR>: Delete.
1235 <TRUTH_NOT_EXPR>: Check that the result type is a boolean type.
1236 (build_unary_op): Use boolean_type_node in lieu of integer_type_node
1237 for boolean operations.
1238 (fill_vms_descriptor): Likewise. Fix formatting nits.
1240 2010-04-16 Eric Botcazou <ebotcazou@adacore.com>
1242 * gcc-interface/ada-tree.def (LOOP_STMT): Change to 4-operand nodes.
1243 * gcc-interface/ada-tree.h (LOOP_STMT_TOP_COND, LOOP_STMT_BOT_COND):
1245 (LOOP_STMT_COND): ...this.
1246 (LOOP_STMT_BOTTOM_COND_P): New flag.
1247 (LOOP_STMT_TOP_UPDATE_P): Likewise.
1248 * gcc-interface/trans.c (can_equal_min_or_max_val_p): New function.
1249 (can_equal_min_val_p): New static inline function.
1250 (can_equal_max_val_p): Likewise.
1251 (Loop_Statement_to_gnu): Use build4 in lieu of build5 and adjust to
1252 new LOOP_STMT semantics. Use two different strategies depending on
1253 whether optimization is enabled to translate the loop.
1254 (gnat_gimplify_stmt) <LOOP_STMT>: Adjust to new LOOP_STMT semantics.
1256 2010-04-16 Eric Botcazou <ebotcazou@adacore.com>
1258 * uintp.adb (UI_From_Dint): Remove useless code.
1259 (UI_From_Int): Likewise.
1260 * uintp.h: Reorder declarations.
1261 (UI_From_gnu): Declare.
1262 (UI_Base): Likewise.
1263 (Vector_Template): Likewise.
1264 (Vector_To_Uint): Likewise.
1267 * gcc-interface/gigi.h: Tweak comments.
1268 * gcc-interface/cuintp.c (UI_From_gnu): New global function.
1269 * gcc-interface/decl.c (maybe_pad_type): Do not warn if either size
1271 (annotate_value) <INTEGER_CST>: Call UI_From_gnu.
1272 * gcc-interface/trans.c (post_error_ne_num): Call post_error_ne.
1273 (post_error_ne_tree): Call UI_From_gnu and post_error_ne.
1274 * gcc-interface/utils.c (max_size) <tcc_binary>: Do not special-case
1277 2010-04-16 Eric Botcazou <ebotcazou@adacore.com>
1279 * gcc-interface/decl.c (make_type_from_size) <INTEGER_TYPE>: Just copy
1281 * gcc-interface/trans.c (smaller_packable_type_p): Rename into...
1282 (smaller_form_type_p): ...this. Change parameter and variable names.
1283 (call_to_gnu): Use the nominal type of the parameter to create the
1284 temporary if it's a smaller form of the actual type.
1285 (addressable_p): Return false if the actual type is integral and its
1286 size is greater than that of the expected type.
1288 2010-04-15 Eric Botcazou <ebotcazou@adacore.com>
1290 * gcc-interface/cuintp.c (UI_To_gnu): Fix long line.
1291 * gcc-interface/gigi.h (MARK_VISITED): Skip objects of constant class.
1292 (process_attributes): Delete.
1293 (post_error_ne_num): Change parameter name.
1294 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force debug info
1295 with -g3. Remove a couple of obsolete lines. Minor tweaks.
1296 If type annotating mode, operate on trees to compute the adjustment to
1297 the sizes of tagged types. Fix long line.
1298 (cannot_be_superflat_p): Tweak head comment.
1299 (annotate_value): Fold local constant.
1300 (set_rm_size): Fix long line.
1301 * gcc-interface/trans.c (Identifier_to_gnu): Rework comments.
1302 (Attribute_to_gnu): Fix long line.
1303 <Attr_Size>: Remove useless assertion.
1304 Reorder statements. Use size_binop routine.
1305 (Loop_Statement_to_gnu): Use build5 in lieu of build_nt.
1306 Create local variables for the label and the test. Tweak comments.
1307 (Subprogram_Body_to_gnu): Reset cfun to NULL.
1308 (Compilation_Unit_to_gnu): Use the Sloc of the Unit node.
1309 (process_inlined_subprograms): Integrate into...
1310 (Compilation_Unit_to_gnu): ...this.
1311 (gnat_to_gnu): Fix long line.
1312 (post_error_ne_num): Change parameter name.
1313 * gcc-interface/utils.c (process_attributes): Static-ify.
1314 <ATTR_MACHINE_ATTRIBUTE>: Set input_location before proceeding.
1315 (create_type_decl): Add comment.
1316 (create_var_decl_1): Process the attributes after adding the VAR_DECL
1317 to the current binding level.
1318 (create_subprog_decl): Likewise for the FUNCTION_DECL.
1319 (end_subprog_body): Do not reset cfun to NULL.
1320 (build_vms_descriptor32): Fix long line.
1321 (build_vms_descriptor): Likewise.
1322 (handle_nonnull_attribute): Likewise.
1323 (convert_vms_descriptor64): Likewise.
1324 * gcc-interface/utils2.c (fill_vms_descriptor): Fix long line.
1325 (gnat_protect_expr): Fix thinko.
1327 2010-04-15 Eric Botcazou <ebotcazou@adacore.com>
1329 * gcc-interface/trans.c (gigi): Set DECL_IGNORED_P on EH functions.
1330 (gnat_to_gnu) <N_Op_Eq>: Restore the value of input_location
1331 before translating the top-level node.
1332 (lvalue_required_p) <N_Function_Call>: Return 1 if !constant.
1333 <N_Object_Declaration>: Likewise.
1334 <N_Assignment_Statement>: Likewise.
1335 <N_Unchecked_Type_Conversion>: Likewise.
1336 (call_to_gnu): Remove kludge.
1337 (gnat_to_gnu) <N_Return_Statement>: When not optimizing, force labels
1338 associated with user returns to be preserved.
1339 (gnat_to_gnu): Add special code to deal with boolean rvalues.
1340 * gcc-interface/utils2.c (compare_arrays): Set input_location on all
1342 (build_unary_op) <ADDR_EXPR>: Call build_fold_addr_expr.
1343 <INDIRECT_REF>: Call build_fold_indirect_ref.
1345 2010-04-15 Joel Sherrill <joel.sherrill@oarcorp.com>
1347 * g-socket.adb: A target can have multiple missing errno's. This
1348 will result in multiple errno's being defined as -1. Because of this
1349 we can not use a case but must use a series of if's to avoid
1350 a duplicate case error in GNAT.Sockets.Resolve_Error.
1352 2010-04-15 Eric Botcazou <ebotcazou@adacore.com>
1354 * gcc-interface/trans.c (call_to_gnu): Open a nesting level if this is
1355 a statement. Otherwise, if at top-level, push the processing of the
1356 elaboration routine. In the misaligned case, issue the error messages
1357 again on entry and create the temporary explicitly. Do not issue them
1359 For a function call, emit the range check if necessary.
1360 In the copy-in copy-out case, create the temporary for the return
1362 Do not unnecessarily convert by-ref parameters to the formal's type.
1363 Remove obsolete guards in conditions.
1364 (gnat_to_gnu) <N_Assignment_Statement>: For a function call, pass the
1365 target to call_to_gnu in all cases.
1366 (gnat_gimplify_expr) <ADDR_EXPR>: Remove handling of SAVE_EXPR.
1367 (addressable_p) <CONSTRUCTOR>: Return false if not static.
1368 <COMPOUND_EXPR>: New case.
1369 * gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Fold a compound
1370 expression if it has unconstrained array type.
1371 (gnat_mark_addressable) <COMPOUND_EXPR>: New case.
1372 (gnat_stabilize_reference) <COMPOUND_EXPR>: Stabilize operands on an
1375 2010-04-15 Eric Botcazou <ebotcazou@adacore.com>
1377 * gcc-interface/trans.c (gigi): Do not start statement group.
1378 (Compilation_Unit_to_gnu): Set current_function_decl to NULL.
1379 Start statement group and push binding level here...
1380 (gnat_to_gnu) <N_Compilation_Unit>: ...and not here.
1381 Do not push fake contexts at top level. Remove redundant code.
1382 (call_to_gnu): Rename a local variable and constify another.
1383 * gcc-interface/utils.c (gnat_pushlevel): Fix formatting nits.
1384 (set_current_block_context): Set it as the group's block.
1385 (gnat_init_decl_processing): Delete unrelated init code.
1386 (end_subprog_body): Use NULL_TREE.
1388 2010-04-15 Eric Botcazou <ebotcazou@adacore.com>
1390 * gcc-interface/trans.c (call_to_gnu): Do not unnecessarily force
1391 side-effects of actual parameters before the call.
1393 2010-04-15 Eric Botcazou <ebotcazou@adacore.com>
1395 * gcc-interface/decl.c (validate_size): Reorder, remove obsolete test
1397 (set_rm_size): Reorder and remove obsolete test.
1399 2010-04-14 Eric Botcazou <ebotcazou@adacore.com>
1401 * gcc-interface/gigi.h: Reorder declarations and tweak comments.
1402 (gigi): Adjust ATTRIBUTE_UNUSED markers.
1403 * gcc-interface/gadaint.h: New file.
1404 * gcc-interface/trans.c: Include it in lieu of adaint.h. Reorder.
1405 (__gnat_to_canonical_file_spec): Remove declaration.
1406 (number_names): Delete.
1407 (number_files): Likewise.
1409 * gcc-interface/Make-lang.in (ada/trans.o): Adjust dependencies to
1412 2010-04-14 Eric Botcazou <ebotcazou@adacore.com>
1414 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Class_Wide_Type>: Fix
1416 * gcc-interface/trans.c (process_freeze_entity): Use local copy of
1417 Ekind. Return early for class-wide types. Do not compute initializer
1418 unless necessary. Reuse the tree for an associated class-wide type
1419 only if processing its root type.
1421 2010-04-13 Joel Sherrill <joel.sherrill@oarcorp.com>
1423 * gsocket.h: Run-time can no longer be built without network
1424 OS headers available. Changing RTEMS GNAT build procedure to
1425 reflect this and letting run-time build use network .h files.
1427 2010-04-13 Duncan Sands <baldrick@free.fr>
1429 * gcc-interface/misc.c (gnat_eh_type_covers): Remove.
1430 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Update comment.
1432 2010-04-13 Eric Botcazou <ebotcazou@adacore.com>
1434 * gcc-interface/gigi.h (standard_datatypes): Add ADT_parent_name_id.
1435 (parent_name_id): New macro.
1436 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Use it.
1437 * gcc-interface/trans.c (gigi): Initialize it.
1438 (lvalue_required_p) <N_Type_Conversion>: New case.
1439 <N_Qualified_Expression>: Likewise.
1440 <N_Allocator>: Likewise.
1441 * gcc-interface/utils.c (convert): Try to properly upcast tagged types.
1443 2010-04-13 Eric Botcazou <ebotcazou@adacore.com>
1445 * gcc-interface/ada-tree.h (TYPE_BY_REFERENCE_P): Delete.
1446 (DECL_CONST_ADDRESS_P): New macro.
1447 (SET_DECL_ORIGINAL_FIELD_TO_FIELD): Likewise.
1448 (SAME_FIELD_P): Likewise.
1449 * gcc-interface/decl.c (constructor_address_p): New static function.
1450 (gnat_to_gnu_entity) <object>: Set DECL_CONST_ADDRESS_P according to
1451 the return value of above function.
1452 (gnat_to_gnu_entity) <E_Record_Type>: Force BLKmode for all types
1453 passed by reference.
1454 <E_Record_Subtype>: Likewise.
1455 Set TREE_ADDRESSABLE on the type if it passed by reference.
1456 (make_packable_type): Use SET_DECL_ORIGINAL_FIELD_TO_FIELD.
1457 (create_field_decl_from): Likewise.
1458 (substitute_in_type): Likewise.
1459 (purpose_member_field): Use SAME_FIELD_P.
1460 * gcc-interface/misc.c (must_pass_by_ref): Test TREE_ADDRESSABLE.
1461 * gcc-interface/trans.c (lvalue_required_p): Add ADDRESS_OF_CONSTANT
1462 parameter and adjust recursive calls.
1463 <N_Explicit_Dereference>: New case.
1464 <N_Object_Declaration>: Return 1 if the object is of a class-wide type.
1465 Adjust calls to lvalue_required_p. Do not return the initializer of a
1466 DECL_CONST_ADDRESS_P constant if an lvalue is required for it.
1467 (call_to_gnu): Delay issuing error message for a misaligned actual and
1468 avoid the associated back-end assertion. Test TREE_ADDRESSABLE.
1469 (gnat_gimplify_expr) <ADDR_EXPR>: Handle non-static constructors.
1470 * gcc-interface/utils.c (make_dummy_type): Set TREE_ADDRESSABLE if the
1471 type is passed by reference.
1472 (convert) <CONSTRUCTOR>: Convert in-place in more cases.
1473 * gcc-interface/utils2.c (build_cond_expr): Drop TYPE_BY_REFERENCE_P.
1474 (build_simple_component_ref): Use SAME_FIELD_P.
1476 2010-04-12 Eric Botcazou <ebotcazou@adacore.com>
1478 * gcc-interface/trans.c (Identifier_to_gnu): Use boolean variable.
1479 (call_to_gnu): Test gigi's flag TYPE_BY_REFERENCE_P instead of calling
1480 front-end's predicate Is_By_Reference_Type. Use consistent order and
1481 remove ??? comment. Use original conversion in all cases, if any.
1482 * gcc-interface/utils.c (make_dummy_type): Minor tweak.
1483 (convert): Use local copy in more cases.
1484 <INDIRECT_REF>: Remove deactivated code.
1485 (unchecked_convert): Use a couple of local copies.
1487 2010-04-11 Eric Botcazou <ebotcazou@adacore.com>
1489 * gcc-interface/trans.c (lvalue_required_for_attribute_p): New static
1491 (lvalue_required_p) <N_Attribute_Reference>: Call it.
1492 (gnat_to_gnu) <N_Selected_Component>: Prevent build_component_ref from
1493 folding the result only if lvalue_required_for_attribute_p is true.
1494 * gcc-interface/utils.c (maybe_unconstrained_array): Pass correctly
1495 typed constant to build_component_ref.
1496 (unchecked_convert): Likewise.
1497 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
1498 (build_allocator): Likewise.
1500 2010-04-11 Eric Botcazou <ebotcazou@adacore.com>
1502 * gcc-interface/utils2.c (build_cond_expr): Take the address and
1503 dereference if the result type is passed by reference.
1505 2010-04-11 Eric Botcazou <ebotcazou@adacore.com>
1507 * gcc-interface/trans.c (Case_Statement_to_gnu): Bool-ify variable.
1508 (gnat_to_gnu) <N_Null_Statement>: When not optimizing, generate a
1509 goto to the next statement.
1511 2010-04-09 Eric Botcazou <ebotcazou@adacore.com>
1513 * gcc-interface/gigi.h (maybe_variable): Delete.
1514 (protect_multiple_eval): Likewise.
1515 (maybe_stabilize_reference): Likewise.
1516 (gnat_save_expr): Declare.
1517 (gnat_protect_expr): Likewise.
1518 (gnat_stabilize_reference): Likewise.
1519 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Use
1520 gnat_stabilize_reference.
1521 (maybe_variable): Delete.
1522 (elaborate_expression_1): Use gnat_save_expr.
1523 * gcc-interface/trans.c (Attribute_to_gnu): Use gnat_protect_expr.
1524 (call_to_gnu): Pass NULL to gnat_stabilize_reference.
1525 (gnat_to_gnu) <N_Object_Declaration>: Use gnat_save_expr.
1526 <N_Slice>: Use gnat_protect_exp.
1527 <N_Selected_Component>: Pass NULL to gnat_stabilize_reference.
1528 <N_In>: Use gnat_protect_expr.
1529 Pass NULL to gnat_stabilize_reference.
1530 (build_unary_op_trapv): Use gnat_protect_expr.
1531 (build_binary_op_trapv): Likewise.
1532 (emit_range_check): Likewise.
1533 (emit_index_check): Likewise.
1534 (convert_with_check): Likewise.
1535 (protect_multiple_eval): Move to utils2.c file.
1536 (maybe_stabilize_reference): Merge into...
1537 (gnat_stabilize_reference): ...this. Move to utils2.c file.
1538 (gnat_stabilize_reference_1): Likewise.
1539 * gcc-interface/utils.c (convert_to_fat_pointer): Use gnat_protect_expr
1540 instead of protect_multiple_eval.
1541 * gcc-interface/utils2.c (compare_arrays): Likewise.
1542 (nonbinary_modular_operation): Likewise.
1543 (maybe_wrap_malloc): Likewise.
1544 (build_allocator): Likewise.
1545 (gnat_save_expr): New function.
1546 (gnat_protect_expr): Rename from protect_multiple_eval. Early return
1547 in common cases. Propagate TREE_READONLY onto dereferences.
1548 (gnat_stabilize_reference_1): Move from trans.c file.
1549 (gnat_stabilize_reference): Likewise.
1551 2010-04-09 Eric Botcazou <ebotcazou@adacore.com>
1553 * gcc-interface/gigi.h (gnat_mark_addressable): Rename parameter.
1554 * gcc-interface/decl.c (maybe_variable): Do not set TREE_STATIC on _REF
1555 node. Use the type of the operand to set TREE_READONLY.
1556 * gcc-interface/trans.c (Identifier_to_gnu): Do not set TREE_STATIC on
1557 _REF node. Do not overwrite TREE_READONLY.
1558 (call_to_gnu): Rename local variable and fix various nits. In the
1559 copy-in/copy-out case, build the SAVE_EXPR manually.
1560 (convert_with_check): Call protect_multiple_eval in lieu of save_expr
1561 and fold the computations.
1562 (protect_multiple_eval): Always save entire fat pointers.
1563 (maybe_stabilize_reference): Minor tweaks.
1564 (gnat_stabilize_reference_1): Likewise. Do not deal with tcc_constant,
1565 tcc_type and tcc_statement.
1566 * gcc-interface/utils.c (convert_to_fat_pointer): Call
1567 protect_multiple_eval in lieu of save_expr.
1568 (convert): Minor tweaks.
1569 (maybe_unconstrained_array): Do not set TREE_STATIC on _REF node.
1570 (builtin_type_for_size): Call gnat_type_for_size directly.
1571 * gcc-interface/utils2.c (contains_save_expr_p): Delete.
1572 (contains_null_expr): Likewise
1573 (gnat_build_constructor): Do not call it.
1574 (compare_arrays): Deal with all side-effects, use protect_multiple_eval
1575 instead of gnat_stabilize_reference to protect the operands.
1576 (nonbinary_modular_operation): Call protect_multiple_eval in lieu of
1578 (maybe_wrap_malloc): Likewise.
1579 (build_allocator): Likewise.
1580 (build_unary_op) <INDIRECT_REF>: Do not set TREE_STATIC on _REF node.
1581 (gnat_mark_addressable): Rename parameter.
1583 2010-04-08 Eric Botcazou <ebotcazou@adacore.com>
1585 * gcc-interface/ada-tree.h (TYPE_RETURNS_UNCONSTRAINED_P): Rename into.
1586 (TYPE_RETURN_UNCONSTRAINED_P): ...this.
1587 (TYPE_RETURNS_BY_REF_P): Rename into.
1588 (TYPE_RETURN_BY_DIRECT_REF_P): ...this.
1589 (TYPE_RETURNS_BY_TARGET_PTR_P): Delete.
1590 * gcc-interface/gigi.h (create_subprog_type): Adjust parameter names.
1591 (build_return_expr): Likewise.
1592 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>:
1593 Rename local variables. If the return Mechanism is By_Reference, pass
1594 return_by_invisible_ref_p to create_subprog_type instead of toggling
1595 TREE_ADDRESSABLE. Test return_by_invisible_ref_p in order to annotate
1596 the mechanism. Use regular return for contrained types with non-static
1597 size and return by invisible reference for unconstrained return types
1598 with default discriminants. Update comment.
1599 * gcc-interface/trans.c (Subprogram_Body_to_gnu): If the function
1600 returns by invisible reference, turn the RESULT_DECL into a pointer.
1601 Do not handle DECL_BY_REF_P in the CICO case here.
1602 (call_to_gnu): Remove code handling return by target pointer. For a
1603 function call, if the return type has non-constant size, generate the
1604 assignment with an INIT_EXPR.
1605 (gnat_to_gnu) <N_Return_Statement>: Remove dead code in the CICO case.
1606 If the function returns by invisible reference, build the copy return
1608 (add_decl_expr): Initialize the variable with an INIT_EXPR.
1609 * gcc-interface/utils.c (create_subprog_type): Adjust parameter names.
1610 Adjust for renaming of macros. Copy the node only when necessary.
1611 (create_subprog_decl): Do not toggle TREE_ADDRESSABLE on the return
1612 type, only change DECL_BY_REFERENCE on the RETURN_DECL.
1613 (convert_from_reference): Delete.
1614 (is_byref_result): Likewise.
1615 (gnat_genericize_r): Likewise.
1616 (gnat_genericize): Likewise.
1617 (end_subprog_body): Do not call gnat_genericize.
1618 * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: New case.
1619 (build_return_expr): Adjust parameter names, logic and comment.
1621 2010-04-07 Eric Botcazou <ebotcazou@adacore.com>
1623 * exp_pakd.adb (Create_Packed_Array_Type): Always use a modular type
1624 if the size is small enough. Propagate the alignment if there is an
1625 alignment clause on the original array type.
1626 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Subtype>
1627 Deal with under-aligned packed array types. Copy the size onto the
1628 justified modular type and don't lay it out again. Likewise for the
1629 padding type built for other under-aligned subtypes.
1630 * gcc-interface/utils.c (finish_record_type): Do not set a default mode
1633 2010-04-07 Eric Botcazou <ebotcazou@adacore.com>
1635 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set default
1636 alignment on the RETURN type built for the Copy-In Copy-Out mechanism.
1638 2010-04-07 Eric Botcazou <ebotcazou@adacore.com>
1640 * gcc-interface/trans.c (call_to_gnu): In the return-by-target-ptr case
1641 do not set the result type if there is a specified target and do not
1642 convert the result in any cases.
1643 (protect_multiple_eval): Make direct SAVE_EXPR for CALL_EXPR.
1644 (maybe_stabilize_reference) <COMPOUND_EXPR>: Merge with CALL_EXPR.
1646 2010-03-10 Eric Botcazou <ebotcazou@adacore.com>
1648 * gcc-interface/Makefile.in (SPARC/Solaris): Use sparcv8plus.
1650 2010-02-27 Eric Botcazou <ebotcazou@adacore.com>
1653 * gcc-interface/utils2.c (build_binary_op) <EQ_EXPR>: Assert that fat
1654 pointer base types are variant of each other. Apply special treatment
1655 for null to fat pointer types in all cases.
1657 2010-01-28 Pascal Obry <obry@adacore.com>
1659 * s-win32.ads: Add some missing constants.
1661 2010-01-28 Vincent Celier <celier@adacore.com>
1663 * prj-attr-pm.adb (Add_Attribute): Do nothing if To_Package is
1666 2010-01-28 Robert Dewar <dewar@adacore.com>
1668 * gnat_rm.texi: Minor correction
1670 2010-01-27 Pascal Obry <obry@adacore.com>
1672 * g-awk.adb: ensure that an AWK session is reusable.
1674 2010-01-27 Vasiliy Fofanov <fofanov@adacore.com>
1676 * g-regist.adb (For_Every_Key): Fix previous change.
1679 2010-01-27 Thomas Quinot <quinot@adacore.com>
1681 * lib-writ.ads: Current version of spec for new N (note) ALI lines
1683 2010-01-27 Yannick Moy <moy@adacore.com>
1685 * a-cdlili.adb (Insert): Correct exception message when cursor
1686 designates wrong list.
1688 2010-01-27 Vincent Celier <celier@adacore.com>
1690 * gnatcmd.adb: When there is only one main specified, the package
1691 support Switches (<main>) and attribute Switches is specified for the
1692 main, use these switches, instead of Default_Switches ("Ada").
1694 2010-01-27 Robert Dewar <dewar@adacore.com>
1696 * sem_prag.adb, par-prag.adb, snames.ads-tmpl: pragma Dimension initial
1698 * exp_disp.adb: Minor reformatting
1700 2010-01-27 Tristan Gingold <gingold@adacore.com>
1702 * seh_init.c: Use __ImageBase instead of _ImageBase.
1704 2010-01-27 Javier Miranda <miranda@adacore.com>
1706 * exp_disp.ads, exp_disp.adb (Expand_Interface_Thunk): Modify the
1707 profile of interface thunks. The type of the controlling formal is now
1708 the covered interface type (instead of the target tagged type).
1710 2010-01-27 Sergey Rybin <rybin@adacore.com>
1712 * gnat_rm.texi, gnat_ugn.texi: Update gnatcheck doc.
1714 2010-01-27 Robert Dewar <dewar@adacore.com>
1716 * sinput.ads, sinput.adb (Sloc_Range): Applies to all nodes, formal
1717 changed from Expr to N.
1719 2010-01-26 Thomas Quinot <quinot@adacore.com>
1721 * gnat_ugn.texi: Adjust documentation of -gnatz switches.
1722 * usage.adb: Replace line for -gnatz with two lines for -gnatzc and
1725 2010-01-26 Vincent Celier <celier@adacore.com>
1727 * prj-attr.adb: Add new attribute Library_Install_Name_Option
1728 Replace attribute Run_Path_Origin_Supported with Run_Path_Origin
1729 * prj-nmsc.adb (Process_Project_Level_Simple_Attributes): Process
1730 attributes Run_Path_Option and Library_Install_Name_Option.
1731 * prj.ads (Project_Configuration): Replace component
1732 Run_Path_Origin_Supported with component Run_Path_Origin. Add new
1733 component Library_Install_Name_Option.
1734 * snames.ads-tmpl: Add new standard name Library_Install_Name_Option
1735 Replace Run_Path_Origin_Supported with Run_Path_Origin
1737 2010-01-26 Ed Schonberg <schonberg@adacore.com>
1739 * sem_ch8.adb (Use_One_Package): Within an instance, an actual package
1740 is not hidden by a homograph declared in another actual package.
1742 2010-01-26 Robert Dewar <dewar@adacore.com>
1744 * par_sco.adb (Traverse_Declarations_Or_Statements): Only generate
1745 decisions for pragmas Assert, Check, Precondition, Postcondition if
1747 * scos.ads: Update comments.
1748 * get_scos.adb, put_scos.adb: Minor fix to code reading statement SCOs.
1749 Also remove obsolete code for CT (exit point) SCOs.
1751 2010-01-26 Thomas Quinot <quinot@adacore.com>
1753 * switch-c.adb: Fix handling of -gnatz*
1755 2010-01-26 Robert Dewar <dewar@adacore.com>
1757 * par_sco.adb (Traverse_Declarations_Or_Statements): Separate F/W
1758 qualifiers for FOR/WHILE loops
1759 * scos.ads: Use separate type letters F/W for for/while loops
1761 2010-01-26 Robert Dewar <dewar@adacore.com>
1763 * get_scos.adb (Get_SCOs): Implement new form of CS entries (multiple
1764 entries per line, one for each statement in the sequence).
1765 * par_sco.adb (Traverse_Declarations_Or_Statements): Increase array
1766 size from 100 to 10_000 for SC_Array to avoid any real possibility of
1767 overflow. Output decisions in for loops.
1768 Exclude labels from CS lines.
1769 * scos.ads: Clarify that label is not included in the entry point
1771 2010-01-26 Robert Dewar <dewar@adacore.com>
1773 * par_sco.adb (Traverse_Declarations_Or_Statments): Implement new
1774 format of statement sequence SCO entries (one location/statement).
1775 * put_scos.adb (Put_SCOs): Implement new format of CS lines
1776 * scos.ads: Update comments.
1777 * sem_eval.adb: Minor reformatting.
1779 2010-01-26 Robert Dewar <dewar@adacore.com>
1781 * par_sco.ads, par_sco.adb (Set_Statement_Entry): New handling of exits
1782 (Extend_Statement_Sequence): New procedures
1783 (Traverse_Declarations_Or_Statements): New handling for exits.
1785 2010-01-26 Robert Dewar <dewar@adacore.com>
1787 * par_sco.adb (Traverse_Declarations_Or_Statements): Add processing for
1790 2010-01-26 Robert Dewar <dewar@adacore.com>
1792 * par_sco.adb (Is_Logical_Operator): Exclude AND/OR/XOR
1793 * scos.ads: Clarify handling of logical operators
1795 2010-01-26 Arnaud Charlet <charlet@adacore.com>
1797 * s-tpoben.adb: Update comments.
1799 2010-01-26 Robert Dewar <dewar@adacore.com>
1801 * freeze.adb (Set_Small_Size): Don't set size if alignment clause
1804 2010-01-26 Robert Dewar <dewar@adacore.com>
1806 * scos.ads: Clean up documentation, remove obsolete XOR references
1807 2010-01-26 Vincent Celier <celier@adacore.com>
1809 * gnat_ugn.texi: Complete documentation on the restrictions for
1810 combined options in -gnatxxx switches.
1813 2010-01-26 Arnaud Charlet <charlet@adacore.com>
1815 * s-tpoben.adb (Initialize_Protection_Entries): If a PO is created from
1816 a controlled operation, abort is already deferred at this point, so we
1817 need to use Defer_Abort_Nestable.
1819 2010-01-26 Vincent Celier <celier@adacore.com>
1821 * prj-conf.adb (Get_Config_Switches): Check for a default language for
1822 a project extending a project with no languages.
1824 2010-01-26 Vincent Celier <celier@adacore.com>
1826 * switch-c.adb (Scan_Front_End_Switches): Take into account options
1827 that follow -gnatef.
1828 Allow -gnateG to be followed by other options.
1830 2010-01-26 Robert Dewar <dewar@adacore.com>
1832 * s-commun.ads, s-osprim-mingw.adb, s-stchop-vxworks.adb, sem_aggr.adb,
1833 s-vxwext.adb, sem_ch10.adb, sem_eval.adb, sem_prag.adb: Minor
1836 2010-01-26 Vasiliy Fofanov <fofanov@adacore.com>
1838 * g-regist.adb, g-regist.ads (For_Every_Key): New generic procedure
1839 that allows to iterate over all subkeys of a key.
1841 2010-01-26 Ed Falis <falis@adacore.com>
1843 * sysdep.c: enable NFS for VxWorks MILS
1844 * env.c: enable __gnat_environ for VxWorks MILS
1845 * gcc-interface/Makefile.in: Add VxWorks MILS target pairs.
1847 2010-01-25 Bob Duff <duff@adacore.com>
1849 * sem_aggr.adb (Resolve_Array_Aggregate): Check for the case where this
1850 is an internally-generated positional aggregate, and the bounds are
1851 already correctly set. We don't want to overwrite those bounds with
1852 bounds determined by context.
1854 2010-01-25 Robert Dewar <dewar@adacore.com>
1856 * g-sercom.ads, gnatcmd.adb, gnatlink.adb, a-ststio.adb, exp_ch6.adb,
1857 exp_ch9.adb, g-sechas.ads: Minor reformatting.
1859 2010-01-25 Thomas Quinot <quinot@adacore.com>
1861 * s-commun.adb (Last_Index): Count must be converted to SEO (a signed
1862 integer type) before subtracting 1, otherwise the computation may wrap
1863 (because size_t is modular) and cause the conversion to fail.
1865 2010-01-25 Ed Falis <falis@adacore.com>
1867 * sysdep.c, init.c: Adapt to support full run-time on VxWorks MILS.
1869 2010-01-25 Vincent Celier <celier@adacore.com>
1871 * prj-attr.adb: New attribute Run_Path_Origin_Required
1872 * prj-nmsc.adb (Process_Project_Level_Simple_Attributes): Process new
1873 attribute Run_Path_Origin_Required.
1874 * prj.ads (Project_Configuration): New component
1875 Run_Path_Origin_Supported.
1876 * snames.ads-tmpl: New standard name Run_Path_Origin_Required
1878 2010-01-25 Ed Schonberg <schonberg@adacore.com>
1880 * sem_aggr.adb (Resolve_Array_Aggregate): If the bounds in a choice
1881 have errors, do not continue resolution of the aggregate.
1882 * sem_eval.adb (Eval_Indexed_Component): Do not attempt to evaluate if
1883 the array type indicates an error.
1885 2010-01-25 Bob Duff <duff@adacore.com>
1887 * sinfo.ads: Minor comment fixes.
1889 2010-01-25 Bob Duff <duff@adacore.com>
1891 * exp_ch4.adb, exp_aggr.adb: Minor comment fixes and code clean up.
1893 2010-01-25 Arnaud Charlet <charlet@adacore.com>
1895 * gnatvsn.ads (Current_Year): Update.
1897 2010-01-25 Florian Villoing <villoing@adacore.com>
1899 * gnat_ugn.texi: Fix typo.
1901 2010-01-25 Thomas Quinot <quinot@adacore.com>
1903 * scos.ads: Update specification.
1905 2010-01-25 Ed Schonberg <schonberg@adacore.com>
1907 * sem_ch6.adb (Process_PPCs): If a postcondition is present and the
1908 enclosing subprogram has no previous spec, attach postcondition
1909 procedure to the defining entity for the body.
1911 2010-01-25 Ed Schonberg <schonberg@adacore.com>
1913 * exp_aggr.adb (Build_Record_Aggr_Code); Do not generate call to
1914 initialization procedure of the ancestor part of an extension aggregate
1915 if it is an interface type.
1917 2010-01-25 Vincent Celier <celier@adacore.com>
1919 * gnatlink.adb (Process_Binder_File): The directory for the shared
1920 version of libgcc in the run path options is found in the subdirectory
1921 indicated by __gnat_default_libgcc_subdir.
1922 * link.c: Declare new const char * __gnat_default_libgcc_subdir for
1925 2010-01-25 Ed Schonberg <schonberg@adacore.com>
1927 * sem_prag.adb: More flexible pragma Annotate.
1929 2010-01-22 Eric Botcazou <ebotcazou@adacore.com>
1931 * system-linux-armel.ads (Stack_Check_Probes): Set to True.
1932 * system-linux-armeb.ads (Stack_Check_Probes): Likewise.
1934 2010-01-18 Eric Botcazou <ebotcazou@adacore.com>
1936 * gcc-interface/utils.c (create_var_decl_1): Fix formatting nits.
1938 2010-01-18 Jan Hubicka <jh@suse.cz>
1941 * gcc-interface/utils.c (create_var_decl_1): Do not set COMMON flag for
1942 unit local variables.
1944 2010-01-17 Laurent GUERBY <laurent@guerby.net>
1946 * gcc-interface/Makefile.in: Fix typo in arm*-*-linux-gnueabi.
1948 2010-01-11 Mikael Pettersson <mikpe@it.uu.se>
1950 * gcc-interface/Makefile.in: Add arm*-*-linux-gnueabi.
1951 * system-linux-armeb.ads, system-linux-armel.ads: New files.
1953 2010-01-09 Simon Wright <simon@pushface.org>
1956 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Add missing
1961 Copyright (C) 2010 Free Software Foundation, Inc.
1963 Copying and distribution of this file, with or without modification,
1964 are permitted in any medium without royalty provided the copyright
1965 notice and this notice are preserved.