OSDN Git Service

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