OSDN Git Service

2011-07-07 Tobias Burnus <burnus@net-b.de>
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2011-07-07  Tobias Burnus  <burnus@net-b.de>
2
3         * trans.c (gfc_allocate_with_status): Call _gfortran_caf_register
4         with NULL arguments for (new) stat=/errmsg= arguments.
5
6 2011-07-06  Daniel Carrera <dcarrera@gmail.com>
7
8         * trans-array.c (gfc_array_allocate): Rename allocatable_array to
9         allocatable. Rename function gfc_allocate_array_with_status to 
10         gfc_allocate_allocatable_with_status. Update function call for
11         gfc_allocate_with_status.
12         * trans-opemp.c (gfc_omp_clause_default_ctor): Rename function
13         gfc_allocate_array_with_status to gfc_allocate_allocatable_with_status.
14         * trans-stmt.c (gfc_trans_allocate): Update function call for
15         gfc_allocate_with_status. Rename function gfc_allocate_array_with_status
16         to gfc_allocate_allocatable_with_status.
17         * trans.c (gfc_call_malloc): Add new parameter gfc_allocate_with_status
18         so it uses the library for memory allocation when -fcoarray=lib.
19         (gfc_allocate_allocatable_with_status): Renamed from
20         gfc_allocate_array_with_status.
21         (gfc_allocate_allocatable_with_status): Update function call for
22         gfc_allocate_with_status.
23         * trans.h (gfc_coarray_type): New enum.
24         (gfc_allocate_with_status): Update prototype.
25         (gfc_allocate_allocatable_with_status): Renamed from
26         gfc_allocate_array_with_status.
27         * trans-decl.c (generate_coarray_sym_init): Use the new constant
28         GFC_CAF_COARRAY_ALLOC in the call to gfor_fndecl_caf_register.
29
30 2011-07-06  Richard Guenther  <rguenther@suse.de>
31
32         * f95-lang.c (gfc_init_decl_processing):
33         Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
34
35 2011-07-04  Jakub Jelinek  <jakub@redhat.com>
36
37         PR fortran/49623
38         * gfortranspec.c (lang_specific_driver): Ignore options with
39         CL_ERR_MISSING_ARG errors.
40
41 2011-07-02  Janus Weil  <janus@gcc.gnu.org>
42
43         PR fortran/49562
44         * expr.c (gfc_check_vardef_context): Handle type-bound procedures.
45
46 2011-06-30  Jakub Jelinek  <jakub@redhat.com>
47
48         PR fortran/49540
49         * gfortran.h (gfc_constructor): Add repeat field.
50         * trans-array.c (gfc_conv_array_initializer): Handle repeat > 1.
51         * array.c (current_expand): Add repeat field.
52         (expand_constructor): Copy repeat.
53         * constructor.c (node_free, node_copy, gfc_constructor_get,
54         gfc_constructor_lookup): Handle repeat field.
55         (gfc_constructor_lookup_next, gfc_constructor_remove): New functions.
56         * data.h (gfc_assign_data_value): Add mpz_t * argument.
57         (gfc_assign_data_value_range): Removed.
58         * constructor.h (gfc_constructor_advance): Removed.
59         (gfc_constructor_lookup_next, gfc_constructor_remove): New prototypes.
60         * data.c (gfc_assign_data_value): Add REPEAT argument, handle it and
61         also handle overwriting a range with a single entry.
62         (gfc_assign_data_value_range): Removed.
63         * resolve.c (check_data_variable): Adjust gfc_assign_data_value
64         call.  Use gfc_assign_data_value instead of
65         gfc_assign_data_value_expr.
66
67 2011-06-27  Janus Weil  <janus@gcc.gnu.org>
68
69         PR fortran/49466
70         * trans-array.c (structure_alloc_comps): Make sure sub-components
71         and extended types are correctly deallocated.
72
73 2011-06-21  Andrew MacLeod  <amacleod@redhat.com>
74
75         * trans-openmp.c: Add sync_ or SYNC__ to builtin names.
76         * trans-stmt.c: Add sync_ or SYNC__ to builtin names.
77         * trans-decl.c: Add sync_ or SYNC__ to builtin names.
78
79 2011-06-21  Janus Weil  <janus@gcc.gnu.org>
80
81         PR fortran/49112
82         * class.c (gfc_find_derived_vtab): Make vtab and default initialization
83         symbols SAVE_IMPLICIT.
84
85 2011-06-20  Tobias Burnus  <burnus@net-b.de>
86
87         PR fortran/18918
88         * gfortran.h (gfc_check_vardef_context): Update prototype.
89         (iso_fortran_env_symbol): Handle derived types.
90         (symbol_attribute): Add lock_comp.
91         * expr.c (gfc_check_vardef_context): Add LOCK_TYPE check.
92         * interface.c (compare_parameter, gfc_procedure_use): Handle
93         LOCK_TYPE.
94         (compare_actual_formal): Update
95         gfc_check_vardef_context call.
96         * check.c (gfc_check_atomic_def, gfc_check_atomic_ref): Ditto.
97         * intrinsic.c (check_arglist): Ditto.
98         * io.c (resolve_tag, gfc_resolve_dt, gfc_resolve_inquire): Ditto.
99         * iso-fortran-env.def (ISOFORTRAN_LOCK_TYPE): Add.
100         * intrinsic.texi (ISO_FORTRAN_ENV): Document LOCK_TYPE.
101         * module.c (mio_symbol_attribute): Handle lock_comp.
102         (create_derived_type): New function.
103         (use_iso_fortran_env_module): Call it to handle LOCK_TYPE.
104         * parse.c (parse_derived): Add constraint check for LOCK_TYPE.
105         * resolve.c (resolve_symbol, resolve_lock_unlock): Add constraint
106         checks for LOCK_TYPE.
107         (gfc_resolve_iterator, resolve_deallocate_expr,
108         resolve_allocate_expr, resolve_code, resolve_transfer): Update
109         gfc_check_vardef_context call.
110         * trans-stmt.h (gfc_trans_lock_unlock): New prototype.
111         * trans-stmt.c (gfc_trans_lock_unlock): New function.
112         * trans.c (trans_code): Handle LOCK and UNLOCK.
113
114 2011-06-18  Janus Weil  <janus@gcc.gnu.org>
115
116         PR fortran/49400
117         * decl.c (gfc_match_procedure): Allow PROCEDURE declarations inside
118         BLOCK constructs.
119
120 2011-06-17  Janus Weil  <janus@gcc.gnu.org>
121
122         PR fortran/48699
123         * check.c (gfc_check_move_alloc): If 'TO' argument is polymorphic,
124         make sure the vtab is present.
125
126 2011-06-16  Janus Weil  <janus@gcc.gnu.org>
127
128         PR fortran/49074
129         * interface.c (gfc_extend_assign): Propagate the locus from the
130         assignment to the type-bound procedure call.
131
132 2011-06-16  Janus Weil  <janus@gcc.gnu.org>
133
134         PR fortran/49417
135         * module.c (mio_component): Make sure the 'class_ok' attribute is set
136         for use-associated CLASS components.
137         * parse.c (parse_derived): Check for 'class_ok' attribute.
138         * resolve.c (resolve_fl_derived): Ditto.
139
140 2011-06-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
141
142         * frontend-passes.c (remove_trim):  New function.
143         (optimize_assignment):  Use it.
144         (optimize_comparison):  Likewise.  Return correct status
145         for previous change.
146
147 2011-06-12  Tobias Burnus
148
149         PR fortran/49324
150         * trans-expr.c (gfc_trans_assignment_1): Tell
151         gfc_trans_scalar_assign to also deep-copy RHS nonvariables
152         with allocatable components.
153         * trans-array.c (gfc_conv_expr_descriptor): Ditto.
154
155 2011-05-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
156
157         * frontend-passes.c (optimize_assignment): Follow chains
158         of concatenation operators to the end for removing trailing
159         TRIMS for assignments.
160
161 2011-06-10  Daniel Carrera  <dcarrera@gmail.com>
162
163         * trans-decl.c (gfc_build_builtin_function_decls):
164         Updated declaration of caf_sync_all and caf_sync_images.
165         * trans-stmt.c (gfc_trans_sync): Function
166         can now handle a "stat" variable that has an integer type
167         different from integer_type_node.
168
169 2011-06-09  Richard Guenther  <rguenther@suse.de>
170
171         * trans.c (gfc_allocate_array_with_status): Mark error path
172         as unlikely.
173
174 2011-06-08  Tobias Burnus  <burnus@net-b.de>
175
176         PR fortran/18918
177         * gfortran.h (gfc_statement): Add ST_LOCK and ST_UNLOCK.
178         (gfc_exec_op): Add EXEC_LOCK and EXEC_UNLOCK.
179         (gfc_code): Add expr4.
180         * match.h (gfc_match_lock, gfc_match_unlock): New prototypes.
181         * match.c (gfc_match_lock, gfc_match_unlock,
182         lock_unlock_statement): New functions.
183         (sync_statement): Bug fix, avoiding double freeing.
184         (gfc_match_if): Handle LOCK/UNLOCK statement.
185         * parse.c (decode_statement, next_statement,
186         gfc_ascii_statement): Ditto.
187         * st.c (gfc_free_statement): Handle LOCK and UNLOCK.
188         * resolve.c (resolve_lock_unlock): New function.
189         (resolve_code): Call it.
190         * dump-parse-tree.c (show_code_node): Handle LOCK/UNLOCK.
191
192 2011-06-07  Richard Guenther  <rguenther@suse.de>
193
194         * f95-lang.c (gfc_init_decl_processing): Do not set
195         size_type_node or call set_sizetype.
196
197 2011-06-05  Tobias Burnus  <burnus@net-b.de>
198
199         PR fortran/49255
200         * trans-expr.c (gfc_conv_procedure_call): Fix -fcheck=pointer
201         for F2008.
202
203 2011-06-05  Andreas Schmidt  <andreas.schmidt.42@gmx.net>
204         Thomas Koenig  <tkoenig@gcc.gnu.org>
205
206         * dump-parse-tree.c (show_symbol):  Don't dump namespace
207         for ENTRY to avoid infinite recursion.
208
209 2011-06-02  Asher Langton  <langton2@llnl.gov>
210
211         PR fortran/49268
212         * trans-decl.c (gfc_trans_deferred_vars): Treat assumed-size Cray
213         pointees as AS_EXPLICIT.
214
215 2011-06-02  Asher Langton  <langton2@llnl.gov>
216
217         PR fortran/37039
218         * decl.c (variable_decl): Merge current_as before copying to cp_as.
219
220 2011-06-02  Steven G. Kargl  <kargl@gcc.gnu.org>
221
222         PR fortran/49265
223         * decl.c (gfc_match_modproc):  Allow for a double colon in a module
224         procedure statement.
225         * parse.c ( decode_statement): Deal with whitespace around :: in
226         gfc_match_modproc.
227
228 2011-05-31  Tobias Burnus  <burnus@net-b.de>
229
230         PR fortran/18918
231         * intrinsic.c (klass): Add CLASS_ATOMIC.
232         (add_subroutines): Add atomic_ref/atomic_define.
233         * intrinsic.texi (ATOMIC_REF, ATOMIC_DEFINE): Document.
234         * intrinsic.h (gfc_check_atomic_def, gfc_check_atomic_ref,
235         gfc_resolve_atomic_def, gfc_resolve_atomic_ref): New prototypes.
236         * gfortran.h (gfc_isym_id): Add GFC_ISYM_ATOMIC_DEF
237         and GFC_ISYM_ATOMIC_REF.
238         (gfc_atomic_int_kind, gfc_atomic_logical_kind): New global vars.
239         * iresolve.c (gfc_resolve_atomic_def, gfc_resolve_atomic_ref): New
240         functions.
241         * check.c (gfc_check_atomic, gfc_check_atomic_def,
242         gfc_check_atomic_ref): New functions.
243         * iso-fortran-env.def (ISOFORTRANENV_FILE_ATOMIC_INT_KIND,
244         ISOFORTRANENV_FILE_ATOMIC_LOGICAL_KIND): Change kind value.
245         * trans-intrinsic.c (conv_intrinsic_atomic_def,
246         conv_intrinsic_atomic_ref, gfc_conv_intrinsic_subroutine): New
247         functions.
248         (conv_intrinsic_move_alloc) Renamed from
249         gfc_conv_intrinsic_move_alloc - and made static.
250         * trans.h (gfc_conv_intrinsic_move_alloc): Remove.
251         (gfc_conv_intrinsic_subroutine) Add prototype.
252         * trans.c (trans_code): Call gfc_conv_intrinsic_subroutine.
253         * trans-types (gfc_atomic_int_kind, gfc_atomic_logical_kind): New
254         global vars.
255         (gfc_init_kinds): Set them.
256
257 2011-05-31  Tobias Burnus  <burnus@net-b.de>
258
259         PR fortran/18918
260         * trans-array.c (gfc_trans_dummy_array_bias): Handle
261         cobounds of assumed-shape arrays.
262
263 2011-05-31  Tobias Burnus  <burnus@net-b.de>
264
265         PR fortran/18918
266         * resolve.c (resolve_fl_variable): Handle static coarrays
267         with non-constant cobounds.
268
269 2011-05-29  Janus Weil  <janus@gcc.gnu.org>
270
271         PR fortran/47601
272         * module.c (mio_component_ref): Handle components of extended types.
273         * symbol.c (gfc_find_component): Return is sym is NULL.
274
275 2011-05-29  Tobias Burnus  <burnus@net-b.de>
276
277         PR fortran/18918
278         * interface.c (compare_parameter): Add check for passing coarray
279         to allocatable noncoarray dummy.
280
281 2011-05-29  Tobias Burnus  <burnus@net-b.de>
282             Richard Guenther  <rguenther@suse.de>
283
284         PR fortran/18918
285         * trans-types.c (gfc_get_nodesc_array_type): Don't mess with
286         the type's TREE_TYPE.
287         * trans-array.c (gfc_conv_array_ref): Use TYPE_MAIN_VARIANT.
288         * trans.c (gfc_build_array_ref): Ditto.
289
290 2011-05-27  Tobias Burnus  <burnus@net-b.de>
291
292         PR fortran/18918
293         * check.c (gfc_check_associated, gfc_check_null): Add coindexed check.
294         * match.c (gfc_match_nullify): Ditto.
295         * resolve.c (resolve_deallocate_expr): Ditto.
296         * trans-types.c (gfc_get_nodesc_array_type): Don't set restricted
297         for nonpointers.
298
299 2011-05-27  Tobias Burnus  <burnus@net-b.de>
300
301         PR fortran/48820
302         * gfortran.h (gfc_isym_id): Add GFC_ISYM_RANK.
303         * intrinsic.c (add_functions): Add rank intrinsic.
304         (gfc_check_intrinsic_standard): Handle GFC_STD_F2008_TR.
305         * intrinsic.h (gfc_simplify_rank, gfc_check_rank): Add prototypes.
306         * simplify.c (gfc_simplify_rank): New function.
307         * intrinsic.texi (RANK): Add description for rank intrinsic.
308         * check.c (gfc_check_rank): New function.
309
310 2011-05-26  Paul Thomas  <pault@gcc.gnu.org>
311             Thomas Koenig  <tkoenig@gcc.gnu.org>
312
313         PR fortran/48955
314         * trans-expr.c (gfc_trans_assignment_1): GFC_REVERSE_NOT_SET
315         changed to GFC_ENABLE_REVERSE.
316         * trans-array.c (gfc_init_loopinfo): GFC_CANNOT_REVERSE changed
317         to GFC_INHIBIT_REVERSE.
318         * gfortran.h : Enum gfc_reverse is now GFC_ENABLE_REVERSE,
319         GFC_FORWARD_SET, GFC_REVERSE_SET and GFC_INHIBIT_REVERSE.
320         * dependency.c (gfc_dep_resolver): Change names for elements of
321         gfc_reverse as necessary. Change the logic so that forward
322         dependences are remembered as well as backward ones. When both
323         have appeared, force a temporary.
324
325 2011-05-26  Tobias Burnus  <burnus@net-b.de>
326
327         PR fortran/18918
328         * trans-array.c (gfc_conv_array_ref): Handle pointer coarrays.
329         * trans-decl.c (has_coarray_vars, caf_init_block,
330         gfor_fndecl_caf_register): New file-global variables.
331         (gfc_finish_var_decl): Make sure that coarrays in main are static.
332         (gfc_build_qualified_array): Generate coarray token variable.
333         (gfc_get_symbol_decl): Don't use a static initializer for coarrays.
334         (gfc_build_builtin_function_decls): Set gfor_fndecl_caf_register.
335         (gfc_trans_deferred_vars, gfc_emit_parameter_debug_info): Skip for
336         static coarrays.
337         (generate_local_decl): Check for local coarrays.
338         (create_main_function): SYNC ALL before calling MAIN.
339         (generate_coarray_sym_init): Register static coarray.
340         (generate_coarray_init): Generate CAF registering constructor
341         function.
342         (gfc_generate_function_code): Call it, if needed, do not create
343         cgraph twice.
344         (gfc_generate_module_vars, gfc_process_block_locals): Call
345         generate_coarray_init.
346         * trans-types.c (gfc_get_nodesc_array_type): Generate pointers for
347         -fcoarray=lib.
348         * trans.h (gfor_fndecl_caf_register): New variable.
349         (lang_type): New element caf_token.
350         (GFC_TYPE_ARRAY_CAF_TOKEN): New macro.
351
352 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
353
354         * Make-lang.in (GFORTRAN_D_OBJS): Remove prefix.o.
355         (gfortran$(exeext)): Use libcommon-target.a.
356
357 2011-05-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
358
359         * frontend-passes.c (cfe_register_funcs):  Also register
360         character functions if their charlens are known and constant.
361         Also register allocatable functions.
362
363 2011-05-21  Janus Weil  <janus@gcc.gnu.org>
364
365         PR fortran/48699
366         * match.c (select_type_set_tmp): Make the temporary ALLOCATABLE if the
367         selector is ALLOCATABLE.
368
369 2011-05-20  Janus Weil  <janus@gcc.gnu.org>
370
371         PR fortran/48706
372         * module.c (write_dt_extensions): Do not write extended types which
373         are local to a subroutine.
374
375 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
376
377         * Make-lang.in (GFORTRAN_D_OBJS): Remove version.o and intl.o.
378
379 2011-05-20  Janne Blomqvist  <jb@gcc.gnu.org>
380
381         * gfortran.texi (set_fpe): Update documentation.
382         * invoke.texi (-ffpe-trap): Likewise.
383         * libgfortran.h (GFC_FPE_PRECISION): Rename to GFC_FPE_INEXACT.
384         * options.c (gfc_handle_fpe_trap_option): Handle inexact and make
385         precision an alias for it.
386
387 2011-05-19  Tobias Burnus  <burnus@net-b.de>
388
389         PR fortran/18918
390         * trans-types.c (gfc_get_element_type): Handle scalar coarrays.
391         (gfc_get_nodesc_array_type): Make a variant-type copy for scalar
392         coarrays.
393         * trans.c (gfc_build_array_ref): Return original type not variant
394         copy for scalar coarrays.
395         * trans-array.c (gfc_conv_array_ref): Ditto.
396
397 2011-05-18  Janus Weil  <janus@gcc.gnu.org>
398
399         PR fortran/48700
400         * trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): Deallocate 'TO'
401         argument to avoid memory leaks.
402
403 2011-05-16  Tobias Burnus  <burnus@net-b.de>
404
405         * gfortran.texi (_gfortran_set_options): Add GFC_STD_F2008_TR.
406         (Fortran 2008 status): Multi-image support for coarrays.
407         (TR 19113 status): New section.
408
409 2011-05-15  Tobias Burnus  <burnus@net-b.de>
410
411         PR fortran/18918
412         actual argument is not an array; rank mismatch is diagnosted later.
413         * trans-decl.c (gfc_get_symbol_decl, gfc_trans_deferred_vars): Handle
414         scalar coarrays.
415         * trans-types.c (gfc_get_array_type_bounds): Ditto.
416
417 2011-05-15  Joern Rennecke  <amylaar@spamcop.net>
418
419         PR middle-end/46500
420         * trans-types.c: Include "tm.h".
421         [0] (c_size_t_size): Remove.
422
423 2011-05-15  Janne Blomqvist  <jb@gcc.gnu.org>
424
425         PR libfortran/48915
426         * gfortran.texi (_gfortran_set_options): Even though -fbacktrace
427         is now the default, the library defaults to backtracing disabled.
428
429 2011-05-14  Tobias Burnus  <burnus@net-b.de>
430
431         * lang.opt (fdump-core): Re-add as ignored option
432         for backward compatibility.
433
434 2011-05-14  Janne Blomqvist  <jb@gcc.gnu.org>
435
436         PR libfortran/48915
437         * gfortran.texi: Update mixed-language programming section
438         reflecting the removal of the fdump-core option, and that
439         -fbacktrace is now enabled by default.
440
441 2011-05-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
442
443         PR fortran/22572
444         * frontend-passes.c (cfe_register_funcs):  Also register functions
445         for potential elimination if the rank is > 0, the shape is unknown
446         and reallocate on assignment is active.
447         (create_var):  For rank > 0 functions with unknown shape, create
448         an allocatable temporary.
449
450 2011-05-14  Tobias Burnus  <burnus@net-b.de>
451
452         PR fortran/18918
453         * interface.c (compare_parameter): Skip diagnostic if
454         actual argument is not an array; rank mismatch is diagnosted later.
455
456 2011-05-14  Tobias Burnus  <burnus@net-b.de>
457
458         * options.c (gfc_init_options, gfc_post_options): Enable
459         -fstack-arrays by default if -Ofast is used.
460         * invoke.texi (-fstack-arrays): Document this.
461
462 2011-05-14  Janne Blomqvist  <jb@gcc.gnu.org>
463
464         PR libfortran/48915
465         * gfortran.h (gfc_option_t): Remove flag_dump_core.
466         * gfortran.texi (GFORTRAN_ERROR_DUMPCORE): Remove section.
467         (GFORTRAN_ERROR_BACKTRACE): Document that it's enabled by default.
468         * intrinsic.texi (ABORT): Remove explanation of -fdump-core.
469         * invoke.texi: Remove -fdump-core, document that -fbacktrace is
470         enabled by default.
471         * lang.opt: Remove -fdump-core.
472         * options.c (gfc_init_options): Make backtrace default to enabled,
473         remove dump_core.
474         (gfc_handle_option): Remove OPT_fdump-core.
475         * trans-decl.c: Pass a 0 to preserve ABI.
476
477 2011-05-14  Janne Blomqvist  <jb@gcc.gnu.org>
478
479         * gfortran.texi: Remove GFORTRAN_USE_STDERR documentation.
480
481 2011-05-13  Tobias Burnus  <burnus@net-b.de>
482
483         PR fortran/48972
484         * io.c (resolve_tag_format, resolve_tag): Make sure
485         that the string is of default kind.
486         (gfc_resolve_inquire): Also resolve decimal tag.
487
488 2011-05-12  Tobias Burnus  <burnus@net-b.de>
489
490         PR fortran/48972
491         * resolve.c (resolve_intrinsic): Don't resolve module
492         intrinsics multiple times.
493
494 2011-05-11  Tobias Burnus  <burnus@net-b.de>
495
496         PR fortran/48889
497         * expr.c (gfc_is_constant_expr): Use e->value.function.esym
498         instead of e->symtree->n.sym, if available.
499
500 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
501
502         * f95-lang.c (global_bindings_p): Return bool and simplify.
503
504 2011-05-07  Tobias Burnus  <burnus@net-b.de>
505
506         PR fortran/18918
507         PR fortran/48919
508         * trans.h: Move gfc_init_coarray_decl prototype ...
509         * gfortran.h: ... to here.
510         * parse.c (translate_all_program_units): Call gfc_init_coarray_decl.
511         (gfc_parse_file): Update translate_all_program_units call.
512         * trans-decl.c (gfc_init_coarray_decl): Fix variable declaration,
513         new argument whether DECL_EXTERNAL should be used.
514         (create_main_function): Update gfc_init_coarray_decl call.
515         * trans-intrinsic.c (trans_this_image, trans_image_index,
516         conv_intrinsic_cobound): Ditto.
517
518 2011-05-06  Tobias Burnus  <burnus@net-b.de>
519
520         PR fortran/18918
521         * trans-array.c (gfc_walk_variable_expr): Continue walking
522         for scalar coarrays.
523         * trans-intrinsic.c (convert_element_to_coarray_ref): New function.
524         (trans_this_image, trans_image_index, conv_intrinsic_cobound): Use it.
525         (trans_this_image): Fix algorithm.
526         * trans-types.c (gfc_get_element_type, gfc_get_array_descriptor_base,
527         gfc_sym_type): Handle scalar coarrays.
528
529 2011-05-06  Tobias Burnus  <burnus@net-b.de>
530
531         PR fortran/48858
532         PR fortran/48820
533         * lang.opt (std=f2008tr): New.
534         * libgfortran.h (GFC_STD_F2008_TR): New macro constant.
535         * decl.c (verify_c_interop_param): Allow OPTIONAL in BIND(C)
536         procedures for -std=f2008tr/gnu/legacy.
537         (gfc_match_import): Set sym to NULL.
538         * options.c (set_default_std_flags,gfc_handle_option): Handle
539         -std=f2008tr.
540         * invoke.texi (-std=): Document -std=f2008tr.
541
542 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
543
544         * trans-decl.c (gfc_trans_entry_master_switch): Call build_case_label.
545         * trans-io.c (add_case): Likewise.
546         * trans-stmt.c (gfc_trans_integer_select): Likewise.
547         (gfc_trans_character_select): Likewise.
548
549 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
550
551         * trans-decl.c (trans_function_start): Do not set
552         dont_save_pending_sizes_p.
553
554 2011-05-04  Nathan Froyd  <froydnj@codesourcery.com>
555
556         * trans.h (gfc_chainon_list): Delete.
557         * trans.c (gfc_chainon_list): Delete.
558
559 2011-05-04  Tobias Burnus  <burnus@net-b.de>
560
561         PR fortran/48864
562         * invoke.texi (fno-protect-parens): Document
563         that -Ofast implies -fno-protect-parens.
564         * options.c (gfc_init_options, gfc_post_options):
565         Make -Ofast imply -fno-protect-parens.
566
567 2011-05-04  Nathan Froyd  <froydnj@codesourcery.com>
568
569         * trans-decl.c (build_library_function_decl_1): Call
570         build_function_type_vec.  Adjust argument list building accordingly.
571         * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Likewise.
572         * trans-types.c (gfc_get_function_type): Likewise.
573
574 2011-05-04  Richard Guenther  <rguenther@suse.de>
575
576         * trans-array.c (gfc_trans_array_constructor_value): Use
577         size_int for bounds of range types.
578         (gfc_trans_array_constructor_value): Use size_type_node
579         for memcpy argument.
580         * trans-common.c (build_field): Use gfc_charlen_type_node
581         for lengths.
582         * trans-openmp.c (gfc_trans_omp_clauses): Do not pass NULL
583         as type to build_int_cst.
584         * trans-const.c (gfc_build_string_const): Use size_int
585         for bounds of range types.
586         (gfc_build_wide_string_const): Likewise.
587         * trans-stmt.c (gfc_trans_label_assign): Use gfc_charlen_type_node
588         for lengths.
589         (gfc_trans_character_select): Likewise.
590         (gfc_trans_character_select): Do not pass NULL
591         as type to build_int_cst.
592         (gfc_trans_character_select): Use size_int for bounds of range types.
593         * trans-io.c (gfc_build_io_library_fndecls): Likewise.
594         (add_case): Do not pass NULL as type to build_int_cst.
595         (transfer_expr): Likewise.
596         (transfer_array_desc): Likewise.
597         * trans-decl.c (gfc_add_assign_aux_vars): Use gfc_charlen_type_node
598         for lengths.
599         (gfc_trans_assign_aux_var): Likewise.
600         (create_main_function): Use size_int for bounds of range types.
601         * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): Do not pass
602         NULL as type to build_int_cst.
603         (gfc_conv_intrinsic_spacing): Likewise.
604         (gfc_conv_intrinsic_rrspacing): Likewise.
605         (gfc_conv_intrinsic_len): Use gfc_charlen_type_node for lengths.
606
607 2011-05-04  Richard Guenther  <rguenther@suse.de>
608
609         * trans-types.c (gfc_get_array_type_bounds): Remove zero notrunc
610         argument to int_const_binop.
611
612 2011-05-03  Tobias Burnus  <burnus@net-b.de>
613
614         PR fortran/18918
615         * trans-intrinsic.c (trans_this_image): Implement version with
616         coarray argument.
617         (conv_intrinsic_cobound): Simplify code.
618         (gfc_conv_intrinsic_function): Call trans_this_image for
619         this_image(coarray) except for -fcoarray=single.
620
621 2011-05-02  Steven G. Kargl  <kargl@gcc.gnu.org>
622
623         PR fortran/48720
624         * gfortran.texi: Document the 'Q' exponent-letter extension.
625         * invoke.texi: Document -Wreal-q-constant.
626         * lang.opt: Add -Wreal-q-constant option.
627         * gfortran.h: Add warn_real_q_constant to option struct.
628         * primary.c (match_real_constant):  Use it.  Accept 'Q' as
629         exponent-letter for REAL(16) real-literal-constant with a
630         fallback to REAL(10) or error if REAL(10) is not available.
631         * options.c (gfc_init_options, set_Wall) Set it.
632         (gfc_handle_option): Handle new option.
633
634 2011-04-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
635
636         * dump-prase-tree.c (show_code_node):  Set the current
637         namespace to the BLOCK before displaying it; restore
638         afterwards.
639
640 2011-04-30  Tobias Burnus  <burnus@net-b.de>
641
642         PR fortran/48821
643         * decl.c (gfc_match_import): Don't try to find the
644         symbol if already found.
645
646 2011-04-30  Paul Thomas  <pault@gcc.gnu.org>
647
648         PR fortran/48746
649         * trans-expr.c (fcncall_realloc_result): Set the bounds and the
650         offset so that the lbounds are one.
651         (gfc_trans_arrayfunc_assign): Add rank to arguments of above.
652
653 2011-04-29  Paul Thomas  <pault@gcc.gnu.org>
654
655         PR fortran/48462
656         * trans-expr.c (arrayfunc_assign_needs_temporary): Deal with
657         automatic reallocation when the lhs is a target.
658
659         PR fortran/48746
660         * trans-expr.c (fcncall_realloc_result): Make sure that the
661         result dtype field is set before the function call.
662
663 2011-04-29  Tobias Burnus  <burnus@net-b.de>
664
665         PR fortran/48810
666         * resolve.c (resolve_typebound_generic_call): Don't check access
667         flags of the specific function.
668
669         PR fortran/48800
670         * resolve.c (resolve_formal_arglist): Don't change AS_DEFERRED
671         to AS_ASSUMED_SHAPE for function results.
672         (resolve_fl_var_and_proc): Print also for function results with
673         AS_DEFERRED an error, if they are not a pointer or allocatable.
674         (resolve_types): Make sure arguments of procedures in interface
675         blocks are resolved.
676
677 2011-04-29  Michael Matz  <matz@suse.de>
678
679         * options.c (options.c): Set warn_maybe_uninitialized.
680
681 2011-04-28  Tobias Burnus  <burnus@net-b.de>
682
683         PR fortran/48112
684         * resolve.c (resolve_fl_var_and_proc): Print diagnostic of
685         function results only once.
686         (resolve_symbol): Always resolve function results.
687
688         PR fortran/48279
689         * expr.c (gfc_check_vardef_context): Fix handling of generic
690         EXPR_FUNCTION.
691         * interface.c (check_interface0): Reject internal functions
692         in generic interfaces, unless -std=gnu.
693
694 2011-04-27  Tobias Burnus  <burnus@net-b.de>
695
696         PR fortran/48788
697         * resolve.c (resolve_global_procedure): Error recovery -
698         avoid segfault for (non)character-returning functions.
699
700 2011-04-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
701
702         * decl.c (gfc_match_end):  Check that the block name starts
703         with "block@".
704         * parse.c (gfc_build_block_ns):  Make block names unique by
705         numbering them.
706
707 2011-04-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
708
709         * frontend-passes.c (inserted_block):  New variable.
710         (changed_statement):  Likewise.
711         (create_var):  Encase statement to be operated on in a BLOCK.
712         Adjust code insertion for BLOCK.
713         (cfe_code):  Set inserted_block and changed_statement to NULL.
714
715 2011-04-23  Tobias Burnus  <burnus@net-b.de>
716
717         PR fortran/18918
718         * module.c (mio_array_spec): Set as->cotype on reading.
719         * resolve.c (resolve_allocate_expr): Fix allocating coarray
720         components.
721
722 2011-04-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
723
724         PR fortran/48405
725         * frontend_passes (cfe_register_funcs): Remove workaround for DO
726         loops.
727         (gfc_code_walker):  Make sure the pointer to the current
728         statement doen't change when other statements are inserted.
729
730 2011-04-21  Tobias Burnus  <burnus@net-b.de>
731
732         PR fortran/18918
733         * array.c (gfc_match_array_spec): Fix maximal rank(+corank) check.
734
735 2011-04-20  Jim Meyering  <meyering@redhat.com>
736
737         * expr.c (free_expr0): Remove useless if-before-free.
738         * gfortranspec.c (lang_specific_pre_link): Likewise.
739         * interface.c (gfc_extend_expr): Likewise.
740         * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
741
742 2011-04-19  Tobias Burnus  <burnus@net-b.de>
743
744         PR fortran/48588
745         PR fortran/48692
746
747         * module.c (fix_mio_expr): Commit created symbol.
748
749 2011-04-19  Janne Blomqvist  <jb@gcc.gnu.org>
750
751         * scanner.c (load_file): Use XCNEWVAR instead of xcalloc.
752
753 2011-04-19  Janne Blomqvist  <jb@gcc.gnu.org>
754
755         * frontend-passes.c (gfc_run_passes): Use XDELETEVEC instead of
756         free.
757
758 2011-04-19  Janne Blomqvist  <jb@gcc.gnu.org>
759
760         * misc.c (gfc_getmem): Remove function.
761         * gfortran.h: Remove gfc_getmem prototype. Replace gfc_getmem
762         usage with XCNEW or XCNEWVEC.
763         * expr.c (gfc_check_assign_symbol): Replace gfc_getmem usage with
764         XCNEW or XCNEWVEC.
765         * options.c (gfc_handle_module_path_options)
766         (gfc_get_option_string): Likewise.
767         * resolve.c (gfc_resolve_forall): Likewise.
768         * simplify.c (simplify_transformation_to_array): Likewise.
769         * target-memory.c (gfc_target_interpret_expr): Likewise.
770         * trans-common.c (get_segment_info, copy_equiv_list_to_ns)
771         (get_init_field): Likewise.
772         * trans-expr.c (gfc_conv_statement_function): Likewise.
773         * trans-io.c (nml_full_name): Likewise.
774         * trans-stmt.c (gfc_trans_forall_1): Likewise.
775         * scanner.c (load_file): Replace gfc_getmem usage with xcalloc.
776
777 2011-04-19  Tobias Burnus  <burnus@net-b.de>
778
779         PR fortran/48588
780         * parse.c (resolve_all_program_units): Skip modules.
781         (translate_all_program_units): Handle modules.
782         (gfc_parse_file): Defer code generation for modules.
783
784 2011-04-19  Martin Jambor  <mjambor@suse.cz>
785
786         * trans-decl.c (gfc_generate_function_code): Call cgraph_create_node
787         instead of cgraph_get_create_node.
788
789 2011-04-18  Jim Meyering  <meyering@redhat.com>
790
791         remove now-unused definition of gfc_free
792         * misc.c (gfc_free): Remove function.
793         * gfortran.h (gfc_free): Remove its prototype.
794
795 2011-04-18  Jim Meyering  <meyering@redhat.com>
796
797         convert each use of gfc_free (p) to free (p)
798         Do that by running this command:
799           perl -pi -e    's/\bgfc_free ?\(/free (/' \
800             $(git grep -El '\bgfc_free ?\(')
801         which also corrects the few uses that lacked a space between
802         the function name and the open parenthesis.
803         Manually undo the change to the function definition itself
804         and its prototype.  They'll be removed next.
805         * array.c (gfc_free_array_spec, gfc_set_array_spec): s/gfc_free/free/
806         * constructor.c (node_free): Likewise.
807         * cpp.c (dump_queued_macros): Likewise.
808         * data.c (gfc_assign_data_value): Likewise.
809         * decl.c (free_variable, free_value, gfc_free_data): Likewise.
810         (gfc_free_data_all, match_old_style_init): Likewise.
811         (gfc_set_constant_character_len, gfc_free_enum_history, NUM_DECL):
812         Likewise.
813         (gfc_match_modproc): Likewise.
814         * dependency.c (check_section_vs_section): Likewise.
815         * error.c (gfc_pop_error, gfc_free_error): Likewise.
816         * expr.c (free_expr0, gfc_free_expr, gfc_free_actual_arglist): Likewise.
817         (gfc_free_ref_list, gfc_replace_expr, gfc_copy_ref): Likewise.
818         (find_substring_ref, gfc_simplify_expr, gfc_check_assign_symbol):
819         Likewise.
820         * frontend-passes.c (gfc_run_passes, cfe_expr_0): Likewise.
821         (strip_function_call, optimize_comparison): Likewise.
822         * interface.c (gfc_free_interface, arginfo, check_interface0): Likewise.
823         (CHECK_OS_COMPARISON, gfc_extend_assign, gfc_free_formal_arglist):
824         Likewise.
825         * intrinsic.c (gfc_intrinsic_done_1, gfc_convert_type_warn): Likewise.
826         (gfc_convert_chartype): Likewise.
827         * io.c (gfc_free_open, compare_to_allowed_values, gfc_free_close):
828         Likewise.
829         (gfc_free_filepos, gfc_free_dt, gfc_free_inquire): Likewise.
830         * match.c (gfc_free_iterator, gfc_match_associate): Likewise.
831         (gfc_free_alloc_list, gfc_free_namelist, gfc_free_equiv_until):
832         Likewise.
833         (free_case, gfc_free_forall_iterator): Likewise.
834         * misc.c: Likewise.
835         * module.c (free_pi_tree, resolve_fixups, free_rename): Likewise.
836         (free_true_name, peek_atom, mio_allocated_wide_string): Likewise.
837         (mio_pool_string, mio_internal_string, mio_gmp_integer): Likewise.
838         (mio_gmp_real, mio_expr, mio_typebound_proc): Likewise.
839         (mio_full_typebound_tree, skip_list, load_equiv): Likewise.
840         (free_written_common, gfc_use_module, gfc_free_use_stmts): Likewise.
841         * openmp.c (gfc_free_omp_clauses): Likewise.
842         * options.c (gfc_post_options): Likewise.
843         * parse.c (select_type_pop, parse_omp_structured_block): Likewise.
844         * primary.c (gfc_free_structure_ctor_component): Likewise.
845         * resolve.c (resolve_structure_cons, check_host_association): Likewise.
846         (gfc_resolve_forall, resolve_equivalence): Likewise.
847         * scanner.c (gfc_scanner_done_1, gfc_release_include_path): Likewise.
848         (gfc_define_undef_line, preprocessor_line, include_line): Likewise.
849         (load_file, gfc_read_orig_filename): Likewise.
850         * simplify.c (simplify_transformation_to_array): Likewise.
851         (gfc_simplify_ibits, simplify_shift, gfc_simplify_ishftc, STRING):
852         Likewise.
853         (gfc_simplify_compiler_options): Likewise.
854         * st.c (gfc_free_statement, gfc_free_statements): Likewise.
855         (gfc_free_association_list): Likewise.
856         * symbol.c (free_components, gfc_free_st_label, free_st_labels):
857         Likewise.
858         (gfc_delete_symtree, gfc_free_symbol, gfc_undo_symbols): Likewise.
859         (free_old_symbol, gfc_commit_symbols, free_tb_tree): Likewise.
860         (free_common_tree, free_uop_tree, free_sym_tree): Likewise.
861         (gfc_free_dt_list, gfc_free_equiv_infos, gfc_free_equiv_lists):
862         Likewise.
863         (gfc_free_finalizer, gfc_free_charlen, free_entry_list): Likewise.
864         (gfc_free_namespace): Likewise.
865         * trans-array.c (gfc_free_ss, gfc_trans_array_bound_check): Likewise.
866         (gfc_conv_array_ref, gfc_conv_ss_startstride): Likewise.
867         (gfc_trans_dummy_array_bias, gfc_conv_array_parameter): Likewise.
868         * trans-common.c (get_init_field, create_common): Likewise.
869         * trans-const.c (gfc_build_wide_string_const): Likewise.
870         (gfc_conv_string_init): Likewise.
871         * trans-decl.c (gfc_generate_function_code): Likewise.
872         * trans-expr.c (gfc_conv_substring, gfc_free_interface_mapping):
873         Likewise.
874         (SCALAR_POINTER, gfc_conv_statement_function): Likewise.
875         (gfc_trans_subarray_assign): Likewise.
876         * trans-intrinsic.c (conv_generic_with_optional_char_arg): Likewise.
877         * trans-io.c (gfc_trans_io_runtime_check, set_string): Likewise.
878         (transfer_namelist_element, transfer_array_component): Likewise.
879         * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
880         * trans-stmt.c (cleanup_forall_symtrees, gfc_trans_forall_1): Likewise.
881         * trans.c (trans_runtime_error_vararg, gfc_restore_backend_locus):
882         Likewise.
883
884 2011-04-15  Jim Meyering  <meyering@redhat.com>
885
886         gfortran: remove cpp definition of free, ...
887         in preparation for the s/gfc_free/free/ transformation.
888         * gfortran.h (free): Remove macro definition that would otherwise
889         prevent direct use of the function.
890
891 2011-04-18  Tobias Burnus  <burnus@net-b.de>
892
893         PR fortran/18918
894         * array.c (gfc_match_array_ref): Check for too many codimensions.
895         * check.c (gfc_check_image_index): Check number of elements
896         in SUB argument.
897         * simplify.c (gfc_simplify_image_index): Remove unreachable checks.
898
899 2011-04-18  Tobias Burnus  <burnus@net-b.de>
900
901         PR fortran/18918
902         * iresolve.c (gfc_resolve_image_index): Set ts.type.
903         * simplify.c (gfc_simplify_image_index): Don't abort if the bounds
904         are not known at compile time and handle -fcoarray=lib.
905         * trans-intrinsics.c (gfc_conv_intrinsic_function): Handle
906         IMAGE_INDEX.
907         (conv_intrinsic_cobound): Fix comment typo.
908         (trans_this_image): New function.
909         * trans-array.c (gfc_unlikely): Move to trans.c.
910         * trans.c (gfc_unlikely): Function moved from trans-array.c.
911         (gfc_trans_runtime_check): Use it.
912         * trans-io.c (gfc_trans_io_runtime_check): Ditto.
913         * trans.h (gfc_unlikely): Add prototype.
914
915 2011-04-18  Paul Thomas  <pault@gcc.gnu.org>
916
917         PR fortran/48462
918         * trans-expr.c (fcncall_realloc_result): Renamed version of
919         realloc_lhs_bounds_for_intrinsic_call that does not touch the
920         descriptor bounds anymore but makes a temporary descriptor to
921         hold the result.
922         (gfc_trans_arrayfunc_assign): Modify the reference to above
923         renamed function.
924
925 2011-05-17  Tobias Burnus  <burnus@net-b.de>
926
927         PR fortran/48624
928         * trans-decl.c (gfc_get_extern_function_decl): Fix decl
929         for external procedures with proc arguments.
930
931 2011-04-15  Michael Matz  <matz@suse.de>
932
933         * trans-array.c (toplevel): Include gimple.h.
934         (gfc_trans_allocate_array_storage): Check flag_stack_arrays,
935         properly expand variable length arrays.
936         (gfc_trans_auto_array_allocation): If flag_stack_arrays create
937         variable length decls and associate them with their scope.
938         * gfortran.h (gfc_option_t): Add flag_stack_arrays member.
939         * options.c (gfc_init_options): Handle -fstack_arrays option.
940         * lang.opt (fstack-arrays): Add option.
941         * invoke.texi (Code Gen Options): Document it.
942         * Make-lang.in (trans-array.o): Depend on GIMPLE_H.
943
944 2011-04-15  Tobias Burnus  <burnus@net-b.de>
945
946         PR fortran/18918
947         * trans-intrinsic.c (conv_intrinsic_cobound): Remove unused
948         code which is also causing an ICE.
949
950 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
951
952         * f95-lang.c (poplevel): Use BLOCK_CHAIN and block_chainon.
953
954 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
955
956         * f95-lang.c (union lang_tree_node): Check for TS_COMMON before
957         calling TREE_CHAIN.
958
959 2011-04-12  Paul Thomas  <pault@gcc.gnu.org>
960
961         PR fortran/48360
962         PR fortran/48456
963         * trans-array.c (get_std_lbound): For derived type variables
964         return array valued component lbound.
965
966 2011-04-12  Martin Jambor  <mjambor@suse.cz>
967
968         * trans-decl.c (gfc_generate_function_code): Call
969         cgraph_get_create_node instead of cgraph_node.
970
971 2011-04-11  Tobias Burnus  <burnus@net-b.de>
972
973         PR fortran/18918
974         * simplify.c (simplify_bound_dim): Exit for
975         ucobound's last dimension unless -fcoarray=single.
976         * trans-array (gfc_conv_descriptor_size_1): Renamed from
977         gfc_conv_descriptor_size, made static, has now from_dim and
978         to_dim arguments.
979         (gfc_conv_descriptor_size): Call gfc_conv_descriptor_size.
980         (gfc_conv_descriptor_cosize): New function.
981         * trans-array.h (gfc_conv_descriptor_cosize): New prototype.
982         * trans-intrinsic.c (conv_intrinsic_cobound): Add input_location
983         and handle last codim of ucobound for when -fcoarray is not "single".
984
985 2011-04-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
986
987         PR fortran/48448
988         * gfortran.h (gfc_option_t):  Add warn_function_elimination and
989         flag_frontend_optimize.
990         * lang.opt (Wfunction-elimination):  Add.
991         (ffrontend-optimize):  Add.
992         * invoke.texi:  Add documentation for -Wfunction-elimination
993         and -ffrontend-optimize.  Add -faggressive-function-elimination
994         to list of code generation options.
995         * frontend-passes.c (gfc_run_passes):  Run optimizations if
996         flag_frontend_optimize is set.
997         (warn_function_elimination):  New function.
998         (cfe_expr_0):  Call it if requested to do so.
999         * options.c (gfc_init_options):  Initiate warn_function_elimination
1000         and flag_frontend_optimize.
1001         (gfc_post_options):  Set flag_frontend_optimize if not specified
1002         by user, depending on the optimization level.
1003         (gfc_handle_option):  Handle -Wfunction-elimination and
1004         -ffrontend-optimize.
1005
1006 2011-04-06  Tobias Burnus  <burnus@net-b.de>
1007
1008         PR fortran/18918
1009         * trans-intrinsic.c (gfc_conv_intrinsic_function): Fix
1010         call for this_image.
1011
1012 2011-04-05  Nathan Froyd  <froydnj@codesourcery.com>
1013
1014         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Use
1015         build_function_type_list instead of build_function_type.  Correct
1016         argument order for func_frexp and func_scalbn.
1017
1018 2011-04-05  Duncan Sands  <baldrick@free.fr>
1019
1020         * f95-lang.c (build_builtin_fntypes): Swap frexp parameter types.
1021
1022 2010-04-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
1023
1024         * frontend-passes: (optimize_lexical_comparison): New function.
1025         (optimize_expr): Call it.
1026         (optimize_comparison): Also handle lexical comparison functions.
1027         Return false instad of -2 for unequal comparison.
1028
1029 2011-04-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
1030
1031         PR fortran/48412
1032         * frontend-passes (cfe_expr_0):  Reverse the order of going
1033         through the loops.
1034
1035 2011-04-04  Tobias Burnus  <burnus@net-b.de>
1036             Mikael Morin  <mikael.morin@sfr.fr>
1037
1038         PR fortran/18918
1039         * check.c (is_coarray): Update - because of DIMEN_THIS_IMAGE.
1040         * expr.c (gfc_is_coindexed): Ditto.
1041         * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_THIS_IMAGE.
1042         * interface.c (compare_parameter): Use gfc_expr_attr and
1043         gfc_is_coindexed.
1044         * resolve.c (check_dimension, compare_spec_to_ref,
1045         resolve_allocate_expr, check_data_variable): Update for
1046         DIMEN_THIS_IMAGE.
1047         * simplify.c (gfc_simplify_lcobound, gfc_simplify_this_image,
1048         gfc_simplify_ucobound): Allow non-constant bounds.
1049         * trans-array.c (gfc_set_loop_bounds_from_array_spec,
1050         gfc_trans_create_temp_array, gfc_trans_constant_array_constructor,
1051         gfc_set_vector_loop_bounds, gfc_conv_array_index_offset,
1052         gfc_start_scalarized_body, gfc_trans_scalarizing_loops,
1053         gfc_trans_scalarized_loop_boundary, gfc_conv_section_startstride,
1054         gfc_conv_ss_startstride, gfc_conv_loop_setup,
1055         gfc_trans_array_bounds, gfc_conv_expr_descriptor,
1056         gfc_walk_variable_expr): Handle codimen.
1057         * trans-decl.c (gfc_build_qualified_array): Save cobounds.
1058         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use arg2.
1059         (conv_intrinsic_cobound): New function.
1060         (gfc_conv_intrinsic_function): Call it.
1061         (gfc_walk_intrinsic_function, gfc_add_intrinsic_ss_code): Handle
1062         ucobound, lcobound, this_image.
1063         * fortran/trans-types.c (gfc_build_array_type): Save cobounds.
1064         (gfc_get_dtype): Honour corank.
1065         (gfc_get_nodesc_array_type): Save corank and codimensions.
1066         (gfc_get_array_type_bounds): Save cobound.
1067         * fortran/trans.h (gfc_ss_info,gfc_loopinfo): Add codimen item.
1068         (gfc_array_kind): Add corank item.
1069         (GFC_TYPE_ARRAY_CORANK): New macro.
1070
1071 2011-04-03  Kai Tietz  <ktietz@redhat.com>
1072
1073         PR middle-end/48422
1074         * Make-lang.in (f95-lang.o): Add some missing dependencies.
1075
1076 2011-04-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
1077
1078         PR fortran/48352
1079         * frontend-passes (cfe_register_funcs):  Don't
1080         register functions if they appear as iterators in DO loops.
1081
1082 2011-03-30  Michael Matz  <matz@suse.de>
1083
1084         PR fortran/47516
1085         * trans-expr.c (realloc_lhs_loop_for_fcn_call): Take loop as parameter,
1086         don't use local variable.
1087         (gfc_trans_arrayfunc_assign): Adjust caller.
1088
1089 2011-03-29  Janus Weil  <janus@gcc.gnu.org>
1090
1091         PR fortran/48095
1092         * decl.c (match_procedure_decl,match_ppc_decl): Set flavor of interface.
1093         * module.c (MOD_VERSION): Bump.
1094         (mio_typespec): Read/write 'interface' field.
1095         * primary.c (match_string_constant,match_logical_constant): Remove
1096         unneeded code.
1097         (match_complex_constant): Make sure to clear the typespec.
1098
1099 2011-03-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
1100
1101         * frontend-passes.c (create_var):  Warn about creating an
1102         array temporary if requested.
1103
1104 2011-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
1105
1106         PR fortran/47065
1107         * frontend-passes.c (optimize_trim): Also follow references, except
1108         when they are substring references or array references.
1109
1110 2011-03-27  Tobias Burnus  <burnus@net-b.de>
1111
1112         PR fortran/18918
1113         * gfortran.h (gfc_isym_id): Rename GFC_ISYM_NUMIMAGES to
1114         GFC_ISYM_NUM_IMAGES.
1115         (gfc_fcoarray): Add GFC_FCOARRAY_LIB.
1116         * intrinsic.c (add_functions): Update due to GFC_ISYM_NUM_IMAGES
1117         rename.
1118         * invoke.texi (-fcoarray=): Document "lib" argument.
1119         * iresolve.c (gfc_resolve_this_image): Fix THIS IMAGE().
1120         * libgfortran.h (libgfortran_stat_codes): Add comments.
1121         * options.c (gfc_handle_coarray_option): Add -fcoarray=lib.
1122         * simplify.c (gfc_simplify_num_images, gfc_simplify_this_image):
1123         Handle GFC_FCOARRAY_LIB.
1124         * trans.h (gfc_init_coarray_decl): New prototype.
1125         (gfor_fndecl_caf_init, gfor_fndecl_caf_finalize,
1126         gfor_fndecl_caf_critical, gfor_fndecl_caf_end_critical,
1127         gfor_fndecl_caf_sync_all, gfor_fndecl_caf_sync_images,
1128         gfor_fndecl_caf_error_stop, gfor_fndecl_caf_error_stop_str,
1129         gfort_gvar_caf_num_images, gfort_gvar_caf_this_image):
1130         New global variables.
1131         * trans-decl.c: Declare several CAF functions (cf. above).
1132         (gfc_build_builtin_function_decls): Initialize those.
1133         (gfc_init_coarray_decl): New function.
1134         (create_main_function): Call CAF init/finalize functions.
1135         * trans-intrinsic.c (trans_this_image, trans_num_images): New.
1136         (gfc_conv_intrinsic_function): Call those.
1137         * trans-stmt.c (gfc_trans_stop, gfc_trans_sync, gfc_trans_critical):
1138         Add code for GFC_FCOARRAY_LIB.
1139
1140 2011-03-26  Janus Weil  <janus@gcc.gnu.org>
1141
1142         PR fortran/48291
1143         * class.c (get_unique_hashed_string): Adjust maximum allowable length
1144         for unique type string.
1145
1146 2011-03-25  Kai Tietz  <ktietz@redhat.com>
1147
1148         * scanner.c (preprocessor_line): Use filename_cmp
1149         instead of strcmp.
1150
1151 2011-03-25  Tobias Burnus  <burnus@net-b.de>
1152
1153         PR fortran/48174
1154         PR fortran/45304
1155         * trans-types.c (gfc_get_function_type): Don't use varargs if the
1156         procedure is known to have no arguments.
1157
1158 2010-03-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
1159
1160         PR fortran/22572
1161         * gfortran.h (gfc_option_t) : Add
1162         flag_aggressive_function_elimination.
1163         (gfc_dep_compare_functions):  Add prototype.
1164         * lang.opt: Add faggressive-function-elimination.
1165         * invoke.texi: Document -faggressive-function-elimination.
1166         * frontend_passes (expr_array):  New static variable.
1167         (expr_size):  Likewise.
1168         (expr_count):  Likewise.
1169         (current_code):  Likewise.
1170         (current_ns):  Likewise.
1171         (gfc_run_passes):  Allocate and free space for expressions.
1172         (cfe_register_funcs):  New function.
1173         (create_var):  New function.
1174         (cfc_expr_0):  New function.
1175         (cfe_code):  New function.
1176         (optimize_namespace):  Invoke gfc_code_walker with cfe_code
1177         and cfe_expr_0.
1178         * dependency.c (gfc_dep_compare_functions):  New function.
1179         (gfc_dep_compare_expr):  Use it.
1180         * options.c (gfc_init_options):  Handle
1181         flag_aggressive_function_elimination.
1182         (gfc_handle_option):  Likewise.
1183
1184 2011-03-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1185
1186         * arith.c (arith_power): Plug memory leak.
1187
1188 2011-03-12  Janus Weil  <janus@gcc.gnu.org>
1189
1190         PR fortran/48059
1191         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Replace base type
1192         for polymorphic arguments.
1193
1194 2011-03-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1195
1196         PR fortran/48054
1197         * intrinsic.texi: Clarify doc of logarithm functions.
1198
1199 2011-03-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1200
1201         PR fortran/47552
1202         * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Fix type of
1203         the string length variable.
1204
1205 2011-03-11  Janus Weil  <janus@gcc.gnu.org>
1206
1207         PR fortran/47768
1208         * module.c (ab_attribute,attr_bits): Add AB_PROC_POINTER_COMP.
1209         (mio_symbol_attribute): Handle attribute 'proc_pointer_comp'.
1210
1211 2011-03-06  Paul Thomas  <pault@gcc.gnu.org>
1212             Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1213
1214         PR fortran/47850
1215         * expr.c (gfc_is_constant_expr): Only use gfc_constant_ac if
1216         the expression has an iterator.  Otherwise, iterate through the
1217         array, checking for constant expressions for each element.
1218
1219 2011-03-04  Janne Blomqvist  <jb@gcc.gnu.org>
1220
1221         PR libfortran/47802
1222         * intrinsic.texi: Update CTIME and FDATE documentation.
1223
1224 2011-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1225
1226         * invoke.texi (Option Summary, Fortran Dialect Options)
1227         (Preprocessing Options, Runtime Options, Code Gen Options):
1228         Fix vertical list spacing by using @itemx for additinoal
1229         items, empty line before @table.  Fix typos.
1230
1231 2011-02-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1232
1233         PR fortran/47894
1234         * intrinsic.texi: Fix doc of the VERIFY intrinsic.
1235
1236 2011-02-26  Tobias Burnus  <burnus@net-b.de>
1237
1238         PR fortran/47846
1239         * trans-stmt.c (gfc_trans_allocate): Fix allocation with
1240         type-spec of deferred-length strings.
1241
1242 2011-02-26  Tobias Burnus  <burnus@net-b.de>
1243
1244         PR fortran/47886
1245         * openmp.c (gfc_resolve_omp_directive): Resolve if()
1246         condition of OpenMP's task.
1247
1248 2011-02-26  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1249
1250         PR fortran/47894
1251         * intrinsic.texi: Fix doc of the VERIFY intrinsic.
1252
1253 2011-02-24  Tobias Burnus  <burnus@net-b.de>
1254
1255         PR fortran/47872
1256         * intrinsic.texi (ALLOCATED, ATAN, BESSEL_JN, BESSEL_YN): Add
1257         multitable for linebreak between different syntax variants.
1258
1259 2011-02-24  Richard Guenther  <rguenther@suse.de>
1260
1261         PR fortran/47839
1262         * f95-lang.c (pushdecl): For externs in non-global scope push
1263         a copy of the decl into the BLOCK.
1264
1265 2011-02-23  Mikael Morin  <mikael@gcc.gnu.org>
1266
1267         PR fortran/40850
1268         * trans.c (gfc_prepend_expr_to_block): New function.
1269         * trans.h (gfc_prepend_expr_to_block): Declare.
1270         * trans-array.c (gfc_conv_array_parameter): Replace
1271         gfc_add_expr_to_block with gfc_prepend_expr_to_block.
1272
1273 2011-02-22  Paul Thomas  <pault@gcc.gnu.org>
1274
1275         PR fortran/45743
1276         * trans-decl.c (gfc_get_extern_function_decl): Don't use the
1277         gsymbol backend_decl if the procedure has a formal argument
1278         that is a procedure.
1279
1280 2011-02-22  Tobias Burnus  <burnus@net-b.de>
1281
1282         PR fortran/41359
1283         * trans-stmt.c (gfc_trans_if_1): Use correct line for
1284         expressions in the if condition.
1285
1286 2011-02-20  Tobias Burnus  <burnus@net-b.de>
1287
1288         PR fortran/47797
1289         * trans-decl.c (gfc_trans_deferred_vars): Use gfc_set_backend_locus and
1290         gfc_restore_backend_locus to have better debug locations.
1291         * trans-array.c (gfc_trans_deferred_array): Ditto.
1292
1293 2011-02-20  Paul Thomas  <pault@gcc.gnu.org>
1294
1295         PR fortran/45077
1296         PR fortran/44945
1297         * trans-types.c (gfc_get_derived_type): Remove code that looks
1298         for decls in gsym and add call to gfc_get_module_backend_decl.
1299         * trans.h : Add prototype for gfc_get_module_backend_decl.
1300         * trans-decl.c (gfc_get_module_backend_decl): New function.
1301         (gfc_get_symbol_decl): Call it.
1302
1303 2011-02-19  Paul Thomas  <pault@gcc.gnu.org>
1304
1305         PR fortran/47348
1306         * trans-array.c (get_array_ctor_all_strlen): Move up in file.
1307         (get_array_ctor_var_strlen): Add block dummy and add call to
1308         get_array_ctor_all_strlen instead of giving up on substrings.
1309         Call gcc_unreachable for default case.
1310         (get_array_ctor_strlen): Add extra argument to in call to
1311         get_array_ctor_var_strlen.
1312
1313 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
1314
1315         PR fortran/47789
1316         * primary.c (gfc_match_structure_constructor): Handle empty parent
1317         types.
1318
1319 2011-02-18  Tobias Burnus
1320
1321         PR fortran/47775
1322         * trans-expr.c (arrayfunc_assign_needs_temporary): Use
1323         esym to check whether the specific procedure returns an
1324         allocatable or pointer.
1325
1326 2011-02-18  Michael Matz  <matz@suse.de>
1327
1328         PR fortran/45586
1329         * gfortran.h (struct gfc_component): Add norestrict_decl member.
1330         * trans.h (struct lang_type): Add nonrestricted_type member.
1331         * trans-expr.c (gfc_conv_component_ref): Search fields with correct
1332         parent type.
1333         * trans-types.c (mirror_fields, gfc_nonrestricted_type): New.
1334         (gfc_sym_type): Use it.
1335
1336 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
1337
1338         PR fortran/47768
1339         * resolve.c (resolve_transfer): Reject variables with procedure pointer
1340         components.
1341
1342 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
1343
1344         PR fortran/47767
1345         * gfortran.h (gfc_check_access): Removed prototype.
1346         (gfc_check_symbol_access): Added prototype.
1347         * module.c (gfc_check_access): Renamed to 'check_access', made static.
1348         (gfc_check_symbol_access): New function, basically a shortcut for
1349         'check_access'.
1350         (write_dt_extensions,write_symbol0,write_generic,write_symtree): Use
1351         'gfc_check_symbol_access'.
1352         (write_operator,write_module): Renamed 'gfc_check_access'.
1353         * resolve.c (resolve_fl_procedure,resolve_fl_derived,
1354         resolve_fl_namelist,resolve_symbol,resolve_fntype): Use
1355         'gfc_check_symbol_access'.
1356
1357 2011-02-16  Janus Weil  <janus@gcc.gnu.org>
1358
1359         PR fortran/47745
1360         * class.c (gfc_build_class_symbol): Set 'class_ok' attribute.
1361         * decl.c (build_sym,attr_decl1): Move setting of 'class_ok' into
1362         'gfc_build_class_symbol'.
1363         (gfc_match_decl_type_spec): Reject unlimited polymorphism.
1364         * interface.c (matching_typebound_op): Check for 'class_ok' attribute.
1365         * match.c (select_type_set_tmp): Move setting of 'class_ok' into
1366         'gfc_build_class_symbol'.
1367         * primary.c (gfc_variable_attr): Check for 'class_ok' attribute.
1368
1369 2011-02-15  Steven G. Kargl  <kargl@gcc.gnu.org>
1370
1371         PR fortran/47633
1372         . simplify.c (gfc_simplify_compiler_version): Fix off-by-one issue.
1373
1374 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
1375
1376         PR fortran/47730
1377         * parse.c (gfc_build_block_ns): Commit 'block@' symbol.
1378
1379 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
1380
1381         PR fortran/47728
1382         * class.c (gfc_build_class_symbol): Give a fatal error on polymorphic
1383         arrays.
1384         * primary.c (gfc_match_varspec): Avoid ICE for invalid class
1385         declaration.
1386
1387 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
1388
1389         PR fortran/47349
1390         * interface.c (get_expr_storage_size): Handle derived-type components.
1391
1392 2011-02-13  Tobias Burnus  <burnus@net-b.de>
1393
1394         PR fortran/47569
1395         * interface.c (compare_parameter): Avoid ICE with
1396         character components.
1397
1398 2011-02-12  Janus Weil  <janus@gcc.gnu.org>
1399
1400         * class.c (gfc_build_class_symbol): Reject polymorphic arrays.
1401         * decl.c (build_sym,build_struct,attr_decl1): Use return value of
1402         'gfc_build_class_symbol'.
1403
1404 2011-02-12  Michael Matz  <matz@suse.de>
1405             Janus Weil  <janus@gcc.gnu.org>
1406             Tobias Burnus  <burnus@net-b.de>
1407
1408         PR fortran/45586
1409         * trans-expr.c (conv_parent_component_references): Avoid unintendent
1410         skipping of parent compounds.
1411
1412 2011-02-11  Tobias Burnus  <burnus@net-b.de>
1413
1414         PR fortran/47550
1415         * resolve.c (resolve_formal_arglist): PURE with VALUE
1416         and no INTENT: Add -std= diagnostics.
1417
1418 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
1419
1420         PR fortran/47352
1421         * resolve.c (resolve_procedure_interface): If interface has a result
1422         variable, copy the typespec and set result pointer to self.
1423
1424 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
1425
1426         PR fortran/47463
1427         * resolve.c (resolve_typebound_subroutine): Remove erroneous line.
1428
1429 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
1430
1431         PR fortran/47637
1432         * trans-decl.c (init_intent_out_dt): Handle CLASS arguments.
1433
1434 2011-02-08  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1435
1436         * io.c (match_io_element): Do not set dt if not inquire.
1437
1438 2011-02-08  Janus Weil  <janus@gcc.gnu.org>
1439
1440         PR fortran/45290
1441         * expr.c (gfc_check_assign_symbol): Reject pointers as pointer
1442         initialization target.
1443
1444 2011-02-07  Janne Blomqvist  <jb@gcc.gnu.org>
1445             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1446
1447         * gfortran.texi (Thread-safety): texinfo styling fixes.
1448         * intrinsic.texi: Likewise.
1449
1450 2011-02-06  Janne Blomqvist  <jb@gcc.gnu.org>
1451
1452         * gfortran.texi (Compiler Characteristics): Add reference to
1453         thread-safety section.
1454
1455 2011-02-06  Janne Blomqvist  <jb@gcc.gnu.org>
1456
1457         * gfortran.texi (Thread-safety): New section.
1458         * intrinsic.texi (EXECUTE_COMMAND_LINE): Mention thread-safety.
1459         (GETENV): Likewise.
1460         (GET_ENVIRONMENT_VARIABLE): Likewise.
1461         (SYSTEM): Likewise.
1462
1463 2011-02-06  Paul Thomas  <pault@gcc.gnu.org>
1464
1465         PR fortran/47592
1466         * trans-stmt.c (gfc_trans_allocate): For deferred character
1467         length allocations with SOURCE, store to the values and string
1468         length to avoid calculating twice.  Replace gfc_start_block
1469         with gfc_init_block to avoid unnecessary contexts and to keep
1470         declarations of temporaries where they should be. Tidy up the
1471         code a bit.
1472
1473 2011-02-05  Janne Blomqvist  <jb@gcc.gnu.org>
1474
1475         PR fortran/42434
1476         * intrinsic.texi (SYSTEM_CLOCK): Update documentation.
1477
1478 2011-02-02  Janus Weil  <janus@gcc.gnu.org>
1479             Paul Thomas  <pault@gcc.gnu.org>
1480
1481         PR fortran/47082
1482         * trans-expr.c (gfc_trans_class_init_assign): Add call to
1483         gfc_get_derived_type.
1484         * module.c (read_cleanup): Do not use unique_symtrees for vtabs
1485         or vtypes.
1486
1487 2011-02-02  Janus Weil  <janus@gcc.gnu.org>
1488
1489         PR fortran/47572
1490         * resolve.c (resolve_fl_variable): Handle polymorphic allocatables.
1491
1492 2011-02-01  Janus Weil  <janus@gcc.gnu.org>
1493
1494         PR fortran/47565
1495         * trans-expr.c (gfc_conv_structure): Handle constructors for procedure
1496         pointer components with allocatable result.
1497
1498 2011-01-31  Janus Weil  <janus@gcc.gnu.org>
1499
1500         PR fortran/47455
1501         * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointers
1502         with pointer or allocatable result.
1503
1504 2011-01-31  Paul Thomas  <pault@gcc.gnu.org>
1505
1506         PR fortran/47519
1507         * trans-stmt.c (gfc_trans_allocate): Improve handling of
1508         deferred character lengths with SOURCE.
1509         * iresolve.c (gfc_resolve_repeat): Calculate character
1510         length from source length and ncopies.
1511         * dump-parse-tree.c (show_code_node): Show MOLD and SOURCE
1512         expressions for ALLOCATE.
1513
1514 2011-01-31  Janus Weil  <janus@gcc.gnu.org>
1515
1516         PR fortran/47463
1517         * resolve.c (resolve_typebound_subroutine): Bug fix for the case of
1518         an argument of a typebound assignment being a component.
1519
1520 2011-01-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1521
1522         * gfortranspec.c (add_arg_libgfortran) [HAVE_LD_STATIC_DYNAMIC] Use
1523         LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
1524
1525 2011-01-31  Tobias Burnus  <burnus@net-b.de>
1526
1527         PR fortran/47042
1528         * resolve.c (resolve_fl_procedure): Reject stmt functions
1529         with pointer/allocatable attribute.
1530
1531 2011-01-31  Tobias Burnus  <burnus@net-b.de>
1532
1533         PR fortran/47042
1534         * interface.c (gfc_procedure_use): Add explicit interface check for
1535         pointer/allocatable functions.
1536
1537 2011-01-30  Paul Thomas  <pault@gcc.gnu.org>
1538
1539         PR fortran/47523
1540         * trans-expr.c (gfc_trans_assignment_1): If the rhs is an op
1541         expr and is assigned to a deferred character length scalar,
1542         make sure that the function is called before reallocation,
1543         so that the length is available. Include procedure pointer
1544         and procedure pointer component rhs as well.
1545
1546         PR fortran/45170
1547         PR fortran/35810
1548         PR fortran/47350
1549         * gfortran.dg/allocatable_function_5.f90: New test not added by
1550         mistake on 2011-01-28.
1551
1552 2011-01-29  Tobias Burnus  <burnus@net-b.de>
1553
1554         PR fortran/47531
1555         * check.c (gfc_check_shape): Support kind argument in SHAPE.
1556         * intrinsic.c (add_functions): Ditto.
1557         * resolve.c (gfc_resolve_shape): Ditto.
1558         * simplify.c (gfc_simplify_shape): Ditto.
1559         * intrinsic.h (gfc_check_shape, gfc_resolve_shape,
1560         gfc_simplify_shape): Update prototypes.
1561         * intrinisc.text (SHAPE): Document kind argument.
1562
1563 2011-01-28  Tobias Burnus  <burnus@net-b.de>
1564
1565         PR fortran/47507
1566         * resolve.c (resolve_formal_arglist): Allow arguments with VALUE
1567         attribute also without INTENT.
1568
1569 2011-01-28  Tobias Burnus  <burnus@net-b.de>
1570
1571         * gfortran.texi (Fortran 2003 status): Mention support for
1572         nonconstant namelist variables.
1573
1574 2011-01-28  Paul Thomas  <pault@gcc.gnu.org>
1575             Tobias Burnus  <burnus@gcc.gnu.org>
1576
1577         PR fortran/45170
1578         PR fortran/35810
1579         PR fortran/47350
1580         * interface.c (compare_actual_formal): An allocatable or pointer
1581         deferred length actual is only allowed if the formal argument
1582         is also deferred length. Clean up whitespace.
1583         * trans-expr.c (gfc_conv_procedure_call): Pass string length for
1584         deferred character length formal arguments by reference. Do the
1585         same for function results.
1586         (gfc_trans_pointer_assignment): Do not do runtime check of lhs
1587         and rhs character lengths, if deferred length lhs.  In this case
1588         set the lhs character length to that of the rhs.
1589         (gfc_conv_string_parameter): Remove assert that string length is
1590         an integer type.
1591         (is_scalar_reallocatable_lhs): New function.
1592         (alloc_scalar_allocatable_for_assignment): New function.
1593         (gfc_trans_assignment_1): Call above new function. If the rhs is
1594         a deferred character length itself, makes ure that the function
1595         is called before reallocation, so that the length is available.
1596         (gfc_trans_asssignment): Remove error about assignment to
1597         deferred length character variables.
1598         * gfortran.texi : Update entry about (re)allocation on
1599         assignment.
1600         * trans-stmt.c (gfc_trans_allocate): Add code to handle deferred
1601         length character variables.
1602         * module.c (mio_typespec): Transfer deferred characteristic.
1603         * trans-types.c (gfc_get_function_type): New code to generate
1604         hidden typelist, so that those character lengths that are
1605         passed by reference get the right type.
1606         * resolve.c (resolve_contained_fntype): Supress error for
1607         deferred character length functions.
1608         (resolve_function, resolve_fl_procedure) The same.
1609         (check_symbols): Remove the error that support for
1610         entity with deferred type parameter is not yet implemented.
1611         (resolve_fl_derived): The same.
1612         match.c (alloc_opt_list): Allow MOLD for deferred length object.
1613         * trans-decl.c (gfc_get_symbol_decl): For deferred character
1614         length dummies, generate a local variable for string length.
1615         (create_function_arglist): Hidden length can be a pointer.
1616         (gfc_trans_deferred_vars): For deferred character length
1617         results and dummies, assign the string length to the local
1618         variable from the hidden argument on entry and the other way
1619         round on exit, as appropriate.
1620
1621 2011-01-27  Tobias Burnus  <burnus@net-b.de>
1622
1623         PR fortran/47474
1624         * trans-decl.c (gfc_generate_function_code): Fix init
1625         of allocatable result variable with allocatable components.
1626
1627 2011-01-27  Tobias Burnus  <burnus@net-b.de>
1628
1629         PR fortran/47472
1630         * options.c (gfc_handle_module_path_options): Save
1631         module path without trailing slash as include path.
1632
1633 2011-01-25  Tobias Burnus  <burnus@net-b.de>
1634
1635         PR fortran/47448
1636         * interface.c (gfc_check_operator_interface): Fix
1637         defined-assignment check.
1638
1639 2011-01-23  Tobias Burnus  <burnus@net-b.de>
1640
1641         PR fortran/47421
1642         * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
1643         scalar allocatable dummy arguments.
1644
1645 2011-01-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
1646
1647         PR fortran/38536
1648         * resolve.c (gfc_iso_c_func_interface):  For C_LOC,
1649         check for array sections followed by component references
1650         which are illegal.  Also check for coindexed arguments.
1651
1652 2011-01-22  Tobias Burnus  <burnus@net-b.de>
1653
1654         PR fortran/47399
1655         * primary.c (gfc_match_varspec): Relax gcc_assert to allow for
1656         PARAMETER TBP.
1657
1658 2011-01-21  Tobias Burnus  <burnus@net-b.de>
1659
1660         PR fortran/47394
1661         * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check):
1662         Use defined instead of magic number exit status codes.
1663         * scanner.c (include_line, gfc_new_file): Ditto.
1664
1665 2011-01-21  Tobias Burnus  <burnus@net-b.de>
1666
1667         PR fortran/47377
1668         * expr.c (gfc_check_pointer_assign): Reject expr data-targets
1669         without pointer attribute.
1670
1671 2011-01-18  Janus Weil  <janus@gcc.gnu.org>
1672
1673         PR fortran/47240
1674         * resolve.c (expression_rank): Fix rank of procedure poiner components.
1675         * trans-expr.c (gfc_conv_procedure_call): Take care of procedure
1676         pointer components as actual arguments.
1677
1678 2011-01-17  Jakub Jelinek  <jakub@redhat.com>
1679
1680         PR fortran/47331
1681         * gfortran.h (struct gfc_omp_saved_state): New type.
1682         (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New prototypes.
1683         * resolve.c (resolve_global_procedure): Call it around gfc_resolve
1684         call.
1685         * openmp.c (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New
1686         functions.
1687
1688 2011-01-17  Tobias Burnus  <burnus@net-b.de>
1689
1690         PR fortran/47327
1691         * invoke.texi (Options to request or suppress errors
1692         and warnings): Fix cross link.
1693
1694 2011-01-15  Tobias Burnus  <burnus@net-b.de>
1695
1696         * gfortran.texi: Update Fortran 2003 Status section.
1697
1698         PR fortran/47177
1699         * invoke.texi: Add missing "-E" to the -dM example.
1700
1701 2011-01-13  Tobias Burnus  <burnus@net-b.de>
1702
1703         PR fortran/47268
1704         * intrinsic.texi (get_command_argument, get_environment_variable):
1705         Mark arguments as optional in the Arguments section.
1706
1707 2011-01-13  Kai Tietz  <kai.tietz@onevision.com>
1708             Tobias Burnus  <burnus@net-b.de>
1709
1710         PR fortran/47260
1711         * trans-decl.c (gfc_get_extern_function_decl,
1712         build_function_decl): Set TREE_PUBLIC/TREE_EXTERNAL before
1713         calling decl_attributes.
1714
1715 2011-01-13  Tobias Burnus  <burnus@net-b.de>
1716             Mikael Morin  <mikael@gcc.gnu.org>
1717
1718         PR fortran/45848
1719         PR fortran/47204
1720         * gfortran.h (gfc_code): Move union ext's case_list into
1721         the struct block.
1722         * dump-parse-tree.c (show_code_node): Adapt by prefixing case_list
1723         by "block.".
1724         * frontend-passes.c (gfc_code_walker): Ditto.
1725         * match.c (gfc_match_goto, gfc_match_call, gfc_match_case,
1726         gfc_match_type_is, gfc_match_class_is): Ditto.
1727         * resolve.c (resolve_select, resolve_select_type): Ditto.
1728         * st.c (gfc_free_statement): Ditto.
1729         * trans-stmt.c (gfc_trans_integer_select, gfc_trans_logical_select,
1730         gfc_trans_character_select): Ditto.
1731         * parse.c (resolve_all_program_units): For error recovery, avoid
1732         segfault is proc_name is NULL.
1733
1734 2011-01-11  Paul Thomas  <pault@gcc.gnu.org>
1735
1736         PR fortran/47051
1737         * trans-array.c (gfc_alloc_allocatable_for_assignment): Change
1738         to be standard compliant by testing for shape rather than size
1739         before skipping reallocation. Improve comments.
1740
1741 2011-01-09  Janus Weil  <janus@gcc.gnu.org>
1742
1743         PR fortran/47224
1744         * resolve.c (resolve_actual_arglist): Remove unneeded and buggy piece
1745         of code.
1746
1747 2011-01-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
1748
1749         PR fortran/38536
1750         * resolve.c (is_scalar_expr_ptr):  For a substring reference,
1751         use gfc_dep_compare_expr to compare start and end expession.
1752         Add FIXME for using gfc_deb_compare_expr elsewhere.
1753
1754 2011-01-09  Janus Weil  <janus@gcc.gnu.org>
1755
1756         PR fortran/46313
1757         * class.c (get_unique_type_string): Make type name start with upper
1758         case letter.
1759
1760 2011-01-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
1761
1762         PR fortran/46405
1763         * invoke.texi:  Mention -ffree-line-length-none and
1764         -ffixed-line-length-none for preprocessing.
1765
1766 2011-01-08  Paul Thomas  <pault@gcc.gnu.org>
1767
1768         PR fortran/46896
1769         * trans-expr.c (gfc_conv_procedure_call): With a non-copying
1770         procedure argument (eg TRANSPOSE) use a temporary if there is
1771         any chance of aliasing due to host or use association.
1772         (arrayfunc_assign_needs_temporary): Correct logic for function
1773         results and do not use a temporary for implicitly PURE
1774         variables.  Use a temporary for Cray pointees.
1775         * symbol.c (gfc_add_save): Explicit SAVE not compatible with
1776         implicit pureness of containing procedure.
1777         * decl.c (match_old_style_init, gfc_match_data): Where decl
1778         would fail in PURE procedure, set implicit_pure to zero.
1779         * gfortran.h : Add implicit_pure to structure symbol_attr and
1780         add prototype for function gfc_implicit_pure.
1781         * expr.c (gfc_check_pointer_assign, gfc_check_vardef_context):
1782         Where decl would fail in PURE procedure, reset implicit_pure.
1783         * io.c (match_vtag, gfc_match_open, gfc_match_close,
1784         gfc_match_print, gfc_match_inquire, gfc_match_wait): The same.
1785         * match.c (gfc_match_critical, gfc_match_stopcode,
1786         sync_statement, gfc_match_allocate, gfc_match_deallocate): The
1787         same.
1788         * parse.c (decode_omp_directive): The same.
1789         (parse_contained): If not PURE, set implicit pure attribute.
1790         * resolve.c (resolve_formal_arglist, resolve_structure_cons,
1791         resolve_function, resolve_ordinary_assign) : The same.
1792         (gfc_implicit_pure): New function.
1793         * module.c (mio_symbol_attribute): Introduce AB_IMPLICIT_PURE
1794         to ab_attribute enum and use it in this function.
1795
1796 2011-01-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
1797
1798         PR fortran/45777
1799         * symbol.c (gfc_symbols_could_alias):  Strip gfc_ prefix,
1800         make static and move in front of its only caller, to ...
1801         * trans-array.c (symbols_could_alias): ... here.
1802         Pass information about pointer and target status as
1803         arguments.  Allocatable arrays don't alias anything
1804         unless they have the POINTER attribute.
1805         (gfc_could_be_alias):  Keep track of pointer and target
1806         status when following references.  Also check if typespecs
1807         of components match those of other components or symbols.
1808
1809 2011-01-07  Tobias Burnus  <burnus@net-b.de>
1810
1811         PR fortran/41580
1812         * class.c (gfc_build_class_symbol): Mark __vtab as attr.vtab.
1813         * intrinsic.c (add_functions): Use simplify functions for
1814         EXTENDS_TYPE_OF and SAME_TYPE_AS.
1815         * intrinsic.h (gfc_simplify_extends_type_of,
1816         gfc_simplify_same_type_as): New prototypes.
1817         * simplify.c (is_last_ref_vtab, gfc_simplify_extends_type_of,
1818         gfc_simplify_same_type_as): New functions.
1819
1820 2011-01-07  Janus Weil  <janus@gcc.gnu.org>
1821
1822         PR fortran/47189
1823         PR fortran/47194
1824         * gfortran.h (gfc_lval_expr_from_sym): Moved prototype.
1825         * class.c (gfc_class_null_initializer): Initialize _vptr to declared
1826         type.
1827         * expr.c (gfc_lval_expr_from_sym): Moved here from symbol.c.
1828         * resolve.c (resolve_deallocate_expr): _data component will be added
1829         at translation stage.
1830         * symbol.c (gfc_lval_expr_from_sym): Moved to expr.c.
1831         * trans-stmt.c (gfc_trans_deallocate): Reset _vptr to declared type.
1832
1833 2011-01-06  Daniel Franke  <franke.daniel@gmail.com>
1834
1835         PR fortran/33117
1836         PR fortran/46478
1837         * parse.c (parse_interface): Remove check for procedure types.
1838         * interface.c (check_interface0): Verify that procedures are
1839         either all SUBROUTINEs or all FUNCTIONs.
1840
1841 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
1842
1843         PR fortran/47180
1844         * trans-expr.c (gfc_trans_class_assign): Bugfix for r168524 (make sure
1845         'vtab' is initialized).
1846
1847 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
1848
1849         PR fortran/47180
1850         * trans-expr.c (gfc_trans_class_assign): For a polymorphic NULL pointer
1851         assignment, set the _vptr component to the declared type.
1852
1853 2011-01-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
1854
1855         PR fortran/46017
1856         * resolve.c (resolve_allocate_deallocate): Follow references to
1857         check for duplicate occurence of allocation/deallocation objects.
1858
1859 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
1860
1861         PR fortran/47024
1862         * trans-decl.c (gfc_trans_deferred_vars): Initialize the _vpr component
1863         of polymorphic allocatables according to their declared type.
1864
1865 2011-01-04  Janus Weil  <janus@gcc.gnu.org>
1866
1867         PR fortran/46448
1868         * class.c (gfc_find_derived_vtab): Set the module field for the copying
1869         routine to make sure it receives module name mangling.
1870
1871 2011-01-03  Jakub Jelinek  <jakub@redhat.com>
1872
1873         * gfortranspec.c (lang_specific_driver): Update copyright notice
1874         dates.
1875
1876 2011-01-03  Janus Weil  <janus@gcc.gnu.org>
1877
1878         * intrinsic.texi (LEADZ): Fix example.
1879
1880 2011-01-02  Janus Weil  <janus@gcc.gnu.org>
1881
1882         PR fortran/46408
1883         * class.c (gfc_find_derived_vtab): Use EXEC_INIT_ASSIGN for __copy_
1884         routine.
1885
1886 \f
1887 Copyright (C) 2011 Free Software Foundation, Inc.
1888
1889 Copying and distribution of this file, with or without modification,
1890 are permitted in any medium without royalty provided the copyright
1891 notice and this notice are preserved.