* ChangeLog: Fix entry.
[official-gcc.git] / gcc / fortran / ChangeLog
blobcf74c46933e25f7bb360905a746f0205e0b0e6b5
1 2011-12-19  Tobias Burnus  <burnus@net-b.de>
3         PR fortran/51605
4         * parse.c (gfc_fixup_sibling_symbols): Regard FL_LABEL as
5         local symbol.
7 2011-12-19  Tobias Burnus  <burnus@net-b.de>
9         PR fortran/51605
10         * match.c (gfc_match_select_type): Handle
11         scalar polymophic coarrays.
12         (select_type_set_tmp, ): Ditto; avoid segfault if !class_ok.
13         * primary.c (gfc_match_rvalue): Avoid segfault if !class_ok.
14         * resolve.c (resolve_select_type): Ditto.
15         (resolve_assoc_var): Fix setting the TARGET attribute for
16         polymorphic selectors which are pointers.
18 2011-12-19  Tobias Burnus  <burnus@net-b.de>
20         * check.c (coarray_check): Add class ref if needed.
21         * resolve.c (resolve_fl_var_and_proc,
22         resolve_fl_derived0, resolve_symbol): Fix checking
23         for BT_CLASS.
25 2011-12-15  Paul Thomas  <pault@gcc.gnu.org>
27         * trans-expr.c (gfc_walk_function_expr): Detect elemental
28         procedure components as well as elemental procedures.
29         * trans-array.c (gfc_conv_procedure_call): Ditto.
30         * trans-decl.c (gfc_trans_deferred_vars): Correct erroneous
31         break for class pointers to continue.
33 2011-12-15  Toon Moene  <toon@moene.org>
35         PR fortran/51310
36         * resolve.c (build_default_init_expr): Allow non-allocatable,
37         non-compile-time-constant-shape arrays to have a default
38         initializer.
39         * invoke.texi: Delete the restriction on automatic arrays not
40         being initialized by -finit-<type>=<constant>.
42 2011-12-15  Tobias Burnus  <burnus@net-b.de>
44         PR fortran/51550
45         PR fortran/47545
46         PR fortran/49050
47         PR fortran/51075        
48         * resolve.c (resolve_fl_derived0): Print not-implemented error
49         for deferred-length character components.
51 2011-12-15  Tobias Burnus  <burnus@net-b.de>
53         * primary.c (gfc_match_varspec): Match array spec for
54         polymorphic coarrays.
55         (gfc_match_rvalue): If a symbol of unknown flavor has a
56         codimension, mark it as a variable.
57         * simplify.c (gfc_simplify_image_index): Directly call
58         simplify_cobound.
59         * trans-intrinsic.c (trans_this_image): Fix handling of
60         corank = 1 arrays.
62 2011-12-15  Jakub Jelinek  <jakub@redhat.com>
64         PR debug/51517
65         * trans-decl.c (gfc_get_symbol_decl): Don't set DECL_INITAL on span.
66         (gfc_trans_deferred_vars): Instead add its runtime initialization
67         here.
69 2011-12-11  Tobias Burnus  <burnus@net-b.de>
71         PR fortran/50923
72         * trans-decl.c (generate_local_decl): Set TREE_NO_WARNING only
73         if the front end has printed a warning.
74         (gfc_generate_function_code): Fix unset-result warning.
76 2011-12-11  Paul Thomas  <pault@gcc.gnu.org>
77         Tobias Burnus  <burnus@gcc.gnu.org>
79         PR fortran/41539
80         PR fortran/43214
81         PR fortran/43969
82         PR fortran/44568
83         PR fortran/46356
84         PR fortran/46990
85         PR fortran/49074
86         * interface.c (symbol_rank): Return the rank of the _data
87         component of class objects.
88         (compare_parameter): Also compare the derived type of the class
89         _data component for type mismatch.  Similarly, return 1 if the
90         formal and _data ranks match.
91         (compare_actual_formal): Do not compare storage sizes for class
92         expressions. It is an error if an actual class array, passed to
93         a formal class array is not full.
94         * trans-expr.c (gfc_class_data_get, gfc_class_vptr_get,
95         gfc_vtable_field_get, gfc_vtable_hash_get, gfc_vtable_size_get,
96         gfc_vtable_extends_get, gfc_vtable_def_init_get,
97         gfc_vtable_copy_get): New functions for class API.
98         (gfc_conv_derived_to_class): For an array reference in an
99         elemental procedure call retain the ss to provide the
100         scalarized array reference. Moved in file.
101         (gfc_conv_class_to_class): New function.
102         (gfc_conv_subref_array_arg): Use the type of the
103         class _data component as a basetype.
104         (gfc_conv_procedure_call): Ensure that class array expressions
105         have both the _data reference and an array reference. Use 
106         gfc_conv_class_to_class to handle class arrays for elemental
107         functions in scalarized loops, class array elements and full
108         class arrays. Use a call to gfc_conv_subref_array_arg in order
109         that the copy-in/copy-out for passing class arrays to derived
110         type arrays occurs correctly.
111         (gfc_conv_expr): If it is missing, add the _data component
112         between a class object or component and an array reference.
113         (gfc_trans_class_array_init_assign): New function.
114         (gfc_trans_class_init_assign): Call it for array expressions.
115         * trans-array.c (gfc_add_loop_ss_code): Do not use a temp for
116         class scalars since their size will depend on the dynamic type.
117         (build_class_array_ref): New function.
118         (gfc_conv_scalarized_array_ref): Call build_class_array_ref.
119         (gfc_array_init_size): Add extra argument, expr3, that represents
120         the SOURCE argument. If present,use this for the element size.
121         (gfc_array_allocate): Also add argument expr3 and use it when
122         calling gfc_array_init_size.
123         (structure_alloc_comps): Enable class arrays.
124         * class.c (gfc_add_component_ref): Carry over the derived type
125         of the _data component.
126         (gfc_add_class_array_ref): New function.
127         (class_array_ref_detected): New static function.
128         (gfc_is_class_array_ref): New function that calls previous.
129         (gfc_is_class_scalar_expr): New function.
130         (gfc_build_class_symbol): Throw not implemented error for
131         assumed size class arrays.  Remove error that prevents
132         CLASS arrays.
133         (gfc_build_class_symbol): Prevent pointer/allocatable conflict.
134         Also unset codimension.
135         (gfc_find_derived_vtab): Make 'copy' elemental and set the
136         intent of the arguments accordingly.: 
137         * trans-array.h: Update prototype for gfc_array_allocate.
138         * array.c (gfc_array_dimen_size): Return failure if class expr.
139         (gfc_array_size): Likewise.
140         * gfortran.h: New prototypes for gfc_add_class_array_ref,
141         gfc_is_class_array_ref and gfc_is_class_scalar_expr.
142         * trans-stmt.c (trans_associate_var): Exclude class targets
143         from test. Move the allocation of the _vptr to an earlier time
144         for class objects.
145         (trans_associate_var): Assign the descriptor directly for class
146         arrays.
147         (gfc_trans_allocate): Add expr3 to gfc_array_allocate arguments.
148         Convert array element references into sections. Do not invoke
149         gfc_conv_procedure_call, use gfc_trans_call instead.
150         * expr.c (gfc_get_corank): Fix for BT_CLASS.
151         (gfc_is_simply_contiguous): Exclude class from test.
152         * trans.c (gfc_build_array_ref): Include class array refs.
153         * trans.h: Include prototypes for class API functions that are
154         new in trans-expr. Define GFC_DECL_CLASS(node).
155         * resolve.c (check_typebound_baseobject ): Remove error for
156         non-scalar base object.
157         (resolve_allocate_expr): Ensure that class _data component is
158         present. If array, call gfc_expr_to_intialize.
159         (resolve_select): Remove scalar error for SELECT statement as a
160         temporary measure.
161         (resolve_assoc_var): Update 'target' (aka 'selector') as
162         needed. Ensure that the target expression has the right rank.
163         (resolve_select_type): Ensure that target expressions have a
164         valid locus.
165         (resolve_allocate_expr, resolve_fl_derived0): Fix for BT_CLASS.
166         * trans-decl.c (gfc_get_symbol_decl): Set GFC_DECL_CLASS, where
167         appropriate.
168         (gfc_trans_deferred_vars): Get class arrays right.
169         * match.c(select_type_set_tmp): Add array spec to temporary.
170         (gfc_match_select_type): Allow class arrays.
171         * check.c (array_check): Ensure that class arrays have refs.
172         (dim_corank_check, dim_rank_check): Retrun success if class.
173         * primary.c (gfc_match_varspec): Fix for class arrays and
174         co-arrays. Make sure that class _data is present.
175         (gfc_match_rvalue): Handle class arrays.
176         *trans-intrinsic.c (gfc_conv_intrinsic_size): Add class array
177         reference.
178         (gfc_conv_allocated): Add _data component to class expressions.
179         (gfc_add_intrinsic_ss_code): ditto.
180         * simplify.c (simplify_cobound): Fix for BT_CLASS.
181         (simplify_bound): Return NULL for class arrays.
182         (simplify_cobound): Obtain correct array_spec. Use cotype as
183         appropriate. Use arrayspec for bounds.
185 2011-12-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
187         PR fortran/50690
188         * frontend-passes.c (in_omp_workshare):  New variable.
189         (cfe_expr_0):  Don't eliminiate common function if it would put
190         the variable immediately into a WORKSHARE construct.
191         (optimize_namespace):  Set in_omp_workshare.
192         (gfc_code_walker):  Keep track of OMP PARALLEL and OMP WORKSHARE
193         constructs.
195 2011-12-10  Tobias Burnus  <burnus@net-b.de>
197         * trans-decl.c (add_argument_checking): Fix syntax.
199 2011-12-10  Tobias Burnus  <burnus@net-b.de>
200             Kai Tietz  <ktietz@redhat.com>
202         * trans-decl.c (add_argument_checking): Check ts.deferred earlier.
203         * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use %ld with long.
205 2011-12-08  Tobias Burnus  <burnus@net-b.de>
207         PR fortran/50815
208         * trans-decl.c (add_argument_checking): Skip bound checking
209         for deferred-length strings.
211 2011-12-08  Tobias Burnus  <burnus@net-b.de>
213         PR fortran/51378
214         * symbol.c (gfc_find_component): Fix access check of parent
215         components.
217 2011-12-08  Tobias Burnus  <burnus@net-b.de>
219         PR fortran/51407
220         * io/transfer.c (require_numeric_type): New function.
221         (formatted_transfer_scalar_read, formatted_transfer_scalar_write):
222         Use it, allow BOZ edit descriptors with F2008.
224 2011-12-08  Tobias Burnus  <burnus@net-b.de>
226         PR fortran/51448
227         * fortran/trans-array.c (get_std_lbound): Fix handling of
228         conversion functions.
230 2011-12-08  Toon Moene  <toon@moene.org>
232         PR fortran/51310
233         * invoke.texi: Itemize the cases for which
234         -finit-<type>=<constant> doesn't work.
236 2011-12-06  Tobias Burnus  <burnus@net-b.de>
238         PR fortran/51435
239         * expr.c (gfc_has_default_initializer): Fix handling of
240         DT with initialized pointer components.
242 2011-12-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
244         PR fortran/51338
245         * dependency.c (are_identical_variables):  Handle case where
246         end fields of substring references are NULL.
248 2011-12-04  Tobias Burnus  <burnus@net-b.de>
250         PR fortran/51383
251         * resolve.c (find_array_spec): Use ref->u.c.component
252         directly without starting from ts.u.derived.
254 2011-12-03  Tobias Burnus  <burnus@net-b.de>
256         PR fortran/48887
257         * match.c (select_type_set_tmp): Don't set allocatable/pointer
258         attribute.
259         * class.c (gfc_build_class_symbol): Handle
260         attr.select_type_temporary.
262 2011-12-03  Tobias Burnus  <burnus@net-b.de>
264         PR fortran/50684
265         * check.c (variable_check): Fix intent(in) check.
267 2011-12-03  Tobias Burnus  <burnus@net-b.de>
269         * check.c (gfc_check_move_alloc): Allow nonpolymorphic
270         FROM with polymorphic TO.
271         * trans-intrinsic.c (conv_intrinsic_move_alloc): Handle
272         nonpolymorphic FROM with polymorphic TO.
274 2011-12-01  Janne Blomqvist  <jb@gcc.gnu.org>
276         * module.c (dt_lower_string): Make static.
277         (dt_upper_string): Likewise.
279 2011-12-01  Janne Blomqvist  <jb@gcc.gnu.org>
281         PR fortran/25708
282         * module.c (parse_string): Read string into resizable array
283         instead of parsing twice and seeking.
284         (peek_atom): New implementation avoiding seeks.
285         (require_atom): Save and set column and line explicitly for error
286         handling.
288 2011-12-01  Janne Blomqvist  <jb@gcc.gnu.org>
290         * misc.c (gfc_open_file): Don't call stat.
292 2011-11-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
294         PR fortran/40958
295         * module.c (prev_module_line):  New variable.
296         (prev_module_column):  New variable.
297         (prev_character):  New variable.
298         (module_char):  Update the new variables.
299         (module_unget_char):  New function.
300         (parse_string):  Use module_unget_char.
301         (parse_integer):  Likewise.
302         (parse_name):  Likewise.
304 2011-11-29  Tobias Burnus  <burnus@net-b.de>
306         PR fortran/51306
307         PR fortran/48700
308         * check.c (gfc_check_move_alloc): Make sure that from/to
309         are both polymorphic or neither.
310         * trans-intrinsic.c (conv_intrinsic_move_alloc): Cleanup,
311         generate inline code.
313 2011-11-28  Tobias Burnus  <burnus@net-b.de>
314             Steven G. Kargl  <kargl@gcc.gnu.org>
316         PR fortran/51308
317         * symbol.c (check_conflict): Ignore BIND(C) + PARAMETER
318         conflicts for ISO_C_BINDING variables.
319         (gen_special_c_interop_ptr): Don't mark c_ptr_null/c_funptr_null
320         as SAVE.
322 2011-11-25  Mikael Morin  <mikael@gcc.gnu.org>
324         * trans-array.c (set_loop_bounds): Remove dead conditions.
326 2011-11-25  Mikael Morin  <mikael@gcc.gnu.org>
328         PR fortran/51250
329         PR fortran/43829
330         * trans-array.c (gfc_trans_create_temp_array): Get dimension from
331         the right gfc_ss struct.
333 2011-11-25  Tobias Burnus  <burnus@net-b.de>
335         PR fortran/50408
336         * trans-decl.c (gfc_get_module_backend_decl): Also copy
337         ts.u.derived from the gsym if the ts.type is BT_CLASS.
338         (gfc_get_extern_function_decl): Copy also the backend_decl
339         for the symbol's ts.u.{derived,cl} from the gsym.
340         * trans-types.c (gfc_copy_dt_decls_ifequal): Directly
341         return if "from" and "to" are the same.
343 2011-11-25  Tobias Burnus  <burnus@net-b.de>
345         PR fortran/51302
346         * trans-stmt.c (gfc_trans_simple_do): Add a fold_convert.
348 2011-11-24  Tobias Burnus  <burnus@net-b.de>
350         PR fortran/51218
351         * resolve.c (pure_subroutine): If called subroutine is
352         impure, unset implicit_pure.
353         (resolve_function): Move impure check to simplify code.
355 2011-11-19  Tobias Burnus  <burnus@net-b.de>
357         PR fortran/51207
358         * class.c (gfc_find_derived_vtab): Mark __def_init as PARAMETER
359         and hence as TREE_READONLY; add subroutine attribute to
360         __copy_ procedure.
362         PR fortran/50640
363         * trans.h (GFC_DECL_PUSH_TOPLEVEL): New DECL_LANG_FLAG_7.
364         * trans-decl.c (gfc_get_symbol_decl): Mark __def_init and vtab as
365         GFC_DECL_PUSH_TOPLEVEL.
366         (gfc_generate_function_code): If GFC_DECL_PUSH_TOPLEVEL, push it there.
367         (build_function_decl): Push __copy_ procedure to the toplevel.
369 2011-11-16  Tobias Burnus  <burnus@net-b.de>
371         PR fortran/39427
372         PR fortran/37829
373         * decl.c (match_data_constant, match_data_constant, variable_decl,
374         gfc_match_decl_type_spec, access_attr_decl,
375         check_extended_derived_type, gfc_match_derived_decl,
376         gfc_match_derived_decl, gfc_match_derived_decl) Modified to deal
377         with DT constructors.
378         * gfortran.h (gfc_find_dt_in_generic,
379         gfc_convert_to_structure_constructor): New function prototypes.
380         * interface.c (check_interface0, check_interface1,
381         gfc_search_interface): Ignore DT constructors in generic list.
382         * match.h (gfc_match_structure_constructor): Update prototype.
383         * match.c (match_derived_type_spec): Ensure that one uses the DT
384         not the generic function.
385         * module.c (MOD_VERSION): Bump.
386         (dt_lower_string, dt_upper_string): New functions.
387         (find_use_name_n, find_use_operator, compare_true_names,
388         find_true_name, add_true_name, fix_mio_expr, load_needed,
389         read_module, write_dt_extensions, write_symbol): Changes to deal with
390         different symtree vs. sym names.
391         (create_derived_type): Create also generic procedure.
392         * parse.c (gfc_fixup_sibling_symbols): Don't regard DT and generic
393         function as the same.
394         * primary.c (gfc_convert_to_structure_constructor): New function.
395         (gfc_match_structure_constructor): Restructured; calls
396         gfc_convert_to_structure_constructor.
397         (build_actual_constructor, gfc_match_rvalue): Update for DT generic
398         functions.
399         * resolve.c (resolve_formal_arglist, resolve_structure_cons,
400         is_illegal_recursion, resolve_generic_f, resolve_variable,
401         resolve_fl_variable_derived, resolve_fl_derived0,
402         resolve_symbol): Handle DT and DT generic constructors.
403         * symbol.c (gfc_use_derived, gfc_undo_symbols,
404         gen_special_c_interop_ptr, gen_cptr_param,
405         generate_isocbinding_symbol, gfc_get_derived_super_type): Handle
406         derived-types, which are hidden in the generic type.
407         (gfc_find_dt_in_generic): New function
408         * trans-array.c (gfc_conv_array_initializer): Replace FL_PARAMETER
409         expr by actual value.
410         * trans-decl.c (gfc_get_module_backend_decl, gfc_trans_use_stmts):
411         Ensure that we use the DT and not the generic function.
412         * trans-types.c (gfc_get_derived_type): Ensure that we use the DT
413         and not the generic procedure.
415 2011-11-14  Tobias Burnus  <burnus@net-b.de>
417         PR fortran/51073
418         * trans-decl.c (generate_coarray_sym_init): Handle zero-sized arrays.
420 2011-11-09  Tobias Burnus  <burnus@net-b.de>
422         * symbol.c (clear_sym_mark, traverse_ns): Remove functions.
423         (count_st_nodes, do_traverse_symtree, fill_st_vector): New functions.
424         (gfc_traverse_symtree, gfc_traverse_ns): Call do_traverse_symtree.
426 2011-11-09  Janne Blomqvist  <jb@gcc.gnu.org>
428         PR libfortran/50016
429         * gfortran.texi (Data consistency and durability): New section.
431 2011-11-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
433         PR fortran/50540
434         * resolve.c (resolve_forall_iterators): Transform internal errors
435         to normal errors.
437 2011-11-09  Janus Weil  <janus@gcc.gnu.org>
439         PR fortran/50960
440         * class.c (gfc_find_derived_vtab): Make the vtab symbols FL_PARAMETER.
441         * expr.c (gfc_simplify_expr): Prevent vtabs from being replaced with
442         their value.
443         * resolve.c (resolve_values): Use-associated symbols do not need to
444         be resolved again.
445         (resolve_fl_parameter): Make sure the symbol has a value.
447 2011-11-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
449         PR fortran/38718
450         * intrinsic.c (add_functions): Allow dreal simplification.
451         * intrinsic.h (gfc_simplify_dreal): New prototype.
452         * simplify.c (gfc_simplify_dreal): New function.
454 2011-11-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
456         PR fortran/21881
457         * trans-types.c (gfc_get_dtype): Issue a fatal error instead of
458         an internal error.
460 2011-11-08  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
462         PR fortran/50404
463         * io.c (gfc_resolve_close): CLOSE requires a UNIT.
465 2011-11-08  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
467         PR fortran/50409
468         * expr.c (gfc_simplify_expr): Substrings can't have negative
469         length.
471 2011-11-08  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
473         PR fortran/50334
474         * invoke.texi (-finit-*): Document interaction with
475         -Wuninitialized.
477 2011-11-07  François-Xavier Coudert  <fxcoudert@gcc.gnu.org>
479         PR libfortran/49188
480         PR libfortran/49336
481         * invoke.texi: Fix documentation of fsign-zero option. Remove
482         contractions.
483         * intrinsic.texi: Fix ATAN2 documentation for signed zeros.
484         Remove contractions.
485         * gfortran.texi: Remove contractions.
487 2011-11-07  Janus Weil  <janus@gcc.gnu.org>
489         PR fortran/50919
490         * class.c (add_proc_comp): Don't add non-overridable procedures to the
491         vtable.
492         * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
493         Don't generate a dynamic _vptr call for non-overridable procedures.
495 2011-11-07  Janne Blomqvist  <jb@gcc.gnu.org>
497         * intrinsic.texi (MCLOCK, MCLOCK8, TIME, TIME8): Functions clock
498         and time are part of the C standard library.
500 2011-11-06  Janus Weil  <janus@gcc.gnu.org>
502         * gfortran.h (gfc_extend_expr): Modified prototype.
503         * interface.c (gfc_extend_expr): Return 'match' instead of 'gfc_try'.
504         Remove argument 'real_error'.
505         * resolve.c (resolve_operator): Modified call to 'gfc_extend_expr'.
507 2011-11-06  Andrew MacLeod  <amacleod@redhat.com>
508             Aldy Hernandez  <aldyh@redhat.com>
510         Merged from cxx-mem-model.
512         * types.def: (BT_SIZE, BT_CONST_VOLATILE_PTR, BT_FN_VOID_INT,
513         BT_FN_I{1,2,4,8,16}_CONST_VPTR_INT, BT_FN_VOID_VPTR_INT,
514         BT_FN_BOOL_VPTR_INT, BT_FN_BOOL_SIZE_CONST_VPTR,
515         BT_FN_VOID_VPTR_I{1,2,4,8,16}_INT, BT_FN_VOID_SIZE_VPTR_PTR_INT,
516         BT_FN_VOID_SIZE_CONST_VPTR_PTR_INT, BT_FN_VOID_SIZE_VPTR_PTR_PTR_INT,
517         BT_FN_BOOL_VPTR_PTR_I{1,2,4,8,16}_BOOL_INT_INT,
518         BT_FN_I{1,2,4,8,16}_VPTR_I{1,2,4,8,16}_INT): New types.
520 2011-11-04  Mikael Morin  <mikael@gcc.gnu.org>
522         PR fortran/43829
523         * trans-array.c (gfc_conv_expr_descriptor): Accept the inline intrinsic
524         case in the assertion.
525         * trans-intrinsic (enter_nested_loop): New function.
526         (gfc_conv_intrinsic_arith): Support non-scalar cases.
527         (nest_loop_dimension, walk_inline_intrinsic_arith): New functions.
528         (walk_inline_intrinsic_function): Handle sum and product.
529         (gfc_inline_intrinsic_function_p): Ditto.
530         * trans.h (gfc_get_loopinfo): New macro.
532 2011-11-04  Mikael Morin  <mikael@gcc.gnu.org>
534         * trans-intrinsic.c (gfc_conv_intrinsic_arith): Introduce parent
535         expression variable.  Use it.
537 2011-11-04  Mikael Morin  <mikael@gcc.gnu.org>
539         * trans-intrinsic.c (gfc_conv_intrinsic.c): Introduce current loop
540         pointer.  Use it.
542 2011-11-04  Mikael Morin  <mikael@gcc.gnu.org>
544         * trans-intrinsic.c (gfc_conv_intrinsic_arith): Small argument handling
545         cleanup.
547 2011-11-04  Mikael Morin  <mikael@gcc.gnu.org>
549         * trans-intrinsic.c (gfc_conv_intrinsic_arith): Update conditions.
551 2011-11-04  Mikael Morin  <mikael@gcc.gnu.org>
553         * frontend-passes.c (cfe_register_funcs): Return early in the case
554         of an inline intrinsic function.
555         (optimize_binop_array_assignment): Skip optimization in the case of
556         an inline intrinsic function.
558 2011-11-04  Mikael Morin  <mikael@gcc.gnu.org>
560         * array.c (match_subscript): Skip whitespaces before setting locus.
561         * matchexp.c (match_level_1): Ditto.
563 2011-11-04  Mikael Morin  <mikael@gcc.gnu.org>
565         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Set loop's
566         temporary rank to the loop rank. Mark ss chains for multiple loop
567         if necessary.  Use gfc_trans_scalarized_loop_boundary to end one loop
568         and start another.
570 2011-11-04  Mikael Morin  <mikael@gcc.gnu.org>
572         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Set loop's
573         temporary rank to the loop rank. Mark ss chains for multiple loop
574         if necessary.  Use gfc_trans_scalarized_loop_boundary to end one loop
575         and start another.
577 2011-11-04  Mikael Morin  <mikael@gcc.gnu.org>
579         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Don't calculate
580         offset twice in generated code.
582 2011-11-04  Mikael Morin  <mikael@gcc.gnu.org>
584         * trans-expr.c (gfc_conv_procedure_call): Handle temporaries for
585         arguments to elemental calls.
586         * trans-stmt.c (replace_ss): New function.
587         (gfc_conv_elemental_dependencies): Remove temporary loop handling.
588         Create a new ss for the temporary and replace the original one with it.
589         Remove fake array references. Recalculate all offsets.
591 2011-11-04  Mikael Morin  <mikael@gcc.gnu.org>
593         * trans-array.h (gfc_free_ss, gfc_set_delta): New prototypes.
594         * trans-array.c (gfc_free_ss): Remove forward declaration.
595         Make non-static.
596         (set_delta, gfc_set_delta): Remove forward declaration.
597         Make non-static and rename the former to the later. Update uses.
599 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
601         * trans.h (gfc_inline_intrinsic_function_p): Move prototype...
602         * gfortran.h (gfc_inline_intrinsic_function_p): ... here.
603         * dependency.c (gfc_check_argument_var_dependency): Check dependencies
604         of inline intrinsics' arguments.
606 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
608         * trans-array.c (gfc_trans_preloop_setup): New pointers to outer
609         dimension's ss and loop. Use them.
611 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
613         * trans-array.c (outermost_loop): New function.
614         (gfc_trans_array_constructor, gfc_set_vector_loop_bounds,
615         gfc_add_loop_ss_code): Put generated code out of the outermost loop.
617 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
619         * trans-array.c (constant_array_constructor_loop_size):
620         Handle multiple loops.
622 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
624         * trans-array.c (get_rank, get_loop_upper_bound_for_array):
625         New functions.
626         (gfc_trans_array_constructor): Handle multiple loops.
628 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
630         * trans.h (struct gfc_loopinfo): New field parent.
631         * trans-array.c (gfc_cleanup_loop): Free nested loops.
632         (gfc_add_ss_to_loop): Set nested_loop's parent loop.
633         (gfc_trans_array_constructor): Update assertion.
634         (gfc_conv_loop_setup): Ditto.
636 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
638         * trans-array.c (gfc_add_loop_ss_code): Skip non-nestedmost ss.
639         Call recursively gfc_add_loop_ss_code for all the nested loops.
640         (gfc_conv_ss_startstride): Only get the descriptor for the outermost
641         ss. Call recursively gfc_conv_ss_startstride for all the nested loops.
642         (set_loop_bounds): Call recursively for all the nested loops.
643         (set_delta): Ditto.
645 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
647         * trans.h (struct gfc_loopinfo): New fields nested and next.
648         * trans-array.c (gfc_add_ss_to_loop): Update list of nested list if
649         ss has non-null nested_ss field.
651 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
653         * trans-array.c (gfc_trans_create_temp_array): Loop over the parents.
655 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
657         * trans-array.c (get_array_ref_dim, get_scalarizer_dim_for_array_dim): 
658         Rename the former to the latter and loop over the parents.
659         (innermost_ss): New function.
660         (get_array_ref_dim_for_loop_dim): New function.
661         (gfc_trans_create_temp_array): Use get_scalarizer_dim_for_array_dim.
662         (set_loop_bounds): Use get_array_dim_for_loop_dim).
664 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
666         * trans.h (struct gfc_ss): New field nested_ss.
667         * trans-expr.c (gfc_advance_se_ss_chain): Update assertion.
669 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
671         * trans-array.c (set_vector_loop_bounds): Loop over the parents.
673 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
675         * trans-array.c (gfc_trans_array_constructor): Loop over the parents.
677 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
679         * trans-array.c (gfc_set_loop_bounds_from_array_spec): Loop over the
680         parents.
682 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
684         * trans.h (struct gfc_ss): New field parent.
685         * trans-array.c (gfc_trans_scalarizing_loops): Skip clearing if a
686         parent exists.
687         * trans-expr.c (gfc_advance_se_ss_chain): Move to parent ss at the
688         end of the chain.
690 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
692         * trans-array.h (gfc_trans_create_temp_array): Remove loop argument.
693         * trans-array.c (gfc_trans_create_temp_array): Ditto.  Get loop from ss.
694         Update reference to loop.  Remove loop argument.
695         (gfc_trans_array_constructor, gfc_conv_loop_setup): Update calls to
696         gfc_trans_create_temp_array.
697         * trans-expr.c (gfc_conv_procedure_call): Ditto.
698         * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ditto.
699         * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
700         Set loop before calling gfc_trans_create_temp_array.
702 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
704         * trans-array.c (gfc_trans_create_temp_array): New variable total_dim.
705         Set total_dim to loop's rank. Replace usages of loop's rank.
707 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
709         * trans-array.c (gfc_trans_array_constructor, trans_array_constructor):
710         Rename the former to the later.  Get loop from ss.
711         Remove loop argument.
712         (gfc_add_loop_ss_code): Update call.
714 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
716         * trans-array.c (gfc_set_vector_loop_bounds): Get loop from ss.
717         Remove loop argument.
718         (gfc_add_loop_ss_code): Update call.
720 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
722         * trans.h (struct gfc_ss): New field loop.
723         * trans-array.c (set_ss_loop): New function.
724         (gfc_add_ss_to_loop): Call set_ss_loop.
726 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
728         * trans.h (struct gfc_ss_info): New field refcount.
729         * trans-array.c (free_ss_info): Decrement refcount. Return early if
730         still non-zero.
731         (gfc_get_array_ss, gfc_get_temp_ss, gfc_get_scalar_ss): Increment
732         refcount.
734 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
736         * trans-array.c (gfc_trans_create_temp_array): Move invariant condition
737         out of the containing loop. 
739 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
741         * trans-array.c (gfc_conv_loop_setup, gfc_trans_create_temp_array):
742         Move specloop arrays clearing from the former to the latter.
744 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
746         * trans-array.c (set_loop_bounds): Separate the beginning of
747         gfc_conv_loop_setup into a function of its own.
748         (set_delta): Separate the end of gfc_conv_loop_setup into a function
749         of its own.
750         (gfc_conv_loop_setup): Call set_loop_bounds and set delta.
751         (set_loop_bounds, set_delta, gfc_conv_loop_setup): Make loopspec a
752         pointer to the specloop field from the loop struct.
754 2011-11-03  Tobias Burnus  <burnus@net-b.de>
756         PR fortran/50933
757         * interface.c (gfc_compare_derived_types): Fix check for BIND(C).
759 2011-11-03  Tobias Burnus  <burnus@net-b.de>
761         PR fortran/50960
762         * trans-decl.c (gfc_finish_var_decl): Mark PARAMETER as TREE_READONLY.
764 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
766         * trans.h (struct gfc_ss, struct gfc_ss_info): Move field
767         gfc_ss::where into gfc_ss_info.
768         * trans-array.c (gfc_add_loop_ss_code):
769         Update reference chains.
770         * trans-stmt.c (gfc_trans_where_assign, gfc_trans_where_3): Ditto.
772 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
774         * trans.h (struct gfc_ss, struct gfc_ss_info): Move field
775         gfc_ss::useflags into gfc_ss_info.
776         * trans-array.c (gfc_mark_ss_chain_used, gfc_trans_preloop_setup,
777         gfc_trans_scalarizing_loops, gfc_trans_scalarized_boundary):
778         Update reference chains.
779         * trans-expr.c (gfc_conv_procedure_call): Ditto.
780         * trans-intrinsic.c (gfc_conv_intrinsic_function): Ditto.
782 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
784         * trans.h (struct gfc_ss, struct gfc_ss_info): Move field
785         gfc_ss::data::info into gfc_ss_info::data and remove empty union
786         gfc_ss::data.
787         * trans-array.c (gfc_free_ss, gfc_trans_create_temp_array,
788         gfc_trans_constant_array_constructor, gfc_trans_array_constructor,
789         gfc_set_vector_loop_bounds, gfc_add_loop_ss_code,
790         gfc_conv_ss_descriptor, gfc_trans_array_bound_check,
791         gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
792         add_array_offset, gfc_trans_preloop_setup,
793         gfc_trans_scalarized_boundary, gfc_conv_section_startstride,
794         gfc_conv_ss_startstride, gfc_could_be_alias,
795         gfc_conv_loop_setup, gfc_conv_expr_descriptor,
796         gfc_alloc_allocatable_for_assignment, gfc_walk_array_ref):
797         Update reference chains and factor them where possible.
798         * trans-expr.c (gfc_conv_variable, gfc_conv_subref_array_arg,
799         gfc_conv_procedure_call, gfc_trans_subarray_assign): Updata reference
800         chains.
801         * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ditto.
802         * trans-io.c (transfer_array_component): Ditto.
803         * trans-stmt.c (gfc_conv_elemental_dependencies,
804         gfc_trans_pointer_assign_need_temp): Ditto.
806 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
808         * trans.h (struct gfc_ss, struct gfc_ss_info): Move member struct
809         gfc_ss::data::temp into gfc_ss_info::data.
810         * trans-array.c (gfc_get_temp_ss, gfc_conv_loop_setup): Update reference
811         chains.
813 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
815         * trans.h (struct gfc_ss, struct gfc_ss_info): Move member struct
816         gfc_ss::data::scalar into newly created union gfc_ss_info::data,
817         and rename subfield expr to value.
818         * trans-array.c (gfc_add_loop_ss_code, gfc_conv_array_index_offset,
819         gfc_conv_expr_descriptor): Update reference chains.
820         * trans-const.c (gfc_conv_constant): Ditto.
821         * trans-expr.c (gfc_conv_expr): Ditto.
823 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
825         * trans.h (struct gfc_ss, struct gfc_ss_info): Move field
826         string_length from the former struct to the latter.
827         * trans-array.c
828         (gfc_get_temp_ss, gfc_trans_array_constructor, gfc_add_loop_ss_code,
829         gfc_conv_ss_descriptor, gfc_conv_scalarized_array_ref,
830         gfc_conv_resolve_dependencies, gfc_conv_loop_setup,
831         gfc_conv_expr_descriptor): Update references to string_length and
832         factor common reference chains where possible.
833         * trans-const.c (gfc_conv_constant): Ditto.
834         * trans-expr.c (gfc_conv_variable, gfc_conv_subref_array_arg,
835         gfc_conv_expr): Ditto.
837 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
839         * trans.h (struct gfc_ss, struct gfc_ss_info): Move field expr from
840         the former struct to the latter.
841         * trans-array.c
842         (gfc_get_array_ss, gfc_get_scalar_ss,
843         gfc_trans_constant_array_constructor, gfc_trans_array_constructor,
844         gfc_add_loop_ss_code, gfc_conv_ss_descriptor,
845         gfc_trans_array_bound_check, gfc_conv_array_index_offset,
846         gfc_conv_scalarized_array_ref, gfc_conv_ss_startstride,
847         gfc_could_be_alias, gfc_conv_resolve_dependencies,
848         gfc_conv_loop_setup, gfc_conv_expr_descriptor,
849         gfc_alloc_allocatable_for_assignment): Update references to expr and
850         factor common reference chains where possible.
851         * trans-const.c (gfc_conv_constant): Ditto.
852         * trans-expr.c (gfc_conv_variable, gfc_conv_procedure_call,
853         gfc_conv_array_constructor_expr, gfc_conv_expr,
854         gfc_conv_expr_reference): Ditto.
855         * trans-intrinsic.c (trans_this_image, gfc_conv_intrinsic_bound,
856         gfc_conv_intrinsic_cobound, gfc_conv_intrinsic_funcall,
857         gfc_add_intrinsic_ss_code): Ditto.
858         * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
860 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
862         * trans.h (struct gfc_ss_info): New struct.
863         (gfc_get_ss_info): New macro.
864         (struct gfc_ss): Move type field to struct gfc_ss_info.
865         Add an info field of type gfc_ss_info.
866         * trans-array.c (free_ss_info): New function.
867         (gfc_free_ss): Call free_ss_info.
868         (gfc_get_array_ss, gfc_get_temp_ss, gfc_get_scalar_ss):
869         Allocate gfc_ss_info field.
870         (gfc_get_array_ss, gfc_get_temp_ss, gfc_get_scalar_ss,
871         gfc_set_vector_loop_bounds, gfc_add_loop_ss_code,
872         gfc_conv_array_index_offset, gfc_trans_preloop_setup,
873         gfc_trans_scalarized_loop_boundary, gfc_conv_section_startstride,
874         gfc_conv_ss_startstride, gfc_conv_resolve_dependencies,
875         gfc_conv_loop_setup, transposed_dims, gfc_conv_expr_descriptor,
876         gfc_walk_elemental_function_args): Update references to type.
877         * trans-const.c (gfc_conv_constant): Factor common reference chains
878         and update reference to type.
879         * trans-expr.c (gfc_conv_procedure_call, gfc_trans_assignment_1):
880         Update reference to type.
881         (gfc_conv_array_constructor_expr, gfc_conv_expr,
882         gfc_conv_expr_reference): Ditto. Factor common reference chains.
883         * trans-intrinsic.c (walk_inline_intrinsic_transpose): Update references
884         to type
885         * trans-stmt.c (gfc_trans_where_assign): Ditto.
887 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
889         * trans.h (struct gfc_ss, struct gfc_array_info): Move shape field
890         from the former struct to the latter.
891         * trans-array.c (gfc_conv_ss_startstride, gfc_conv_loop_setup):
892         Update field references.
893         * trans-expr.c (gfc_trans_subarray_assign): Update field references
894         and factor common reference chains.
895         * trans-io.c (transfer_array_component): Ditto.
897 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
899         * trans.h (struct gfc_array_info): Move dim and dimen fields...
900         (struct gfc_ss): ... here.  Remove gfc_ss::data::temp::dimen field.
901         * trans-array.c (gfc_conv_loop_setup): Remove temp_ss dim array
902         initialization.
903         (gfc_get_temp_ss): Initialize dim and dimen.
904         (gfc_free_ss, gfc_get_array_ss, gfc_get_temp_ss,
905         gfc_set_loop_bounds_from_array_spec, get_array_ref_dim,
906         gfc_trans_create_temp_array, gfc_trans_constant_array_constructor,
907         gfc_set_vector_loop_bounds, gfc_conv_scalarized_array_ref,
908         gfc_trans_preloop_setup, gfc_conv_ss_startstride,
909         gfc_conv_resolve_dependencies, gfc_conv_loop_setup, transposed_dims,
910         gfc_conv_expr_descriptor, gfc_alloc_allocatable_for_assignment,
911         gfc_walk_array_ref): Update field references.
912         * trans-expr.c (gfc_conv_subref_array_arg, gfc_conv_procedure_call):
913         Ditto.
914         * trans-intrinsic.c (walk_inline_intrinsic_transpose): Ditto.
915         * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
917 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
919         * trans.h (struct gfc_ss_info, struct gfc_array_info):
920         Rename the former to the latter.
921         * trans-array.c (gfc_get_array_ss, gfc_trans_allocate_array_storage,
922         get_array_ref_dim, gfc_trans_create_temp_array,
923         gfc_trans_constant_array_constructor, gfc_set_vector_loop_bounds,
924         gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
925         add_array_offset, gfc_trans_preloop_setup, gfc_conv_section_startstride,
926         gfc_conv_ss_startstride, gfc_conv_loop_setup, transposed_dims,
927         gfc_conv_expr_descriptor): Update all uses.
928         * trans-expr.c (gfc_conv_subref_array_arg, gfc_conv_procedure_call):
929         Ditto.
930         * trans-intrinsic.c (gfc_conv_intrinsic_transfer,
931         walk_inline_intrinsic_transpose): Ditto.
932         * trans-stmt.c (gfc_conv_elemental_dependencies,
933         gfc_trans_pointer_assign_need_temp): Ditto.
935 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
937         * trans-array.c (dim_ok, transposed_dims): Rename the former to the
938         latter.  Change argument type.  Invert return value.
939         (gfc_conv_expr_descriptor): Update calls.
941 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
943         * trans-array.c (get_array_ref_dim): Change argument type and name.
944         Obtain previous argument from the new argument in the body.
945         (gfc_trans_create_temp_arry, gfc_conv_loop_setup): Update calls.
947 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
949         * trans-array.c (gfc_set_vector_loop_bounds, set_vector_loop_bounds):
950         Rename the former to the latter.  Change type and name of argument.
951         Get previous argument from the new one.
952         (gfc_add_loop_ss_code): Update call.
954 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
956         * trans-array.h (gfc_trans_create_temp_array): Replace info argument
957         with ss argument.
958         * trans-array.c (gfc_trans_create_temp_array): Ditto. Get info from ss.
959         (gfc_trans_array_constructor, gfc_conv_loop_setup): Update call to
960         gfc_trans_create_temp_array.
961         * trans-expr.c (gfc_conv_procedure_call): Ditto.
962         * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ditto.
963         * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
965 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
967         * trans-array.c (gfc_trans_array_bound_check): Use ss argument
968         to get name.
970 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
972         * trans-array.c (gfc_trans_array_bound_check,
973         trans_array_bound_check): Rename the former to the latter.
974         Replace descriptor argument with ss argument.  Get descriptor from ss.
975         (gfc_conv_array_index_offset, conv_array_index_offset): Rename the
976         former to the latter.  Update call to trans_array_bound_check.
977         Replace info argument with ss argument.  Get info from ss.
978         (gfc_conv_scalarized_array_ref): Update call to conv_array_index_offset.
979         (add_array_offset): Ditto
981 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
983         * trans-array.c (gfc_trans_constant_array_constructor,
984         trans_constant_array_constructor): Rename the former to the latter.
985         Don't set the rank of the temporary for the loop.  Remove then unused
986         loop argument.
987         (gfc_trans_array_constructor): Update call.
989 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
991         * trans-array.c (gfc_trans_scalarizing_loops): Stop loop before end
992         marker, not after it.
994 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
996         * trans-array.c (gfc_conv_loop_setup): Also skip temporary arrays.
998 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
1000         * trans-array.c (gfc_conv_ss_startstride): Access array bounds along
1001         array dimensions instead of loop dimensions.
1003 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
1005         * trans-array.c (gfc_trans_preloop_setup): Assertify one condition.
1007 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
1009         * trans-array.c (gfc_walk_array_ref): Skip coarray dimensions.
1011 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
1013         * trans-array.c (get_array_ref_dim): Remove redundant condition.
1015 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
1017         * trans-array.c (gfc_trans_preloop_setup): Move common code...
1018         (add_array_offset): ...into that new function.
1020 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
1022         * trans-array.c (gfc_trans_preloop_setup): Use loop's dimension instead
1023         of array's dimention. Check that it is indeed the same.
1025 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
1027         * trans-array.c (gfc_trans_preloop_setup): Remove redundant assertion.
1028         Special case outermost loop.
1030 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
1032         * trans-array.c (gfc_trans_preloop_setup): Factor loop index
1033         initialization.
1035 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
1037         * trans-array.c (gfc_trans_preloop_setup): Move code earlier.
1039 2011-11-03  Mikael Morin  <mikael@gcc.gnu.org>
1041         * trans-array.c (gfc_trans_preloop_setup): Move array reference
1042         initialisation earlier. Factor subsequent array references.
1044 2011-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1046         * Makef-lang.in (gfortranspec.o): Pass SHLIB instead of SHLIB_LINK.
1048 2011-10-30  Steven G. Kargl  <kargl@gcc.gnu.org>
1050         PR fortran/50573
1051         * check.c (gfc_check_dshift): Update argument checking for BOZ.
1052         Update checking SHIFT against BITSIZE of I or J.
1053         * intrinsic.texi: Update docs for DSHIFTL and DSHIFTR.
1055 2011-10-28  Steven G. Kargl  <kargl@gcc.gnu.org>
1057         * check.c (gfc_check_atan_2): Typo in comment.
1058         (gfc_check_nearest): If 's' is constant, check that it is not 0.
1059         * simplify.c (simplify_dshift, gfc_simplify_ibclr, gfc_simplify_ibits,
1060         gfc_simplify_ibset, simplify_shift, gfc_simplify_ishftc,
1061         gfc_simplify_nearest): Remove dead code.
1063 2011-10-23  Steven G. Kargl  <kargl@gcc.gnu.org>
1065         * simplify.c (simplify_transformation_to_array): Fix memory leak.
1067 2011-10-20  Steven G. Kargl  <kargl@gcc.gnu.org>
1069         PR fortran/50821
1070         * check.c (gfc_check_ishftc): Check args are constant before 
1071         extracting the integer.
1073 2011-10-20  Steven G. Kargl  <kargl@gcc.gnu.org>
1075         PR fortran/50514
1076         * check.c (less_than_bitsize1): Check |shift| <= bit_size(i).
1077         (gfc_check_ishftc):  Check |shift| <= bit_size(i) and check
1078         that size is positive.
1080 2011-10-20  Steven G. Kargl  <kargl@gcc.gnu.org>
1082         PR fortran/50524
1083         * resolve.c (resolve_ref): Check return value of resolve_substring().
1085 2011-10-20  Steven G. Kargl  <kargl@gcc.gnu.org>
1087         * io.c (match_dt_format): Match a user-defined operator or a kind
1088         type prefixed string.
1090 2011-10-19  Janus Weil  <janus@gcc.gnu.org>
1092         PR fortran/47023
1093         * check.c (gfc_check_sizeof): Reject procedures as argument of SIZEOF.
1094         * intrinsinc.texi (SIZEOF): Document it.
1095         (STORAGE_SIZE): Fix special characters. Fix line breaks.
1097 2011-10-18  Mikael Morin  <mikael@gcc.gnu.org>
1099         PR fortran/50420
1100         * trans.c (gfc_build_array_ref): If type is not an array, check that
1101         there is nothing to do, and do nothing.
1103 2011-10-18  Mikael Morin  <mikael@gcc.gnu.org>
1105         PR fortran/50420
1106         * trans-types.c (gfc_build_array_type): Don't force lower bound to one
1107         in the deferred case.
1109 2011-10-18  Mikael Morin  <mikael@gcc.gnu.org>
1111         PR fortran/50420
1112         * simplify.c (simplify_cobound): Accept non-last-in-ref-chain coarrays.
1113         Don't set already set array ref.
1115 2011-10-18  Mikael Morin  <mikael@gcc.gnu.org>
1117         * array.c (gfc_find_array_ref): Remove coarray-specific handling.
1119 2011-10-18  Mikael Morin  <mikael@gcc.gnu.org>
1121         PR fortran/50420
1122         * check.c (dim_corank_check): Use gfc_get_corank to get corank.
1124 2011-10-18  Mikael Morin  <mikael@gcc.gnu.org>
1126         PR fortran/50420
1127         * trans-intrinsic.c (walk_coarray): Change AR_ELEMENT to AR_SECTION.
1129         PR fortran/50420
1130         * trans-intrinsic.c (walk_coarray): Use gfc_walk_array_ref for
1131         the scalarization chain initialization. 
1133 2011-10-18  Mikael Morin  <mikael@gcc.gnu.org>
1135         PR fortran/50420
1136         * trans-intrinsic.c (walk_coarray): Allow subreferences after a
1137         coarray object reference.
1139 2011-10-18  Mikael Morin  <mikael@gcc.gnu.org>
1141         PR fortran/50420
1142         * trans-array.c (gfc_walk_array_ref): Allow zero rank arrays
1143         if they are coarrays.
1145 2011-10-18  Mikael Morin  <mikael@gcc.gnu.org>
1147         * trans-array.h (gfc_walk_array_ref): New prototype.
1148         * trans-array.c (gfc_walk_array_ref): New function, containing
1149         all but the beginning of gfc_walk_variable_expr's code.
1150         (gfc_walk_variable_expr): Use gfc_walk_array_ref.
1152 2011-10-18  Mikael Morin  <mikael@gcc.gnu.org>
1154         PR fortran/50420
1155         * trans-array.c (gfc_conv_expr_descriptor): Use loop.dimen instead of
1156         ndim for the descriptor's rank.
1158 2011-10-18  Mikael Morin  <mikael@gcc.gnu.org>
1160         PR fortran/50420
1161         * trans-array.c (gfc_conv_expr_descriptor): Count codimensions starting
1162         from zero, and add then the relevant offset (either ndim or loop.dimen)
1163         depending on context.
1165 2011-10-18  Mikael Morin  <mikael@gcc.gnu.org>
1167         * trans-array.c (gfc_conv_expr_descriptor): Save some horizontal space.
1169 2011-10-18  Mikael Morin  <mikael@gcc.gnu.org>
1171         * trans-array.c (gfc_conv_expr_descriptor): Move ndim initialization
1172         earlier.
1174 2011-10-18  Janus Weil  <janus@gcc.gnu.org>
1176         PR fortran/47023
1177         * decl.c (verify_c_interop_param): Renamed to
1178         'gfc_verify_c_interop_param'. Add error message for polymorphic
1179         arguments.
1180         (verify_c_interop): Renamed to 'gfc_verify_c_interop'. Reject
1181         polymorphic variables.
1182         (verify_bind_c_sym): Renamed 'verify_c_interop'.
1183         * gfortran.h (verify_c_interop,verify_c_interop_param): Renamed.
1184         * check.c (gfc_check_sizeof): Ditto.
1185         * resolve.c (gfc_iso_c_func_interface,resolve_fl_procedure): Ditto.
1186         * symbol.c (verify_bind_c_derived_type): Ditto.
1188 2011-10-15  Tom Tromey  <tromey@redhat.com>
1189             Dodji Seketeli  <dodji@redhat.com>
1191         * cpp.c (print_line, cb_define): Adjust to avoid using internals
1192         of struct line_map.  Use the public API instead.
1194 2011-10-17  Janus Weil  <janus@gcc.gnu.org>
1196         PR fortran/47023
1197         PR fortran/50752
1198         * primary.c (match_kind_param): Avoid segfault.
1200 2011-10-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
1202         * frontend-passes.c (current_ns):  Make static.
1203         (create_var):  Note parent of newly created namespace.
1204         (optimize_namespace):  Don't wak sibling namespaces
1205         if they are EXEC_BLOCK because this is handled...
1206         (gfc_code_walker):  ... here.  Also walk ASSOCIATE lists.
1208 2011-10-16  Janus Weil  <janus@gcc.gnu.org>
1210         PR fortran/47023
1211         * primary.c (match_kind_param): Detect ISO_C_BINDING kinds.
1212         (get_kind): Pass on 'is_iso_c' flag.
1213         (match_integer_constant,match_real_constant,match_logical_constant):
1214         Set 'ts.is_c_interop'.
1216 2011-10-16  Janus Weil  <janus@gcc.gnu.org>
1218         PR fortran/50547
1219         * resolve.c (resolve_formal_arglist): Remove unneeded error message.
1220         Some reshuffling.
1222 2011-10-15  Tobias Burnus  <burnus@net-b.de>
1224         * gfortran.texi (Fortran 2008 status, TS 29113 status,
1225         Further Interoperability of Fortran with C): Update implementation
1226         status, change references from TR 29113 to TS 29113.
1227         * intrinsic.texi (RANK): Change TR 29113 to TS 29113.
1228         * invoke.text (-std=): Ditto, change -std=f2008tr to -std=f2008ts.
1229         * lang.opt (std=): Ditto.
1230         * options.c (gfc_handle_option, set_default_std_flags): Ditto and
1231         change GFC_STD_F2008_TR to GFC_STD_F2008_TS.
1232         * libgfortran.h: Ditto.
1233         * intrinsic.c (add_functions, gfc_check_intrinsic_standard): Ditto.
1234         * decl.c (verify_c_interop_param): Ditto.
1236 2011-10-14  Janus Weil  <janus@gcc.gnu.org>
1238         PR fortran/50570
1239         * expr.c (gfc_check_vardef_context): Don't throw an error on
1240         non-pointer assignments involving an intent(in) pointer dummy.
1242 2011-10-14  Tobias Burnus  <burnus@net-b.de>
1244         PR fortran/50718
1245         * trans-expr.c (gfc_conv_procedure_call): Fix -fcheck=pointer
1246         for dummy arguments with VALUE attribute.
1248 2011-10-11  Tobias Burnus  <burnus@net-b.de>
1249             Janus Weil  <janus@gcc.gnu.org>
1251         * invoke.texi (-fwhole-file): Update wording since -fwhole-file
1252         is now enabled by default.
1254 2011-10-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
1256         * trans-expr.c (gfc_conv_power_op): Delete old interface with two
1257         parallel arrays to hold standard builtin declarations, and replace
1258         it with a function based interface that can support creating
1259         builtins on the fly in the future.  Change all uses, and poison
1260         the old names.  Make sure 0 is not a legitimate builtin index.
1261         (fill_with_spaces): Ditto.
1262         (gfc_trans_string_copy): Ditto.
1263         (gfc_trans_zero_assign): Ditto.
1264         (gfc_build_memcpy_call): Ditto.
1265         (alloc_scalar_allocatable_for_assignment): Ditto.
1266         * trans-array.c (gfc_trans_array_constructor_value): Ditto.
1267         (duplicate_allocatable): Ditto.
1268         (gfc_alloc_allocatable_for_assignment): Ditto.
1269         * trans-openmp.c (gfc_omp_clause_copy_ctor): Ditto.
1270         (gfc_omp_clause_assign_op): Ditto.
1271         (gfc_trans_omp_atomic): Ditto.
1272         (gfc_trans_omp_do): Ditto.
1273         (gfc_trans_omp_task): Ditto.
1274         * trans-stmt.c (gfc_trans_stop): Ditto.
1275         (gfc_trans_sync): Ditto.
1276         (gfc_trans_allocate): Ditto.
1277         (gfc_trans_deallocate): Ditto.
1278         * trans.c (gfc_call_malloc): Ditto.
1279         (gfc_allocate_using_malloc): Ditto.
1280         (gfc_call_free): Ditto.
1281         (gfc_deallocate_with_status): Ditto.
1282         (gfc_deallocate_scalar_with_status): Ditto.
1283         * f95-lang.c (gfc_define_builtin): Ditto.
1284         (gfc_init_builtin_functions): Ditto.
1285         * trans-decl.c (create_main_function): Ditto.
1286         * trans-intrinsic.c (builtin_decl_for_precision): Ditto.
1288 2011-10-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
1290         PR fortran/50564
1291         * frontend-passes (forall_level):  New variable.
1292         (cfe_register_funcs):  Don't register functions if we
1293         are within a forall loop.
1294         (optimize_namespace):  Set forall_level to 0 before entry.
1295         (gfc_code_walker):  Increase/decrease forall_level.
1297 2011-10-09  Tobias Burnus  <burnus@net-b.de>
1299         PR fortran/50273
1300         * trans-common.c (translate_common): Fix -Walign-commons check.
1302 2011-10-09  Mikael Morin  <mikael.morin@sfr.fr>
1304         * interface.c (check_dummy_characteristics): Count dimensions starting
1305         from one in diagnostic.
1307 2011-10-09  Tobias Burnus  <burnus@net-b.de>
1309         * Make-lang.in (F95_PARSER_OBJS, GFORTRAN_TRANS_DEPS): Add
1310         dependency on iso-c-binding.def and iso-fortran-env.def.
1311         * module.c (import_iso_c_binding_module): Add error when
1312         explicitly importing a nonstandard symbol; extend standard-
1313         depending loading.
1314         * iso-c-binding.def: Add c_float128 and c_float128_complex
1315         integer parameters (for -std=gnu).
1316         * intrinsic.texi (ISO_C_Binding): Document them.
1317         * symbol.c (generate_isocbinding_symbol): Change macros
1318         to ignore GFC_STD_* data.
1319         * trans-types.c (gfc_init_c_interop_kinds): Ditto; make
1320         nonstatic and renamed from "init_c_interop_kinds".
1321         (gfc_init_kinds): Don't call it
1322         * trans-types.h (gfc_init_c_interop_kinds): Add prototype.
1323         * f95-lang.c (gfc_init_decl_processing): Call it.
1325 2011-10-09  Janus Weil  <janus@gcc.gnu.org>
1327         PR fortran/50659
1328         * expr.c (replace_symbol): Only do replacement if the symbol is a dummy.
1330 2011-10-08  Paul Thomas  <pault@gcc.gnu.org>
1332         PR fortran/47844
1333         * trans-array.c (gfc_conv_array_index_offset): Use descriptor
1334         stride for pointer function results.
1336 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
1338         * trans-array.c (gfc_conv_expr_descriptor): Remove trailing whitespace.
1340 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
1342         * trans-array.c (gfc_conv_ss_startstride): Merge two switch cases.
1344 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
1346         * trans-array.c (gfc_conv_section_startstride): Remove coarray argument.
1347         Remove conditions on coarray.
1348         (gfc_conv_ss_startstride): Update call to gfc_conv_section_startstride.
1349         (gfc_conv_expr_descriptor): Ditto. Add assertions before the call.
1351 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
1353         * trans-array.c (gfc_conv_section_startstride): Remove coarray_last
1354         argument. Remove condition on coarray_last.
1355         (gfc_conv_ss_startstride): Update call to gfc_conv_section_startstride.
1356         (gfc_conv_expr_descriptor): Ditto.
1358 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
1360         * trans-array.c (gfc_walk_variable_expr): Remove scalar coarray
1361         handling.  Don't reset array ref's corank and codimensions' types
1362         in the full array ref case.  Update loop upper limit.
1363         Remove DIMEN_THIS_IMAGE case.  Remove unnecessary conditions.
1365 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
1367         * trans.h (gfc_ss_info): Remove codimen field.
1368         * trans-array.c (gfc_get_array_ss): Don't set codimen field.
1369         (gfc_trans_create_temp_array): Don't set descriptor's cobounds.
1370         (gfc_trans_constant_array_constructor): Update loop upper limit.
1371         (gfc_conv_ss_startstride): Don't set codimen field.
1372         Don't get descriptor's cobounds.
1373         (gfc_walk_variable_expr): Update dimension index.
1374         * trans-intrinsic.c (trans_this_image, trans_image_index,
1375         conv_intrinsic_cobound): Don't set codimen field
1377 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
1379         * trans.h (gfc_loopinfo): Remove codimen field.
1380         * trans-array.c (gfc_set_vector_loop_bounds,
1381         gfc_trans_scalarizing_loops, gfc_conv_loop_setup): Update loop upper
1382         limit.
1383         (gfc_set_loop_bounds_from_array_spec): Ditto. Remove skip on last
1384         codimension.
1385         (gfc_start_scalarized_body): Update loop lower limit.
1386         (gfc_conv_ss_startstride): Don't set loop's codimen field.
1387         (gfc_conv_loop_setup): Remove unnecessary condition.
1388         (gfc_conv_expr_descriptor): Don't use loop's codimen field as corank.
1390 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
1392         * trans.h (gfc_ss): Remove data.temp.codimen field.
1393         * trans-array.c (gfc_conv_resolve_dependencies,
1394         gfc_conv_expr_descriptor): Don't set temp's codimen field.
1396 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
1398         * resolve.c (resolve_array_ref): Set array_ref's dimen field (and the
1399         associated dimen_type) in the full array ref case.
1401 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
1403         * trans-intrinsic.c (walk_coarray): New function.
1404         (convert_element_to_coarray_ref): Move code to walk_coarray. Remove.
1405         (trans-this_image, trans_image_index, conv_intrinsic_cobound):
1406         Use walk_coarray.
1408 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
1410         * trans-array.c (gfc_conv_expr_descriptor): Add out-of-the-scalarizer
1411         cobounds evaluation.
1413 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
1415         * trans-array.c (gfc_conv_ss_startstride): Support zero rank loop.
1417 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
1419         * trans-array.c (gfc_conv_section_startstride): Move code to
1420         evaluate_bound.  Use evaluate_bound.
1421         (evaluate_bound): New function.
1423 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
1425         * trans-array.c (gfc_conv_section_startstride): Update assertion to
1426         also accept coarrays.
1428 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
1430         * trans-array.c (gfc_conv_section_startstride): Factor common
1431         array ref references.
1433 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
1435         * trans-array.c (gfc_conv_expr_descriptor): Use codim instead of
1436         loop.codimen as argument to gfc_get_array_type_bounds.
1438 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
1440         * trans-array.h (struct gfc_se): New flag want_coarray.
1441         * trans-intrinsic.c (trans_this_image, trans_image_index,
1442         conv_intrinsic_cobound): Set want_coarray.
1443         * trans_array.c (gfc_conv_expr_descriptor): Evaluate codimension
1444         earlier and without relying on the scalarizer.
1446 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
1448         * expr.c (gfc_get_corank): Return 0 if input expression is not a
1449         coarray.
1451 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
1453         * trans-array.c (gfc_conv_expr_descriptor): Simplify coarray
1454         descriptor setup code.
1456 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
1458         * resolve.c (compare_spec_to_ref): Move coarray ref initialization
1459         code...
1460         (resolve_array_ref): ... here.
1462 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
1464         * check.c (is_coarray): Remove.
1465         (coarray_check): Use gfc_is_coarray.
1467 2011-10-07  Janus Weil  <janus@gcc.gnu.org>
1469         PR fortran/50625
1470         * class.c (gfc_build_class_symbol): Fix whitespace.
1471         * module.c (mio_symbol): Set 'class_ok' attribute.
1472         * trans-decl.c (gfc_get_symbol_decl): Make sure the backend_decl has
1473         been built for class symbols.
1475 2011-10-04  Janus Weil  <janus@gcc.gnu.org>
1477         PR fortran/35831
1478         * interface.c (check_dummy_characteristics): Check the array shape.
1480 2011-10-01  Janus Weil  <janus@gcc.gnu.org>
1482         PR fortran/50585
1483         * interface.c (get_expr_storage_size): Check if 'length' component is
1484         associated.
1486 2011-09-29  Janus Weil  <janus@gcc.gnu.org>
1488         PR fortran/50547
1489         * resolve.c (resolve_formal_arglist): Fix pureness check for dummy
1490         functions.
1492         PR fortran/50553
1493         * symbol.c (check_conflict): Forbid TARGET attribute for statement
1494         functions.
1496 2011-09-27  Jakub Jelinek  <jakub@redhat.com>
1498         * trans-types.c (gfc_type_for_size): Return wider type
1499         if no suitable narrower type has been found.
1500         (gfc_type_for_mode): Return NULL_TREE if gfc_type_for_size
1501         returned type doesn't have expected TYPE_MODE.
1503 2011-09-26  Janus Weil  <janus@gcc.gnu.org>
1505         PR fortran/50515
1506         * resolve.c (resolve_common_blocks): Check for EXTERNAL attribute.
1508         PR fortran/50517
1509         * interface.c (gfc_compare_interfaces): Bugfix in check for result type.
1511 2011-09-22  Janus Weil  <janus@gcc.gnu.org>
1513         PR fortran/41733
1514         * expr.c (gfc_check_pointer_assign): Check for nonintrinsic elemental
1515         procedures.
1516         * interface.c (gfc_compare_interfaces): Rename 'intent_flag'. Check
1517         for PURE and ELEMENTAL attributes.
1518         (compare_actual_formal): Remove pureness check here.
1520 2011-09-20  Steven G. Kargl  <kargl@gcc.gnu.org>
1522         * check.c (gfc_check_c_sizeof): Remove redundant word.
1524 2011-09-20  Simon Baldwin  <simonb@google.com>
1526         * module.c (gfc_dump_module): Omit timestamp from output.
1528 2011-09-17  Janus Weil  <janus@gcc.gnu.org>
1530         PR fortran/50403
1531         * symbol.c (gfc_use_derived): Fix coding style.
1533 2011-09-15  Janus Weil  <janus@gcc.gnu.org>
1535         PR fortran/50401
1536         * resolve.c (resolve_transfer): Check if component 'ref' is defined.
1538         PR fortran/50403
1539         * symbol.c (gfc_use_derived): Check if argument 'sym' is defined.
1541 2011-09-14  Tobias Burnus  <burnus@net-b.de>
1543         PR fortran/34547
1544         PR fortran/50375
1545         * check.c (gfc_check_null): Allow allocatables as MOLD to NULL.
1546         * resolve.c (resolve_transfer): Reject NULL without MOLD.
1547         * interface.c (gfc_procedure_use): Reject NULL without MOLD
1548         if no explicit interface is known.
1549         (gfc_search_interface): Reject NULL without MOLD if it would
1550         lead to ambiguity.
1552 2011-09-13  Janus Weil  <janus@gcc.gnu.org>
1554         PR fortran/50379
1555         * symbol.c (check_conflict): Check conflict between GENERIC and RESULT
1556         attributes.
1558 2011-09-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
1560         PR fortran/50327
1561         * frontend-passes.c (dummy_expr_callback):  New function.
1562         (convert_do_while):  New function.
1563         (optimize_namespace):  Call code walker to convert do while loops.
1565 2011-09-11  Janus Weil  <janus@gcc.gnu.org>
1567         PR fortran/35831
1568         PR fortran/47978
1569         * interface.c (check_dummy_characteristics): New function to check the
1570         characteristics of dummy arguments.
1571         (gfc_compare_interfaces,gfc_check_typebound_override): Call it here.
1573 2011-09-08  Mikael Morin  <mikael.morin@sfr.fr>
1575         * trans-array.c (gfc_trans_constant_array_constructor): Remove
1576         superfluous initialisation of DIM field.
1577         (gfc_trans_array_constructor): Assert that DIMEN field is properly set.
1578         (gfc_conv_expr_descriptor): Ditto.
1579         * trans-expr.c (gfc_conv_procedure_call): Ditto.
1581 2011-09-08  Mikael Morin  <mikael.morin@sfr.fr>
1583         * trans-array.h (gfc_get_scalar_ss): New prototype.
1584         * trans-array.c (gfc_get_scalar_ss): New function.
1585         (gfc_walk_variable_expr, gfc_walk_op_expr,
1586         gfc_walk_elemental_function_args): Re-use gfc_get_scalar_ss.
1587         * trans-expr.c (gfc_trans_subarray_assign): Ditto.
1588         (gfc_trans_assignment_1): Ditto.
1589         * trans-stmt.c (compute_inner_temp_size, gfc_trans_where_assign,
1590         gfc_trans_where_3): Ditto.
1592 2011-09-08  Mikael Morin  <mikael.morin@sfr.fr>
1594         * trans-array.h (gfc_get_temp_ss): New prototype.
1595         * trans-array.c (gfc_get_temp_ss): New function.
1596         (gfc_conv_resolve_dependencies): Re-use gfc_get_temp_ss.
1597         (gfc_conv_expr_descriptor): Ditto.
1598         * trans-expr.c (gfc_conv_subref_array_arg): Ditto.
1600 2011-09-08  Mikael Morin  <mikael.morin@sfr.fr>
1602         * trans-array.h (gfc_get_array_ss): New prototype.
1603         * trans-array.c (gfc_get_array_ss): New function.
1604         (gfc_walk_variable_expr, gfc_walk_function_expr,
1605         gfc_walk_array_constructor): Re-use gfc_get_array_ss.
1606         * trans-expr.c (gfc_trans_subarray_assign): Ditto.
1607         * trans-intrinsic.c (gfc_walk_intrinsic_bound,
1608         gfc_walk_intrinsic_libfunc): Ditto.
1609         * trans-io.c (transfer_array_component): Ditto.
1611 2011-09-08  Tobias Burnus  <burnus@net-b.de>
1613         PR fortran/44646
1614         * decl.c (gfc_match_entry, gfc_match_end): Handle COMP_DO_CONCURRENT.
1615         * dump-parse-tree.c (show_code_node): Handle EXEC_DO_CONCURRENT.
1616         * gfortran.h (gfc_exec_op): Add EXEC_DO_CONCURRENT.
1617         * match.c (gfc_match_critical, match_exit_cycle, gfc_match_stopcode,
1618         lock_unlock_statement, sync_statement, gfc_match_allocate,
1619         gfc_match_deallocate, gfc_match_return): Add DO CONCURRENT diagnostic.
1620         (gfc_match_do): Match DO CONCURRENT.
1621         (match_derived_type_spec, match_type_spec, gfc_free_forall_iterator,
1622         match_forall_iterator, match_forall_header, match_simple_forall,
1623         gfc_match_forall): Move up in the file.
1624         * parse.c (check_do_closure, parse_do_block): Handle do concurrent.
1625         * parse.h (gfc_compile_state): Add COMP_DO_CONCURRENT.
1626         * resolve.c (do_concurrent_flag): New global variable.
1627         (resolve_function, pure_subroutine, resolve_branch,
1628         gfc_resolve_blocks, resolve_code, resolve_types): Add do concurrent
1629         diagnostic.
1630         * st.c (gfc_free_statement): Handle EXEC_DO_CONCURRENT.
1631         * trans-stmt.c (gfc_trans_do_concurrent): New function.
1632         (gfc_trans_forall_1): Handle do concurrent.
1633         * trans-stmt.h (gfc_trans_do_concurrent): New function prototype.
1634         * trans.c (trans_code): Call it.
1635         * frontend-passes.c (gfc_code_walker): Handle EXEC_DO_CONCURRENT.
1637 2011-09-07  Janus Weil  <janus@gcc.gnu.org>
1639         PR fortran/48095
1640         * primary.c (gfc_match_structure_constructor): Handle parsing of
1641         procedure pointers components in structure constructors.
1642         * resolve.c (resolve_structure_cons): Check interface of procedure
1643         pointer components. Changed wording of some error messages.
1645 2011-09-04  Janus Weil  <janus@gcc.gnu.org>
1647         PR fortran/50227
1648         * trans-types.c (gfc_sym_type): Check for proc_name.
1650 2011-08-30  Tobias Burnus  <burnus@net-b.de>
1652         PR fortran/45044
1653         * trans-common.c (build_common_decl): Warn if named common
1654         block's size is not everywhere the same.
1656 2011-08-30  Steven G. Kargl  <kargl@gcc.gnu.org>
1658         PR fortran/45170
1659         * trans-stmt.c (gfc_trans_allocate): Evaluate the substring.
1661 2011-08-29  Janus Weil  <janus@gcc.gnu.org>
1663         PR fortran/50225
1664         * trans-decl.c (gfc_generate_function_code): Nullify polymorphic
1665         allocatable function results.
1667 2011-08-29  Tobias Burnus  <burnus@net-b.de>
1669         * trans-decl.c (generate_coarray_sym_init): Use
1670         GFC_CAF_COARRAY_STATIC for static coarrays.
1672 2011-08-28  Dodji Seketeli  <dodji@redhat.com>
1674         * scanner.c (load_file): Don't abuse LC_RENAME reason while
1675         (indirectly) calling linemap_add.
1677 2011-08-26  Jakub Jelinek  <jakub@redhat.com>
1679         * trans-decl.c (get_proc_pointer_decl): Set DECL_TLS_MODEL
1680         if threadprivate.
1681         * symbol.c (check_conflict): Allow threadprivate attribute with
1682         FL_PROCEDURE if proc_pointer.
1684 2011-08-25  Mikael Morin  <mikael@gcc.gnu.org>
1686         PR fortran/50050
1687         * expr.c (gfc_free_shape): Do nothing if shape is NULL.
1688         (free_expr0): Remove redundant NULL shape check.
1689         * resolve.c (check_host_association): Ditto.
1690         * trans-expr.c (gfc_trans_subarray_assign): Assert that shape is
1691         non-NULL.
1692         * trans-io.c (transfer_array_component): Ditto.
1694 2011-08-25  Tobias Burnus  <burnus@net-b.de>
1696         * trans-array.c (gfc_conv_descriptor_token): Add assert.
1697         * trans-decl.c (gfc_build_qualified_array,
1698         create_function_arglist): Handle assumed-shape arrays.
1699         * trans-expr.c (gfc_conv_procedure_call): Ditto.
1700         * trans-types.c (gfc_get_array_descriptor_base): Ditto, don't
1701         add "caf_token" to assumed-shape descriptors, new akind argument.
1702         (gfc_get_array_type_bounds): Pass akind.
1703         * trans.h (lang_decl): New elements caf_offset and token.
1704         (GFC_DECL_TOKEN, GFC_DECL_CAF_OFFSET): New macros.
1706 2011-08-25  Tobias Burnus  <burnus@net-b.de>
1708         * trans-array.c (structure_alloc_comps): Fix for allocatable
1709         scalar coarray components.
1710         * trans-expr.c (gfc_conv_component_ref): Ditto.
1711         * trans-type.c (gfc_get_derived_type): Ditto.
1713 2011-08-24  Tobias Burnus  <burnus@net-b.de>
1715         PR fortran/50163
1716         * expr.c (check_init_expr): Return when an error occured.
1718 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
1720         * Make-lang.in (fortran/cpp.o): Remove explicit compilation rule.
1722 2011-08-23  Tobias Burnus  <burnus@net-b.de>
1724         PR fortran/31600
1725         * symbol.c (gfc_add_type): Better diagnostic if redefining
1726         use-associated symbol.
1727         * module.c (gfc_use_module): Use module name as locus.
1729 2011-08-22  Gabriel Charette  <gchare@google.com>
1731         * cpp.c (gfc_cpp_init): Force BUILTINS_LOCATION for tokens
1732         defined in cpp_define_builtins.
1734 2011-08-22  Mikael Morin  <mikael@gcc.gnu.org>
1736         PR fortran/50050
1737         * gfortran.h (gfc_clear_shape, gfc_free_shape): New prototypes.
1738         * expr.c (gfc_clear_shape, gfc_free_shape): New functions.
1739         (free_expr0): Re-use gfc_free_shape.
1740         * trans-expr.c (gfc_trans_subarray_assign): Ditto.
1741         * trans-io.c (transfer_array_component): Ditto.
1742         * resolve.c (check_host_association): Ditto.
1743         (gfc_expr_to_initialize): Don't force the rank value and free the shape
1744         after updating the expression. Recalculate shape and rank.
1745         (resolve_where_shape): Re-use gfc_clear_shape.
1746         * array.c (gfc_array_ref_shape): Ditto.
1748 2011-08-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
1750         PR fortran/47659
1751         * expr.c (gfc_check_assign): Check for type conversions when the
1752         right-hand side is a constant REAL/COMPLEX contstant the left-hand
1753         side is also REAL/COMPLEX.  Don't warn when a narrowing conversion
1754         for REAL does not change the value of the constant.
1756 2011-08-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
1758         PR fortran/50130
1759         * resolve.c (resolve_array_ref):  Don't calculate upper bound
1760         if the stride is zero.
1762 2011-08-20  Janus Weil  <janus@gcc.gnu.org>
1764         PR fortran/49638
1765         * dependency.c (gfc_dep_compare_expr): Add new result value "-3".
1766         (gfc_check_element_vs_section,gfc_check_element_vs_element): Handle
1767         result value "-3".
1768         * frontend-passes.c (optimize_comparison): Ditto.
1769         * interface.c (gfc_check_typebound_override): Ditto.
1771 2011-08-19  Mikael Morin  <mikael.morin@sfr.fr>
1773         PR fortran/50129
1774         * parse.c (parse_where): Undo changes after emitting an error. 
1776 2011-08-19  Jakub Jelinek  <jakub@redhat.com>
1778         PR fortran/49792
1779         * trans-expr.c (gfc_trans_assignment_1): Set OMPWS_SCALARIZER_WS
1780         bit in ompws_flags only if loop.temp_ss is NULL, and clear it if
1781         lhs needs reallocation.
1782         * trans-openmp.c (gfc_trans_omp_workshare): Don't return early if
1783         code is NULL, emit a barrier if workshare emitted no code at all
1784         and NOWAIT clause isn't present.
1786 2011-08-19  Mikael Morin  <mikael.morin@sfr.fr>
1788         PR fortran/50071
1789         * gfortran.h (gfc_exec_op): New constant EXEC_END_NESTED_BLOCK.
1790         * parse.c (check_statement_label): Accept ST_END_BLOCK and
1791         ST_END_ASSOCIATE as valid branch target.
1792         (accept_statement): Change EXEC_END_BLOCK to EXEC_END_NESTED_BLOCK.
1793         Add EXEC_END_BLOCK code in the ST_END_BLOCK and ST_END_ASSOCIATE cases.
1794         * resolve.c (find_reachable_labels): Change EXEC_END_BLOCK to
1795         EXEC_END_NESTED_BLOCK.
1796         (resolve_branch): Ditto.
1797         (resolve_code): Add EXEC_END_NESTED_BLOCK case.
1798         * st.c (gfc_free_statement): Ditto.
1799         * trans.c (trans_code): Ditto.
1801 2011-08-18  Mikael Morin  <mikael.morin@sfr.fr>
1803         PR fortran/50071
1804         * symbol.c (gfc_get_st_label): Use the derived type namespace when
1805         we are parsing a derived type definition.
1807 2011-08-18  Tobias Burnus  <burnus@net-b.de>
1809         PR fortran/18918
1810         * parse.c (parse_derived): Add lock_type
1811         checks, improve coarray_comp handling.
1812         * resolve.c (resolve_allocate_expr,
1813         resolve_lock_unlock, resolve_symbol): Fix lock_type
1814         constraint checks.
1816 2011-08-17  Tobias Burnus  <burnus@net-b.de>
1818         PR fortran/31461
1819         * trans-decl.c (generate_local_decl): Warn about
1820         unused explicitly imported module variables/parameters.
1822 2011-08-17  Janus Weil  <janus@gcc.gnu.org>
1824         PR fortran/50070
1825         * resolve.c (resolve_fl_variable): Reject non-constant character lengths
1826         in COMMON variables.
1828 2011-08-16  Tobias Burnus  <burnus@net-b.de>
1829             Dominique Dhumieres  <dominiq@lps.ens.fr>
1831         PR fortran/50094
1832         * resolve.c (resolve_symbol): Fix stupid typo.
1834 2011-08-15  Tobias Burnus  <burnus@net-b.de>
1836         * resolve.c (resolve_symbol): Fix coarray result-var check.
1838 2011-08-14  Steven G. Kargl  <kargl@gcc.gnu.org>
1840         * module.c (use_iso_fortran_env_module):  Spell 'referrenced' correctly.
1842 2011-08-14  Janus Weil  <janus@gcc.gnu.org>
1844         PR fortran/50073
1845         * decl.c (check_function_name): New function, separated off from
1846         'variable_decl' and slightly extended.
1847         (variable_decl,attr_decl1): Call it.
1849 2011-08-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1851         * Make-lang.in (gfortran$(exeext)): Add $(EXTRA_GCC_LIBS).
1853 2011-08-07  Janus Weil  <janus@gcc.gnu.org>
1854             Thomas Koenig  <tkoenig@gcc.gnu.org>
1856         PR fortran/49638
1857         * dependency.c (are_identical_variables): For dummy arguments only
1858         check for equal names, not equal symbols.
1859         * interface.c (gfc_check_typebound_override): Add checking for rank
1860         and character length.
1862 2011-08-07  Janus Weil  <janus@gcc.gnu.org>
1864         PR fortran/49638
1865         * dependency.h (gfc_is_same_range,gfc_are_identical_variables): Remove
1866         two prototypes.
1867         * dependency.c (gfc_are_identical_variables,are_identical_variables):
1868         Renamed the former to the latter and made static.
1869         (gfc_dep_compare_expr): Renamed 'gfc_are_identical_variables', handle
1870         commutativity of multiplication.
1871         (gfc_is_same_range,is_same_range): Renamed the former to the latter,
1872         made static and removed argument 'def'.
1873         (check_section_vs_section): Renamed 'gfc_is_same_range'.
1874         * gfortran.h (gfc_check_typebound_override): New prototype.
1875         * interface.c (gfc_check_typebound_override): Moved here from ...
1876         * resolve.c (check_typebound_override): ... here (and renamed).
1877         (resolve_typebound_procedure): Renamed 'check_typebound_override'.
1879 2011-08-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
1881         PR fortran/50004
1882         * target-memory.c (gfc_target_expr-size): Don't clobber typespec
1883         for derived types.
1884         * simplify.c (gfc_simplify_transfer): Don't calculate source_size
1885         twice.
1887 2011-08-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
1889         PR fortran/37211
1890         * gfortran.h (gfc_calculate_transfer_sizes):  Add prototype.
1891         * target-memory.h (gfc_target_interpret_expr):  Add boolean
1892         argument wether to convert wide characters.
1893         * target-memory.c (gfc_target_expr_size):  Also return length
1894         of characters for non-constant expressions if these can be
1895         determined from the cl.
1896         (interpret_array):  Add argument for gfc_target_interpret_expr.
1897         (gfc_interpret_derived):  Likewise.
1898         (gfc_target_interpret_expr):  Likewise.
1899         * check.c:  Include target-memory.h.
1900         (gfc_calculate_transfer_sizes):  New function.
1901         (gfc_check_transfer):  When -Wsurprising is in force, calculate
1902         sizes and warn if result is larger than size (check moved from
1903         gfc_simplify_transfer).
1904         * simplify.c (gfc_simplify_transfer):  Use
1905         gfc_calculate_transfer_sizes.  Remove warning.
1907 2011-08-04  Richard Guenther  <rguenther@suse.de>
1909         PR fortran/49957
1910         * trans-array.c (add_to_offset): New function.
1911         (gfc_conv_array_ref): Build the array index expression in optimally
1912         associated order.
1913         (gfc_walk_variable_expr): Adjust for the backward walk.
1915 2011-08-02  Daniel Kraft  <d@domob.eu>
1917         PR fortran/49885
1918         * trans-array.c (gfc_trans_auto_array_allocation): Change
1919         gfc_start_block to gfc_init_block to avoid spurious extra-scope.
1921 2011-08-02  Tobias Burnus  <burnus@net-b.de>
1923         * trans-array.c (gfc_array_allocate): Pass token to
1924           gfc_allocate_allocatable for -fcoarray=lib.
1925         * trans-stmt.c (gfc_trans_allocate): Update
1926         gfc_allocate_allocatable call.
1927         * trans.h (gfc_allocate_allocatable): Update prototype.
1928         (gfc_allocate_using_lib): Remove.
1929         * trans.c (gfc_allocate_using_lib): Make static, handle token.
1930         (gfc_allocate_allocatable): Ditto.
1932 2011-08-02  Jakub Jelinek  <jakub@redhat.com>
1934         PR fortran/46752
1935         * cpp.c (cpp_define_builtins): Change _OPENMP to 201107.
1936         * openmp.c (gfc_free_omp_clauses): Free also final_expr.
1937         (OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE): Define.
1938         (gfc_match_omp_clauses): Handle parsing final and mergeable
1939         clauses.
1940         (OMP_TASK_CLAUSES): Allow final and mergeable clauses.
1941         (gfc_match_omp_taskyield): New function.
1942         (resolve_omp_clauses): Resolve final clause.  Allow POINTERs and
1943         Cray pointers in clauses other than REDUCTION.
1944         (gfc_match_omp_atomic): Match optional
1945         read/write/update/capture keywords after !$omp atomic.
1946         (resolve_omp_atomic): Handle all OpenMP 3.1 atomic forms.
1947         * dump-parse-tree.c (show_omp_node): Handle EXEC_OMP_TASKYIELD,
1948         print final and mergeable clauses.
1949         (show_code_node): Handle EXEC_OMP_TASKYIELD.
1950         * trans-openmp.c (gfc_trans_omp_clauses): Handle final and
1951         mergeable clauses.
1952         (gfc_trans_omp_taskyield): New function.
1953         (gfc_trans_omp_directive): Handle EXEC_OMP_TASKYIELD.
1954         (gfc_trans_omp_atomic): Handle all OpenMP 3.1 atomic forms.
1955         (gfc_omp_clause_copy_ctor): Handle non-allocated allocatable.
1956         (gfc_omp_predetermined_sharing): Adjust comment.
1957         * gfortran.h (gfc_statement): Add ST_OMP_TASKYIELD and
1958         ST_OMP_END_ATOMIC.
1959         (gfc_omp_clauses): Add final_expr and mergeable fields.
1960         (gfc_exec_op): Add EXEC_OMP_TASKYIELD.
1961         (gfc_omp_atomic_op): New enum typedef.
1962         (struct gfc_code): Add ext.omp_atomic.
1963         * trans.c (trans_code): Handle EXEC_OMP_TASKYIELD.
1964         * frontend-passes.c (gfc_code_walker): Also walk final_expr.
1965         * resolve.c (gfc_resolve_blocks, resolve_code): Handle
1966         EXEC_OMP_TASKYIELD.
1967         * st.c (gfc_free_statement): Likewise.
1968         * match.h (gfc_match_omp_taskyield): New prototype.
1969         * parse.c (decode_omp_directive): Handle taskyield directive.
1970         Handle !$omp end atomic.
1971         (case_executable): Add ST_OMP_TASKYIELD case.
1972         (gfc_ascii_statement): Handle ST_OMP_TASKYIELD.
1973         (parse_omp_atomic): Return gfc_statement instead of void.
1974         For !$omp atomic capture parse two assignments instead of
1975         just one and require !$omp end atomic afterwards, for
1976         other !$omp atomic forms just allow !$omp end atomic at the
1977         end.
1978         (parse_omp_structured_block, parse_executable): Adjust
1979         parse_omp_atomic callers.
1981 2011-08-02  Tobias Burnus  <burnus@net-b.de>
1983         * intrinsic.c (OMP_LIB): Updated openmp_version's
1984         value to 201107.
1985         * gfortran.texi (OpenMP): Update ref to OpenMP 3.1.
1986         * intrinsic.texi (OpenMP Modules): Update ref to OpenMP 3.1;
1987         remove deleted omp_integer_kind and omp_logical_kind constants.
1989 2011-07-31  Janus Weil  <janus@gcc.gnu.org>
1991         PR fortran/49112
1992         * resolve.c (resolve_structure_cons): Don't do the full dt resolution,
1993         only call 'resolve_fl_derived0'.
1994         (resolve_typebound_procedures): Resolve typebound procedures of
1995         parent type.
1996         (resolve_fl_derived0): New function, which does a part of the work
1997         for 'resolve_fl_derived'.
1998         (resolve_fl_derived): Call 'resolve_fl_derived0' and do some additional
1999         things.
2001 2011-07-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
2003         PR fortran/48876
2004         * expr.c (gfc_simplify_expr):  If end of a string is less
2005         than zero, set it to zero.
2007 2011-07-28  Jakub Jelinek  <jakub@redhat.com>
2009         PR fortran/31067
2010         * frontend-passes.c (optimize_minmaxloc): New function.
2011         (optimize_expr): Call it.
2013 2011-07-27  Tobias Burnus  <burnus@net-b.de>
2015         PR fortran/45586
2016         * trans-types.c (gfc_get_derived_type): Ensure that pointer
2017         component types are marked as nonrestricted.
2019 2011-07-27  Daniel Carrera  <dcarrera@gmail.com>
2021         PR fortran/49755
2022         * trans.c (gfc_allocate_using_malloc): Change function signature.
2023         Return nothing. New parameter "pointer". Eliminate temorary variables. 
2024         (gfc_allocate_using_lib): Ditto.
2025         (gfc_allocate_allocatable): Ditto. Update call to gfc_allocate_using_lib
2026         and gfc_allocate_using_malloc. Do not free and then reallocate a
2027         variable that is already allocated.
2028         (gfc_likely): New function. Basedon gfc_unlikely.
2029         * trans-array.c (gfc_array_init_size): New parameter "descriptor_block".
2030         Instructions to modify the array descriptor are stored in this block
2031         while other instructions continue to be stored in "pblock".
2032         (gfc_array_allocate): Update call to gfc_array_init_size. Move the
2033         descriptor_block so that the array descriptor is only updated if
2034         the array was allocated successfully.
2035         Update calls to gfc_allocate_allocatable and gfc_allocate_using_malloc.
2036         * trans.h (gfc_allocate_allocatable): Change function signature.
2037         Function now returns void.
2038         (gfc_allocate_using_lib): Ditto, and new function parameter.
2039         (gfc_allocate_using_malloc): Ditto.
2040         * trans-openmp.c (gfc_omp_clause_default_ctor,
2041         gfc_omp_clause_copy_ctor,gfc_trans_omp_array_reduction): Replace a call
2042         to gfc_allocate_allocatable with gfc_allocate_using_malloc.
2043         * trans-stmt.c (gfc_trans_allocate): Update function calls for
2044         gfc_allocate_allocatable and gfc_allocate_using_malloc.
2046 2011-07-26  Tobias Burnus  <burnus@net-b.de>
2048         * trans-array.c (CAF_TOKEN_FIELD): New macro constant.
2049         (gfc_conv_descriptor_token): New function.
2050         * trans-array.h (gfc_conv_descriptor_token): New prototype.
2051         * trans-types.c (gfc_get_array_descriptor_base): For coarrays
2052         with -fcoarray=lib, append "void *token" to the array descriptor.
2053         (gfc_array_descriptor_base_caf): New static variable.
2054         * trans-expr.c (gfc_conv_procedure_call): Handle token and offset
2055         when passing a descriptor coarray to a nondescriptor dummy. 
2057 2011-07-23  Tobias Burnus  <burnus@net-b.de>
2059         * resolve.c (resolve_symbol): Fix coarray var decl check.
2061 2011-07-21  Daniel Carrera  <dcarrera@gmail.com>
2063         * trans.c (gfc_allocate_with_status): Split into two functions
2064         gfc_allocate_using_malloc and gfc_allocate_usig_lib.
2065         (gfc_allocate_using_malloc): The status parameter is now the
2066         actual status rather than a pointer. Code cleanup.
2067         (gfc_allocate_using_lib): Ditto. Add new parametrs errmsg and
2068         errlen. Pass these to the coarray lib.
2069         * trans-openmp.c (gfc_omp_clause_default_ctor): Update calls to
2070         gfc_allocate_allocatable.
2071         (gfc_omp_clause_copy_ctor): Ditto.
2072         (gfc_trans_omp_array_reduction): Ditto.
2073         * trans-stmt.c (gfc_trans_allocate): Ditto. Update call to
2074         gfc_allocate_using_malloc. Pass stat rather than pstat to the allocate
2075         fuctions. If using coarray lib, pass errmsg and errlen to the allocate
2076         functions. Move error checking outside the if (!gfc_array_allocate)
2077         block so that it also affects trees produced by gfc_array_allocate.
2078         * trans-array.c (gfc_array_allocate): Add new parameters errmsg
2079         and errlen. Replace parameter pstat by status. Code cleanup. Update
2080         calls to gfc_allocate_allocatable and gfc_allocate_using_malloc.
2081         * trans-array.h (gfc_array_allocate): Update signature of
2082         gfc_array_allocate.
2084 2011-07-21  Steven G. Kargl  <kargl@gcc.gnu.org>
2086         * gfortran.texi: Remove a duplicate word.
2088 2011-07-21  Tobias Burnus  <burnus@net-b.de>
2090         * check.c (gfc_check_present): Allow coarrays.
2091         * trans-array.c (gfc_conv_array_ref): Avoid casting
2092         when a pointer is wanted.
2093         * trans-decl.c (create_function_arglist): For -fcoarray=lib,
2094         handle hidden token and offset arguments for nondescriptor
2095         coarrays.
2096         * trans-expr.c (get_tree_for_caf_expr): New function.
2097         (gfc_conv_procedure_call): For -fcoarray=lib pass the
2098         token and offset for nondescriptor coarray dummies.
2099         * trans.h (lang_type): Add caf_offset tree.
2100         (GFC_TYPE_ARRAY_CAF_OFFSET): New macro.
2102 2011-07-19  Tobias Burnus  <burnus@net-b.de>
2104         * expr.c (gfc_is_coarray): New function.
2105         * gfortran.h (gfc_is_coarray): New prototype.
2106         * interface.c (compare_parameter): Use it.
2108 2011-07-19  Richard Guenther  <rguenther@suse.de>
2110         * trans-expr.c (fill_with_spaces): Use fold_build_pointer_plus.
2111         (gfc_trans_string_copy): Likewise.
2112         * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Likewise.
2113         * trans-types.c (gfc_get_array_descr_info): Likewise.
2114         * trans.c (gfc_build_array_ref): Likewise.
2116 2011-07-19  Janus Weil  <janus@gcc.gnu.org>
2118         PR fortran/49708
2119         * resolve.c (resolve_allocate_expr): Fix diagnostics for pointers.
2121 2011-07-18  Tobias Burnus  <burnus@net-b.de>
2123         * trans-decl.c (gfc_build_qualified_array): Make coarray's
2124         token TYPE_QUAL_RESTRICT.
2126 2011-07-18  Tobias Burnus  <burnus@net-b.de>
2128         * resolve.c (resolve_transfer): Mention defined I/O
2129         in the diagnostic for alloc_comp/pointer_comp.
2131 2011-07-17  Tobias Burnus  <burnus@net-b.de>
2133         PR fortran/34657
2134         * module.c (check_for_ambiguous): Check whether the name is matches
2135         the current program unit.
2137 2011-07-17  Tobias Burnus  <burnus@net-b.de>
2139         PR fortran/49624
2140         * expr.c (gfc_check_pointer_assign): Fix checking for invalid
2141         pointer bounds.
2143 2011-07-16  Tobias Burnus  <burnus@net-b.de>
2144         
2145         * expr.c (gfc_ref_this_image): New function.
2146         (gfc_is_coindexed): Use it.
2147         * gfortran.h (gfc_ref_this_image): New prototype.
2148         * resolve.c (resolve_deallocate_expr,
2149         resolve_allocate_expr): Support alloc scalar coarrays.
2150         * trans-array.c (gfc_conv_array_ref, gfc_array_init_size,
2151         gfc_conv_descriptor_cosize, gfc_array_allocate,
2152         gfc_trans_deferred_array): Ditto.
2153         * trans-expr.c (gfc_conv_variable) Ditto.:
2154         * trans-stmt.c (gfc_trans_deallocate): Ditto.
2155         * trans-types.c (gfc_get_element_type, gfc_get_array_type_bounds
2156         gfc_get_array_descr_info): Ditto.
2157         * trans-decl.c (gfc_get_symbol_decl): Ditto.
2159 2011-07-11  Jakub Jelinek  <jakub@redhat.com>
2161         PR fortran/49698
2162         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Initialize
2163         inner_size to gfc_index_one_node instead of integer_one_node.
2165 2011-07-10  Tobias Burnus  <burnus@net-b.de>
2167         PR fortran/49690
2168         * intrinsic.c (add_functions): Use BT_VOID for 2nd argument of SIGNAL.
2170 2011-07-09  Uros Bizjak  <ubizjak@gmail.com>
2172         PR fortran/48926
2173         * expr.c (gfc_get_corank): Change return value to int.
2174         * gfortran.h (gfc_get_corank): Update function prototype.
2176 2011-07-07  Mikael Morin  <mikael.morin@sfr.fr>
2178         PR fortran/49648
2179         * resolve.c (resolve_symbol): Force resolution of function result's
2180         array specification.
2182 2011-07-07  Tobias Burnus  <burnus@net-b.de>
2184         * trans.c (gfc_allocate_with_status): Call _gfortran_caf_register
2185         with NULL arguments for (new) stat=/errmsg= arguments.
2187 2011-07-06  Daniel Carrera  <dcarrera@gmail.com>
2189         * trans-array.c (gfc_array_allocate): Rename allocatable_array to
2190         allocatable. Rename function gfc_allocate_array_with_status to
2191         gfc_allocate_allocatable_with_status. Update function call for
2192         gfc_allocate_with_status.
2193         * trans-opemp.c (gfc_omp_clause_default_ctor): Rename function
2194         gfc_allocate_array_with_status to gfc_allocate_allocatable_with_status.
2195         * trans-stmt.c (gfc_trans_allocate): Update function call for
2196         gfc_allocate_with_status. Rename function gfc_allocate_array_with_status
2197         to gfc_allocate_allocatable_with_status.
2198         * trans.c (gfc_call_malloc): Add new parameter gfc_allocate_with_status
2199         so it uses the library for memory allocation when -fcoarray=lib.
2200         (gfc_allocate_allocatable_with_status): Renamed from
2201         gfc_allocate_array_with_status.
2202         (gfc_allocate_allocatable_with_status): Update function call for
2203         gfc_allocate_with_status.
2204         * trans.h (gfc_coarray_type): New enum.
2205         (gfc_allocate_with_status): Update prototype.
2206         (gfc_allocate_allocatable_with_status): Renamed from
2207         gfc_allocate_array_with_status.
2208         * trans-decl.c (generate_coarray_sym_init): Use the new constant
2209         GFC_CAF_COARRAY_ALLOC in the call to gfor_fndecl_caf_register.
2211 2011-07-06  Richard Guenther  <rguenther@suse.de>
2213         * f95-lang.c (gfc_init_decl_processing):
2214         Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
2216 2011-07-04  Jakub Jelinek  <jakub@redhat.com>
2218         PR fortran/49623
2219         * gfortranspec.c (lang_specific_driver): Ignore options with
2220         CL_ERR_MISSING_ARG errors.
2222 2011-07-02  Janus Weil  <janus@gcc.gnu.org>
2224         PR fortran/49562
2225         * expr.c (gfc_check_vardef_context): Handle type-bound procedures.
2227 2011-06-30  Jakub Jelinek  <jakub@redhat.com>
2229         PR fortran/49540
2230         * gfortran.h (gfc_constructor): Add repeat field.
2231         * trans-array.c (gfc_conv_array_initializer): Handle repeat > 1.
2232         * array.c (current_expand): Add repeat field.
2233         (expand_constructor): Copy repeat.
2234         * constructor.c (node_free, node_copy, gfc_constructor_get,
2235         gfc_constructor_lookup): Handle repeat field.
2236         (gfc_constructor_lookup_next, gfc_constructor_remove): New functions.
2237         * data.h (gfc_assign_data_value): Add mpz_t * argument.
2238         (gfc_assign_data_value_range): Removed.
2239         * constructor.h (gfc_constructor_advance): Removed.
2240         (gfc_constructor_lookup_next, gfc_constructor_remove): New prototypes.
2241         * data.c (gfc_assign_data_value): Add REPEAT argument, handle it and
2242         also handle overwriting a range with a single entry.
2243         (gfc_assign_data_value_range): Removed.
2244         * resolve.c (check_data_variable): Adjust gfc_assign_data_value
2245         call.  Use gfc_assign_data_value instead of
2246         gfc_assign_data_value_expr.
2248 2011-06-27  Janus Weil  <janus@gcc.gnu.org>
2250         PR fortran/49466
2251         * trans-array.c (structure_alloc_comps): Make sure sub-components
2252         and extended types are correctly deallocated.
2254 2011-06-21  Andrew MacLeod  <amacleod@redhat.com>
2256         * trans-openmp.c: Add sync_ or SYNC__ to builtin names.
2257         * trans-stmt.c: Add sync_ or SYNC__ to builtin names.
2258         * trans-decl.c: Add sync_ or SYNC__ to builtin names.
2260 2011-06-21  Janus Weil  <janus@gcc.gnu.org>
2262         PR fortran/49112
2263         * class.c (gfc_find_derived_vtab): Make vtab and default initialization
2264         symbols SAVE_IMPLICIT.
2266 2011-06-20  Tobias Burnus  <burnus@net-b.de>
2268         PR fortran/18918
2269         * gfortran.h (gfc_check_vardef_context): Update prototype.
2270         (iso_fortran_env_symbol): Handle derived types.
2271         (symbol_attribute): Add lock_comp.
2272         * expr.c (gfc_check_vardef_context): Add LOCK_TYPE check.
2273         * interface.c (compare_parameter, gfc_procedure_use): Handle
2274         LOCK_TYPE.
2275         (compare_actual_formal): Update
2276         gfc_check_vardef_context call.
2277         * check.c (gfc_check_atomic_def, gfc_check_atomic_ref): Ditto.
2278         * intrinsic.c (check_arglist): Ditto.
2279         * io.c (resolve_tag, gfc_resolve_dt, gfc_resolve_inquire): Ditto.
2280         * iso-fortran-env.def (ISOFORTRAN_LOCK_TYPE): Add.
2281         * intrinsic.texi (ISO_FORTRAN_ENV): Document LOCK_TYPE.
2282         * module.c (mio_symbol_attribute): Handle lock_comp.
2283         (create_derived_type): New function.
2284         (use_iso_fortran_env_module): Call it to handle LOCK_TYPE.
2285         * parse.c (parse_derived): Add constraint check for LOCK_TYPE.
2286         * resolve.c (resolve_symbol, resolve_lock_unlock): Add constraint
2287         checks for LOCK_TYPE.
2288         (gfc_resolve_iterator, resolve_deallocate_expr,
2289         resolve_allocate_expr, resolve_code, resolve_transfer): Update
2290         gfc_check_vardef_context call.
2291         * trans-stmt.h (gfc_trans_lock_unlock): New prototype.
2292         * trans-stmt.c (gfc_trans_lock_unlock): New function.
2293         * trans.c (trans_code): Handle LOCK and UNLOCK.
2295 2011-06-18  Janus Weil  <janus@gcc.gnu.org>
2297         PR fortran/49400
2298         * decl.c (gfc_match_procedure): Allow PROCEDURE declarations inside
2299         BLOCK constructs.
2301 2011-06-17  Janus Weil  <janus@gcc.gnu.org>
2303         PR fortran/48699
2304         * check.c (gfc_check_move_alloc): If 'TO' argument is polymorphic,
2305         make sure the vtab is present.
2307 2011-06-16  Janus Weil  <janus@gcc.gnu.org>
2309         PR fortran/49074
2310         * interface.c (gfc_extend_assign): Propagate the locus from the
2311         assignment to the type-bound procedure call.
2313 2011-06-16  Janus Weil  <janus@gcc.gnu.org>
2315         PR fortran/49417
2316         * module.c (mio_component): Make sure the 'class_ok' attribute is set
2317         for use-associated CLASS components.
2318         * parse.c (parse_derived): Check for 'class_ok' attribute.
2319         * resolve.c (resolve_fl_derived): Ditto.
2321 2011-06-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
2323         * frontend-passes.c (remove_trim):  New function.
2324         (optimize_assignment):  Use it.
2325         (optimize_comparison):  Likewise.  Return correct status
2326         for previous change.
2328 2011-06-12  Tobias Burnus
2330         PR fortran/49324
2331         * trans-expr.c (gfc_trans_assignment_1): Tell
2332         gfc_trans_scalar_assign to also deep-copy RHS nonvariables
2333         with allocatable components.
2334         * trans-array.c (gfc_conv_expr_descriptor): Ditto.
2336 2011-05-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
2338         * frontend-passes.c (optimize_assignment): Follow chains
2339         of concatenation operators to the end for removing trailing
2340         TRIMS for assignments.
2342 2011-06-10  Daniel Carrera  <dcarrera@gmail.com>
2344         * trans-decl.c (gfc_build_builtin_function_decls):
2345         Updated declaration of caf_sync_all and caf_sync_images.
2346         * trans-stmt.c (gfc_trans_sync): Function
2347         can now handle a "stat" variable that has an integer type
2348         different from integer_type_node.
2350 2011-06-09  Richard Guenther  <rguenther@suse.de>
2352         * trans.c (gfc_allocate_array_with_status): Mark error path
2353         as unlikely.
2355 2011-06-08  Tobias Burnus  <burnus@net-b.de>
2357         PR fortran/18918
2358         * gfortran.h (gfc_statement): Add ST_LOCK and ST_UNLOCK.
2359         (gfc_exec_op): Add EXEC_LOCK and EXEC_UNLOCK.
2360         (gfc_code): Add expr4.
2361         * match.h (gfc_match_lock, gfc_match_unlock): New prototypes.
2362         * match.c (gfc_match_lock, gfc_match_unlock,
2363         lock_unlock_statement): New functions.
2364         (sync_statement): Bug fix, avoiding double freeing.
2365         (gfc_match_if): Handle LOCK/UNLOCK statement.
2366         * parse.c (decode_statement, next_statement,
2367         gfc_ascii_statement): Ditto.
2368         * st.c (gfc_free_statement): Handle LOCK and UNLOCK.
2369         * resolve.c (resolve_lock_unlock): New function.
2370         (resolve_code): Call it.
2371         * dump-parse-tree.c (show_code_node): Handle LOCK/UNLOCK.
2373 2011-06-07  Richard Guenther  <rguenther@suse.de>
2375         * f95-lang.c (gfc_init_decl_processing): Do not set
2376         size_type_node or call set_sizetype.
2378 2011-06-05  Tobias Burnus  <burnus@net-b.de>
2380         PR fortran/49255
2381         * trans-expr.c (gfc_conv_procedure_call): Fix -fcheck=pointer
2382         for F2008.
2384 2011-06-05  Andreas Schmidt  <andreas.schmidt.42@gmx.net>
2385         Thomas Koenig  <tkoenig@gcc.gnu.org>
2387         * dump-parse-tree.c (show_symbol):  Don't dump namespace
2388         for ENTRY to avoid infinite recursion.
2390 2011-06-02  Asher Langton  <langton2@llnl.gov>
2392         PR fortran/49268
2393         * trans-decl.c (gfc_trans_deferred_vars): Treat assumed-size Cray
2394         pointees as AS_EXPLICIT.
2396 2011-06-02  Asher Langton  <langton2@llnl.gov>
2398         PR fortran/37039
2399         * decl.c (variable_decl): Merge current_as before copying to cp_as.
2401 2011-06-02  Steven G. Kargl  <kargl@gcc.gnu.org>
2403         PR fortran/49265
2404         * decl.c (gfc_match_modproc):  Allow for a double colon in a module
2405         procedure statement.
2406         * parse.c ( decode_statement): Deal with whitespace around :: in
2407         gfc_match_modproc.
2409 2011-05-31  Tobias Burnus  <burnus@net-b.de>
2411         PR fortran/18918
2412         * intrinsic.c (klass): Add CLASS_ATOMIC.
2413         (add_subroutines): Add atomic_ref/atomic_define.
2414         * intrinsic.texi (ATOMIC_REF, ATOMIC_DEFINE): Document.
2415         * intrinsic.h (gfc_check_atomic_def, gfc_check_atomic_ref,
2416         gfc_resolve_atomic_def, gfc_resolve_atomic_ref): New prototypes.
2417         * gfortran.h (gfc_isym_id): Add GFC_ISYM_ATOMIC_DEF
2418         and GFC_ISYM_ATOMIC_REF.
2419         (gfc_atomic_int_kind, gfc_atomic_logical_kind): New global vars.
2420         * iresolve.c (gfc_resolve_atomic_def, gfc_resolve_atomic_ref): New
2421         functions.
2422         * check.c (gfc_check_atomic, gfc_check_atomic_def,
2423         gfc_check_atomic_ref): New functions.
2424         * iso-fortran-env.def (ISOFORTRANENV_FILE_ATOMIC_INT_KIND,
2425         ISOFORTRANENV_FILE_ATOMIC_LOGICAL_KIND): Change kind value.
2426         * trans-intrinsic.c (conv_intrinsic_atomic_def,
2427         conv_intrinsic_atomic_ref, gfc_conv_intrinsic_subroutine): New
2428         functions.
2429         (conv_intrinsic_move_alloc) Renamed from
2430         gfc_conv_intrinsic_move_alloc - and made static.
2431         * trans.h (gfc_conv_intrinsic_move_alloc): Remove.
2432         (gfc_conv_intrinsic_subroutine) Add prototype.
2433         * trans.c (trans_code): Call gfc_conv_intrinsic_subroutine.
2434         * trans-types (gfc_atomic_int_kind, gfc_atomic_logical_kind): New
2435         global vars.
2436         (gfc_init_kinds): Set them.
2438 2011-05-31  Tobias Burnus  <burnus@net-b.de>
2440         PR fortran/18918
2441         * trans-array.c (gfc_trans_dummy_array_bias): Handle
2442         cobounds of assumed-shape arrays.
2444 2011-05-31  Tobias Burnus  <burnus@net-b.de>
2446         PR fortran/18918
2447         * resolve.c (resolve_fl_variable): Handle static coarrays
2448         with non-constant cobounds.
2450 2011-05-29  Janus Weil  <janus@gcc.gnu.org>
2452         PR fortran/47601
2453         * module.c (mio_component_ref): Handle components of extended types.
2454         * symbol.c (gfc_find_component): Return is sym is NULL.
2456 2011-05-29  Tobias Burnus  <burnus@net-b.de>
2458         PR fortran/18918
2459         * interface.c (compare_parameter): Add check for passing coarray
2460         to allocatable noncoarray dummy.
2462 2011-05-29  Tobias Burnus  <burnus@net-b.de>
2463             Richard Guenther  <rguenther@suse.de>
2465         PR fortran/18918
2466         * trans-types.c (gfc_get_nodesc_array_type): Don't mess with
2467         the type's TREE_TYPE.
2468         * trans-array.c (gfc_conv_array_ref): Use TYPE_MAIN_VARIANT.
2469         * trans.c (gfc_build_array_ref): Ditto.
2471 2011-05-27  Tobias Burnus  <burnus@net-b.de>
2473         PR fortran/18918
2474         * check.c (gfc_check_associated, gfc_check_null): Add coindexed check.
2475         * match.c (gfc_match_nullify): Ditto.
2476         * resolve.c (resolve_deallocate_expr): Ditto.
2477         * trans-types.c (gfc_get_nodesc_array_type): Don't set restricted
2478         for nonpointers.
2480 2011-05-27  Tobias Burnus  <burnus@net-b.de>
2482         PR fortran/48820
2483         * gfortran.h (gfc_isym_id): Add GFC_ISYM_RANK.
2484         * intrinsic.c (add_functions): Add rank intrinsic.
2485         (gfc_check_intrinsic_standard): Handle GFC_STD_F2008_TR.
2486         * intrinsic.h (gfc_simplify_rank, gfc_check_rank): Add prototypes.
2487         * simplify.c (gfc_simplify_rank): New function.
2488         * intrinsic.texi (RANK): Add description for rank intrinsic.
2489         * check.c (gfc_check_rank): New function.
2491 2011-05-26  Paul Thomas  <pault@gcc.gnu.org>
2492             Thomas Koenig  <tkoenig@gcc.gnu.org>
2494         PR fortran/48955
2495         * trans-expr.c (gfc_trans_assignment_1): GFC_REVERSE_NOT_SET
2496         changed to GFC_ENABLE_REVERSE.
2497         * trans-array.c (gfc_init_loopinfo): GFC_CANNOT_REVERSE changed
2498         to GFC_INHIBIT_REVERSE.
2499         * gfortran.h: Enum gfc_reverse is now GFC_ENABLE_REVERSE,
2500         GFC_FORWARD_SET, GFC_REVERSE_SET and GFC_INHIBIT_REVERSE.
2501         * dependency.c (gfc_dep_resolver): Change names for elements of
2502         gfc_reverse as necessary. Change the logic so that forward
2503         dependences are remembered as well as backward ones. When both
2504         have appeared, force a temporary.
2506 2011-05-26  Tobias Burnus  <burnus@net-b.de>
2508         PR fortran/18918
2509         * trans-array.c (gfc_conv_array_ref): Handle pointer coarrays.
2510         * trans-decl.c (has_coarray_vars, caf_init_block,
2511         gfor_fndecl_caf_register): New file-global variables.
2512         (gfc_finish_var_decl): Make sure that coarrays in main are static.
2513         (gfc_build_qualified_array): Generate coarray token variable.
2514         (gfc_get_symbol_decl): Don't use a static initializer for coarrays.
2515         (gfc_build_builtin_function_decls): Set gfor_fndecl_caf_register.
2516         (gfc_trans_deferred_vars, gfc_emit_parameter_debug_info): Skip for
2517         static coarrays.
2518         (generate_local_decl): Check for local coarrays.
2519         (create_main_function): SYNC ALL before calling MAIN.
2520         (generate_coarray_sym_init): Register static coarray.
2521         (generate_coarray_init): Generate CAF registering constructor
2522         function.
2523         (gfc_generate_function_code): Call it, if needed, do not create
2524         cgraph twice.
2525         (gfc_generate_module_vars, gfc_process_block_locals): Call
2526         generate_coarray_init.
2527         * trans-types.c (gfc_get_nodesc_array_type): Generate pointers for
2528         -fcoarray=lib.
2529         * trans.h (gfor_fndecl_caf_register): New variable.
2530         (lang_type): New element caf_token.
2531         (GFC_TYPE_ARRAY_CAF_TOKEN): New macro.
2533 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
2535         * Make-lang.in (GFORTRAN_D_OBJS): Remove prefix.o.
2536         (gfortran$(exeext)): Use libcommon-target.a.
2538 2011-05-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
2540         * frontend-passes.c (cfe_register_funcs):  Also register
2541         character functions if their charlens are known and constant.
2542         Also register allocatable functions.
2544 2011-05-21  Janus Weil  <janus@gcc.gnu.org>
2546         PR fortran/48699
2547         * match.c (select_type_set_tmp): Make the temporary ALLOCATABLE if the
2548         selector is ALLOCATABLE.
2550 2011-05-20  Janus Weil  <janus@gcc.gnu.org>
2552         PR fortran/48706
2553         * module.c (write_dt_extensions): Do not write extended types which
2554         are local to a subroutine.
2556 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
2558         * Make-lang.in (GFORTRAN_D_OBJS): Remove version.o and intl.o.
2560 2011-05-20  Janne Blomqvist  <jb@gcc.gnu.org>
2562         * gfortran.texi (set_fpe): Update documentation.
2563         * invoke.texi (-ffpe-trap): Likewise.
2564         * libgfortran.h (GFC_FPE_PRECISION): Rename to GFC_FPE_INEXACT.
2565         * options.c (gfc_handle_fpe_trap_option): Handle inexact and make
2566         precision an alias for it.
2568 2011-05-19  Tobias Burnus  <burnus@net-b.de>
2570         PR fortran/18918
2571         * trans-types.c (gfc_get_element_type): Handle scalar coarrays.
2572         (gfc_get_nodesc_array_type): Make a variant-type copy for scalar
2573         coarrays.
2574         * trans.c (gfc_build_array_ref): Return original type not variant
2575         copy for scalar coarrays.
2576         * trans-array.c (gfc_conv_array_ref): Ditto.
2578 2011-05-18  Janus Weil  <janus@gcc.gnu.org>
2580         PR fortran/48700
2581         * trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): Deallocate 'TO'
2582         argument to avoid memory leaks.
2584 2011-05-16  Tobias Burnus  <burnus@net-b.de>
2586         * gfortran.texi (_gfortran_set_options): Add GFC_STD_F2008_TR.
2587         (Fortran 2008 status): Multi-image support for coarrays.
2588         (TR 19113 status): New section.
2590 2011-05-15  Tobias Burnus  <burnus@net-b.de>
2592         PR fortran/18918
2593         actual argument is not an array; rank mismatch is diagnosted later.
2594         * trans-decl.c (gfc_get_symbol_decl, gfc_trans_deferred_vars): Handle
2595         scalar coarrays.
2596         * trans-types.c (gfc_get_array_type_bounds): Ditto.
2598 2011-05-15  Joern Rennecke  <amylaar@spamcop.net>
2600         PR middle-end/46500
2601         * trans-types.c: Include "tm.h".
2602         [0] (c_size_t_size): Remove.
2604 2011-05-15  Janne Blomqvist  <jb@gcc.gnu.org>
2606         PR libfortran/48915
2607         * gfortran.texi (_gfortran_set_options): Even though -fbacktrace
2608         is now the default, the library defaults to backtracing disabled.
2610 2011-05-14  Tobias Burnus  <burnus@net-b.de>
2612         * lang.opt (fdump-core): Re-add as ignored option
2613         for backward compatibility.
2615 2011-05-14  Janne Blomqvist  <jb@gcc.gnu.org>
2617         PR libfortran/48915
2618         * gfortran.texi: Update mixed-language programming section
2619         reflecting the removal of the fdump-core option, and that
2620         -fbacktrace is now enabled by default.
2622 2011-05-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
2624         PR fortran/22572
2625         * frontend-passes.c (cfe_register_funcs):  Also register functions
2626         for potential elimination if the rank is > 0, the shape is unknown
2627         and reallocate on assignment is active.
2628         (create_var):  For rank > 0 functions with unknown shape, create
2629         an allocatable temporary.
2631 2011-05-14  Tobias Burnus  <burnus@net-b.de>
2633         PR fortran/18918
2634         * interface.c (compare_parameter): Skip diagnostic if
2635         actual argument is not an array; rank mismatch is diagnosted later.
2637 2011-05-14  Tobias Burnus  <burnus@net-b.de>
2639         * options.c (gfc_init_options, gfc_post_options): Enable
2640         -fstack-arrays by default if -Ofast is used.
2641         * invoke.texi (-fstack-arrays): Document this.
2643 2011-05-14  Janne Blomqvist  <jb@gcc.gnu.org>
2645         PR libfortran/48915
2646         * gfortran.h (gfc_option_t): Remove flag_dump_core.
2647         * gfortran.texi (GFORTRAN_ERROR_DUMPCORE): Remove section.
2648         (GFORTRAN_ERROR_BACKTRACE): Document that it's enabled by default.
2649         * intrinsic.texi (ABORT): Remove explanation of -fdump-core.
2650         * invoke.texi: Remove -fdump-core, document that -fbacktrace is
2651         enabled by default.
2652         * lang.opt: Remove -fdump-core.
2653         * options.c (gfc_init_options): Make backtrace default to enabled,
2654         remove dump_core.
2655         (gfc_handle_option): Remove OPT_fdump-core.
2656         * trans-decl.c: Pass a 0 to preserve ABI.
2658 2011-05-14  Janne Blomqvist  <jb@gcc.gnu.org>
2660         * gfortran.texi: Remove GFORTRAN_USE_STDERR documentation.
2662 2011-05-13  Tobias Burnus  <burnus@net-b.de>
2664         PR fortran/48972
2665         * io.c (resolve_tag_format, resolve_tag): Make sure
2666         that the string is of default kind.
2667         (gfc_resolve_inquire): Also resolve decimal tag.
2669 2011-05-12  Tobias Burnus  <burnus@net-b.de>
2671         PR fortran/48972
2672         * resolve.c (resolve_intrinsic): Don't resolve module
2673         intrinsics multiple times.
2675 2011-05-11  Tobias Burnus  <burnus@net-b.de>
2677         PR fortran/48889
2678         * expr.c (gfc_is_constant_expr): Use e->value.function.esym
2679         instead of e->symtree->n.sym, if available.
2681 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
2683         * f95-lang.c (global_bindings_p): Return bool and simplify.
2685 2011-05-07  Tobias Burnus  <burnus@net-b.de>
2687         PR fortran/18918
2688         PR fortran/48919
2689         * trans.h: Move gfc_init_coarray_decl prototype ...
2690         * gfortran.h: ... to here.
2691         * parse.c (translate_all_program_units): Call gfc_init_coarray_decl.
2692         (gfc_parse_file): Update translate_all_program_units call.
2693         * trans-decl.c (gfc_init_coarray_decl): Fix variable declaration,
2694         new argument whether DECL_EXTERNAL should be used.
2695         (create_main_function): Update gfc_init_coarray_decl call.
2696         * trans-intrinsic.c (trans_this_image, trans_image_index,
2697         conv_intrinsic_cobound): Ditto.
2699 2011-05-06  Tobias Burnus  <burnus@net-b.de>
2701         PR fortran/18918
2702         * trans-array.c (gfc_walk_variable_expr): Continue walking
2703         for scalar coarrays.
2704         * trans-intrinsic.c (convert_element_to_coarray_ref): New function.
2705         (trans_this_image, trans_image_index, conv_intrinsic_cobound): Use it.
2706         (trans_this_image): Fix algorithm.
2707         * trans-types.c (gfc_get_element_type, gfc_get_array_descriptor_base,
2708         gfc_sym_type): Handle scalar coarrays.
2710 2011-05-06  Tobias Burnus  <burnus@net-b.de>
2712         PR fortran/48858
2713         PR fortran/48820
2714         * lang.opt (std=f2008tr): New.
2715         * libgfortran.h (GFC_STD_F2008_TR): New macro constant.
2716         * decl.c (verify_c_interop_param): Allow OPTIONAL in BIND(C)
2717         procedures for -std=f2008tr/gnu/legacy.
2718         (gfc_match_import): Set sym to NULL.
2719         * options.c (set_default_std_flags,gfc_handle_option): Handle
2720         -std=f2008tr.
2721         * invoke.texi (-std=): Document -std=f2008tr.
2723 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
2725         * trans-decl.c (gfc_trans_entry_master_switch): Call build_case_label.
2726         * trans-io.c (add_case): Likewise.
2727         * trans-stmt.c (gfc_trans_integer_select): Likewise.
2728         (gfc_trans_character_select): Likewise.
2730 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
2732         * trans-decl.c (trans_function_start): Do not set
2733         dont_save_pending_sizes_p.
2735 2011-05-04  Nathan Froyd  <froydnj@codesourcery.com>
2737         * trans.h (gfc_chainon_list): Delete.
2738         * trans.c (gfc_chainon_list): Delete.
2740 2011-05-04  Tobias Burnus  <burnus@net-b.de>
2742         PR fortran/48864
2743         * invoke.texi (fno-protect-parens): Document
2744         that -Ofast implies -fno-protect-parens.
2745         * options.c (gfc_init_options, gfc_post_options):
2746         Make -Ofast imply -fno-protect-parens.
2748 2011-05-04  Nathan Froyd  <froydnj@codesourcery.com>
2750         * trans-decl.c (build_library_function_decl_1): Call
2751         build_function_type_vec.  Adjust argument list building accordingly.
2752         * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Likewise.
2753         * trans-types.c (gfc_get_function_type): Likewise.
2755 2011-05-04  Richard Guenther  <rguenther@suse.de>
2757         * trans-array.c (gfc_trans_array_constructor_value): Use
2758         size_int for bounds of range types.
2759         (gfc_trans_array_constructor_value): Use size_type_node
2760         for memcpy argument.
2761         * trans-common.c (build_field): Use gfc_charlen_type_node
2762         for lengths.
2763         * trans-openmp.c (gfc_trans_omp_clauses): Do not pass NULL
2764         as type to build_int_cst.
2765         * trans-const.c (gfc_build_string_const): Use size_int
2766         for bounds of range types.
2767         (gfc_build_wide_string_const): Likewise.
2768         * trans-stmt.c (gfc_trans_label_assign): Use gfc_charlen_type_node
2769         for lengths.
2770         (gfc_trans_character_select): Likewise.
2771         (gfc_trans_character_select): Do not pass NULL
2772         as type to build_int_cst.
2773         (gfc_trans_character_select): Use size_int for bounds of range types.
2774         * trans-io.c (gfc_build_io_library_fndecls): Likewise.
2775         (add_case): Do not pass NULL as type to build_int_cst.
2776         (transfer_expr): Likewise.
2777         (transfer_array_desc): Likewise.
2778         * trans-decl.c (gfc_add_assign_aux_vars): Use gfc_charlen_type_node
2779         for lengths.
2780         (gfc_trans_assign_aux_var): Likewise.
2781         (create_main_function): Use size_int for bounds of range types.
2782         * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): Do not pass
2783         NULL as type to build_int_cst.
2784         (gfc_conv_intrinsic_spacing): Likewise.
2785         (gfc_conv_intrinsic_rrspacing): Likewise.
2786         (gfc_conv_intrinsic_len): Use gfc_charlen_type_node for lengths.
2788 2011-05-04  Richard Guenther  <rguenther@suse.de>
2790         * trans-types.c (gfc_get_array_type_bounds): Remove zero notrunc
2791         argument to int_const_binop.
2793 2011-05-03  Tobias Burnus  <burnus@net-b.de>
2795         PR fortran/18918
2796         * trans-intrinsic.c (trans_this_image): Implement version with
2797         coarray argument.
2798         (conv_intrinsic_cobound): Simplify code.
2799         (gfc_conv_intrinsic_function): Call trans_this_image for
2800         this_image(coarray) except for -fcoarray=single.
2802 2011-05-02  Steven G. Kargl  <kargl@gcc.gnu.org>
2804         PR fortran/48720
2805         * gfortran.texi: Document the 'Q' exponent-letter extension.
2806         * invoke.texi: Document -Wreal-q-constant.
2807         * lang.opt: Add -Wreal-q-constant option.
2808         * gfortran.h: Add warn_real_q_constant to option struct.
2809         * primary.c (match_real_constant):  Use it.  Accept 'Q' as
2810         exponent-letter for REAL(16) real-literal-constant with a
2811         fallback to REAL(10) or error if REAL(10) is not available.
2812         * options.c (gfc_init_options, set_Wall) Set it.
2813         (gfc_handle_option): Handle new option.
2815 2011-04-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
2817         * dump-prase-tree.c (show_code_node):  Set the current
2818         namespace to the BLOCK before displaying it; restore
2819         afterwards.
2821 2011-04-30  Tobias Burnus  <burnus@net-b.de>
2823         PR fortran/48821
2824         * decl.c (gfc_match_import): Don't try to find the
2825         symbol if already found.
2827 2011-04-30  Paul Thomas  <pault@gcc.gnu.org>
2829         PR fortran/48746
2830         * trans-expr.c (fcncall_realloc_result): Set the bounds and the
2831         offset so that the lbounds are one.
2832         (gfc_trans_arrayfunc_assign): Add rank to arguments of above.
2834 2011-04-29  Paul Thomas  <pault@gcc.gnu.org>
2836         PR fortran/48462
2837         * trans-expr.c (arrayfunc_assign_needs_temporary): Deal with
2838         automatic reallocation when the lhs is a target.
2840         PR fortran/48746
2841         * trans-expr.c (fcncall_realloc_result): Make sure that the
2842         result dtype field is set before the function call.
2844 2011-04-29  Tobias Burnus  <burnus@net-b.de>
2846         PR fortran/48810
2847         * resolve.c (resolve_typebound_generic_call): Don't check access
2848         flags of the specific function.
2850         PR fortran/48800
2851         * resolve.c (resolve_formal_arglist): Don't change AS_DEFERRED
2852         to AS_ASSUMED_SHAPE for function results.
2853         (resolve_fl_var_and_proc): Print also for function results with
2854         AS_DEFERRED an error, if they are not a pointer or allocatable.
2855         (resolve_types): Make sure arguments of procedures in interface
2856         blocks are resolved.
2858 2011-04-29  Michael Matz  <matz@suse.de>
2860         * options.c (options.c): Set warn_maybe_uninitialized.
2862 2011-04-28  Tobias Burnus  <burnus@net-b.de>
2864         PR fortran/48112
2865         * resolve.c (resolve_fl_var_and_proc): Print diagnostic of
2866         function results only once.
2867         (resolve_symbol): Always resolve function results.
2869         PR fortran/48279
2870         * expr.c (gfc_check_vardef_context): Fix handling of generic
2871         EXPR_FUNCTION.
2872         * interface.c (check_interface0): Reject internal functions
2873         in generic interfaces, unless -std=gnu.
2875 2011-04-27  Tobias Burnus  <burnus@net-b.de>
2877         PR fortran/48788
2878         * resolve.c (resolve_global_procedure): Error recovery -
2879         avoid segfault for (non)character-returning functions.
2881 2011-04-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
2883         * decl.c (gfc_match_end):  Check that the block name starts
2884         with "block@".
2885         * parse.c (gfc_build_block_ns):  Make block names unique by
2886         numbering them.
2888 2011-04-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
2890         * frontend-passes.c (inserted_block):  New variable.
2891         (changed_statement):  Likewise.
2892         (create_var):  Encase statement to be operated on in a BLOCK.
2893         Adjust code insertion for BLOCK.
2894         (cfe_code):  Set inserted_block and changed_statement to NULL.
2896 2011-04-23  Tobias Burnus  <burnus@net-b.de>
2898         PR fortran/18918
2899         * module.c (mio_array_spec): Set as->cotype on reading.
2900         * resolve.c (resolve_allocate_expr): Fix allocating coarray
2901         components.
2903 2011-04-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
2905         PR fortran/48405
2906         * frontend_passes (cfe_register_funcs): Remove workaround for DO
2907         loops.
2908         (gfc_code_walker):  Make sure the pointer to the current
2909         statement doen't change when other statements are inserted.
2911 2011-04-21  Tobias Burnus  <burnus@net-b.de>
2913         PR fortran/18918
2914         * array.c (gfc_match_array_spec): Fix maximal rank(+corank) check.
2916 2011-04-20  Jim Meyering  <meyering@redhat.com>
2918         * expr.c (free_expr0): Remove useless if-before-free.
2919         * gfortranspec.c (lang_specific_pre_link): Likewise.
2920         * interface.c (gfc_extend_expr): Likewise.
2921         * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
2923 2011-04-19  Tobias Burnus  <burnus@net-b.de>
2925         PR fortran/48588
2926         PR fortran/48692
2928         * module.c (fix_mio_expr): Commit created symbol.
2930 2011-04-19  Janne Blomqvist  <jb@gcc.gnu.org>
2932         * scanner.c (load_file): Use XCNEWVAR instead of xcalloc.
2934 2011-04-19  Janne Blomqvist  <jb@gcc.gnu.org>
2936         * frontend-passes.c (gfc_run_passes): Use XDELETEVEC instead of
2937         free.
2939 2011-04-19  Janne Blomqvist  <jb@gcc.gnu.org>
2941         * misc.c (gfc_getmem): Remove function.
2942         * gfortran.h: Remove gfc_getmem prototype. Replace gfc_getmem
2943         usage with XCNEW or XCNEWVEC.
2944         * expr.c (gfc_check_assign_symbol): Replace gfc_getmem usage with
2945         XCNEW or XCNEWVEC.
2946         * options.c (gfc_handle_module_path_options)
2947         (gfc_get_option_string): Likewise.
2948         * resolve.c (gfc_resolve_forall): Likewise.
2949         * simplify.c (simplify_transformation_to_array): Likewise.
2950         * target-memory.c (gfc_target_interpret_expr): Likewise.
2951         * trans-common.c (get_segment_info, copy_equiv_list_to_ns)
2952         (get_init_field): Likewise.
2953         * trans-expr.c (gfc_conv_statement_function): Likewise.
2954         * trans-io.c (nml_full_name): Likewise.
2955         * trans-stmt.c (gfc_trans_forall_1): Likewise.
2956         * scanner.c (load_file): Replace gfc_getmem usage with xcalloc.
2958 2011-04-19  Tobias Burnus  <burnus@net-b.de>
2960         PR fortran/48588
2961         * parse.c (resolve_all_program_units): Skip modules.
2962         (translate_all_program_units): Handle modules.
2963         (gfc_parse_file): Defer code generation for modules.
2965 2011-04-19  Martin Jambor  <mjambor@suse.cz>
2967         * trans-decl.c (gfc_generate_function_code): Call cgraph_create_node
2968         instead of cgraph_get_create_node.
2970 2011-04-18  Jim Meyering  <meyering@redhat.com>
2972         remove now-unused definition of gfc_free
2973         * misc.c (gfc_free): Remove function.
2974         * gfortran.h (gfc_free): Remove its prototype.
2976 2011-04-18  Jim Meyering  <meyering@redhat.com>
2978         convert each use of gfc_free (p) to free (p)
2979         Do that by running this command:
2980           perl -pi -e    's/\bgfc_free ?\(/free (/' \
2981             $(git grep -El '\bgfc_free ?\(')
2982         which also corrects the few uses that lacked a space between
2983         the function name and the open parenthesis.
2984         Manually undo the change to the function definition itself
2985         and its prototype.  They'll be removed next.
2986         * array.c (gfc_free_array_spec, gfc_set_array_spec): s/gfc_free/free/
2987         * constructor.c (node_free): Likewise.
2988         * cpp.c (dump_queued_macros): Likewise.
2989         * data.c (gfc_assign_data_value): Likewise.
2990         * decl.c (free_variable, free_value, gfc_free_data): Likewise.
2991         (gfc_free_data_all, match_old_style_init): Likewise.
2992         (gfc_set_constant_character_len, gfc_free_enum_history, NUM_DECL):
2993         Likewise.
2994         (gfc_match_modproc): Likewise.
2995         * dependency.c (check_section_vs_section): Likewise.
2996         * error.c (gfc_pop_error, gfc_free_error): Likewise.
2997         * expr.c (free_expr0, gfc_free_expr, gfc_free_actual_arglist): Likewise.
2998         (gfc_free_ref_list, gfc_replace_expr, gfc_copy_ref): Likewise.
2999         (find_substring_ref, gfc_simplify_expr, gfc_check_assign_symbol):
3000         Likewise.
3001         * frontend-passes.c (gfc_run_passes, cfe_expr_0): Likewise.
3002         (strip_function_call, optimize_comparison): Likewise.
3003         * interface.c (gfc_free_interface, arginfo, check_interface0): Likewise.
3004         (CHECK_OS_COMPARISON, gfc_extend_assign, gfc_free_formal_arglist):
3005         Likewise.
3006         * intrinsic.c (gfc_intrinsic_done_1, gfc_convert_type_warn): Likewise.
3007         (gfc_convert_chartype): Likewise.
3008         * io.c (gfc_free_open, compare_to_allowed_values, gfc_free_close):
3009         Likewise.
3010         (gfc_free_filepos, gfc_free_dt, gfc_free_inquire): Likewise.
3011         * match.c (gfc_free_iterator, gfc_match_associate): Likewise.
3012         (gfc_free_alloc_list, gfc_free_namelist, gfc_free_equiv_until):
3013         Likewise.
3014         (free_case, gfc_free_forall_iterator): Likewise.
3015         * misc.c: Likewise.
3016         * module.c (free_pi_tree, resolve_fixups, free_rename): Likewise.
3017         (free_true_name, peek_atom, mio_allocated_wide_string): Likewise.
3018         (mio_pool_string, mio_internal_string, mio_gmp_integer): Likewise.
3019         (mio_gmp_real, mio_expr, mio_typebound_proc): Likewise.
3020         (mio_full_typebound_tree, skip_list, load_equiv): Likewise.
3021         (free_written_common, gfc_use_module, gfc_free_use_stmts): Likewise.
3022         * openmp.c (gfc_free_omp_clauses): Likewise.
3023         * options.c (gfc_post_options): Likewise.
3024         * parse.c (select_type_pop, parse_omp_structured_block): Likewise.
3025         * primary.c (gfc_free_structure_ctor_component): Likewise.
3026         * resolve.c (resolve_structure_cons, check_host_association): Likewise.
3027         (gfc_resolve_forall, resolve_equivalence): Likewise.
3028         * scanner.c (gfc_scanner_done_1, gfc_release_include_path): Likewise.
3029         (gfc_define_undef_line, preprocessor_line, include_line): Likewise.
3030         (load_file, gfc_read_orig_filename): Likewise.
3031         * simplify.c (simplify_transformation_to_array): Likewise.
3032         (gfc_simplify_ibits, simplify_shift, gfc_simplify_ishftc, STRING):
3033         Likewise.
3034         (gfc_simplify_compiler_options): Likewise.
3035         * st.c (gfc_free_statement, gfc_free_statements): Likewise.
3036         (gfc_free_association_list): Likewise.
3037         * symbol.c (free_components, gfc_free_st_label, free_st_labels):
3038         Likewise.
3039         (gfc_delete_symtree, gfc_free_symbol, gfc_undo_symbols): Likewise.
3040         (free_old_symbol, gfc_commit_symbols, free_tb_tree): Likewise.
3041         (free_common_tree, free_uop_tree, free_sym_tree): Likewise.
3042         (gfc_free_dt_list, gfc_free_equiv_infos, gfc_free_equiv_lists):
3043         Likewise.
3044         (gfc_free_finalizer, gfc_free_charlen, free_entry_list): Likewise.
3045         (gfc_free_namespace): Likewise.
3046         * trans-array.c (gfc_free_ss, gfc_trans_array_bound_check): Likewise.
3047         (gfc_conv_array_ref, gfc_conv_ss_startstride): Likewise.
3048         (gfc_trans_dummy_array_bias, gfc_conv_array_parameter): Likewise.
3049         * trans-common.c (get_init_field, create_common): Likewise.
3050         * trans-const.c (gfc_build_wide_string_const): Likewise.
3051         (gfc_conv_string_init): Likewise.
3052         * trans-decl.c (gfc_generate_function_code): Likewise.
3053         * trans-expr.c (gfc_conv_substring, gfc_free_interface_mapping):
3054         Likewise.
3055         (SCALAR_POINTER, gfc_conv_statement_function): Likewise.
3056         (gfc_trans_subarray_assign): Likewise.
3057         * trans-intrinsic.c (conv_generic_with_optional_char_arg): Likewise.
3058         * trans-io.c (gfc_trans_io_runtime_check, set_string): Likewise.
3059         (transfer_namelist_element, transfer_array_component): Likewise.
3060         * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
3061         * trans-stmt.c (cleanup_forall_symtrees, gfc_trans_forall_1): Likewise.
3062         * trans.c (trans_runtime_error_vararg, gfc_restore_backend_locus):
3063         Likewise.
3065 2011-04-15  Jim Meyering  <meyering@redhat.com>
3067         gfortran: remove cpp definition of free, ...
3068         in preparation for the s/gfc_free/free/ transformation.
3069         * gfortran.h (free): Remove macro definition that would otherwise
3070         prevent direct use of the function.
3072 2011-04-18  Tobias Burnus  <burnus@net-b.de>
3074         PR fortran/18918
3075         * array.c (gfc_match_array_ref): Check for too many codimensions.
3076         * check.c (gfc_check_image_index): Check number of elements
3077         in SUB argument.
3078         * simplify.c (gfc_simplify_image_index): Remove unreachable checks.
3080 2011-04-18  Tobias Burnus  <burnus@net-b.de>
3082         PR fortran/18918
3083         * iresolve.c (gfc_resolve_image_index): Set ts.type.
3084         * simplify.c (gfc_simplify_image_index): Don't abort if the bounds
3085         are not known at compile time and handle -fcoarray=lib.
3086         * trans-intrinsics.c (gfc_conv_intrinsic_function): Handle
3087         IMAGE_INDEX.
3088         (conv_intrinsic_cobound): Fix comment typo.
3089         (trans_this_image): New function.
3090         * trans-array.c (gfc_unlikely): Move to trans.c.
3091         * trans.c (gfc_unlikely): Function moved from trans-array.c.
3092         (gfc_trans_runtime_check): Use it.
3093         * trans-io.c (gfc_trans_io_runtime_check): Ditto.
3094         * trans.h (gfc_unlikely): Add prototype.
3096 2011-04-18  Paul Thomas  <pault@gcc.gnu.org>
3098         PR fortran/48462
3099         * trans-expr.c (fcncall_realloc_result): Renamed version of
3100         realloc_lhs_bounds_for_intrinsic_call that does not touch the
3101         descriptor bounds anymore but makes a temporary descriptor to
3102         hold the result.
3103         (gfc_trans_arrayfunc_assign): Modify the reference to above
3104         renamed function.
3106 2011-05-17  Tobias Burnus  <burnus@net-b.de>
3108         PR fortran/48624
3109         * trans-decl.c (gfc_get_extern_function_decl): Fix decl
3110         for external procedures with proc arguments.
3112 2011-04-15  Michael Matz  <matz@suse.de>
3114         * trans-array.c (toplevel): Include gimple.h.
3115         (gfc_trans_allocate_array_storage): Check flag_stack_arrays,
3116         properly expand variable length arrays.
3117         (gfc_trans_auto_array_allocation): If flag_stack_arrays create
3118         variable length decls and associate them with their scope.
3119         * gfortran.h (gfc_option_t): Add flag_stack_arrays member.
3120         * options.c (gfc_init_options): Handle -fstack_arrays option.
3121         * lang.opt (fstack-arrays): Add option.
3122         * invoke.texi (Code Gen Options): Document it.
3123         * Make-lang.in (trans-array.o): Depend on GIMPLE_H.
3125 2011-04-15  Tobias Burnus  <burnus@net-b.de>
3127         PR fortran/18918
3128         * trans-intrinsic.c (conv_intrinsic_cobound): Remove unused
3129         code which is also causing an ICE.
3131 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
3133         * f95-lang.c (poplevel): Use BLOCK_CHAIN and block_chainon.
3135 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
3137         * f95-lang.c (union lang_tree_node): Check for TS_COMMON before
3138         calling TREE_CHAIN.
3140 2011-04-12  Paul Thomas  <pault@gcc.gnu.org>
3142         PR fortran/48360
3143         PR fortran/48456
3144         * trans-array.c (get_std_lbound): For derived type variables
3145         return array valued component lbound.
3147 2011-04-12  Martin Jambor  <mjambor@suse.cz>
3149         * trans-decl.c (gfc_generate_function_code): Call
3150         cgraph_get_create_node instead of cgraph_node.
3152 2011-04-11  Tobias Burnus  <burnus@net-b.de>
3154         PR fortran/18918
3155         * simplify.c (simplify_bound_dim): Exit for
3156         ucobound's last dimension unless -fcoarray=single.
3157         * trans-array (gfc_conv_descriptor_size_1): Renamed from
3158         gfc_conv_descriptor_size, made static, has now from_dim and
3159         to_dim arguments.
3160         (gfc_conv_descriptor_size): Call gfc_conv_descriptor_size.
3161         (gfc_conv_descriptor_cosize): New function.
3162         * trans-array.h (gfc_conv_descriptor_cosize): New prototype.
3163         * trans-intrinsic.c (conv_intrinsic_cobound): Add input_location
3164         and handle last codim of ucobound for when -fcoarray is not "single".
3166 2011-04-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
3168         PR fortran/48448
3169         * gfortran.h (gfc_option_t):  Add warn_function_elimination and
3170         flag_frontend_optimize.
3171         * lang.opt (Wfunction-elimination):  Add.
3172         (ffrontend-optimize):  Add.
3173         * invoke.texi:  Add documentation for -Wfunction-elimination
3174         and -ffrontend-optimize.  Add -faggressive-function-elimination
3175         to list of code generation options.
3176         * frontend-passes.c (gfc_run_passes):  Run optimizations if
3177         flag_frontend_optimize is set.
3178         (warn_function_elimination):  New function.
3179         (cfe_expr_0):  Call it if requested to do so.
3180         * options.c (gfc_init_options):  Initiate warn_function_elimination
3181         and flag_frontend_optimize.
3182         (gfc_post_options):  Set flag_frontend_optimize if not specified
3183         by user, depending on the optimization level.
3184         (gfc_handle_option):  Handle -Wfunction-elimination and
3185         -ffrontend-optimize.
3187 2011-04-06  Tobias Burnus  <burnus@net-b.de>
3189         PR fortran/18918
3190         * trans-intrinsic.c (gfc_conv_intrinsic_function): Fix
3191         call for this_image.
3193 2011-04-05  Nathan Froyd  <froydnj@codesourcery.com>
3195         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Use
3196         build_function_type_list instead of build_function_type.  Correct
3197         argument order for func_frexp and func_scalbn.
3199 2011-04-05  Duncan Sands  <baldrick@free.fr>
3201         * f95-lang.c (build_builtin_fntypes): Swap frexp parameter types.
3203 2011-04-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
3205         * frontend-passes: (optimize_lexical_comparison): New function.
3206         (optimize_expr): Call it.
3207         (optimize_comparison): Also handle lexical comparison functions.
3208         Return false instad of -2 for unequal comparison.
3210 2011-04-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
3212         PR fortran/48412
3213         * frontend-passes (cfe_expr_0):  Reverse the order of going
3214         through the loops.
3216 2011-04-04  Tobias Burnus  <burnus@net-b.de>
3217             Mikael Morin  <mikael.morin@sfr.fr>
3219         PR fortran/18918
3220         * check.c (is_coarray): Update - because of DIMEN_THIS_IMAGE.
3221         * expr.c (gfc_is_coindexed): Ditto.
3222         * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_THIS_IMAGE.
3223         * interface.c (compare_parameter): Use gfc_expr_attr and
3224         gfc_is_coindexed.
3225         * resolve.c (check_dimension, compare_spec_to_ref,
3226         resolve_allocate_expr, check_data_variable): Update for
3227         DIMEN_THIS_IMAGE.
3228         * simplify.c (gfc_simplify_lcobound, gfc_simplify_this_image,
3229         gfc_simplify_ucobound): Allow non-constant bounds.
3230         * trans-array.c (gfc_set_loop_bounds_from_array_spec,
3231         gfc_trans_create_temp_array, gfc_trans_constant_array_constructor,
3232         gfc_set_vector_loop_bounds, gfc_conv_array_index_offset,
3233         gfc_start_scalarized_body, gfc_trans_scalarizing_loops,
3234         gfc_trans_scalarized_loop_boundary, gfc_conv_section_startstride,
3235         gfc_conv_ss_startstride, gfc_conv_loop_setup,
3236         gfc_trans_array_bounds, gfc_conv_expr_descriptor,
3237         gfc_walk_variable_expr): Handle codimen.
3238         * trans-decl.c (gfc_build_qualified_array): Save cobounds.
3239         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use arg2.
3240         (conv_intrinsic_cobound): New function.
3241         (gfc_conv_intrinsic_function): Call it.
3242         (gfc_walk_intrinsic_function, gfc_add_intrinsic_ss_code): Handle
3243         ucobound, lcobound, this_image.
3244         * fortran/trans-types.c (gfc_build_array_type): Save cobounds.
3245         (gfc_get_dtype): Honour corank.
3246         (gfc_get_nodesc_array_type): Save corank and codimensions.
3247         (gfc_get_array_type_bounds): Save cobound.
3248         * fortran/trans.h (gfc_ss_info,gfc_loopinfo): Add codimen item.
3249         (gfc_array_kind): Add corank item.
3250         (GFC_TYPE_ARRAY_CORANK): New macro.
3252 2011-04-03  Kai Tietz  <ktietz@redhat.com>
3254         PR middle-end/48422
3255         * Make-lang.in (f95-lang.o): Add some missing dependencies.
3257 2011-04-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
3259         PR fortran/48352
3260         * frontend-passes (cfe_register_funcs):  Don't
3261         register functions if they appear as iterators in DO loops.
3263 2011-03-30  Michael Matz  <matz@suse.de>
3265         PR fortran/47516
3266         * trans-expr.c (realloc_lhs_loop_for_fcn_call): Take loop as parameter,
3267         don't use local variable.
3268         (gfc_trans_arrayfunc_assign): Adjust caller.
3270 2011-03-29  Janus Weil  <janus@gcc.gnu.org>
3272         PR fortran/48095
3273         * decl.c (match_procedure_decl,match_ppc_decl): Set flavor of interface.
3274         * module.c (MOD_VERSION): Bump.
3275         (mio_typespec): Read/write 'interface' field.
3276         * primary.c (match_string_constant,match_logical_constant): Remove
3277         unneeded code.
3278         (match_complex_constant): Make sure to clear the typespec.
3280 2011-03-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
3282         * frontend-passes.c (create_var):  Warn about creating an
3283         array temporary if requested.
3285 2011-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
3287         PR fortran/47065
3288         * frontend-passes.c (optimize_trim): Also follow references, except
3289         when they are substring references or array references.
3291 2011-03-27  Tobias Burnus  <burnus@net-b.de>
3293         PR fortran/18918
3294         * gfortran.h (gfc_isym_id): Rename GFC_ISYM_NUMIMAGES to
3295         GFC_ISYM_NUM_IMAGES.
3296         (gfc_fcoarray): Add GFC_FCOARRAY_LIB.
3297         * intrinsic.c (add_functions): Update due to GFC_ISYM_NUM_IMAGES
3298         rename.
3299         * invoke.texi (-fcoarray=): Document "lib" argument.
3300         * iresolve.c (gfc_resolve_this_image): Fix THIS IMAGE().
3301         * libgfortran.h (libgfortran_stat_codes): Add comments.
3302         * options.c (gfc_handle_coarray_option): Add -fcoarray=lib.
3303         * simplify.c (gfc_simplify_num_images, gfc_simplify_this_image):
3304         Handle GFC_FCOARRAY_LIB.
3305         * trans.h (gfc_init_coarray_decl): New prototype.
3306         (gfor_fndecl_caf_init, gfor_fndecl_caf_finalize,
3307         gfor_fndecl_caf_critical, gfor_fndecl_caf_end_critical,
3308         gfor_fndecl_caf_sync_all, gfor_fndecl_caf_sync_images,
3309         gfor_fndecl_caf_error_stop, gfor_fndecl_caf_error_stop_str,
3310         gfort_gvar_caf_num_images, gfort_gvar_caf_this_image):
3311         New global variables.
3312         * trans-decl.c: Declare several CAF functions (cf. above).
3313         (gfc_build_builtin_function_decls): Initialize those.
3314         (gfc_init_coarray_decl): New function.
3315         (create_main_function): Call CAF init/finalize functions.
3316         * trans-intrinsic.c (trans_this_image, trans_num_images): New.
3317         (gfc_conv_intrinsic_function): Call those.
3318         * trans-stmt.c (gfc_trans_stop, gfc_trans_sync, gfc_trans_critical):
3319         Add code for GFC_FCOARRAY_LIB.
3321 2011-03-26  Janus Weil  <janus@gcc.gnu.org>
3323         PR fortran/48291
3324         * class.c (get_unique_hashed_string): Adjust maximum allowable length
3325         for unique type string.
3327 2011-03-25  Kai Tietz  <ktietz@redhat.com>
3329         * scanner.c (preprocessor_line): Use filename_cmp
3330         instead of strcmp.
3332 2011-03-25  Tobias Burnus  <burnus@net-b.de>
3334         PR fortran/48174
3335         PR fortran/45304
3336         * trans-types.c (gfc_get_function_type): Don't use varargs if the
3337         procedure is known to have no arguments.
3339 2011-03-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
3341         PR fortran/22572
3342         * gfortran.h (gfc_option_t): Add
3343         flag_aggressive_function_elimination.
3344         (gfc_dep_compare_functions):  Add prototype.
3345         * lang.opt: Add faggressive-function-elimination.
3346         * invoke.texi: Document -faggressive-function-elimination.
3347         * frontend_passes (expr_array):  New static variable.
3348         (expr_size):  Likewise.
3349         (expr_count):  Likewise.
3350         (current_code):  Likewise.
3351         (current_ns):  Likewise.
3352         (gfc_run_passes):  Allocate and free space for expressions.
3353         (cfe_register_funcs):  New function.
3354         (create_var):  New function.
3355         (cfc_expr_0):  New function.
3356         (cfe_code):  New function.
3357         (optimize_namespace):  Invoke gfc_code_walker with cfe_code
3358         and cfe_expr_0.
3359         * dependency.c (gfc_dep_compare_functions):  New function.
3360         (gfc_dep_compare_expr):  Use it.
3361         * options.c (gfc_init_options):  Handle
3362         flag_aggressive_function_elimination.
3363         (gfc_handle_option):  Likewise.
3365 2011-03-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3367         * arith.c (arith_power): Plug memory leak.
3369 2011-03-12  Janus Weil  <janus@gcc.gnu.org>
3371         PR fortran/48059
3372         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Replace base type
3373         for polymorphic arguments.
3375 2011-03-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3377         PR fortran/48054
3378         * intrinsic.texi: Clarify doc of logarithm functions.
3380 2011-03-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3382         PR fortran/47552
3383         * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Fix type of
3384         the string length variable.
3386 2011-03-11  Janus Weil  <janus@gcc.gnu.org>
3388         PR fortran/47768
3389         * module.c (ab_attribute,attr_bits): Add AB_PROC_POINTER_COMP.
3390         (mio_symbol_attribute): Handle attribute 'proc_pointer_comp'.
3392 2011-03-06  Paul Thomas  <pault@gcc.gnu.org>
3393             Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3395         PR fortran/47850
3396         * expr.c (gfc_is_constant_expr): Only use gfc_constant_ac if
3397         the expression has an iterator.  Otherwise, iterate through the
3398         array, checking for constant expressions for each element.
3400 2011-03-04  Janne Blomqvist  <jb@gcc.gnu.org>
3402         PR libfortran/47802
3403         * intrinsic.texi: Update CTIME and FDATE documentation.
3405 2011-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3407         * invoke.texi (Option Summary, Fortran Dialect Options)
3408         (Preprocessing Options, Runtime Options, Code Gen Options):
3409         Fix vertical list spacing by using @itemx for additinoal
3410         items, empty line before @table.  Fix typos.
3412 2011-02-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3414         PR fortran/47894
3415         * intrinsic.texi: Fix doc of the VERIFY intrinsic.
3417 2011-02-26  Tobias Burnus  <burnus@net-b.de>
3419         PR fortran/47846
3420         * trans-stmt.c (gfc_trans_allocate): Fix allocation with
3421         type-spec of deferred-length strings.
3423 2011-02-26  Tobias Burnus  <burnus@net-b.de>
3425         PR fortran/47886
3426         * openmp.c (gfc_resolve_omp_directive): Resolve if()
3427         condition of OpenMP's task.
3429 2011-02-26  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3431         PR fortran/47894
3432         * intrinsic.texi: Fix doc of the VERIFY intrinsic.
3434 2011-02-24  Tobias Burnus  <burnus@net-b.de>
3436         PR fortran/47872
3437         * intrinsic.texi (ALLOCATED, ATAN, BESSEL_JN, BESSEL_YN): Add
3438         multitable for linebreak between different syntax variants.
3440 2011-02-24  Richard Guenther  <rguenther@suse.de>
3442         PR fortran/47839
3443         * f95-lang.c (pushdecl): For externs in non-global scope push
3444         a copy of the decl into the BLOCK.
3446 2011-02-23  Mikael Morin  <mikael@gcc.gnu.org>
3448         PR fortran/40850
3449         * trans.c (gfc_prepend_expr_to_block): New function.
3450         * trans.h (gfc_prepend_expr_to_block): Declare.
3451         * trans-array.c (gfc_conv_array_parameter): Replace
3452         gfc_add_expr_to_block with gfc_prepend_expr_to_block.
3454 2011-02-22  Paul Thomas  <pault@gcc.gnu.org>
3456         PR fortran/45743
3457         * trans-decl.c (gfc_get_extern_function_decl): Don't use the
3458         gsymbol backend_decl if the procedure has a formal argument
3459         that is a procedure.
3461 2011-02-22  Tobias Burnus  <burnus@net-b.de>
3463         PR fortran/41359
3464         * trans-stmt.c (gfc_trans_if_1): Use correct line for
3465         expressions in the if condition.
3467 2011-02-20  Tobias Burnus  <burnus@net-b.de>
3469         PR fortran/47797
3470         * trans-decl.c (gfc_trans_deferred_vars): Use gfc_set_backend_locus and
3471         gfc_restore_backend_locus to have better debug locations.
3472         * trans-array.c (gfc_trans_deferred_array): Ditto.
3474 2011-02-20  Paul Thomas  <pault@gcc.gnu.org>
3476         PR fortran/45077
3477         PR fortran/44945
3478         * trans-types.c (gfc_get_derived_type): Remove code that looks
3479         for decls in gsym and add call to gfc_get_module_backend_decl.
3480         * trans.h: Add prototype for gfc_get_module_backend_decl.
3481         * trans-decl.c (gfc_get_module_backend_decl): New function.
3482         (gfc_get_symbol_decl): Call it.
3484 2011-02-19  Paul Thomas  <pault@gcc.gnu.org>
3486         PR fortran/47348
3487         * trans-array.c (get_array_ctor_all_strlen): Move up in file.
3488         (get_array_ctor_var_strlen): Add block dummy and add call to
3489         get_array_ctor_all_strlen instead of giving up on substrings.
3490         Call gcc_unreachable for default case.
3491         (get_array_ctor_strlen): Add extra argument to in call to
3492         get_array_ctor_var_strlen.
3494 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
3496         PR fortran/47789
3497         * primary.c (gfc_match_structure_constructor): Handle empty parent
3498         types.
3500 2011-02-18  Tobias Burnus
3502         PR fortran/47775
3503         * trans-expr.c (arrayfunc_assign_needs_temporary): Use
3504         esym to check whether the specific procedure returns an
3505         allocatable or pointer.
3507 2011-02-18  Michael Matz  <matz@suse.de>
3509         PR fortran/45586
3510         * gfortran.h (struct gfc_component): Add norestrict_decl member.
3511         * trans.h (struct lang_type): Add nonrestricted_type member.
3512         * trans-expr.c (gfc_conv_component_ref): Search fields with correct
3513         parent type.
3514         * trans-types.c (mirror_fields, gfc_nonrestricted_type): New.
3515         (gfc_sym_type): Use it.
3517 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
3519         PR fortran/47768
3520         * resolve.c (resolve_transfer): Reject variables with procedure pointer
3521         components.
3523 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
3525         PR fortran/47767
3526         * gfortran.h (gfc_check_access): Removed prototype.
3527         (gfc_check_symbol_access): Added prototype.
3528         * module.c (gfc_check_access): Renamed to 'check_access', made static.
3529         (gfc_check_symbol_access): New function, basically a shortcut for
3530         'check_access'.
3531         (write_dt_extensions,write_symbol0,write_generic,write_symtree): Use
3532         'gfc_check_symbol_access'.
3533         (write_operator,write_module): Renamed 'gfc_check_access'.
3534         * resolve.c (resolve_fl_procedure,resolve_fl_derived,
3535         resolve_fl_namelist,resolve_symbol,resolve_fntype): Use
3536         'gfc_check_symbol_access'.
3538 2011-02-16  Janus Weil  <janus@gcc.gnu.org>
3540         PR fortran/47745
3541         * class.c (gfc_build_class_symbol): Set 'class_ok' attribute.
3542         * decl.c (build_sym,attr_decl1): Move setting of 'class_ok' into
3543         'gfc_build_class_symbol'.
3544         (gfc_match_decl_type_spec): Reject unlimited polymorphism.
3545         * interface.c (matching_typebound_op): Check for 'class_ok' attribute.
3546         * match.c (select_type_set_tmp): Move setting of 'class_ok' into
3547         'gfc_build_class_symbol'.
3548         * primary.c (gfc_variable_attr): Check for 'class_ok' attribute.
3550 2011-02-15  Steven G. Kargl  <kargl@gcc.gnu.org>
3552         PR fortran/47633
3553         . simplify.c (gfc_simplify_compiler_version): Fix off-by-one issue.
3555 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
3557         PR fortran/47730
3558         * parse.c (gfc_build_block_ns): Commit 'block@' symbol.
3560 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
3562         PR fortran/47728
3563         * class.c (gfc_build_class_symbol): Give a fatal error on polymorphic
3564         arrays.
3565         * primary.c (gfc_match_varspec): Avoid ICE for invalid class
3566         declaration.
3568 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
3570         PR fortran/47349
3571         * interface.c (get_expr_storage_size): Handle derived-type components.
3573 2011-02-13  Tobias Burnus  <burnus@net-b.de>
3575         PR fortran/47569
3576         * interface.c (compare_parameter): Avoid ICE with
3577         character components.
3579 2011-02-12  Janus Weil  <janus@gcc.gnu.org>
3581         * class.c (gfc_build_class_symbol): Reject polymorphic arrays.
3582         * decl.c (build_sym,build_struct,attr_decl1): Use return value of
3583         'gfc_build_class_symbol'.
3585 2011-02-12  Michael Matz  <matz@suse.de>
3586             Janus Weil  <janus@gcc.gnu.org>
3587             Tobias Burnus  <burnus@net-b.de>
3589         PR fortran/45586
3590         * trans-expr.c (conv_parent_component_references): Avoid unintendent
3591         skipping of parent compounds.
3593 2011-02-11  Tobias Burnus  <burnus@net-b.de>
3595         PR fortran/47550
3596         * resolve.c (resolve_formal_arglist): PURE with VALUE
3597         and no INTENT: Add -std= diagnostics.
3599 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
3601         PR fortran/47352
3602         * resolve.c (resolve_procedure_interface): If interface has a result
3603         variable, copy the typespec and set result pointer to self.
3605 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
3607         PR fortran/47463
3608         * resolve.c (resolve_typebound_subroutine): Remove erroneous line.
3610 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
3612         PR fortran/47637
3613         * trans-decl.c (init_intent_out_dt): Handle CLASS arguments.
3615 2011-02-08  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3617         * io.c (match_io_element): Do not set dt if not inquire.
3619 2011-02-08  Janus Weil  <janus@gcc.gnu.org>
3621         PR fortran/45290
3622         * expr.c (gfc_check_assign_symbol): Reject pointers as pointer
3623         initialization target.
3625 2011-02-07  Janne Blomqvist  <jb@gcc.gnu.org>
3626             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3628         * gfortran.texi (Thread-safety): texinfo styling fixes.
3629         * intrinsic.texi: Likewise.
3631 2011-02-06  Janne Blomqvist  <jb@gcc.gnu.org>
3633         * gfortran.texi (Compiler Characteristics): Add reference to
3634         thread-safety section.
3636 2011-02-06  Janne Blomqvist  <jb@gcc.gnu.org>
3638         * gfortran.texi (Thread-safety): New section.
3639         * intrinsic.texi (EXECUTE_COMMAND_LINE): Mention thread-safety.
3640         (GETENV): Likewise.
3641         (GET_ENVIRONMENT_VARIABLE): Likewise.
3642         (SYSTEM): Likewise.
3644 2011-02-06  Paul Thomas  <pault@gcc.gnu.org>
3646         PR fortran/47592
3647         * trans-stmt.c (gfc_trans_allocate): For deferred character
3648         length allocations with SOURCE, store to the values and string
3649         length to avoid calculating twice.  Replace gfc_start_block
3650         with gfc_init_block to avoid unnecessary contexts and to keep
3651         declarations of temporaries where they should be. Tidy up the
3652         code a bit.
3654 2011-02-05  Janne Blomqvist  <jb@gcc.gnu.org>
3656         PR fortran/42434
3657         * intrinsic.texi (SYSTEM_CLOCK): Update documentation.
3659 2011-02-02  Janus Weil  <janus@gcc.gnu.org>
3660             Paul Thomas  <pault@gcc.gnu.org>
3662         PR fortran/47082
3663         * trans-expr.c (gfc_trans_class_init_assign): Add call to
3664         gfc_get_derived_type.
3665         * module.c (read_cleanup): Do not use unique_symtrees for vtabs
3666         or vtypes.
3668 2011-02-02  Janus Weil  <janus@gcc.gnu.org>
3670         PR fortran/47572
3671         * resolve.c (resolve_fl_variable): Handle polymorphic allocatables.
3673 2011-02-01  Janus Weil  <janus@gcc.gnu.org>
3675         PR fortran/47565
3676         * trans-expr.c (gfc_conv_structure): Handle constructors for procedure
3677         pointer components with allocatable result.
3679 2011-01-31  Janus Weil  <janus@gcc.gnu.org>
3681         PR fortran/47455
3682         * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointers
3683         with pointer or allocatable result.
3685 2011-01-31  Paul Thomas  <pault@gcc.gnu.org>
3687         PR fortran/47519
3688         * trans-stmt.c (gfc_trans_allocate): Improve handling of
3689         deferred character lengths with SOURCE.
3690         * iresolve.c (gfc_resolve_repeat): Calculate character
3691         length from source length and ncopies.
3692         * dump-parse-tree.c (show_code_node): Show MOLD and SOURCE
3693         expressions for ALLOCATE.
3695 2011-01-31  Janus Weil  <janus@gcc.gnu.org>
3697         PR fortran/47463
3698         * resolve.c (resolve_typebound_subroutine): Bug fix for the case of
3699         an argument of a typebound assignment being a component.
3701 2011-01-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3703         * gfortranspec.c (add_arg_libgfortran) [HAVE_LD_STATIC_DYNAMIC] Use
3704         LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
3706 2011-01-31  Tobias Burnus  <burnus@net-b.de>
3708         PR fortran/47042
3709         * resolve.c (resolve_fl_procedure): Reject stmt functions
3710         with pointer/allocatable attribute.
3712 2011-01-31  Tobias Burnus  <burnus@net-b.de>
3714         PR fortran/47042
3715         * interface.c (gfc_procedure_use): Add explicit interface check for
3716         pointer/allocatable functions.
3718 2011-01-30  Paul Thomas  <pault@gcc.gnu.org>
3720         PR fortran/47523
3721         * trans-expr.c (gfc_trans_assignment_1): If the rhs is an op
3722         expr and is assigned to a deferred character length scalar,
3723         make sure that the function is called before reallocation,
3724         so that the length is available. Include procedure pointer
3725         and procedure pointer component rhs as well.
3727         PR fortran/45170
3728         PR fortran/35810
3729         PR fortran/47350
3730         * gfortran.dg/allocatable_function_5.f90: New test not added by
3731         mistake on 2011-01-28.
3733 2011-01-29  Tobias Burnus  <burnus@net-b.de>
3735         PR fortran/47531
3736         * check.c (gfc_check_shape): Support kind argument in SHAPE.
3737         * intrinsic.c (add_functions): Ditto.
3738         * resolve.c (gfc_resolve_shape): Ditto.
3739         * simplify.c (gfc_simplify_shape): Ditto.
3740         * intrinsic.h (gfc_check_shape, gfc_resolve_shape,
3741         gfc_simplify_shape): Update prototypes.
3742         * intrinisc.text (SHAPE): Document kind argument.
3744 2011-01-28  Tobias Burnus  <burnus@net-b.de>
3746         PR fortran/47507
3747         * resolve.c (resolve_formal_arglist): Allow arguments with VALUE
3748         attribute also without INTENT.
3750 2011-01-28  Tobias Burnus  <burnus@net-b.de>
3752         * gfortran.texi (Fortran 2003 status): Mention support for
3753         nonconstant namelist variables.
3755 2011-01-28  Paul Thomas  <pault@gcc.gnu.org>
3756             Tobias Burnus  <burnus@gcc.gnu.org>
3758         PR fortran/45170
3759         PR fortran/35810
3760         PR fortran/47350
3761         * interface.c (compare_actual_formal): An allocatable or pointer
3762         deferred length actual is only allowed if the formal argument
3763         is also deferred length. Clean up whitespace.
3764         * trans-expr.c (gfc_conv_procedure_call): Pass string length for
3765         deferred character length formal arguments by reference. Do the
3766         same for function results.
3767         (gfc_trans_pointer_assignment): Do not do runtime check of lhs
3768         and rhs character lengths, if deferred length lhs.  In this case
3769         set the lhs character length to that of the rhs.
3770         (gfc_conv_string_parameter): Remove assert that string length is
3771         an integer type.
3772         (is_scalar_reallocatable_lhs): New function.
3773         (alloc_scalar_allocatable_for_assignment): New function.
3774         (gfc_trans_assignment_1): Call above new function. If the rhs is
3775         a deferred character length itself, makes ure that the function
3776         is called before reallocation, so that the length is available.
3777         (gfc_trans_asssignment): Remove error about assignment to
3778         deferred length character variables.
3779         * gfortran.texi: Update entry about (re)allocation on
3780         assignment.
3781         * trans-stmt.c (gfc_trans_allocate): Add code to handle deferred
3782         length character variables.
3783         * module.c (mio_typespec): Transfer deferred characteristic.
3784         * trans-types.c (gfc_get_function_type): New code to generate
3785         hidden typelist, so that those character lengths that are
3786         passed by reference get the right type.
3787         * resolve.c (resolve_contained_fntype): Supress error for
3788         deferred character length functions.
3789         (resolve_function, resolve_fl_procedure) The same.
3790         (check_symbols): Remove the error that support for
3791         entity with deferred type parameter is not yet implemented.
3792         (resolve_fl_derived): The same.
3793         match.c (alloc_opt_list): Allow MOLD for deferred length object.
3794         * trans-decl.c (gfc_get_symbol_decl): For deferred character
3795         length dummies, generate a local variable for string length.
3796         (create_function_arglist): Hidden length can be a pointer.
3797         (gfc_trans_deferred_vars): For deferred character length
3798         results and dummies, assign the string length to the local
3799         variable from the hidden argument on entry and the other way
3800         round on exit, as appropriate.
3802 2011-01-27  Tobias Burnus  <burnus@net-b.de>
3804         PR fortran/47474
3805         * trans-decl.c (gfc_generate_function_code): Fix init
3806         of allocatable result variable with allocatable components.
3808 2011-01-27  Tobias Burnus  <burnus@net-b.de>
3810         PR fortran/47472
3811         * options.c (gfc_handle_module_path_options): Save
3812         module path without trailing slash as include path.
3814 2011-01-25  Tobias Burnus  <burnus@net-b.de>
3816         PR fortran/47448
3817         * interface.c (gfc_check_operator_interface): Fix
3818         defined-assignment check.
3820 2011-01-23  Tobias Burnus  <burnus@net-b.de>
3822         PR fortran/47421
3823         * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
3824         scalar allocatable dummy arguments.
3826 2011-01-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
3828         PR fortran/38536
3829         * resolve.c (gfc_iso_c_func_interface):  For C_LOC,
3830         check for array sections followed by component references
3831         which are illegal.  Also check for coindexed arguments.
3833 2011-01-22  Tobias Burnus  <burnus@net-b.de>
3835         PR fortran/47399
3836         * primary.c (gfc_match_varspec): Relax gcc_assert to allow for
3837         PARAMETER TBP.
3839 2011-01-21  Tobias Burnus  <burnus@net-b.de>
3841         PR fortran/47394
3842         * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check):
3843         Use defined instead of magic number exit status codes.
3844         * scanner.c (include_line, gfc_new_file): Ditto.
3846 2011-01-21  Tobias Burnus  <burnus@net-b.de>
3848         PR fortran/47377
3849         * expr.c (gfc_check_pointer_assign): Reject expr data-targets
3850         without pointer attribute.
3852 2011-01-18  Janus Weil  <janus@gcc.gnu.org>
3854         PR fortran/47240
3855         * resolve.c (expression_rank): Fix rank of procedure poiner components.
3856         * trans-expr.c (gfc_conv_procedure_call): Take care of procedure
3857         pointer components as actual arguments.
3859 2011-01-17  Jakub Jelinek  <jakub@redhat.com>
3861         PR fortran/47331
3862         * gfortran.h (struct gfc_omp_saved_state): New type.
3863         (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New prototypes.
3864         * resolve.c (resolve_global_procedure): Call it around gfc_resolve
3865         call.
3866         * openmp.c (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New
3867         functions.
3869 2011-01-17  Tobias Burnus  <burnus@net-b.de>
3871         PR fortran/47327
3872         * invoke.texi (Options to request or suppress errors
3873         and warnings): Fix cross link.
3875 2011-01-15  Tobias Burnus  <burnus@net-b.de>
3877         * gfortran.texi: Update Fortran 2003 Status section.
3879         PR fortran/47177
3880         * invoke.texi: Add missing "-E" to the -dM example.
3882 2011-01-13  Tobias Burnus  <burnus@net-b.de>
3884         PR fortran/47268
3885         * intrinsic.texi (get_command_argument, get_environment_variable):
3886         Mark arguments as optional in the Arguments section.
3888 2011-01-13  Kai Tietz  <kai.tietz@onevision.com>
3889             Tobias Burnus  <burnus@net-b.de>
3891         PR fortran/47260
3892         * trans-decl.c (gfc_get_extern_function_decl,
3893         build_function_decl): Set TREE_PUBLIC/TREE_EXTERNAL before
3894         calling decl_attributes.
3896 2011-01-13  Tobias Burnus  <burnus@net-b.de>
3897             Mikael Morin  <mikael@gcc.gnu.org>
3899         PR fortran/45848
3900         PR fortran/47204
3901         * gfortran.h (gfc_code): Move union ext's case_list into
3902         the struct block.
3903         * dump-parse-tree.c (show_code_node): Adapt by prefixing case_list
3904         by "block.".
3905         * frontend-passes.c (gfc_code_walker): Ditto.
3906         * match.c (gfc_match_goto, gfc_match_call, gfc_match_case,
3907         gfc_match_type_is, gfc_match_class_is): Ditto.
3908         * resolve.c (resolve_select, resolve_select_type): Ditto.
3909         * st.c (gfc_free_statement): Ditto.
3910         * trans-stmt.c (gfc_trans_integer_select, gfc_trans_logical_select,
3911         gfc_trans_character_select): Ditto.
3912         * parse.c (resolve_all_program_units): For error recovery, avoid
3913         segfault is proc_name is NULL.
3915 2011-01-11  Paul Thomas  <pault@gcc.gnu.org>
3917         PR fortran/47051
3918         * trans-array.c (gfc_alloc_allocatable_for_assignment): Change
3919         to be standard compliant by testing for shape rather than size
3920         before skipping reallocation. Improve comments.
3922 2011-01-09  Janus Weil  <janus@gcc.gnu.org>
3924         PR fortran/47224
3925         * resolve.c (resolve_actual_arglist): Remove unneeded and buggy piece
3926         of code.
3928 2011-01-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
3930         PR fortran/38536
3931         * resolve.c (is_scalar_expr_ptr):  For a substring reference,
3932         use gfc_dep_compare_expr to compare start and end expession.
3933         Add FIXME for using gfc_deb_compare_expr elsewhere.
3935 2011-01-09  Janus Weil  <janus@gcc.gnu.org>
3937         PR fortran/46313
3938         * class.c (get_unique_type_string): Make type name start with upper
3939         case letter.
3941 2011-01-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
3943         PR fortran/46405
3944         * invoke.texi:  Mention -ffree-line-length-none and
3945         -ffixed-line-length-none for preprocessing.
3947 2011-01-08  Paul Thomas  <pault@gcc.gnu.org>
3949         PR fortran/46896
3950         * trans-expr.c (gfc_conv_procedure_call): With a non-copying
3951         procedure argument (eg TRANSPOSE) use a temporary if there is
3952         any chance of aliasing due to host or use association.
3953         (arrayfunc_assign_needs_temporary): Correct logic for function
3954         results and do not use a temporary for implicitly PURE
3955         variables.  Use a temporary for Cray pointees.
3956         * symbol.c (gfc_add_save): Explicit SAVE not compatible with
3957         implicit pureness of containing procedure.
3958         * decl.c (match_old_style_init, gfc_match_data): Where decl
3959         would fail in PURE procedure, set implicit_pure to zero.
3960         * gfortran.h: Add implicit_pure to structure symbol_attr and
3961         add prototype for function gfc_implicit_pure.
3962         * expr.c (gfc_check_pointer_assign, gfc_check_vardef_context):
3963         Where decl would fail in PURE procedure, reset implicit_pure.
3964         * io.c (match_vtag, gfc_match_open, gfc_match_close,
3965         gfc_match_print, gfc_match_inquire, gfc_match_wait): The same.
3966         * match.c (gfc_match_critical, gfc_match_stopcode,
3967         sync_statement, gfc_match_allocate, gfc_match_deallocate): The
3968         same.
3969         * parse.c (decode_omp_directive): The same.
3970         (parse_contained): If not PURE, set implicit pure attribute.
3971         * resolve.c (resolve_formal_arglist, resolve_structure_cons,
3972         resolve_function, resolve_ordinary_assign): The same.
3973         (gfc_implicit_pure): New function.
3974         * module.c (mio_symbol_attribute): Introduce AB_IMPLICIT_PURE
3975         to ab_attribute enum and use it in this function.
3977 2011-01-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
3979         PR fortran/45777
3980         * symbol.c (gfc_symbols_could_alias):  Strip gfc_ prefix,
3981         make static and move in front of its only caller, to ...
3982         * trans-array.c (symbols_could_alias): ... here.
3983         Pass information about pointer and target status as
3984         arguments.  Allocatable arrays don't alias anything
3985         unless they have the POINTER attribute.
3986         (gfc_could_be_alias):  Keep track of pointer and target
3987         status when following references.  Also check if typespecs
3988         of components match those of other components or symbols.
3990 2011-01-07  Tobias Burnus  <burnus@net-b.de>
3992         PR fortran/41580
3993         * class.c (gfc_build_class_symbol): Mark __vtab as attr.vtab.
3994         * intrinsic.c (add_functions): Use simplify functions for
3995         EXTENDS_TYPE_OF and SAME_TYPE_AS.
3996         * intrinsic.h (gfc_simplify_extends_type_of,
3997         gfc_simplify_same_type_as): New prototypes.
3998         * simplify.c (is_last_ref_vtab, gfc_simplify_extends_type_of,
3999         gfc_simplify_same_type_as): New functions.
4001 2011-01-07  Janus Weil  <janus@gcc.gnu.org>
4003         PR fortran/47189
4004         PR fortran/47194
4005         * gfortran.h (gfc_lval_expr_from_sym): Moved prototype.
4006         * class.c (gfc_class_null_initializer): Initialize _vptr to declared
4007         type.
4008         * expr.c (gfc_lval_expr_from_sym): Moved here from symbol.c.
4009         * resolve.c (resolve_deallocate_expr): _data component will be added
4010         at translation stage.
4011         * symbol.c (gfc_lval_expr_from_sym): Moved to expr.c.
4012         * trans-stmt.c (gfc_trans_deallocate): Reset _vptr to declared type.
4014 2011-01-06  Daniel Franke  <franke.daniel@gmail.com>
4016         PR fortran/33117
4017         PR fortran/46478
4018         * parse.c (parse_interface): Remove check for procedure types.
4019         * interface.c (check_interface0): Verify that procedures are
4020         either all SUBROUTINEs or all FUNCTIONs.
4022 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
4024         PR fortran/47180
4025         * trans-expr.c (gfc_trans_class_assign): Bugfix for r168524 (make sure
4026         'vtab' is initialized).
4028 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
4030         PR fortran/47180
4031         * trans-expr.c (gfc_trans_class_assign): For a polymorphic NULL pointer
4032         assignment, set the _vptr component to the declared type.
4034 2011-01-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
4036         PR fortran/46017
4037         * resolve.c (resolve_allocate_deallocate): Follow references to
4038         check for duplicate occurence of allocation/deallocation objects.
4040 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
4042         PR fortran/47024
4043         * trans-decl.c (gfc_trans_deferred_vars): Initialize the _vpr component
4044         of polymorphic allocatables according to their declared type.
4046 2011-01-04  Janus Weil  <janus@gcc.gnu.org>
4048         PR fortran/46448
4049         * class.c (gfc_find_derived_vtab): Set the module field for the copying
4050         routine to make sure it receives module name mangling.
4052 2011-01-03  Jakub Jelinek  <jakub@redhat.com>
4054         * gfortranspec.c (lang_specific_driver): Update copyright notice
4055         dates.
4057 2011-01-03  Janus Weil  <janus@gcc.gnu.org>
4059         * intrinsic.texi (LEADZ): Fix example.
4061 2011-01-02  Janus Weil  <janus@gcc.gnu.org>
4063         PR fortran/46408
4064         * class.c (gfc_find_derived_vtab): Use EXEC_INIT_ASSIGN for __copy_
4065         routine.
4068 Copyright (C) 2011 Free Software Foundation, Inc.
4070 Copying and distribution of this file, with or without modification,
4071 are permitted in any medium without royalty provided the copyright
4072 notice and this notice are preserved.