OSDN Git Service

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