OSDN Git Service

2b8801feafddeed8a1cbe3deeb19051f28a84846
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2010-04-09  Eric Botcazou  <ebotcazou@adacore.com>
2
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.
40
41 2010-04-09  Eric Botcazou  <ebotcazou@adacore.com>
42
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
67         save_expr.
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.
72
73 2010-04-08  Eric Botcazou  <ebotcazou@adacore.com>
74
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
97         operation manually.
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.
110
111 2010-04-07  Eric Botcazou  <ebotcazou@adacore.com>
112
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
121         on the type.
122
123 2010-04-07  Eric Botcazou  <ebotcazou@adacore.com>
124
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.
127
128 2010-04-07  Eric Botcazou  <ebotcazou@adacore.com>
129
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.
135
136 2010-03-10  Eric Botcazou  <ebotcazou@adacore.com>
137
138         * gcc-interface/Makefile.in (SPARC/Solaris): Use sparcv8plus.
139
140 2010-02-27  Eric Botcazou  <ebotcazou@adacore.com>
141
142         PR ada/42253
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.
146
147 2010-01-28  Pascal Obry  <obry@adacore.com>
148
149         * s-win32.ads: Add some missing constants.
150
151 2010-01-28  Vincent Celier  <celier@adacore.com>
152
153         * prj-attr-pm.adb (Add_Attribute): Do nothing if To_Package is
154         Unknown_Package.
155
156 2010-01-28  Robert Dewar  <dewar@adacore.com>
157
158         * gnat_rm.texi: Minor correction
159
160 2010-01-27  Pascal Obry  <obry@adacore.com>
161
162         * g-awk.adb: ensure that an AWK session is reusable.
163
164 2010-01-27  Vasiliy Fofanov  <fofanov@adacore.com>
165
166         * g-regist.adb (For_Every_Key): Fix previous change.
167         Minor reformatting.
168
169 2010-01-27  Thomas Quinot  <quinot@adacore.com>
170
171         * lib-writ.ads: Current version of spec for new N (note) ALI lines
172
173 2010-01-27  Yannick Moy  <moy@adacore.com>
174
175         * a-cdlili.adb (Insert): Correct exception message when cursor
176         designates wrong list.
177
178 2010-01-27  Vincent Celier  <celier@adacore.com>
179
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").
183
184 2010-01-27  Robert Dewar  <dewar@adacore.com>
185
186         * sem_prag.adb, par-prag.adb, snames.ads-tmpl: pragma Dimension initial
187         implementation.
188         * exp_disp.adb: Minor reformatting
189
190 2010-01-27  Tristan Gingold  <gingold@adacore.com>
191
192         * seh_init.c: Use __ImageBase instead of _ImageBase.
193
194 2010-01-27  Javier Miranda  <miranda@adacore.com>
195
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).
199
200 2010-01-27  Sergey Rybin  <rybin@adacore.com>
201
202         * gnat_rm.texi, gnat_ugn.texi: Update gnatcheck doc.
203
204 2010-01-27  Robert Dewar  <dewar@adacore.com>
205
206         * sinput.ads, sinput.adb (Sloc_Range): Applies to all nodes, formal
207         changed from Expr to N.
208
209 2010-01-26  Thomas Quinot  <quinot@adacore.com>
210
211         * gnat_ugn.texi: Adjust documentation of -gnatz switches.
212         * usage.adb: Replace line for -gnatz with two lines for -gnatzc and
213         -gnatzr.
214
215 2010-01-26  Vincent Celier  <celier@adacore.com>
216
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
226
227 2010-01-26  Ed Schonberg  <schonberg@adacore.com>
228
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.
231
232 2010-01-26  Robert Dewar  <dewar@adacore.com>
233
234         * par_sco.adb (Traverse_Declarations_Or_Statements): Only generate
235         decisions for pragmas Assert, Check, Precondition, Postcondition if
236         -gnata set.
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.
240
241 2010-01-26  Thomas Quinot  <quinot@adacore.com>
242
243         * switch-c.adb: Fix handling of -gnatz*
244
245 2010-01-26  Robert Dewar  <dewar@adacore.com>
246
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
250
251 2010-01-26  Robert Dewar  <dewar@adacore.com>
252
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
260
261 2010-01-26  Robert Dewar  <dewar@adacore.com>
262
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.
268
269 2010-01-26  Robert Dewar  <dewar@adacore.com>
270
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.
274
275 2010-01-26  Robert Dewar  <dewar@adacore.com>
276
277         * par_sco.adb (Traverse_Declarations_Or_Statements): Add processing for
278         Case.
279
280 2010-01-26  Robert Dewar  <dewar@adacore.com>
281
282         * par_sco.adb (Is_Logical_Operator): Exclude AND/OR/XOR
283         * scos.ads: Clarify handling of logical operators
284
285 2010-01-26  Arnaud Charlet  <charlet@adacore.com>
286
287         * s-tpoben.adb: Update comments.
288
289 2010-01-26  Robert Dewar  <dewar@adacore.com>
290
291         * freeze.adb (Set_Small_Size): Don't set size if alignment clause
292         present.
293
294 2010-01-26  Robert Dewar  <dewar@adacore.com>
295
296         * scos.ads: Clean up documentation, remove obsolete XOR references
297 2010-01-26  Vincent Celier  <celier@adacore.com>
298
299         * gnat_ugn.texi: Complete documentation on the restrictions for
300         combined options in -gnatxxx switches.
301         Fix typo.
302
303 2010-01-26  Arnaud Charlet  <charlet@adacore.com>
304
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.
308
309 2010-01-26  Vincent Celier  <celier@adacore.com>
310
311         * prj-conf.adb (Get_Config_Switches): Check for a default language for
312         a project extending a project with no languages.
313
314 2010-01-26  Vincent Celier  <celier@adacore.com>
315
316         * switch-c.adb (Scan_Front_End_Switches): Take into account options
317         that follow -gnatef.
318         Allow -gnateG to be followed by other options.
319
320 2010-01-26  Robert Dewar  <dewar@adacore.com>
321
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
324         reformatting.
325
326 2010-01-26  Vasiliy Fofanov  <fofanov@adacore.com>
327
328         * g-regist.adb, g-regist.ads (For_Every_Key): New generic procedure
329         that allows to iterate over all subkeys of a key.
330
331 2010-01-26  Ed Falis  <falis@adacore.com>
332
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.
336
337 2010-01-25  Bob Duff  <duff@adacore.com>
338
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.
343
344 2010-01-25  Robert Dewar  <dewar@adacore.com>
345
346         * g-sercom.ads, gnatcmd.adb, gnatlink.adb, a-ststio.adb, exp_ch6.adb,
347         exp_ch9.adb, g-sechas.ads: Minor reformatting.
348
349 2010-01-25  Thomas Quinot  <quinot@adacore.com>
350
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.
354
355 2010-01-25  Ed Falis  <falis@adacore.com>
356
357         * sysdep.c, init.c: Adapt to support full run-time on VxWorks MILS.
358
359 2010-01-25  Vincent Celier  <celier@adacore.com>
360
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
367
368 2010-01-25  Ed Schonberg  <schonberg@adacore.com>
369
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.
374
375 2010-01-25  Bob Duff  <duff@adacore.com>
376
377         * sinfo.ads: Minor comment fixes.
378
379 2010-01-25  Bob Duff  <duff@adacore.com>
380
381         * exp_ch4.adb, exp_aggr.adb: Minor comment fixes and code clean up.
382
383 2010-01-25  Arnaud Charlet  <charlet@adacore.com>
384
385         * gnatvsn.ads (Current_Year): Update.
386
387 2010-01-25  Florian Villoing  <villoing@adacore.com>
388
389         * gnat_ugn.texi: Fix typo.
390
391 2010-01-25  Thomas Quinot  <quinot@adacore.com>
392
393         * scos.ads: Update specification.
394
395 2010-01-25  Ed Schonberg  <schonberg@adacore.com>
396
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.
400
401 2010-01-25  Ed Schonberg  <schonberg@adacore.com>
402
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.
406
407 2010-01-25  Vincent Celier  <celier@adacore.com>
408
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
413         each platform.
414
415 2010-01-25  Ed Schonberg  <schonberg@adacore.com>
416
417         * sem_prag.adb: More flexible pragma Annotate.
418
419 2010-01-22  Eric Botcazou  <ebotcazou@adacore.com>
420
421         * system-linux-armel.ads (Stack_Check_Probes): Set to True.
422         * system-linux-armeb.ads (Stack_Check_Probes): Likewise.
423
424 2010-01-18  Eric Botcazou  <ebotcazou@adacore.com>
425
426         * gcc-interface/utils.c (create_var_decl_1): Fix formatting nits.
427
428 2010-01-18  Jan Hubicka  <jh@suse.cz>
429
430         PR middle-end/42068
431         * gcc-interface/utils.c (create_var_decl_1): Do not set COMMON flag for
432         unit local variables.
433
434 2010-01-17  Laurent GUERBY  <laurent@guerby.net>
435
436         * gcc-interface/Makefile.in: Fix typo in arm*-*-linux-gnueabi.
437
438 2010-01-11  Mikael Pettersson  <mikpe@it.uu.se>
439
440         * gcc-interface/Makefile.in: Add arm*-*-linux-gnueabi.
441         * system-linux-armeb.ads, system-linux-armel.ads: New files.
442
443 2010-01-09  Simon Wright  <simon@pushface.org>
444
445         PR ada/42626
446         * gcc-interface/Makefile.in (gnatlib-shared-darwin): Add missing
447         end-quote.
448
449
450 \f
451 Copyright (C) 2010 Free Software Foundation, Inc.
452
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.