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