1 2010-04-12 Eric Botcazou <ebotcazou@adacore.com>
3 * gcc-interface/trans.c (Identifier_to_gnu): Use boolean variable.
4 (call_to_gnu): Test gigi's flag TYPE_BY_REFERENCE_P instead of calling
5 front-end's predicate Is_By_Reference_Type. Use consistent order and
6 remove ??? comment. Use original conversion in all cases, if any.
7 * gcc-interface/utils.c (make_dummy_type): Minor tweak.
8 (convert): Use local copy in more cases.
9 <INDIRECT_REF>: Remove deactivated code.
10 (unchecked_convert): Use a couple of local copies.
12 2010-04-11 Eric Botcazou <ebotcazou@adacore.com>
14 * gcc-interface/trans.c (lvalue_required_for_attribute_p): New static
16 (lvalue_required_p) <N_Attribute_Reference>: Call it.
17 (gnat_to_gnu) <N_Selected_Component>: Prevent build_component_ref from
18 folding the result only if lvalue_required_for_attribute_p is true.
19 * gcc-interface/utils.c (maybe_unconstrained_array): Pass correctly
20 typed constant to build_component_ref.
21 (unchecked_convert): Likewise.
22 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
23 (build_allocator): Likewise.
25 2010-04-11 Eric Botcazou <ebotcazou@adacore.com>
27 * gcc-interface/utils2.c (build_cond_expr): Take the address and
28 dereference if the result type is passed by reference.
30 2010-04-11 Eric Botcazou <ebotcazou@adacore.com>
32 * gcc-interface/trans.c (Case_Statement_to_gnu): Bool-ify variable.
33 (gnat_to_gnu) <N_Null_Statement>: When not optimizing, generate a
34 goto to the next statement.
36 2010-04-09 Eric Botcazou <ebotcazou@adacore.com>
38 * gcc-interface/gigi.h (maybe_variable): Delete.
39 (protect_multiple_eval): Likewise.
40 (maybe_stabilize_reference): Likewise.
41 (gnat_save_expr): Declare.
42 (gnat_protect_expr): Likewise.
43 (gnat_stabilize_reference): Likewise.
44 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Use
45 gnat_stabilize_reference.
46 (maybe_variable): Delete.
47 (elaborate_expression_1): Use gnat_save_expr.
48 * gcc-interface/trans.c (Attribute_to_gnu): Use gnat_protect_expr.
49 (call_to_gnu): Pass NULL to gnat_stabilize_reference.
50 (gnat_to_gnu) <N_Object_Declaration>: Use gnat_save_expr.
51 <N_Slice>: Use gnat_protect_exp.
52 <N_Selected_Component>: Pass NULL to gnat_stabilize_reference.
53 <N_In>: Use gnat_protect_expr.
54 Pass NULL to gnat_stabilize_reference.
55 (build_unary_op_trapv): Use gnat_protect_expr.
56 (build_binary_op_trapv): Likewise.
57 (emit_range_check): Likewise.
58 (emit_index_check): Likewise.
59 (convert_with_check): Likewise.
60 (protect_multiple_eval): Move to utils2.c file.
61 (maybe_stabilize_reference): Merge into...
62 (gnat_stabilize_reference): ...this. Move to utils2.c file.
63 (gnat_stabilize_reference_1): Likewise.
64 * gcc-interface/utils.c (convert_to_fat_pointer): Use gnat_protect_expr
65 instead of protect_multiple_eval.
66 * gcc-interface/utils2.c (compare_arrays): Likewise.
67 (nonbinary_modular_operation): Likewise.
68 (maybe_wrap_malloc): Likewise.
69 (build_allocator): Likewise.
70 (gnat_save_expr): New function.
71 (gnat_protect_expr): Rename from protect_multiple_eval. Early return
72 in common cases. Propagate TREE_READONLY onto dereferences.
73 (gnat_stabilize_reference_1): Move from trans.c file.
74 (gnat_stabilize_reference): Likewise.
76 2010-04-09 Eric Botcazou <ebotcazou@adacore.com>
78 * gcc-interface/gigi.h (gnat_mark_addressable): Rename parameter.
79 * gcc-interface/decl.c (maybe_variable): Do not set TREE_STATIC on _REF
80 node. Use the type of the operand to set TREE_READONLY.
81 * gcc-interface/trans.c (Identifier_to_gnu): Do not set TREE_STATIC on
82 _REF node. Do not overwrite TREE_READONLY.
83 (call_to_gnu): Rename local variable and fix various nits. In the
84 copy-in/copy-out case, build the SAVE_EXPR manually.
85 (convert_with_check): Call protect_multiple_eval in lieu of save_expr
86 and fold the computations.
87 (protect_multiple_eval): Always save entire fat pointers.
88 (maybe_stabilize_reference): Minor tweaks.
89 (gnat_stabilize_reference_1): Likewise. Do not deal with tcc_constant,
90 tcc_type and tcc_statement.
91 * gcc-interface/utils.c (convert_to_fat_pointer): Call
92 protect_multiple_eval in lieu of save_expr.
93 (convert): Minor tweaks.
94 (maybe_unconstrained_array): Do not set TREE_STATIC on _REF node.
95 (builtin_type_for_size): Call gnat_type_for_size directly.
96 * gcc-interface/utils2.c (contains_save_expr_p): Delete.
97 (contains_null_expr): Likewise
98 (gnat_build_constructor): Do not call it.
99 (compare_arrays): Deal with all side-effects, use protect_multiple_eval
100 instead of gnat_stabilize_reference to protect the operands.
101 (nonbinary_modular_operation): Call protect_multiple_eval in lieu of
103 (maybe_wrap_malloc): Likewise.
104 (build_allocator): Likewise.
105 (build_unary_op) <INDIRECT_REF>: Do not set TREE_STATIC on _REF node.
106 (gnat_mark_addressable): Rename parameter.
108 2010-04-08 Eric Botcazou <ebotcazou@adacore.com>
110 * gcc-interface/ada-tree.h (TYPE_RETURNS_UNCONSTRAINED_P): Rename into.
111 (TYPE_RETURN_UNCONSTRAINED_P): ...this.
112 (TYPE_RETURNS_BY_REF_P): Rename into.
113 (TYPE_RETURN_BY_DIRECT_REF_P): ...this.
114 (TYPE_RETURNS_BY_TARGET_PTR_P): Delete.
115 * gcc-interface/gigi.h (create_subprog_type): Adjust parameter names.
116 (build_return_expr): Likewise.
117 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>:
118 Rename local variables. If the return Mechanism is By_Reference, pass
119 return_by_invisible_ref_p to create_subprog_type instead of toggling
120 TREE_ADDRESSABLE. Test return_by_invisible_ref_p in order to annotate
121 the mechanism. Use regular return for contrained types with non-static
122 size and return by invisible reference for unconstrained return types
123 with default discriminants. Update comment.
124 * gcc-interface/trans.c (Subprogram_Body_to_gnu): If the function
125 returns by invisible reference, turn the RESULT_DECL into a pointer.
126 Do not handle DECL_BY_REF_P in the CICO case here.
127 (call_to_gnu): Remove code handling return by target pointer. For a
128 function call, if the return type has non-constant size, generate the
129 assignment with an INIT_EXPR.
130 (gnat_to_gnu) <N_Return_Statement>: Remove dead code in the CICO case.
131 If the function returns by invisible reference, build the copy return
133 (add_decl_expr): Initialize the variable with an INIT_EXPR.
134 * gcc-interface/utils.c (create_subprog_type): Adjust parameter names.
135 Adjust for renaming of macros. Copy the node only when necessary.
136 (create_subprog_decl): Do not toggle TREE_ADDRESSABLE on the return
137 type, only change DECL_BY_REFERENCE on the RETURN_DECL.
138 (convert_from_reference): Delete.
139 (is_byref_result): Likewise.
140 (gnat_genericize_r): Likewise.
141 (gnat_genericize): Likewise.
142 (end_subprog_body): Do not call gnat_genericize.
143 * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: New case.
144 (build_return_expr): Adjust parameter names, logic and comment.
146 2010-04-07 Eric Botcazou <ebotcazou@adacore.com>
148 * exp_pakd.adb (Create_Packed_Array_Type): Always use a modular type
149 if the size is small enough. Propagate the alignment if there is an
150 alignment clause on the original array type.
151 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Subtype>
152 Deal with under-aligned packed array types. Copy the size onto the
153 justified modular type and don't lay it out again. Likewise for the
154 padding type built for other under-aligned subtypes.
155 * gcc-interface/utils.c (finish_record_type): Do not set a default mode
158 2010-04-07 Eric Botcazou <ebotcazou@adacore.com>
160 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set default
161 alignment on the RETURN type built for the Copy-In Copy-Out mechanism.
163 2010-04-07 Eric Botcazou <ebotcazou@adacore.com>
165 * gcc-interface/trans.c (call_to_gnu): In the return-by-target-ptr case
166 do not set the result type if there is a specified target and do not
167 convert the result in any cases.
168 (protect_multiple_eval): Make direct SAVE_EXPR for CALL_EXPR.
169 (maybe_stabilize_reference) <COMPOUND_EXPR>: Merge with CALL_EXPR.
171 2010-03-10 Eric Botcazou <ebotcazou@adacore.com>
173 * gcc-interface/Makefile.in (SPARC/Solaris): Use sparcv8plus.
175 2010-02-27 Eric Botcazou <ebotcazou@adacore.com>
178 * gcc-interface/utils2.c (build_binary_op) <EQ_EXPR>: Assert that fat
179 pointer base types are variant of each other. Apply special treatment
180 for null to fat pointer types in all cases.
182 2010-01-28 Pascal Obry <obry@adacore.com>
184 * s-win32.ads: Add some missing constants.
186 2010-01-28 Vincent Celier <celier@adacore.com>
188 * prj-attr-pm.adb (Add_Attribute): Do nothing if To_Package is
191 2010-01-28 Robert Dewar <dewar@adacore.com>
193 * gnat_rm.texi: Minor correction
195 2010-01-27 Pascal Obry <obry@adacore.com>
197 * g-awk.adb: ensure that an AWK session is reusable.
199 2010-01-27 Vasiliy Fofanov <fofanov@adacore.com>
201 * g-regist.adb (For_Every_Key): Fix previous change.
204 2010-01-27 Thomas Quinot <quinot@adacore.com>
206 * lib-writ.ads: Current version of spec for new N (note) ALI lines
208 2010-01-27 Yannick Moy <moy@adacore.com>
210 * a-cdlili.adb (Insert): Correct exception message when cursor
211 designates wrong list.
213 2010-01-27 Vincent Celier <celier@adacore.com>
215 * gnatcmd.adb: When there is only one main specified, the package
216 support Switches (<main>) and attribute Switches is specified for the
217 main, use these switches, instead of Default_Switches ("Ada").
219 2010-01-27 Robert Dewar <dewar@adacore.com>
221 * sem_prag.adb, par-prag.adb, snames.ads-tmpl: pragma Dimension initial
223 * exp_disp.adb: Minor reformatting
225 2010-01-27 Tristan Gingold <gingold@adacore.com>
227 * seh_init.c: Use __ImageBase instead of _ImageBase.
229 2010-01-27 Javier Miranda <miranda@adacore.com>
231 * exp_disp.ads, exp_disp.adb (Expand_Interface_Thunk): Modify the
232 profile of interface thunks. The type of the controlling formal is now
233 the covered interface type (instead of the target tagged type).
235 2010-01-27 Sergey Rybin <rybin@adacore.com>
237 * gnat_rm.texi, gnat_ugn.texi: Update gnatcheck doc.
239 2010-01-27 Robert Dewar <dewar@adacore.com>
241 * sinput.ads, sinput.adb (Sloc_Range): Applies to all nodes, formal
242 changed from Expr to N.
244 2010-01-26 Thomas Quinot <quinot@adacore.com>
246 * gnat_ugn.texi: Adjust documentation of -gnatz switches.
247 * usage.adb: Replace line for -gnatz with two lines for -gnatzc and
250 2010-01-26 Vincent Celier <celier@adacore.com>
252 * prj-attr.adb: Add new attribute Library_Install_Name_Option
253 Replace attribute Run_Path_Origin_Supported with Run_Path_Origin
254 * prj-nmsc.adb (Process_Project_Level_Simple_Attributes): Process
255 attributes Run_Path_Option and Library_Install_Name_Option.
256 * prj.ads (Project_Configuration): Replace component
257 Run_Path_Origin_Supported with component Run_Path_Origin. Add new
258 component Library_Install_Name_Option.
259 * snames.ads-tmpl: Add new standard name Library_Install_Name_Option
260 Replace Run_Path_Origin_Supported with Run_Path_Origin
262 2010-01-26 Ed Schonberg <schonberg@adacore.com>
264 * sem_ch8.adb (Use_One_Package): Within an instance, an actual package
265 is not hidden by a homograph declared in another actual package.
267 2010-01-26 Robert Dewar <dewar@adacore.com>
269 * par_sco.adb (Traverse_Declarations_Or_Statements): Only generate
270 decisions for pragmas Assert, Check, Precondition, Postcondition if
272 * scos.ads: Update comments.
273 * get_scos.adb, put_scos.adb: Minor fix to code reading statement SCOs.
274 Also remove obsolete code for CT (exit point) SCOs.
276 2010-01-26 Thomas Quinot <quinot@adacore.com>
278 * switch-c.adb: Fix handling of -gnatz*
280 2010-01-26 Robert Dewar <dewar@adacore.com>
282 * par_sco.adb (Traverse_Declarations_Or_Statements): Separate F/W
283 qualifiers for FOR/WHILE loops
284 * scos.ads: Use separate type letters F/W for for/while loops
286 2010-01-26 Robert Dewar <dewar@adacore.com>
288 * get_scos.adb (Get_SCOs): Implement new form of CS entries (multiple
289 entries per line, one for each statement in the sequence).
290 * par_sco.adb (Traverse_Declarations_Or_Statements): Increase array
291 size from 100 to 10_000 for SC_Array to avoid any real possibility of
292 overflow. Output decisions in for loops.
293 Exclude labels from CS lines.
294 * scos.ads: Clarify that label is not included in the entry point
296 2010-01-26 Robert Dewar <dewar@adacore.com>
298 * par_sco.adb (Traverse_Declarations_Or_Statments): Implement new
299 format of statement sequence SCO entries (one location/statement).
300 * put_scos.adb (Put_SCOs): Implement new format of CS lines
301 * scos.ads: Update comments.
302 * sem_eval.adb: Minor reformatting.
304 2010-01-26 Robert Dewar <dewar@adacore.com>
306 * par_sco.ads, par_sco.adb (Set_Statement_Entry): New handling of exits
307 (Extend_Statement_Sequence): New procedures
308 (Traverse_Declarations_Or_Statements): New handling for exits.
310 2010-01-26 Robert Dewar <dewar@adacore.com>
312 * par_sco.adb (Traverse_Declarations_Or_Statements): Add processing for
315 2010-01-26 Robert Dewar <dewar@adacore.com>
317 * par_sco.adb (Is_Logical_Operator): Exclude AND/OR/XOR
318 * scos.ads: Clarify handling of logical operators
320 2010-01-26 Arnaud Charlet <charlet@adacore.com>
322 * s-tpoben.adb: Update comments.
324 2010-01-26 Robert Dewar <dewar@adacore.com>
326 * freeze.adb (Set_Small_Size): Don't set size if alignment clause
329 2010-01-26 Robert Dewar <dewar@adacore.com>
331 * scos.ads: Clean up documentation, remove obsolete XOR references
332 2010-01-26 Vincent Celier <celier@adacore.com>
334 * gnat_ugn.texi: Complete documentation on the restrictions for
335 combined options in -gnatxxx switches.
338 2010-01-26 Arnaud Charlet <charlet@adacore.com>
340 * s-tpoben.adb (Initialize_Protection_Entries): If a PO is created from
341 a controlled operation, abort is already deferred at this point, so we
342 need to use Defer_Abort_Nestable.
344 2010-01-26 Vincent Celier <celier@adacore.com>
346 * prj-conf.adb (Get_Config_Switches): Check for a default language for
347 a project extending a project with no languages.
349 2010-01-26 Vincent Celier <celier@adacore.com>
351 * switch-c.adb (Scan_Front_End_Switches): Take into account options
353 Allow -gnateG to be followed by other options.
355 2010-01-26 Robert Dewar <dewar@adacore.com>
357 * s-commun.ads, s-osprim-mingw.adb, s-stchop-vxworks.adb, sem_aggr.adb,
358 s-vxwext.adb, sem_ch10.adb, sem_eval.adb, sem_prag.adb: Minor
361 2010-01-26 Vasiliy Fofanov <fofanov@adacore.com>
363 * g-regist.adb, g-regist.ads (For_Every_Key): New generic procedure
364 that allows to iterate over all subkeys of a key.
366 2010-01-26 Ed Falis <falis@adacore.com>
368 * sysdep.c: enable NFS for VxWorks MILS
369 * env.c: enable __gnat_environ for VxWorks MILS
370 * gcc-interface/Makefile.in: Add VxWorks MILS target pairs.
372 2010-01-25 Bob Duff <duff@adacore.com>
374 * sem_aggr.adb (Resolve_Array_Aggregate): Check for the case where this
375 is an internally-generated positional aggregate, and the bounds are
376 already correctly set. We don't want to overwrite those bounds with
377 bounds determined by context.
379 2010-01-25 Robert Dewar <dewar@adacore.com>
381 * g-sercom.ads, gnatcmd.adb, gnatlink.adb, a-ststio.adb, exp_ch6.adb,
382 exp_ch9.adb, g-sechas.ads: Minor reformatting.
384 2010-01-25 Thomas Quinot <quinot@adacore.com>
386 * s-commun.adb (Last_Index): Count must be converted to SEO (a signed
387 integer type) before subtracting 1, otherwise the computation may wrap
388 (because size_t is modular) and cause the conversion to fail.
390 2010-01-25 Ed Falis <falis@adacore.com>
392 * sysdep.c, init.c: Adapt to support full run-time on VxWorks MILS.
394 2010-01-25 Vincent Celier <celier@adacore.com>
396 * prj-attr.adb: New attribute Run_Path_Origin_Required
397 * prj-nmsc.adb (Process_Project_Level_Simple_Attributes): Process new
398 attribute Run_Path_Origin_Required.
399 * prj.ads (Project_Configuration): New component
400 Run_Path_Origin_Supported.
401 * snames.ads-tmpl: New standard name Run_Path_Origin_Required
403 2010-01-25 Ed Schonberg <schonberg@adacore.com>
405 * sem_aggr.adb (Resolve_Array_Aggregate): If the bounds in a choice
406 have errors, do not continue resolution of the aggregate.
407 * sem_eval.adb (Eval_Indexed_Component): Do not attempt to evaluate if
408 the array type indicates an error.
410 2010-01-25 Bob Duff <duff@adacore.com>
412 * sinfo.ads: Minor comment fixes.
414 2010-01-25 Bob Duff <duff@adacore.com>
416 * exp_ch4.adb, exp_aggr.adb: Minor comment fixes and code clean up.
418 2010-01-25 Arnaud Charlet <charlet@adacore.com>
420 * gnatvsn.ads (Current_Year): Update.
422 2010-01-25 Florian Villoing <villoing@adacore.com>
424 * gnat_ugn.texi: Fix typo.
426 2010-01-25 Thomas Quinot <quinot@adacore.com>
428 * scos.ads: Update specification.
430 2010-01-25 Ed Schonberg <schonberg@adacore.com>
432 * sem_ch6.adb (Process_PPCs): If a postcondition is present and the
433 enclosing subprogram has no previous spec, attach postcondition
434 procedure to the defining entity for the body.
436 2010-01-25 Ed Schonberg <schonberg@adacore.com>
438 * exp_aggr.adb (Build_Record_Aggr_Code); Do not generate call to
439 initialization procedure of the ancestor part of an extension aggregate
440 if it is an interface type.
442 2010-01-25 Vincent Celier <celier@adacore.com>
444 * gnatlink.adb (Process_Binder_File): The directory for the shared
445 version of libgcc in the run path options is found in the subdirectory
446 indicated by __gnat_default_libgcc_subdir.
447 * link.c: Declare new const char * __gnat_default_libgcc_subdir for
450 2010-01-25 Ed Schonberg <schonberg@adacore.com>
452 * sem_prag.adb: More flexible pragma Annotate.
454 2010-01-22 Eric Botcazou <ebotcazou@adacore.com>
456 * system-linux-armel.ads (Stack_Check_Probes): Set to True.
457 * system-linux-armeb.ads (Stack_Check_Probes): Likewise.
459 2010-01-18 Eric Botcazou <ebotcazou@adacore.com>
461 * gcc-interface/utils.c (create_var_decl_1): Fix formatting nits.
463 2010-01-18 Jan Hubicka <jh@suse.cz>
466 * gcc-interface/utils.c (create_var_decl_1): Do not set COMMON flag for
467 unit local variables.
469 2010-01-17 Laurent GUERBY <laurent@guerby.net>
471 * gcc-interface/Makefile.in: Fix typo in arm*-*-linux-gnueabi.
473 2010-01-11 Mikael Pettersson <mikpe@it.uu.se>
475 * gcc-interface/Makefile.in: Add arm*-*-linux-gnueabi.
476 * system-linux-armeb.ads, system-linux-armel.ads: New files.
478 2010-01-09 Simon Wright <simon@pushface.org>
481 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Add missing
486 Copyright (C) 2010 Free Software Foundation, Inc.
488 Copying and distribution of this file, with or without modification,
489 are permitted in any medium without royalty provided the copyright
490 notice and this notice are preserved.