OSDN Git Service

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