OSDN Git Service

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