2011-04-04 Tobias Burnus <burnus@net-b.de>
[official-gcc.git] / gcc / fortran / ChangeLog
blobf9513dbf650f4997e922fafef5679cde8b66b169
1 2011-04-04  Tobias Burnus  <burnus@net-b.de>
2             Mikael Morin  <mikael.morin@sfr.fr>
4         PR fortran/18918
5         * check.c (is_coarray): Update - because of DIMEN_THIS_IMAGE.
6         * expr.c (gfc_is_coindexed): Ditto.
7         * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_THIS_IMAGE.
8         * interface.c (compare_parameter): Use gfc_expr_attr and
9         gfc_is_coindexed.
10         * resolve.c (check_dimension, compare_spec_to_ref,
11         resolve_allocate_expr, check_data_variable): Update for
12         DIMEN_THIS_IMAGE.
13         * simplify.c (gfc_simplify_lcobound, gfc_simplify_this_image,
14         gfc_simplify_ucobound): Allow non-constant bounds.
15         * trans-array.c (gfc_set_loop_bounds_from_array_spec,
16         gfc_trans_create_temp_array, gfc_trans_constant_array_constructor,
17         gfc_set_vector_loop_bounds, gfc_conv_array_index_offset,
18         gfc_start_scalarized_body, gfc_trans_scalarizing_loops,
19         gfc_trans_scalarized_loop_boundary, gfc_conv_section_startstride,
20         gfc_conv_ss_startstride, gfc_conv_loop_setup,
21         gfc_trans_array_bounds, gfc_conv_expr_descriptor,
22         gfc_walk_variable_expr): Handle codimen.
23         * trans-decl.c (gfc_build_qualified_array): Save cobounds.
24         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use arg2.
25         (conv_intrinsic_cobound): New function.
26         (gfc_conv_intrinsic_function): Call it.
27         (gfc_walk_intrinsic_function, gfc_add_intrinsic_ss_code): Handle
28         ucobound, lcobound, this_image.
29         * fortran/trans-types.c (gfc_build_array_type): Save cobounds.
30         (gfc_get_dtype): Honour corank.
31         (gfc_get_nodesc_array_type): Save corank and codimensions.
32         (gfc_get_array_type_bounds): Save cobound.
33         * fortran/trans.h (gfc_ss_info,gfc_loopinfo): Add codimen item.
34         (gfc_array_kind): Add corank item.
35         (GFC_TYPE_ARRAY_CORANK): New macro.
37 2011-04-03  Kai Tietz  <ktietz@redhat.com>
39         PR middle-end/48422
40         * Make-lang.in (f95-lang.o): Add some missing dependencies.
42 2011-04-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
44         PR fortran/48352
45         * frontend-passes (cfe_register_funcs):  Don't
46         register functions if they appear as iterators in DO loops.
48 2011-03-30  Michael Matz  <matz@suse.de>
50         PR fortran/47516
51         * trans-expr.c (realloc_lhs_loop_for_fcn_call): Take loop as parameter,
52         don't use local variable.
53         (gfc_trans_arrayfunc_assign): Adjust caller.
55 2011-03-29  Janus Weil  <janus@gcc.gnu.org>
57         PR fortran/48095
58         * decl.c (match_procedure_decl,match_ppc_decl): Set flavor of interface.
59         * module.c (MOD_VERSION): Bump.
60         (mio_typespec): Read/write 'interface' field.
61         * primary.c (match_string_constant,match_logical_constant): Remove
62         unneeded code.
63         (match_complex_constant): Make sure to clear the typespec.
65 2011-03-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
67         * frontend-passes.c (create_var):  Warn about creating an
68         array temporary if requested.
70 2011-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
72         PR fortran/47065
73         * frontend-passes.c (optimize_trim): Also follow references, except
74         when they are substring references or array references.
76 2011-03-27  Tobias Burnus  <burnus@net-b.de>
78         PR fortran/18918
79         * gfortran.h (gfc_isym_id): Rename GFC_ISYM_NUMIMAGES to
80         GFC_ISYM_NUM_IMAGES.
81         (gfc_fcoarray): Add GFC_FCOARRAY_LIB.
82         * intrinsic.c (add_functions): Update due to GFC_ISYM_NUM_IMAGES
83         rename.
84         * invoke.texi (-fcoarray=): Document "lib" argument.
85         * iresolve.c (gfc_resolve_this_image): Fix THIS IMAGE().
86         * libgfortran.h (libgfortran_stat_codes): Add comments.
87         * options.c (gfc_handle_coarray_option): Add -fcoarray=lib.
88         * simplify.c (gfc_simplify_num_images, gfc_simplify_this_image):
89         Handle GFC_FCOARRAY_LIB.
90         * trans.h (gfc_init_coarray_decl): New prototype.
91         (gfor_fndecl_caf_init, gfor_fndecl_caf_finalize,
92         gfor_fndecl_caf_critical, gfor_fndecl_caf_end_critical,
93         gfor_fndecl_caf_sync_all, gfor_fndecl_caf_sync_images,
94         gfor_fndecl_caf_error_stop, gfor_fndecl_caf_error_stop_str,
95         gfort_gvar_caf_num_images, gfort_gvar_caf_this_image):
96         New global variables.
97         * trans-decl.c: Declare several CAF functions (cf. above).
98         (gfc_build_builtin_function_decls): Initialize those.
99         (gfc_init_coarray_decl): New function.
100         (create_main_function): Call CAF init/finalize functions.
101         * trans-intrinsic.c (trans_this_image, trans_num_images): New.
102         (gfc_conv_intrinsic_function): Call those.
103         * trans-stmt.c (gfc_trans_stop, gfc_trans_sync, gfc_trans_critical):
104         Add code for GFC_FCOARRAY_LIB.
106 2011-03-26  Janus Weil  <janus@gcc.gnu.org>
108         PR fortran/48291
109         * class.c (get_unique_hashed_string): Adjust maximum allowable length
110         for unique type string.
112 2011-03-25  Kai Tietz  <ktietz@redhat.com>
114         * scanner.c (preprocessor_line): Use filename_cmp
115         instead of strcmp.
117 2011-03-25  Tobias Burnus  <burnus@net-b.de>
119         PR fortran/48174
120         PR fortran/45304
121         * trans-types.c (gfc_get_function_type): Don't use varargs if the
122         procedure is known to have no arguments.
124 2010-03-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
126         PR fortran/22572
127         * gfortran.h (gfc_option_t) : Add
128         flag_aggressive_function_elimination.
129         (gfc_dep_compare_functions):  Add prototype.
130         * lang.opt: Add faggressive-function-elimination.
131         * invoke.texi: Document -faggressive-function-elimination.
132         * frontend_passes (expr_array):  New static variable.
133         (expr_size):  Likewise.
134         (expr_count):  Likewise.
135         (current_code):  Likewise.
136         (current_ns):  Likewise.
137         (gfc_run_passes):  Allocate and free space for expressions.
138         (cfe_register_funcs):  New function.
139         (create_var):  New function.
140         (cfc_expr_0):  New function.
141         (cfe_code):  New function.
142         (optimize_namespace):  Invoke gfc_code_walker with cfe_code
143         and cfe_expr_0.
144         * dependency.c (gfc_dep_compare_functions):  New function.
145         (gfc_dep_compare_expr):  Use it.
146         * options.c (gfc_init_options):  Handle
147         flag_aggressive_function_elimination.
148         (gfc_handle_option):  Likewise.
150 2011-03-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
152         * arith.c (arith_power): Plug memory leak.
154 2011-03-12  Janus Weil  <janus@gcc.gnu.org>
156         PR fortran/48059
157         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Replace base type
158         for polymorphic arguments.
160 2011-03-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
162         PR fortran/48054
163         * intrinsic.texi: Clarify doc of logarithm functions.
165 2011-03-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
167         PR fortran/47552
168         * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Fix type of
169         the string length variable.
171 2011-03-11  Janus Weil  <janus@gcc.gnu.org>
173         PR fortran/47768
174         * module.c (ab_attribute,attr_bits): Add AB_PROC_POINTER_COMP.
175         (mio_symbol_attribute): Handle attribute 'proc_pointer_comp'.
177 2011-03-06  Paul Thomas  <pault@gcc.gnu.org>
178             Jerry DeLisle  <jvdelisle@gcc.gnu.org>
180         PR fortran/47850
181         * expr.c (gfc_is_constant_expr): Only use gfc_constant_ac if
182         the expression has an iterator.  Otherwise, iterate through the
183         array, checking for constant expressions for each element.
185 2011-03-04  Janne Blomqvist  <jb@gcc.gnu.org>
187         PR libfortran/47802
188         * intrinsic.texi: Update CTIME and FDATE documentation.
190 2011-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
192         * invoke.texi (Option Summary, Fortran Dialect Options)
193         (Preprocessing Options, Runtime Options, Code Gen Options):
194         Fix vertical list spacing by using @itemx for additinoal
195         items, empty line before @table.  Fix typos.
197 2011-02-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
199         PR fortran/47894
200         * intrinsic.texi: Fix doc of the VERIFY intrinsic.
202 2011-02-26  Tobias Burnus  <burnus@net-b.de>
204         PR fortran/47846
205         * trans-stmt.c (gfc_trans_allocate): Fix allocation with
206         type-spec of deferred-length strings.
208 2011-02-26  Tobias Burnus  <burnus@net-b.de>
210         PR fortran/47886
211         * openmp.c (gfc_resolve_omp_directive): Resolve if()
212         condition of OpenMP's task.
214 2011-02-26  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
216         PR fortran/47894
217         * intrinsic.texi: Fix doc of the VERIFY intrinsic.
219 2011-02-24  Tobias Burnus  <burnus@net-b.de>
221         PR fortran/47872
222         * intrinsic.texi (ALLOCATED, ATAN, BESSEL_JN, BESSEL_YN): Add
223         multitable for linebreak between different syntax variants.
225 2011-02-24  Richard Guenther  <rguenther@suse.de>
227         PR fortran/47839
228         * f95-lang.c (pushdecl): For externs in non-global scope push
229         a copy of the decl into the BLOCK.
231 2011-02-23  Mikael Morin  <mikael@gcc.gnu.org>
233         PR fortran/40850
234         * trans.c (gfc_prepend_expr_to_block): New function.
235         * trans.h (gfc_prepend_expr_to_block): Declare.
236         * trans-array.c (gfc_conv_array_parameter): Replace
237         gfc_add_expr_to_block with gfc_prepend_expr_to_block.
239 2011-02-22  Paul Thomas  <pault@gcc.gnu.org>
241         PR fortran/45743
242         * trans-decl.c (gfc_get_extern_function_decl): Don't use the
243         gsymbol backend_decl if the procedure has a formal argument
244         that is a procedure.
246 2011-02-22  Tobias Burnus  <burnus@net-b.de>
248         PR fortran/41359
249         * trans-stmt.c (gfc_trans_if_1): Use correct line for
250         expressions in the if condition.
252 2011-02-20  Tobias Burnus  <burnus@net-b.de>
254         PR fortran/47797
255         * trans-decl.c (gfc_trans_deferred_vars): Use gfc_set_backend_locus and
256         gfc_restore_backend_locus to have better debug locations.
257         * trans-array.c (gfc_trans_deferred_array): Ditto.
259 2011-02-20  Paul Thomas  <pault@gcc.gnu.org>
261         PR fortran/45077
262         PR fortran/44945
263         * trans-types.c (gfc_get_derived_type): Remove code that looks
264         for decls in gsym and add call to gfc_get_module_backend_decl.
265         * trans.h : Add prototype for gfc_get_module_backend_decl.
266         * trans-decl.c (gfc_get_module_backend_decl): New function.
267         (gfc_get_symbol_decl): Call it.
269 2011-02-19  Paul Thomas  <pault@gcc.gnu.org>
271         PR fortran/47348
272         * trans-array.c (get_array_ctor_all_strlen): Move up in file.
273         (get_array_ctor_var_strlen): Add block dummy and add call to
274         get_array_ctor_all_strlen instead of giving up on substrings.
275         Call gcc_unreachable for default case.
276         (get_array_ctor_strlen): Add extra argument to in call to
277         get_array_ctor_var_strlen.
279 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
281         PR fortran/47789
282         * primary.c (gfc_match_structure_constructor): Handle empty parent
283         types.
285 2011-02-18  Tobias Burnus
287         PR fortran/47775
288         * trans-expr.c (arrayfunc_assign_needs_temporary): Use
289         esym to check whether the specific procedure returns an
290         allocatable or pointer.
292 2011-02-18  Michael Matz  <matz@suse.de>
294         PR fortran/45586
295         * gfortran.h (struct gfc_component): Add norestrict_decl member.
296         * trans.h (struct lang_type): Add nonrestricted_type member.
297         * trans-expr.c (gfc_conv_component_ref): Search fields with correct
298         parent type.
299         * trans-types.c (mirror_fields, gfc_nonrestricted_type): New.
300         (gfc_sym_type): Use it.
302 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
304         PR fortran/47768
305         * resolve.c (resolve_transfer): Reject variables with procedure pointer
306         components.
308 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
310         PR fortran/47767
311         * gfortran.h (gfc_check_access): Removed prototype.
312         (gfc_check_symbol_access): Added prototype.
313         * module.c (gfc_check_access): Renamed to 'check_access', made static.
314         (gfc_check_symbol_access): New function, basically a shortcut for
315         'check_access'.
316         (write_dt_extensions,write_symbol0,write_generic,write_symtree): Use
317         'gfc_check_symbol_access'.
318         (write_operator,write_module): Renamed 'gfc_check_access'.
319         * resolve.c (resolve_fl_procedure,resolve_fl_derived,
320         resolve_fl_namelist,resolve_symbol,resolve_fntype): Use
321         'gfc_check_symbol_access'.
323 2011-02-16  Janus Weil  <janus@gcc.gnu.org>
325         PR fortran/47745
326         * class.c (gfc_build_class_symbol): Set 'class_ok' attribute.
327         * decl.c (build_sym,attr_decl1): Move setting of 'class_ok' into
328         'gfc_build_class_symbol'.
329         (gfc_match_decl_type_spec): Reject unlimited polymorphism.
330         * interface.c (matching_typebound_op): Check for 'class_ok' attribute.
331         * match.c (select_type_set_tmp): Move setting of 'class_ok' into
332         'gfc_build_class_symbol'.
333         * primary.c (gfc_variable_attr): Check for 'class_ok' attribute.
335 2011-02-15  Steven G. Kargl  <kargl@gcc.gnu.org>
337         PR fortran/47633
338         . simplify.c (gfc_simplify_compiler_version): Fix off-by-one issue.
340 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
342         PR fortran/47730
343         * parse.c (gfc_build_block_ns): Commit 'block@' symbol.
345 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
347         PR fortran/47728
348         * class.c (gfc_build_class_symbol): Give a fatal error on polymorphic
349         arrays.
350         * primary.c (gfc_match_varspec): Avoid ICE for invalid class
351         declaration.
353 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
355         PR fortran/47349
356         * interface.c (get_expr_storage_size): Handle derived-type components.
358 2011-02-13  Tobias Burnus  <burnus@net-b.de>
360         PR fortran/47569
361         * interface.c (compare_parameter): Avoid ICE with
362         character components.
364 2011-02-12  Janus Weil  <janus@gcc.gnu.org>
366         * class.c (gfc_build_class_symbol): Reject polymorphic arrays.
367         * decl.c (build_sym,build_struct,attr_decl1): Use return value of
368         'gfc_build_class_symbol'.
370 2011-02-12  Michael Matz  <matz@suse.de>
371             Janus Weil  <janus@gcc.gnu.org>
372             Tobias Burnus  <burnus@net-b.de>
374         PR fortran/45586
375         * trans-expr.c (conv_parent_component_references): Avoid unintendent
376         skipping of parent compounds.
378 2011-02-11  Tobias Burnus  <burnus@net-b.de>
380         PR fortran/47550
381         * resolve.c (resolve_formal_arglist): PURE with VALUE
382         and no INTENT: Add -std= diagnostics.
384 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
386         PR fortran/47352
387         * resolve.c (resolve_procedure_interface): If interface has a result
388         variable, copy the typespec and set result pointer to self.
390 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
392         PR fortran/47463
393         * resolve.c (resolve_typebound_subroutine): Remove erroneous line.
395 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
397         PR fortran/47637
398         * trans-decl.c (init_intent_out_dt): Handle CLASS arguments.
400 2011-02-08  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
402         * io.c (match_io_element): Do not set dt if not inquire.
404 2011-02-08  Janus Weil  <janus@gcc.gnu.org>
406         PR fortran/45290
407         * expr.c (gfc_check_assign_symbol): Reject pointers as pointer
408         initialization target.
410 2011-02-07  Janne Blomqvist  <jb@gcc.gnu.org>
411             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
413         * gfortran.texi (Thread-safety): texinfo styling fixes.
414         * intrinsic.texi: Likewise.
416 2011-02-06  Janne Blomqvist  <jb@gcc.gnu.org>
418         * gfortran.texi (Compiler Characteristics): Add reference to
419         thread-safety section.
421 2011-02-06  Janne Blomqvist  <jb@gcc.gnu.org>
423         * gfortran.texi (Thread-safety): New section.
424         * intrinsic.texi (EXECUTE_COMMAND_LINE): Mention thread-safety.
425         (GETENV): Likewise.
426         (GET_ENVIRONMENT_VARIABLE): Likewise.
427         (SYSTEM): Likewise.
429 2011-02-06  Paul Thomas  <pault@gcc.gnu.org>
431         PR fortran/47592
432         * trans-stmt.c (gfc_trans_allocate): For deferred character
433         length allocations with SOURCE, store to the values and string
434         length to avoid calculating twice.  Replace gfc_start_block
435         with gfc_init_block to avoid unnecessary contexts and to keep
436         declarations of temporaries where they should be. Tidy up the
437         code a bit.
439 2011-02-05  Janne Blomqvist  <jb@gcc.gnu.org>
441         PR fortran/42434
442         * intrinsic.texi (SYSTEM_CLOCK): Update documentation.
444 2011-02-02  Janus Weil  <janus@gcc.gnu.org>
445             Paul Thomas  <pault@gcc.gnu.org>
447         PR fortran/47082
448         * trans-expr.c (gfc_trans_class_init_assign): Add call to
449         gfc_get_derived_type.
450         * module.c (read_cleanup): Do not use unique_symtrees for vtabs
451         or vtypes.
453 2011-02-02  Janus Weil  <janus@gcc.gnu.org>
455         PR fortran/47572
456         * resolve.c (resolve_fl_variable): Handle polymorphic allocatables.
458 2011-02-01  Janus Weil  <janus@gcc.gnu.org>
460         PR fortran/47565
461         * trans-expr.c (gfc_conv_structure): Handle constructors for procedure
462         pointer components with allocatable result.
464 2011-01-31  Janus Weil  <janus@gcc.gnu.org>
466         PR fortran/47455
467         * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointers
468         with pointer or allocatable result.
470 2011-01-31  Paul Thomas  <pault@gcc.gnu.org>
472         PR fortran/47519
473         * trans-stmt.c (gfc_trans_allocate): Improve handling of
474         deferred character lengths with SOURCE.
475         * iresolve.c (gfc_resolve_repeat): Calculate character
476         length from source length and ncopies.
477         * dump-parse-tree.c (show_code_node): Show MOLD and SOURCE
478         expressions for ALLOCATE.
480 2011-01-31  Janus Weil  <janus@gcc.gnu.org>
482         PR fortran/47463
483         * resolve.c (resolve_typebound_subroutine): Bug fix for the case of
484         an argument of a typebound assignment being a component.
486 2011-01-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
488         * gfortranspec.c (add_arg_libgfortran) [HAVE_LD_STATIC_DYNAMIC] Use
489         LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
491 2011-01-31  Tobias Burnus  <burnus@net-b.de>
493         PR fortran/47042
494         * resolve.c (resolve_fl_procedure): Reject stmt functions
495         with pointer/allocatable attribute.
497 2011-01-31  Tobias Burnus  <burnus@net-b.de>
499         PR fortran/47042
500         * interface.c (gfc_procedure_use): Add explicit interface check for
501         pointer/allocatable functions.
503 2011-01-30  Paul Thomas  <pault@gcc.gnu.org>
505         PR fortran/47523
506         * trans-expr.c (gfc_trans_assignment_1): If the rhs is an op
507         expr and is assigned to a deferred character length scalar,
508         make sure that the function is called before reallocation,
509         so that the length is available. Include procedure pointer
510         and procedure pointer component rhs as well.
512         PR fortran/45170
513         PR fortran/35810
514         PR fortran/47350
515         * gfortran.dg/allocatable_function_5.f90: New test not added by
516         mistake on 2011-01-28.
518 2011-01-29  Tobias Burnus  <burnus@net-b.de>
520         PR fortran/47531
521         * check.c (gfc_check_shape): Support kind argument in SHAPE.
522         * intrinsic.c (add_functions): Ditto.
523         * resolve.c (gfc_resolve_shape): Ditto.
524         * simplify.c (gfc_simplify_shape): Ditto.
525         * intrinsic.h (gfc_check_shape, gfc_resolve_shape,
526         gfc_simplify_shape): Update prototypes.
527         * intrinisc.text (SHAPE): Document kind argument.
529 2011-01-28  Tobias Burnus  <burnus@net-b.de>
531         PR fortran/47507
532         * resolve.c (resolve_formal_arglist): Allow arguments with VALUE
533         attribute also without INTENT.
535 2011-01-28  Tobias Burnus  <burnus@net-b.de>
537         * gfortran.texi (Fortran 2003 status): Mention support for
538         nonconstant namelist variables.
540 2011-01-28  Paul Thomas  <pault@gcc.gnu.org>
541             Tobias Burnus  <burnus@gcc.gnu.org>
543         PR fortran/45170
544         PR fortran/35810
545         PR fortran/47350
546         * interface.c (compare_actual_formal): An allocatable or pointer
547         deferred length actual is only allowed if the formal argument
548         is also deferred length. Clean up whitespace.
549         * trans-expr.c (gfc_conv_procedure_call): Pass string length for
550         deferred character length formal arguments by reference. Do the
551         same for function results.
552         (gfc_trans_pointer_assignment): Do not do runtime check of lhs
553         and rhs character lengths, if deferred length lhs.  In this case
554         set the lhs character length to that of the rhs.
555         (gfc_conv_string_parameter): Remove assert that string length is
556         an integer type.
557         (is_scalar_reallocatable_lhs): New function.
558         (alloc_scalar_allocatable_for_assignment): New function.
559         (gfc_trans_assignment_1): Call above new function. If the rhs is
560         a deferred character length itself, makes ure that the function
561         is called before reallocation, so that the length is available.
562         (gfc_trans_asssignment): Remove error about assignment to
563         deferred length character variables.
564         * gfortran.texi : Update entry about (re)allocation on
565         assignment.
566         * trans-stmt.c (gfc_trans_allocate): Add code to handle deferred
567         length character variables.
568         * module.c (mio_typespec): Transfer deferred characteristic.
569         * trans-types.c (gfc_get_function_type): New code to generate
570         hidden typelist, so that those character lengths that are
571         passed by reference get the right type.
572         * resolve.c (resolve_contained_fntype): Supress error for
573         deferred character length functions.
574         (resolve_function, resolve_fl_procedure) The same.
575         (check_symbols): Remove the error that support for
576         entity with deferred type parameter is not yet implemented.
577         (resolve_fl_derived): The same.
578         match.c (alloc_opt_list): Allow MOLD for deferred length object.
579         * trans-decl.c (gfc_get_symbol_decl): For deferred character
580         length dummies, generate a local variable for string length.
581         (create_function_arglist): Hidden length can be a pointer.
582         (gfc_trans_deferred_vars): For deferred character length
583         results and dummies, assign the string length to the local
584         variable from the hidden argument on entry and the other way
585         round on exit, as appropriate.
587 2011-01-27  Tobias Burnus  <burnus@net-b.de>
589         PR fortran/47474
590         * trans-decl.c (gfc_generate_function_code): Fix init
591         of allocatable result variable with allocatable components.
593 2011-01-27  Tobias Burnus  <burnus@net-b.de>
595         PR fortran/47472
596         * options.c (gfc_handle_module_path_options): Save
597         module path without trailing slash as include path.
599 2011-01-25  Tobias Burnus  <burnus@net-b.de>
601         PR fortran/47448
602         * interface.c (gfc_check_operator_interface): Fix
603         defined-assignment check.
605 2011-01-23  Tobias Burnus  <burnus@net-b.de>
607         PR fortran/47421
608         * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
609         scalar allocatable dummy arguments.
611 2011-01-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
613         PR fortran/38536
614         * resolve.c (gfc_iso_c_func_interface):  For C_LOC,
615         check for array sections followed by component references
616         which are illegal.  Also check for coindexed arguments.
618 2011-01-22  Tobias Burnus  <burnus@net-b.de>
620         PR fortran/47399
621         * primary.c (gfc_match_varspec): Relax gcc_assert to allow for
622         PARAMETER TBP.
624 2011-01-21  Tobias Burnus  <burnus@net-b.de>
626         PR fortran/47394
627         * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check):
628         Use defined instead of magic number exit status codes.
629         * scanner.c (include_line, gfc_new_file): Ditto.
631 2011-01-21  Tobias Burnus  <burnus@net-b.de>
633         PR fortran/47377
634         * expr.c (gfc_check_pointer_assign): Reject expr data-targets
635         without pointer attribute.
637 2011-01-18  Janus Weil  <janus@gcc.gnu.org>
639         PR fortran/47240
640         * resolve.c (expression_rank): Fix rank of procedure poiner components.
641         * trans-expr.c (gfc_conv_procedure_call): Take care of procedure
642         pointer components as actual arguments.
644 2011-01-17  Jakub Jelinek  <jakub@redhat.com>
646         PR fortran/47331
647         * gfortran.h (struct gfc_omp_saved_state): New type.
648         (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New prototypes.
649         * resolve.c (resolve_global_procedure): Call it around gfc_resolve
650         call.
651         * openmp.c (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New
652         functions.
654 2011-01-17  Tobias Burnus  <burnus@net-b.de>
656         PR fortran/47327
657         * invoke.texi (Options to request or suppress errors
658         and warnings): Fix cross link.
660 2011-01-15  Tobias Burnus  <burnus@net-b.de>
662         * gfortran.texi: Update Fortran 2003 Status section.
664         PR fortran/47177
665         * invoke.texi: Add missing "-E" to the -dM example.
667 2011-01-13  Tobias Burnus  <burnus@net-b.de>
669         PR fortran/47268
670         * intrinsic.texi (get_command_argument, get_environment_variable):
671         Mark arguments as optional in the Arguments section.
673 2011-01-13  Kai Tietz  <kai.tietz@onevision.com>
674             Tobias Burnus  <burnus@net-b.de>
676         PR fortran/47260
677         * trans-decl.c (gfc_get_extern_function_decl,
678         build_function_decl): Set TREE_PUBLIC/TREE_EXTERNAL before
679         calling decl_attributes.
681 2011-01-13  Tobias Burnus  <burnus@net-b.de>
682             Mikael Morin  <mikael@gcc.gnu.org>
684         PR fortran/45848
685         PR fortran/47204
686         * gfortran.h (gfc_code): Move union ext's case_list into
687         the struct block.
688         * dump-parse-tree.c (show_code_node): Adapt by prefixing case_list
689         by "block.".
690         * frontend-passes.c (gfc_code_walker): Ditto.
691         * match.c (gfc_match_goto, gfc_match_call, gfc_match_case,
692         gfc_match_type_is, gfc_match_class_is): Ditto.
693         * resolve.c (resolve_select, resolve_select_type): Ditto.
694         * st.c (gfc_free_statement): Ditto.
695         * trans-stmt.c (gfc_trans_integer_select, gfc_trans_logical_select,
696         gfc_trans_character_select): Ditto.
697         * parse.c (resolve_all_program_units): For error recovery, avoid
698         segfault is proc_name is NULL.
700 2011-01-11  Paul Thomas  <pault@gcc.gnu.org>
702         PR fortran/47051
703         * trans-array.c (gfc_alloc_allocatable_for_assignment): Change
704         to be standard compliant by testing for shape rather than size
705         before skipping reallocation. Improve comments.
707 2011-01-09  Janus Weil  <janus@gcc.gnu.org>
709         PR fortran/47224
710         * resolve.c (resolve_actual_arglist): Remove unneeded and buggy piece
711         of code.
713 2011-01-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
715         PR fortran/38536
716         * resolve.c (is_scalar_expr_ptr):  For a substring reference,
717         use gfc_dep_compare_expr to compare start and end expession.
718         Add FIXME for using gfc_deb_compare_expr elsewhere.
720 2011-01-09  Janus Weil  <janus@gcc.gnu.org>
722         PR fortran/46313
723         * class.c (get_unique_type_string): Make type name start with upper
724         case letter.
726 2011-01-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
728         PR fortran/46405
729         * invoke.texi:  Mention -ffree-line-length-none and
730         -ffixed-line-length-none for preprocessing.
732 2011-01-08  Paul Thomas  <pault@gcc.gnu.org>
734         PR fortran/46896
735         * trans-expr.c (gfc_conv_procedure_call): With a non-copying
736         procedure argument (eg TRANSPOSE) use a temporary if there is
737         any chance of aliasing due to host or use association.
738         (arrayfunc_assign_needs_temporary): Correct logic for function
739         results and do not use a temporary for implicitly PURE
740         variables.  Use a temporary for Cray pointees.
741         * symbol.c (gfc_add_save): Explicit SAVE not compatible with
742         implicit pureness of containing procedure.
743         * decl.c (match_old_style_init, gfc_match_data): Where decl
744         would fail in PURE procedure, set implicit_pure to zero.
745         * gfortran.h : Add implicit_pure to structure symbol_attr and
746         add prototype for function gfc_implicit_pure.
747         * expr.c (gfc_check_pointer_assign, gfc_check_vardef_context):
748         Where decl would fail in PURE procedure, reset implicit_pure.
749         * io.c (match_vtag, gfc_match_open, gfc_match_close,
750         gfc_match_print, gfc_match_inquire, gfc_match_wait): The same.
751         * match.c (gfc_match_critical, gfc_match_stopcode,
752         sync_statement, gfc_match_allocate, gfc_match_deallocate): The
753         same.
754         * parse.c (decode_omp_directive): The same.
755         (parse_contained): If not PURE, set implicit pure attribute.
756         * resolve.c (resolve_formal_arglist, resolve_structure_cons,
757         resolve_function, resolve_ordinary_assign) : The same.
758         (gfc_implicit_pure): New function.
759         * module.c (mio_symbol_attribute): Introduce AB_IMPLICIT_PURE
760         to ab_attribute enum and use it in this function.
762 2011-01-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
764         PR fortran/45777
765         * symbol.c (gfc_symbols_could_alias):  Strip gfc_ prefix,
766         make static and move in front of its only caller, to ...
767         * trans-array.c (symbols_could_alias): ... here.
768         Pass information about pointer and target status as
769         arguments.  Allocatable arrays don't alias anything
770         unless they have the POINTER attribute.
771         (gfc_could_be_alias):  Keep track of pointer and target
772         status when following references.  Also check if typespecs
773         of components match those of other components or symbols.
775 2011-01-07  Tobias Burnus  <burnus@net-b.de>
777         PR fortran/41580
778         * class.c (gfc_build_class_symbol): Mark __vtab as attr.vtab.
779         * intrinsic.c (add_functions): Use simplify functions for
780         EXTENDS_TYPE_OF and SAME_TYPE_AS.
781         * intrinsic.h (gfc_simplify_extends_type_of,
782         gfc_simplify_same_type_as): New prototypes.
783         * simplify.c (is_last_ref_vtab, gfc_simplify_extends_type_of,
784         gfc_simplify_same_type_as): New functions.
786 2011-01-07  Janus Weil  <janus@gcc.gnu.org>
788         PR fortran/47189
789         PR fortran/47194
790         * gfortran.h (gfc_lval_expr_from_sym): Moved prototype.
791         * class.c (gfc_class_null_initializer): Initialize _vptr to declared
792         type.
793         * expr.c (gfc_lval_expr_from_sym): Moved here from symbol.c.
794         * resolve.c (resolve_deallocate_expr): _data component will be added
795         at translation stage.
796         * symbol.c (gfc_lval_expr_from_sym): Moved to expr.c.
797         * trans-stmt.c (gfc_trans_deallocate): Reset _vptr to declared type.
799 2011-01-06  Daniel Franke  <franke.daniel@gmail.com>
801         PR fortran/33117
802         PR fortran/46478
803         * parse.c (parse_interface): Remove check for procedure types.
804         * interface.c (check_interface0): Verify that procedures are
805         either all SUBROUTINEs or all FUNCTIONs.
807 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
809         PR fortran/47180
810         * trans-expr.c (gfc_trans_class_assign): Bugfix for r168524 (make sure
811         'vtab' is initialized).
813 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
815         PR fortran/47180
816         * trans-expr.c (gfc_trans_class_assign): For a polymorphic NULL pointer
817         assignment, set the _vptr component to the declared type.
819 2011-01-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
821         PR fortran/46017
822         * resolve.c (resolve_allocate_deallocate): Follow references to
823         check for duplicate occurence of allocation/deallocation objects.
825 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
827         PR fortran/47024
828         * trans-decl.c (gfc_trans_deferred_vars): Initialize the _vpr component
829         of polymorphic allocatables according to their declared type.
831 2011-01-04  Janus Weil  <janus@gcc.gnu.org>
833         PR fortran/46448
834         * class.c (gfc_find_derived_vtab): Set the module field for the copying
835         routine to make sure it receives module name mangling.
837 2011-01-03  Jakub Jelinek  <jakub@redhat.com>
839         * gfortranspec.c (lang_specific_driver): Update copyright notice
840         dates.
842 2011-01-03  Janus Weil  <janus@gcc.gnu.org>
844         * intrinsic.texi (LEADZ): Fix example.
846 2011-01-02  Janus Weil  <janus@gcc.gnu.org>
848         PR fortran/46408
849         * class.c (gfc_find_derived_vtab): Use EXEC_INIT_ASSIGN for __copy_
850         routine.
853 Copyright (C) 2011 Free Software Foundation, Inc.
855 Copying and distribution of this file, with or without modification,
856 are permitted in any medium without royalty provided the copyright
857 notice and this notice are preserved.