OSDN Git Service

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