39d28c8f9d13179a4074f138c6fd57874c7e4b35
[gcc.git] / gcc / ada / ChangeLog
1 2010-06-14 Ed Schonberg <schonberg@adacore.com>
2
3 * sinfo.ads, sinfo.adb (Withed_Body): New attribute of a with_clause.
4 Indicates that there is an instantiation in the current unit that
5 loaded the body of the unit denoted by the with_clause.
6 * sem_ch12.adb (Mark_Context): When instanting a generic body, check
7 whether a with_clause in the current context denotes the unit that
8 holds the generic declaration, and mark the with_clause accordingly.
9 (Instantiate_Package_Body): call Mark_Context.
10 * sem.adb (Process_Bodies_In_Context): Use Withed_Body to determine
11 whether a given body should be traversed before the spec of the main
12 unit.
13
14 2010-06-14 Ed Falis <falis@adacore.com>
15
16 * sysdep.c: Fix 653 build against vThreads headers
17
18 2010-06-14 Robert Dewar <dewar@adacore.com>
19
20 * sinfo.ads: Minor reformatting.
21
22 2010-06-14 Ed Schonberg <schonberg@adacore.com>
23
24 * sem_ch6.adb (Analyze_Subprogram_Body): Do not check conformance when
25 the spec has been generated for a body without spec that carries an
26 Inline_Always pragma.
27
28 2010-06-14 Arnaud Charlet <charlet@adacore.com>
29
30 * lib-xref.ads: Documentation change: allocate 'Z' letter to C/C++
31 macro.
32
33 2010-06-14 Jerome Lambourg <lambourg@adacore.com>
34
35 * exp_dbug.adb (Debug_Renaming_Declaration): Do not output any debug
36 declaration for VMs, as those are useless and might lead to duplicated
37 local variable names in the generated code.
38 * gcc-interface/Make-lang.in: Update dependencies.
39
40 2010-06-14 Robert Dewar <dewar@adacore.com>
41
42 * opt.ads, sem.adb, sem_elab.adb: Minor reformatting
43
44 2010-06-14 Robert Dewar <dewar@adacore.com>
45
46 * exp_aggr.adb (Has_Address_Clause): Moved to Exp_Util, and there it
47 is renamed as Has_Following_Address_Clause.
48 * exp_ch3.adb (Needs_Simple_Initialization): Add Consider_IS argument
49 to allow the caller to avoid Initialize_Scalars having an effect.
50 (Expand_N_Object_Declaration): Do not do Initialize_Scalars stuff for
51 scalars with an address clause specified.
52 * exp_ch3.ads (Needs_Simple_Initialization): Add Consider_IS argument
53 to allow the caller to avoid Initialize_Scalars having an effect.
54 * exp_util.adb (Has_Following_Address_Clause): Moved here from Exp_Aggr
55 (where it was called Has_Address_Clause).
56 * exp_util.ads (Has_Following_Address_Clause): Moved here from Exp_Aggr
57 (where it was called Has_Address_Clause).
58 * freeze.adb (Warn_Overlay): Suppress message about overlaying causing
59 problems for Initialize_Scalars (since we no longer initialize objects
60 with an address clause.
61
62 2010-06-14 Robert Dewar <dewar@adacore.com>
63
64 * exp_prag.adb (Expand_Pragma_Check): Set Loc of generated code from
65 condition.
66
67 2010-06-14 Gary Dismukes <dismukes@adacore.com>
68
69 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Debug_Info_Needed
70 on the entity of an implicitly generated postcondition procedure.
71
72 2010-06-14 Thomas Quinot <quinot@adacore.com>
73
74 * sem_ch7.adb (Preserve_Full_Attributes): Propagate
75 Discriminant_Constraint elist from full view to private view.
76
77 2010-06-14 Robert Dewar <dewar@adacore.com>
78
79 * sem_res.adb: Minor reformatting
80
81 2010-06-14 Ed Schonberg <schonberg@adacore.com>
82
83 * sem.adb: New version of unit traversal.
84
85 * sem_elab.adb (Check_Internal_Call): Do not place a call appearing
86 within a generic unit in the table of delayed calls.
87
88 2010-06-14 Robert Dewar <dewar@adacore.com>
89
90 * gnatcmd.adb, sem_util.adb, exp_ch3.adb: Minor reformatting
91
92 2010-06-14 Ed Schonberg <schonberg@adacore.com>
93
94 * sem_ch12.adb (Save_References): If an identifier has been rewritten
95 during analysis as an explicit dereference, keep the reference implicit
96 in the generic, but preserve the entity if global. This prevents
97 malformed generic trees in the presence of some nested generics.
98
99 2010-06-14 Sergey Rybin <rybin@adacore.com>
100
101 * gnat_ugn.texi: For the GNAT driver, clarify the effect of calling the
102 tool with '-files=' option. Also fix some small errors (wrong brackets)
103
104 2010-06-14 Vincent Celier <celier@adacore.com>
105
106 * gnatbind.adb: Call Scan_ALI with Directly_Scanned set to True for all
107 the ALI files on the command line.
108
109 * ali.adb (Scan_ALI): Set component Directly_Scanned of the unit(s) to
110 the same value as the parameter of the same name.
111 * ali.ads (Scan_ALI): New Boolean parameter Directly_Scanned, defaulted
112 to False.
113 * bindgen.adb (Gen_Versions_Ada): Never emit version symbols for
114 Stand-Alone Library interfaces. When binding Stand-Alone Libraries,
115 emit version symbols only for the units of the library.
116 (Gen_Versions_C): Ditto.
117
118 2010-06-14 Gary Dismukes <dismukes@adacore.com>
119
120 * sem_ch4.adb: Fix typo.
121
122 2010-06-14 Vasiliy Fofanov <fofanov@adacore.com>
123
124 * s-oscons-tmplt.c (IOV_MAX): redefine on Tru64 and VMS since the
125 vector IO doesn't work at default value properly.
126
127 2010-06-14 Doug Rupp <rupp@adacore.com>
128
129 * s-stoele.adb: Remove unnecessary qualification of To_Address for VMS.
130
131 2010-06-14 Vincent Celier <celier@adacore.com>
132
133 * gnatcmd.adb (Check_Files): Do not invoke the tool with all the
134 sources of the project if a switch -files= is used.
135
136 2010-06-14 Thomas Quinot <quinot@adacore.com>
137
138 * exp_attr.adb: Minor reformatting
139 2010-06-14 Gary Dismukes <dismukes@adacore.com>
140
141 * gnat_ugn.texi: Minor typo fixes and wording changes
142
143 2010-06-14 Ed Schonberg <schonberg@adacore.com>
144
145 * sem_ch4.adb (Analyze_One_Call): If the call has been rewritten from a
146 prefixed form, do not re-analyze first actual, which may need an
147 implicit dereference.
148 * sem_ch6.adb (Analyze_Procedure_Call): If the call is given in
149 prefixed notation, the analysis will rewrite the node, and possible
150 errors appear in the rewritten name of the node.
151 * sem_res.adb: If a call is ambiguous because its first parameter is
152 an overloaded call, report list of candidates, to clarify ambiguity of
153 enclosing call.
154
155 2010-06-14 Doug Rupp <rupp@adacore.com>
156
157 * s-auxdec-vms-alpha.adb: New package body implementing legacy
158 VAX instructions with Asm insertions.
159 * s-auxdec-vms_64.ads: Inline VAX queue functions
160 * s-stoele.adb: Resolve some ambiguities in To_Addresss with s-suxdec
161 that show up only on VMS.
162 * gcc-interface/Makefile.in: Provide translation for
163 s-auxdec-vms-alpha.adb.
164
165 2010-06-14 Olivier Hainque <hainque@adacore.com>
166
167 * initialize.c (VxWorks section): Update comments.
168
169 2010-06-14 Robert Dewar <dewar@adacore.com>
170
171 * a-convec.adb, sem_prag.adb, checks.adb: Minor reformatting
172
173 2010-06-14 Eric Botcazou <ebotcazou@adacore.com>
174
175 * init.c: Code clean up.
176
177 2010-06-14 Ed Schonberg <schonberg@adacore.com>
178
179 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case Address): Do
180 not insert address clause in table for later validation if type of
181 entity is generic, to prevent possible spurious errors.
182
183 * sem_ch8.adb: Code clean up.
184
185 2010-06-14 Ben Brosgol <brosgol@adacore.com>
186
187 * gnat_ugn.texi: Expanded @ovar macro inline to solve problem with
188 texi2pdf and texi2html.
189 Document how to change scheduling properties on HP-UX.
190
191 2010-06-14 Thomas Quinot <quinot@adacore.com>
192
193 * g-socket.ads: Remove misleading comments.
194
195 2010-06-14 Jerome Lambourg <lambourg@adacore.com>
196
197 * sem_prag.adb (Check_Duplicated_Export_Name): Remove check for
198 CLI_Target as this prevents proper detection of exported names
199 duplicates when the exported language is different to CIL.
200 (Process_Interface_Name): Add check for CIL convention exports,
201 replacing the old one from Check_Duplicated_Export_Name.
202
203 2010-06-14 Matthew Heaney <heaney@adacore.com>
204
205 * a-coinve.adb, a-convec.adb (operator "&"): Check both that new length
206 and new last satisfy constraints.
207 (Delete_Last): prevent overflow for subtraction of index values
208 (To_Vector): prevent overflow for addition of index values
209
210 2010-06-14 Ed Schonberg <schonberg@adacore.com>
211
212 * sem_ch4.adb (Complete_Object_Operation): After analyzing the
213 rewritten call, preserve the resulting type to prevent spurious errors,
214 when the call is implicitly dereferenced in the context of an in-out
215 actual.
216
217 * checks.adb (Apply_Discriminant_Check): If the target of the
218 assignment is a renaming of a heap object, create constrained type for
219 it to apply check.
220
221 2010-06-14 Pascal Obry <obry@adacore.com>
222
223 * prj-proc.adb: Fix copy of object directory for extending projects.
224
225 2010-06-14 Jose Ruiz <ruiz@adacore.com>
226
227 * init.c (__gnat_alternate_stack): Define this space for PowerPC linux
228 (__gnat_install_handler, PowerPC linux): Activate the alternative
229 signal stack.
230
231 2010-06-13 Gerald Pfeifer <gerald@pfeifer.com>
232
233 * gnat_rm.texi: Move to GFDL version 1.3.
234 * gnat-style.texi: Ditto.
235 * gnat_ugn.texi: Ditto.
236
237 2010-06-12 Kai Tietz
238
239 PR ada/43731
240 * gcc-interface/Makefile.in: Add rules for multilib x86/x64
241 mingw targets.
242
243 2010-06-11 Alexandre Oliva <aoliva@redhat.com>
244
245 * gcc-interface/utils.c (update_pointer_to): Initialize last.
246
247 2010-06-09 Eric Botcazou <ebotcazou@adacore.com>
248
249 * gcc-interface/ada-tree.h: Fix formatting nits.
250
251 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
252
253 * gcc-interface/utils.c (init_gnat_to_gnu): Use typed GC
254 allocation.
255 (init_dummy_type): Likewise.
256 (gnat_pushlevel): Likewise.
257
258 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
259 (Subprogram_Body_to_gnu): Likewise.
260 (Compilation_Unit_to_gnu): Likewise.
261 (start_stmt_group): Likewise.
262 (extract_encoding): Likewise.
263 (decode_name): Likewise.
264
265 * gcc-interface/misc.c (gnat_printable_name): Likewise.
266
267 * gcc-interface/decl.c (annotate_value): Likewise.
268
269 * gcc-interface/ada-tree.h (struct lang_type): Add variable_size
270 GTY option.
271 (struct lang_decl): Likewise.
272 (SET_TYPE_LANG_SPECIFIC): Use typed GC allocation.
273 (SET_DECL_LANG_SPECIFIC): Likewise.
274
275 2010-06-04 Eric Botcazou <ebotcazou@adacore.com>
276
277 * gnatlink.adb (gnatlink): Remove support for -fsjlj switch.
278 * gcc-interface/lang-specs.h: Likewise.
279
280 2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
281
282 PR c++/44294
283 * gcc-interface/decl.c (MAX_FIXED_MODE_SIZE): Removed.
284
285 2010-06-01 Arnaud Charlet <charlet@adacore.com>
286
287 * gnat_ugn.texi: Improve doc on -fdump-ada-spec, mention limitations.
288
289 2010-05-30 Eric Botcazou <ebotcazou@adacore.com>
290
291 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Task_Type>: Reuse the
292 TYPE_DECL of the equivalent type instead of building a new one.
293
294 2010-05-30 Eric Botcazou <ebotcazou@adacore.com>
295
296 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust warning message.
297 Fix nits in comments.
298 * gcc-interface/misc.c (gnat_init_gcc_eh): Likewise.
299 * gcc-interface/trans.c (gigi): Likewise.
300 (Attribute_to_gnu): Likewise.
301 (Case_Statement_to_gnu): Likewise.
302 (gnat_to_gnu): Adjust warning message.
303 * gcc-interface/utils.c (create_var_decl_1): Fix nits in comments.
304 (build_vms_descriptor32): Likewise.
305
306 2010-05-27 Steven Bosscher <steven@gcc.gnu.org>
307
308 * gcc-interface/decl.c: Pretend to be a backend file by undefining
309 IN_GCC_FRONTEND (still need rtl.h here).
310
311 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
312
313 * gcc-interface/trans.c: Do not include rtl.h, insclude libfuncs.h.
314 (gigi): Adjust call to set_stack_check_libfunc.
315
316 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
317
318 * gcc-interface/utils.c: Do not include rtl.h.
319
320 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
321
322 * gcc-interface/utils.c: Do not include function.h, pointer-set.h,
323 and gimple.h. Explain why rtl.h has to be included.
324 (handle_vector_size_attribute): Call reconstruct_complex_type directly.
325 * gcc-interface/targtyps.c: Do not include tm_p.h
326 * gcc-interface/utils2.c: Do not include flags.h.
327 * gcc-interface/trans.c: Do not include expr.h. Include rtl.h instead,
328 and explain why it has to be included.
329 * gcc-interface/misc.c: Do not include expr.h, libfuncs.h, cgraph.h,
330 and optabs.h.
331 Include function.h and explain why. Explain why except.h is included.
332 (enumerate_modes): Remove unused function.
333 * gcc-interface/gigi.h (enumerate_modes): Remove prototype.
334 * gcc-interface/Make-lang.in: Update dependencies.
335
336 2010-05-25 Joseph Myers <joseph@codesourcery.com>
337
338 * gcc-interface/misc.c (internal_error_function): Add context
339 parameter. Use it to access show_column flag and instead of using
340 global_dc. Call warn_if_plugins.
341 * gcc-interface/Make-lang.in (ada/misc.o): Update dependencies.
342
343 2010-05-19 Eric Botcazou <ebotcazou@adacore.com>
344
345 * gcc-interface/misc.c (LANG_HOOKS_DEEP_UNSHARING): Redefine.
346 * gcc-interface/trans.c (unshare_save_expr): Delete.
347 (gigi): Do not unshare trees under SAVE_EXPRs here.
348
349 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
350
351 * gcc-interface/trans.c (call_to_gnu): Use build_call_vec instead of
352 build_call_list.
353 * gcc-interface/utils.c (build_function_stub): Likewise.
354
355 2010-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
356
357 * gcc-interface/misc.c (gnat_handle_option): Remove special logic
358 for Wuninitialized without -O.
359
360 2010-05-16 Eric Botcazou <ebotcazou@adacore.com>
361
362 * gcc-interface/gigi.h (enum standard_datatypes): Add new value
363 ADT_exception_data_name_id.
364 (exception_data_name_id): New define.
365 * gcc-interface/trans.c (gigi): Initialize it.
366 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Use the standard
367 exception type for standard exception definitions. Do not make them
368 volatile.
369 <E_Record_Type>: Equate fields of types associated with an exception
370 definition to those of the standard exception type.
371
372 2010-05-13 Andreas Schwab <schwab@linux-m68k.org>
373
374 * tracebak.c (__gnat_backtrace): Mark top_stack with ATTRIBUTE_UNUSED.
375
376 2010-05-12 Eric Botcazou <ebotcazou@adacore.com>
377
378 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Tidy up
379 code, improve comments and fix formatting nits.
380
381 2010-05-12 Eric Botcazou <ebotcazou@adacore.com>
382
383 * gcc-interface/utils.c (update_pointer_to): Return early if the old
384 pointer already points to the new type. Chain the old pointer and its
385 variants at the end of new pointer's chain after updating them.
386
387 2010-05-10 Eric Botcazou <ebotcazou@adacore.com>
388
389 * exp_disp.adb (Make_Tags): Mark the imported view of dispatch tables
390 built for interfaces.
391 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Use
392 imported_p instead of Is_Imported when considering constants.
393 Do not promote alignment of exported objects.
394 <E_Record_Subtype>: Strip all suffixes for dispatch table entities.
395
396 2010-05-08 Eric Botcazou <ebotcazou@adacore.com>
397
398 * exp_disp.adb (Make_Tags): Mark the imported view of dispatch tables.
399 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Make imported
400 constants really constant.
401 <E_Record_Subtype>: Strip the suffix for dispatch table entities.
402
403 2010-05-08 Eric Botcazou <ebotcazou@adacore.com>
404
405 * gcc-interface/decl.c (make_aligning_type): Declare the type.
406
407 2010-05-08 Eric Botcazou <ebotcazou@adacore.com>
408
409 * gcc-interface/decl.c (gnat_to_gnu_entity): Create variables for size
410 expressions of variant part of record types declared at library level.
411
412 2010-05-08 Eric Botcazou <ebotcazou@adacore.com>
413
414 * gcc-interface/gigi.h (create_field_decl): Move PACKED parameter.
415 * gcc-interface/utils.c (create_field_decl): Move PACKED parameter.
416 (rest_of_record_type_compilation): Adjust call to create_field_decl.
417 (make_descriptor_field): Likewise and pass correctly typed constants.
418 (build_unc_object_type): Likewise.
419 (unchecked_convert): Likewise.
420 * gcc-interface/decl.c (elaborate_expression_2): New static function.
421 (gnat_to_gnu_entity): Use it to make alignment factors explicit.
422 Adjust call to create_field_decl.
423 (make_aligning_type): Likewise.
424 (make_packable_type): Likewise.
425 (maybe_pad_type): Likewise.
426 (gnat_to_gnu_field): Likewise.
427 (components_to_record): Likewise.
428 (create_field_decl_from): Likewise.
429 (create_variant_part_from): Remove superfluous test.
430 * gcc-interface/trans.c (gigi): Adjust call to create_field_decl.
431
432 2010-05-08 Eric Botcazou <ebotcazou@adacore.com>
433
434 * gcc-interface/gigi.h (build_unc_object_type): Add DEBUG_INFO_P param.
435 (build_unc_object_type_from_ptr): Likewise.
436 * gcc-interface/utils.c (build_unc_object_type): Add DEBUG_INFO_P param
437 and pass it to create_type_decl. Declare the type. Simplify.
438 (build_unc_object_type_from_ptr): Add DEBUG_INFO_P parameter and pass
439 it to build_unc_object_type.
440 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust to above change.
441 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
442 (gnat_to_gnu): Likewise.
443 * gcc-interface/utils2.c (build_allocator): Likewise.
444
445 2010-05-07 Eric Botcazou <ebotcazou@adacore.com>
446
447 PR 40989
448 * gcc-interface/misc.c (gnat_handle_option): Fix long line.
449
450 2010-05-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
451
452 * gcc-interface/Makefile.in: Removed mips-sgi-irix5* support.
453
454 2010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
455
456 PR 40989
457 * gcc-interface/misc.c (gnat_handle_option): Add argument kind.
458
459 2010-05-02 Giuseppe Scrivano <gscrivano@gnu.org>
460
461 * gnathtml.pl: Use 755 as mask for new directories.
462
463 2010-04-28 Eric Botcazou <ebotcazou@adacore.com>
464
465 * gcc-interface/trans.c (gnat_gimplify_expr) <ADDR_EXPR>: Uniquize
466 constant constructors before taking their address.
467
468 2010-04-25 Eric Botcazou <ebotcazou@adacore.com>
469
470 * exp_dbug.ads: Fix outdated description. Mention link between XVS
471 and XVZ objects.
472 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Set
473 XVZ variable as unit size of XVS type.
474 (maybe_pad_type): Likewise.
475
476 2010-04-25 Eric Botcazou <ebotcazou@adacore.com>
477
478 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Do not
479 use memmove if the array type is bit-packed.
480
481 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
482
483 * gcc-interface/misc.c (gnat_init): Remove second argument in call to
484 build_common_tree_nodes.
485
486 2010-04-18 Ozkan Sezer <sezeroz@gmail.com>
487
488 * gsocket.h: Make sure that winsock2.h is included before windows.h.
489
490 2010-04-17 Eric Botcazou <ebotcazou@adacore.com>
491
492 * gcc-interface/utils2.c (build_unary_op) <ATTR_ADDR_EXPR>: Do not
493 issue warning.
494
495 2010-04-17 Eric Botcazou <ebotcazou@adacore.com>
496
497 * uintp.h (UI_Lt): Declare.
498 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do the size
499 computation in sizetype.
500 <E_Array_Subtype>: Use unified handling for all index types. Do not
501 generate MAX_EXPR-based expressions, only COND_EXPR-based ones. Add
502 bypass for PATs.
503 (annotate_value): Change test for negative values.
504 (validate_size): Apply test for negative values on GNAT nodes.
505 (set_rm_size): Likewise.
506 * gcc-interface/misc.c (gnat_init): Set unsigned types for sizetypes.
507 * gcc-interface/utils.c (rest_of_record_type_compilation): Change test
508 for negative values.
509 (max_size) <MINUS_EXPR>: Do not reassociate a COND_EXPR on the LHS.
510 (builtin_type_for_size): Adjust definition of signed_size_type_node.
511 * gcc-interface/utils2.c (compare_arrays): Optimize comparison of
512 lengths against zero.
513
514 2010-04-17 Eric Botcazou <ebotcazou@adacore.com>
515
516 * back-end.adb (Call_Back_End): Pass Standard_Character to gigi.
517 * gcc-interface/gigi.h (gigi): Add standard_character parameter.
518 (CHAR_TYPE_SIZE, SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE,
519 LONG_LONG_TYPE_SIZE, FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE,
520 LONG_DOUBLE_TYPE_SIZE, SIZE_TYPE): Delete.
521 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Call
522 rm_size.
523 * gcc-interface/misc.c (gnat_init): Set signedness of char as per
524 flag_signed_char. Tag sizetype with "size_type" moniker.
525 * gcc-interface/trans.c (gigi): Add standard_character parameter.
526 Remove useless built-in types. Equate unsigned_char_type_node to
527 Standard.Character. Use it instead of char_type_node throughout.
528 (Attribute_to_gnu): Likewise.
529 (gnat_to_gnu): Likewise.
530 * gcc-interface/utils2.c (build_call_raise): Likewise.
531
532 2010-04-17 Eric Botcazou <ebotcazou@adacore.com>
533
534 * gcc-interface/gigi.h (enum standard_datatypes): Add new values
535 ADT_sbitsize_one_node and ADT_sbitsize_unit_node.
536 (sbitsize_one_node): New macro.
537 (sbitsize_unit_node): Likewise.
538 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Fix
539 latent bug in the computation of subrange_p. Fold wider_p predicate.
540 (cannot_be_superflat_p): Use an explicitly signed 64-bit type to do
541 the final comparison.
542 (make_aligning_type): Build real negation and use sizetype throughout
543 the offset computation.
544 (maybe_pad_type): Do not issue the warning when the new size expression
545 is too complex.
546 (annotate_value) <INTEGER_CST>: Simplify code handling negative values.
547 * gcc-interface/misc.c (gnat_init): Initialize sbitsize_one_node and
548 sbitsize_unit_node.
549 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Pool_Address>: Fold
550 double negation.
551 (gnat_to_gnu) <N_Free_Statement>: Likewise.
552 * gcc-interface/utils.c (convert): Use sbitsize_unit_node.
553 * gcc-interface/utils2.c (compare_arrays): Compute real lengths and use
554 constants in sizetype. Remove dead code and tweak comments. Generate
555 equality instead of inequality comparisons for zero length tests.
556
557 2010-04-16 Eric Botcazou <ebotcazou@adacore.com>
558
559 * gcc-interface/gigi.h (gnat_init_decl_processing): Delete.
560 * gcc-interface/decl.c (gnat_to_gnu_entity): Constify a few variables.
561 <object>: Do not create the fake PARM_DECL if no debug info is needed.
562 Do not create the corresponding VAR_DECL of a CONST_DECL for debugging
563 purposes if no debug info is needed.
564 Fix formatting. Reorder and add comments.
565 * gcc-interface/trans.c (gnat_to_gnu) <N_Attribute_Reference>: Constify
566 variable and remove obsolete comment.
567 * gcc-interface/utils.c (convert_vms_descriptor64): Tweak comment.
568 (convert_vms_descriptor32): Likewise.
569 (convert): Remove dead code.
570 <UNCONSTRAINED_ARRAY_REF>: Pass the field instead of its name to build
571 the reference to the P_ARRAY pointer.
572 <POINTER_TYPE>: Likewise.
573 (maybe_unconstrained_array) <UNCONSTRAINED_ARRAY_TYPE>: Likewise.
574 (gnat_init_decl_processing): Delete, move contents to...
575 * gcc-interface/misc.c (gnat_init): ...here.
576
577 2010-04-16 Eric Botcazou <ebotcazou@adacore.com>
578
579 * gcc-interface/trans.c (unchecked_conversion_nop): Handle function
580 calls. Return true for conversion from a record subtype to its type.
581
582 2010-04-16 Eric Botcazou <ebotcazou@adacore.com>
583
584 * gcc-interface/decl.c (gnat_to_gnu_entity): Use boolean_type_node in
585 lieu of integer_type_node for boolean operations.
586 (choices_to_gnu): Likewise.
587 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
588 (Loop_Statement_to_gnu): Likewise.
589 (establish_gnat_vms_condition_handler): Likewise.
590 (Exception_Handler_to_gnu_sjlj): Likewise.
591 (gnat_to_gnu): Likewise.
592 (build_unary_op_trapv): Likewise.
593 (build_binary_op_trapv): Likewise.
594 (emit_range_check): Likewise.
595 (emit_index_check): Likewise.
596 (convert_with_check): Likewise.
597 * gcc-interface/utils.c (convert_vms_descriptor64): Likewise.
598 (convert_vms_descriptor32): Likewise.
599 (convert_vms_descriptor): Likewise.
600 * gcc-interface/utils2.c (nonbinary_modular_operation): Likewise.
601 (compare_arrays): Use boolean instead of integer constants.
602 (build_binary_op) <TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR, TRUTH_AND_EXPR,
603 TRUTH_OR_EXPR, TRUTH_XOR_EXPR>: New case. Check that the result type
604 is a boolean type.
605 <GE_EXPR, LE_EXPR, GT_EXPR, LT_EXPR>: Remove obsolete assertion.
606 <EQ_EXPR, NE_EXPR>: Check that the result type is a boolean type.
607 <PREINC/PREDECREMENT_EXPR, POSTINC/POSTDECREMENT_EXPR>: Delete.
608 <TRUTH_NOT_EXPR>: Check that the result type is a boolean type.
609 (build_unary_op): Use boolean_type_node in lieu of integer_type_node
610 for boolean operations.
611 (fill_vms_descriptor): Likewise. Fix formatting nits.
612
613 2010-04-16 Eric Botcazou <ebotcazou@adacore.com>
614
615 * gcc-interface/ada-tree.def (LOOP_STMT): Change to 4-operand nodes.
616 * gcc-interface/ada-tree.h (LOOP_STMT_TOP_COND, LOOP_STMT_BOT_COND):
617 Merge into...
618 (LOOP_STMT_COND): ...this.
619 (LOOP_STMT_BOTTOM_COND_P): New flag.
620 (LOOP_STMT_TOP_UPDATE_P): Likewise.
621 * gcc-interface/trans.c (can_equal_min_or_max_val_p): New function.
622 (can_equal_min_val_p): New static inline function.
623 (can_equal_max_val_p): Likewise.
624 (Loop_Statement_to_gnu): Use build4 in lieu of build5 and adjust to
625 new LOOP_STMT semantics. Use two different strategies depending on
626 whether optimization is enabled to translate the loop.
627 (gnat_gimplify_stmt) <LOOP_STMT>: Adjust to new LOOP_STMT semantics.
628
629 2010-04-16 Eric Botcazou <ebotcazou@adacore.com>
630
631 * uintp.adb (UI_From_Dint): Remove useless code.
632 (UI_From_Int): Likewise.
633 * uintp.h: Reorder declarations.
634 (UI_From_gnu): Declare.
635 (UI_Base): Likewise.
636 (Vector_Template): Likewise.
637 (Vector_To_Uint): Likewise.
638 (Uint_0): Remove.
639 (Uint_1): Likewise.
640 * gcc-interface/gigi.h: Tweak comments.
641 * gcc-interface/cuintp.c (UI_From_gnu): New global function.
642 * gcc-interface/decl.c (maybe_pad_type): Do not warn if either size
643 overflows.
644 (annotate_value) <INTEGER_CST>: Call UI_From_gnu.
645 * gcc-interface/trans.c (post_error_ne_num): Call post_error_ne.
646 (post_error_ne_tree): Call UI_From_gnu and post_error_ne.
647 * gcc-interface/utils.c (max_size) <tcc_binary>: Do not special-case
648 TYPE_MAX_VALUE.
649
650 2010-04-16 Eric Botcazou <ebotcazou@adacore.com>
651
652 * gcc-interface/decl.c (make_type_from_size) <INTEGER_TYPE>: Just copy
653 TYPE_NAME.
654 * gcc-interface/trans.c (smaller_packable_type_p): Rename into...
655 (smaller_form_type_p): ...this. Change parameter and variable names.
656 (call_to_gnu): Use the nominal type of the parameter to create the
657 temporary if it's a smaller form of the actual type.
658 (addressable_p): Return false if the actual type is integral and its
659 size is greater than that of the expected type.
660
661 2010-04-15 Eric Botcazou <ebotcazou@adacore.com>
662
663 * gcc-interface/cuintp.c (UI_To_gnu): Fix long line.
664 * gcc-interface/gigi.h (MARK_VISITED): Skip objects of constant class.
665 (process_attributes): Delete.
666 (post_error_ne_num): Change parameter name.
667 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force debug info
668 with -g3. Remove a couple of obsolete lines. Minor tweaks.
669 If type annotating mode, operate on trees to compute the adjustment to
670 the sizes of tagged types. Fix long line.
671 (cannot_be_superflat_p): Tweak head comment.
672 (annotate_value): Fold local constant.
673 (set_rm_size): Fix long line.
674 * gcc-interface/trans.c (Identifier_to_gnu): Rework comments.
675 (Attribute_to_gnu): Fix long line.
676 <Attr_Size>: Remove useless assertion.
677 Reorder statements. Use size_binop routine.
678 (Loop_Statement_to_gnu): Use build5 in lieu of build_nt.
679 Create local variables for the label and the test. Tweak comments.
680 (Subprogram_Body_to_gnu): Reset cfun to NULL.
681 (Compilation_Unit_to_gnu): Use the Sloc of the Unit node.
682 (process_inlined_subprograms): Integrate into...
683 (Compilation_Unit_to_gnu): ...this.
684 (gnat_to_gnu): Fix long line.
685 (post_error_ne_num): Change parameter name.
686 * gcc-interface/utils.c (process_attributes): Static-ify.
687 <ATTR_MACHINE_ATTRIBUTE>: Set input_location before proceeding.
688 (create_type_decl): Add comment.
689 (create_var_decl_1): Process the attributes after adding the VAR_DECL
690 to the current binding level.
691 (create_subprog_decl): Likewise for the FUNCTION_DECL.
692 (end_subprog_body): Do not reset cfun to NULL.
693 (build_vms_descriptor32): Fix long line.
694 (build_vms_descriptor): Likewise.
695 (handle_nonnull_attribute): Likewise.
696 (convert_vms_descriptor64): Likewise.
697 * gcc-interface/utils2.c (fill_vms_descriptor): Fix long line.
698 (gnat_protect_expr): Fix thinko.
699
700 2010-04-15 Eric Botcazou <ebotcazou@adacore.com>
701
702 * gcc-interface/trans.c (gigi): Set DECL_IGNORED_P on EH functions.
703 (gnat_to_gnu) <N_Op_Eq>: Restore the value of input_location
704 before translating the top-level node.
705 (lvalue_required_p) <N_Function_Call>: Return 1 if !constant.
706 <N_Object_Declaration>: Likewise.
707 <N_Assignment_Statement>: Likewise.
708 <N_Unchecked_Type_Conversion>: Likewise.
709 (call_to_gnu): Remove kludge.
710 (gnat_to_gnu) <N_Return_Statement>: When not optimizing, force labels
711 associated with user returns to be preserved.
712 (gnat_to_gnu): Add special code to deal with boolean rvalues.
713 * gcc-interface/utils2.c (compare_arrays): Set input_location on all
714 comparisons.
715 (build_unary_op) <ADDR_EXPR>: Call build_fold_addr_expr.
716 <INDIRECT_REF>: Call build_fold_indirect_ref.
717
718 2010-04-15 Joel Sherrill <joel.sherrill@oarcorp.com>
719
720 * g-socket.adb: A target can have multiple missing errno's. This
721 will result in multiple errno's being defined as -1. Because of this
722 we can not use a case but must use a series of if's to avoid
723 a duplicate case error in GNAT.Sockets.Resolve_Error.
724
725 2010-04-15 Eric Botcazou <ebotcazou@adacore.com>
726
727 * gcc-interface/trans.c (call_to_gnu): Open a nesting level if this is
728 a statement. Otherwise, if at top-level, push the processing of the
729 elaboration routine. In the misaligned case, issue the error messages
730 again on entry and create the temporary explicitly. Do not issue them
731 for CONSTRUCTORs.
732 For a function call, emit the range check if necessary.
733 In the copy-in copy-out case, create the temporary for the return
734 value explicitly.
735 Do not unnecessarily convert by-ref parameters to the formal's type.
736 Remove obsolete guards in conditions.
737 (gnat_to_gnu) <N_Assignment_Statement>: For a function call, pass the
738 target to call_to_gnu in all cases.
739 (gnat_gimplify_expr) <ADDR_EXPR>: Remove handling of SAVE_EXPR.
740 (addressable_p) <CONSTRUCTOR>: Return false if not static.
741 <COMPOUND_EXPR>: New case.
742 * gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Fold a compound
743 expression if it has unconstrained array type.
744 (gnat_mark_addressable) <COMPOUND_EXPR>: New case.
745 (gnat_stabilize_reference) <COMPOUND_EXPR>: Stabilize operands on an
746 individual basis.
747
748 2010-04-15 Eric Botcazou <ebotcazou@adacore.com>
749
750 * gcc-interface/trans.c (gigi): Do not start statement group.
751 (Compilation_Unit_to_gnu): Set current_function_decl to NULL.
752 Start statement group and push binding level here...
753 (gnat_to_gnu) <N_Compilation_Unit>: ...and not here.
754 Do not push fake contexts at top level. Remove redundant code.
755 (call_to_gnu): Rename a local variable and constify another.
756 * gcc-interface/utils.c (gnat_pushlevel): Fix formatting nits.
757 (set_current_block_context): Set it as the group's block.
758 (gnat_init_decl_processing): Delete unrelated init code.
759 (end_subprog_body): Use NULL_TREE.
760
761 2010-04-15 Eric Botcazou <ebotcazou@adacore.com>
762
763 * gcc-interface/trans.c (call_to_gnu): Do not unnecessarily force
764 side-effects of actual parameters before the call.
765
766 2010-04-15 Eric Botcazou <ebotcazou@adacore.com>
767
768 * gcc-interface/decl.c (validate_size): Reorder, remove obsolete test
769 and warning.
770 (set_rm_size): Reorder and remove obsolete test.
771
772 2010-04-14 Eric Botcazou <ebotcazou@adacore.com>
773
774 * gcc-interface/gigi.h: Reorder declarations and tweak comments.
775 (gigi): Adjust ATTRIBUTE_UNUSED markers.
776 * gcc-interface/gadaint.h: New file.
777 * gcc-interface/trans.c: Include it in lieu of adaint.h. Reorder.
778 (__gnat_to_canonical_file_spec): Remove declaration.
779 (number_names): Delete.
780 (number_files): Likewise.
781 (gigi): Adjust.
782 * gcc-interface/Make-lang.in (ada/trans.o): Adjust dependencies to
783 above change.
784
785 2010-04-14 Eric Botcazou <ebotcazou@adacore.com>
786
787 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Class_Wide_Type>: Fix
788 comment.
789 * gcc-interface/trans.c (process_freeze_entity): Use local copy of
790 Ekind. Return early for class-wide types. Do not compute initializer
791 unless necessary. Reuse the tree for an associated class-wide type
792 only if processing its root type.
793
794 2010-04-13 Joel Sherrill <joel.sherrill@oarcorp.com>
795
796 * gsocket.h: Run-time can no longer be built without network
797 OS headers available. Changing RTEMS GNAT build procedure to
798 reflect this and letting run-time build use network .h files.
799
800 2010-04-13 Duncan Sands <baldrick@free.fr>
801
802 * gcc-interface/misc.c (gnat_eh_type_covers): Remove.
803 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Update comment.
804
805 2010-04-13 Eric Botcazou <ebotcazou@adacore.com>
806
807 * gcc-interface/gigi.h (standard_datatypes): Add ADT_parent_name_id.
808 (parent_name_id): New macro.
809 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Use it.
810 * gcc-interface/trans.c (gigi): Initialize it.
811 (lvalue_required_p) <N_Type_Conversion>: New case.
812 <N_Qualified_Expression>: Likewise.
813 <N_Allocator>: Likewise.
814 * gcc-interface/utils.c (convert): Try to properly upcast tagged types.
815
816 2010-04-13 Eric Botcazou <ebotcazou@adacore.com>
817
818 * gcc-interface/ada-tree.h (TYPE_BY_REFERENCE_P): Delete.
819 (DECL_CONST_ADDRESS_P): New macro.
820 (SET_DECL_ORIGINAL_FIELD_TO_FIELD): Likewise.
821 (SAME_FIELD_P): Likewise.
822 * gcc-interface/decl.c (constructor_address_p): New static function.
823 (gnat_to_gnu_entity) <object>: Set DECL_CONST_ADDRESS_P according to
824 the return value of above function.
825 (gnat_to_gnu_entity) <E_Record_Type>: Force BLKmode for all types
826 passed by reference.
827 <E_Record_Subtype>: Likewise.
828 Set TREE_ADDRESSABLE on the type if it passed by reference.
829 (make_packable_type): Use SET_DECL_ORIGINAL_FIELD_TO_FIELD.
830 (create_field_decl_from): Likewise.
831 (substitute_in_type): Likewise.
832 (purpose_member_field): Use SAME_FIELD_P.
833 * gcc-interface/misc.c (must_pass_by_ref): Test TREE_ADDRESSABLE.
834 * gcc-interface/trans.c (lvalue_required_p): Add ADDRESS_OF_CONSTANT
835 parameter and adjust recursive calls.
836 <N_Explicit_Dereference>: New case.
837 <N_Object_Declaration>: Return 1 if the object is of a class-wide type.
838 Adjust calls to lvalue_required_p. Do not return the initializer of a
839 DECL_CONST_ADDRESS_P constant if an lvalue is required for it.
840 (call_to_gnu): Delay issuing error message for a misaligned actual and
841 avoid the associated back-end assertion. Test TREE_ADDRESSABLE.
842 (gnat_gimplify_expr) <ADDR_EXPR>: Handle non-static constructors.
843 * gcc-interface/utils.c (make_dummy_type): Set TREE_ADDRESSABLE if the
844 type is passed by reference.
845 (convert) <CONSTRUCTOR>: Convert in-place in more cases.
846 * gcc-interface/utils2.c (build_cond_expr): Drop TYPE_BY_REFERENCE_P.
847 (build_simple_component_ref): Use SAME_FIELD_P.
848
849 2010-04-12 Eric Botcazou <ebotcazou@adacore.com>
850
851 * gcc-interface/trans.c (Identifier_to_gnu): Use boolean variable.
852 (call_to_gnu): Test gigi's flag TYPE_BY_REFERENCE_P instead of calling
853 front-end's predicate Is_By_Reference_Type. Use consistent order and
854 remove ??? comment. Use original conversion in all cases, if any.
855 * gcc-interface/utils.c (make_dummy_type): Minor tweak.
856 (convert): Use local copy in more cases.
857 <INDIRECT_REF>: Remove deactivated code.
858 (unchecked_convert): Use a couple of local copies.
859
860 2010-04-11 Eric Botcazou <ebotcazou@adacore.com>
861
862 * gcc-interface/trans.c (lvalue_required_for_attribute_p): New static
863 function.
864 (lvalue_required_p) <N_Attribute_Reference>: Call it.
865 (gnat_to_gnu) <N_Selected_Component>: Prevent build_component_ref from
866 folding the result only if lvalue_required_for_attribute_p is true.
867 * gcc-interface/utils.c (maybe_unconstrained_array): Pass correctly
868 typed constant to build_component_ref.
869 (unchecked_convert): Likewise.
870 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
871 (build_allocator): Likewise.
872
873 2010-04-11 Eric Botcazou <ebotcazou@adacore.com>
874
875 * gcc-interface/utils2.c (build_cond_expr): Take the address and
876 dereference if the result type is passed by reference.
877
878 2010-04-11 Eric Botcazou <ebotcazou@adacore.com>
879
880 * gcc-interface/trans.c (Case_Statement_to_gnu): Bool-ify variable.
881 (gnat_to_gnu) <N_Null_Statement>: When not optimizing, generate a
882 goto to the next statement.
883
884 2010-04-09 Eric Botcazou <ebotcazou@adacore.com>
885
886 * gcc-interface/gigi.h (maybe_variable): Delete.
887 (protect_multiple_eval): Likewise.
888 (maybe_stabilize_reference): Likewise.
889 (gnat_save_expr): Declare.
890 (gnat_protect_expr): Likewise.
891 (gnat_stabilize_reference): Likewise.
892 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Use
893 gnat_stabilize_reference.
894 (maybe_variable): Delete.
895 (elaborate_expression_1): Use gnat_save_expr.
896 * gcc-interface/trans.c (Attribute_to_gnu): Use gnat_protect_expr.
897 (call_to_gnu): Pass NULL to gnat_stabilize_reference.
898 (gnat_to_gnu) <N_Object_Declaration>: Use gnat_save_expr.
899 <N_Slice>: Use gnat_protect_exp.
900 <N_Selected_Component>: Pass NULL to gnat_stabilize_reference.
901 <N_In>: Use gnat_protect_expr.
902 Pass NULL to gnat_stabilize_reference.
903 (build_unary_op_trapv): Use gnat_protect_expr.
904 (build_binary_op_trapv): Likewise.
905 (emit_range_check): Likewise.
906 (emit_index_check): Likewise.
907 (convert_with_check): Likewise.
908 (protect_multiple_eval): Move to utils2.c file.
909 (maybe_stabilize_reference): Merge into...
910 (gnat_stabilize_reference): ...this. Move to utils2.c file.
911 (gnat_stabilize_reference_1): Likewise.
912 * gcc-interface/utils.c (convert_to_fat_pointer): Use gnat_protect_expr
913 instead of protect_multiple_eval.
914 * gcc-interface/utils2.c (compare_arrays): Likewise.
915 (nonbinary_modular_operation): Likewise.
916 (maybe_wrap_malloc): Likewise.
917 (build_allocator): Likewise.
918 (gnat_save_expr): New function.
919 (gnat_protect_expr): Rename from protect_multiple_eval. Early return
920 in common cases. Propagate TREE_READONLY onto dereferences.
921 (gnat_stabilize_reference_1): Move from trans.c file.
922 (gnat_stabilize_reference): Likewise.
923
924 2010-04-09 Eric Botcazou <ebotcazou@adacore.com>
925
926 * gcc-interface/gigi.h (gnat_mark_addressable): Rename parameter.
927 * gcc-interface/decl.c (maybe_variable): Do not set TREE_STATIC on _REF
928 node. Use the type of the operand to set TREE_READONLY.
929 * gcc-interface/trans.c (Identifier_to_gnu): Do not set TREE_STATIC on
930 _REF node. Do not overwrite TREE_READONLY.
931 (call_to_gnu): Rename local variable and fix various nits. In the
932 copy-in/copy-out case, build the SAVE_EXPR manually.
933 (convert_with_check): Call protect_multiple_eval in lieu of save_expr
934 and fold the computations.
935 (protect_multiple_eval): Always save entire fat pointers.
936 (maybe_stabilize_reference): Minor tweaks.
937 (gnat_stabilize_reference_1): Likewise. Do not deal with tcc_constant,
938 tcc_type and tcc_statement.
939 * gcc-interface/utils.c (convert_to_fat_pointer): Call
940 protect_multiple_eval in lieu of save_expr.
941 (convert): Minor tweaks.
942 (maybe_unconstrained_array): Do not set TREE_STATIC on _REF node.
943 (builtin_type_for_size): Call gnat_type_for_size directly.
944 * gcc-interface/utils2.c (contains_save_expr_p): Delete.
945 (contains_null_expr): Likewise
946 (gnat_build_constructor): Do not call it.
947 (compare_arrays): Deal with all side-effects, use protect_multiple_eval
948 instead of gnat_stabilize_reference to protect the operands.
949 (nonbinary_modular_operation): Call protect_multiple_eval in lieu of
950 save_expr.
951 (maybe_wrap_malloc): Likewise.
952 (build_allocator): Likewise.
953 (build_unary_op) <INDIRECT_REF>: Do not set TREE_STATIC on _REF node.
954 (gnat_mark_addressable): Rename parameter.
955
956 2010-04-08 Eric Botcazou <ebotcazou@adacore.com>
957
958 * gcc-interface/ada-tree.h (TYPE_RETURNS_UNCONSTRAINED_P): Rename into.
959 (TYPE_RETURN_UNCONSTRAINED_P): ...this.
960 (TYPE_RETURNS_BY_REF_P): Rename into.
961 (TYPE_RETURN_BY_DIRECT_REF_P): ...this.
962 (TYPE_RETURNS_BY_TARGET_PTR_P): Delete.
963 * gcc-interface/gigi.h (create_subprog_type): Adjust parameter names.
964 (build_return_expr): Likewise.
965 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>:
966 Rename local variables. If the return Mechanism is By_Reference, pass
967 return_by_invisible_ref_p to create_subprog_type instead of toggling
968 TREE_ADDRESSABLE. Test return_by_invisible_ref_p in order to annotate
969 the mechanism. Use regular return for contrained types with non-static
970 size and return by invisible reference for unconstrained return types
971 with default discriminants. Update comment.
972 * gcc-interface/trans.c (Subprogram_Body_to_gnu): If the function
973 returns by invisible reference, turn the RESULT_DECL into a pointer.
974 Do not handle DECL_BY_REF_P in the CICO case here.
975 (call_to_gnu): Remove code handling return by target pointer. For a
976 function call, if the return type has non-constant size, generate the
977 assignment with an INIT_EXPR.
978 (gnat_to_gnu) <N_Return_Statement>: Remove dead code in the CICO case.
979 If the function returns by invisible reference, build the copy return
980 operation manually.
981 (add_decl_expr): Initialize the variable with an INIT_EXPR.
982 * gcc-interface/utils.c (create_subprog_type): Adjust parameter names.
983 Adjust for renaming of macros. Copy the node only when necessary.
984 (create_subprog_decl): Do not toggle TREE_ADDRESSABLE on the return
985 type, only change DECL_BY_REFERENCE on the RETURN_DECL.
986 (convert_from_reference): Delete.
987 (is_byref_result): Likewise.
988 (gnat_genericize_r): Likewise.
989 (gnat_genericize): Likewise.
990 (end_subprog_body): Do not call gnat_genericize.
991 * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: New case.
992 (build_return_expr): Adjust parameter names, logic and comment.
993
994 2010-04-07 Eric Botcazou <ebotcazou@adacore.com>
995
996 * exp_pakd.adb (Create_Packed_Array_Type): Always use a modular type
997 if the size is small enough. Propagate the alignment if there is an
998 alignment clause on the original array type.
999 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Subtype>
1000 Deal with under-aligned packed array types. Copy the size onto the
1001 justified modular type and don't lay it out again. Likewise for the
1002 padding type built for other under-aligned subtypes.
1003 * gcc-interface/utils.c (finish_record_type): Do not set a default mode
1004 on the type.
1005
1006 2010-04-07 Eric Botcazou <ebotcazou@adacore.com>
1007
1008 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set default
1009 alignment on the RETURN type built for the Copy-In Copy-Out mechanism.
1010
1011 2010-04-07 Eric Botcazou <ebotcazou@adacore.com>
1012
1013 * gcc-interface/trans.c (call_to_gnu): In the return-by-target-ptr case
1014 do not set the result type if there is a specified target and do not
1015 convert the result in any cases.
1016 (protect_multiple_eval): Make direct SAVE_EXPR for CALL_EXPR.
1017 (maybe_stabilize_reference) <COMPOUND_EXPR>: Merge with CALL_EXPR.
1018
1019 2010-03-10 Eric Botcazou <ebotcazou@adacore.com>
1020
1021 * gcc-interface/Makefile.in (SPARC/Solaris): Use sparcv8plus.
1022
1023 2010-02-27 Eric Botcazou <ebotcazou@adacore.com>
1024
1025 PR ada/42253
1026 * gcc-interface/utils2.c (build_binary_op) <EQ_EXPR>: Assert that fat
1027 pointer base types are variant of each other. Apply special treatment
1028 for null to fat pointer types in all cases.
1029
1030 2010-01-28 Pascal Obry <obry@adacore.com>
1031
1032 * s-win32.ads: Add some missing constants.
1033
1034 2010-01-28 Vincent Celier <celier@adacore.com>
1035
1036 * prj-attr-pm.adb (Add_Attribute): Do nothing if To_Package is
1037 Unknown_Package.
1038
1039 2010-01-28 Robert Dewar <dewar@adacore.com>
1040
1041 * gnat_rm.texi: Minor correction
1042
1043 2010-01-27 Pascal Obry <obry@adacore.com>
1044
1045 * g-awk.adb: ensure that an AWK session is reusable.
1046
1047 2010-01-27 Vasiliy Fofanov <fofanov@adacore.com>
1048
1049 * g-regist.adb (For_Every_Key): Fix previous change.
1050 Minor reformatting.
1051
1052 2010-01-27 Thomas Quinot <quinot@adacore.com>
1053
1054 * lib-writ.ads: Current version of spec for new N (note) ALI lines
1055
1056 2010-01-27 Yannick Moy <moy@adacore.com>
1057
1058 * a-cdlili.adb (Insert): Correct exception message when cursor
1059 designates wrong list.
1060
1061 2010-01-27 Vincent Celier <celier@adacore.com>
1062
1063 * gnatcmd.adb: When there is only one main specified, the package
1064 support Switches (<main>) and attribute Switches is specified for the
1065 main, use these switches, instead of Default_Switches ("Ada").
1066
1067 2010-01-27 Robert Dewar <dewar@adacore.com>
1068
1069 * sem_prag.adb, par-prag.adb, snames.ads-tmpl: pragma Dimension initial
1070 implementation.
1071 * exp_disp.adb: Minor reformatting
1072
1073 2010-01-27 Tristan Gingold <gingold@adacore.com>
1074
1075 * seh_init.c: Use __ImageBase instead of _ImageBase.
1076
1077 2010-01-27 Javier Miranda <miranda@adacore.com>
1078
1079 * exp_disp.ads, exp_disp.adb (Expand_Interface_Thunk): Modify the
1080 profile of interface thunks. The type of the controlling formal is now
1081 the covered interface type (instead of the target tagged type).
1082
1083 2010-01-27 Sergey Rybin <rybin@adacore.com>
1084
1085 * gnat_rm.texi, gnat_ugn.texi: Update gnatcheck doc.
1086
1087 2010-01-27 Robert Dewar <dewar@adacore.com>
1088
1089 * sinput.ads, sinput.adb (Sloc_Range): Applies to all nodes, formal
1090 changed from Expr to N.
1091
1092 2010-01-26 Thomas Quinot <quinot@adacore.com>
1093
1094 * gnat_ugn.texi: Adjust documentation of -gnatz switches.
1095 * usage.adb: Replace line for -gnatz with two lines for -gnatzc and
1096 -gnatzr.
1097
1098 2010-01-26 Vincent Celier <celier@adacore.com>
1099
1100 * prj-attr.adb: Add new attribute Library_Install_Name_Option
1101 Replace attribute Run_Path_Origin_Supported with Run_Path_Origin
1102 * prj-nmsc.adb (Process_Project_Level_Simple_Attributes): Process
1103 attributes Run_Path_Option and Library_Install_Name_Option.
1104 * prj.ads (Project_Configuration): Replace component
1105 Run_Path_Origin_Supported with component Run_Path_Origin. Add new
1106 component Library_Install_Name_Option.
1107 * snames.ads-tmpl: Add new standard name Library_Install_Name_Option
1108 Replace Run_Path_Origin_Supported with Run_Path_Origin
1109
1110 2010-01-26 Ed Schonberg <schonberg@adacore.com>
1111
1112 * sem_ch8.adb (Use_One_Package): Within an instance, an actual package
1113 is not hidden by a homograph declared in another actual package.
1114
1115 2010-01-26 Robert Dewar <dewar@adacore.com>
1116
1117 * par_sco.adb (Traverse_Declarations_Or_Statements): Only generate
1118 decisions for pragmas Assert, Check, Precondition, Postcondition if
1119 -gnata set.
1120 * scos.ads: Update comments.
1121 * get_scos.adb, put_scos.adb: Minor fix to code reading statement SCOs.
1122 Also remove obsolete code for CT (exit point) SCOs.
1123
1124 2010-01-26 Thomas Quinot <quinot@adacore.com>
1125
1126 * switch-c.adb: Fix handling of -gnatz*
1127
1128 2010-01-26 Robert Dewar <dewar@adacore.com>
1129
1130 * par_sco.adb (Traverse_Declarations_Or_Statements): Separate F/W
1131 qualifiers for FOR/WHILE loops
1132 * scos.ads: Use separate type letters F/W for for/while loops
1133
1134 2010-01-26 Robert Dewar <dewar@adacore.com>
1135
1136 * get_scos.adb (Get_SCOs): Implement new form of CS entries (multiple
1137 entries per line, one for each statement in the sequence).
1138 * par_sco.adb (Traverse_Declarations_Or_Statements): Increase array
1139 size from 100 to 10_000 for SC_Array to avoid any real possibility of
1140 overflow. Output decisions in for loops.
1141 Exclude labels from CS lines.
1142 * scos.ads: Clarify that label is not included in the entry point
1143
1144 2010-01-26 Robert Dewar <dewar@adacore.com>
1145
1146 * par_sco.adb (Traverse_Declarations_Or_Statments): Implement new
1147 format of statement sequence SCO entries (one location/statement).
1148 * put_scos.adb (Put_SCOs): Implement new format of CS lines
1149 * scos.ads: Update comments.
1150 * sem_eval.adb: Minor reformatting.
1151
1152 2010-01-26 Robert Dewar <dewar@adacore.com>
1153
1154 * par_sco.ads, par_sco.adb (Set_Statement_Entry): New handling of exits
1155 (Extend_Statement_Sequence): New procedures
1156 (Traverse_Declarations_Or_Statements): New handling for exits.
1157
1158 2010-01-26 Robert Dewar <dewar@adacore.com>
1159
1160 * par_sco.adb (Traverse_Declarations_Or_Statements): Add processing for
1161 Case.
1162
1163 2010-01-26 Robert Dewar <dewar@adacore.com>
1164
1165 * par_sco.adb (Is_Logical_Operator): Exclude AND/OR/XOR
1166 * scos.ads: Clarify handling of logical operators
1167
1168 2010-01-26 Arnaud Charlet <charlet@adacore.com>
1169
1170 * s-tpoben.adb: Update comments.
1171
1172 2010-01-26 Robert Dewar <dewar@adacore.com>
1173
1174 * freeze.adb (Set_Small_Size): Don't set size if alignment clause
1175 present.
1176
1177 2010-01-26 Robert Dewar <dewar@adacore.com>
1178
1179 * scos.ads: Clean up documentation, remove obsolete XOR references
1180 2010-01-26 Vincent Celier <celier@adacore.com>
1181
1182 * gnat_ugn.texi: Complete documentation on the restrictions for
1183 combined options in -gnatxxx switches.
1184 Fix typo.
1185
1186 2010-01-26 Arnaud Charlet <charlet@adacore.com>
1187
1188 * s-tpoben.adb (Initialize_Protection_Entries): If a PO is created from
1189 a controlled operation, abort is already deferred at this point, so we
1190 need to use Defer_Abort_Nestable.
1191
1192 2010-01-26 Vincent Celier <celier@adacore.com>
1193
1194 * prj-conf.adb (Get_Config_Switches): Check for a default language for
1195 a project extending a project with no languages.
1196
1197 2010-01-26 Vincent Celier <celier@adacore.com>
1198
1199 * switch-c.adb (Scan_Front_End_Switches): Take into account options
1200 that follow -gnatef.
1201 Allow -gnateG to be followed by other options.
1202
1203 2010-01-26 Robert Dewar <dewar@adacore.com>
1204
1205 * s-commun.ads, s-osprim-mingw.adb, s-stchop-vxworks.adb, sem_aggr.adb,
1206 s-vxwext.adb, sem_ch10.adb, sem_eval.adb, sem_prag.adb: Minor
1207 reformatting.
1208
1209 2010-01-26 Vasiliy Fofanov <fofanov@adacore.com>
1210
1211 * g-regist.adb, g-regist.ads (For_Every_Key): New generic procedure
1212 that allows to iterate over all subkeys of a key.
1213
1214 2010-01-26 Ed Falis <falis@adacore.com>
1215
1216 * sysdep.c: enable NFS for VxWorks MILS
1217 * env.c: enable __gnat_environ for VxWorks MILS
1218 * gcc-interface/Makefile.in: Add VxWorks MILS target pairs.
1219
1220 2010-01-25 Bob Duff <duff@adacore.com>
1221
1222 * sem_aggr.adb (Resolve_Array_Aggregate): Check for the case where this
1223 is an internally-generated positional aggregate, and the bounds are
1224 already correctly set. We don't want to overwrite those bounds with
1225 bounds determined by context.
1226
1227 2010-01-25 Robert Dewar <dewar@adacore.com>
1228
1229 * g-sercom.ads, gnatcmd.adb, gnatlink.adb, a-ststio.adb, exp_ch6.adb,
1230 exp_ch9.adb, g-sechas.ads: Minor reformatting.
1231
1232 2010-01-25 Thomas Quinot <quinot@adacore.com>
1233
1234 * s-commun.adb (Last_Index): Count must be converted to SEO (a signed
1235 integer type) before subtracting 1, otherwise the computation may wrap
1236 (because size_t is modular) and cause the conversion to fail.
1237
1238 2010-01-25 Ed Falis <falis@adacore.com>
1239
1240 * sysdep.c, init.c: Adapt to support full run-time on VxWorks MILS.
1241
1242 2010-01-25 Vincent Celier <celier@adacore.com>
1243
1244 * prj-attr.adb: New attribute Run_Path_Origin_Required
1245 * prj-nmsc.adb (Process_Project_Level_Simple_Attributes): Process new
1246 attribute Run_Path_Origin_Required.
1247 * prj.ads (Project_Configuration): New component
1248 Run_Path_Origin_Supported.
1249 * snames.ads-tmpl: New standard name Run_Path_Origin_Required
1250
1251 2010-01-25 Ed Schonberg <schonberg@adacore.com>
1252
1253 * sem_aggr.adb (Resolve_Array_Aggregate): If the bounds in a choice
1254 have errors, do not continue resolution of the aggregate.
1255 * sem_eval.adb (Eval_Indexed_Component): Do not attempt to evaluate if
1256 the array type indicates an error.
1257
1258 2010-01-25 Bob Duff <duff@adacore.com>
1259
1260 * sinfo.ads: Minor comment fixes.
1261
1262 2010-01-25 Bob Duff <duff@adacore.com>
1263
1264 * exp_ch4.adb, exp_aggr.adb: Minor comment fixes and code clean up.
1265
1266 2010-01-25 Arnaud Charlet <charlet@adacore.com>
1267
1268 * gnatvsn.ads (Current_Year): Update.
1269
1270 2010-01-25 Florian Villoing <villoing@adacore.com>
1271
1272 * gnat_ugn.texi: Fix typo.
1273
1274 2010-01-25 Thomas Quinot <quinot@adacore.com>
1275
1276 * scos.ads: Update specification.
1277
1278 2010-01-25 Ed Schonberg <schonberg@adacore.com>
1279
1280 * sem_ch6.adb (Process_PPCs): If a postcondition is present and the
1281 enclosing subprogram has no previous spec, attach postcondition
1282 procedure to the defining entity for the body.
1283
1284 2010-01-25 Ed Schonberg <schonberg@adacore.com>
1285
1286 * exp_aggr.adb (Build_Record_Aggr_Code); Do not generate call to
1287 initialization procedure of the ancestor part of an extension aggregate
1288 if it is an interface type.
1289
1290 2010-01-25 Vincent Celier <celier@adacore.com>
1291
1292 * gnatlink.adb (Process_Binder_File): The directory for the shared
1293 version of libgcc in the run path options is found in the subdirectory
1294 indicated by __gnat_default_libgcc_subdir.
1295 * link.c: Declare new const char * __gnat_default_libgcc_subdir for
1296 each platform.
1297
1298 2010-01-25 Ed Schonberg <schonberg@adacore.com>
1299
1300 * sem_prag.adb: More flexible pragma Annotate.
1301
1302 2010-01-22 Eric Botcazou <ebotcazou@adacore.com>
1303
1304 * system-linux-armel.ads (Stack_Check_Probes): Set to True.
1305 * system-linux-armeb.ads (Stack_Check_Probes): Likewise.
1306
1307 2010-01-18 Eric Botcazou <ebotcazou@adacore.com>
1308
1309 * gcc-interface/utils.c (create_var_decl_1): Fix formatting nits.
1310
1311 2010-01-18 Jan Hubicka <jh@suse.cz>
1312
1313 PR middle-end/42068
1314 * gcc-interface/utils.c (create_var_decl_1): Do not set COMMON flag for
1315 unit local variables.
1316
1317 2010-01-17 Laurent GUERBY <laurent@guerby.net>
1318
1319 * gcc-interface/Makefile.in: Fix typo in arm*-*-linux-gnueabi.
1320
1321 2010-01-11 Mikael Pettersson <mikpe@it.uu.se>
1322
1323 * gcc-interface/Makefile.in: Add arm*-*-linux-gnueabi.
1324 * system-linux-armeb.ads, system-linux-armel.ads: New files.
1325
1326 2010-01-09 Simon Wright <simon@pushface.org>
1327
1328 PR ada/42626
1329 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Add missing
1330 end-quote.
1331
1332
1333 \f
1334 Copyright (C) 2010 Free Software Foundation, Inc.
1335
1336 Copying and distribution of this file, with or without modification,
1337 are permitted in any medium without royalty provided the copyright
1338 notice and this notice are preserved.