1 2010-04-17 Eric Botcazou <ebotcazou@adacore.com>
3 * gcc-interface/utils2.c (build_unary_op) <ATTR_ADDR_EXPR>: Do not
6 2010-04-17 Eric Botcazou <ebotcazou@adacore.com>
8 * uintp.h (UI_Lt): Declare.
9 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do the size
10 computation in sizetype.
11 <E_Array_Subtype>: Use unified handling for all index types. Do not
12 generate MAX_EXPR-based expressions, only COND_EXPR-based ones. Add
14 (annotate_value): Change test for negative values.
15 (validate_size): Apply test for negative values on GNAT nodes.
16 (set_rm_size): Likewise.
17 * gcc-interface/misc.c (gnat_init): Set unsigned types for sizetypes.
18 * gcc-interface/utils.c (rest_of_record_type_compilation): Change test
20 (max_size) <MINUS_EXPR>: Do not reassociate a COND_EXPR on the LHS.
21 (builtin_type_for_size): Adjust definition of signed_size_type_node.
22 * gcc-interface/utils2.c (compare_arrays): Optimize comparison of
25 2010-04-17 Eric Botcazou <ebotcazou@adacore.com>
27 * back-end.adb (Call_Back_End): Pass Standard_Character to gigi.
28 * gcc-interface/gigi.h (gigi): Add standard_character parameter.
29 (CHAR_TYPE_SIZE, SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE,
30 LONG_LONG_TYPE_SIZE, FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE,
31 LONG_DOUBLE_TYPE_SIZE, SIZE_TYPE): Delete.
32 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Call
34 * gcc-interface/misc.c (gnat_init): Set signedness of char as per
35 flag_signed_char. Tag sizetype with "size_type" moniker.
36 * gcc-interface/trans.c (gigi): Add standard_character parameter.
37 Remove useless built-in types. Equate unsigned_char_type_node to
38 Standard.Character. Use it instead of char_type_node throughout.
39 (Attribute_to_gnu): Likewise.
40 (gnat_to_gnu): Likewise.
41 * gcc-interface/utils2.c (build_call_raise): Likewise.
43 2010-04-17 Eric Botcazou <ebotcazou@adacore.com>
45 * gcc-interface/gigi.h (enum standard_datatypes): Add new values
46 ADT_sbitsize_one_node and ADT_sbitsize_unit_node.
47 (sbitsize_one_node): New macro.
48 (sbitsize_unit_node): Likewise.
49 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Fix
50 latent bug in the computation of subrange_p. Fold wider_p predicate.
51 (cannot_be_superflat_p): Use an explicitly signed 64-bit type to do
53 (make_aligning_type): Build real negation and use sizetype throughout
54 the offset computation.
55 (maybe_pad_type): Do not issue the warning when the new size expression
57 (annotate_value) <INTEGER_CST>: Simplify code handling negative values.
58 * gcc-interface/misc.c (gnat_init): Initialize sbitsize_one_node and
60 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Pool_Address>: Fold
62 (gnat_to_gnu) <N_Free_Statement>: Likewise.
63 * gcc-interface/utils.c (convert): Use sbitsize_unit_node.
64 * gcc-interface/utils2.c (compare_arrays): Compute real lengths and use
65 constants in sizetype. Remove dead code and tweak comments. Generate
66 equality instead of inequality comparisons for zero length tests.
68 2010-04-16 Eric Botcazou <ebotcazou@adacore.com>
70 * gcc-interface/gigi.h (gnat_init_decl_processing): Delete.
71 * gcc-interface/decl.c (gnat_to_gnu_entity): Constify a few variables.
72 <object>: Do not create the fake PARM_DECL if no debug info is needed.
73 Do not create the corresponding VAR_DECL of a CONST_DECL for debugging
74 purposes if no debug info is needed.
75 Fix formatting. Reorder and add comments.
76 * gcc-interface/trans.c (gnat_to_gnu) <N_Attribute_Reference>: Constify
77 variable and remove obsolete comment.
78 * gcc-interface/utils.c (convert_vms_descriptor64): Tweak comment.
79 (convert_vms_descriptor32): Likewise.
80 (convert): Remove dead code.
81 <UNCONSTRAINED_ARRAY_REF>: Pass the field instead of its name to build
82 the reference to the P_ARRAY pointer.
83 <POINTER_TYPE>: Likewise.
84 (maybe_unconstrained_array) <UNCONSTRAINED_ARRAY_TYPE>: Likewise.
85 (gnat_init_decl_processing): Delete, move contents to...
86 * gcc-interface/misc.c (gnat_init): ...here.
88 2010-04-16 Eric Botcazou <ebotcazou@adacore.com>
90 * gcc-interface/trans.c (unchecked_conversion_nop): Handle function
91 calls. Return true for conversion from a record subtype to its type.
93 2010-04-16 Eric Botcazou <ebotcazou@adacore.com>
95 * gcc-interface/decl.c (gnat_to_gnu_entity): Use boolean_type_node in
96 lieu of integer_type_node for boolean operations.
97 (choices_to_gnu): Likewise.
98 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
99 (Loop_Statement_to_gnu): Likewise.
100 (establish_gnat_vms_condition_handler): Likewise.
101 (Exception_Handler_to_gnu_sjlj): Likewise.
102 (gnat_to_gnu): Likewise.
103 (build_unary_op_trapv): Likewise.
104 (build_binary_op_trapv): Likewise.
105 (emit_range_check): Likewise.
106 (emit_index_check): Likewise.
107 (convert_with_check): Likewise.
108 * gcc-interface/utils.c (convert_vms_descriptor64): Likewise.
109 (convert_vms_descriptor32): Likewise.
110 (convert_vms_descriptor): Likewise.
111 * gcc-interface/utils2.c (nonbinary_modular_operation): Likewise.
112 (compare_arrays): Use boolean instead of integer constants.
113 (build_binary_op) <TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR, TRUTH_AND_EXPR,
114 TRUTH_OR_EXPR, TRUTH_XOR_EXPR>: New case. Check that the result type
116 <GE_EXPR, LE_EXPR, GT_EXPR, LT_EXPR>: Remove obsolete assertion.
117 <EQ_EXPR, NE_EXPR>: Check that the result type is a boolean type.
118 <PREINC/PREDECREMENT_EXPR, POSTINC/POSTDECREMENT_EXPR>: Delete.
119 <TRUTH_NOT_EXPR>: Check that the result type is a boolean type.
120 (build_unary_op): Use boolean_type_node in lieu of integer_type_node
121 for boolean operations.
122 (fill_vms_descriptor): Likewise. Fix formatting nits.
124 2010-04-16 Eric Botcazou <ebotcazou@adacore.com>
126 * gcc-interface/ada-tree.def (LOOP_STMT): Change to 4-operand nodes.
127 * gcc-interface/ada-tree.h (LOOP_STMT_TOP_COND, LOOP_STMT_BOT_COND):
129 (LOOP_STMT_COND): ...this.
130 (LOOP_STMT_BOTTOM_COND_P): New flag.
131 (LOOP_STMT_TOP_UPDATE_P): Likewise.
132 * gcc-interface/trans.c (can_equal_min_or_max_val_p): New function.
133 (can_equal_min_val_p): New static inline function.
134 (can_equal_max_val_p): Likewise.
135 (Loop_Statement_to_gnu): Use build4 in lieu of build5 and adjust to
136 new LOOP_STMT semantics. Use two different strategies depending on
137 whether optimization is enabled to translate the loop.
138 (gnat_gimplify_stmt) <LOOP_STMT>: Adjust to new LOOP_STMT semantics.
140 2010-04-16 Eric Botcazou <ebotcazou@adacore.com>
142 * uintp.adb (UI_From_Dint): Remove useless code.
143 (UI_From_Int): Likewise.
144 * uintp.h: Reorder declarations.
145 (UI_From_gnu): Declare.
147 (Vector_Template): Likewise.
148 (Vector_To_Uint): Likewise.
151 * gcc-interface/gigi.h: Tweak comments.
152 * gcc-interface/cuintp.c (UI_From_gnu): New global function.
153 * gcc-interface/decl.c (maybe_pad_type): Do not warn if either size
155 (annotate_value) <INTEGER_CST>: Call UI_From_gnu.
156 * gcc-interface/trans.c (post_error_ne_num): Call post_error_ne.
157 (post_error_ne_tree): Call UI_From_gnu and post_error_ne.
158 * gcc-interface/utils.c (max_size) <tcc_binary>: Do not special-case
161 2010-04-16 Eric Botcazou <ebotcazou@adacore.com>
163 * gcc-interface/decl.c (make_type_from_size) <INTEGER_TYPE>: Just copy
165 * gcc-interface/trans.c (smaller_packable_type_p): Rename into...
166 (smaller_form_type_p): ...this. Change parameter and variable names.
167 (call_to_gnu): Use the nominal type of the parameter to create the
168 temporary if it's a smaller form of the actual type.
169 (addressable_p): Return false if the actual type is integral and its
170 size is greater than that of the expected type.
172 2010-04-15 Eric Botcazou <ebotcazou@adacore.com>
174 * gcc-interface/cuintp.c (UI_To_gnu): Fix long line.
175 * gcc-interface/gigi.h (MARK_VISITED): Skip objects of constant class.
176 (process_attributes): Delete.
177 (post_error_ne_num): Change parameter name.
178 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force debug info
179 with -g3. Remove a couple of obsolete lines. Minor tweaks.
180 If type annotating mode, operate on trees to compute the adjustment to
181 the sizes of tagged types. Fix long line.
182 (cannot_be_superflat_p): Tweak head comment.
183 (annotate_value): Fold local constant.
184 (set_rm_size): Fix long line.
185 * gcc-interface/trans.c (Identifier_to_gnu): Rework comments.
186 (Attribute_to_gnu): Fix long line.
187 <Attr_Size>: Remove useless assertion.
188 Reorder statements. Use size_binop routine.
189 (Loop_Statement_to_gnu): Use build5 in lieu of build_nt.
190 Create local variables for the label and the test. Tweak comments.
191 (Subprogram_Body_to_gnu): Reset cfun to NULL.
192 (Compilation_Unit_to_gnu): Use the Sloc of the Unit node.
193 (process_inlined_subprograms): Integrate into...
194 (Compilation_Unit_to_gnu): ...this.
195 (gnat_to_gnu): Fix long line.
196 (post_error_ne_num): Change parameter name.
197 * gcc-interface/utils.c (process_attributes): Static-ify.
198 <ATTR_MACHINE_ATTRIBUTE>: Set input_location before proceeding.
199 (create_type_decl): Add comment.
200 (create_var_decl_1): Process the attributes after adding the VAR_DECL
201 to the current binding level.
202 (create_subprog_decl): Likewise for the FUNCTION_DECL.
203 (end_subprog_body): Do not reset cfun to NULL.
204 (build_vms_descriptor32): Fix long line.
205 (build_vms_descriptor): Likewise.
206 (handle_nonnull_attribute): Likewise.
207 (convert_vms_descriptor64): Likewise.
208 * gcc-interface/utils2.c (fill_vms_descriptor): Fix long line.
209 (gnat_protect_expr): Fix thinko.
211 2010-04-15 Eric Botcazou <ebotcazou@adacore.com>
213 * gcc-interface/trans.c (gigi): Set DECL_IGNORED_P on EH functions.
214 (gnat_to_gnu) <N_Op_Eq>: Restore the value of input_location
215 before translating the top-level node.
216 (lvalue_required_p) <N_Function_Call>: Return 1 if !constant.
217 <N_Object_Declaration>: Likewise.
218 <N_Assignment_Statement>: Likewise.
219 <N_Unchecked_Type_Conversion>: Likewise.
220 (call_to_gnu): Remove kludge.
221 (gnat_to_gnu) <N_Return_Statement>: When not optimizing, force labels
222 associated with user returns to be preserved.
223 (gnat_to_gnu): Add special code to deal with boolean rvalues.
224 * gcc-interface/utils2.c (compare_arrays): Set input_location on all
226 (build_unary_op) <ADDR_EXPR>: Call build_fold_addr_expr.
227 <INDIRECT_REF>: Call build_fold_indirect_ref.
229 2010-04-15 Joel Sherrill <joel.sherrill@oarcorp.com>
231 * g-socket.adb: A target can have multiple missing errno's. This
232 will result in multiple errno's being defined as -1. Because of this
233 we can not use a case but must use a series of if's to avoid
234 a duplicate case error in GNAT.Sockets.Resolve_Error.
236 2010-04-15 Eric Botcazou <ebotcazou@adacore.com>
238 * gcc-interface/trans.c (call_to_gnu): Open a nesting level if this is
239 a statement. Otherwise, if at top-level, push the processing of the
240 elaboration routine. In the misaligned case, issue the error messages
241 again on entry and create the temporary explicitly. Do not issue them
243 For a function call, emit the range check if necessary.
244 In the copy-in copy-out case, create the temporary for the return
246 Do not unnecessarily convert by-ref parameters to the formal's type.
247 Remove obsolete guards in conditions.
248 (gnat_to_gnu) <N_Assignment_Statement>: For a function call, pass the
249 target to call_to_gnu in all cases.
250 (gnat_gimplify_expr) <ADDR_EXPR>: Remove handling of SAVE_EXPR.
251 (addressable_p) <CONSTRUCTOR>: Return false if not static.
252 <COMPOUND_EXPR>: New case.
253 * gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Fold a compound
254 expression if it has unconstrained array type.
255 (gnat_mark_addressable) <COMPOUND_EXPR>: New case.
256 (gnat_stabilize_reference) <COMPOUND_EXPR>: Stabilize operands on an
259 2010-04-15 Eric Botcazou <ebotcazou@adacore.com>
261 * gcc-interface/trans.c (gigi): Do not start statement group.
262 (Compilation_Unit_to_gnu): Set current_function_decl to NULL.
263 Start statement group and push binding level here...
264 (gnat_to_gnu) <N_Compilation_Unit>: ...and not here.
265 Do not push fake contexts at top level. Remove redundant code.
266 (call_to_gnu): Rename a local variable and constify another.
267 * gcc-interface/utils.c (gnat_pushlevel): Fix formatting nits.
268 (set_current_block_context): Set it as the group's block.
269 (gnat_init_decl_processing): Delete unrelated init code.
270 (end_subprog_body): Use NULL_TREE.
272 2010-04-15 Eric Botcazou <ebotcazou@adacore.com>
274 * gcc-interface/trans.c (call_to_gnu): Do not unnecessarily force
275 side-effects of actual parameters before the call.
277 2010-04-15 Eric Botcazou <ebotcazou@adacore.com>
279 * gcc-interface/decl.c (validate_size): Reorder, remove obsolete test
281 (set_rm_size): Reorder and remove obsolete test.
283 2010-04-14 Eric Botcazou <ebotcazou@adacore.com>
285 * gcc-interface/gigi.h: Reorder declarations and tweak comments.
286 (gigi): Adjust ATTRIBUTE_UNUSED markers.
287 * gcc-interface/gadaint.h: New file.
288 * gcc-interface/trans.c: Include it in lieu of adaint.h. Reorder.
289 (__gnat_to_canonical_file_spec): Remove declaration.
290 (number_names): Delete.
291 (number_files): Likewise.
293 * gcc-interface/Make-lang.in (ada/trans.o): Adjust dependencies to
296 2010-04-14 Eric Botcazou <ebotcazou@adacore.com>
298 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Class_Wide_Type>: Fix
300 * gcc-interface/trans.c (process_freeze_entity): Use local copy of
301 Ekind. Return early for class-wide types. Do not compute initializer
302 unless necessary. Reuse the tree for an associated class-wide type
303 only if processing its root type.
305 2010-04-13 Joel Sherrill <joel.sherrill@oarcorp.com>
307 * gsocket.h: Run-time can no longer be built without network
308 OS headers available. Changing RTEMS GNAT build procedure to
309 reflect this and letting run-time build use network .h files.
311 2010-04-13 Duncan Sands <baldrick@free.fr>
313 * gcc-interface/misc.c (gnat_eh_type_covers): Remove.
314 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Update comment.
316 2010-04-13 Eric Botcazou <ebotcazou@adacore.com>
318 * gcc-interface/gigi.h (standard_datatypes): Add ADT_parent_name_id.
319 (parent_name_id): New macro.
320 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Use it.
321 * gcc-interface/trans.c (gigi): Initialize it.
322 (lvalue_required_p) <N_Type_Conversion>: New case.
323 <N_Qualified_Expression>: Likewise.
324 <N_Allocator>: Likewise.
325 * gcc-interface/utils.c (convert): Try to properly upcast tagged types.
327 2010-04-13 Eric Botcazou <ebotcazou@adacore.com>
329 * gcc-interface/ada-tree.h (TYPE_BY_REFERENCE_P): Delete.
330 (DECL_CONST_ADDRESS_P): New macro.
331 (SET_DECL_ORIGINAL_FIELD_TO_FIELD): Likewise.
332 (SAME_FIELD_P): Likewise.
333 * gcc-interface/decl.c (constructor_address_p): New static function.
334 (gnat_to_gnu_entity) <object>: Set DECL_CONST_ADDRESS_P according to
335 the return value of above function.
336 (gnat_to_gnu_entity) <E_Record_Type>: Force BLKmode for all types
338 <E_Record_Subtype>: Likewise.
339 Set TREE_ADDRESSABLE on the type if it passed by reference.
340 (make_packable_type): Use SET_DECL_ORIGINAL_FIELD_TO_FIELD.
341 (create_field_decl_from): Likewise.
342 (substitute_in_type): Likewise.
343 (purpose_member_field): Use SAME_FIELD_P.
344 * gcc-interface/misc.c (must_pass_by_ref): Test TREE_ADDRESSABLE.
345 * gcc-interface/trans.c (lvalue_required_p): Add ADDRESS_OF_CONSTANT
346 parameter and adjust recursive calls.
347 <N_Explicit_Dereference>: New case.
348 <N_Object_Declaration>: Return 1 if the object is of a class-wide type.
349 Adjust calls to lvalue_required_p. Do not return the initializer of a
350 DECL_CONST_ADDRESS_P constant if an lvalue is required for it.
351 (call_to_gnu): Delay issuing error message for a misaligned actual and
352 avoid the associated back-end assertion. Test TREE_ADDRESSABLE.
353 (gnat_gimplify_expr) <ADDR_EXPR>: Handle non-static constructors.
354 * gcc-interface/utils.c (make_dummy_type): Set TREE_ADDRESSABLE if the
355 type is passed by reference.
356 (convert) <CONSTRUCTOR>: Convert in-place in more cases.
357 * gcc-interface/utils2.c (build_cond_expr): Drop TYPE_BY_REFERENCE_P.
358 (build_simple_component_ref): Use SAME_FIELD_P.
360 2010-04-12 Eric Botcazou <ebotcazou@adacore.com>
362 * gcc-interface/trans.c (Identifier_to_gnu): Use boolean variable.
363 (call_to_gnu): Test gigi's flag TYPE_BY_REFERENCE_P instead of calling
364 front-end's predicate Is_By_Reference_Type. Use consistent order and
365 remove ??? comment. Use original conversion in all cases, if any.
366 * gcc-interface/utils.c (make_dummy_type): Minor tweak.
367 (convert): Use local copy in more cases.
368 <INDIRECT_REF>: Remove deactivated code.
369 (unchecked_convert): Use a couple of local copies.
371 2010-04-11 Eric Botcazou <ebotcazou@adacore.com>
373 * gcc-interface/trans.c (lvalue_required_for_attribute_p): New static
375 (lvalue_required_p) <N_Attribute_Reference>: Call it.
376 (gnat_to_gnu) <N_Selected_Component>: Prevent build_component_ref from
377 folding the result only if lvalue_required_for_attribute_p is true.
378 * gcc-interface/utils.c (maybe_unconstrained_array): Pass correctly
379 typed constant to build_component_ref.
380 (unchecked_convert): Likewise.
381 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
382 (build_allocator): Likewise.
384 2010-04-11 Eric Botcazou <ebotcazou@adacore.com>
386 * gcc-interface/utils2.c (build_cond_expr): Take the address and
387 dereference if the result type is passed by reference.
389 2010-04-11 Eric Botcazou <ebotcazou@adacore.com>
391 * gcc-interface/trans.c (Case_Statement_to_gnu): Bool-ify variable.
392 (gnat_to_gnu) <N_Null_Statement>: When not optimizing, generate a
393 goto to the next statement.
395 2010-04-09 Eric Botcazou <ebotcazou@adacore.com>
397 * gcc-interface/gigi.h (maybe_variable): Delete.
398 (protect_multiple_eval): Likewise.
399 (maybe_stabilize_reference): Likewise.
400 (gnat_save_expr): Declare.
401 (gnat_protect_expr): Likewise.
402 (gnat_stabilize_reference): Likewise.
403 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Use
404 gnat_stabilize_reference.
405 (maybe_variable): Delete.
406 (elaborate_expression_1): Use gnat_save_expr.
407 * gcc-interface/trans.c (Attribute_to_gnu): Use gnat_protect_expr.
408 (call_to_gnu): Pass NULL to gnat_stabilize_reference.
409 (gnat_to_gnu) <N_Object_Declaration>: Use gnat_save_expr.
410 <N_Slice>: Use gnat_protect_exp.
411 <N_Selected_Component>: Pass NULL to gnat_stabilize_reference.
412 <N_In>: Use gnat_protect_expr.
413 Pass NULL to gnat_stabilize_reference.
414 (build_unary_op_trapv): Use gnat_protect_expr.
415 (build_binary_op_trapv): Likewise.
416 (emit_range_check): Likewise.
417 (emit_index_check): Likewise.
418 (convert_with_check): Likewise.
419 (protect_multiple_eval): Move to utils2.c file.
420 (maybe_stabilize_reference): Merge into...
421 (gnat_stabilize_reference): ...this. Move to utils2.c file.
422 (gnat_stabilize_reference_1): Likewise.
423 * gcc-interface/utils.c (convert_to_fat_pointer): Use gnat_protect_expr
424 instead of protect_multiple_eval.
425 * gcc-interface/utils2.c (compare_arrays): Likewise.
426 (nonbinary_modular_operation): Likewise.
427 (maybe_wrap_malloc): Likewise.
428 (build_allocator): Likewise.
429 (gnat_save_expr): New function.
430 (gnat_protect_expr): Rename from protect_multiple_eval. Early return
431 in common cases. Propagate TREE_READONLY onto dereferences.
432 (gnat_stabilize_reference_1): Move from trans.c file.
433 (gnat_stabilize_reference): Likewise.
435 2010-04-09 Eric Botcazou <ebotcazou@adacore.com>
437 * gcc-interface/gigi.h (gnat_mark_addressable): Rename parameter.
438 * gcc-interface/decl.c (maybe_variable): Do not set TREE_STATIC on _REF
439 node. Use the type of the operand to set TREE_READONLY.
440 * gcc-interface/trans.c (Identifier_to_gnu): Do not set TREE_STATIC on
441 _REF node. Do not overwrite TREE_READONLY.
442 (call_to_gnu): Rename local variable and fix various nits. In the
443 copy-in/copy-out case, build the SAVE_EXPR manually.
444 (convert_with_check): Call protect_multiple_eval in lieu of save_expr
445 and fold the computations.
446 (protect_multiple_eval): Always save entire fat pointers.
447 (maybe_stabilize_reference): Minor tweaks.
448 (gnat_stabilize_reference_1): Likewise. Do not deal with tcc_constant,
449 tcc_type and tcc_statement.
450 * gcc-interface/utils.c (convert_to_fat_pointer): Call
451 protect_multiple_eval in lieu of save_expr.
452 (convert): Minor tweaks.
453 (maybe_unconstrained_array): Do not set TREE_STATIC on _REF node.
454 (builtin_type_for_size): Call gnat_type_for_size directly.
455 * gcc-interface/utils2.c (contains_save_expr_p): Delete.
456 (contains_null_expr): Likewise
457 (gnat_build_constructor): Do not call it.
458 (compare_arrays): Deal with all side-effects, use protect_multiple_eval
459 instead of gnat_stabilize_reference to protect the operands.
460 (nonbinary_modular_operation): Call protect_multiple_eval in lieu of
462 (maybe_wrap_malloc): Likewise.
463 (build_allocator): Likewise.
464 (build_unary_op) <INDIRECT_REF>: Do not set TREE_STATIC on _REF node.
465 (gnat_mark_addressable): Rename parameter.
467 2010-04-08 Eric Botcazou <ebotcazou@adacore.com>
469 * gcc-interface/ada-tree.h (TYPE_RETURNS_UNCONSTRAINED_P): Rename into.
470 (TYPE_RETURN_UNCONSTRAINED_P): ...this.
471 (TYPE_RETURNS_BY_REF_P): Rename into.
472 (TYPE_RETURN_BY_DIRECT_REF_P): ...this.
473 (TYPE_RETURNS_BY_TARGET_PTR_P): Delete.
474 * gcc-interface/gigi.h (create_subprog_type): Adjust parameter names.
475 (build_return_expr): Likewise.
476 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>:
477 Rename local variables. If the return Mechanism is By_Reference, pass
478 return_by_invisible_ref_p to create_subprog_type instead of toggling
479 TREE_ADDRESSABLE. Test return_by_invisible_ref_p in order to annotate
480 the mechanism. Use regular return for contrained types with non-static
481 size and return by invisible reference for unconstrained return types
482 with default discriminants. Update comment.
483 * gcc-interface/trans.c (Subprogram_Body_to_gnu): If the function
484 returns by invisible reference, turn the RESULT_DECL into a pointer.
485 Do not handle DECL_BY_REF_P in the CICO case here.
486 (call_to_gnu): Remove code handling return by target pointer. For a
487 function call, if the return type has non-constant size, generate the
488 assignment with an INIT_EXPR.
489 (gnat_to_gnu) <N_Return_Statement>: Remove dead code in the CICO case.
490 If the function returns by invisible reference, build the copy return
492 (add_decl_expr): Initialize the variable with an INIT_EXPR.
493 * gcc-interface/utils.c (create_subprog_type): Adjust parameter names.
494 Adjust for renaming of macros. Copy the node only when necessary.
495 (create_subprog_decl): Do not toggle TREE_ADDRESSABLE on the return
496 type, only change DECL_BY_REFERENCE on the RETURN_DECL.
497 (convert_from_reference): Delete.
498 (is_byref_result): Likewise.
499 (gnat_genericize_r): Likewise.
500 (gnat_genericize): Likewise.
501 (end_subprog_body): Do not call gnat_genericize.
502 * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: New case.
503 (build_return_expr): Adjust parameter names, logic and comment.
505 2010-04-07 Eric Botcazou <ebotcazou@adacore.com>
507 * exp_pakd.adb (Create_Packed_Array_Type): Always use a modular type
508 if the size is small enough. Propagate the alignment if there is an
509 alignment clause on the original array type.
510 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Subtype>
511 Deal with under-aligned packed array types. Copy the size onto the
512 justified modular type and don't lay it out again. Likewise for the
513 padding type built for other under-aligned subtypes.
514 * gcc-interface/utils.c (finish_record_type): Do not set a default mode
517 2010-04-07 Eric Botcazou <ebotcazou@adacore.com>
519 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set default
520 alignment on the RETURN type built for the Copy-In Copy-Out mechanism.
522 2010-04-07 Eric Botcazou <ebotcazou@adacore.com>
524 * gcc-interface/trans.c (call_to_gnu): In the return-by-target-ptr case
525 do not set the result type if there is a specified target and do not
526 convert the result in any cases.
527 (protect_multiple_eval): Make direct SAVE_EXPR for CALL_EXPR.
528 (maybe_stabilize_reference) <COMPOUND_EXPR>: Merge with CALL_EXPR.
530 2010-03-10 Eric Botcazou <ebotcazou@adacore.com>
532 * gcc-interface/Makefile.in (SPARC/Solaris): Use sparcv8plus.
534 2010-02-27 Eric Botcazou <ebotcazou@adacore.com>
537 * gcc-interface/utils2.c (build_binary_op) <EQ_EXPR>: Assert that fat
538 pointer base types are variant of each other. Apply special treatment
539 for null to fat pointer types in all cases.
541 2010-01-28 Pascal Obry <obry@adacore.com>
543 * s-win32.ads: Add some missing constants.
545 2010-01-28 Vincent Celier <celier@adacore.com>
547 * prj-attr-pm.adb (Add_Attribute): Do nothing if To_Package is
550 2010-01-28 Robert Dewar <dewar@adacore.com>
552 * gnat_rm.texi: Minor correction
554 2010-01-27 Pascal Obry <obry@adacore.com>
556 * g-awk.adb: ensure that an AWK session is reusable.
558 2010-01-27 Vasiliy Fofanov <fofanov@adacore.com>
560 * g-regist.adb (For_Every_Key): Fix previous change.
563 2010-01-27 Thomas Quinot <quinot@adacore.com>
565 * lib-writ.ads: Current version of spec for new N (note) ALI lines
567 2010-01-27 Yannick Moy <moy@adacore.com>
569 * a-cdlili.adb (Insert): Correct exception message when cursor
570 designates wrong list.
572 2010-01-27 Vincent Celier <celier@adacore.com>
574 * gnatcmd.adb: When there is only one main specified, the package
575 support Switches (<main>) and attribute Switches is specified for the
576 main, use these switches, instead of Default_Switches ("Ada").
578 2010-01-27 Robert Dewar <dewar@adacore.com>
580 * sem_prag.adb, par-prag.adb, snames.ads-tmpl: pragma Dimension initial
582 * exp_disp.adb: Minor reformatting
584 2010-01-27 Tristan Gingold <gingold@adacore.com>
586 * seh_init.c: Use __ImageBase instead of _ImageBase.
588 2010-01-27 Javier Miranda <miranda@adacore.com>
590 * exp_disp.ads, exp_disp.adb (Expand_Interface_Thunk): Modify the
591 profile of interface thunks. The type of the controlling formal is now
592 the covered interface type (instead of the target tagged type).
594 2010-01-27 Sergey Rybin <rybin@adacore.com>
596 * gnat_rm.texi, gnat_ugn.texi: Update gnatcheck doc.
598 2010-01-27 Robert Dewar <dewar@adacore.com>
600 * sinput.ads, sinput.adb (Sloc_Range): Applies to all nodes, formal
601 changed from Expr to N.
603 2010-01-26 Thomas Quinot <quinot@adacore.com>
605 * gnat_ugn.texi: Adjust documentation of -gnatz switches.
606 * usage.adb: Replace line for -gnatz with two lines for -gnatzc and
609 2010-01-26 Vincent Celier <celier@adacore.com>
611 * prj-attr.adb: Add new attribute Library_Install_Name_Option
612 Replace attribute Run_Path_Origin_Supported with Run_Path_Origin
613 * prj-nmsc.adb (Process_Project_Level_Simple_Attributes): Process
614 attributes Run_Path_Option and Library_Install_Name_Option.
615 * prj.ads (Project_Configuration): Replace component
616 Run_Path_Origin_Supported with component Run_Path_Origin. Add new
617 component Library_Install_Name_Option.
618 * snames.ads-tmpl: Add new standard name Library_Install_Name_Option
619 Replace Run_Path_Origin_Supported with Run_Path_Origin
621 2010-01-26 Ed Schonberg <schonberg@adacore.com>
623 * sem_ch8.adb (Use_One_Package): Within an instance, an actual package
624 is not hidden by a homograph declared in another actual package.
626 2010-01-26 Robert Dewar <dewar@adacore.com>
628 * par_sco.adb (Traverse_Declarations_Or_Statements): Only generate
629 decisions for pragmas Assert, Check, Precondition, Postcondition if
631 * scos.ads: Update comments.
632 * get_scos.adb, put_scos.adb: Minor fix to code reading statement SCOs.
633 Also remove obsolete code for CT (exit point) SCOs.
635 2010-01-26 Thomas Quinot <quinot@adacore.com>
637 * switch-c.adb: Fix handling of -gnatz*
639 2010-01-26 Robert Dewar <dewar@adacore.com>
641 * par_sco.adb (Traverse_Declarations_Or_Statements): Separate F/W
642 qualifiers for FOR/WHILE loops
643 * scos.ads: Use separate type letters F/W for for/while loops
645 2010-01-26 Robert Dewar <dewar@adacore.com>
647 * get_scos.adb (Get_SCOs): Implement new form of CS entries (multiple
648 entries per line, one for each statement in the sequence).
649 * par_sco.adb (Traverse_Declarations_Or_Statements): Increase array
650 size from 100 to 10_000 for SC_Array to avoid any real possibility of
651 overflow. Output decisions in for loops.
652 Exclude labels from CS lines.
653 * scos.ads: Clarify that label is not included in the entry point
655 2010-01-26 Robert Dewar <dewar@adacore.com>
657 * par_sco.adb (Traverse_Declarations_Or_Statments): Implement new
658 format of statement sequence SCO entries (one location/statement).
659 * put_scos.adb (Put_SCOs): Implement new format of CS lines
660 * scos.ads: Update comments.
661 * sem_eval.adb: Minor reformatting.
663 2010-01-26 Robert Dewar <dewar@adacore.com>
665 * par_sco.ads, par_sco.adb (Set_Statement_Entry): New handling of exits
666 (Extend_Statement_Sequence): New procedures
667 (Traverse_Declarations_Or_Statements): New handling for exits.
669 2010-01-26 Robert Dewar <dewar@adacore.com>
671 * par_sco.adb (Traverse_Declarations_Or_Statements): Add processing for
674 2010-01-26 Robert Dewar <dewar@adacore.com>
676 * par_sco.adb (Is_Logical_Operator): Exclude AND/OR/XOR
677 * scos.ads: Clarify handling of logical operators
679 2010-01-26 Arnaud Charlet <charlet@adacore.com>
681 * s-tpoben.adb: Update comments.
683 2010-01-26 Robert Dewar <dewar@adacore.com>
685 * freeze.adb (Set_Small_Size): Don't set size if alignment clause
688 2010-01-26 Robert Dewar <dewar@adacore.com>
690 * scos.ads: Clean up documentation, remove obsolete XOR references
691 2010-01-26 Vincent Celier <celier@adacore.com>
693 * gnat_ugn.texi: Complete documentation on the restrictions for
694 combined options in -gnatxxx switches.
697 2010-01-26 Arnaud Charlet <charlet@adacore.com>
699 * s-tpoben.adb (Initialize_Protection_Entries): If a PO is created from
700 a controlled operation, abort is already deferred at this point, so we
701 need to use Defer_Abort_Nestable.
703 2010-01-26 Vincent Celier <celier@adacore.com>
705 * prj-conf.adb (Get_Config_Switches): Check for a default language for
706 a project extending a project with no languages.
708 2010-01-26 Vincent Celier <celier@adacore.com>
710 * switch-c.adb (Scan_Front_End_Switches): Take into account options
712 Allow -gnateG to be followed by other options.
714 2010-01-26 Robert Dewar <dewar@adacore.com>
716 * s-commun.ads, s-osprim-mingw.adb, s-stchop-vxworks.adb, sem_aggr.adb,
717 s-vxwext.adb, sem_ch10.adb, sem_eval.adb, sem_prag.adb: Minor
720 2010-01-26 Vasiliy Fofanov <fofanov@adacore.com>
722 * g-regist.adb, g-regist.ads (For_Every_Key): New generic procedure
723 that allows to iterate over all subkeys of a key.
725 2010-01-26 Ed Falis <falis@adacore.com>
727 * sysdep.c: enable NFS for VxWorks MILS
728 * env.c: enable __gnat_environ for VxWorks MILS
729 * gcc-interface/Makefile.in: Add VxWorks MILS target pairs.
731 2010-01-25 Bob Duff <duff@adacore.com>
733 * sem_aggr.adb (Resolve_Array_Aggregate): Check for the case where this
734 is an internally-generated positional aggregate, and the bounds are
735 already correctly set. We don't want to overwrite those bounds with
736 bounds determined by context.
738 2010-01-25 Robert Dewar <dewar@adacore.com>
740 * g-sercom.ads, gnatcmd.adb, gnatlink.adb, a-ststio.adb, exp_ch6.adb,
741 exp_ch9.adb, g-sechas.ads: Minor reformatting.
743 2010-01-25 Thomas Quinot <quinot@adacore.com>
745 * s-commun.adb (Last_Index): Count must be converted to SEO (a signed
746 integer type) before subtracting 1, otherwise the computation may wrap
747 (because size_t is modular) and cause the conversion to fail.
749 2010-01-25 Ed Falis <falis@adacore.com>
751 * sysdep.c, init.c: Adapt to support full run-time on VxWorks MILS.
753 2010-01-25 Vincent Celier <celier@adacore.com>
755 * prj-attr.adb: New attribute Run_Path_Origin_Required
756 * prj-nmsc.adb (Process_Project_Level_Simple_Attributes): Process new
757 attribute Run_Path_Origin_Required.
758 * prj.ads (Project_Configuration): New component
759 Run_Path_Origin_Supported.
760 * snames.ads-tmpl: New standard name Run_Path_Origin_Required
762 2010-01-25 Ed Schonberg <schonberg@adacore.com>
764 * sem_aggr.adb (Resolve_Array_Aggregate): If the bounds in a choice
765 have errors, do not continue resolution of the aggregate.
766 * sem_eval.adb (Eval_Indexed_Component): Do not attempt to evaluate if
767 the array type indicates an error.
769 2010-01-25 Bob Duff <duff@adacore.com>
771 * sinfo.ads: Minor comment fixes.
773 2010-01-25 Bob Duff <duff@adacore.com>
775 * exp_ch4.adb, exp_aggr.adb: Minor comment fixes and code clean up.
777 2010-01-25 Arnaud Charlet <charlet@adacore.com>
779 * gnatvsn.ads (Current_Year): Update.
781 2010-01-25 Florian Villoing <villoing@adacore.com>
783 * gnat_ugn.texi: Fix typo.
785 2010-01-25 Thomas Quinot <quinot@adacore.com>
787 * scos.ads: Update specification.
789 2010-01-25 Ed Schonberg <schonberg@adacore.com>
791 * sem_ch6.adb (Process_PPCs): If a postcondition is present and the
792 enclosing subprogram has no previous spec, attach postcondition
793 procedure to the defining entity for the body.
795 2010-01-25 Ed Schonberg <schonberg@adacore.com>
797 * exp_aggr.adb (Build_Record_Aggr_Code); Do not generate call to
798 initialization procedure of the ancestor part of an extension aggregate
799 if it is an interface type.
801 2010-01-25 Vincent Celier <celier@adacore.com>
803 * gnatlink.adb (Process_Binder_File): The directory for the shared
804 version of libgcc in the run path options is found in the subdirectory
805 indicated by __gnat_default_libgcc_subdir.
806 * link.c: Declare new const char * __gnat_default_libgcc_subdir for
809 2010-01-25 Ed Schonberg <schonberg@adacore.com>
811 * sem_prag.adb: More flexible pragma Annotate.
813 2010-01-22 Eric Botcazou <ebotcazou@adacore.com>
815 * system-linux-armel.ads (Stack_Check_Probes): Set to True.
816 * system-linux-armeb.ads (Stack_Check_Probes): Likewise.
818 2010-01-18 Eric Botcazou <ebotcazou@adacore.com>
820 * gcc-interface/utils.c (create_var_decl_1): Fix formatting nits.
822 2010-01-18 Jan Hubicka <jh@suse.cz>
825 * gcc-interface/utils.c (create_var_decl_1): Do not set COMMON flag for
826 unit local variables.
828 2010-01-17 Laurent GUERBY <laurent@guerby.net>
830 * gcc-interface/Makefile.in: Fix typo in arm*-*-linux-gnueabi.
832 2010-01-11 Mikael Pettersson <mikpe@it.uu.se>
834 * gcc-interface/Makefile.in: Add arm*-*-linux-gnueabi.
835 * system-linux-armeb.ads, system-linux-armel.ads: New files.
837 2010-01-09 Simon Wright <simon@pushface.org>
840 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Add missing
845 Copyright (C) 2010 Free Software Foundation, Inc.
847 Copying and distribution of this file, with or without modification,
848 are permitted in any medium without royalty provided the copyright
849 notice and this notice are preserved.