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