OSDN Git Service

2011-01-28 Tobias Burnus <burnus@net-b.de>
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2011-01-28  Tobias Burnus  <burnus@net-b.de>
2
3         PR fortran/47507
4         * resolve.c (resolve_formal_arglist): Allow arguments with VALUE
5         attribute also without INTENT.
6
7 2011-01-28  Tobias Burnus  <burnus@net-b.de>
8
9         * gfortran.texi (Fortran 2003 status): Mention support for
10         nonconstant namelist variables.
11
12 2011-01-28  Paul Thomas  <pault@gcc.gnu.org>
13             Tobias Burnus  <burnus@gcc.gnu.org>
14
15         PR fortran/45170
16         PR fortran/35810
17         PR fortran/47350
18         * interface.c (compare_actual_formal): An allocatable or pointer
19         deferred length actual is only allowed if the formal argument
20         is also deferred length. Clean up whitespace.
21         * trans-expr.c (gfc_conv_procedure_call): Pass string length for
22         deferred character length formal arguments by reference. Do the
23         same for function results.
24         (gfc_trans_pointer_assignment): Do not do runtime check of lhs
25         and rhs character lengths, if deferred length lhs.  In this case
26         set the lhs character length to that of the rhs.
27         (gfc_conv_string_parameter): Remove assert that string length is
28         an integer type.
29         (is_scalar_reallocatable_lhs): New function.
30         (alloc_scalar_allocatable_for_assignment): New function.
31         (gfc_trans_assignment_1): Call above new function. If the rhs is
32         a deferred character length itself, makes ure that the function
33         is called before reallocation, so that the length is available.
34         (gfc_trans_asssignment): Remove error about assignment to
35         deferred length character variables.
36         * gfortran.texi : Update entry about (re)allocation on
37         assignment.
38         * trans-stmt.c (gfc_trans_allocate): Add code to handle deferred
39         length character variables.
40         * module.c (mio_typespec): Transfer deferred characteristic.
41         * trans-types.c (gfc_get_function_type): New code to generate
42         hidden typelist, so that those character lengths that are
43         passed by reference get the right type.
44         * resolve.c (resolve_contained_fntype): Supress error for
45         deferred character length functions.
46         (resolve_function, resolve_fl_procedure) The same.
47         (check_symbols): Remove the error that support for
48         entity with deferred type parameter is not yet implemented.
49         (resolve_fl_derived): The same.
50         match.c (alloc_opt_list): Allow MOLD for deferred length object.
51         * trans-decl.c (gfc_get_symbol_decl): For deferred character
52         length dummies, generate a local variable for string length.
53         (create_function_arglist): Hidden length can be a pointer.
54         (gfc_trans_deferred_vars): For deferred character length
55         results and dummies, assign the string length to the local
56         variable from the hidden argument on entry and the other way
57         round on exit, as appropriate.
58
59 2011-01-27  Tobias Burnus  <burnus@net-b.de>
60
61         PR fortran/47474
62         * trans-decl.c (gfc_generate_function_code): Fix init
63         of allocatable result variable with allocatable components.
64
65 2011-01-27  Tobias Burnus  <burnus@net-b.de>
66
67         PR fortran/47472
68         * options.c (gfc_handle_module_path_options): Save
69         module path without trailing slash as include path.
70
71 2011-01-25  Tobias Burnus  <burnus@net-b.de>
72
73         PR fortran/47448
74         * interface.c (gfc_check_operator_interface): Fix
75         defined-assignment check.
76
77 2011-01-23  Tobias Burnus  <burnus@net-b.de>
78
79         PR fortran/47421
80         * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
81         scalar allocatable dummy arguments.
82
83 2011-01-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
84
85         PR fortran/38536
86         * resolve.c (gfc_iso_c_func_interface):  For C_LOC,
87         check for array sections followed by component references
88         which are illegal.  Also check for coindexed arguments.
89
90 2011-01-22  Tobias Burnus  <burnus@net-b.de>
91
92         PR fortran/47399
93         * primary.c (gfc_match_varspec): Relax gcc_assert to allow for
94         PARAMETER TBP.
95
96 2011-01-21  Tobias Burnus  <burnus@net-b.de>
97
98         PR fortran/47394
99         * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check):
100         Use defined instead of magic number exit status codes.
101         * scanner.c (include_line, gfc_new_file): Ditto.
102
103 2011-01-21  Tobias Burnus  <burnus@net-b.de>
104
105         PR fortran/47377
106         * expr.c (gfc_check_pointer_assign): Reject expr data-targets
107         without pointer attribute.
108
109 2011-01-18  Janus Weil  <janus@gcc.gnu.org>
110
111         PR fortran/47240
112         * resolve.c (expression_rank): Fix rank of procedure poiner components.
113         * trans-expr.c (gfc_conv_procedure_call): Take care of procedure
114         pointer components as actual arguments.
115
116 2011-01-17  Jakub Jelinek  <jakub@redhat.com>
117
118         PR fortran/47331
119         * gfortran.h (struct gfc_omp_saved_state): New type.
120         (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New prototypes.
121         * resolve.c (resolve_global_procedure): Call it around gfc_resolve
122         call.
123         * openmp.c (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New
124         functions.
125
126 2011-01-17  Tobias Burnus  <burnus@net-b.de>
127
128         PR fortran/47327
129         * invoke.texi (Options to request or suppress errors
130         and warnings): Fix cross link.
131
132 2011-01-15  Tobias Burnus  <burnus@net-b.de>
133
134         * gfortran.texi: Update Fortran 2003 Status section.
135
136         PR fortran/47177
137         * invoke.texi: Add missing "-E" to the -dM example.
138
139 2011-01-13  Tobias Burnus  <burnus@net-b.de>
140
141         PR fortran/47268
142         * intrinsic.texi (get_command_argument, get_environment_variable):
143         Mark arguments as optional in the Arguments section.
144
145 2011-01-13  Kai Tietz  <kai.tietz@onevision.com>
146             Tobias Burnus  <burnus@net-b.de>
147
148         PR fortran/47260
149         * trans-decl.c (gfc_get_extern_function_decl,
150         build_function_decl): Set TREE_PUBLIC/TREE_EXTERNAL before
151         calling decl_attributes.
152
153 2011-01-13  Tobias Burnus  <burnus@net-b.de>
154             Mikael Morin  <mikael@gcc.gnu.org>
155
156         PR fortran/45848
157         PR fortran/47204
158         * gfortran.h (gfc_code): Move union ext's case_list into
159         the struct block.
160         * dump-parse-tree.c (show_code_node): Adapt by prefixing case_list
161         by "block.".
162         * frontend-passes.c (gfc_code_walker): Ditto.
163         * match.c (gfc_match_goto, gfc_match_call, gfc_match_case,
164         gfc_match_type_is, gfc_match_class_is): Ditto.
165         * resolve.c (resolve_select, resolve_select_type): Ditto.
166         * st.c (gfc_free_statement): Ditto.
167         * trans-stmt.c (gfc_trans_integer_select, gfc_trans_logical_select,
168         gfc_trans_character_select): Ditto.
169         * parse.c (resolve_all_program_units): For error recovery, avoid
170         segfault is proc_name is NULL.
171
172 2011-01-11  Paul Thomas  <pault@gcc.gnu.org>
173
174         PR fortran/47051
175         * trans-array.c (gfc_alloc_allocatable_for_assignment): Change
176         to be standard compliant by testing for shape rather than size
177         before skipping reallocation. Improve comments.
178
179 2011-01-09  Janus Weil  <janus@gcc.gnu.org>
180
181         PR fortran/47224
182         * resolve.c (resolve_actual_arglist): Remove unneeded and buggy piece
183         of code.
184
185 2011-01-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
186
187         PR fortran/38536
188         * resolve.c (is_scalar_expr_ptr):  For a substring reference,
189         use gfc_dep_compare_expr to compare start and end expession.
190         Add FIXME for using gfc_deb_compare_expr elsewhere.
191
192 2011-01-09  Janus Weil  <janus@gcc.gnu.org>
193
194         PR fortran/46313
195         * class.c (get_unique_type_string): Make type name start with upper
196         case letter.
197
198 2011-01-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
199
200         PR fortran/46405
201         * invoke.texi:  Mention -ffree-line-length-none and
202         -ffixed-line-length-none for preprocessing.
203
204 2011-01-08  Paul Thomas  <pault@gcc.gnu.org>
205
206         PR fortran/46896
207         * trans-expr.c (gfc_conv_procedure_call): With a non-copying
208         procedure argument (eg TRANSPOSE) use a temporary if there is
209         any chance of aliasing due to host or use association.
210         (arrayfunc_assign_needs_temporary): Correct logic for function
211         results and do not use a temporary for implicitly PURE
212         variables.  Use a temporary for Cray pointees.
213         * symbol.c (gfc_add_save): Explicit SAVE not compatible with
214         implicit pureness of containing procedure.
215         * decl.c (match_old_style_init, gfc_match_data): Where decl
216         would fail in PURE procedure, set implicit_pure to zero.
217         * gfortran.h : Add implicit_pure to structure symbol_attr and
218         add prototype for function gfc_implicit_pure.
219         * expr.c (gfc_check_pointer_assign, gfc_check_vardef_context):
220         Where decl would fail in PURE procedure, reset implicit_pure.
221         * io.c (match_vtag, gfc_match_open, gfc_match_close,
222         gfc_match_print, gfc_match_inquire, gfc_match_wait): The same.
223         * match.c (gfc_match_critical, gfc_match_stopcode,
224         sync_statement, gfc_match_allocate, gfc_match_deallocate): The
225         same.
226         * parse.c (decode_omp_directive): The same.
227         (parse_contained): If not PURE, set implicit pure attribute.
228         * resolve.c (resolve_formal_arglist, resolve_structure_cons,
229         resolve_function, resolve_ordinary_assign) : The same.
230         (gfc_implicit_pure): New function.
231         * module.c (mio_symbol_attribute): Introduce AB_IMPLICIT_PURE
232         to ab_attribute enum and use it in this function.
233
234 2011-01-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
235
236         PR fortran/45777
237         * symbol.c (gfc_symbols_could_alias):  Strip gfc_ prefix,
238         make static and move in front of its only caller, to ...
239         * trans-array.c (symbols_could_alias): ... here.
240         Pass information about pointer and target status as
241         arguments.  Allocatable arrays don't alias anything
242         unless they have the POINTER attribute.
243         (gfc_could_be_alias):  Keep track of pointer and target
244         status when following references.  Also check if typespecs
245         of components match those of other components or symbols.
246
247 2011-01-07  Tobias Burnus  <burnus@net-b.de>
248
249         PR fortran/41580
250         * class.c (gfc_build_class_symbol): Mark __vtab as attr.vtab.
251         * intrinsic.c (add_functions): Use simplify functions for
252         EXTENDS_TYPE_OF and SAME_TYPE_AS.
253         * intrinsic.h (gfc_simplify_extends_type_of,
254         gfc_simplify_same_type_as): New prototypes.
255         * simplify.c (is_last_ref_vtab, gfc_simplify_extends_type_of,
256         gfc_simplify_same_type_as): New functions.
257
258 2011-01-07  Janus Weil  <janus@gcc.gnu.org>
259
260         PR fortran/47189
261         PR fortran/47194
262         * gfortran.h (gfc_lval_expr_from_sym): Moved prototype.
263         * class.c (gfc_class_null_initializer): Initialize _vptr to declared
264         type.
265         * expr.c (gfc_lval_expr_from_sym): Moved here from symbol.c.
266         * resolve.c (resolve_deallocate_expr): _data component will be added
267         at translation stage.
268         * symbol.c (gfc_lval_expr_from_sym): Moved to expr.c.
269         * trans-stmt.c (gfc_trans_deallocate): Reset _vptr to declared type.
270
271 2011-01-06  Daniel Franke  <franke.daniel@gmail.com>
272
273         PR fortran/33117
274         PR fortran/46478
275         * parse.c (parse_interface): Remove check for procedure types.
276         * interface.c (check_interface0): Verify that procedures are
277         either all SUBROUTINEs or all FUNCTIONs.
278
279 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
280
281         PR fortran/47180
282         * trans-expr.c (gfc_trans_class_assign): Bugfix for r168524 (make sure
283         'vtab' is initialized).
284
285 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
286
287         PR fortran/47180
288         * trans-expr.c (gfc_trans_class_assign): For a polymorphic NULL pointer
289         assignment, set the _vptr component to the declared type.
290
291 2011-01-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
292
293         PR fortran/46017
294         * resolve.c (resolve_allocate_deallocate): Follow references to
295         check for duplicate occurence of allocation/deallocation objects.
296
297 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
298
299         PR fortran/47024
300         * trans-decl.c (gfc_trans_deferred_vars): Initialize the _vpr component
301         of polymorphic allocatables according to their declared type.
302
303 2011-01-04  Janus Weil  <janus@gcc.gnu.org>
304
305         PR fortran/46448
306         * class.c (gfc_find_derived_vtab): Set the module field for the copying
307         routine to make sure it receives module name mangling.
308
309 2011-01-03  Jakub Jelinek  <jakub@redhat.com>
310
311         * gfortranspec.c (lang_specific_driver): Update copyright notice
312         dates.
313
314 2011-01-03  Janus Weil  <janus@gcc.gnu.org>
315
316         * intrinsic.texi (LEADZ): Fix example.
317
318 2011-01-02  Janus Weil  <janus@gcc.gnu.org>
319
320         PR fortran/46408
321         * class.c (gfc_find_derived_vtab): Use EXEC_INIT_ASSIGN for __copy_
322         routine.
323
324 \f
325 Copyright (C) 2011 Free Software Foundation, Inc.
326
327 Copying and distribution of this file, with or without modification,
328 are permitted in any medium without royalty provided the copyright
329 notice and this notice are preserved.