OSDN Git Service

2011-10-16 Janus Weil <janus@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2011-10-16  Janus Weil  <janus@gcc.gnu.org>
2
3         PR fortran/50547
4         * resolve.c (resolve_formal_arglist): Remove unneeded error message.
5         Some reshuffling.
6
7 2011-10-15  Tobias Burnus  <burnus@net-b.de>
8
9         * gfortran.texi (Fortran 2008 status, TS 29113 status,
10         Further Interoperability of Fortran with C): Update implementation
11         status, change references from TR 29113 to TS 29113.
12         * intrinsic.texi (RANK): Change TR 29113 to TS 29113.
13         * invoke.text (-std=): Ditto, change -std=f2008tr to -std=f2008ts.
14         * lang.opt (std=): Ditto.
15         * options.c (gfc_handle_option, set_default_std_flags): Ditto and
16         change GFC_STD_F2008_TR to GFC_STD_F2008_TS.
17         * libgfortran.h: Ditto.
18         * intrinsic.c (add_functions, gfc_check_intrinsic_standard): Ditto.
19         * decl.c (verify_c_interop_param): Ditto.
20
21 2011-10-14  Janus Weil  <janus@gcc.gnu.org>
22
23         PR fortran/50570
24         * expr.c (gfc_check_vardef_context): Don't throw an error on
25         non-pointer assignments involving an intent(in) pointer dummy.
26
27 2011-10-14  Tobias Burnus  <burnus@net-b.de>
28
29         PR fortran/50718
30         * trans-expr.c (gfc_conv_procedure_call): Fix -fcheck=pointer
31         for dummy arguments with VALUE attribute.
32
33 2011-10-11  Tobias Burnus  <burnus@net-b.de>
34             Janus Weil  <janus@gcc.gnu.org>
35
36         * invoke.texi (-fwhole-file): Update wording since -fwhole-file
37         is now enabled by default.
38
39 2011-10-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
40
41         * trans-expr.c (gfc_conv_power_op): Delete old interface with two
42         parallel arrays to hold standard builtin declarations, and replace
43         it with a function based interface that can support creating
44         builtins on the fly in the future.  Change all uses, and poison
45         the old names.  Make sure 0 is not a legitimate builtin index.
46         (fill_with_spaces): Ditto.
47         (gfc_trans_string_copy): Ditto.
48         (gfc_trans_zero_assign): Ditto.
49         (gfc_build_memcpy_call): Ditto.
50         (alloc_scalar_allocatable_for_assignment): Ditto.
51         * trans-array.c (gfc_trans_array_constructor_value): Ditto.
52         (duplicate_allocatable): Ditto.
53         (gfc_alloc_allocatable_for_assignment): Ditto.
54         * trans-openmp.c (gfc_omp_clause_copy_ctor): Ditto.
55         (gfc_omp_clause_assign_op): Ditto.
56         (gfc_trans_omp_atomic): Ditto.
57         (gfc_trans_omp_do): Ditto.
58         (gfc_trans_omp_task): Ditto.
59         * trans-stmt.c (gfc_trans_stop): Ditto.
60         (gfc_trans_sync): Ditto.
61         (gfc_trans_allocate): Ditto.
62         (gfc_trans_deallocate): Ditto.
63         * trans.c (gfc_call_malloc): Ditto.
64         (gfc_allocate_using_malloc): Ditto.
65         (gfc_call_free): Ditto.
66         (gfc_deallocate_with_status): Ditto.
67         (gfc_deallocate_scalar_with_status): Ditto.
68         * f95-lang.c (gfc_define_builtin): Ditto.
69         (gfc_init_builtin_functions): Ditto.
70         * trans-decl.c (create_main_function): Ditto.
71         * trans-intrinsic.c (builtin_decl_for_precision): Ditto.
72
73 2011-10-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
74
75         PR fortran/50564
76         * frontend-passes (forall_level):  New variable.
77         (cfe_register_funcs):  Don't register functions if we
78         are within a forall loop.
79         (optimize_namespace):  Set forall_level to 0 before entry.
80         (gfc_code_walker):  Increase/decrease forall_level.
81
82 2011-10-09  Tobias Burnus  <burnus@net-b.de>
83
84         PR fortran/50273
85         * trans-common.c (translate_common): Fix -Walign-commons check.
86
87 2011-10-09  Mikael Morin  <mikael.morin@sfr.fr>
88
89         * interface.c (check_dummy_characteristics): Count dimensions starting
90         from one in diagnostic.
91
92 2011-10-09  Tobias Burnus  <burnus@net-b.de>
93
94         * Make-lang.in (F95_PARSER_OBJS, GFORTRAN_TRANS_DEPS): Add
95         dependency on iso-c-binding.def and iso-fortran-env.def.
96         * module.c (import_iso_c_binding_module): Add error when
97         explicitly importing a nonstandard symbol; extend standard-
98         depending loading.
99         * iso-c-binding.def: Add c_float128 and c_float128_complex
100         integer parameters (for -std=gnu).
101         * intrinsic.texi (ISO_C_Binding): Document them.
102         * symbol.c (generate_isocbinding_symbol): Change macros
103         to ignore GFC_STD_* data.
104         * trans-types.c (gfc_init_c_interop_kinds): Ditto; make
105         nonstatic and renamed from "init_c_interop_kinds".
106         (gfc_init_kinds): Don't call it
107         * trans-types.h (gfc_init_c_interop_kinds): Add prototype.
108         * f95-lang.c (gfc_init_decl_processing): Call it.
109
110 2011-10-09  Janus Weil  <janus@gcc.gnu.org>
111
112         PR fortran/50659
113         * expr.c (replace_symbol): Only do replacement if the symbol is a dummy.
114
115 2011-10-08  Paul Thomas  <pault@gcc.gnu.org>
116
117         PR fortran/47844
118         * trans-array.c (gfc_conv_array_index_offset): Use descriptor
119         stride for pointer function results.
120
121 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
122
123         * trans-array.c (gfc_conv_expr_descriptor): Remove trailing whitespace.
124
125 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
126
127         * trans-array.c (gfc_conv_ss_startstride): Merge two switch cases.
128
129 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
130
131         * trans-array.c (gfc_conv_section_startstride): Remove coarray argument.
132         Remove conditions on coarray.
133         (gfc_conv_ss_startstride): Update call to gfc_conv_section_startstride.
134         (gfc_conv_expr_descriptor): Ditto. Add assertions before the call.
135
136 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
137
138         * trans-array.c (gfc_conv_section_startstride): Remove coarray_last
139         argument. Remove condition on coarray_last.
140         (gfc_conv_ss_startstride): Update call to gfc_conv_section_startstride.
141         (gfc_conv_expr_descriptor): Ditto.
142
143 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
144
145         * trans-array.c (gfc_walk_variable_expr): Remove scalar coarray
146         handling.  Don't reset array ref's corank and codimensions' types
147         in the full array ref case.  Update loop upper limit.
148         Remove DIMEN_THIS_IMAGE case.  Remove unnecessary conditions.
149
150 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
151
152         * trans.h (gfc_ss_info): Remove codimen field.
153         * trans-array.c (gfc_get_array_ss): Don't set codimen field.
154         (gfc_trans_create_temp_array): Don't set descriptor's cobounds.
155         (gfc_trans_constant_array_constructor): Update loop upper limit.
156         (gfc_conv_ss_startstride): Don't set codimen field.
157         Don't get descriptor's cobounds.
158         (gfc_walk_variable_expr): Update dimension index.
159         * trans-intrinsic.c (trans_this_image, trans_image_index,
160         conv_intrinsic_cobound): Don't set codimen field
161
162 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
163
164         * trans.h (gfc_loopinfo): Remove codimen field.
165         * trans-array.c (gfc_set_vector_loop_bounds,
166         gfc_trans_scalarizing_loops, gfc_conv_loop_setup): Update loop upper
167         limit.
168         (gfc_set_loop_bounds_from_array_spec): Ditto. Remove skip on last
169         codimension.
170         (gfc_start_scalarized_body): Update loop lower limit.
171         (gfc_conv_ss_startstride): Don't set loop's codimen field.
172         (gfc_conv_loop_setup): Remove unnecessary condition.
173         (gfc_conv_expr_descriptor): Don't use loop's codimen field as corank.
174
175 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
176
177         * trans.h (gfc_ss): Remove data.temp.codimen field.
178         * trans-array.c (gfc_conv_resolve_dependencies,
179         gfc_conv_expr_descriptor): Don't set temp's codimen field.
180
181 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
182
183         * resolve.c (resolve_array_ref): Set array_ref's dimen field (and the
184         associated dimen_type) in the full array ref case.
185
186 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
187
188         * trans-intrinsic.c (walk_coarray): New function.
189         (convert_element_to_coarray_ref): Move code to walk_coarray. Remove.
190         (trans-this_image, trans_image_index, conv_intrinsic_cobound):
191         Use walk_coarray.
192
193 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
194
195         * trans-array.c (gfc_conv_expr_descriptor): Add out-of-the-scalarizer
196         cobounds evaluation.
197
198 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
199
200         * trans-array.c (gfc_conv_ss_startstride): Support zero rank loop.
201
202 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
203
204         * trans-array.c (gfc_conv_section_startstride): Move code to
205         evaluate_bound.  Use evaluate_bound.
206         (evaluate_bound): New function.
207
208 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
209
210         * trans-array.c (gfc_conv_section_startstride): Update assertion to
211         also accept coarrays.
212
213 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
214
215         * trans-array.c (gfc_conv_section_startstride): Factor common
216         array ref references.
217
218 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
219
220         * trans-array.c (gfc_conv_expr_descriptor): Use codim instead of
221         loop.codimen as argument to gfc_get_array_type_bounds.
222
223 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
224
225         * trans-array.h (struct gfc_se): New flag want_coarray.
226         * trans-intrinsic.c (trans_this_image, trans_image_index,
227         conv_intrinsic_cobound): Set want_coarray.
228         * trans_array.c (gfc_conv_expr_descriptor): Evaluate codimension
229         earlier and without relying on the scalarizer.
230
231 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
232
233         * expr.c (gfc_get_corank): Return 0 if input expression is not a
234         coarray.
235
236 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
237
238         * trans-array.c (gfc_conv_expr_descriptor): Simplify coarray
239         descriptor setup code.
240
241 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
242
243         * resolve.c (compare_spec_to_ref): Move coarray ref initialization
244         code...
245         (resolve_array_ref): ... here.
246
247 2011-10-07  Mikael Morin  <mikael.morin@sfr.fr>
248
249         * check.c (is_coarray): Remove.
250         (coarray_check): Use gfc_is_coarray.
251
252 2011-10-07  Janus Weil  <janus@gcc.gnu.org>
253
254         PR fortran/50625
255         * class.c (gfc_build_class_symbol): Fix whitespace.
256         * module.c (mio_symbol): Set 'class_ok' attribute.
257         * trans-decl.c (gfc_get_symbol_decl): Make sure the backend_decl has
258         been built for class symbols.
259
260 2011-10-04  Janus Weil  <janus@gcc.gnu.org>
261
262         PR fortran/35831
263         * interface.c (check_dummy_characteristics): Check the array shape.
264
265 2011-10-01  Janus Weil  <janus@gcc.gnu.org>
266
267         PR fortran/50585
268         * interface.c (get_expr_storage_size): Check if 'length' component is
269         associated.
270
271 2011-09-29  Janus Weil  <janus@gcc.gnu.org>
272
273         PR fortran/50547
274         * resolve.c (resolve_formal_arglist): Fix pureness check for dummy
275         functions.
276
277         PR fortran/50553
278         * symbol.c (check_conflict): Forbid TARGET attribute for statement
279         functions.
280
281 2011-09-27  Jakub Jelinek  <jakub@redhat.com>
282
283         * trans-types.c (gfc_type_for_size): Return wider type
284         if no suitable narrower type has been found.
285         (gfc_type_for_mode): Return NULL_TREE if gfc_type_for_size
286         returned type doesn't have expected TYPE_MODE.
287
288 2011-09-26  Janus Weil  <janus@gcc.gnu.org>
289
290         PR fortran/50515
291         * resolve.c (resolve_common_blocks): Check for EXTERNAL attribute.
292
293         PR fortran/50517
294         * interface.c (gfc_compare_interfaces): Bugfix in check for result type.
295
296 2011-09-22  Janus Weil  <janus@gcc.gnu.org>
297
298         PR fortran/41733
299         * expr.c (gfc_check_pointer_assign): Check for nonintrinsic elemental
300         procedures.
301         * interface.c (gfc_compare_interfaces): Rename 'intent_flag'. Check
302         for PURE and ELEMENTAL attributes.
303         (compare_actual_formal): Remove pureness check here.
304
305 2011-09-20  Steven G. Kargl  <kargl@gcc.gnu.org>
306
307         * check.c (gfc_check_c_sizeof): Remove redundant word.
308
309 2011-09-20  Simon Baldwin  <simonb@google.com>
310
311         * module.c (gfc_dump_module): Omit timestamp from output.
312
313 2011-09-17  Janus Weil  <janus@gcc.gnu.org>
314
315         PR fortran/50403
316         * symbol.c (gfc_use_derived): Fix coding style.
317
318 2011-09-15  Janus Weil  <janus@gcc.gnu.org>
319
320         PR fortran/50401
321         * resolve.c (resolve_transfer): Check if component 'ref' is defined.
322
323         PR fortran/50403
324         * symbol.c (gfc_use_derived): Check if argument 'sym' is defined.
325
326 2011-09-14  Tobias Burnus  <burnus@net-b.de>
327
328         PR fortran/34547
329         PR fortran/50375
330         * check.c (gfc_check_null): Allow allocatables as MOLD to NULL.
331         * resolve.c (resolve_transfer): Reject NULL without MOLD.
332         * interface.c (gfc_procedure_use): Reject NULL without MOLD
333         if no explicit interface is known.
334         (gfc_search_interface): Reject NULL without MOLD if it would
335         lead to ambiguity.
336
337 2011-09-13  Janus Weil  <janus@gcc.gnu.org>
338
339         PR fortran/50379
340         * symbol.c (check_conflict): Check conflict between GENERIC and RESULT
341         attributes.
342
343 2011-09-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
344
345         PR fortran/50327
346         * frontend-passes.c (dummy_expr_callback):  New function.
347         (convert_do_while):  New function.
348         (optimize_namespace):  Call code walker to convert do while loops.
349
350 2011-09-11  Janus Weil  <janus@gcc.gnu.org>
351
352         PR fortran/35831
353         PR fortran/47978
354         * interface.c (check_dummy_characteristics): New function to check the
355         characteristics of dummy arguments.
356         (gfc_compare_interfaces,gfc_check_typebound_override): Call it here.
357
358 2011-09-08  Mikael Morin  <mikael.morin@sfr.fr>
359
360         * trans-array.c (gfc_trans_constant_array_constructor): Remove
361         superfluous initialisation of DIM field.
362         (gfc_trans_array_constructor): Assert that DIMEN field is properly set.
363         (gfc_conv_expr_descriptor): Ditto.
364         * trans-expr.c (gfc_conv_procedure_call): Ditto.
365
366 2011-09-08  Mikael Morin  <mikael.morin@sfr.fr>
367
368         * trans-array.h (gfc_get_scalar_ss): New prototype.
369         * trans-array.c (gfc_get_scalar_ss): New function.
370         (gfc_walk_variable_expr, gfc_walk_op_expr,
371         gfc_walk_elemental_function_args): Re-use gfc_get_scalar_ss.
372         * trans-expr.c (gfc_trans_subarray_assign): Ditto.
373         (gfc_trans_assignment_1): Ditto.
374         * trans-stmt.c (compute_inner_temp_size, gfc_trans_where_assign,
375         gfc_trans_where_3): Ditto.
376
377 2011-09-08  Mikael Morin  <mikael.morin@sfr.fr>
378
379         * trans-array.h (gfc_get_temp_ss): New prototype.
380         * trans-array.c (gfc_get_temp_ss): New function.
381         (gfc_conv_resolve_dependencies): Re-use gfc_get_temp_ss.
382         (gfc_conv_expr_descriptor): Ditto.
383         * trans-expr.c (gfc_conv_subref_array_arg): Ditto.
384
385 2011-09-08  Mikael Morin  <mikael.morin@sfr.fr>
386
387         * trans-array.h (gfc_get_array_ss): New prototype.
388         * trans-array.c (gfc_get_array_ss): New function.
389         (gfc_walk_variable_expr, gfc_walk_function_expr,
390         gfc_walk_array_constructor): Re-use gfc_get_array_ss.
391         * trans-expr.c (gfc_trans_subarray_assign): Ditto.
392         * trans-intrinsic.c (gfc_walk_intrinsic_bound,
393         gfc_walk_intrinsic_libfunc): Ditto.
394         * trans-io.c (transfer_array_component): Ditto.
395
396 2011-09-08  Tobias Burnus  <burnus@net-b.de>
397
398         PR fortran/44646
399         * decl.c (gfc_match_entry, gfc_match_end): Handle COMP_DO_CONCURRENT.
400         * dump-parse-tree.c (show_code_node): Handle EXEC_DO_CONCURRENT.
401         * gfortran.h (gfc_exec_op): Add EXEC_DO_CONCURRENT.
402         * match.c (gfc_match_critical, match_exit_cycle, gfc_match_stopcode,
403         lock_unlock_statement, sync_statement, gfc_match_allocate,
404         gfc_match_deallocate, gfc_match_return): Add DO CONCURRENT diagnostic.
405         (gfc_match_do): Match DO CONCURRENT.
406         (match_derived_type_spec, match_type_spec, gfc_free_forall_iterator,
407         match_forall_iterator, match_forall_header, match_simple_forall,
408         gfc_match_forall): Move up in the file.
409         * parse.c (check_do_closure, parse_do_block): Handle do concurrent.
410         * parse.h (gfc_compile_state): Add COMP_DO_CONCURRENT.
411         * resolve.c (do_concurrent_flag): New global variable.
412         (resolve_function, pure_subroutine, resolve_branch,
413         gfc_resolve_blocks, resolve_code, resolve_types): Add do concurrent
414         diagnostic.
415         * st.c (gfc_free_statement): Handle EXEC_DO_CONCURRENT.
416         * trans-stmt.c (gfc_trans_do_concurrent): New function.
417         (gfc_trans_forall_1): Handle do concurrent.
418         * trans-stmt.h (gfc_trans_do_concurrent): New function prototype.
419         * trans.c (trans_code): Call it.
420         * frontend-passes.c (gfc_code_walker): Handle EXEC_DO_CONCURRENT.
421
422 2011-09-07  Janus Weil  <janus@gcc.gnu.org>
423
424         PR fortran/48095
425         * primary.c (gfc_match_structure_constructor): Handle parsing of
426         procedure pointers components in structure constructors.
427         * resolve.c (resolve_structure_cons): Check interface of procedure
428         pointer components. Changed wording of some error messages.
429
430 2011-09-04  Janus Weil  <janus@gcc.gnu.org>
431
432         PR fortran/50227
433         * trans-types.c (gfc_sym_type): Check for proc_name.
434
435 2011-08-30  Tobias Burnus  <burnus@net-b.de>
436
437         PR fortran/45044
438         * trans-common.c (build_common_decl): Warn if named common
439         block's size is not everywhere the same.
440
441 2011-08-30  Steven G. Kargl  <kargl@gcc.gnu.org>
442
443         PR fortran/45170
444         * trans-stmt.c (gfc_trans_allocate): Evaluate the substring.
445
446 2011-08-29  Janus Weil  <janus@gcc.gnu.org>
447
448         PR fortran/50225
449         * trans-decl.c (gfc_generate_function_code): Nullify polymorphic
450         allocatable function results.
451
452 2011-08-29  Tobias Burnus  <burnus@net-b.de>
453
454         * trans-decl.c (generate_coarray_sym_init): Use
455         GFC_CAF_COARRAY_STATIC for static coarrays.
456
457 2011-08-28  Dodji Seketeli  <dodji@redhat.com>
458
459         * scanner.c (load_file): Don't abuse LC_RENAME reason while
460         (indirectly) calling linemap_add.
461
462 2011-08-26  Jakub Jelinek  <jakub@redhat.com>
463
464         * trans-decl.c (get_proc_pointer_decl): Set DECL_TLS_MODEL
465         if threadprivate.
466         * symbol.c (check_conflict): Allow threadprivate attribute with
467         FL_PROCEDURE if proc_pointer.
468
469 2011-08-25  Mikael Morin  <mikael@gcc.gnu.org>
470
471         PR fortran/50050
472         * expr.c (gfc_free_shape): Do nothing if shape is NULL.
473         (free_expr0): Remove redundant NULL shape check.
474         * resolve.c (check_host_association): Ditto.
475         * trans-expr.c (gfc_trans_subarray_assign): Assert that shape is
476         non-NULL.
477         * trans-io.c (transfer_array_component): Ditto.
478
479 2011-08-25  Tobias Burnus  <burnus@net-b.de>
480
481         * trans-array.c (gfc_conv_descriptor_token): Add assert.
482         * trans-decl.c (gfc_build_qualified_array,
483         create_function_arglist): Handle assumed-shape arrays.
484         * trans-expr.c (gfc_conv_procedure_call): Ditto.
485         * trans-types.c (gfc_get_array_descriptor_base): Ditto, don't
486         add "caf_token" to assumed-shape descriptors, new akind argument.
487         (gfc_get_array_type_bounds): Pass akind.
488         * trans.h (lang_decl): New elements caf_offset and token.
489         (GFC_DECL_TOKEN, GFC_DECL_CAF_OFFSET): New macros.
490
491 2011-08-25  Tobias Burnus  <burnus@net-b.de>
492
493         * trans-array.c (structure_alloc_comps): Fix for allocatable
494         scalar coarray components.
495         * trans-expr.c (gfc_conv_component_ref): Ditto.
496         * trans-type.c (gfc_get_derived_type): Ditto.
497
498 2011-08-24  Tobias Burnus  <burnus@net-b.de>
499
500         PR fortran/50163
501         * expr.c (check_init_expr): Return when an error occured.
502
503 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
504
505         * Make-lang.in (fortran/cpp.o): Remove explicit compilation rule.
506
507 2011-08-23  Tobias Burnus  <burnus@net-b.de>
508
509         PR fortran/31600
510         * symbol.c (gfc_add_type): Better diagnostic if redefining
511         use-associated symbol.
512         * module.c (gfc_use_module): Use module name as locus.
513
514 2011-08-22  Gabriel Charette  <gchare@google.com>
515
516         * cpp.c (gfc_cpp_init): Force BUILTINS_LOCATION for tokens
517         defined in cpp_define_builtins.
518
519 2011-08-22  Mikael Morin  <mikael@gcc.gnu.org>
520
521         PR fortran/50050
522         * gfortran.h (gfc_clear_shape, gfc_free_shape): New prototypes.
523         * expr.c (gfc_clear_shape, gfc_free_shape): New functions.
524         (free_expr0): Re-use gfc_free_shape.
525         * trans-expr.c (gfc_trans_subarray_assign): Ditto.
526         * trans-io.c (transfer_array_component): Ditto.
527         * resolve.c (check_host_association): Ditto.
528         (gfc_expr_to_initialize): Don't force the rank value and free the shape
529         after updating the expression. Recalculate shape and rank.
530         (resolve_where_shape): Re-use gfc_clear_shape.
531         * array.c (gfc_array_ref_shape): Ditto.
532
533 2011-08-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
534
535         PR fortran/47659
536         * expr.c (gfc_check_assign): Check for type conversions when the
537         right-hand side is a constant REAL/COMPLEX contstant the left-hand
538         side is also REAL/COMPLEX.  Don't warn when a narrowing conversion
539         for REAL does not change the value of the constant.
540
541 2011-08-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
542
543         PR fortran/50130
544         * resolve.c (resolve_array_ref):  Don't calculate upper bound
545         if the stride is zero.
546
547 2011-08-20  Janus Weil  <janus@gcc.gnu.org>
548
549         PR fortran/49638
550         * dependency.c (gfc_dep_compare_expr): Add new result value "-3".
551         (gfc_check_element_vs_section,gfc_check_element_vs_element): Handle
552         result value "-3".
553         * frontend-passes.c (optimize_comparison): Ditto.
554         * interface.c (gfc_check_typebound_override): Ditto.
555
556 2011-08-19  Mikael Morin  <mikael.morin@sfr.fr>
557
558         PR fortran/50129
559         * parse.c (parse_where): Undo changes after emitting an error. 
560
561 2011-08-19  Jakub Jelinek  <jakub@redhat.com>
562
563         PR fortran/49792
564         * trans-expr.c (gfc_trans_assignment_1): Set OMPWS_SCALARIZER_WS
565         bit in ompws_flags only if loop.temp_ss is NULL, and clear it if
566         lhs needs reallocation.
567         * trans-openmp.c (gfc_trans_omp_workshare): Don't return early if
568         code is NULL, emit a barrier if workshare emitted no code at all
569         and NOWAIT clause isn't present.
570
571 2011-08-19  Mikael Morin  <mikael.morin@sfr.fr>
572
573         PR fortran/50071
574         * gfortran.h (gfc_exec_op): New constant EXEC_END_NESTED_BLOCK.
575         * parse.c (check_statement_label): Accept ST_END_BLOCK and
576         ST_END_ASSOCIATE as valid branch target.
577         (accept_statement): Change EXEC_END_BLOCK to EXEC_END_NESTED_BLOCK.
578         Add EXEC_END_BLOCK code in the ST_END_BLOCK and ST_END_ASSOCIATE cases.
579         * resolve.c (find_reachable_labels): Change EXEC_END_BLOCK to
580         EXEC_END_NESTED_BLOCK.
581         (resolve_branch): Ditto.
582         (resolve_code): Add EXEC_END_NESTED_BLOCK case.
583         * st.c (gfc_free_statement): Ditto.
584         * trans.c (trans_code): Ditto.
585
586 2011-08-18  Mikael Morin  <mikael.morin@sfr.fr>
587
588         PR fortran/50071
589         * symbol.c (gfc_get_st_label): Use the derived type namespace when
590         we are parsing a derived type definition.
591
592 2011-08-18  Tobias Burnus  <burnus@net-b.de>
593
594         PR fortran/18918
595         * parse.c (parse_derived): Add lock_type
596         checks, improve coarray_comp handling.
597         * resolve.c (resolve_allocate_expr,
598         resolve_lock_unlock, resolve_symbol): Fix lock_type
599         constraint checks.
600
601 2011-08-17  Tobias Burnus  <burnus@net-b.de>
602
603         PR fortran/31461
604         * trans-decl.c (generate_local_decl): Warn about
605         unused explicitly imported module variables/parameters.
606
607 2011-08-17  Janus Weil  <janus@gcc.gnu.org>
608
609         PR fortran/50070
610         * resolve.c (resolve_fl_variable): Reject non-constant character lengths
611         in COMMON variables.
612
613 2011-08-16  Tobias Burnus  <burnus@net-b.de>
614             Dominique Dhumieres  <dominiq@lps.ens.fr>
615
616         PR fortran/50094
617         * resolve.c (resolve_symbol): Fix stupid typo.
618
619 2011-08-15  Tobias Burnus  <burnus@net-b.de>
620
621         * resolve.c (resolve_symbol): Fix coarray result-var check.
622
623 2011-08-14  Steven G. Kargl  <kargl@gcc.gnu.org>
624
625         * module.c (use_iso_fortran_env_module):  Spell 'referrenced' correctly.
626
627 2011-08-14  Janus Weil  <janus@gcc.gnu.org>
628
629         PR fortran/50073
630         * decl.c (check_function_name): New function, separated off from
631         'variable_decl' and slightly extended.
632         (variable_decl,attr_decl1): Call it.
633
634 2011-08-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
635
636         * Make-lang.in (gfortran$(exeext)): Add $(EXTRA_GCC_LIBS).
637
638 2011-08-07  Janus Weil  <janus@gcc.gnu.org>
639             Thomas Koenig  <tkoenig@gcc.gnu.org>
640
641         PR fortran/49638
642         * dependency.c (are_identical_variables): For dummy arguments only
643         check for equal names, not equal symbols.
644         * interface.c (gfc_check_typebound_override): Add checking for rank
645         and character length.
646
647 2011-08-07  Janus Weil  <janus@gcc.gnu.org>
648
649         PR fortran/49638
650         * dependency.h (gfc_is_same_range,gfc_are_identical_variables): Remove
651         two prototypes.
652         * dependency.c (gfc_are_identical_variables,are_identical_variables):
653         Renamed the former to the latter and made static.
654         (gfc_dep_compare_expr): Renamed 'gfc_are_identical_variables', handle
655         commutativity of multiplication.
656         (gfc_is_same_range,is_same_range): Renamed the former to the latter,
657         made static and removed argument 'def'.
658         (check_section_vs_section): Renamed 'gfc_is_same_range'.
659         * gfortran.h (gfc_check_typebound_override): New prototype.
660         * interface.c (gfc_check_typebound_override): Moved here from ...
661         * resolve.c (check_typebound_override): ... here (and renamed).
662         (resolve_typebound_procedure): Renamed 'check_typebound_override'.
663
664 2011-08-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
665
666         PR fortran/50004
667         * target-memory.c (gfc_target_expr-size): Don't clobber typespec
668         for derived types.
669         * simplify.c (gfc_simplify_transfer): Don't calculate source_size
670         twice.
671
672 2011-08-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
673
674         PR fortran/37211
675         * gfortran.h (gfc_calculate_transfer_sizes):  Add prototype.
676         * target-memory.h (gfc_target_interpret_expr):  Add boolean
677         argument wether to convert wide characters.
678         * target-memory.c (gfc_target_expr_size):  Also return length
679         of characters for non-constant expressions if these can be
680         determined from the cl.
681         (interpret_array):  Add argument for gfc_target_interpret_expr.
682         (gfc_interpret_derived):  Likewise.
683         (gfc_target_interpret_expr):  Likewise.
684         * check.c:  Include target-memory.h.
685         (gfc_calculate_transfer_sizes):  New function.
686         (gfc_check_transfer):  When -Wsurprising is in force, calculate
687         sizes and warn if result is larger than size (check moved from
688         gfc_simplify_transfer).
689         * simplify.c (gfc_simplify_transfer):  Use
690         gfc_calculate_transfer_sizes.  Remove warning.
691
692 2011-08-04  Richard Guenther  <rguenther@suse.de>
693
694         PR fortran/49957
695         * trans-array.c (add_to_offset): New function.
696         (gfc_conv_array_ref): Build the array index expression in optimally
697         associated order.
698         (gfc_walk_variable_expr): Adjust for the backward walk.
699
700 2011-08-02  Daniel Kraft  <d@domob.eu>
701
702         PR fortran/49885
703         * trans-array.c (gfc_trans_auto_array_allocation): Change
704         gfc_start_block to gfc_init_block to avoid spurious extra-scope.
705
706 2011-08-02  Tobias Burnus  <burnus@net-b.de>
707
708         * trans-array.c (gfc_array_allocate): Pass token to
709           gfc_allocate_allocatable for -fcoarray=lib.
710         * trans-stmt.c (gfc_trans_allocate): Update
711         gfc_allocate_allocatable call.
712         * trans.h (gfc_allocate_allocatable): Update prototype.
713         (gfc_allocate_using_lib): Remove.
714         * trans.c (gfc_allocate_using_lib): Make static, handle token.
715         (gfc_allocate_allocatable): Ditto.
716
717 2011-08-02  Jakub Jelinek  <jakub@redhat.com>
718
719         PR fortran/46752
720         * cpp.c (cpp_define_builtins): Change _OPENMP to 201107.
721         * openmp.c (gfc_free_omp_clauses): Free also final_expr.
722         (OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE): Define.
723         (gfc_match_omp_clauses): Handle parsing final and mergeable
724         clauses.
725         (OMP_TASK_CLAUSES): Allow final and mergeable clauses.
726         (gfc_match_omp_taskyield): New function.
727         (resolve_omp_clauses): Resolve final clause.  Allow POINTERs and
728         Cray pointers in clauses other than REDUCTION.
729         (gfc_match_omp_atomic): Match optional
730         read/write/update/capture keywords after !$omp atomic.
731         (resolve_omp_atomic): Handle all OpenMP 3.1 atomic forms.
732         * dump-parse-tree.c (show_omp_node): Handle EXEC_OMP_TASKYIELD,
733         print final and mergeable clauses.
734         (show_code_node): Handle EXEC_OMP_TASKYIELD.
735         * trans-openmp.c (gfc_trans_omp_clauses): Handle final and
736         mergeable clauses.
737         (gfc_trans_omp_taskyield): New function.
738         (gfc_trans_omp_directive): Handle EXEC_OMP_TASKYIELD.
739         (gfc_trans_omp_atomic): Handle all OpenMP 3.1 atomic forms.
740         (gfc_omp_clause_copy_ctor): Handle non-allocated allocatable.
741         (gfc_omp_predetermined_sharing): Adjust comment.
742         * gfortran.h (gfc_statement): Add ST_OMP_TASKYIELD and
743         ST_OMP_END_ATOMIC.
744         (gfc_omp_clauses): Add final_expr and mergeable fields.
745         (gfc_exec_op): Add EXEC_OMP_TASKYIELD.
746         (gfc_omp_atomic_op): New enum typedef.
747         (struct gfc_code): Add ext.omp_atomic.
748         * trans.c (trans_code): Handle EXEC_OMP_TASKYIELD.
749         * frontend-passes.c (gfc_code_walker): Also walk final_expr.
750         * resolve.c (gfc_resolve_blocks, resolve_code): Handle
751         EXEC_OMP_TASKYIELD.
752         * st.c (gfc_free_statement): Likewise.
753         * match.h (gfc_match_omp_taskyield): New prototype.
754         * parse.c (decode_omp_directive): Handle taskyield directive.
755         Handle !$omp end atomic.
756         (case_executable): Add ST_OMP_TASKYIELD case.
757         (gfc_ascii_statement): Handle ST_OMP_TASKYIELD.
758         (parse_omp_atomic): Return gfc_statement instead of void.
759         For !$omp atomic capture parse two assignments instead of
760         just one and require !$omp end atomic afterwards, for
761         other !$omp atomic forms just allow !$omp end atomic at the
762         end.
763         (parse_omp_structured_block, parse_executable): Adjust
764         parse_omp_atomic callers.
765
766 2011-08-02  Tobias Burnus  <burnus@net-b.de>
767
768         * intrinsic.c (OMP_LIB): Updated openmp_version's
769         value to 201107.
770         * gfortran.texi (OpenMP): Update ref to OpenMP 3.1.
771         * intrinsic.texi (OpenMP Modules): Update ref to OpenMP 3.1;
772         remove deleted omp_integer_kind and omp_logical_kind constants.
773
774 2011-07-31  Janus Weil  <janus@gcc.gnu.org>
775
776         PR fortran/49112
777         * resolve.c (resolve_structure_cons): Don't do the full dt resolution,
778         only call 'resolve_fl_derived0'.
779         (resolve_typebound_procedures): Resolve typebound procedures of
780         parent type.
781         (resolve_fl_derived0): New function, which does a part of the work
782         for 'resolve_fl_derived'.
783         (resolve_fl_derived): Call 'resolve_fl_derived0' and do some additional
784         things.
785
786 2011-07-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
787
788         PR fortran/48876
789         * expr.c (gfc_simplify_expr):  If end of a string is less
790         than zero, set it to zero.
791
792 2011-07-28  Jakub Jelinek  <jakub@redhat.com>
793
794         PR fortran/31067
795         * frontend-passes.c (optimize_minmaxloc): New function.
796         (optimize_expr): Call it.
797
798 2011-07-27  Tobias Burnus  <burnus@net-b.de>
799
800         PR fortran/45586
801         * trans-types.c (gfc_get_derived_type): Ensure that pointer
802         component types are marked as nonrestricted.
803
804 2011-07-27  Daniel Carrera  <dcarrera@gmail.com>
805
806         PR fortran/49755
807         * trans.c (gfc_allocate_using_malloc): Change function signature.
808         Return nothing. New parameter "pointer". Eliminate temorary variables. 
809         (gfc_allocate_using_lib): Ditto.
810         (gfc_allocate_allocatable): Ditto. Update call to gfc_allocate_using_lib
811         and gfc_allocate_using_malloc. Do not free and then reallocate a
812         variable that is already allocated.
813         (gfc_likely): New function. Basedon gfc_unlikely.
814         * trans-array.c (gfc_array_init_size): New parameter "descriptor_block".
815         Instructions to modify the array descriptor are stored in this block
816         while other instructions continue to be stored in "pblock".
817         (gfc_array_allocate): Update call to gfc_array_init_size. Move the
818         descriptor_block so that the array descriptor is only updated if
819         the array was allocated successfully.
820         Update calls to gfc_allocate_allocatable and gfc_allocate_using_malloc.
821         * trans.h (gfc_allocate_allocatable): Change function signature.
822         Function now returns void.
823         (gfc_allocate_using_lib): Ditto, and new function parameter.
824         (gfc_allocate_using_malloc): Ditto.
825         * trans-openmp.c (gfc_omp_clause_default_ctor,
826         gfc_omp_clause_copy_ctor,gfc_trans_omp_array_reduction): Replace a call
827         to gfc_allocate_allocatable with gfc_allocate_using_malloc.
828         * trans-stmt.c (gfc_trans_allocate): Update function calls for
829         gfc_allocate_allocatable and gfc_allocate_using_malloc.
830
831 2011-07-26  Tobias Burnus  <burnus@net-b.de>
832
833         * trans-array.c (CAF_TOKEN_FIELD): New macro constant.
834         (gfc_conv_descriptor_token): New function.
835         * trans-array.h (gfc_conv_descriptor_token): New prototype.
836         * trans-types.c (gfc_get_array_descriptor_base): For coarrays
837         with -fcoarray=lib, append "void *token" to the array descriptor.
838         (gfc_array_descriptor_base_caf): New static variable.
839         * trans-expr.c (gfc_conv_procedure_call): Handle token and offset
840         when passing a descriptor coarray to a nondescriptor dummy. 
841
842 2011-07-23  Tobias Burnus  <burnus@net-b.de>
843
844         * resolve.c (resolve_symbol): Fix coarray var decl check.
845
846 2011-07-21  Daniel Carrera  <dcarrera@gmail.com>
847
848         * trans.c (gfc_allocate_with_status): Split into two functions
849         gfc_allocate_using_malloc and gfc_allocate_usig_lib.
850         (gfc_allocate_using_malloc): The status parameter is now the
851         actual status rather than a pointer. Code cleanup.
852         (gfc_allocate_using_lib): Ditto. Add new parametrs errmsg and
853         errlen. Pass these to the coarray lib.
854         * trans-openmp.c (gfc_omp_clause_default_ctor): Update calls to
855         gfc_allocate_allocatable.
856         (gfc_omp_clause_copy_ctor): Ditto.
857         (gfc_trans_omp_array_reduction): Ditto.
858         * trans-stmt.c (gfc_trans_allocate): Ditto. Update call to
859         gfc_allocate_using_malloc. Pass stat rather than pstat to the allocate
860         fuctions. If using coarray lib, pass errmsg and errlen to the allocate
861         functions. Move error checking outside the if (!gfc_array_allocate)
862         block so that it also affects trees produced by gfc_array_allocate.
863         * trans-array.c (gfc_array_allocate): Add new parameters errmsg
864         and errlen. Replace parameter pstat by status. Code cleanup. Update
865         calls to gfc_allocate_allocatable and gfc_allocate_using_malloc.
866         * trans-array.h (gfc_array_allocate): Update signature of
867         gfc_array_allocate.
868
869 2011-07-21  Steven G. Kargl  <kargl@gcc.gnu.org>
870
871         * gfortran.texi: Remove a duplicate word.
872
873 2011-07-21  Tobias Burnus  <burnus@net-b.de>
874
875         * check.c (gfc_check_present): Allow coarrays.
876         * trans-array.c (gfc_conv_array_ref): Avoid casting
877         when a pointer is wanted.
878         * trans-decl.c (create_function_arglist): For -fcoarray=lib,
879         handle hidden token and offset arguments for nondescriptor
880         coarrays.
881         * trans-expr.c (get_tree_for_caf_expr): New function.
882         (gfc_conv_procedure_call): For -fcoarray=lib pass the
883         token and offset for nondescriptor coarray dummies.
884         * trans.h (lang_type): Add caf_offset tree.
885         (GFC_TYPE_ARRAY_CAF_OFFSET): New macro.
886
887 2011-07-19  Tobias Burnus  <burnus@net-b.de>
888
889         * expr.c (gfc_is_coarray): New function.
890         * gfortran.h (gfc_is_coarray): New prototype.
891         * interface.c (compare_parameter): Use it.
892
893 2011-07-19  Richard Guenther  <rguenther@suse.de>
894
895         * trans-expr.c (fill_with_spaces): Use fold_build_pointer_plus.
896         (gfc_trans_string_copy): Likewise.
897         * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Likewise.
898         * trans-types.c (gfc_get_array_descr_info): Likewise.
899         * trans.c (gfc_build_array_ref): Likewise.
900
901 2011-07-19  Janus Weil  <janus@gcc.gnu.org>
902
903         PR fortran/49708
904         * resolve.c (resolve_allocate_expr): Fix diagnostics for pointers.
905
906 2011-07-18  Tobias Burnus  <burnus@net-b.de>
907
908         * trans-decl.c (gfc_build_qualified_array): Make coarray's
909         token TYPE_QUAL_RESTRICT.
910
911 2011-07-18  Tobias Burnus  <burnus@net-b.de>
912
913         * resolve.c (resolve_transfer): Mention defined I/O
914         in the diagnostic for alloc_comp/pointer_comp.
915
916 2011-07-17  Tobias Burnus  <burnus@net-b.de>
917
918         PR fortran/34657
919         * module.c (check_for_ambiguous): Check whether the name is matches
920         the current program unit.
921
922 2011-07-17  Tobias Burnus  <burnus@net-b.de>
923
924         PR fortran/49624
925         * expr.c (gfc_check_pointer_assign): Fix checking for invalid
926         pointer bounds.
927
928 2011-07-16  Tobias Burnus  <burnus@net-b.de>
929         
930         * expr.c (gfc_ref_this_image): New function.
931         (gfc_is_coindexed): Use it.
932         * gfortran.h (gfc_ref_this_image): New prototype.
933         * resolve.c (resolve_deallocate_expr,
934         resolve_allocate_expr): Support alloc scalar coarrays.
935         * trans-array.c (gfc_conv_array_ref, gfc_array_init_size,
936         gfc_conv_descriptor_cosize, gfc_array_allocate,
937         gfc_trans_deferred_array): Ditto.
938         * trans-expr.c (gfc_conv_variable) Ditto.:
939         * trans-stmt.c (gfc_trans_deallocate): Ditto.
940         * trans-types.c (gfc_get_element_type, gfc_get_array_type_bounds
941         gfc_get_array_descr_info): Ditto.
942         * trans-decl.c (gfc_get_symbol_decl): Ditto.
943
944 2011-07-11  Jakub Jelinek  <jakub@redhat.com>
945
946         PR fortran/49698
947         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Initialize
948         inner_size to gfc_index_one_node instead of integer_one_node.
949
950 2011-07-10  Tobias Burnus  <burnus@net-b.de>
951
952         PR fortran/49690
953         * intrinsic.c (add_functions): Use BT_VOID for 2nd argument of SIGNAL.
954
955 2011-07-09  Uros Bizjak  <ubizjak@gmail.com>
956
957         PR fortran/48926
958         * expr.c (gfc_get_corank): Change return value to int.
959         * gfortran.h (gfc_get_corank): Update function prototype.
960
961 2011-07-07  Mikael Morin  <mikael.morin@sfr.fr>
962
963         PR fortran/49648
964         * resolve.c (resolve_symbol): Force resolution of function result's
965         array specification.
966
967 2011-07-07  Tobias Burnus  <burnus@net-b.de>
968
969         * trans.c (gfc_allocate_with_status): Call _gfortran_caf_register
970         with NULL arguments for (new) stat=/errmsg= arguments.
971
972 2011-07-06  Daniel Carrera  <dcarrera@gmail.com>
973
974         * trans-array.c (gfc_array_allocate): Rename allocatable_array to
975         allocatable. Rename function gfc_allocate_array_with_status to
976         gfc_allocate_allocatable_with_status. Update function call for
977         gfc_allocate_with_status.
978         * trans-opemp.c (gfc_omp_clause_default_ctor): Rename function
979         gfc_allocate_array_with_status to gfc_allocate_allocatable_with_status.
980         * trans-stmt.c (gfc_trans_allocate): Update function call for
981         gfc_allocate_with_status. Rename function gfc_allocate_array_with_status
982         to gfc_allocate_allocatable_with_status.
983         * trans.c (gfc_call_malloc): Add new parameter gfc_allocate_with_status
984         so it uses the library for memory allocation when -fcoarray=lib.
985         (gfc_allocate_allocatable_with_status): Renamed from
986         gfc_allocate_array_with_status.
987         (gfc_allocate_allocatable_with_status): Update function call for
988         gfc_allocate_with_status.
989         * trans.h (gfc_coarray_type): New enum.
990         (gfc_allocate_with_status): Update prototype.
991         (gfc_allocate_allocatable_with_status): Renamed from
992         gfc_allocate_array_with_status.
993         * trans-decl.c (generate_coarray_sym_init): Use the new constant
994         GFC_CAF_COARRAY_ALLOC in the call to gfor_fndecl_caf_register.
995
996 2011-07-06  Richard Guenther  <rguenther@suse.de>
997
998         * f95-lang.c (gfc_init_decl_processing):
999         Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
1000
1001 2011-07-04  Jakub Jelinek  <jakub@redhat.com>
1002
1003         PR fortran/49623
1004         * gfortranspec.c (lang_specific_driver): Ignore options with
1005         CL_ERR_MISSING_ARG errors.
1006
1007 2011-07-02  Janus Weil  <janus@gcc.gnu.org>
1008
1009         PR fortran/49562
1010         * expr.c (gfc_check_vardef_context): Handle type-bound procedures.
1011
1012 2011-06-30  Jakub Jelinek  <jakub@redhat.com>
1013
1014         PR fortran/49540
1015         * gfortran.h (gfc_constructor): Add repeat field.
1016         * trans-array.c (gfc_conv_array_initializer): Handle repeat > 1.
1017         * array.c (current_expand): Add repeat field.
1018         (expand_constructor): Copy repeat.
1019         * constructor.c (node_free, node_copy, gfc_constructor_get,
1020         gfc_constructor_lookup): Handle repeat field.
1021         (gfc_constructor_lookup_next, gfc_constructor_remove): New functions.
1022         * data.h (gfc_assign_data_value): Add mpz_t * argument.
1023         (gfc_assign_data_value_range): Removed.
1024         * constructor.h (gfc_constructor_advance): Removed.
1025         (gfc_constructor_lookup_next, gfc_constructor_remove): New prototypes.
1026         * data.c (gfc_assign_data_value): Add REPEAT argument, handle it and
1027         also handle overwriting a range with a single entry.
1028         (gfc_assign_data_value_range): Removed.
1029         * resolve.c (check_data_variable): Adjust gfc_assign_data_value
1030         call.  Use gfc_assign_data_value instead of
1031         gfc_assign_data_value_expr.
1032
1033 2011-06-27  Janus Weil  <janus@gcc.gnu.org>
1034
1035         PR fortran/49466
1036         * trans-array.c (structure_alloc_comps): Make sure sub-components
1037         and extended types are correctly deallocated.
1038
1039 2011-06-21  Andrew MacLeod  <amacleod@redhat.com>
1040
1041         * trans-openmp.c: Add sync_ or SYNC__ to builtin names.
1042         * trans-stmt.c: Add sync_ or SYNC__ to builtin names.
1043         * trans-decl.c: Add sync_ or SYNC__ to builtin names.
1044
1045 2011-06-21  Janus Weil  <janus@gcc.gnu.org>
1046
1047         PR fortran/49112
1048         * class.c (gfc_find_derived_vtab): Make vtab and default initialization
1049         symbols SAVE_IMPLICIT.
1050
1051 2011-06-20  Tobias Burnus  <burnus@net-b.de>
1052
1053         PR fortran/18918
1054         * gfortran.h (gfc_check_vardef_context): Update prototype.
1055         (iso_fortran_env_symbol): Handle derived types.
1056         (symbol_attribute): Add lock_comp.
1057         * expr.c (gfc_check_vardef_context): Add LOCK_TYPE check.
1058         * interface.c (compare_parameter, gfc_procedure_use): Handle
1059         LOCK_TYPE.
1060         (compare_actual_formal): Update
1061         gfc_check_vardef_context call.
1062         * check.c (gfc_check_atomic_def, gfc_check_atomic_ref): Ditto.
1063         * intrinsic.c (check_arglist): Ditto.
1064         * io.c (resolve_tag, gfc_resolve_dt, gfc_resolve_inquire): Ditto.
1065         * iso-fortran-env.def (ISOFORTRAN_LOCK_TYPE): Add.
1066         * intrinsic.texi (ISO_FORTRAN_ENV): Document LOCK_TYPE.
1067         * module.c (mio_symbol_attribute): Handle lock_comp.
1068         (create_derived_type): New function.
1069         (use_iso_fortran_env_module): Call it to handle LOCK_TYPE.
1070         * parse.c (parse_derived): Add constraint check for LOCK_TYPE.
1071         * resolve.c (resolve_symbol, resolve_lock_unlock): Add constraint
1072         checks for LOCK_TYPE.
1073         (gfc_resolve_iterator, resolve_deallocate_expr,
1074         resolve_allocate_expr, resolve_code, resolve_transfer): Update
1075         gfc_check_vardef_context call.
1076         * trans-stmt.h (gfc_trans_lock_unlock): New prototype.
1077         * trans-stmt.c (gfc_trans_lock_unlock): New function.
1078         * trans.c (trans_code): Handle LOCK and UNLOCK.
1079
1080 2011-06-18  Janus Weil  <janus@gcc.gnu.org>
1081
1082         PR fortran/49400
1083         * decl.c (gfc_match_procedure): Allow PROCEDURE declarations inside
1084         BLOCK constructs.
1085
1086 2011-06-17  Janus Weil  <janus@gcc.gnu.org>
1087
1088         PR fortran/48699
1089         * check.c (gfc_check_move_alloc): If 'TO' argument is polymorphic,
1090         make sure the vtab is present.
1091
1092 2011-06-16  Janus Weil  <janus@gcc.gnu.org>
1093
1094         PR fortran/49074
1095         * interface.c (gfc_extend_assign): Propagate the locus from the
1096         assignment to the type-bound procedure call.
1097
1098 2011-06-16  Janus Weil  <janus@gcc.gnu.org>
1099
1100         PR fortran/49417
1101         * module.c (mio_component): Make sure the 'class_ok' attribute is set
1102         for use-associated CLASS components.
1103         * parse.c (parse_derived): Check for 'class_ok' attribute.
1104         * resolve.c (resolve_fl_derived): Ditto.
1105
1106 2011-06-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
1107
1108         * frontend-passes.c (remove_trim):  New function.
1109         (optimize_assignment):  Use it.
1110         (optimize_comparison):  Likewise.  Return correct status
1111         for previous change.
1112
1113 2011-06-12  Tobias Burnus
1114
1115         PR fortran/49324
1116         * trans-expr.c (gfc_trans_assignment_1): Tell
1117         gfc_trans_scalar_assign to also deep-copy RHS nonvariables
1118         with allocatable components.
1119         * trans-array.c (gfc_conv_expr_descriptor): Ditto.
1120
1121 2011-05-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
1122
1123         * frontend-passes.c (optimize_assignment): Follow chains
1124         of concatenation operators to the end for removing trailing
1125         TRIMS for assignments.
1126
1127 2011-06-10  Daniel Carrera  <dcarrera@gmail.com>
1128
1129         * trans-decl.c (gfc_build_builtin_function_decls):
1130         Updated declaration of caf_sync_all and caf_sync_images.
1131         * trans-stmt.c (gfc_trans_sync): Function
1132         can now handle a "stat" variable that has an integer type
1133         different from integer_type_node.
1134
1135 2011-06-09  Richard Guenther  <rguenther@suse.de>
1136
1137         * trans.c (gfc_allocate_array_with_status): Mark error path
1138         as unlikely.
1139
1140 2011-06-08  Tobias Burnus  <burnus@net-b.de>
1141
1142         PR fortran/18918
1143         * gfortran.h (gfc_statement): Add ST_LOCK and ST_UNLOCK.
1144         (gfc_exec_op): Add EXEC_LOCK and EXEC_UNLOCK.
1145         (gfc_code): Add expr4.
1146         * match.h (gfc_match_lock, gfc_match_unlock): New prototypes.
1147         * match.c (gfc_match_lock, gfc_match_unlock,
1148         lock_unlock_statement): New functions.
1149         (sync_statement): Bug fix, avoiding double freeing.
1150         (gfc_match_if): Handle LOCK/UNLOCK statement.
1151         * parse.c (decode_statement, next_statement,
1152         gfc_ascii_statement): Ditto.
1153         * st.c (gfc_free_statement): Handle LOCK and UNLOCK.
1154         * resolve.c (resolve_lock_unlock): New function.
1155         (resolve_code): Call it.
1156         * dump-parse-tree.c (show_code_node): Handle LOCK/UNLOCK.
1157
1158 2011-06-07  Richard Guenther  <rguenther@suse.de>
1159
1160         * f95-lang.c (gfc_init_decl_processing): Do not set
1161         size_type_node or call set_sizetype.
1162
1163 2011-06-05  Tobias Burnus  <burnus@net-b.de>
1164
1165         PR fortran/49255
1166         * trans-expr.c (gfc_conv_procedure_call): Fix -fcheck=pointer
1167         for F2008.
1168
1169 2011-06-05  Andreas Schmidt  <andreas.schmidt.42@gmx.net>
1170         Thomas Koenig  <tkoenig@gcc.gnu.org>
1171
1172         * dump-parse-tree.c (show_symbol):  Don't dump namespace
1173         for ENTRY to avoid infinite recursion.
1174
1175 2011-06-02  Asher Langton  <langton2@llnl.gov>
1176
1177         PR fortran/49268
1178         * trans-decl.c (gfc_trans_deferred_vars): Treat assumed-size Cray
1179         pointees as AS_EXPLICIT.
1180
1181 2011-06-02  Asher Langton  <langton2@llnl.gov>
1182
1183         PR fortran/37039
1184         * decl.c (variable_decl): Merge current_as before copying to cp_as.
1185
1186 2011-06-02  Steven G. Kargl  <kargl@gcc.gnu.org>
1187
1188         PR fortran/49265
1189         * decl.c (gfc_match_modproc):  Allow for a double colon in a module
1190         procedure statement.
1191         * parse.c ( decode_statement): Deal with whitespace around :: in
1192         gfc_match_modproc.
1193
1194 2011-05-31  Tobias Burnus  <burnus@net-b.de>
1195
1196         PR fortran/18918
1197         * intrinsic.c (klass): Add CLASS_ATOMIC.
1198         (add_subroutines): Add atomic_ref/atomic_define.
1199         * intrinsic.texi (ATOMIC_REF, ATOMIC_DEFINE): Document.
1200         * intrinsic.h (gfc_check_atomic_def, gfc_check_atomic_ref,
1201         gfc_resolve_atomic_def, gfc_resolve_atomic_ref): New prototypes.
1202         * gfortran.h (gfc_isym_id): Add GFC_ISYM_ATOMIC_DEF
1203         and GFC_ISYM_ATOMIC_REF.
1204         (gfc_atomic_int_kind, gfc_atomic_logical_kind): New global vars.
1205         * iresolve.c (gfc_resolve_atomic_def, gfc_resolve_atomic_ref): New
1206         functions.
1207         * check.c (gfc_check_atomic, gfc_check_atomic_def,
1208         gfc_check_atomic_ref): New functions.
1209         * iso-fortran-env.def (ISOFORTRANENV_FILE_ATOMIC_INT_KIND,
1210         ISOFORTRANENV_FILE_ATOMIC_LOGICAL_KIND): Change kind value.
1211         * trans-intrinsic.c (conv_intrinsic_atomic_def,
1212         conv_intrinsic_atomic_ref, gfc_conv_intrinsic_subroutine): New
1213         functions.
1214         (conv_intrinsic_move_alloc) Renamed from
1215         gfc_conv_intrinsic_move_alloc - and made static.
1216         * trans.h (gfc_conv_intrinsic_move_alloc): Remove.
1217         (gfc_conv_intrinsic_subroutine) Add prototype.
1218         * trans.c (trans_code): Call gfc_conv_intrinsic_subroutine.
1219         * trans-types (gfc_atomic_int_kind, gfc_atomic_logical_kind): New
1220         global vars.
1221         (gfc_init_kinds): Set them.
1222
1223 2011-05-31  Tobias Burnus  <burnus@net-b.de>
1224
1225         PR fortran/18918
1226         * trans-array.c (gfc_trans_dummy_array_bias): Handle
1227         cobounds of assumed-shape arrays.
1228
1229 2011-05-31  Tobias Burnus  <burnus@net-b.de>
1230
1231         PR fortran/18918
1232         * resolve.c (resolve_fl_variable): Handle static coarrays
1233         with non-constant cobounds.
1234
1235 2011-05-29  Janus Weil  <janus@gcc.gnu.org>
1236
1237         PR fortran/47601
1238         * module.c (mio_component_ref): Handle components of extended types.
1239         * symbol.c (gfc_find_component): Return is sym is NULL.
1240
1241 2011-05-29  Tobias Burnus  <burnus@net-b.de>
1242
1243         PR fortran/18918
1244         * interface.c (compare_parameter): Add check for passing coarray
1245         to allocatable noncoarray dummy.
1246
1247 2011-05-29  Tobias Burnus  <burnus@net-b.de>
1248             Richard Guenther  <rguenther@suse.de>
1249
1250         PR fortran/18918
1251         * trans-types.c (gfc_get_nodesc_array_type): Don't mess with
1252         the type's TREE_TYPE.
1253         * trans-array.c (gfc_conv_array_ref): Use TYPE_MAIN_VARIANT.
1254         * trans.c (gfc_build_array_ref): Ditto.
1255
1256 2011-05-27  Tobias Burnus  <burnus@net-b.de>
1257
1258         PR fortran/18918
1259         * check.c (gfc_check_associated, gfc_check_null): Add coindexed check.
1260         * match.c (gfc_match_nullify): Ditto.
1261         * resolve.c (resolve_deallocate_expr): Ditto.
1262         * trans-types.c (gfc_get_nodesc_array_type): Don't set restricted
1263         for nonpointers.
1264
1265 2011-05-27  Tobias Burnus  <burnus@net-b.de>
1266
1267         PR fortran/48820
1268         * gfortran.h (gfc_isym_id): Add GFC_ISYM_RANK.
1269         * intrinsic.c (add_functions): Add rank intrinsic.
1270         (gfc_check_intrinsic_standard): Handle GFC_STD_F2008_TR.
1271         * intrinsic.h (gfc_simplify_rank, gfc_check_rank): Add prototypes.
1272         * simplify.c (gfc_simplify_rank): New function.
1273         * intrinsic.texi (RANK): Add description for rank intrinsic.
1274         * check.c (gfc_check_rank): New function.
1275
1276 2011-05-26  Paul Thomas  <pault@gcc.gnu.org>
1277             Thomas Koenig  <tkoenig@gcc.gnu.org>
1278
1279         PR fortran/48955
1280         * trans-expr.c (gfc_trans_assignment_1): GFC_REVERSE_NOT_SET
1281         changed to GFC_ENABLE_REVERSE.
1282         * trans-array.c (gfc_init_loopinfo): GFC_CANNOT_REVERSE changed
1283         to GFC_INHIBIT_REVERSE.
1284         * gfortran.h : Enum gfc_reverse is now GFC_ENABLE_REVERSE,
1285         GFC_FORWARD_SET, GFC_REVERSE_SET and GFC_INHIBIT_REVERSE.
1286         * dependency.c (gfc_dep_resolver): Change names for elements of
1287         gfc_reverse as necessary. Change the logic so that forward
1288         dependences are remembered as well as backward ones. When both
1289         have appeared, force a temporary.
1290
1291 2011-05-26  Tobias Burnus  <burnus@net-b.de>
1292
1293         PR fortran/18918
1294         * trans-array.c (gfc_conv_array_ref): Handle pointer coarrays.
1295         * trans-decl.c (has_coarray_vars, caf_init_block,
1296         gfor_fndecl_caf_register): New file-global variables.
1297         (gfc_finish_var_decl): Make sure that coarrays in main are static.
1298         (gfc_build_qualified_array): Generate coarray token variable.
1299         (gfc_get_symbol_decl): Don't use a static initializer for coarrays.
1300         (gfc_build_builtin_function_decls): Set gfor_fndecl_caf_register.
1301         (gfc_trans_deferred_vars, gfc_emit_parameter_debug_info): Skip for
1302         static coarrays.
1303         (generate_local_decl): Check for local coarrays.
1304         (create_main_function): SYNC ALL before calling MAIN.
1305         (generate_coarray_sym_init): Register static coarray.
1306         (generate_coarray_init): Generate CAF registering constructor
1307         function.
1308         (gfc_generate_function_code): Call it, if needed, do not create
1309         cgraph twice.
1310         (gfc_generate_module_vars, gfc_process_block_locals): Call
1311         generate_coarray_init.
1312         * trans-types.c (gfc_get_nodesc_array_type): Generate pointers for
1313         -fcoarray=lib.
1314         * trans.h (gfor_fndecl_caf_register): New variable.
1315         (lang_type): New element caf_token.
1316         (GFC_TYPE_ARRAY_CAF_TOKEN): New macro.
1317
1318 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
1319
1320         * Make-lang.in (GFORTRAN_D_OBJS): Remove prefix.o.
1321         (gfortran$(exeext)): Use libcommon-target.a.
1322
1323 2011-05-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
1324
1325         * frontend-passes.c (cfe_register_funcs):  Also register
1326         character functions if their charlens are known and constant.
1327         Also register allocatable functions.
1328
1329 2011-05-21  Janus Weil  <janus@gcc.gnu.org>
1330
1331         PR fortran/48699
1332         * match.c (select_type_set_tmp): Make the temporary ALLOCATABLE if the
1333         selector is ALLOCATABLE.
1334
1335 2011-05-20  Janus Weil  <janus@gcc.gnu.org>
1336
1337         PR fortran/48706
1338         * module.c (write_dt_extensions): Do not write extended types which
1339         are local to a subroutine.
1340
1341 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
1342
1343         * Make-lang.in (GFORTRAN_D_OBJS): Remove version.o and intl.o.
1344
1345 2011-05-20  Janne Blomqvist  <jb@gcc.gnu.org>
1346
1347         * gfortran.texi (set_fpe): Update documentation.
1348         * invoke.texi (-ffpe-trap): Likewise.
1349         * libgfortran.h (GFC_FPE_PRECISION): Rename to GFC_FPE_INEXACT.
1350         * options.c (gfc_handle_fpe_trap_option): Handle inexact and make
1351         precision an alias for it.
1352
1353 2011-05-19  Tobias Burnus  <burnus@net-b.de>
1354
1355         PR fortran/18918
1356         * trans-types.c (gfc_get_element_type): Handle scalar coarrays.
1357         (gfc_get_nodesc_array_type): Make a variant-type copy for scalar
1358         coarrays.
1359         * trans.c (gfc_build_array_ref): Return original type not variant
1360         copy for scalar coarrays.
1361         * trans-array.c (gfc_conv_array_ref): Ditto.
1362
1363 2011-05-18  Janus Weil  <janus@gcc.gnu.org>
1364
1365         PR fortran/48700
1366         * trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): Deallocate 'TO'
1367         argument to avoid memory leaks.
1368
1369 2011-05-16  Tobias Burnus  <burnus@net-b.de>
1370
1371         * gfortran.texi (_gfortran_set_options): Add GFC_STD_F2008_TR.
1372         (Fortran 2008 status): Multi-image support for coarrays.
1373         (TR 19113 status): New section.
1374
1375 2011-05-15  Tobias Burnus  <burnus@net-b.de>
1376
1377         PR fortran/18918
1378         actual argument is not an array; rank mismatch is diagnosted later.
1379         * trans-decl.c (gfc_get_symbol_decl, gfc_trans_deferred_vars): Handle
1380         scalar coarrays.
1381         * trans-types.c (gfc_get_array_type_bounds): Ditto.
1382
1383 2011-05-15  Joern Rennecke  <amylaar@spamcop.net>
1384
1385         PR middle-end/46500
1386         * trans-types.c: Include "tm.h".
1387         [0] (c_size_t_size): Remove.
1388
1389 2011-05-15  Janne Blomqvist  <jb@gcc.gnu.org>
1390
1391         PR libfortran/48915
1392         * gfortran.texi (_gfortran_set_options): Even though -fbacktrace
1393         is now the default, the library defaults to backtracing disabled.
1394
1395 2011-05-14  Tobias Burnus  <burnus@net-b.de>
1396
1397         * lang.opt (fdump-core): Re-add as ignored option
1398         for backward compatibility.
1399
1400 2011-05-14  Janne Blomqvist  <jb@gcc.gnu.org>
1401
1402         PR libfortran/48915
1403         * gfortran.texi: Update mixed-language programming section
1404         reflecting the removal of the fdump-core option, and that
1405         -fbacktrace is now enabled by default.
1406
1407 2011-05-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
1408
1409         PR fortran/22572
1410         * frontend-passes.c (cfe_register_funcs):  Also register functions
1411         for potential elimination if the rank is > 0, the shape is unknown
1412         and reallocate on assignment is active.
1413         (create_var):  For rank > 0 functions with unknown shape, create
1414         an allocatable temporary.
1415
1416 2011-05-14  Tobias Burnus  <burnus@net-b.de>
1417
1418         PR fortran/18918
1419         * interface.c (compare_parameter): Skip diagnostic if
1420         actual argument is not an array; rank mismatch is diagnosted later.
1421
1422 2011-05-14  Tobias Burnus  <burnus@net-b.de>
1423
1424         * options.c (gfc_init_options, gfc_post_options): Enable
1425         -fstack-arrays by default if -Ofast is used.
1426         * invoke.texi (-fstack-arrays): Document this.
1427
1428 2011-05-14  Janne Blomqvist  <jb@gcc.gnu.org>
1429
1430         PR libfortran/48915
1431         * gfortran.h (gfc_option_t): Remove flag_dump_core.
1432         * gfortran.texi (GFORTRAN_ERROR_DUMPCORE): Remove section.
1433         (GFORTRAN_ERROR_BACKTRACE): Document that it's enabled by default.
1434         * intrinsic.texi (ABORT): Remove explanation of -fdump-core.
1435         * invoke.texi: Remove -fdump-core, document that -fbacktrace is
1436         enabled by default.
1437         * lang.opt: Remove -fdump-core.
1438         * options.c (gfc_init_options): Make backtrace default to enabled,
1439         remove dump_core.
1440         (gfc_handle_option): Remove OPT_fdump-core.
1441         * trans-decl.c: Pass a 0 to preserve ABI.
1442
1443 2011-05-14  Janne Blomqvist  <jb@gcc.gnu.org>
1444
1445         * gfortran.texi: Remove GFORTRAN_USE_STDERR documentation.
1446
1447 2011-05-13  Tobias Burnus  <burnus@net-b.de>
1448
1449         PR fortran/48972
1450         * io.c (resolve_tag_format, resolve_tag): Make sure
1451         that the string is of default kind.
1452         (gfc_resolve_inquire): Also resolve decimal tag.
1453
1454 2011-05-12  Tobias Burnus  <burnus@net-b.de>
1455
1456         PR fortran/48972
1457         * resolve.c (resolve_intrinsic): Don't resolve module
1458         intrinsics multiple times.
1459
1460 2011-05-11  Tobias Burnus  <burnus@net-b.de>
1461
1462         PR fortran/48889
1463         * expr.c (gfc_is_constant_expr): Use e->value.function.esym
1464         instead of e->symtree->n.sym, if available.
1465
1466 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
1467
1468         * f95-lang.c (global_bindings_p): Return bool and simplify.
1469
1470 2011-05-07  Tobias Burnus  <burnus@net-b.de>
1471
1472         PR fortran/18918
1473         PR fortran/48919
1474         * trans.h: Move gfc_init_coarray_decl prototype ...
1475         * gfortran.h: ... to here.
1476         * parse.c (translate_all_program_units): Call gfc_init_coarray_decl.
1477         (gfc_parse_file): Update translate_all_program_units call.
1478         * trans-decl.c (gfc_init_coarray_decl): Fix variable declaration,
1479         new argument whether DECL_EXTERNAL should be used.
1480         (create_main_function): Update gfc_init_coarray_decl call.
1481         * trans-intrinsic.c (trans_this_image, trans_image_index,
1482         conv_intrinsic_cobound): Ditto.
1483
1484 2011-05-06  Tobias Burnus  <burnus@net-b.de>
1485
1486         PR fortran/18918
1487         * trans-array.c (gfc_walk_variable_expr): Continue walking
1488         for scalar coarrays.
1489         * trans-intrinsic.c (convert_element_to_coarray_ref): New function.
1490         (trans_this_image, trans_image_index, conv_intrinsic_cobound): Use it.
1491         (trans_this_image): Fix algorithm.
1492         * trans-types.c (gfc_get_element_type, gfc_get_array_descriptor_base,
1493         gfc_sym_type): Handle scalar coarrays.
1494
1495 2011-05-06  Tobias Burnus  <burnus@net-b.de>
1496
1497         PR fortran/48858
1498         PR fortran/48820
1499         * lang.opt (std=f2008tr): New.
1500         * libgfortran.h (GFC_STD_F2008_TR): New macro constant.
1501         * decl.c (verify_c_interop_param): Allow OPTIONAL in BIND(C)
1502         procedures for -std=f2008tr/gnu/legacy.
1503         (gfc_match_import): Set sym to NULL.
1504         * options.c (set_default_std_flags,gfc_handle_option): Handle
1505         -std=f2008tr.
1506         * invoke.texi (-std=): Document -std=f2008tr.
1507
1508 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
1509
1510         * trans-decl.c (gfc_trans_entry_master_switch): Call build_case_label.
1511         * trans-io.c (add_case): Likewise.
1512         * trans-stmt.c (gfc_trans_integer_select): Likewise.
1513         (gfc_trans_character_select): Likewise.
1514
1515 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
1516
1517         * trans-decl.c (trans_function_start): Do not set
1518         dont_save_pending_sizes_p.
1519
1520 2011-05-04  Nathan Froyd  <froydnj@codesourcery.com>
1521
1522         * trans.h (gfc_chainon_list): Delete.
1523         * trans.c (gfc_chainon_list): Delete.
1524
1525 2011-05-04  Tobias Burnus  <burnus@net-b.de>
1526
1527         PR fortran/48864
1528         * invoke.texi (fno-protect-parens): Document
1529         that -Ofast implies -fno-protect-parens.
1530         * options.c (gfc_init_options, gfc_post_options):
1531         Make -Ofast imply -fno-protect-parens.
1532
1533 2011-05-04  Nathan Froyd  <froydnj@codesourcery.com>
1534
1535         * trans-decl.c (build_library_function_decl_1): Call
1536         build_function_type_vec.  Adjust argument list building accordingly.
1537         * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Likewise.
1538         * trans-types.c (gfc_get_function_type): Likewise.
1539
1540 2011-05-04  Richard Guenther  <rguenther@suse.de>
1541
1542         * trans-array.c (gfc_trans_array_constructor_value): Use
1543         size_int for bounds of range types.
1544         (gfc_trans_array_constructor_value): Use size_type_node
1545         for memcpy argument.
1546         * trans-common.c (build_field): Use gfc_charlen_type_node
1547         for lengths.
1548         * trans-openmp.c (gfc_trans_omp_clauses): Do not pass NULL
1549         as type to build_int_cst.
1550         * trans-const.c (gfc_build_string_const): Use size_int
1551         for bounds of range types.
1552         (gfc_build_wide_string_const): Likewise.
1553         * trans-stmt.c (gfc_trans_label_assign): Use gfc_charlen_type_node
1554         for lengths.
1555         (gfc_trans_character_select): Likewise.
1556         (gfc_trans_character_select): Do not pass NULL
1557         as type to build_int_cst.
1558         (gfc_trans_character_select): Use size_int for bounds of range types.
1559         * trans-io.c (gfc_build_io_library_fndecls): Likewise.
1560         (add_case): Do not pass NULL as type to build_int_cst.
1561         (transfer_expr): Likewise.
1562         (transfer_array_desc): Likewise.
1563         * trans-decl.c (gfc_add_assign_aux_vars): Use gfc_charlen_type_node
1564         for lengths.
1565         (gfc_trans_assign_aux_var): Likewise.
1566         (create_main_function): Use size_int for bounds of range types.
1567         * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): Do not pass
1568         NULL as type to build_int_cst.
1569         (gfc_conv_intrinsic_spacing): Likewise.
1570         (gfc_conv_intrinsic_rrspacing): Likewise.
1571         (gfc_conv_intrinsic_len): Use gfc_charlen_type_node for lengths.
1572
1573 2011-05-04  Richard Guenther  <rguenther@suse.de>
1574
1575         * trans-types.c (gfc_get_array_type_bounds): Remove zero notrunc
1576         argument to int_const_binop.
1577
1578 2011-05-03  Tobias Burnus  <burnus@net-b.de>
1579
1580         PR fortran/18918
1581         * trans-intrinsic.c (trans_this_image): Implement version with
1582         coarray argument.
1583         (conv_intrinsic_cobound): Simplify code.
1584         (gfc_conv_intrinsic_function): Call trans_this_image for
1585         this_image(coarray) except for -fcoarray=single.
1586
1587 2011-05-02  Steven G. Kargl  <kargl@gcc.gnu.org>
1588
1589         PR fortran/48720
1590         * gfortran.texi: Document the 'Q' exponent-letter extension.
1591         * invoke.texi: Document -Wreal-q-constant.
1592         * lang.opt: Add -Wreal-q-constant option.
1593         * gfortran.h: Add warn_real_q_constant to option struct.
1594         * primary.c (match_real_constant):  Use it.  Accept 'Q' as
1595         exponent-letter for REAL(16) real-literal-constant with a
1596         fallback to REAL(10) or error if REAL(10) is not available.
1597         * options.c (gfc_init_options, set_Wall) Set it.
1598         (gfc_handle_option): Handle new option.
1599
1600 2011-04-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
1601
1602         * dump-prase-tree.c (show_code_node):  Set the current
1603         namespace to the BLOCK before displaying it; restore
1604         afterwards.
1605
1606 2011-04-30  Tobias Burnus  <burnus@net-b.de>
1607
1608         PR fortran/48821
1609         * decl.c (gfc_match_import): Don't try to find the
1610         symbol if already found.
1611
1612 2011-04-30  Paul Thomas  <pault@gcc.gnu.org>
1613
1614         PR fortran/48746
1615         * trans-expr.c (fcncall_realloc_result): Set the bounds and the
1616         offset so that the lbounds are one.
1617         (gfc_trans_arrayfunc_assign): Add rank to arguments of above.
1618
1619 2011-04-29  Paul Thomas  <pault@gcc.gnu.org>
1620
1621         PR fortran/48462
1622         * trans-expr.c (arrayfunc_assign_needs_temporary): Deal with
1623         automatic reallocation when the lhs is a target.
1624
1625         PR fortran/48746
1626         * trans-expr.c (fcncall_realloc_result): Make sure that the
1627         result dtype field is set before the function call.
1628
1629 2011-04-29  Tobias Burnus  <burnus@net-b.de>
1630
1631         PR fortran/48810
1632         * resolve.c (resolve_typebound_generic_call): Don't check access
1633         flags of the specific function.
1634
1635         PR fortran/48800
1636         * resolve.c (resolve_formal_arglist): Don't change AS_DEFERRED
1637         to AS_ASSUMED_SHAPE for function results.
1638         (resolve_fl_var_and_proc): Print also for function results with
1639         AS_DEFERRED an error, if they are not a pointer or allocatable.
1640         (resolve_types): Make sure arguments of procedures in interface
1641         blocks are resolved.
1642
1643 2011-04-29  Michael Matz  <matz@suse.de>
1644
1645         * options.c (options.c): Set warn_maybe_uninitialized.
1646
1647 2011-04-28  Tobias Burnus  <burnus@net-b.de>
1648
1649         PR fortran/48112
1650         * resolve.c (resolve_fl_var_and_proc): Print diagnostic of
1651         function results only once.
1652         (resolve_symbol): Always resolve function results.
1653
1654         PR fortran/48279
1655         * expr.c (gfc_check_vardef_context): Fix handling of generic
1656         EXPR_FUNCTION.
1657         * interface.c (check_interface0): Reject internal functions
1658         in generic interfaces, unless -std=gnu.
1659
1660 2011-04-27  Tobias Burnus  <burnus@net-b.de>
1661
1662         PR fortran/48788
1663         * resolve.c (resolve_global_procedure): Error recovery -
1664         avoid segfault for (non)character-returning functions.
1665
1666 2011-04-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
1667
1668         * decl.c (gfc_match_end):  Check that the block name starts
1669         with "block@".
1670         * parse.c (gfc_build_block_ns):  Make block names unique by
1671         numbering them.
1672
1673 2011-04-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
1674
1675         * frontend-passes.c (inserted_block):  New variable.
1676         (changed_statement):  Likewise.
1677         (create_var):  Encase statement to be operated on in a BLOCK.
1678         Adjust code insertion for BLOCK.
1679         (cfe_code):  Set inserted_block and changed_statement to NULL.
1680
1681 2011-04-23  Tobias Burnus  <burnus@net-b.de>
1682
1683         PR fortran/18918
1684         * module.c (mio_array_spec): Set as->cotype on reading.
1685         * resolve.c (resolve_allocate_expr): Fix allocating coarray
1686         components.
1687
1688 2011-04-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
1689
1690         PR fortran/48405
1691         * frontend_passes (cfe_register_funcs): Remove workaround for DO
1692         loops.
1693         (gfc_code_walker):  Make sure the pointer to the current
1694         statement doen't change when other statements are inserted.
1695
1696 2011-04-21  Tobias Burnus  <burnus@net-b.de>
1697
1698         PR fortran/18918
1699         * array.c (gfc_match_array_spec): Fix maximal rank(+corank) check.
1700
1701 2011-04-20  Jim Meyering  <meyering@redhat.com>
1702
1703         * expr.c (free_expr0): Remove useless if-before-free.
1704         * gfortranspec.c (lang_specific_pre_link): Likewise.
1705         * interface.c (gfc_extend_expr): Likewise.
1706         * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
1707
1708 2011-04-19  Tobias Burnus  <burnus@net-b.de>
1709
1710         PR fortran/48588
1711         PR fortran/48692
1712
1713         * module.c (fix_mio_expr): Commit created symbol.
1714
1715 2011-04-19  Janne Blomqvist  <jb@gcc.gnu.org>
1716
1717         * scanner.c (load_file): Use XCNEWVAR instead of xcalloc.
1718
1719 2011-04-19  Janne Blomqvist  <jb@gcc.gnu.org>
1720
1721         * frontend-passes.c (gfc_run_passes): Use XDELETEVEC instead of
1722         free.
1723
1724 2011-04-19  Janne Blomqvist  <jb@gcc.gnu.org>
1725
1726         * misc.c (gfc_getmem): Remove function.
1727         * gfortran.h: Remove gfc_getmem prototype. Replace gfc_getmem
1728         usage with XCNEW or XCNEWVEC.
1729         * expr.c (gfc_check_assign_symbol): Replace gfc_getmem usage with
1730         XCNEW or XCNEWVEC.
1731         * options.c (gfc_handle_module_path_options)
1732         (gfc_get_option_string): Likewise.
1733         * resolve.c (gfc_resolve_forall): Likewise.
1734         * simplify.c (simplify_transformation_to_array): Likewise.
1735         * target-memory.c (gfc_target_interpret_expr): Likewise.
1736         * trans-common.c (get_segment_info, copy_equiv_list_to_ns)
1737         (get_init_field): Likewise.
1738         * trans-expr.c (gfc_conv_statement_function): Likewise.
1739         * trans-io.c (nml_full_name): Likewise.
1740         * trans-stmt.c (gfc_trans_forall_1): Likewise.
1741         * scanner.c (load_file): Replace gfc_getmem usage with xcalloc.
1742
1743 2011-04-19  Tobias Burnus  <burnus@net-b.de>
1744
1745         PR fortran/48588
1746         * parse.c (resolve_all_program_units): Skip modules.
1747         (translate_all_program_units): Handle modules.
1748         (gfc_parse_file): Defer code generation for modules.
1749
1750 2011-04-19  Martin Jambor  <mjambor@suse.cz>
1751
1752         * trans-decl.c (gfc_generate_function_code): Call cgraph_create_node
1753         instead of cgraph_get_create_node.
1754
1755 2011-04-18  Jim Meyering  <meyering@redhat.com>
1756
1757         remove now-unused definition of gfc_free
1758         * misc.c (gfc_free): Remove function.
1759         * gfortran.h (gfc_free): Remove its prototype.
1760
1761 2011-04-18  Jim Meyering  <meyering@redhat.com>
1762
1763         convert each use of gfc_free (p) to free (p)
1764         Do that by running this command:
1765           perl -pi -e    's/\bgfc_free ?\(/free (/' \
1766             $(git grep -El '\bgfc_free ?\(')
1767         which also corrects the few uses that lacked a space between
1768         the function name and the open parenthesis.
1769         Manually undo the change to the function definition itself
1770         and its prototype.  They'll be removed next.
1771         * array.c (gfc_free_array_spec, gfc_set_array_spec): s/gfc_free/free/
1772         * constructor.c (node_free): Likewise.
1773         * cpp.c (dump_queued_macros): Likewise.
1774         * data.c (gfc_assign_data_value): Likewise.
1775         * decl.c (free_variable, free_value, gfc_free_data): Likewise.
1776         (gfc_free_data_all, match_old_style_init): Likewise.
1777         (gfc_set_constant_character_len, gfc_free_enum_history, NUM_DECL):
1778         Likewise.
1779         (gfc_match_modproc): Likewise.
1780         * dependency.c (check_section_vs_section): Likewise.
1781         * error.c (gfc_pop_error, gfc_free_error): Likewise.
1782         * expr.c (free_expr0, gfc_free_expr, gfc_free_actual_arglist): Likewise.
1783         (gfc_free_ref_list, gfc_replace_expr, gfc_copy_ref): Likewise.
1784         (find_substring_ref, gfc_simplify_expr, gfc_check_assign_symbol):
1785         Likewise.
1786         * frontend-passes.c (gfc_run_passes, cfe_expr_0): Likewise.
1787         (strip_function_call, optimize_comparison): Likewise.
1788         * interface.c (gfc_free_interface, arginfo, check_interface0): Likewise.
1789         (CHECK_OS_COMPARISON, gfc_extend_assign, gfc_free_formal_arglist):
1790         Likewise.
1791         * intrinsic.c (gfc_intrinsic_done_1, gfc_convert_type_warn): Likewise.
1792         (gfc_convert_chartype): Likewise.
1793         * io.c (gfc_free_open, compare_to_allowed_values, gfc_free_close):
1794         Likewise.
1795         (gfc_free_filepos, gfc_free_dt, gfc_free_inquire): Likewise.
1796         * match.c (gfc_free_iterator, gfc_match_associate): Likewise.
1797         (gfc_free_alloc_list, gfc_free_namelist, gfc_free_equiv_until):
1798         Likewise.
1799         (free_case, gfc_free_forall_iterator): Likewise.
1800         * misc.c: Likewise.
1801         * module.c (free_pi_tree, resolve_fixups, free_rename): Likewise.
1802         (free_true_name, peek_atom, mio_allocated_wide_string): Likewise.
1803         (mio_pool_string, mio_internal_string, mio_gmp_integer): Likewise.
1804         (mio_gmp_real, mio_expr, mio_typebound_proc): Likewise.
1805         (mio_full_typebound_tree, skip_list, load_equiv): Likewise.
1806         (free_written_common, gfc_use_module, gfc_free_use_stmts): Likewise.
1807         * openmp.c (gfc_free_omp_clauses): Likewise.
1808         * options.c (gfc_post_options): Likewise.
1809         * parse.c (select_type_pop, parse_omp_structured_block): Likewise.
1810         * primary.c (gfc_free_structure_ctor_component): Likewise.
1811         * resolve.c (resolve_structure_cons, check_host_association): Likewise.
1812         (gfc_resolve_forall, resolve_equivalence): Likewise.
1813         * scanner.c (gfc_scanner_done_1, gfc_release_include_path): Likewise.
1814         (gfc_define_undef_line, preprocessor_line, include_line): Likewise.
1815         (load_file, gfc_read_orig_filename): Likewise.
1816         * simplify.c (simplify_transformation_to_array): Likewise.
1817         (gfc_simplify_ibits, simplify_shift, gfc_simplify_ishftc, STRING):
1818         Likewise.
1819         (gfc_simplify_compiler_options): Likewise.
1820         * st.c (gfc_free_statement, gfc_free_statements): Likewise.
1821         (gfc_free_association_list): Likewise.
1822         * symbol.c (free_components, gfc_free_st_label, free_st_labels):
1823         Likewise.
1824         (gfc_delete_symtree, gfc_free_symbol, gfc_undo_symbols): Likewise.
1825         (free_old_symbol, gfc_commit_symbols, free_tb_tree): Likewise.
1826         (free_common_tree, free_uop_tree, free_sym_tree): Likewise.
1827         (gfc_free_dt_list, gfc_free_equiv_infos, gfc_free_equiv_lists):
1828         Likewise.
1829         (gfc_free_finalizer, gfc_free_charlen, free_entry_list): Likewise.
1830         (gfc_free_namespace): Likewise.
1831         * trans-array.c (gfc_free_ss, gfc_trans_array_bound_check): Likewise.
1832         (gfc_conv_array_ref, gfc_conv_ss_startstride): Likewise.
1833         (gfc_trans_dummy_array_bias, gfc_conv_array_parameter): Likewise.
1834         * trans-common.c (get_init_field, create_common): Likewise.
1835         * trans-const.c (gfc_build_wide_string_const): Likewise.
1836         (gfc_conv_string_init): Likewise.
1837         * trans-decl.c (gfc_generate_function_code): Likewise.
1838         * trans-expr.c (gfc_conv_substring, gfc_free_interface_mapping):
1839         Likewise.
1840         (SCALAR_POINTER, gfc_conv_statement_function): Likewise.
1841         (gfc_trans_subarray_assign): Likewise.
1842         * trans-intrinsic.c (conv_generic_with_optional_char_arg): Likewise.
1843         * trans-io.c (gfc_trans_io_runtime_check, set_string): Likewise.
1844         (transfer_namelist_element, transfer_array_component): Likewise.
1845         * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
1846         * trans-stmt.c (cleanup_forall_symtrees, gfc_trans_forall_1): Likewise.
1847         * trans.c (trans_runtime_error_vararg, gfc_restore_backend_locus):
1848         Likewise.
1849
1850 2011-04-15  Jim Meyering  <meyering@redhat.com>
1851
1852         gfortran: remove cpp definition of free, ...
1853         in preparation for the s/gfc_free/free/ transformation.
1854         * gfortran.h (free): Remove macro definition that would otherwise
1855         prevent direct use of the function.
1856
1857 2011-04-18  Tobias Burnus  <burnus@net-b.de>
1858
1859         PR fortran/18918
1860         * array.c (gfc_match_array_ref): Check for too many codimensions.
1861         * check.c (gfc_check_image_index): Check number of elements
1862         in SUB argument.
1863         * simplify.c (gfc_simplify_image_index): Remove unreachable checks.
1864
1865 2011-04-18  Tobias Burnus  <burnus@net-b.de>
1866
1867         PR fortran/18918
1868         * iresolve.c (gfc_resolve_image_index): Set ts.type.
1869         * simplify.c (gfc_simplify_image_index): Don't abort if the bounds
1870         are not known at compile time and handle -fcoarray=lib.
1871         * trans-intrinsics.c (gfc_conv_intrinsic_function): Handle
1872         IMAGE_INDEX.
1873         (conv_intrinsic_cobound): Fix comment typo.
1874         (trans_this_image): New function.
1875         * trans-array.c (gfc_unlikely): Move to trans.c.
1876         * trans.c (gfc_unlikely): Function moved from trans-array.c.
1877         (gfc_trans_runtime_check): Use it.
1878         * trans-io.c (gfc_trans_io_runtime_check): Ditto.
1879         * trans.h (gfc_unlikely): Add prototype.
1880
1881 2011-04-18  Paul Thomas  <pault@gcc.gnu.org>
1882
1883         PR fortran/48462
1884         * trans-expr.c (fcncall_realloc_result): Renamed version of
1885         realloc_lhs_bounds_for_intrinsic_call that does not touch the
1886         descriptor bounds anymore but makes a temporary descriptor to
1887         hold the result.
1888         (gfc_trans_arrayfunc_assign): Modify the reference to above
1889         renamed function.
1890
1891 2011-05-17  Tobias Burnus  <burnus@net-b.de>
1892
1893         PR fortran/48624
1894         * trans-decl.c (gfc_get_extern_function_decl): Fix decl
1895         for external procedures with proc arguments.
1896
1897 2011-04-15  Michael Matz  <matz@suse.de>
1898
1899         * trans-array.c (toplevel): Include gimple.h.
1900         (gfc_trans_allocate_array_storage): Check flag_stack_arrays,
1901         properly expand variable length arrays.
1902         (gfc_trans_auto_array_allocation): If flag_stack_arrays create
1903         variable length decls and associate them with their scope.
1904         * gfortran.h (gfc_option_t): Add flag_stack_arrays member.
1905         * options.c (gfc_init_options): Handle -fstack_arrays option.
1906         * lang.opt (fstack-arrays): Add option.
1907         * invoke.texi (Code Gen Options): Document it.
1908         * Make-lang.in (trans-array.o): Depend on GIMPLE_H.
1909
1910 2011-04-15  Tobias Burnus  <burnus@net-b.de>
1911
1912         PR fortran/18918
1913         * trans-intrinsic.c (conv_intrinsic_cobound): Remove unused
1914         code which is also causing an ICE.
1915
1916 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
1917
1918         * f95-lang.c (poplevel): Use BLOCK_CHAIN and block_chainon.
1919
1920 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
1921
1922         * f95-lang.c (union lang_tree_node): Check for TS_COMMON before
1923         calling TREE_CHAIN.
1924
1925 2011-04-12  Paul Thomas  <pault@gcc.gnu.org>
1926
1927         PR fortran/48360
1928         PR fortran/48456
1929         * trans-array.c (get_std_lbound): For derived type variables
1930         return array valued component lbound.
1931
1932 2011-04-12  Martin Jambor  <mjambor@suse.cz>
1933
1934         * trans-decl.c (gfc_generate_function_code): Call
1935         cgraph_get_create_node instead of cgraph_node.
1936
1937 2011-04-11  Tobias Burnus  <burnus@net-b.de>
1938
1939         PR fortran/18918
1940         * simplify.c (simplify_bound_dim): Exit for
1941         ucobound's last dimension unless -fcoarray=single.
1942         * trans-array (gfc_conv_descriptor_size_1): Renamed from
1943         gfc_conv_descriptor_size, made static, has now from_dim and
1944         to_dim arguments.
1945         (gfc_conv_descriptor_size): Call gfc_conv_descriptor_size.
1946         (gfc_conv_descriptor_cosize): New function.
1947         * trans-array.h (gfc_conv_descriptor_cosize): New prototype.
1948         * trans-intrinsic.c (conv_intrinsic_cobound): Add input_location
1949         and handle last codim of ucobound for when -fcoarray is not "single".
1950
1951 2011-04-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
1952
1953         PR fortran/48448
1954         * gfortran.h (gfc_option_t):  Add warn_function_elimination and
1955         flag_frontend_optimize.
1956         * lang.opt (Wfunction-elimination):  Add.
1957         (ffrontend-optimize):  Add.
1958         * invoke.texi:  Add documentation for -Wfunction-elimination
1959         and -ffrontend-optimize.  Add -faggressive-function-elimination
1960         to list of code generation options.
1961         * frontend-passes.c (gfc_run_passes):  Run optimizations if
1962         flag_frontend_optimize is set.
1963         (warn_function_elimination):  New function.
1964         (cfe_expr_0):  Call it if requested to do so.
1965         * options.c (gfc_init_options):  Initiate warn_function_elimination
1966         and flag_frontend_optimize.
1967         (gfc_post_options):  Set flag_frontend_optimize if not specified
1968         by user, depending on the optimization level.
1969         (gfc_handle_option):  Handle -Wfunction-elimination and
1970         -ffrontend-optimize.
1971
1972 2011-04-06  Tobias Burnus  <burnus@net-b.de>
1973
1974         PR fortran/18918
1975         * trans-intrinsic.c (gfc_conv_intrinsic_function): Fix
1976         call for this_image.
1977
1978 2011-04-05  Nathan Froyd  <froydnj@codesourcery.com>
1979
1980         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Use
1981         build_function_type_list instead of build_function_type.  Correct
1982         argument order for func_frexp and func_scalbn.
1983
1984 2011-04-05  Duncan Sands  <baldrick@free.fr>
1985
1986         * f95-lang.c (build_builtin_fntypes): Swap frexp parameter types.
1987
1988 2011-04-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
1989
1990         * frontend-passes: (optimize_lexical_comparison): New function.
1991         (optimize_expr): Call it.
1992         (optimize_comparison): Also handle lexical comparison functions.
1993         Return false instad of -2 for unequal comparison.
1994
1995 2011-04-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
1996
1997         PR fortran/48412
1998         * frontend-passes (cfe_expr_0):  Reverse the order of going
1999         through the loops.
2000
2001 2011-04-04  Tobias Burnus  <burnus@net-b.de>
2002             Mikael Morin  <mikael.morin@sfr.fr>
2003
2004         PR fortran/18918
2005         * check.c (is_coarray): Update - because of DIMEN_THIS_IMAGE.
2006         * expr.c (gfc_is_coindexed): Ditto.
2007         * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_THIS_IMAGE.
2008         * interface.c (compare_parameter): Use gfc_expr_attr and
2009         gfc_is_coindexed.
2010         * resolve.c (check_dimension, compare_spec_to_ref,
2011         resolve_allocate_expr, check_data_variable): Update for
2012         DIMEN_THIS_IMAGE.
2013         * simplify.c (gfc_simplify_lcobound, gfc_simplify_this_image,
2014         gfc_simplify_ucobound): Allow non-constant bounds.
2015         * trans-array.c (gfc_set_loop_bounds_from_array_spec,
2016         gfc_trans_create_temp_array, gfc_trans_constant_array_constructor,
2017         gfc_set_vector_loop_bounds, gfc_conv_array_index_offset,
2018         gfc_start_scalarized_body, gfc_trans_scalarizing_loops,
2019         gfc_trans_scalarized_loop_boundary, gfc_conv_section_startstride,
2020         gfc_conv_ss_startstride, gfc_conv_loop_setup,
2021         gfc_trans_array_bounds, gfc_conv_expr_descriptor,
2022         gfc_walk_variable_expr): Handle codimen.
2023         * trans-decl.c (gfc_build_qualified_array): Save cobounds.
2024         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use arg2.
2025         (conv_intrinsic_cobound): New function.
2026         (gfc_conv_intrinsic_function): Call it.
2027         (gfc_walk_intrinsic_function, gfc_add_intrinsic_ss_code): Handle
2028         ucobound, lcobound, this_image.
2029         * fortran/trans-types.c (gfc_build_array_type): Save cobounds.
2030         (gfc_get_dtype): Honour corank.
2031         (gfc_get_nodesc_array_type): Save corank and codimensions.
2032         (gfc_get_array_type_bounds): Save cobound.
2033         * fortran/trans.h (gfc_ss_info,gfc_loopinfo): Add codimen item.
2034         (gfc_array_kind): Add corank item.
2035         (GFC_TYPE_ARRAY_CORANK): New macro.
2036
2037 2011-04-03  Kai Tietz  <ktietz@redhat.com>
2038
2039         PR middle-end/48422
2040         * Make-lang.in (f95-lang.o): Add some missing dependencies.
2041
2042 2011-04-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
2043
2044         PR fortran/48352
2045         * frontend-passes (cfe_register_funcs):  Don't
2046         register functions if they appear as iterators in DO loops.
2047
2048 2011-03-30  Michael Matz  <matz@suse.de>
2049
2050         PR fortran/47516
2051         * trans-expr.c (realloc_lhs_loop_for_fcn_call): Take loop as parameter,
2052         don't use local variable.
2053         (gfc_trans_arrayfunc_assign): Adjust caller.
2054
2055 2011-03-29  Janus Weil  <janus@gcc.gnu.org>
2056
2057         PR fortran/48095
2058         * decl.c (match_procedure_decl,match_ppc_decl): Set flavor of interface.
2059         * module.c (MOD_VERSION): Bump.
2060         (mio_typespec): Read/write 'interface' field.
2061         * primary.c (match_string_constant,match_logical_constant): Remove
2062         unneeded code.
2063         (match_complex_constant): Make sure to clear the typespec.
2064
2065 2011-03-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
2066
2067         * frontend-passes.c (create_var):  Warn about creating an
2068         array temporary if requested.
2069
2070 2011-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
2071
2072         PR fortran/47065
2073         * frontend-passes.c (optimize_trim): Also follow references, except
2074         when they are substring references or array references.
2075
2076 2011-03-27  Tobias Burnus  <burnus@net-b.de>
2077
2078         PR fortran/18918
2079         * gfortran.h (gfc_isym_id): Rename GFC_ISYM_NUMIMAGES to
2080         GFC_ISYM_NUM_IMAGES.
2081         (gfc_fcoarray): Add GFC_FCOARRAY_LIB.
2082         * intrinsic.c (add_functions): Update due to GFC_ISYM_NUM_IMAGES
2083         rename.
2084         * invoke.texi (-fcoarray=): Document "lib" argument.
2085         * iresolve.c (gfc_resolve_this_image): Fix THIS IMAGE().
2086         * libgfortran.h (libgfortran_stat_codes): Add comments.
2087         * options.c (gfc_handle_coarray_option): Add -fcoarray=lib.
2088         * simplify.c (gfc_simplify_num_images, gfc_simplify_this_image):
2089         Handle GFC_FCOARRAY_LIB.
2090         * trans.h (gfc_init_coarray_decl): New prototype.
2091         (gfor_fndecl_caf_init, gfor_fndecl_caf_finalize,
2092         gfor_fndecl_caf_critical, gfor_fndecl_caf_end_critical,
2093         gfor_fndecl_caf_sync_all, gfor_fndecl_caf_sync_images,
2094         gfor_fndecl_caf_error_stop, gfor_fndecl_caf_error_stop_str,
2095         gfort_gvar_caf_num_images, gfort_gvar_caf_this_image):
2096         New global variables.
2097         * trans-decl.c: Declare several CAF functions (cf. above).
2098         (gfc_build_builtin_function_decls): Initialize those.
2099         (gfc_init_coarray_decl): New function.
2100         (create_main_function): Call CAF init/finalize functions.
2101         * trans-intrinsic.c (trans_this_image, trans_num_images): New.
2102         (gfc_conv_intrinsic_function): Call those.
2103         * trans-stmt.c (gfc_trans_stop, gfc_trans_sync, gfc_trans_critical):
2104         Add code for GFC_FCOARRAY_LIB.
2105
2106 2011-03-26  Janus Weil  <janus@gcc.gnu.org>
2107
2108         PR fortran/48291
2109         * class.c (get_unique_hashed_string): Adjust maximum allowable length
2110         for unique type string.
2111
2112 2011-03-25  Kai Tietz  <ktietz@redhat.com>
2113
2114         * scanner.c (preprocessor_line): Use filename_cmp
2115         instead of strcmp.
2116
2117 2011-03-25  Tobias Burnus  <burnus@net-b.de>
2118
2119         PR fortran/48174
2120         PR fortran/45304
2121         * trans-types.c (gfc_get_function_type): Don't use varargs if the
2122         procedure is known to have no arguments.
2123
2124 2011-03-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
2125
2126         PR fortran/22572
2127         * gfortran.h (gfc_option_t) : Add
2128         flag_aggressive_function_elimination.
2129         (gfc_dep_compare_functions):  Add prototype.
2130         * lang.opt: Add faggressive-function-elimination.
2131         * invoke.texi: Document -faggressive-function-elimination.
2132         * frontend_passes (expr_array):  New static variable.
2133         (expr_size):  Likewise.
2134         (expr_count):  Likewise.
2135         (current_code):  Likewise.
2136         (current_ns):  Likewise.
2137         (gfc_run_passes):  Allocate and free space for expressions.
2138         (cfe_register_funcs):  New function.
2139         (create_var):  New function.
2140         (cfc_expr_0):  New function.
2141         (cfe_code):  New function.
2142         (optimize_namespace):  Invoke gfc_code_walker with cfe_code
2143         and cfe_expr_0.
2144         * dependency.c (gfc_dep_compare_functions):  New function.
2145         (gfc_dep_compare_expr):  Use it.
2146         * options.c (gfc_init_options):  Handle
2147         flag_aggressive_function_elimination.
2148         (gfc_handle_option):  Likewise.
2149
2150 2011-03-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2151
2152         * arith.c (arith_power): Plug memory leak.
2153
2154 2011-03-12  Janus Weil  <janus@gcc.gnu.org>
2155
2156         PR fortran/48059
2157         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Replace base type
2158         for polymorphic arguments.
2159
2160 2011-03-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2161
2162         PR fortran/48054
2163         * intrinsic.texi: Clarify doc of logarithm functions.
2164
2165 2011-03-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2166
2167         PR fortran/47552
2168         * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Fix type of
2169         the string length variable.
2170
2171 2011-03-11  Janus Weil  <janus@gcc.gnu.org>
2172
2173         PR fortran/47768
2174         * module.c (ab_attribute,attr_bits): Add AB_PROC_POINTER_COMP.
2175         (mio_symbol_attribute): Handle attribute 'proc_pointer_comp'.
2176
2177 2011-03-06  Paul Thomas  <pault@gcc.gnu.org>
2178             Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2179
2180         PR fortran/47850
2181         * expr.c (gfc_is_constant_expr): Only use gfc_constant_ac if
2182         the expression has an iterator.  Otherwise, iterate through the
2183         array, checking for constant expressions for each element.
2184
2185 2011-03-04  Janne Blomqvist  <jb@gcc.gnu.org>
2186
2187         PR libfortran/47802
2188         * intrinsic.texi: Update CTIME and FDATE documentation.
2189
2190 2011-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2191
2192         * invoke.texi (Option Summary, Fortran Dialect Options)
2193         (Preprocessing Options, Runtime Options, Code Gen Options):
2194         Fix vertical list spacing by using @itemx for additinoal
2195         items, empty line before @table.  Fix typos.
2196
2197 2011-02-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2198
2199         PR fortran/47894
2200         * intrinsic.texi: Fix doc of the VERIFY intrinsic.
2201
2202 2011-02-26  Tobias Burnus  <burnus@net-b.de>
2203
2204         PR fortran/47846
2205         * trans-stmt.c (gfc_trans_allocate): Fix allocation with
2206         type-spec of deferred-length strings.
2207
2208 2011-02-26  Tobias Burnus  <burnus@net-b.de>
2209
2210         PR fortran/47886
2211         * openmp.c (gfc_resolve_omp_directive): Resolve if()
2212         condition of OpenMP's task.
2213
2214 2011-02-26  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2215
2216         PR fortran/47894
2217         * intrinsic.texi: Fix doc of the VERIFY intrinsic.
2218
2219 2011-02-24  Tobias Burnus  <burnus@net-b.de>
2220
2221         PR fortran/47872
2222         * intrinsic.texi (ALLOCATED, ATAN, BESSEL_JN, BESSEL_YN): Add
2223         multitable for linebreak between different syntax variants.
2224
2225 2011-02-24  Richard Guenther  <rguenther@suse.de>
2226
2227         PR fortran/47839
2228         * f95-lang.c (pushdecl): For externs in non-global scope push
2229         a copy of the decl into the BLOCK.
2230
2231 2011-02-23  Mikael Morin  <mikael@gcc.gnu.org>
2232
2233         PR fortran/40850
2234         * trans.c (gfc_prepend_expr_to_block): New function.
2235         * trans.h (gfc_prepend_expr_to_block): Declare.
2236         * trans-array.c (gfc_conv_array_parameter): Replace
2237         gfc_add_expr_to_block with gfc_prepend_expr_to_block.
2238
2239 2011-02-22  Paul Thomas  <pault@gcc.gnu.org>
2240
2241         PR fortran/45743
2242         * trans-decl.c (gfc_get_extern_function_decl): Don't use the
2243         gsymbol backend_decl if the procedure has a formal argument
2244         that is a procedure.
2245
2246 2011-02-22  Tobias Burnus  <burnus@net-b.de>
2247
2248         PR fortran/41359
2249         * trans-stmt.c (gfc_trans_if_1): Use correct line for
2250         expressions in the if condition.
2251
2252 2011-02-20  Tobias Burnus  <burnus@net-b.de>
2253
2254         PR fortran/47797
2255         * trans-decl.c (gfc_trans_deferred_vars): Use gfc_set_backend_locus and
2256         gfc_restore_backend_locus to have better debug locations.
2257         * trans-array.c (gfc_trans_deferred_array): Ditto.
2258
2259 2011-02-20  Paul Thomas  <pault@gcc.gnu.org>
2260
2261         PR fortran/45077
2262         PR fortran/44945
2263         * trans-types.c (gfc_get_derived_type): Remove code that looks
2264         for decls in gsym and add call to gfc_get_module_backend_decl.
2265         * trans.h : Add prototype for gfc_get_module_backend_decl.
2266         * trans-decl.c (gfc_get_module_backend_decl): New function.
2267         (gfc_get_symbol_decl): Call it.
2268
2269 2011-02-19  Paul Thomas  <pault@gcc.gnu.org>
2270
2271         PR fortran/47348
2272         * trans-array.c (get_array_ctor_all_strlen): Move up in file.
2273         (get_array_ctor_var_strlen): Add block dummy and add call to
2274         get_array_ctor_all_strlen instead of giving up on substrings.
2275         Call gcc_unreachable for default case.
2276         (get_array_ctor_strlen): Add extra argument to in call to
2277         get_array_ctor_var_strlen.
2278
2279 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
2280
2281         PR fortran/47789
2282         * primary.c (gfc_match_structure_constructor): Handle empty parent
2283         types.
2284
2285 2011-02-18  Tobias Burnus
2286
2287         PR fortran/47775
2288         * trans-expr.c (arrayfunc_assign_needs_temporary): Use
2289         esym to check whether the specific procedure returns an
2290         allocatable or pointer.
2291
2292 2011-02-18  Michael Matz  <matz@suse.de>
2293
2294         PR fortran/45586
2295         * gfortran.h (struct gfc_component): Add norestrict_decl member.
2296         * trans.h (struct lang_type): Add nonrestricted_type member.
2297         * trans-expr.c (gfc_conv_component_ref): Search fields with correct
2298         parent type.
2299         * trans-types.c (mirror_fields, gfc_nonrestricted_type): New.
2300         (gfc_sym_type): Use it.
2301
2302 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
2303
2304         PR fortran/47768
2305         * resolve.c (resolve_transfer): Reject variables with procedure pointer
2306         components.
2307
2308 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
2309
2310         PR fortran/47767
2311         * gfortran.h (gfc_check_access): Removed prototype.
2312         (gfc_check_symbol_access): Added prototype.
2313         * module.c (gfc_check_access): Renamed to 'check_access', made static.
2314         (gfc_check_symbol_access): New function, basically a shortcut for
2315         'check_access'.
2316         (write_dt_extensions,write_symbol0,write_generic,write_symtree): Use
2317         'gfc_check_symbol_access'.
2318         (write_operator,write_module): Renamed 'gfc_check_access'.
2319         * resolve.c (resolve_fl_procedure,resolve_fl_derived,
2320         resolve_fl_namelist,resolve_symbol,resolve_fntype): Use
2321         'gfc_check_symbol_access'.
2322
2323 2011-02-16  Janus Weil  <janus@gcc.gnu.org>
2324
2325         PR fortran/47745
2326         * class.c (gfc_build_class_symbol): Set 'class_ok' attribute.
2327         * decl.c (build_sym,attr_decl1): Move setting of 'class_ok' into
2328         'gfc_build_class_symbol'.
2329         (gfc_match_decl_type_spec): Reject unlimited polymorphism.
2330         * interface.c (matching_typebound_op): Check for 'class_ok' attribute.
2331         * match.c (select_type_set_tmp): Move setting of 'class_ok' into
2332         'gfc_build_class_symbol'.
2333         * primary.c (gfc_variable_attr): Check for 'class_ok' attribute.
2334
2335 2011-02-15  Steven G. Kargl  <kargl@gcc.gnu.org>
2336
2337         PR fortran/47633
2338         . simplify.c (gfc_simplify_compiler_version): Fix off-by-one issue.
2339
2340 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
2341
2342         PR fortran/47730
2343         * parse.c (gfc_build_block_ns): Commit 'block@' symbol.
2344
2345 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
2346
2347         PR fortran/47728
2348         * class.c (gfc_build_class_symbol): Give a fatal error on polymorphic
2349         arrays.
2350         * primary.c (gfc_match_varspec): Avoid ICE for invalid class
2351         declaration.
2352
2353 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
2354
2355         PR fortran/47349
2356         * interface.c (get_expr_storage_size): Handle derived-type components.
2357
2358 2011-02-13  Tobias Burnus  <burnus@net-b.de>
2359
2360         PR fortran/47569
2361         * interface.c (compare_parameter): Avoid ICE with
2362         character components.
2363
2364 2011-02-12  Janus Weil  <janus@gcc.gnu.org>
2365
2366         * class.c (gfc_build_class_symbol): Reject polymorphic arrays.
2367         * decl.c (build_sym,build_struct,attr_decl1): Use return value of
2368         'gfc_build_class_symbol'.
2369
2370 2011-02-12  Michael Matz  <matz@suse.de>
2371             Janus Weil  <janus@gcc.gnu.org>
2372             Tobias Burnus  <burnus@net-b.de>
2373
2374         PR fortran/45586
2375         * trans-expr.c (conv_parent_component_references): Avoid unintendent
2376         skipping of parent compounds.
2377
2378 2011-02-11  Tobias Burnus  <burnus@net-b.de>
2379
2380         PR fortran/47550
2381         * resolve.c (resolve_formal_arglist): PURE with VALUE
2382         and no INTENT: Add -std= diagnostics.
2383
2384 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
2385
2386         PR fortran/47352
2387         * resolve.c (resolve_procedure_interface): If interface has a result
2388         variable, copy the typespec and set result pointer to self.
2389
2390 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
2391
2392         PR fortran/47463
2393         * resolve.c (resolve_typebound_subroutine): Remove erroneous line.
2394
2395 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
2396
2397         PR fortran/47637
2398         * trans-decl.c (init_intent_out_dt): Handle CLASS arguments.
2399
2400 2011-02-08  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2401
2402         * io.c (match_io_element): Do not set dt if not inquire.
2403
2404 2011-02-08  Janus Weil  <janus@gcc.gnu.org>
2405
2406         PR fortran/45290
2407         * expr.c (gfc_check_assign_symbol): Reject pointers as pointer
2408         initialization target.
2409
2410 2011-02-07  Janne Blomqvist  <jb@gcc.gnu.org>
2411             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2412
2413         * gfortran.texi (Thread-safety): texinfo styling fixes.
2414         * intrinsic.texi: Likewise.
2415
2416 2011-02-06  Janne Blomqvist  <jb@gcc.gnu.org>
2417
2418         * gfortran.texi (Compiler Characteristics): Add reference to
2419         thread-safety section.
2420
2421 2011-02-06  Janne Blomqvist  <jb@gcc.gnu.org>
2422
2423         * gfortran.texi (Thread-safety): New section.
2424         * intrinsic.texi (EXECUTE_COMMAND_LINE): Mention thread-safety.
2425         (GETENV): Likewise.
2426         (GET_ENVIRONMENT_VARIABLE): Likewise.
2427         (SYSTEM): Likewise.
2428
2429 2011-02-06  Paul Thomas  <pault@gcc.gnu.org>
2430
2431         PR fortran/47592
2432         * trans-stmt.c (gfc_trans_allocate): For deferred character
2433         length allocations with SOURCE, store to the values and string
2434         length to avoid calculating twice.  Replace gfc_start_block
2435         with gfc_init_block to avoid unnecessary contexts and to keep
2436         declarations of temporaries where they should be. Tidy up the
2437         code a bit.
2438
2439 2011-02-05  Janne Blomqvist  <jb@gcc.gnu.org>
2440
2441         PR fortran/42434
2442         * intrinsic.texi (SYSTEM_CLOCK): Update documentation.
2443
2444 2011-02-02  Janus Weil  <janus@gcc.gnu.org>
2445             Paul Thomas  <pault@gcc.gnu.org>
2446
2447         PR fortran/47082
2448         * trans-expr.c (gfc_trans_class_init_assign): Add call to
2449         gfc_get_derived_type.
2450         * module.c (read_cleanup): Do not use unique_symtrees for vtabs
2451         or vtypes.
2452
2453 2011-02-02  Janus Weil  <janus@gcc.gnu.org>
2454
2455         PR fortran/47572
2456         * resolve.c (resolve_fl_variable): Handle polymorphic allocatables.
2457
2458 2011-02-01  Janus Weil  <janus@gcc.gnu.org>
2459
2460         PR fortran/47565
2461         * trans-expr.c (gfc_conv_structure): Handle constructors for procedure
2462         pointer components with allocatable result.
2463
2464 2011-01-31  Janus Weil  <janus@gcc.gnu.org>
2465
2466         PR fortran/47455
2467         * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointers
2468         with pointer or allocatable result.
2469
2470 2011-01-31  Paul Thomas  <pault@gcc.gnu.org>
2471
2472         PR fortran/47519
2473         * trans-stmt.c (gfc_trans_allocate): Improve handling of
2474         deferred character lengths with SOURCE.
2475         * iresolve.c (gfc_resolve_repeat): Calculate character
2476         length from source length and ncopies.
2477         * dump-parse-tree.c (show_code_node): Show MOLD and SOURCE
2478         expressions for ALLOCATE.
2479
2480 2011-01-31  Janus Weil  <janus@gcc.gnu.org>
2481
2482         PR fortran/47463
2483         * resolve.c (resolve_typebound_subroutine): Bug fix for the case of
2484         an argument of a typebound assignment being a component.
2485
2486 2011-01-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2487
2488         * gfortranspec.c (add_arg_libgfortran) [HAVE_LD_STATIC_DYNAMIC] Use
2489         LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
2490
2491 2011-01-31  Tobias Burnus  <burnus@net-b.de>
2492
2493         PR fortran/47042
2494         * resolve.c (resolve_fl_procedure): Reject stmt functions
2495         with pointer/allocatable attribute.
2496
2497 2011-01-31  Tobias Burnus  <burnus@net-b.de>
2498
2499         PR fortran/47042
2500         * interface.c (gfc_procedure_use): Add explicit interface check for
2501         pointer/allocatable functions.
2502
2503 2011-01-30  Paul Thomas  <pault@gcc.gnu.org>
2504
2505         PR fortran/47523
2506         * trans-expr.c (gfc_trans_assignment_1): If the rhs is an op
2507         expr and is assigned to a deferred character length scalar,
2508         make sure that the function is called before reallocation,
2509         so that the length is available. Include procedure pointer
2510         and procedure pointer component rhs as well.
2511
2512         PR fortran/45170
2513         PR fortran/35810
2514         PR fortran/47350
2515         * gfortran.dg/allocatable_function_5.f90: New test not added by
2516         mistake on 2011-01-28.
2517
2518 2011-01-29  Tobias Burnus  <burnus@net-b.de>
2519
2520         PR fortran/47531
2521         * check.c (gfc_check_shape): Support kind argument in SHAPE.
2522         * intrinsic.c (add_functions): Ditto.
2523         * resolve.c (gfc_resolve_shape): Ditto.
2524         * simplify.c (gfc_simplify_shape): Ditto.
2525         * intrinsic.h (gfc_check_shape, gfc_resolve_shape,
2526         gfc_simplify_shape): Update prototypes.
2527         * intrinisc.text (SHAPE): Document kind argument.
2528
2529 2011-01-28  Tobias Burnus  <burnus@net-b.de>
2530
2531         PR fortran/47507
2532         * resolve.c (resolve_formal_arglist): Allow arguments with VALUE
2533         attribute also without INTENT.
2534
2535 2011-01-28  Tobias Burnus  <burnus@net-b.de>
2536
2537         * gfortran.texi (Fortran 2003 status): Mention support for
2538         nonconstant namelist variables.
2539
2540 2011-01-28  Paul Thomas  <pault@gcc.gnu.org>
2541             Tobias Burnus  <burnus@gcc.gnu.org>
2542
2543         PR fortran/45170
2544         PR fortran/35810
2545         PR fortran/47350
2546         * interface.c (compare_actual_formal): An allocatable or pointer
2547         deferred length actual is only allowed if the formal argument
2548         is also deferred length. Clean up whitespace.
2549         * trans-expr.c (gfc_conv_procedure_call): Pass string length for
2550         deferred character length formal arguments by reference. Do the
2551         same for function results.
2552         (gfc_trans_pointer_assignment): Do not do runtime check of lhs
2553         and rhs character lengths, if deferred length lhs.  In this case
2554         set the lhs character length to that of the rhs.
2555         (gfc_conv_string_parameter): Remove assert that string length is
2556         an integer type.
2557         (is_scalar_reallocatable_lhs): New function.
2558         (alloc_scalar_allocatable_for_assignment): New function.
2559         (gfc_trans_assignment_1): Call above new function. If the rhs is
2560         a deferred character length itself, makes ure that the function
2561         is called before reallocation, so that the length is available.
2562         (gfc_trans_asssignment): Remove error about assignment to
2563         deferred length character variables.
2564         * gfortran.texi : Update entry about (re)allocation on
2565         assignment.
2566         * trans-stmt.c (gfc_trans_allocate): Add code to handle deferred
2567         length character variables.
2568         * module.c (mio_typespec): Transfer deferred characteristic.
2569         * trans-types.c (gfc_get_function_type): New code to generate
2570         hidden typelist, so that those character lengths that are
2571         passed by reference get the right type.
2572         * resolve.c (resolve_contained_fntype): Supress error for
2573         deferred character length functions.
2574         (resolve_function, resolve_fl_procedure) The same.
2575         (check_symbols): Remove the error that support for
2576         entity with deferred type parameter is not yet implemented.
2577         (resolve_fl_derived): The same.
2578         match.c (alloc_opt_list): Allow MOLD for deferred length object.
2579         * trans-decl.c (gfc_get_symbol_decl): For deferred character
2580         length dummies, generate a local variable for string length.
2581         (create_function_arglist): Hidden length can be a pointer.
2582         (gfc_trans_deferred_vars): For deferred character length
2583         results and dummies, assign the string length to the local
2584         variable from the hidden argument on entry and the other way
2585         round on exit, as appropriate.
2586
2587 2011-01-27  Tobias Burnus  <burnus@net-b.de>
2588
2589         PR fortran/47474
2590         * trans-decl.c (gfc_generate_function_code): Fix init
2591         of allocatable result variable with allocatable components.
2592
2593 2011-01-27  Tobias Burnus  <burnus@net-b.de>
2594
2595         PR fortran/47472
2596         * options.c (gfc_handle_module_path_options): Save
2597         module path without trailing slash as include path.
2598
2599 2011-01-25  Tobias Burnus  <burnus@net-b.de>
2600
2601         PR fortran/47448
2602         * interface.c (gfc_check_operator_interface): Fix
2603         defined-assignment check.
2604
2605 2011-01-23  Tobias Burnus  <burnus@net-b.de>
2606
2607         PR fortran/47421
2608         * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
2609         scalar allocatable dummy arguments.
2610
2611 2011-01-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
2612
2613         PR fortran/38536
2614         * resolve.c (gfc_iso_c_func_interface):  For C_LOC,
2615         check for array sections followed by component references
2616         which are illegal.  Also check for coindexed arguments.
2617
2618 2011-01-22  Tobias Burnus  <burnus@net-b.de>
2619
2620         PR fortran/47399
2621         * primary.c (gfc_match_varspec): Relax gcc_assert to allow for
2622         PARAMETER TBP.
2623
2624 2011-01-21  Tobias Burnus  <burnus@net-b.de>
2625
2626         PR fortran/47394
2627         * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check):
2628         Use defined instead of magic number exit status codes.
2629         * scanner.c (include_line, gfc_new_file): Ditto.
2630
2631 2011-01-21  Tobias Burnus  <burnus@net-b.de>
2632
2633         PR fortran/47377
2634         * expr.c (gfc_check_pointer_assign): Reject expr data-targets
2635         without pointer attribute.
2636
2637 2011-01-18  Janus Weil  <janus@gcc.gnu.org>
2638
2639         PR fortran/47240
2640         * resolve.c (expression_rank): Fix rank of procedure poiner components.
2641         * trans-expr.c (gfc_conv_procedure_call): Take care of procedure
2642         pointer components as actual arguments.
2643
2644 2011-01-17  Jakub Jelinek  <jakub@redhat.com>
2645
2646         PR fortran/47331
2647         * gfortran.h (struct gfc_omp_saved_state): New type.
2648         (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New prototypes.
2649         * resolve.c (resolve_global_procedure): Call it around gfc_resolve
2650         call.
2651         * openmp.c (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New
2652         functions.
2653
2654 2011-01-17  Tobias Burnus  <burnus@net-b.de>
2655
2656         PR fortran/47327
2657         * invoke.texi (Options to request or suppress errors
2658         and warnings): Fix cross link.
2659
2660 2011-01-15  Tobias Burnus  <burnus@net-b.de>
2661
2662         * gfortran.texi: Update Fortran 2003 Status section.
2663
2664         PR fortran/47177
2665         * invoke.texi: Add missing "-E" to the -dM example.
2666
2667 2011-01-13  Tobias Burnus  <burnus@net-b.de>
2668
2669         PR fortran/47268
2670         * intrinsic.texi (get_command_argument, get_environment_variable):
2671         Mark arguments as optional in the Arguments section.
2672
2673 2011-01-13  Kai Tietz  <kai.tietz@onevision.com>
2674             Tobias Burnus  <burnus@net-b.de>
2675
2676         PR fortran/47260
2677         * trans-decl.c (gfc_get_extern_function_decl,
2678         build_function_decl): Set TREE_PUBLIC/TREE_EXTERNAL before
2679         calling decl_attributes.
2680
2681 2011-01-13  Tobias Burnus  <burnus@net-b.de>
2682             Mikael Morin  <mikael@gcc.gnu.org>
2683
2684         PR fortran/45848
2685         PR fortran/47204
2686         * gfortran.h (gfc_code): Move union ext's case_list into
2687         the struct block.
2688         * dump-parse-tree.c (show_code_node): Adapt by prefixing case_list
2689         by "block.".
2690         * frontend-passes.c (gfc_code_walker): Ditto.
2691         * match.c (gfc_match_goto, gfc_match_call, gfc_match_case,
2692         gfc_match_type_is, gfc_match_class_is): Ditto.
2693         * resolve.c (resolve_select, resolve_select_type): Ditto.
2694         * st.c (gfc_free_statement): Ditto.
2695         * trans-stmt.c (gfc_trans_integer_select, gfc_trans_logical_select,
2696         gfc_trans_character_select): Ditto.
2697         * parse.c (resolve_all_program_units): For error recovery, avoid
2698         segfault is proc_name is NULL.
2699
2700 2011-01-11  Paul Thomas  <pault@gcc.gnu.org>
2701
2702         PR fortran/47051
2703         * trans-array.c (gfc_alloc_allocatable_for_assignment): Change
2704         to be standard compliant by testing for shape rather than size
2705         before skipping reallocation. Improve comments.
2706
2707 2011-01-09  Janus Weil  <janus@gcc.gnu.org>
2708
2709         PR fortran/47224
2710         * resolve.c (resolve_actual_arglist): Remove unneeded and buggy piece
2711         of code.
2712
2713 2011-01-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
2714
2715         PR fortran/38536
2716         * resolve.c (is_scalar_expr_ptr):  For a substring reference,
2717         use gfc_dep_compare_expr to compare start and end expession.
2718         Add FIXME for using gfc_deb_compare_expr elsewhere.
2719
2720 2011-01-09  Janus Weil  <janus@gcc.gnu.org>
2721
2722         PR fortran/46313
2723         * class.c (get_unique_type_string): Make type name start with upper
2724         case letter.
2725
2726 2011-01-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
2727
2728         PR fortran/46405
2729         * invoke.texi:  Mention -ffree-line-length-none and
2730         -ffixed-line-length-none for preprocessing.
2731
2732 2011-01-08  Paul Thomas  <pault@gcc.gnu.org>
2733
2734         PR fortran/46896
2735         * trans-expr.c (gfc_conv_procedure_call): With a non-copying
2736         procedure argument (eg TRANSPOSE) use a temporary if there is
2737         any chance of aliasing due to host or use association.
2738         (arrayfunc_assign_needs_temporary): Correct logic for function
2739         results and do not use a temporary for implicitly PURE
2740         variables.  Use a temporary for Cray pointees.
2741         * symbol.c (gfc_add_save): Explicit SAVE not compatible with
2742         implicit pureness of containing procedure.
2743         * decl.c (match_old_style_init, gfc_match_data): Where decl
2744         would fail in PURE procedure, set implicit_pure to zero.
2745         * gfortran.h : Add implicit_pure to structure symbol_attr and
2746         add prototype for function gfc_implicit_pure.
2747         * expr.c (gfc_check_pointer_assign, gfc_check_vardef_context):
2748         Where decl would fail in PURE procedure, reset implicit_pure.
2749         * io.c (match_vtag, gfc_match_open, gfc_match_close,
2750         gfc_match_print, gfc_match_inquire, gfc_match_wait): The same.
2751         * match.c (gfc_match_critical, gfc_match_stopcode,
2752         sync_statement, gfc_match_allocate, gfc_match_deallocate): The
2753         same.
2754         * parse.c (decode_omp_directive): The same.
2755         (parse_contained): If not PURE, set implicit pure attribute.
2756         * resolve.c (resolve_formal_arglist, resolve_structure_cons,
2757         resolve_function, resolve_ordinary_assign) : The same.
2758         (gfc_implicit_pure): New function.
2759         * module.c (mio_symbol_attribute): Introduce AB_IMPLICIT_PURE
2760         to ab_attribute enum and use it in this function.
2761
2762 2011-01-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
2763
2764         PR fortran/45777
2765         * symbol.c (gfc_symbols_could_alias):  Strip gfc_ prefix,
2766         make static and move in front of its only caller, to ...
2767         * trans-array.c (symbols_could_alias): ... here.
2768         Pass information about pointer and target status as
2769         arguments.  Allocatable arrays don't alias anything
2770         unless they have the POINTER attribute.
2771         (gfc_could_be_alias):  Keep track of pointer and target
2772         status when following references.  Also check if typespecs
2773         of components match those of other components or symbols.
2774
2775 2011-01-07  Tobias Burnus  <burnus@net-b.de>
2776
2777         PR fortran/41580
2778         * class.c (gfc_build_class_symbol): Mark __vtab as attr.vtab.
2779         * intrinsic.c (add_functions): Use simplify functions for
2780         EXTENDS_TYPE_OF and SAME_TYPE_AS.
2781         * intrinsic.h (gfc_simplify_extends_type_of,
2782         gfc_simplify_same_type_as): New prototypes.
2783         * simplify.c (is_last_ref_vtab, gfc_simplify_extends_type_of,
2784         gfc_simplify_same_type_as): New functions.
2785
2786 2011-01-07  Janus Weil  <janus@gcc.gnu.org>
2787
2788         PR fortran/47189
2789         PR fortran/47194
2790         * gfortran.h (gfc_lval_expr_from_sym): Moved prototype.
2791         * class.c (gfc_class_null_initializer): Initialize _vptr to declared
2792         type.
2793         * expr.c (gfc_lval_expr_from_sym): Moved here from symbol.c.
2794         * resolve.c (resolve_deallocate_expr): _data component will be added
2795         at translation stage.
2796         * symbol.c (gfc_lval_expr_from_sym): Moved to expr.c.
2797         * trans-stmt.c (gfc_trans_deallocate): Reset _vptr to declared type.
2798
2799 2011-01-06  Daniel Franke  <franke.daniel@gmail.com>
2800
2801         PR fortran/33117
2802         PR fortran/46478
2803         * parse.c (parse_interface): Remove check for procedure types.
2804         * interface.c (check_interface0): Verify that procedures are
2805         either all SUBROUTINEs or all FUNCTIONs.
2806
2807 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
2808
2809         PR fortran/47180
2810         * trans-expr.c (gfc_trans_class_assign): Bugfix for r168524 (make sure
2811         'vtab' is initialized).
2812
2813 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
2814
2815         PR fortran/47180
2816         * trans-expr.c (gfc_trans_class_assign): For a polymorphic NULL pointer
2817         assignment, set the _vptr component to the declared type.
2818
2819 2011-01-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
2820
2821         PR fortran/46017
2822         * resolve.c (resolve_allocate_deallocate): Follow references to
2823         check for duplicate occurence of allocation/deallocation objects.
2824
2825 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
2826
2827         PR fortran/47024
2828         * trans-decl.c (gfc_trans_deferred_vars): Initialize the _vpr component
2829         of polymorphic allocatables according to their declared type.
2830
2831 2011-01-04  Janus Weil  <janus@gcc.gnu.org>
2832
2833         PR fortran/46448
2834         * class.c (gfc_find_derived_vtab): Set the module field for the copying
2835         routine to make sure it receives module name mangling.
2836
2837 2011-01-03  Jakub Jelinek  <jakub@redhat.com>
2838
2839         * gfortranspec.c (lang_specific_driver): Update copyright notice
2840         dates.
2841
2842 2011-01-03  Janus Weil  <janus@gcc.gnu.org>
2843
2844         * intrinsic.texi (LEADZ): Fix example.
2845
2846 2011-01-02  Janus Weil  <janus@gcc.gnu.org>
2847
2848         PR fortran/46408
2849         * class.c (gfc_find_derived_vtab): Use EXEC_INIT_ASSIGN for __copy_
2850         routine.
2851
2852 \f
2853 Copyright (C) 2011 Free Software Foundation, Inc.
2854
2855 Copying and distribution of this file, with or without modification,
2856 are permitted in any medium without royalty provided the copyright
2857 notice and this notice are preserved.