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