OSDN Git Service

2011-02-09 Janus Weil <janus@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
2
3         PR fortran/47352
4         * resolve.c (resolve_procedure_interface): If interface has a result
5         variable, copy the typespec and set result pointer to self.
6
7 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
8
9         PR fortran/47463
10         * resolve.c (resolve_typebound_subroutine): Remove erroneous line.
11
12 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
13
14         PR fortran/47637
15         * trans-decl.c (init_intent_out_dt): Handle CLASS arguments.
16
17 2011-02-08  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
18
19         * io.c (match_io_element): Do not set dt if not inquire.
20
21 2011-02-08  Janus Weil  <janus@gcc.gnu.org>
22
23         PR fortran/45290
24         * expr.c (gfc_check_assign_symbol): Reject pointers as pointer
25         initialization target.
26
27 2011-02-07  Janne Blomqvist  <jb@gcc.gnu.org>
28             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
29
30         * gfortran.texi (Thread-safety): texinfo styling fixes.
31         * intrinsic.texi: Likewise.
32
33 2011-02-06  Janne Blomqvist  <jb@gcc.gnu.org>
34
35         * gfortran.texi (Compiler Characteristics): Add reference to
36         thread-safety section.
37
38 2011-02-06  Janne Blomqvist  <jb@gcc.gnu.org>
39
40         * gfortran.texi (Thread-safety): New section.
41         * intrinsic.texi (EXECUTE_COMMAND_LINE): Mention thread-safety.
42         (GETENV): Likewise.
43         (GET_ENVIRONMENT_VARIABLE): Likewise.
44         (SYSTEM): Likewise.
45
46 2011-02-06  Paul Thomas  <pault@gcc.gnu.org>
47
48         PR fortran/47592
49         * trans-stmt.c (gfc_trans_allocate): For deferred character
50         length allocations with SOURCE, store to the values and string
51         length to avoid calculating twice.  Replace gfc_start_block
52         with gfc_init_block to avoid unnecessary contexts and to keep
53         declarations of temporaries where they should be. Tidy up the
54         code a bit.
55
56 2011-02-05  Janne Blomqvist  <jb@gcc.gnu.org>
57
58         PR fortran/42434
59         * intrinsic.texi (SYSTEM_CLOCK): Update documentation.
60
61 2011-02-02  Janus Weil  <janus@gcc.gnu.org>
62             Paul Thomas  <pault@gcc.gnu.org>
63
64         PR fortran/47082
65         * trans-expr.c (gfc_trans_class_init_assign): Add call to
66         gfc_get_derived_type.
67         * module.c (read_cleanup): Do not use unique_symtrees for vtabs
68         or vtypes.
69
70 2011-02-02  Janus Weil  <janus@gcc.gnu.org>
71
72         PR fortran/47572
73         * resolve.c (resolve_fl_variable): Handle polymorphic allocatables.
74
75 2011-02-01  Janus Weil  <janus@gcc.gnu.org>
76
77         PR fortran/47565
78         * trans-expr.c (gfc_conv_structure): Handle constructors for procedure
79         pointer components with allocatable result.
80
81 2011-01-31  Janus Weil  <janus@gcc.gnu.org>
82
83         PR fortran/47455
84         * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointers
85         with pointer or allocatable result.
86
87 2011-01-31  Paul Thomas  <pault@gcc.gnu.org>
88
89         PR fortran/47519
90         * trans-stmt.c (gfc_trans_allocate): Improve handling of
91         deferred character lengths with SOURCE.
92         * iresolve.c (gfc_resolve_repeat): Calculate character
93         length from source length and ncopies.
94         * dump-parse-tree.c (show_code_node): Show MOLD and SOURCE
95         expressions for ALLOCATE.
96
97 2011-01-31  Janus Weil  <janus@gcc.gnu.org>
98
99         PR fortran/47463
100         * resolve.c (resolve_typebound_subroutine): Bug fix for the case of
101         an argument of a typebound assignment being a component.
102
103 2011-01-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
104
105         * gfortranspec.c (add_arg_libgfortran) [HAVE_LD_STATIC_DYNAMIC] Use
106         LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
107
108 2011-01-31  Tobias Burnus  <burnus@net-b.de>
109
110         PR fortran/47042
111         * resolve.c (resolve_fl_procedure): Reject stmt functions
112         with pointer/allocatable attribute.
113
114 2011-01-31  Tobias Burnus  <burnus@net-b.de>
115
116         PR fortran/47042
117         * interface.c (gfc_procedure_use): Add explicit interface check for
118         pointer/allocatable functions.
119
120 2011-01-30  Paul Thomas  <pault@gcc.gnu.org>
121
122         PR fortran/47523
123         * trans-expr.c (gfc_trans_assignment_1): If the rhs is an op
124         expr and is assigned to a deferred character length scalar,
125         make sure that the function is called before reallocation,
126         so that the length is available. Include procedure pointer
127         and procedure pointer component rhs as well.
128
129         PR fortran/45170
130         PR fortran/35810
131         PR fortran/47350
132         * gfortran.dg/allocatable_function_5.f90: New test not added by
133         mistake on 2011-01-28.
134
135 2011-01-29  Tobias Burnus  <burnus@net-b.de>
136
137         PR fortran/47531
138         * check.c (gfc_check_shape): Support kind argument in SHAPE.
139         * intrinsic.c (add_functions): Ditto.
140         * resolve.c (gfc_resolve_shape): Ditto.
141         * simplify.c (gfc_simplify_shape): Ditto.
142         * intrinsic.h (gfc_check_shape, gfc_resolve_shape,
143         gfc_simplify_shape): Update prototypes.
144         * intrinisc.text (SHAPE): Document kind argument.
145
146 2011-01-28  Tobias Burnus  <burnus@net-b.de>
147
148         PR fortran/47507
149         * resolve.c (resolve_formal_arglist): Allow arguments with VALUE
150         attribute also without INTENT.
151
152 2011-01-28  Tobias Burnus  <burnus@net-b.de>
153
154         * gfortran.texi (Fortran 2003 status): Mention support for
155         nonconstant namelist variables.
156
157 2011-01-28  Paul Thomas  <pault@gcc.gnu.org>
158             Tobias Burnus  <burnus@gcc.gnu.org>
159
160         PR fortran/45170
161         PR fortran/35810
162         PR fortran/47350
163         * interface.c (compare_actual_formal): An allocatable or pointer
164         deferred length actual is only allowed if the formal argument
165         is also deferred length. Clean up whitespace.
166         * trans-expr.c (gfc_conv_procedure_call): Pass string length for
167         deferred character length formal arguments by reference. Do the
168         same for function results.
169         (gfc_trans_pointer_assignment): Do not do runtime check of lhs
170         and rhs character lengths, if deferred length lhs.  In this case
171         set the lhs character length to that of the rhs.
172         (gfc_conv_string_parameter): Remove assert that string length is
173         an integer type.
174         (is_scalar_reallocatable_lhs): New function.
175         (alloc_scalar_allocatable_for_assignment): New function.
176         (gfc_trans_assignment_1): Call above new function. If the rhs is
177         a deferred character length itself, makes ure that the function
178         is called before reallocation, so that the length is available.
179         (gfc_trans_asssignment): Remove error about assignment to
180         deferred length character variables.
181         * gfortran.texi : Update entry about (re)allocation on
182         assignment.
183         * trans-stmt.c (gfc_trans_allocate): Add code to handle deferred
184         length character variables.
185         * module.c (mio_typespec): Transfer deferred characteristic.
186         * trans-types.c (gfc_get_function_type): New code to generate
187         hidden typelist, so that those character lengths that are
188         passed by reference get the right type.
189         * resolve.c (resolve_contained_fntype): Supress error for
190         deferred character length functions.
191         (resolve_function, resolve_fl_procedure) The same.
192         (check_symbols): Remove the error that support for
193         entity with deferred type parameter is not yet implemented.
194         (resolve_fl_derived): The same.
195         match.c (alloc_opt_list): Allow MOLD for deferred length object.
196         * trans-decl.c (gfc_get_symbol_decl): For deferred character
197         length dummies, generate a local variable for string length.
198         (create_function_arglist): Hidden length can be a pointer.
199         (gfc_trans_deferred_vars): For deferred character length
200         results and dummies, assign the string length to the local
201         variable from the hidden argument on entry and the other way
202         round on exit, as appropriate.
203
204 2011-01-27  Tobias Burnus  <burnus@net-b.de>
205
206         PR fortran/47474
207         * trans-decl.c (gfc_generate_function_code): Fix init
208         of allocatable result variable with allocatable components.
209
210 2011-01-27  Tobias Burnus  <burnus@net-b.de>
211
212         PR fortran/47472
213         * options.c (gfc_handle_module_path_options): Save
214         module path without trailing slash as include path.
215
216 2011-01-25  Tobias Burnus  <burnus@net-b.de>
217
218         PR fortran/47448
219         * interface.c (gfc_check_operator_interface): Fix
220         defined-assignment check.
221
222 2011-01-23  Tobias Burnus  <burnus@net-b.de>
223
224         PR fortran/47421
225         * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
226         scalar allocatable dummy arguments.
227
228 2011-01-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
229
230         PR fortran/38536
231         * resolve.c (gfc_iso_c_func_interface):  For C_LOC,
232         check for array sections followed by component references
233         which are illegal.  Also check for coindexed arguments.
234
235 2011-01-22  Tobias Burnus  <burnus@net-b.de>
236
237         PR fortran/47399
238         * primary.c (gfc_match_varspec): Relax gcc_assert to allow for
239         PARAMETER TBP.
240
241 2011-01-21  Tobias Burnus  <burnus@net-b.de>
242
243         PR fortran/47394
244         * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check):
245         Use defined instead of magic number exit status codes.
246         * scanner.c (include_line, gfc_new_file): Ditto.
247
248 2011-01-21  Tobias Burnus  <burnus@net-b.de>
249
250         PR fortran/47377
251         * expr.c (gfc_check_pointer_assign): Reject expr data-targets
252         without pointer attribute.
253
254 2011-01-18  Janus Weil  <janus@gcc.gnu.org>
255
256         PR fortran/47240
257         * resolve.c (expression_rank): Fix rank of procedure poiner components.
258         * trans-expr.c (gfc_conv_procedure_call): Take care of procedure
259         pointer components as actual arguments.
260
261 2011-01-17  Jakub Jelinek  <jakub@redhat.com>
262
263         PR fortran/47331
264         * gfortran.h (struct gfc_omp_saved_state): New type.
265         (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New prototypes.
266         * resolve.c (resolve_global_procedure): Call it around gfc_resolve
267         call.
268         * openmp.c (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New
269         functions.
270
271 2011-01-17  Tobias Burnus  <burnus@net-b.de>
272
273         PR fortran/47327
274         * invoke.texi (Options to request or suppress errors
275         and warnings): Fix cross link.
276
277 2011-01-15  Tobias Burnus  <burnus@net-b.de>
278
279         * gfortran.texi: Update Fortran 2003 Status section.
280
281         PR fortran/47177
282         * invoke.texi: Add missing "-E" to the -dM example.
283
284 2011-01-13  Tobias Burnus  <burnus@net-b.de>
285
286         PR fortran/47268
287         * intrinsic.texi (get_command_argument, get_environment_variable):
288         Mark arguments as optional in the Arguments section.
289
290 2011-01-13  Kai Tietz  <kai.tietz@onevision.com>
291             Tobias Burnus  <burnus@net-b.de>
292
293         PR fortran/47260
294         * trans-decl.c (gfc_get_extern_function_decl,
295         build_function_decl): Set TREE_PUBLIC/TREE_EXTERNAL before
296         calling decl_attributes.
297
298 2011-01-13  Tobias Burnus  <burnus@net-b.de>
299             Mikael Morin  <mikael@gcc.gnu.org>
300
301         PR fortran/45848
302         PR fortran/47204
303         * gfortran.h (gfc_code): Move union ext's case_list into
304         the struct block.
305         * dump-parse-tree.c (show_code_node): Adapt by prefixing case_list
306         by "block.".
307         * frontend-passes.c (gfc_code_walker): Ditto.
308         * match.c (gfc_match_goto, gfc_match_call, gfc_match_case,
309         gfc_match_type_is, gfc_match_class_is): Ditto.
310         * resolve.c (resolve_select, resolve_select_type): Ditto.
311         * st.c (gfc_free_statement): Ditto.
312         * trans-stmt.c (gfc_trans_integer_select, gfc_trans_logical_select,
313         gfc_trans_character_select): Ditto.
314         * parse.c (resolve_all_program_units): For error recovery, avoid
315         segfault is proc_name is NULL.
316
317 2011-01-11  Paul Thomas  <pault@gcc.gnu.org>
318
319         PR fortran/47051
320         * trans-array.c (gfc_alloc_allocatable_for_assignment): Change
321         to be standard compliant by testing for shape rather than size
322         before skipping reallocation. Improve comments.
323
324 2011-01-09  Janus Weil  <janus@gcc.gnu.org>
325
326         PR fortran/47224
327         * resolve.c (resolve_actual_arglist): Remove unneeded and buggy piece
328         of code.
329
330 2011-01-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
331
332         PR fortran/38536
333         * resolve.c (is_scalar_expr_ptr):  For a substring reference,
334         use gfc_dep_compare_expr to compare start and end expession.
335         Add FIXME for using gfc_deb_compare_expr elsewhere.
336
337 2011-01-09  Janus Weil  <janus@gcc.gnu.org>
338
339         PR fortran/46313
340         * class.c (get_unique_type_string): Make type name start with upper
341         case letter.
342
343 2011-01-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
344
345         PR fortran/46405
346         * invoke.texi:  Mention -ffree-line-length-none and
347         -ffixed-line-length-none for preprocessing.
348
349 2011-01-08  Paul Thomas  <pault@gcc.gnu.org>
350
351         PR fortran/46896
352         * trans-expr.c (gfc_conv_procedure_call): With a non-copying
353         procedure argument (eg TRANSPOSE) use a temporary if there is
354         any chance of aliasing due to host or use association.
355         (arrayfunc_assign_needs_temporary): Correct logic for function
356         results and do not use a temporary for implicitly PURE
357         variables.  Use a temporary for Cray pointees.
358         * symbol.c (gfc_add_save): Explicit SAVE not compatible with
359         implicit pureness of containing procedure.
360         * decl.c (match_old_style_init, gfc_match_data): Where decl
361         would fail in PURE procedure, set implicit_pure to zero.
362         * gfortran.h : Add implicit_pure to structure symbol_attr and
363         add prototype for function gfc_implicit_pure.
364         * expr.c (gfc_check_pointer_assign, gfc_check_vardef_context):
365         Where decl would fail in PURE procedure, reset implicit_pure.
366         * io.c (match_vtag, gfc_match_open, gfc_match_close,
367         gfc_match_print, gfc_match_inquire, gfc_match_wait): The same.
368         * match.c (gfc_match_critical, gfc_match_stopcode,
369         sync_statement, gfc_match_allocate, gfc_match_deallocate): The
370         same.
371         * parse.c (decode_omp_directive): The same.
372         (parse_contained): If not PURE, set implicit pure attribute.
373         * resolve.c (resolve_formal_arglist, resolve_structure_cons,
374         resolve_function, resolve_ordinary_assign) : The same.
375         (gfc_implicit_pure): New function.
376         * module.c (mio_symbol_attribute): Introduce AB_IMPLICIT_PURE
377         to ab_attribute enum and use it in this function.
378
379 2011-01-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
380
381         PR fortran/45777
382         * symbol.c (gfc_symbols_could_alias):  Strip gfc_ prefix,
383         make static and move in front of its only caller, to ...
384         * trans-array.c (symbols_could_alias): ... here.
385         Pass information about pointer and target status as
386         arguments.  Allocatable arrays don't alias anything
387         unless they have the POINTER attribute.
388         (gfc_could_be_alias):  Keep track of pointer and target
389         status when following references.  Also check if typespecs
390         of components match those of other components or symbols.
391
392 2011-01-07  Tobias Burnus  <burnus@net-b.de>
393
394         PR fortran/41580
395         * class.c (gfc_build_class_symbol): Mark __vtab as attr.vtab.
396         * intrinsic.c (add_functions): Use simplify functions for
397         EXTENDS_TYPE_OF and SAME_TYPE_AS.
398         * intrinsic.h (gfc_simplify_extends_type_of,
399         gfc_simplify_same_type_as): New prototypes.
400         * simplify.c (is_last_ref_vtab, gfc_simplify_extends_type_of,
401         gfc_simplify_same_type_as): New functions.
402
403 2011-01-07  Janus Weil  <janus@gcc.gnu.org>
404
405         PR fortran/47189
406         PR fortran/47194
407         * gfortran.h (gfc_lval_expr_from_sym): Moved prototype.
408         * class.c (gfc_class_null_initializer): Initialize _vptr to declared
409         type.
410         * expr.c (gfc_lval_expr_from_sym): Moved here from symbol.c.
411         * resolve.c (resolve_deallocate_expr): _data component will be added
412         at translation stage.
413         * symbol.c (gfc_lval_expr_from_sym): Moved to expr.c.
414         * trans-stmt.c (gfc_trans_deallocate): Reset _vptr to declared type.
415
416 2011-01-06  Daniel Franke  <franke.daniel@gmail.com>
417
418         PR fortran/33117
419         PR fortran/46478
420         * parse.c (parse_interface): Remove check for procedure types.
421         * interface.c (check_interface0): Verify that procedures are
422         either all SUBROUTINEs or all FUNCTIONs.
423
424 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
425
426         PR fortran/47180
427         * trans-expr.c (gfc_trans_class_assign): Bugfix for r168524 (make sure
428         'vtab' is initialized).
429
430 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
431
432         PR fortran/47180
433         * trans-expr.c (gfc_trans_class_assign): For a polymorphic NULL pointer
434         assignment, set the _vptr component to the declared type.
435
436 2011-01-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
437
438         PR fortran/46017
439         * resolve.c (resolve_allocate_deallocate): Follow references to
440         check for duplicate occurence of allocation/deallocation objects.
441
442 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
443
444         PR fortran/47024
445         * trans-decl.c (gfc_trans_deferred_vars): Initialize the _vpr component
446         of polymorphic allocatables according to their declared type.
447
448 2011-01-04  Janus Weil  <janus@gcc.gnu.org>
449
450         PR fortran/46448
451         * class.c (gfc_find_derived_vtab): Set the module field for the copying
452         routine to make sure it receives module name mangling.
453
454 2011-01-03  Jakub Jelinek  <jakub@redhat.com>
455
456         * gfortranspec.c (lang_specific_driver): Update copyright notice
457         dates.
458
459 2011-01-03  Janus Weil  <janus@gcc.gnu.org>
460
461         * intrinsic.texi (LEADZ): Fix example.
462
463 2011-01-02  Janus Weil  <janus@gcc.gnu.org>
464
465         PR fortran/46408
466         * class.c (gfc_find_derived_vtab): Use EXEC_INIT_ASSIGN for __copy_
467         routine.
468
469 \f
470 Copyright (C) 2011 Free Software Foundation, Inc.
471
472 Copying and distribution of this file, with or without modification,
473 are permitted in any medium without royalty provided the copyright
474 notice and this notice are preserved.