2011-03-29 Thomas Koenig <tkoenig@gcc.gnu.org>
[official-gcc.git] / gcc / fortran / ChangeLog
blob4bb344d003a1d9ac3fab00fb5f95ed01e1632b76
1 2011-03-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
3         * frontend-passes.c (create_var):  Warn about creating an
4         array temporary if requested.
6 2011-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
8         PR fortran/47065
9         * frontend-passes.c (optimize_trim): Also follow references, except
10         when they are substring references or array references.
12 2011-03-27  Tobias Burnus  <burnus@net-b.de>
14         PR fortran/18918
15         * gfortran.h (gfc_isym_id): Rename GFC_ISYM_NUMIMAGES to
16         GFC_ISYM_NUM_IMAGES.
17         (gfc_fcoarray): Add GFC_FCOARRAY_LIB.
18         * intrinsic.c (add_functions): Update due to GFC_ISYM_NUM_IMAGES
19         rename.
20         * invoke.texi (-fcoarray=): Document "lib" argument.
21         * iresolve.c (gfc_resolve_this_image): Fix THIS IMAGE().
22         * libgfortran.h (libgfortran_stat_codes): Add comments.
23         * options.c (gfc_handle_coarray_option): Add -fcoarray=lib.
24         * simplify.c (gfc_simplify_num_images, gfc_simplify_this_image):
25         Handle GFC_FCOARRAY_LIB.
26         * trans.h (gfc_init_coarray_decl): New prototype.
27         (gfor_fndecl_caf_init, gfor_fndecl_caf_finalize,
28         gfor_fndecl_caf_critical, gfor_fndecl_caf_end_critical,
29         gfor_fndecl_caf_sync_all, gfor_fndecl_caf_sync_images,
30         gfor_fndecl_caf_error_stop, gfor_fndecl_caf_error_stop_str,
31         gfort_gvar_caf_num_images, gfort_gvar_caf_this_image):
32         New global variables.
33         * trans-decl.c: Declare several CAF functions (cf. above).
34         (gfc_build_builtin_function_decls): Initialize those.
35         (gfc_init_coarray_decl): New function.
36         (create_main_function): Call CAF init/finalize functions.
37         * trans-intrinsic.c (trans_this_image, trans_num_images): New.
38         (gfc_conv_intrinsic_function): Call those.
39         * trans-stmt.c (gfc_trans_stop, gfc_trans_sync, gfc_trans_critical):
40         Add code for GFC_FCOARRAY_LIB.
42 2011-03-26  Janus Weil  <janus@gcc.gnu.org>
44         PR fortran/48291
45         * class.c (get_unique_hashed_string): Adjust maximum allowable length
46         for unique type string.
48 2011-03-25  Kai Tietz  <ktietz@redhat.com>
50         * scanner.c (preprocessor_line): Use filename_cmp
51         instead of strcmp.
53 2011-03-25  Tobias Burnus  <burnus@net-b.de>
55         PR fortran/48174
56         PR fortran/45304
57         * trans-types.c (gfc_get_function_type): Don't use varargs if the
58         procedure is known to have no arguments.
60 2010-03-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
62         PR fortran/22572
63         * gfortran.h (gfc_option_t) : Add
64         flag_aggressive_function_elimination.
65         (gfc_dep_compare_functions):  Add prototype.
66         * lang.opt: Add faggressive-function-elimination.
67         * invoke.texi: Document -faggressive-function-elimination.
68         * frontend_passes (expr_array):  New static variable.
69         (expr_size):  Likewise.
70         (expr_count):  Likewise.
71         (current_code):  Likewise.
72         (current_ns):  Likewise.
73         (gfc_run_passes):  Allocate and free space for expressions.
74         (cfe_register_funcs):  New function.
75         (create_var):  New function.
76         (cfc_expr_0):  New function.
77         (cfe_code):  New function.
78         (optimize_namespace):  Invoke gfc_code_walker with cfe_code
79         and cfe_expr_0.
80         * dependency.c (gfc_dep_compare_functions):  New function.
81         (gfc_dep_compare_expr):  Use it.
82         * options.c (gfc_init_options):  Handle
83         flag_aggressive_function_elimination.
84         (gfc_handle_option):  Likewise.
86 2011-03-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
88         * arith.c (arith_power): Plug memory leak.
90 2011-03-12  Janus Weil  <janus@gcc.gnu.org>
92         PR fortran/48059
93         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Replace base type
94         for polymorphic arguments.
96 2011-03-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
98         PR fortran/48054
99         * intrinsic.texi: Clarify doc of logarithm functions.
101 2011-03-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
103         PR fortran/47552
104         * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Fix type of
105         the string length variable.
107 2011-03-11  Janus Weil  <janus@gcc.gnu.org>
109         PR fortran/47768
110         * module.c (ab_attribute,attr_bits): Add AB_PROC_POINTER_COMP.
111         (mio_symbol_attribute): Handle attribute 'proc_pointer_comp'.
113 2011-03-06  Paul Thomas  <pault@gcc.gnu.org>
114             Jerry DeLisle  <jvdelisle@gcc.gnu.org>
116         PR fortran/47850
117         * expr.c (gfc_is_constant_expr): Only use gfc_constant_ac if
118         the expression has an iterator.  Otherwise, iterate through the
119         array, checking for constant expressions for each element.
121 2011-03-04  Janne Blomqvist  <jb@gcc.gnu.org>
123         PR libfortran/47802
124         * intrinsic.texi: Update CTIME and FDATE documentation.
126 2011-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
128         * invoke.texi (Option Summary, Fortran Dialect Options)
129         (Preprocessing Options, Runtime Options, Code Gen Options):
130         Fix vertical list spacing by using @itemx for additinoal
131         items, empty line before @table.  Fix typos.
133 2011-02-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
135         PR fortran/47894
136         * intrinsic.texi: Fix doc of the VERIFY intrinsic.
138 2011-02-26  Tobias Burnus  <burnus@net-b.de>
140         PR fortran/47846
141         * trans-stmt.c (gfc_trans_allocate): Fix allocation with
142         type-spec of deferred-length strings.
144 2011-02-26  Tobias Burnus  <burnus@net-b.de>
146         PR fortran/47886
147         * openmp.c (gfc_resolve_omp_directive): Resolve if()
148         condition of OpenMP's task.
150 2011-02-26  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
152         PR fortran/47894
153         * intrinsic.texi: Fix doc of the VERIFY intrinsic.
155 2011-02-24  Tobias Burnus  <burnus@net-b.de>
157         PR fortran/47872
158         * intrinsic.texi (ALLOCATED, ATAN, BESSEL_JN, BESSEL_YN): Add
159         multitable for linebreak between different syntax variants.
161 2011-02-24  Richard Guenther  <rguenther@suse.de>
163         PR fortran/47839
164         * f95-lang.c (pushdecl): For externs in non-global scope push
165         a copy of the decl into the BLOCK.
167 2011-02-23  Mikael Morin  <mikael@gcc.gnu.org>
169         PR fortran/40850
170         * trans.c (gfc_prepend_expr_to_block): New function.
171         * trans.h (gfc_prepend_expr_to_block): Declare.
172         * trans-array.c (gfc_conv_array_parameter): Replace
173         gfc_add_expr_to_block with gfc_prepend_expr_to_block.
175 2011-02-22  Paul Thomas  <pault@gcc.gnu.org>
177         PR fortran/45743
178         * trans-decl.c (gfc_get_extern_function_decl): Don't use the
179         gsymbol backend_decl if the procedure has a formal argument
180         that is a procedure.
182 2011-02-22  Tobias Burnus  <burnus@net-b.de>
184         PR fortran/41359
185         * trans-stmt.c (gfc_trans_if_1): Use correct line for
186         expressions in the if condition.
188 2011-02-20  Tobias Burnus  <burnus@net-b.de>
190         PR fortran/47797
191         * trans-decl.c (gfc_trans_deferred_vars): Use gfc_set_backend_locus and
192         gfc_restore_backend_locus to have better debug locations.
193         * trans-array.c (gfc_trans_deferred_array): Ditto.
195 2011-02-20  Paul Thomas  <pault@gcc.gnu.org>
197         PR fortran/45077
198         PR fortran/44945
199         * trans-types.c (gfc_get_derived_type): Remove code that looks
200         for decls in gsym and add call to gfc_get_module_backend_decl.
201         * trans.h : Add prototype for gfc_get_module_backend_decl.
202         * trans-decl.c (gfc_get_module_backend_decl): New function.
203         (gfc_get_symbol_decl): Call it.
205 2011-02-19  Paul Thomas  <pault@gcc.gnu.org>
207         PR fortran/47348
208         * trans-array.c (get_array_ctor_all_strlen): Move up in file.
209         (get_array_ctor_var_strlen): Add block dummy and add call to
210         get_array_ctor_all_strlen instead of giving up on substrings.
211         Call gcc_unreachable for default case.
212         (get_array_ctor_strlen): Add extra argument to in call to
213         get_array_ctor_var_strlen.
215 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
217         PR fortran/47789
218         * primary.c (gfc_match_structure_constructor): Handle empty parent
219         types.
221 2011-02-18  Tobias Burnus
223         PR fortran/47775
224         * trans-expr.c (arrayfunc_assign_needs_temporary): Use
225         esym to check whether the specific procedure returns an
226         allocatable or pointer.
228 2011-02-18  Michael Matz  <matz@suse.de>
230         PR fortran/45586
231         * gfortran.h (struct gfc_component): Add norestrict_decl member.
232         * trans.h (struct lang_type): Add nonrestricted_type member.
233         * trans-expr.c (gfc_conv_component_ref): Search fields with correct
234         parent type.
235         * trans-types.c (mirror_fields, gfc_nonrestricted_type): New.
236         (gfc_sym_type): Use it.
238 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
240         PR fortran/47768
241         * resolve.c (resolve_transfer): Reject variables with procedure pointer
242         components.
244 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
246         PR fortran/47767
247         * gfortran.h (gfc_check_access): Removed prototype.
248         (gfc_check_symbol_access): Added prototype.
249         * module.c (gfc_check_access): Renamed to 'check_access', made static.
250         (gfc_check_symbol_access): New function, basically a shortcut for
251         'check_access'.
252         (write_dt_extensions,write_symbol0,write_generic,write_symtree): Use
253         'gfc_check_symbol_access'.
254         (write_operator,write_module): Renamed 'gfc_check_access'.
255         * resolve.c (resolve_fl_procedure,resolve_fl_derived,
256         resolve_fl_namelist,resolve_symbol,resolve_fntype): Use
257         'gfc_check_symbol_access'.
259 2011-02-16  Janus Weil  <janus@gcc.gnu.org>
261         PR fortran/47745
262         * class.c (gfc_build_class_symbol): Set 'class_ok' attribute.
263         * decl.c (build_sym,attr_decl1): Move setting of 'class_ok' into
264         'gfc_build_class_symbol'.
265         (gfc_match_decl_type_spec): Reject unlimited polymorphism.
266         * interface.c (matching_typebound_op): Check for 'class_ok' attribute.
267         * match.c (select_type_set_tmp): Move setting of 'class_ok' into
268         'gfc_build_class_symbol'.
269         * primary.c (gfc_variable_attr): Check for 'class_ok' attribute.
271 2011-02-15  Steven G. Kargl  <kargl@gcc.gnu.org>
273         PR fortran/47633
274         . simplify.c (gfc_simplify_compiler_version): Fix off-by-one issue.
276 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
278         PR fortran/47730
279         * parse.c (gfc_build_block_ns): Commit 'block@' symbol.
281 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
283         PR fortran/47728
284         * class.c (gfc_build_class_symbol): Give a fatal error on polymorphic
285         arrays.
286         * primary.c (gfc_match_varspec): Avoid ICE for invalid class
287         declaration.
289 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
291         PR fortran/47349
292         * interface.c (get_expr_storage_size): Handle derived-type components.
294 2011-02-13  Tobias Burnus  <burnus@net-b.de>
296         PR fortran/47569
297         * interface.c (compare_parameter): Avoid ICE with
298         character components.
300 2011-02-12  Janus Weil  <janus@gcc.gnu.org>
302         * class.c (gfc_build_class_symbol): Reject polymorphic arrays.
303         * decl.c (build_sym,build_struct,attr_decl1): Use return value of
304         'gfc_build_class_symbol'.
306 2011-02-12  Michael Matz  <matz@suse.de>
307             Janus Weil  <janus@gcc.gnu.org>
308             Tobias Burnus  <burnus@net-b.de>
310         PR fortran/45586
311         * trans-expr.c (conv_parent_component_references): Avoid unintendent
312         skipping of parent compounds.
314 2011-02-11  Tobias Burnus  <burnus@net-b.de>
316         PR fortran/47550
317         * resolve.c (resolve_formal_arglist): PURE with VALUE
318         and no INTENT: Add -std= diagnostics.
320 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
322         PR fortran/47352
323         * resolve.c (resolve_procedure_interface): If interface has a result
324         variable, copy the typespec and set result pointer to self.
326 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
328         PR fortran/47463
329         * resolve.c (resolve_typebound_subroutine): Remove erroneous line.
331 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
333         PR fortran/47637
334         * trans-decl.c (init_intent_out_dt): Handle CLASS arguments.
336 2011-02-08  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
338         * io.c (match_io_element): Do not set dt if not inquire.
340 2011-02-08  Janus Weil  <janus@gcc.gnu.org>
342         PR fortran/45290
343         * expr.c (gfc_check_assign_symbol): Reject pointers as pointer
344         initialization target.
346 2011-02-07  Janne Blomqvist  <jb@gcc.gnu.org>
347             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
349         * gfortran.texi (Thread-safety): texinfo styling fixes.
350         * intrinsic.texi: Likewise.
352 2011-02-06  Janne Blomqvist  <jb@gcc.gnu.org>
354         * gfortran.texi (Compiler Characteristics): Add reference to
355         thread-safety section.
357 2011-02-06  Janne Blomqvist  <jb@gcc.gnu.org>
359         * gfortran.texi (Thread-safety): New section.
360         * intrinsic.texi (EXECUTE_COMMAND_LINE): Mention thread-safety.
361         (GETENV): Likewise.
362         (GET_ENVIRONMENT_VARIABLE): Likewise.
363         (SYSTEM): Likewise.
365 2011-02-06  Paul Thomas  <pault@gcc.gnu.org>
367         PR fortran/47592
368         * trans-stmt.c (gfc_trans_allocate): For deferred character
369         length allocations with SOURCE, store to the values and string
370         length to avoid calculating twice.  Replace gfc_start_block
371         with gfc_init_block to avoid unnecessary contexts and to keep
372         declarations of temporaries where they should be. Tidy up the
373         code a bit.
375 2011-02-05  Janne Blomqvist  <jb@gcc.gnu.org>
377         PR fortran/42434
378         * intrinsic.texi (SYSTEM_CLOCK): Update documentation.
380 2011-02-02  Janus Weil  <janus@gcc.gnu.org>
381             Paul Thomas  <pault@gcc.gnu.org>
383         PR fortran/47082
384         * trans-expr.c (gfc_trans_class_init_assign): Add call to
385         gfc_get_derived_type.
386         * module.c (read_cleanup): Do not use unique_symtrees for vtabs
387         or vtypes.
389 2011-02-02  Janus Weil  <janus@gcc.gnu.org>
391         PR fortran/47572
392         * resolve.c (resolve_fl_variable): Handle polymorphic allocatables.
394 2011-02-01  Janus Weil  <janus@gcc.gnu.org>
396         PR fortran/47565
397         * trans-expr.c (gfc_conv_structure): Handle constructors for procedure
398         pointer components with allocatable result.
400 2011-01-31  Janus Weil  <janus@gcc.gnu.org>
402         PR fortran/47455
403         * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointers
404         with pointer or allocatable result.
406 2011-01-31  Paul Thomas  <pault@gcc.gnu.org>
408         PR fortran/47519
409         * trans-stmt.c (gfc_trans_allocate): Improve handling of
410         deferred character lengths with SOURCE.
411         * iresolve.c (gfc_resolve_repeat): Calculate character
412         length from source length and ncopies.
413         * dump-parse-tree.c (show_code_node): Show MOLD and SOURCE
414         expressions for ALLOCATE.
416 2011-01-31  Janus Weil  <janus@gcc.gnu.org>
418         PR fortran/47463
419         * resolve.c (resolve_typebound_subroutine): Bug fix for the case of
420         an argument of a typebound assignment being a component.
422 2011-01-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
424         * gfortranspec.c (add_arg_libgfortran) [HAVE_LD_STATIC_DYNAMIC] Use
425         LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
427 2011-01-31  Tobias Burnus  <burnus@net-b.de>
429         PR fortran/47042
430         * resolve.c (resolve_fl_procedure): Reject stmt functions
431         with pointer/allocatable attribute.
433 2011-01-31  Tobias Burnus  <burnus@net-b.de>
435         PR fortran/47042
436         * interface.c (gfc_procedure_use): Add explicit interface check for
437         pointer/allocatable functions.
439 2011-01-30  Paul Thomas  <pault@gcc.gnu.org>
441         PR fortran/47523
442         * trans-expr.c (gfc_trans_assignment_1): If the rhs is an op
443         expr and is assigned to a deferred character length scalar,
444         make sure that the function is called before reallocation,
445         so that the length is available. Include procedure pointer
446         and procedure pointer component rhs as well.
448         PR fortran/45170
449         PR fortran/35810
450         PR fortran/47350
451         * gfortran.dg/allocatable_function_5.f90: New test not added by
452         mistake on 2011-01-28.
454 2011-01-29  Tobias Burnus  <burnus@net-b.de>
456         PR fortran/47531
457         * check.c (gfc_check_shape): Support kind argument in SHAPE.
458         * intrinsic.c (add_functions): Ditto.
459         * resolve.c (gfc_resolve_shape): Ditto.
460         * simplify.c (gfc_simplify_shape): Ditto.
461         * intrinsic.h (gfc_check_shape, gfc_resolve_shape,
462         gfc_simplify_shape): Update prototypes.
463         * intrinisc.text (SHAPE): Document kind argument.
465 2011-01-28  Tobias Burnus  <burnus@net-b.de>
467         PR fortran/47507
468         * resolve.c (resolve_formal_arglist): Allow arguments with VALUE
469         attribute also without INTENT.
471 2011-01-28  Tobias Burnus  <burnus@net-b.de>
473         * gfortran.texi (Fortran 2003 status): Mention support for
474         nonconstant namelist variables.
476 2011-01-28  Paul Thomas  <pault@gcc.gnu.org>
477             Tobias Burnus  <burnus@gcc.gnu.org>
479         PR fortran/45170
480         PR fortran/35810
481         PR fortran/47350
482         * interface.c (compare_actual_formal): An allocatable or pointer
483         deferred length actual is only allowed if the formal argument
484         is also deferred length. Clean up whitespace.
485         * trans-expr.c (gfc_conv_procedure_call): Pass string length for
486         deferred character length formal arguments by reference. Do the
487         same for function results.
488         (gfc_trans_pointer_assignment): Do not do runtime check of lhs
489         and rhs character lengths, if deferred length lhs.  In this case
490         set the lhs character length to that of the rhs.
491         (gfc_conv_string_parameter): Remove assert that string length is
492         an integer type.
493         (is_scalar_reallocatable_lhs): New function.
494         (alloc_scalar_allocatable_for_assignment): New function.
495         (gfc_trans_assignment_1): Call above new function. If the rhs is
496         a deferred character length itself, makes ure that the function
497         is called before reallocation, so that the length is available.
498         (gfc_trans_asssignment): Remove error about assignment to
499         deferred length character variables.
500         * gfortran.texi : Update entry about (re)allocation on
501         assignment.
502         * trans-stmt.c (gfc_trans_allocate): Add code to handle deferred
503         length character variables.
504         * module.c (mio_typespec): Transfer deferred characteristic.
505         * trans-types.c (gfc_get_function_type): New code to generate
506         hidden typelist, so that those character lengths that are
507         passed by reference get the right type.
508         * resolve.c (resolve_contained_fntype): Supress error for
509         deferred character length functions.
510         (resolve_function, resolve_fl_procedure) The same.
511         (check_symbols): Remove the error that support for
512         entity with deferred type parameter is not yet implemented.
513         (resolve_fl_derived): The same.
514         match.c (alloc_opt_list): Allow MOLD for deferred length object.
515         * trans-decl.c (gfc_get_symbol_decl): For deferred character
516         length dummies, generate a local variable for string length.
517         (create_function_arglist): Hidden length can be a pointer.
518         (gfc_trans_deferred_vars): For deferred character length
519         results and dummies, assign the string length to the local
520         variable from the hidden argument on entry and the other way
521         round on exit, as appropriate.
523 2011-01-27  Tobias Burnus  <burnus@net-b.de>
525         PR fortran/47474
526         * trans-decl.c (gfc_generate_function_code): Fix init
527         of allocatable result variable with allocatable components.
529 2011-01-27  Tobias Burnus  <burnus@net-b.de>
531         PR fortran/47472
532         * options.c (gfc_handle_module_path_options): Save
533         module path without trailing slash as include path.
535 2011-01-25  Tobias Burnus  <burnus@net-b.de>
537         PR fortran/47448
538         * interface.c (gfc_check_operator_interface): Fix
539         defined-assignment check.
541 2011-01-23  Tobias Burnus  <burnus@net-b.de>
543         PR fortran/47421
544         * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
545         scalar allocatable dummy arguments.
547 2011-01-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
549         PR fortran/38536
550         * resolve.c (gfc_iso_c_func_interface):  For C_LOC,
551         check for array sections followed by component references
552         which are illegal.  Also check for coindexed arguments.
554 2011-01-22  Tobias Burnus  <burnus@net-b.de>
556         PR fortran/47399
557         * primary.c (gfc_match_varspec): Relax gcc_assert to allow for
558         PARAMETER TBP.
560 2011-01-21  Tobias Burnus  <burnus@net-b.de>
562         PR fortran/47394
563         * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check):
564         Use defined instead of magic number exit status codes.
565         * scanner.c (include_line, gfc_new_file): Ditto.
567 2011-01-21  Tobias Burnus  <burnus@net-b.de>
569         PR fortran/47377
570         * expr.c (gfc_check_pointer_assign): Reject expr data-targets
571         without pointer attribute.
573 2011-01-18  Janus Weil  <janus@gcc.gnu.org>
575         PR fortran/47240
576         * resolve.c (expression_rank): Fix rank of procedure poiner components.
577         * trans-expr.c (gfc_conv_procedure_call): Take care of procedure
578         pointer components as actual arguments.
580 2011-01-17  Jakub Jelinek  <jakub@redhat.com>
582         PR fortran/47331
583         * gfortran.h (struct gfc_omp_saved_state): New type.
584         (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New prototypes.
585         * resolve.c (resolve_global_procedure): Call it around gfc_resolve
586         call.
587         * openmp.c (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New
588         functions.
590 2011-01-17  Tobias Burnus  <burnus@net-b.de>
592         PR fortran/47327
593         * invoke.texi (Options to request or suppress errors
594         and warnings): Fix cross link.
596 2011-01-15  Tobias Burnus  <burnus@net-b.de>
598         * gfortran.texi: Update Fortran 2003 Status section.
600         PR fortran/47177
601         * invoke.texi: Add missing "-E" to the -dM example.
603 2011-01-13  Tobias Burnus  <burnus@net-b.de>
605         PR fortran/47268
606         * intrinsic.texi (get_command_argument, get_environment_variable):
607         Mark arguments as optional in the Arguments section.
609 2011-01-13  Kai Tietz  <kai.tietz@onevision.com>
610             Tobias Burnus  <burnus@net-b.de>
612         PR fortran/47260
613         * trans-decl.c (gfc_get_extern_function_decl,
614         build_function_decl): Set TREE_PUBLIC/TREE_EXTERNAL before
615         calling decl_attributes.
617 2011-01-13  Tobias Burnus  <burnus@net-b.de>
618             Mikael Morin  <mikael@gcc.gnu.org>
620         PR fortran/45848
621         PR fortran/47204
622         * gfortran.h (gfc_code): Move union ext's case_list into
623         the struct block.
624         * dump-parse-tree.c (show_code_node): Adapt by prefixing case_list
625         by "block.".
626         * frontend-passes.c (gfc_code_walker): Ditto.
627         * match.c (gfc_match_goto, gfc_match_call, gfc_match_case,
628         gfc_match_type_is, gfc_match_class_is): Ditto.
629         * resolve.c (resolve_select, resolve_select_type): Ditto.
630         * st.c (gfc_free_statement): Ditto.
631         * trans-stmt.c (gfc_trans_integer_select, gfc_trans_logical_select,
632         gfc_trans_character_select): Ditto.
633         * parse.c (resolve_all_program_units): For error recovery, avoid
634         segfault is proc_name is NULL.
636 2011-01-11  Paul Thomas  <pault@gcc.gnu.org>
638         PR fortran/47051
639         * trans-array.c (gfc_alloc_allocatable_for_assignment): Change
640         to be standard compliant by testing for shape rather than size
641         before skipping reallocation. Improve comments.
643 2011-01-09  Janus Weil  <janus@gcc.gnu.org>
645         PR fortran/47224
646         * resolve.c (resolve_actual_arglist): Remove unneeded and buggy piece
647         of code.
649 2011-01-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
651         PR fortran/38536
652         * resolve.c (is_scalar_expr_ptr):  For a substring reference,
653         use gfc_dep_compare_expr to compare start and end expession.
654         Add FIXME for using gfc_deb_compare_expr elsewhere.
656 2011-01-09  Janus Weil  <janus@gcc.gnu.org>
658         PR fortran/46313
659         * class.c (get_unique_type_string): Make type name start with upper
660         case letter.
662 2011-01-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
664         PR fortran/46405
665         * invoke.texi:  Mention -ffree-line-length-none and
666         -ffixed-line-length-none for preprocessing.
668 2011-01-08  Paul Thomas  <pault@gcc.gnu.org>
670         PR fortran/46896
671         * trans-expr.c (gfc_conv_procedure_call): With a non-copying
672         procedure argument (eg TRANSPOSE) use a temporary if there is
673         any chance of aliasing due to host or use association.
674         (arrayfunc_assign_needs_temporary): Correct logic for function
675         results and do not use a temporary for implicitly PURE
676         variables.  Use a temporary for Cray pointees.
677         * symbol.c (gfc_add_save): Explicit SAVE not compatible with
678         implicit pureness of containing procedure.
679         * decl.c (match_old_style_init, gfc_match_data): Where decl
680         would fail in PURE procedure, set implicit_pure to zero.
681         * gfortran.h : Add implicit_pure to structure symbol_attr and
682         add prototype for function gfc_implicit_pure.
683         * expr.c (gfc_check_pointer_assign, gfc_check_vardef_context):
684         Where decl would fail in PURE procedure, reset implicit_pure.
685         * io.c (match_vtag, gfc_match_open, gfc_match_close,
686         gfc_match_print, gfc_match_inquire, gfc_match_wait): The same.
687         * match.c (gfc_match_critical, gfc_match_stopcode,
688         sync_statement, gfc_match_allocate, gfc_match_deallocate): The
689         same.
690         * parse.c (decode_omp_directive): The same.
691         (parse_contained): If not PURE, set implicit pure attribute.
692         * resolve.c (resolve_formal_arglist, resolve_structure_cons,
693         resolve_function, resolve_ordinary_assign) : The same.
694         (gfc_implicit_pure): New function.
695         * module.c (mio_symbol_attribute): Introduce AB_IMPLICIT_PURE
696         to ab_attribute enum and use it in this function.
698 2011-01-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
700         PR fortran/45777
701         * symbol.c (gfc_symbols_could_alias):  Strip gfc_ prefix,
702         make static and move in front of its only caller, to ...
703         * trans-array.c (symbols_could_alias): ... here.
704         Pass information about pointer and target status as
705         arguments.  Allocatable arrays don't alias anything
706         unless they have the POINTER attribute.
707         (gfc_could_be_alias):  Keep track of pointer and target
708         status when following references.  Also check if typespecs
709         of components match those of other components or symbols.
711 2011-01-07  Tobias Burnus  <burnus@net-b.de>
713         PR fortran/41580
714         * class.c (gfc_build_class_symbol): Mark __vtab as attr.vtab.
715         * intrinsic.c (add_functions): Use simplify functions for
716         EXTENDS_TYPE_OF and SAME_TYPE_AS.
717         * intrinsic.h (gfc_simplify_extends_type_of,
718         gfc_simplify_same_type_as): New prototypes.
719         * simplify.c (is_last_ref_vtab, gfc_simplify_extends_type_of,
720         gfc_simplify_same_type_as): New functions.
722 2011-01-07  Janus Weil  <janus@gcc.gnu.org>
724         PR fortran/47189
725         PR fortran/47194
726         * gfortran.h (gfc_lval_expr_from_sym): Moved prototype.
727         * class.c (gfc_class_null_initializer): Initialize _vptr to declared
728         type.
729         * expr.c (gfc_lval_expr_from_sym): Moved here from symbol.c.
730         * resolve.c (resolve_deallocate_expr): _data component will be added
731         at translation stage.
732         * symbol.c (gfc_lval_expr_from_sym): Moved to expr.c.
733         * trans-stmt.c (gfc_trans_deallocate): Reset _vptr to declared type.
735 2011-01-06  Daniel Franke  <franke.daniel@gmail.com>
737         PR fortran/33117
738         PR fortran/46478
739         * parse.c (parse_interface): Remove check for procedure types.
740         * interface.c (check_interface0): Verify that procedures are
741         either all SUBROUTINEs or all FUNCTIONs.
743 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
745         PR fortran/47180
746         * trans-expr.c (gfc_trans_class_assign): Bugfix for r168524 (make sure
747         'vtab' is initialized).
749 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
751         PR fortran/47180
752         * trans-expr.c (gfc_trans_class_assign): For a polymorphic NULL pointer
753         assignment, set the _vptr component to the declared type.
755 2011-01-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
757         PR fortran/46017
758         * resolve.c (resolve_allocate_deallocate): Follow references to
759         check for duplicate occurence of allocation/deallocation objects.
761 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
763         PR fortran/47024
764         * trans-decl.c (gfc_trans_deferred_vars): Initialize the _vpr component
765         of polymorphic allocatables according to their declared type.
767 2011-01-04  Janus Weil  <janus@gcc.gnu.org>
769         PR fortran/46448
770         * class.c (gfc_find_derived_vtab): Set the module field for the copying
771         routine to make sure it receives module name mangling.
773 2011-01-03  Jakub Jelinek  <jakub@redhat.com>
775         * gfortranspec.c (lang_specific_driver): Update copyright notice
776         dates.
778 2011-01-03  Janus Weil  <janus@gcc.gnu.org>
780         * intrinsic.texi (LEADZ): Fix example.
782 2011-01-02  Janus Weil  <janus@gcc.gnu.org>
784         PR fortran/46408
785         * class.c (gfc_find_derived_vtab): Use EXEC_INIT_ASSIGN for __copy_
786         routine.
789 Copyright (C) 2011 Free Software Foundation, Inc.
791 Copying and distribution of this file, with or without modification,
792 are permitted in any medium without royalty provided the copyright
793 notice and this notice are preserved.