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