OSDN Git Service

2010-08-15 Tobias Burnus <burnus@net-b.de>
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2010-08-15  Tobias Burnus  <burnus@net-b.de>
2
3         * trans-expr.c (gfc_conv_expr_present): Regard nullified
4         pointer arrays as absent.
5         (gfc_conv_procedure_call): Handle EXPR_NULL for non-pointer
6         dummys as absent argument.
7         * interface.c (compare_actual_formal,compare_parameter):
8         Ditto.
9
10 2010-08-15  Tobias Burnus  <burnus@net-b.de>
11
12         * interface.c (compare_pointer, ): Allow passing TARGETs to pointers
13         dummies with intent(in).
14
15 2010-08-15  Daniel Kraft  <d@domob.eu>
16
17         PR fortran/45197
18         * decl.c (gfc_match_prefix): Match IMPURE prefix and mark ELEMENTAL
19         routines not IMPURE also as PURE.
20         * intrinsic.c (enum klass): New class `CLASS_PURE' and renamed
21         `NO_CLASS' in `CLASS_IMPURE'.
22         (add_sym): Set symbol-attributes `pure' and `elemental' correctly.
23         (add_sym_0s): Renamed `NO_CLASS' in `CLASS_IMPURE'.
24         (add_functions): Ditto.
25         (add_subroutines): Ditto and mark `MOVE_ALLOC' as CLASS_PURE.
26         * resolve.c (gfc_pure): Do not treat ELEMENTAL as automatically PURE.
27         (resolve_formal_arglist): Check that arguments to ELEMENTAL procedures
28         are not ALLOCATABLE and have their INTENT specified.
29
30 2010-08-13  Daniel Kraft  <d@domob.eu>
31
32         * gfortran.h (array_type): New type `AS_IMPLIED_SHAPE'.
33         * array.c (gfc_match_array_spec): Match implied-shape specification and
34         handle AS_IMPLIED_SHAPE correctly otherwise.
35         * decl.c (add_init_expr_to_sym): Set upper bounds for implied-shape.
36         (variable_decl): Some checks for implied-shape declaration.
37         * resolve.c (resolve_symbol): Assert that array-spec is no longer
38         AS_IMPLIED_SHAPE in any case.
39
40 2010-08-12  Joseph Myers  <joseph@codesourcery.com>
41
42         * lang.opt (MD, MMD): Change to MDX and MMDX.
43         * cpp.c (gfc_cpp_handle_option): Use OPT_MMD and OPT_MMDX.
44
45 2010-08-11  Janus Weil  <janus@gcc.gnu.org>
46
47         PR fortran/44595
48         * intrinsic.c (gfc_current_intrinsic_arg): Change type from 'char' to
49         'gfc_intrinsic_arg'.
50         (check_arglist,check_specific): Add reference to 'name' field.
51         (init_arglist): Remove reference to 'name' field.
52         * intrinsic.h (gfc_current_intrinsic_arg): Modify prototype.
53         * check.c (variable_check): Reverse order of checks. Respect intent of
54         formal arg.
55         (int_or_proc_check): New function.
56         (coarray_check): New function.
57         (allocatable_check): New function.
58         (gfc_check_allocated,gfc_check_move_alloc): Use 'allocatable_check'.
59         (gfc_check_complex): Use 'int_or_real_check'.
60         (gfc_check_lcobound,gfc_check_image_index,gfc_check_this_image,
61         gfc_check_ucobound): Use 'coarray_check'.
62         (gfc_check_pack): Use 'real_or_complex_check'.
63         (gfc_check_alarm_sub,gfc_check_signal,gfc_check_signal_sub): Use
64         'int_or_proc_check'.
65         (scalar_check,type_check,numeric_check,int_or_real_check,
66         real_or_complex_check,kind_check,double_check,logical_array_check,
67         array_check,same_type_check,rank_check,nonoptional_check,
68         kind_value_check,gfc_check_a_p,gfc_check_associated,gfc_check_cmplx,
69         gfc_check_cshift,gfc_check_dcmplx,gfc_check_dot_product,gfc_check_dprod,
70         gfc_check_eoshift,gfc_check_fn_rc2008,gfc_check_index,gfc_check_kind,
71         gfc_check_matmul,gfc_check_minloc_maxloc,check_reduction,gfc_check_null,
72         gfc_check_present,gfc_check_reshape,gfc_check_same_type_as,
73         gfc_check_spread,gfc_check_unpack,gfc_check_random_seed,
74         gfc_check_getarg,gfc_check_and,gfc_check_storage_size): Add reference
75         to 'name' field.
76
77 2010-08-10  Daniel Kraft  <d@domob.eu>
78
79         * gfortran.texi (Interoperability with C): Fix ordering in menu
80         and add new subsection about pointers.
81         (Interoperable Subroutines and Functions): Split off the pointer part.
82         (working with Pointers): New subsection with extended discussion
83         of pointers (especially procedure pointers).
84
85 2010-08-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
86
87         PR fortran/44235
88         * array.c (gfc_ref_dimen_size):  Add end argument.
89         If end is non-NULL, calculate it.
90         (ref_size):  Adjust call to gfc_ref_dimen_size.
91         (gfc_array_dimen_size):  Likewise.
92         (gfc_array_res_shape):  Likewise.
93         * gfortran.h:  Adjust prototype for gfc_ref_dimen_size.
94         * resolve.c (resolve_array_ref):  For stride not equal to -1,
95         fill in the lowest possible end.
96
97 2010-08-09  Janus Weil  <janus@gcc.gnu.org>
98
99         * intrinsic.texi: Correct documentation of ASINH, ACOSH and ATANH.
100
101 2010-08-07  Nathan Froyd  <froydnj@codesourcery.com>
102
103         * interface.c (compare_actual_formal): Use XALLOCAVEC instead of
104         alloca.
105         (check_some_aliasing): Likewise.
106         * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Likewise.
107         (gfc_conv_intrinsic_int): Likewise.
108         (gfc_conv_intrinsic_lib_function): Likewise.
109         (gfc_conv_intrinsic_cmplx): Likewise.
110         (gfc_conv_intrinsic_ctime): Likewise.
111         (gfc_conv_intrinsic_fdate): Likewise.
112         (gfc_conv_intrinsic_ttynam): Likewise.
113         (gfc_conv_intrinsic_minmax): Likewise.
114         (gfc_conv_intrinsic_minmax_char): Likewise.
115         (gfc_conv_intrinsic_ishftc): Likewise.
116         (gfc_conv_intrinsic_index_scan_verify): Likewise.
117         (gfc_conv_intrinsic_merge): Likewise.
118         (gfc_conv_intrinsic_trim): Likewise.
119         * trans.c (gfc_trans_runtime_error_vararg): Likewise.
120
121 2010-08-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
122
123         PR fortran/45159
124         * dependency.c (check_section_vs_section):  Handle cases where
125         the start expression coincides with the lower or upper
126         bound of the array.
127
128 2010-08-04  Janus Weil  <janus@gcc.gnu.org>
129
130         PR fortran/42207
131         PR fortran/44064
132         PR fortran/44065
133         * class.c (gfc_find_derived_vtab): Do not generate vtabs for class
134         container types. Do not artificially increase refs. Commit symbols one
135         by one.
136         * interface.c (compare_parameter): Make sure vtabs are present before
137         generating module variables.
138         * resolve.c (resolve_allocate_expr): Ditto.
139
140 2010-08-04  Tobias Burnus  <burnus@net-b.de>
141
142         PR fortran/45183
143         PR fortran/44857
144         * resolve.c (resolve_structure_cons): Fix
145         freeing of charlen.
146
147 2010-08-04  Mikael Morin  <mikael@gcc.gnu.org>
148
149         PR fortran/42051
150         PR fortran/44064
151         * symbol.c (changed_syms): Made static again.
152         (gfc_symbol_state): Don't conditionalize on GFC_DEBUG. 
153         Changed conditional internal error into assert.
154         Rename function to ...
155         (gfc_enforce_clean_symbol_state): ... this.
156         * gfortran.h (gfc_symbol_state, gfc_enforce_clean_symbol_state): 
157         Rename the former to the latter.
158         * parse.c (decode_statement, decode_omp_directive,
159         decode_gcc_attribute): Update callers accordingly. Don't conditionalize
160         on GFC_DEBUG.
161         (changed_syms): Remove declaration.
162         (next_statement): Use gfc_enforce_clean_symbol_state.
163
164 2010-08-04  Tobias Burnus  <burnus@net-b.de>
165
166         PR fortran/44857
167         * resolve.c (resolve_structure_cons): Fix handling of
168         initialization structure constructors with character
169         elements of the wrong length.
170         * array.c (gfc_check_iter_variable): Add NULL check.
171         (gfc_resolve_character_array_constructor): Also truncate
172         character length.
173
174 2010-08-04  Tobias Burnus  <burnus@net-b.de>
175
176         * trans-io.c (gfc_build_io_library_fndecls): Fix return
177         value of some libgfortran functions.
178
179 2010-08-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
180
181         PR fortran/45159
182         * dependency.c (gfc_deb_compare_expr):  Remove any integer
183         conversion functions to larger types from both arguments.
184         Remove handling these functions futher down.
185
186 2010-08-03  Janus Weil  <janus@gcc.gnu.org>
187
188         PR fortran/44584
189         PR fortran/45161
190         * class.c (add_procs_to_declared_vtab1): Don't add erroneous procedures.
191         * resolve.c (resolve_tb_generic_targets): Check for errors.
192
193 2010-08-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
194
195         PR fortran/45159
196         * depencency.c (gfc_dep_resolver):  Fix logic for when a loop
197         can be reversed.
198
199 2010-08-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
200
201         PR fortran/36854
202         * dependency.h:  Add prototype for gfc_are_identical_variables.
203         * frontend-passes.c:  Include depencency.h.
204         (optimimize_equality):  Use gfc_are_identical_variables.
205         * dependency.c (identical_array_ref): New function.
206         (gfc_are_identical_variables):  New function.
207         (gfc_deb_compare_expr):  Use gfc_are_identical_variables.
208         * dependency.c (gfc_check_section_vs_section).  Rename gfc_
209         prefix from statc function.
210         (check_section_vs_section): Change arguments to gfc_array_ref,
211         adjust function body accordingly.
212
213 2010-08-02  Mikael Morin  <mikael@gcc.gnu.org>
214             Janus Weil  <janus@gcc.gnu.org>
215
216         PR fortran/42051
217         PR fortran/44064
218         PR fortran/45151
219         * intrinsic.c (gfc_get_intrinsic_sub_symbol): Commit changed symbol. 
220         * symbol.c (gen_cptr_param, gen_fptr_param, gen_shape_param,
221         gfc_copy_formal_args, gfc_copy_formal_args_intr,
222         gfc_copy_formal_args_ppc, generate_isocbinding_symbol): Ditto.
223         * parse.c (parse_derived_contains, parse_spec, parse_progunit): 
224         Call reject_statement in case of error. 
225         (match_deferred_characteritics): Call gfc_undo_symbols in case match
226         fails.
227
228 2010-08-01  Janus Weil  <janus@gcc.gnu.org>
229
230         PR fortran/44912
231         * class.c (gfc_build_class_symbol): Make '$vptr' component private.
232         (gfc_find_derived_vtab): Make vtabs and vtypes public.
233         * module.c (read_module): When reading module files, always import
234         vtab and vtype symbols.
235
236 2010-07-31  Mikael Morin  <mikael@gcc.gnu.org>
237
238         PR fortran/42051
239         PR fortran/44064
240         * symbol.c (changed_syms): Made non-static.
241         * parse.c (changed_syms): Declare new external. 
242         (next_statement): Assert changed_syms is NULL at the beginning.
243
244 2010-07-30  Janus Weil  <janus@gcc.gnu.org>
245             Steven G. Kargl  <kargl@gcc.gnu.org>
246
247         PR fortran/44929
248         * match.c (match_type_spec): Try to parse derived types before
249         intrinsic types.
250
251 2010-07-30  Mikael Morin  <mikael@gcc.gnu.org>
252
253         * gfortran.h (gfc_release_symbol): New prototype.
254         * symbol.c (gfc_release_symbol): New. Code taken from free_sym_tree.
255         (gfc_undo_symbols, free_sym_tree, gfc_free_finalizer):
256         Use gfc_release_symbol.
257         * parse.c (gfc_fixup_sibling_symbols): Ditto.
258         * resolve.c (resolve_symbol): Ditto.
259
260 2010-07-29  Tobias Burnus  <burnus@net-b.de>
261
262         PR fortran/45087
263         PR fortran/45125
264         * trans-decl.c (gfc_get_extern_function_decl): Correctly handle
265         external procedure declarations in modules.
266         (gfc_get_symbol_decl): Modify assert.
267
268 2010-07-29  Janus Weil  <janus@gcc.gnu.org>
269
270         PR fortran/44962
271         * resolve.c (resolve_fl_derived): Call gfc_resolve_array_spec.
272
273 2010-07-29  Janus Weil  <janus@gcc.gnu.org>
274
275         PR fortran/45004
276         * trans-stmt.h (gfc_trans_class_init_assign): New prototype.
277         (gfc_trans_class_assign): Modified prototype.
278         * trans.h (gfc_conv_intrinsic_move_alloc): New prototype.
279         * trans-expr.c (gfc_trans_class_init_assign): Split off from ...
280         (gfc_trans_class_assign): ... here. Modified actual arguments.
281         * trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): New function to
282         handle the MOVE_ALLOC intrinsic with scalar and class arguments.
283         * trans.c (trans_code): Call 'gfc_conv_intrinsic_move_alloc'.
284
285 2010-07-29  Mikael Morin  <mikael@gcc.gnu.org>
286
287         PR fortran/42051
288         PR fortran/44064
289         * class.c (gfc_find_derived_vtab): Accept or discard newly created
290         symbols before returning.
291
292 2010-07-29  Joseph Myers  <joseph@codesourcery.com>
293
294         * lang.opt (cpp): Remove Joined and Separate markers.
295         (cpp=): New internal option.
296         * lang-specs.h (F951_CPP_OPTIONS): Generate -cpp= option.
297         * cpp.c (gfc_cpp_handle_option): Handle OPT_cpp_ instead of
298         OPT_cpp.
299
300 2010-07-29  Daniel Kraft  <d@domob.eu>
301
302         PR fortran/45117
303         * array.c (resolve_array_bound): Fix error message to properly handle
304         non-variable expressions.
305
306 2010-07-28  Mikael Morin  <mikael@gcc.gnu.org>
307
308         * decl.c (free_value): Also free repeat field.
309         * data.c (gfc_assign_data_value): Always free offset before returning.
310
311 2010-07-28  Daniel Kraft  <d@domob.eu>
312
313         * gfortran.h (gfc_build_intrinsic_call): New method.
314         * expr.c (gfc_build_intrinsic_call): New method.
315         * simplify.c (range_check): Ignore non-constant value.
316         (simplify_bound_dim): Handle non-variable expressions and
317         fix memory leak with non-free'ed expression.
318         (simplify_bound): Handle non-variable expressions.
319         (gfc_simplify_shape): Ditto.
320         (gfc_simplify_size): Ditto, but only in certain cases possible.
321
322 2010-07-28  Joseph Myers  <joseph@codesourcery.com>
323
324         * gfortranspec.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
325         Remove.
326
327 2010-07-28  Tobias Burnus  <burnus@net-b.de>
328
329         PR fortran/45077
330         * trans-types.c (gfc_get_derived_type): Fix DT declaration
331         from modules for whole-file mode.
332
333 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
334
335         * gfortran.h (gfc_handle_option): Update prototype and return
336         value type.
337         * options.c (gfc_handle_option): Update prototype and return value
338         type.
339
340 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
341
342         * cpp.c (gfc_cpp_init_options): Update prototype.  Use number of
343         decoded options in allocating deferred_opt.
344         * cpp.h (gfc_cpp_init_options): Update prototype.
345         * f95-lang.c (LANG_HOOKS_OPTION_LANG_MASK): Define.
346         * gfortran.h (gfc_option_lang_mask): New.
347         (gfc_init_options): Update prototype.
348         * options.c (gfc_option_lang_mask): New.
349         (gfc_init_options): Update prototype.  Pass new arguments to
350         gfc_cpp_init_options.
351
352 2010-07-26  Tobias Burnus  <burnus@net-b.de>
353
354         PR fortran/40873
355         * trans-decl.c (gfc_get_extern_function_decl): Fix generation
356         for functions which are later in the same file.
357         (gfc_create_function_decl, build_function_decl,
358         build_entry_thunks): Add global argument.
359         * trans.c (gfc_generate_module_code): Update
360         gfc_create_function_decl call.
361         * trans.h (gfc_create_function_decl): Update prototype.
362         * resolve.c (resolve_global_procedure): Also resolve for
363         IFSRC_IFBODY.
364
365 2010-07-26  Richard Henderson  <rth@redhat.com>
366
367         PR target/44132
368         * f95-lang.c (LANG_HOOKS_WRITE_GLOBALS): New.
369         (gfc_write_global_declarations): New.
370
371 2010-07-26  Tobias Burnus  <burnus@net-b.de>
372
373         PR fortran/45066
374         * trans-io.c (build_dt): Use NULL_TREE rather than NULL
375         for call to transfer_namelist_element.
376         * trans-decl.c (gfc_get_symbol_decl): Also set sym->backend_decl
377         for -fwhole-file.
378
379 2010-07-25  Thomas Koenig  <tkoenig@gcc.gnu.org>
380
381         PR fortran/40628
382         * Make-lang.in:  Add fortran/frontend-passes.o.
383         * gfortran.h:  Add prototype for gfc_run_passes.
384         * resolve.c (gfc_resolve):  Call gfc_run_passes.
385         * frontend-passes.c:  New file.
386
387 2010-07-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
388
389         PR fortran/42852
390         * scanner.c (gfc_next_char_literal): Enable truncation warning for
391         free-form '&'.
392
393 2010-07-25  Mikael Morin  <mikael@gcc.gnu.org>
394
395         PR fortran/44660
396         * gfortran.h (gfc_namespace): New field old_equiv.
397         (gfc_free_equiv_until): New prototype.
398         * match.c (gfc_free_equiv_until): New, renamed from gfc_free_equiv with
399         a parameterized stop condition.
400         (gfc_free_equiv): Use gfc_free_equiv_until.
401         * parse.c (next_statement): Save equivalence list.
402         (reject_statement): Restore equivalence list. 
403
404 2010-07-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
405
406         PR fortran/42852
407         * scanner.c (gfc_next_char_literal): Move check for truncation earlier
408         in the function so that it does not get missed by early exits.
409         (load_line): Add checks for quoted strings and free form comments to
410         disable warnings on comments. Add check for ampersand as first
411         character after truncation and don't warn for this case, but warn if
412         there are subsequent non-whitespace characters.
413
414 2010-07-24  Tobias Burnus  <burnus@net-b.de>
415
416         PR fortran/40011
417         * parse.c (gfc_parse_file): Do not override
418         gfc_global_ns_list items.
419
420 2010-07-24  Tobias Burnus  <burnus@net-b.de>
421
422         * options.c (gfc_init_options): Enable -fwhole-file by default.
423         * interface.c (compare_parameter): Assume a Hollerith constant is
424         compatible with all other argument types.
425
426 2010-07-23  Tobias Burnus  <burnus@net-b.de>
427
428         PR fortran/44945
429         * trans-decl.c (gfc_get_symbol_decl): Use module decl with
430         -fwhole-file also for derived types.
431         * trans-types.c (copy_dt_decls_ifequal): Remove static and
432         rename to gfc_copy_dt_decls_ifequal.
433         (gfc_get_derived_type): Update call.
434         * trans-types.h (gfc_copy_dt_decls_ifequal): Add prototype.
435
436 2010-07-23  Tobias Burnus  <burnus@net-b.de>
437
438         PR fortran/45030
439         * resolve.c (resolve_global_procedure): Properly handle ENTRY.
440
441 2010-07-23  Jakub Jelinek  <jakub@redhat.com>
442
443         * trans-types.c (gfc_get_array_descriptor_base,
444         gfc_get_array_type_bounds): Set TYPE_NAMELESS.
445         * trans-decl.c (gfc_build_qualified_array): Set DECL_NAMELESS
446         instead of clearing DECL_NAME.
447         (gfc_build_dummy_array_decl): Set DECL_NAMELESS.
448
449 2009-07-23  Paul Thomas  <pault@gcc.gnu.org>
450
451         PR fortran/24524
452         * trans-array.c (gfc_init_loopinfo): Initialize the reverse
453         field.
454         gfc_trans_scalarized_loop_end: If reverse set in dimension n,
455         reverse the scalarization loop.
456         gfc_conv_resolve_dependencies: Pass the reverse field of the
457         loopinfo to gfc_dep_resolver.
458         trans-expr.c (gfc_trans_assignment_1): Enable loop reversal for
459         assignment by resetting loop.reverse.
460         gfortran.h : Add the gfc_reverse enum.
461         trans.h : Add the reverse field to gfc_loopinfo.
462         dependency.c (gfc_check_dependency): Pass null to the new arg
463         of gfc_dep_resolver.
464         (gfc_check_section_vs_section): Check for reverse dependencies.
465         (gfc_dep_resolver): Add reverse argument and deal with the loop
466         reversal logic.
467         dependency.h : Modify prototype for gfc_dep_resolver to include
468         gfc_reverse *.
469
470 2010-07-23  Daniel Kraft  <d@domob.eu>
471
472         PR fortran/44709
473         * gfortran.h (gfc_find_symtree_in_proc): New method.
474         * symbol.c (gfc_find_symtree_in_proc): New method.
475         * match.c (match_exit_cycle): Look for loop name also in parent
476         namespaces within current procedure.
477
478 2010-07-22  Tobias Burnus  <burnus@net-b.de>
479
480         PR fortran/45019
481         * dependency.c (gfc_check_dependency): Add argument alising check.
482         * symbol.c (gfc_symbols_could_alias): Add argument alising check.
483
484 2010-07-22  Daniel Kraft  <d@domob.eu>
485
486         * trans-stmt.c (gfc_trans_return): Put back in the handling of se.post,
487         now in the correct place.
488
489 2010-07-21  Steven G. Kargl  <kargl@gcc.gnu.org>
490
491         PR fortran/44929
492         * Revert my commit r162325.
493
494 2010-07-21  Daniel Kraft  <d@domob.eu>
495
496         * trans.h (gfc_get_return_label): Removed.
497         (gfc_generate_return): New method.
498         (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
499         returning a tree directly.
500         * trans-stmt.c (gfc_trans_return): Use `gfc_generate_return'.
501         (gfc_trans_block_construct): Update for new interface to
502         `gfc_trans_deferred_vars'.
503         * trans-decl.c (current_function_return_label): Removed.
504         (current_procedure_symbol): New variable.
505         (gfc_get_return_label): Removed.
506         (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
507         returning a tree directly.
508         (get_proc_result), (gfc_generate_return): New methods.
509         (gfc_generate_function_code): Clean up and do init/cleanup here
510         also with gfc_wrapped_block.  Remove return-label but rather
511         return directly.
512
513 2010-07-19  Steven G. Kargl  <kargl@gcc.gnu.org>
514
515         PR fortran/44929
516         * fortran/match.c (match_type_spec): Check for derived type before
517         intrinsic types.
518
519 2010-07-19  Paul Thomas  <pault@gcc.gnu.org>
520
521         PR fortran/42385
522         * interface.c (matching_typebound_op): Add argument for the
523         return of the generic name for the procedure.
524         (build_compcall_for_operator): Add an argument for the generic
525         name of an operator procedure and supply it to the expression.
526         (gfc_extend_expr, gfc_extend_assign): Use the generic name in
527         calls to the above procedures.
528         * resolve.c (resolve_typebound_function): Catch procedure
529         component calls for CLASS objects, check that the vtable is
530         complete and insert the $vptr and procedure components, to make
531         the call.
532         (resolve_typebound_function): The same.
533         * trans-decl.c (gfc_trans_deferred_vars): Do not deallocate
534         an allocatable scalar if it is a result.
535
536 2010-07-19  Paul Thomas  <pault@gcc.gnu.org>
537
538         PR fortran/44353
539         * match.c (gfc_match_iterator): Reverted.
540
541 2010-07-18  Paul Thomas  <pault@gcc.gnu.org>
542
543         PR fortran/44353
544         * match.c (gfc_match_iterator): Remove error that iterator
545         cannot be INTENT(IN).
546
547 2010-07-17  Mikael Morin  <mikael@gcc.gnu.org>
548
549         * trans-array.c (gfc_free_ss): Don't free beyond ss rank.
550         Access subscript through the "dim" field index.
551         (gfc_trans_create_temp_array): Access ss info through the "dim" field
552         index.
553         (gfc_conv_array_index_offset): Ditto.
554         (gfc_conv_loop_setup): Ditto.
555         (gfc_conv_expr_descriptor): Ditto.
556         (gfc_conv_ss_startstride): Ditto.  Update call to
557         gfc_conv_section_startstride.
558         (gfc_conv_section_startstride): Set values along the array dimension.
559         Get array dimension directly from the argument.
560
561 2010-07-15  Jakub Jelinek  <jakub@redhat.com>
562
563         * trans.h (gfc_string_to_single_character): New prototype.
564         * trans-expr.c (string_to_single_character): Renamed to ...
565         (gfc_string_to_single_character): ... this.  No longer static.
566         (gfc_conv_scalar_char_value, gfc_build_compare_string,
567         gfc_trans_string_copy): Adjust callers.
568         * config-lang.in (gtfiles): Add fortran/trans-stmt.c.
569         * trans-stmt.c: Include ggc.h and gt-fortran-trans-stmt.h.
570         (select_struct): Move to toplevel, add GTY(()).
571         (gfc_trans_character_select): Optimize SELECT CASE
572         with character length 1.
573
574 2010-07-15  Nathan Froyd  <froydnj@codesourcery.com>
575
576         * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
577         * trans-common.c: Likewise.
578         * trans-decl.c: Likewise.
579         * trans-types.c: Likewise.
580         * trans.c: Likewise.
581
582 2010-07-15  Janus Weil  <janus@gcc.gnu.org>
583
584         PR fortran/44936
585         * resolve.c (resolve_typebound_generic_call): Resolve generic
586         non-polymorphic type-bound procedure calls to the correct specific
587         procedure.
588         (resolve_typebound_subroutine): Remove superfluous code.
589
590 2010-07-15  Daniel Kraft  <d@domob.eu>
591
592         PR fortran/44709
593         * trans.h (struct gfc_wrapped_block): New struct.
594         (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
595         (gfc_finish_wrapped_block): New method.
596         (gfc_init_default_dt): Add new init code to block rather than
597         returning it.
598         * trans-array.h (gfc_trans_auto_array_allocation): Use gfc_wrapped_block
599         (gfc_trans_dummy_array_bias): Ditto.
600         (gfc_trans_g77_array): Ditto.
601         (gfc_trans_deferred_array): Ditto.
602         * trans.c (gfc_add_expr_to_block): Call add_expr_to_chain.
603         (add_expr_to_chain): New method based on old gfc_add_expr_to_block.
604         (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
605         (gfc_finish_wrapped_block): New method.
606         * trans-array.c (gfc_trans_auto_array_allocation): use gfc_wrapped_block
607         (gfc_trans_g77_array), (gfc_trans_dummy_array_bias): Ditto.
608         (gfc_trans_deferred_array): Ditto.
609         * trans-decl.c (gfc_trans_dummy_character): Ditto.
610         (gfc_trans_auto_character_variable), (gfc_trans_assign_aux_var): Ditto.
611         (init_intent_out_dt): Ditto.
612         (gfc_init_default_dt): Add new init code to block rather than
613         returning it.
614         (gfc_trans_deferred_vars): Use gfc_wrapped_block to collect all init
615         and cleanup code and put it all together.
616
617 2010-07-15  Jakub Jelinek  <jakub@redhat.com>
618
619         * trans.h (gfc_build_compare_string): Add CODE argument.
620         * trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Pass OP to
621         gfc_build_compare_string.
622         * trans-expr.c (gfc_conv_expr_op): Pass CODE to
623         gfc_build_compare_string.
624         (string_to_single_character): Rename len variable to length.
625         (gfc_optimize_len_trim): New function.
626         (gfc_build_compare_string): Add CODE argument.  If it is EQ_EXPR
627         or NE_EXPR and one of the strings is string literal with LEN_TRIM
628         bigger than the length of the other string, they compare unequal.
629
630         PR fortran/40206
631         * trans-stmt.c (gfc_trans_character_select): Always use NULL for high
632         in CASE_LABEL_EXPR and use NULL for low for the default case.
633
634 2010-07-14  Mikael Morin  <mikael@gcc.gnu.org>
635
636         * trans-array.c (gfc_conv_section_upper_bound): Remove
637         (gfc_conv_section_startstride): Don't set the upper bound in the 
638         vector subscript case.
639         (gfc_conv_loop_setup): Don't use gfc_conv_section_upper_bound
640
641 2010-07-14  Janus Weil  <janus@gcc.gnu.org>
642
643         PR fortran/44925
644         * gfortran.h (gfc_is_data_pointer): Remove prototype.
645         * dependency.c (gfc_is_data_pointer): Make it static.
646         * intrinsic.texi: Update documentation on C_LOC.
647         * resolve.c (gfc_iso_c_func_interface): Fix pointer and target checks
648         and add a check for polymorphic variables.
649
650 2010-07-14  Jakub Jelinek  <jakub@redhat.com>
651
652         * trans-expr.c (string_to_single_character): Also optimize
653         string literals containing a single char followed only by spaces.
654         (gfc_trans_string_copy): Remove redundant string_to_single_character
655         calls.
656
657         * trans-decl.c (gfc_build_intrinsic_function_decls,
658         gfc_build_builtin_function_decls): Mark functions as
659         DECL_PURE_P or TREE_READONLY.
660
661 2010-07-13  Nathan Froyd  <froydnj@codesourcery.com>
662
663         * trans-decl.c (build_entry_thunks): Call build_call_expr_loc_vec
664         instead of build_function_call_expr.
665         * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Likewise.
666
667 2010-07-13  Tobias Burnus  <burnus@net-b.de>
668             Daniel Franke  <franke.daniel@gmail.com>
669
670         PR fortran/43665
671         * trans.h (gfc_build_library_function_decl_with_spec): New prototype.
672         * trans-decl.c (gfc_build_library_function_decl_with_spec): Removed
673         static.
674         * trans-io (gfc_build_io_library_fndecls): Add "fn spec" annotations.
675
676 2010-07-13  Daniel Franke  <franke.daniel@gmail.com>
677             Tobias Burnus  <burnus@net-b.de>
678
679         PR fortran/43665
680         * trans-decl.c (gfc_build_intrinsic_function_decls): Add
681         noclobber/noescape annotations to function calls.
682         (gfc_build_builtin_function_decls): Likewise.
683
684 2010-07-13  Janus Weil  <janus@gcc.gnu.org>
685
686         PR fortran/44434
687         PR fortran/44565
688         PR fortran/43945
689         PR fortran/44869
690         * gfortran.h (gfc_find_derived_vtab): Modified prototype.
691         * class.c (gfc_build_class_symbol): Modified call to
692         'gfc_find_derived_vtab'.
693         (add_proc_component): Removed, moved code into 'add_proc_comp'.
694         (add_proc_comps): Renamed to 'add_proc_comp', removed treatment of
695         generics.
696         (add_procs_to_declared_vtab1): Removed unnecessary argument 'resolved'.
697         Removed treatment of generics.
698         (copy_vtab_proc_comps): Removed unnecessary argument 'resolved'.
699         Call 'add_proc_comp' instead of duplicating code.
700         (add_procs_to_declared_vtab): Removed unnecessary arguments 'resolved'
701         and 'declared'.
702         (add_generic_specifics,add_generics_to_declared_vtab): Removed.
703         (gfc_find_derived_vtab): Removed unnecessary argument 'resolved'.
704         Removed treatment of generics.
705         * iresolve.c (gfc_resolve_extends_type_of): Modified call to
706         'gfc_find_derived_vtab'.
707         * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
708         Removed treatment of generics.
709         (resolve_select_type,resolve_fl_derived): Modified call to
710         'gfc_find_derived_vtab'.
711         * trans-decl.c (gfc_get_symbol_decl): Ditto.
712         * trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
713         Ditto.
714         * trans-stmt.c (gfc_trans_allocate): Ditto.
715
716 2010-07-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
717
718         PR fortran/37077
719         * trans-io.c (build_dt): Set common.unit to flag chracter(kind=4)
720         internal unit.
721
722 2010-07-12  Mikael Morin  <mikael@gcc.gnu.org>
723
724         * expr.c (gfc_get_int_expr): Don't initialize mpfr data twice.
725         * resolve.c (build_default_init_expr): Ditto.
726
727 2010-07-11  Tobias Burnus  <burnus@net-b.de>
728
729         PR fortran/44702
730         * module.c (sort_iso_c_rename_list): Remove.
731         (import_iso_c_binding_module,use_iso_fortran_env_module):
732         Allow multiple imports of the same symbol.
733
734 2010-07-11  Mikael Morin  <mikael@gcc.gnu.org>
735
736         * arith.c (gfc_arith_done_1): Release mpfr internal caches.
737
738 2010-07-11  Janus Weil  <janus@gcc.gnu.org>
739
740         PR fortran/44869
741         * decl.c (build_sym,attr_decl1): Only build the class container if the
742         symbol has sufficient attributes.
743         * expr.c (gfc_check_pointer_assign): Use class_pointer instead of
744         pointer attribute for classes.
745         * match.c (gfc_match_allocate,gfc_match_deallocate): Ditto.
746         * module.c (MOD_VERSION): Bump.
747         (enum ab_attribute,attr_bits): Add AB_CLASS_POINTER.
748         (mio_symbol_attribute): Handle class_pointer attribute.
749         * parse.c (parse_derived): Use class_pointer instead of pointer
750         attribute for classes.
751         * primary.c (gfc_variable_attr,gfc_expr_attr): Ditto.
752         * resolve.c (resolve_structure_cons,resolve_deallocate_expr,
753         resolve_allocate_expr,resolve_fl_derived): Ditto.
754         (resolve_fl_var_and_proc): Check for class_ok attribute.
755
756 2010-07-10  Mikael Morin  <mikael@gcc.gnu.org>
757
758         * trans-io.c (gfc_build_st_parameter): Update calls to
759         gfc_add_field_to_struct.
760         * trans-stmt.c (ADD_FIELD): Ditto.
761         * trans-types.c
762         (gfc_get_derived_type): Ditto. Don't create backend_decl for C_PTR's
763         C_ADDRESS field.
764         (gfc_add_field_to_struct_1): Set TYPE_FIELDS(context) instead of
765         fieldlist, remove fieldlist from argument list.
766         (gfc_add_field_to_struct): Update call to gfc_add_field_to_struct_1
767         and remove fieldlist from argument list.
768         (gfc_get_desc_dim_type, gfc_get_array_descriptor_base,
769         gfc_get_mixed_entry_union): Move setting
770         TYPE_FIELDS to gfc_add_field_to_struct_1 and update calls to it.
771         * trans-types.h (gfc_add_field_to_struct): Update prototype.
772
773 2010-07-10  Paul Thomas  <pault@gcc.gnu.org>
774
775         PR fortran/44773
776         * trans-expr.c (arrayfunc_assign_needs_temporary): No temporary
777         if the lhs has never been host associated, as well as not being
778         use associated, a pointer or a target.
779         * resolve.c (resolve_variable): Mark variables that are host
780         associated.
781         * gfortran.h: Add the host_assoc bit to the symbol_attribute
782         structure.
783
784 2010-07-09  Janus Weil  <janus@gcc.gnu.org>
785
786         * intrinsic.texi: Add documentation for SAME_TYPE_AS, EXTENDS_TYPE_OF,
787         STORAGE_SIZE, C_NULL_PTR and C_NULL_FUNPTR. Modify documentation of
788         SIZEOF and C_SIZEOF.
789
790 2010-07-08  Janus Weil  <janus@gcc.gnu.org>
791
792         PR fortran/44649
793         * gfortran.h (gfc_isym_id): Add GFC_ISYM_C_SIZEOF,GFC_ISYM_STORAGE_SIZE.
794         * intrinsic.h (gfc_check_c_sizeof,gfc_check_storage_size,
795         gfc_resolve_storage_size): New prototypes.
796         * check.c (gfc_check_c_sizeof,gfc_check_storage_size): New functions.
797         * intrinsic.c (add_functions): Add STORAGE_SIZE.
798         * iresolve.c (gfc_resolve_storage_size): New function.
799         * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Handle polymorphic
800         arguments.
801         (gfc_conv_intrinsic_storage_size): New function.
802         (gfc_conv_intrinsic_function): Handle STORAGE_SIZE.
803
804 2010-07-08  Jakub Jelinek  <jakub@redhat.com>
805
806         PR fortran/44847
807         * match.c (match_exit_cycle): Error on EXIT also from collapsed
808         !$omp do loops.  Error on CYCLE to non-innermost collapsed
809         !$omp do loops.
810
811 2010-07-08  Tobias Burnus  <burnus@net-b.de>
812
813         PR fortran/18918
814         * array.c (gfc_match_array_ref): Better error message for
815         coarrays with too few ranks.
816         (match_subscript): Move one diagnostic to caller.
817         * gfortran.h (gfc_get_corank): Add prottype.
818         * expr.c (gfc_get_corank): New function.
819         * iresolve.c (resolve_bound): Fix rank for cobounds.
820         (gfc_resolve_lbound,gfc_resolve_lcobound, gfc_resolve_ubound,
821         gfc_resolve_ucobound, gfc_resolve_this_image): Update
822         resolve_bound call.
823
824 2010-07-06  Tobias Burnus  <burnus@net-b.de>
825
826         PR fortran/44742
827         * array.c (gfc_expand_constructor): Add optional diagnostic.
828         * gfortran.h (gfc_expand_constructor): Update prototype.
829         * expr.c (gfc_simplify_expr, check_init_expr,
830         gfc_reduce_init_expr): Update gfc_expand_constructor call.
831         * resolve.c (gfc_resolve_expr): Ditto.
832
833 2010-07-06  Tobias Burnus  <burnus@net-b.de>
834
835         * trans-decl.c: Include diagnostic-core.h besides toplev.h.
836         * trans-intrinsic.c: Ditto.
837         * trans-types.c: Ditto.
838         * convert.c: Include diagnostic-core.h instead of toplev.h.
839         * options.c: Ditto.
840         * trans-array.c: Ditto.
841         * trans-const.c: Ditto.
842         * trans-expr.c: Ditto.
843         * trans-io.c: Ditto.
844         * trans-openmp.c: Ditto.
845         * trans.c: Ditto.
846
847 2010-07-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
848
849         PR fortran/PR44693
850         * check.c (dim_rank_check):  Also check intrinsic functions.
851         Adjust permissible rank for functions which reduce the rank of
852         their argument.  Spread is an exception, where DIM can
853         be one larger than the rank of array.
854
855 2010-07-05  Steven G. Kargl  <kargl@gcc.gnu.org>
856
857         PR fortran/44797
858         * fortran/io.c (resolve_tag): Check EXIST tag is a default logical.
859
860 2010-07-05  Paul Thomas  <pault@gcc.gnu.org>
861
862         PR fortran/44596
863         * trans-types.c (gfc_get_derived_type): Derived type fields
864         with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set
865         but build_pointer_type_for_mode must be used for this.
866
867 2010-07-05  Nathan Froyd  <froydnj@codesourcery.com>
868
869         * trans.h (gfc_conv_procedure_call): Take a VEC instead of a tree.
870         * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Adjust for new
871         type of gfc_conv_procedure_call.
872         (conv_generic_with_optional_char_arg): Likewise.
873         * trans-stmt.c (gfc_trans_call): Likewise.
874         * trans-expr.c (gfc_conv_function_expr): Likewise.
875         (gfc_conv_procedure_call): Use build_call_vec instead of
876         build_call_list.
877
878 2010-07-04  Daniel Kraft  <d@domob.eu>
879
880         * gfc-internals.texi (gfc_code): Document BLOCK and ASSOCIATE.
881
882 2010-07-04  Paul Thomas  <pault@gcc.gnu.org>
883
884         PR fortran/44596
885         PR fortran/44745
886         * trans-types.c (gfc_get_derived_type): Derived type fields
887         with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set.
888
889 2010-07-02  Mikael Morin  <mikael@gcc.gnu.org>
890
891         PR fortran/44662
892         * decl.c (match_procedure_in_type): Clear structure before using.
893         (gfc_match_generic): Ditto.
894
895 2010-07-02  Nathan Froyd  <froydnj@codesourcery.com>
896
897         * trans-types.h (gfc_add_field_to_struct): Add tree ** parameter.
898         * trans-types.c (gfc_add_field_to_struct_1): New function, most
899         of which comes from...
900         (gfc_add_field_to_struct): ...here.  Call it.  Add new parameter.
901         (gfc_get_desc_dim_type): Call gfc_add_field_to_struct_1 for
902         building fields.
903         (gfc_get_array_descriptor_base): Likewise.
904         (gfc_get_mixed_entry_union): Likewise.
905         (gfc_get_derived_type): Add extra chain parameter for
906         gfc_add_field_to_struct.
907         * trans-stmt.c (gfc_trans_character_select): Likewise.
908         * trans-io.c (gfc_build_st_parameter): Likewise.
909
910 2010-06-29  Janus Weil  <janus@gcc.gnu.org>
911
912         PR fortran/44718
913         * resolve.c (is_external_proc): Prevent procedure pointers from being
914         regarded as external procedures.
915
916 2010-06-29  Janus Weil  <janus@gcc.gnu.org>
917
918         PR fortran/44696
919         * trans-intrinsic.c (gfc_conv_associated): Handle polymorphic variables
920         passed as second argument of ASSOCIATED.
921
922 2010-06-29  Paul Thomas  <pault@gcc.gnu.org>
923
924         PR fortran/44582
925         * trans-expr.c (arrayfunc_assign_needs_temporary): New function
926         to determine if a function assignment can be made without a
927         temporary.
928         (gfc_trans_arrayfunc_assign): Move all the conditions that
929         suppress the direct function call to the above new functon and
930         call it.
931
932 2010-06-28  Paul Thomas  <pault@gcc.gnu.org>
933
934         PR fortran/40158
935         * interface.c (argument_rank_mismatch): New function.
936         (compare_parameter): Call new function instead of generating
937         the error directly.
938
939 2010-06-28  Nathan Froyd  <froydnj@codesourcery.com>
940
941         * trans-openmp.c (dovar_init): Define.  Define VECs containing it.
942         (gfc_trans_omp_do): Use a VEC to accumulate variables and their
943         initializers.
944
945 2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>
946
947         * Make-lang.in: Update dependencies.
948
949 2010-06-27  Nathan Froyd  <froydnj@codesourcery.com>
950
951         * gfortran.h (gfc_code): Split backend_decl field into cycle_label
952         and exit_label fields.
953         * trans-openmp.c (gfc_trans_omp_do): Assign to new fields
954         individually.
955         * trans-stmt.c (gfc_trans_simple_do): Likewise.
956         (gfc_trans_do): Likewise.
957         (gfc_trans_do_while): Likewise.
958         (gfc_trans_cycle): Use cycle_label directly.
959         (gfc_trans_exit): Use exit_label directly.
960
961 2010-06-27  Daniel Kraft  <d@domob.eu>
962
963         * dump-parse-tree.c (show_symbol): Dump target-expression for
964         associate names.
965         (show_code_node): Make distinction between BLOCK and ASSOCIATE.
966         (show_namespace): Use show_level for correct indentation of
967         "inner namespaces" (contained procedures or BLOCK).
968
969 2010-06-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
970
971         PR fortran/44678
972         * dump-parse-tree.c (show_code_node):  Show namespace for
973         EXEC_BLOCK.
974
975 2010-06-26  Tobias Burnus  <burnus@net-b.de>
976
977         * decl.c (gfc_match_decl_type_spec): Support
978         TYPE(intrinsic-type-spec).
979
980 2010-06-25  Tobias Burnus  <burnus@net-b.de>
981
982         * intrinsic.h (gfc_check_selected_real_kind,
983         gfc_simplify_selected_real_kind): Update prototypes.
984         * intrinsic.c (add_functions): Add radix support to
985         selected_real_kind.
986         * check.c (gfc_check_selected_real_kind): Ditto.
987         * simplify.c (gfc_simplify_selected_real_kind): Ditto.
988         * trans-decl.c (gfc_build_intrinsic_function_decls):
989         Change call from selected_real_kind to selected_real_kind2008.
990         * intrinsic.texi (SELECTED_REAL_KIND): Update for radix.
991         (PRECISION, RANGE, RADIX): Add cross @refs.
992
993 2010-06-25  Tobias Burnus  <burnus@net-b.de>
994
995         * decl.c (gfc_match_entry): Mark ENTRY as GFC_STD_F2008_OBS.
996         * gfortran.texi (_gfortran_set_options): Update for
997         GFC_STD_F2008_OBS addition.
998         * libgfortran.h: Add GFC_STD_F2008_OBS.
999         * options.c (set_default_std_flags, gfc_handle_option): Handle
1000         GFC_STD_F2008_OBS.
1001         io.c (check_format): Fix allow_std check.
1002
1003 2010-06-25  Tobias Burnus  <burnus@net-b.de>
1004
1005         * decl.c (gfc_match_entry): Allow END besides
1006         END SUBROUTINE/END FUNCTION for contained procedures.
1007
1008 2010-06-25  Tobias Burnus  <burnus@net-b.de>
1009
1010         * parse.c (next_free, next_fixed): Allow ";" as first character.
1011
1012 2010-06-24  Tobias Burnus  <burnus@net-b.de>
1013
1014         PR fortran/44614
1015         * decl.c (variable_decl): Fix IMPORT diagnostic for CLASS.
1016
1017 2010-06-22  Janus Weil  <janus@gcc.gnu.org>
1018
1019         PR fortran/44616
1020         * resolve.c (resolve_fl_derived): Avoid checking for abstract on class
1021         containers.
1022
1023 2010-06-21  Tobias Burnus  <burnus@net-b.de>
1024
1025         PR fortran/40632
1026         * interface.c (compare_parameter): Add gfc_is_simply_contiguous
1027         checks.
1028         * symbol.c (gfc_add_contiguous): New function.
1029         (gfc_copy_attr, check_conflict): Handle contiguous attribute.
1030         * decl.c (match_attr_spec): Ditto.
1031         (gfc_match_contiguous): New function.
1032         * resolve.c (resolve_fl_derived, resolve_symbol): Handle
1033         contiguous.
1034         * gfortran.h (symbol_attribute): Add contiguous.
1035         (gfc_is_simply_contiguous): Add prototype.
1036         (gfc_add_contiguous): Add prototype.
1037         * match.h (gfc_match_contiguous): Add prototype.
1038         * parse.c (decode_specification_statement,
1039         decode_statement): Handle contiguous attribute.
1040         * expr.c (gfc_is_simply_contiguous): New function.
1041         * dump-parse-tree.c (show_attr): Handle contiguous.
1042         * module.c (ab_attribute, attr_bits, mio_symbol_attribute):
1043         Ditto.
1044         * trans-expr.c (gfc_add_interface_mapping): Copy
1045         attr.contiguous.
1046         * trans-array.c (gfc_conv_descriptor_stride_get,
1047         gfc_conv_array_parameter): Handle contiguous arrays.
1048         * trans-types.c (gfc_build_array_type, gfc_build_array_type,
1049         gfc_sym_type, gfc_get_derived_type, gfc_get_array_descr_info):
1050         Ditto.
1051         * trans.h (gfc_array_kind): Ditto.
1052         * trans-decl.c (gfc_get_symbol_decl): Ditto.
1053
1054 2010-06-20  Joseph Myers  <joseph@codesourcery.com>
1055
1056         * options.c (gfc_handle_option): Don't handle N_OPTS.
1057
1058 2010-06-19  Janus Weil  <janus@gcc.gnu.org>
1059
1060         PR fortran/44584
1061         * resolve.c (resolve_fl_derived): Reverse ordering of conditions
1062         to avoid ICE.
1063
1064 2010-06-18  Tobias Burnus  <burnus@net-b.de>
1065
1066         PR fortran/44556
1067         * resolve.c (resolve_allocate_deallocate): Properly check
1068         part-refs in stat=/errmsg= for invalid use.
1069
1070 2010-06-17  Janus Weil  <janus@gcc.gnu.org>
1071
1072         PR fortran/44558
1073         * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
1074         Return directly in case of an error.
1075
1076 2010-06-16  Janus Weil  <janus@gcc.gnu.org>
1077
1078         PR fortran/44549
1079         * gfortran.h (gfc_get_typebound_proc): Modified Prototype.
1080         * decl.c (match_procedure_in_type): Give a unique gfc_typebound_proc
1081         structure to each procedure in a procedure list.
1082         * module.c (mio_typebound_proc): Add NULL argument to
1083         'gfc_get_typebound_proc'.
1084         * symbol.c (gfc_get_typebound_proc): Add a new argument, which is used
1085         to initialize the new structure.
1086
1087 2010-06-15  Janus Weil  <janus@gcc.gnu.org>
1088
1089         PR fortran/43388
1090         * gfortran.h (gfc_expr): Add new member 'mold'.
1091         * match.c (gfc_match_allocate): Implement the MOLD tag.
1092         * resolve.c (resolve_allocate_expr): Ditto.
1093         * trans-stmt.c (gfc_trans_allocate): Ditto.
1094
1095 2010-06-15  Jakub Jelinek  <jakub@redhat.com>
1096
1097         PR fortran/44536
1098         * trans-openmp.c (gfc_omp_predetermined_sharing): Don't return
1099         OMP_CLAUSE_DEFAULT_SHARED for artificial vars with
1100         GFC_DECL_SAVED_DESCRIPTOR set.
1101         (gfc_omp_report_decl): New function.
1102         * trans.h (gfc_omp_report_decl): New prototype.
1103         * f95-lang.c (LANG_HOOKS_OMP_REPORT_DECL): Redefine.
1104
1105 2010-06-13  Daniel Franke  <franke.daniel@gmail.com>
1106
1107         PR fortran/31588
1108         PR fortran/43954
1109         * gfortranspec.c (lang_specific_driver): Removed deprecation
1110         warning for -M.
1111         * lang.opt: Add options -M, -MM, -MD, -MMD, -MF, -MG, -MP, -MT, -MQ.
1112         * lang-specs.h (CPP_FORWARD_OPTIONS): Add -M* options.
1113         * cpp.h (gfc_cpp_makedep): New.
1114         (gfc_cpp_add_dep): New.
1115         (gfc_cpp_add_target): New.
1116         * cpp.c (gfc_cpp_option): Add deps* members.
1117         (gfc_cpp_makedep): New.
1118         (gfc_cpp_add_dep): New.
1119         (gfc_cpp_add_target): New.
1120         (gfc_cpp_init_options): Initialize new options.
1121         (gfc_cpp_handle_option): Handle new options.
1122         (gfc_cpp_post_options): Map new options to libcpp-options.
1123         (gfc_cpp_init): Handle deferred -MQ and -MT options.
1124         (gfc_cpp_done): If requested, write dependencies to file.
1125         * module.c (gfc_dump_module): Add a module filename as target.
1126         * scanner.c (open_included_file): New parameter system; add the
1127         included file as dependency.
1128         (gfc_open_included_file): Add the included file as dependency.
1129         (gfc_open_intrinsic_module): Likewise.
1130         * invoke.texi: Removed deprecation warning for -M.
1131         * gfortran.texi: Removed Makefile-dependencies project.
1132
1133 2010-06-12  Daniel Franke  <franke.daniel@gmail.com>
1134
1135         * resolve.c (resolve_global_procedure): Improved checking if an
1136         explicit interface is required.
1137
1138 2010-06-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1139
1140         * trans-decl.c (gfc_build_intrinsic_function_decls): Fix
1141         return type.
1142         * trans-intrinsic.c (gfc_conv_intrinsic_fdate): Fix argument type.
1143         (gfc_conv_intrinsic_ttynam): Likewise.
1144         (gfc_conv_intrinsic_trim): Likewise.
1145
1146 2010-06-12  Janus Weil  <janus@gcc.gnu.org>
1147
1148         PR fortran/40117
1149         * decl.c (match_procedure_in_type): Allow procedure lists (F08).
1150
1151 2010-06-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1152
1153         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Fix comment.
1154
1155 2010-06-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1156
1157         * mathbuiltins.def: Add builtins that do not directly correspond
1158         to a Fortran intrinsic, with new macro OTHER_BUILTIN.
1159         * f95-lang.c (gfc_init_builtin_functions): Define OTHER_BUILTIN.
1160         * trans-intrinsic.c (gfc_intrinsic_map_t): Remove
1161         code_{r,c}{4,8,10,16} fields. Add
1162         {,complex}{float,double,long_double}_built_in fields.
1163         (gfc_intrinsic_map): Adjust definitions of DEFINE_MATH_BUILTIN,
1164         DEFINE_MATH_BUILTIN_C and LIB_FUNCTION accordingly. Add
1165         definition of OTHER_BUILTIN.
1166         (real_compnt_info): Remove unused struct.
1167         (builtin_decl_for_precision, builtin_decl_for_float_kind): New
1168         functions.
1169         (build_round_expr): Call builtin_decl_for_precision instead of
1170         series of if-else.
1171         (gfc_conv_intrinsic_aint): Call builtin_decl_for_float_kind
1172         instead of a switch.
1173         (gfc_build_intrinsic_lib_fndecls): Match
1174         {real,complex}{4,8,10,16}decl into the C-style built_in_decls.
1175         (gfc_get_intrinsic_lib_fndecl): Do not hardcode floating-point
1176         kinds.
1177         (gfc_conv_intrinsic_lib_function): Go through all the extended
1178         gfc_intrinsic_map.
1179         (gfc_trans_same_strlen_check): Call builtin_decl_for_float_kind
1180         instead of a switch.
1181         (gfc_conv_intrinsic_abs): Likewise.
1182         (gfc_conv_intrinsic_mod): Likewise.
1183         (gfc_conv_intrinsic_sign): Likewise.
1184         (gfc_conv_intrinsic_fraction): Likewise.
1185         (gfc_conv_intrinsic_nearest): Likewise.
1186         (gfc_conv_intrinsic_spacing): Likewise.
1187         (gfc_conv_intrinsic_rrspacing): Likewise.
1188         (gfc_conv_intrinsic_scale): Likewise.
1189         (gfc_conv_intrinsic_set_exponent): Likewise.
1190
1191 2010-06-11  Paul Thomas  <pault@gcc.gnu.org>
1192
1193         PR fortran/42051
1194         PR fortran/43896
1195         * trans-expr.c (gfc_conv_derived_to_class): Handle array-valued
1196         functions with CLASS formal arguments.
1197
1198 2010-06-10  Janus Weil  <janus@gcc.gnu.org>
1199
1200         PR fortran/44207
1201         * resolve.c (conformable_arrays): Handle allocatable components.
1202
1203 2010-06-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1204
1205         PR fortran/38273
1206         * gfortran.texi: Document that Cray pointers cannot be function
1207         results.
1208
1209 2010-06-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1210
1211         PR fortran/36234
1212         * gfortran.texi: Document lack of support for syntax
1213         "complex FUNCTION name*16()", and existence of alternative
1214         legacy syntax "complex*16 FUNCTION name()".
1215
1216 2010-06-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1217
1218         PR fortran/43032
1219         * intrinsic.texi (FLUSH): Note the difference between FLUSH and
1220         POSIX's fsync(), and how to call the latter from Fortran code.
1221
1222 2010-06-10  Daniel Franke  <franke.daniel@gmail.com>
1223
1224         PR fortran/44457
1225         * interface.c (compare_actual_formal): Reject actual arguments with
1226         array subscript passed to ASYNCHRONOUS dummys.
1227
1228 2010-06-10  Daniel Kraft  <d@domob.eu>
1229
1230         PR fortran/38936
1231         * gfortran.h (enum gfc_statement): Add ST_ASSOCIATE, ST_END_ASSOCIATE.
1232         (struct gfc_symbol): New field `assoc'.
1233         (struct gfc_association_list): New struct.
1234         (struct gfc_code): New struct `block' in union, move `ns' there
1235         and add association list.
1236         (gfc_free_association_list): New method.
1237         (gfc_has_vector_subscript): Made public;
1238         * match.h (gfc_match_associate): New method.
1239         * parse.h (enum gfc_compile_state): Add COMP_ASSOCIATE.
1240         * decl.c (gfc_match_end): Handle ST_END_ASSOCIATE.
1241         * interface.c (gfc_has_vector_subscript): Made public.
1242         (compare_actual_formal): Rename `has_vector_subscript' accordingly.
1243         * match.c (gfc_match_associate): New method.
1244         (gfc_match_select_type): Change reference to gfc_code's `ns' field.
1245         * primary.c (match_variable): Don't allow names associated to expr here.
1246         * parse.c (decode_statement): Try matching ASSOCIATE statement.
1247         (case_exec_markers, case_end): Add ASSOCIATE statement.
1248         (gfc_ascii_statement): Hande ST_ASSOCIATE and ST_END_ASSOCIATE.
1249         (parse_associate): New method.
1250         (parse_executable): Handle ST_ASSOCIATE.
1251         (parse_block_construct): Change reference to gfc_code's `ns' field.
1252         * resolve.c (resolve_select_type): Ditto.
1253         (resolve_code): Ditto.
1254         (resolve_block_construct): Ditto and add comment.
1255         (resolve_select_type): Set association list in generated BLOCK to NULL.
1256         (resolve_symbol): Resolve associate names.
1257         * st.c (gfc_free_statement): Change reference to gfc_code's `ns' field
1258         and free association list.
1259         (gfc_free_association_list): New method.
1260         * symbol.c (gfc_new_symbol): NULL new field `assoc'.
1261         * trans-stmt.c (gfc_trans_block_construct): Change reference to
1262         gfc_code's `ns' field.
1263
1264 2010-06-10  Kai Tietz  <kai.tietz@onevision.com>
1265
1266         * error.c (error_print): Pre-initialize loc by NULL.
1267         * openmp.c (resolve_omp_clauses): Add explicit
1268         braces to avoid ambigous else.
1269         * array.c (match_subscript): Pre-initialize m to MATCH_ERROR.
1270
1271 2010-06-10  Gerald Pfeifer  <gerald@pfeifer.com>
1272
1273         * gfc-internals.texi: Move to GFDL 1.3.
1274         * gfortran.texi: Ditto.
1275         * intrinsic.texi: Ditto.
1276         * invoke.texi: Ditto.
1277
1278 2010-06-09  Daniel Franke  <franke.daniel@gmail.com>
1279
1280         PR fortran/44347
1281         * check.c (gfc_check_selected_real_kind): Verify that the
1282         actual arguments are scalar.
1283
1284 2010-06-09  Daniel Franke  <franke.daniel@gmail.com>
1285
1286         PR fortran/44359
1287         * intrinsic.c (gfc_convert_type_warn): Further improve -Wconversion.
1288
1289 2010-06-09  Janus Weil  <janus@gcc.gnu.org>
1290
1291         PR fortran/44430
1292         * dump-parse-tree.c (show_symbol): Avoid infinite loop.
1293
1294 2010-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
1295
1296         * fortran/symbol.c (check_conflict):  Remove an invalid conflict check.
1297
1298 2010-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
1299
1300         * fortran/intrinsic.c (add_functions): Change gfc_check_btest,
1301         gfc_check_ibclr, and gfc_check_ibset to gfc_check_bitfcn.
1302         * fortran/intrinsic.h: Remove prototypes for gfc_check_btest,
1303         gfc_check_ibclr, and gfc_check_ibset.  Add prototype for
1304         gfc_check_bitfcn.
1305         * fortran/check.c (nonnegative_check, less_than_bitsize1, 
1306         less_than_bitsize2): New functions.
1307         (gfc_check_btest): Renamed to gfc_check_bitfcn.  Use
1308         nonnegative_check and less_than_bitsize1.
1309         (gfc_check_ibclr, gfc_check_ibset): Removed.
1310         (gfc_check_ibits,gfc_check_mvbits): Use nonnegative_check and
1311         less_than_bitsize1.
1312
1313 2010-06-09  Janus Weil  <janus@gcc.gnu.org>
1314
1315         PR fortran/44211
1316         * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
1317         Resolve references.
1318
1319 2010-06-09  Kai Tietz  <kai.tietz@onevision.com>
1320
1321         * resolve.c (resolve_deallocate_expr): Avoid warning
1322         about possible use of iunitialized sym.
1323         (resolve_allocate_expr): Pre-initialize sym by NULL.
1324
1325 2010-06-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1326
1327         PR fortran/43040
1328         * f95-lang.c (gfc_init_builtin_functions): Remove comment.
1329
1330 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
1331
1332         * trans-types.c (gfc_get_nodesc_array_type): Use typed GC
1333         allocation.
1334         (gfc_get_array_type_bounds): Likewise.
1335
1336         * trans-decl.c (gfc_allocate_lang_decl): Likewise.
1337         (gfc_find_module): Likewise.
1338
1339         * f95-lang.c (pushlevel): Likewise.
1340
1341         * trans.h (struct lang_type): Add variable_size GTY option.
1342         (struct lang_decl): Likewise.
1343
1344 2010-06-08  Tobias Burnus  <burnus@net-b.de>
1345
1346         PR fortran/44446
1347         * symbol.c (check_conflict): Move protected--external/procedure check ...
1348         * resolve.c (resolve_select_type): ... to the resolution stage.
1349
1350 2010-06-07  Tobias Burnus  <burnus@net-b.de>
1351
1352         * options.c (gfc_handle_option): Fix -fno-recursive.
1353
1354 2010-06-07  Tobias Burnus  <burnus@net-b.de>
1355
1356         * gfc-internals.texi (copyrights-gfortran): Fix copyright year format.
1357         * gfortran.texi (copyrights-gfortran): Ditto.
1358
1359 2010-06-07  Joseph Myers  <joseph@codesourcery.com>
1360
1361         * lang.opt (fshort-enums): Define using Var and VarExists.
1362         * options.c (gfc_handle_option): Don't set flag_short_enums here.
1363
1364 2010-06-05  Paul Thomas  <pault@gcc.gnu.org>
1365             Janus Weil  <janus@gcc.gnu.org>
1366
1367         PR fortran/43945
1368         * resolve.c (get_declared_from_expr): Move to before
1369         resolve_typebound_generic_call.  Make new_ref and class_ref
1370         ignorable if set to NULL.
1371         (resolve_typebound_generic_call): Once we have resolved the
1372         generic call, check that the specific instance is that which
1373         is bound to the declared type.
1374         (resolve_typebound_function,resolve_typebound_subroutine): Avoid
1375         freeing 'class_ref->next' twice.
1376
1377 2010-06-05  Paul Thomas  <pault@gcc.gnu.org>
1378
1379         PR fortran/43895
1380         * trans-array.c (structure_alloc_comps): Dereference scalar
1381         'decl' if it is a REFERENCE_TYPE. Tidy expressions containing
1382         TREE_TYPE (decl).
1383
1384 2010-06-04  Joseph Myers  <joseph@codesourcery.com>
1385
1386         * gfortranspec.c (append_arg, lang_specific_driver): Use
1387         GCC-specific formats in diagnostics.
1388
1389 2010-06-02  Tobias Burnus  <burnus@net-b.de>
1390
1391         PR fortran/44360
1392         * parse.c (gfc_fixup_sibling_symbols): Do not "fix" use-associated
1393         symbols.
1394
1395 2010-06-01  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1396
1397         PR fortran/44371
1398         * match.c (gfc_match_stopcode): Move gfc_match_eos call inside 
1399         condition block.
1400
1401 2010-05-31  Steven G. Kargl  <kargl@gcc.gnu.org>
1402
1403         * fortran/gfortran.texi:  Fix typos in description of variable-format-
1404         expressions.
1405
1406 2010-05-31  Thomas Koenig  <tkoenig@gcc.gnu.org>
1407
1408         PR fortran/36928
1409         * dependency.c (gfc_check_section_vs_section):  Check
1410         for interleaving array assignments without conflicts.
1411
1412 2010-05-30  Janus Weil  <janus@gcc.gnu.org>
1413
1414         * gcc/fortran/gfortran.h (CLASS_DATA): New macro for accessing the
1415         $data component of a class container.
1416         * gcc/fortran/decl.c (attr_decl1): Use macro CLASS_DATA.
1417         * gcc/fortran/expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol,
1418         gfc_has_ultimate_allocatable,gfc_has_ultimate_pointer): Ditto.
1419         * gcc/fortran/interface.c (matching_typebound_op): Ditto.
1420         * gcc/fortran/match.c (gfc_match_allocate, gfc_match_deallocate): Ditto.
1421         * gcc/fortran/parse.c (parse_derived): Ditto.
1422         * gcc/fortran/primary.c (gfc_match_varspec, gfc_variable_attr,
1423         gfc_expr_attr): Ditto.
1424         * gcc/fortran/resolve.c (resolve_structure_cons, find_array_spec,
1425         resolve_deallocate_expr, resolve_allocate_expr, resolve_select_type,
1426         resolve_fl_var_and_proc, resolve_typebound_procedure,
1427         resolve_fl_derived): Ditto.
1428         * gcc/fortran/symbol.c (gfc_type_compatible): Restructured.
1429         * gcc/fortran/trans-array.c (structure_alloc_comps): Use macro
1430         CLASS_DATA.
1431         * gcc/fortran/trans-decl.c (gfc_get_symbol_decl,
1432         gfc_trans_deferred_vars): Ditto.
1433         * gcc/fortran/trans-stmt.c (gfc_trans_allocate): Ditto.
1434
1435 2010-05-28  Tobias Burnus  <burnus@net-b.de>
1436
1437         * options.c (gfc_handle_option): Fix handling of -fno-whole-file.
1438
1439 2010-05-28  Joseph Myers  <joseph@codesourcery.com>
1440
1441         * gfortranspec.c (append_arg, lang_specific_driver): Use
1442         fatal_error instead of fatal.  Use warning instead of fprintf for
1443         warnings.
1444
1445 2010-05-28  Joseph Myers  <joseph@codesourcery.com>
1446
1447         * cpp.c (gfc_cpp_init_0): Use xstrerror instead of strerror.
1448         * module.c (write_char, gfc_dump_module, gfc_use_module): Use
1449         xstrerror instead of strerror.
1450
1451 2010-05-26  Joseph Myers  <joseph@codesourcery.com>
1452
1453         * cpp.c (cb_cpp_error): Save and restore
1454         global_dc->warn_system_headers, not variable warn_system_headers.
1455
1456 2010-05-26  Steven Bosscher  <steven@gcc.gnu.org>
1457
1458         * fortran/f95-lang.c: Do not include libfuncs.h, expr.h, and except.h.
1459
1460 2010-05-26  Steven Bosscher  <steven@gcc.gnu.org>
1461
1462         * trans-common.c: Do not include rtl.h, include output.h instead.
1463         * trans-decl.c: Likewise.
1464
1465 2010-05-26  Paul Thomas  <pault@gcc.gnu.org>
1466
1467         PR fortran/40011
1468         * resolve.c (resolve_global_procedure): Resolve the gsymbol's
1469         namespace before trying to reorder the gsymbols.
1470
1471 2010-05-25  Daniel Franke  <franke.daniel@gmail.com>
1472
1473         PR fortran/30668
1474         PR fortran/31346
1475         PR fortran/34260
1476         * resolve.c (resolve_global_procedure): Add check for global
1477         procedures with implicit interfaces and assumed-shape or optional
1478         dummy arguments. Verify that function return type, kind and string
1479         lengths match.
1480
1481 2010-05-21  Tobias Burnus  <burnus@net-b.de>
1482
1483         * gfortran.h: Do not include system.h.
1484         * bbt.c: Include system.h.
1485         * data.c: Ditto.
1486         * dependency.c: Ditto.
1487         * dump-parse-tree.c: Ditto.
1488         * arith.h: Do not include gfortran.h.
1489         * constructor.h: Do not include gfortran.h and splay-tree.h.
1490         * match.h: Do not include gfortran.h.
1491         * parse.h: Ditto.
1492         * target-memory.h: Ditto.
1493         * openmp.c: Do not include toplev.h and target.h.
1494         * trans-stmt.c: Ditto not include toplev.h.
1495         * primary.c: Ditto.
1496         * trans-common.c: Tell why toplev.h is needed. And
1497         do not include target.h.
1498         * trans-expr.c: Tell why toplev.h is needed.
1499         * trans-array.c: Ditto.
1500         * trans-openmp.c: Ditto.
1501         * trans-const.c: Ditto.
1502         * trans.c: Ditto.
1503         * trans-types.c: Ditto.
1504         * trans-io.c: Ditto.
1505         * trans-decl.c: Ditto.
1506         * scanner.c: Ditto.
1507         * convert.c: Ditto.
1508         * trans-intrinsic.c: Ditto.
1509         * options.c: Ditto.
1510
1511 2010-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1512
1513         PR fortran/43851
1514         * match.c (gfc_match_stopcode): Use gfc_match_init_expr. Go to cleanup
1515         before returning MATCH_ERROR. Add check for scalar. Add check for
1516         default integer kind.
1517
1518 2010-05-22  Janus Weil  <janus@gcc.gnu.org>
1519
1520         PR fortran/44212
1521         * match.c (gfc_match_select_type): On error jump back out of the local
1522         namespace.
1523         * parse.c (parse_derived): Defer creation of vtab symbols to resolution
1524         stage, more precisely to ...
1525         * resolve.c (resolve_fl_derived): ... this place.
1526
1527 2010-05-22  Janus Weil  <janus@gcc.gnu.org>
1528
1529         PR fortran/44213
1530         * resolve.c (ensure_not_abstract): Allow abstract types with
1531         non-abstract ancestors.
1532
1533 2010-05-21  Steven Bosscher  <steven@gcc.gnu.org>
1534
1535         * trans-const.c: Include realmpfr.h.
1536         * Make-lang.in: Update dependencies.
1537
1538 2010-05-21  Steven Bosscher  <steven@gcc.gnu.org>
1539
1540         * trans-const.c, trans-types.c, trans-intrinsic.c:
1541         Clean up redundant includes.
1542
1543 2010-05-20  Daniel Franke  <franke.daniel@gmail.com>
1544
1545         PR fortran/38407
1546         * lang.opt (Wunused-dummy-argument): New option.
1547         * gfortran.h (gfc_option_t): Add warn_unused_dummy_argument.
1548         * options.c (gfc_init_options): Disable warn_unused_dummy_argument.
1549         (set_Wall): Enable warn_unused_dummy_argument.
1550         (gfc_handle_option): Set warn_unused_dummy_argument according to
1551         command line.
1552         * trans-decl.c (generate_local_decl): Separate warnings about
1553         unused variables and unused dummy arguments.
1554         * invoke.texi: Documented new option.
1555
1556 2010-05-20  Steven Bosscher  <steven@gcc.gnu.org>
1557
1558         * trans-expr.c: Do not include convert.h, ggc.h, real.h, and gimple.h.
1559         (gfc_conv_string_tmp): Do not assert type comparibilty.
1560         *  trans-array.c: Do not include gimple.h, ggc.h, and real.h.
1561         (gfc_conv_expr_descriptor): Remove assert.
1562         * trans-common.c: Clarify why rtl.h and tm.h are included.
1563         * trans-openmp.c: Do not include ggc.h and real.h.
1564         Explain why gimple.h is included.
1565         * trans-const.c: Do not include ggc.h.
1566         * trans-stmt.c: Do not include gimple.h, ggc.h, and real.h.
1567         * trans.c: Do not include ggc.h and real.h.
1568         Explain why gimple.h is included.
1569         * trans-types.c: Do not include tm.h.  Explain why langhooks.h
1570         and dwarf2out.h are included.
1571         * trans-io.c: Do not include gimple.h and real.h.
1572         * trans-decl.c: Explain why gimple.h, tm.h, and rtl.h are included.
1573         * trans-intrinsic.c: Do not include gimple.h.  Explain why tm.h
1574         is included.
1575
1576 2010-05-20  Tobias Burnus  <burnus@net-b.de>
1577
1578         * options.c (gfc_init_options,gfc_post_options): Enable
1579         flag_associative_math by default.
1580
1581 2010-05-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1582
1583         PR fortran/43851
1584         * trans-stmt.c (gfc_trans_stop): Add generation of call to
1585         gfortran_error_stop_numeric. Fix up some whitespace. Use stop_string for
1586         blank STOP, handling a null expression. (gfc_trans_pause): Use
1587         pause_string for blank PAUSE.
1588         * trans.h: Add external function declaration for error_stop_numeric.
1589         * trans-decl.c (gfc_build_builtin_function_decls): Add the building of
1590         the declaration for the library call. Adjust whitespaces.
1591         * match.c (gfc_match_stopcode): Remove use of the actual stop code to
1592         signal no stop code. Match the expression following the stop and pass
1593         that to the translators. Remove the old use of digit matching.  Add
1594         checks that the stop_code expression is INTEGER or CHARACTER, constant,
1595         and if CHARACTER, default character KIND.
1596
1597 2010-05-19  Daniel Franke  <franke.daniel@gmail.com>
1598
1599         PR fortran/44055
1600         * lang.opt (Wconversion-extra): New option.
1601         * gfortran.h (gfc_option_t): Add warn_conversion_extra.
1602         * options.c (gfc_init_options): Disable -Wconversion-extra by default.
1603         (set_Wall): Enable -Wconversion.
1604         (gfc_handle_option): Set warn_conversion_extra.
1605         * intrinsic.c (gfc_convert_type_warn): Ignore kind conditions
1606         introduced for -Wconversion if -Wconversion-extra is present.
1607         * invoke.texi: Add -Wconversion to -Wall; document new behaviour of
1608         -Wconversion; document -Wconversion-extra.
1609
1610 2010-05-19  Daniel Franke  <franke.daniel@gmail.com>
1611
1612         PR fortran/42360
1613         * gfortran.h (gfc_has_default_initializer): New.
1614         * expr.c (gfc_has_default_initializer): New.
1615         * resolve.c (has_default_initializer): Removed, use
1616         gfc_has_default_initializer() instead. Updated all callers.
1617         * trans-array.c (has_default_initializer): Removed, use
1618         gfc_has_default_initializer() instead. Updated all callers.
1619         * trans-decl.c (generate_local_decl): Do not check the
1620         first component only to check for initializers, but use
1621         gfc_has_default_initializer() instead.
1622
1623 2010-05-19  Daniel Franke  <franke.daniel@gmail.com>
1624
1625         PR fortran/38404
1626         * primary.c (match_string_constant): Move start_locus just inside 
1627         the string.
1628         * data.c (create_character_intializer): Clarified truncation warning.
1629
1630 2010-05-19  Daniel Franke  <franke.daniel@gmail.com>
1631
1632         PR fortran/34505
1633         * intrinsic.h (gfc_check_float): New prototype.
1634         (gfc_check_sngl): New prototype.
1635         * check.c (gfc_check_float): New.
1636         (gfc_check_sngl): New.
1637         * intrinsic.c (add_functions): Moved DFLOAT from aliasing DBLE
1638         to be a specific for REAL. Added check routines for FLOAT, DFLOAT
1639         and SNGL.
1640         * intrinsic.texi: Removed individual nodes of FLOAT, DFLOAT and SNGL,
1641         added them to the list of specifics of REAL instead.
1642
1643 2010-05-17  Janus Weil  <janus@gcc.gnu.org>
1644
1645         PR fortran/43990
1646         * trans-expr.c (gfc_conv_structure): Remove unneeded and buggy code.
1647         This is now handled via 'gfc_class_null_initializer'.
1648
1649 2010-05-17  Janus Weil  <janus@gcc.gnu.org>
1650
1651         * class.c (gfc_add_component_ref,gfc_class_null_initializer,
1652         gfc_build_class_symbol,add_proc_component,add_proc_comps, 
1653         add_procs_to_declared_vtab1,copy_vtab_proc_comps,
1654         add_procs_to_declared_vtab,add_generic_specifics, 
1655         add_generics_to_declared_vtab,gfc_find_derived_vtab,
1656         find_typebound_proc_uop,gfc_find_typebound_proc,
1657         gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op, 
1658         gfc_get_tbp_symtree): Moved here from other places.
1659         * expr.c (gfc_add_component_ref,gfc_class_null_initializer): Move to
1660         class.c.
1661         * gfortran.h (gfc_build_class_symbol,gfc_find_derived_vtab,
1662         gfc_find_typebound_proc,gfc_find_typebound_user_op,
1663         gfc_find_typebound_intrinsic_op,gfc_get_tbp_symtree,
1664         gfc_add_component_ref, gfc_class_null_initializer): Moved to class.c.
1665         * Make-lang.in: Add class.o.
1666         * symbol.c (gfc_build_class_symbol,add_proc_component,add_proc_comps,
1667         add_procs_to_declared_vtab1,copy_vtab_proc_comps,
1668         add_procs_to_declared_vtab,add_generic_specifics,
1669         add_generics_to_declared_vtab,gfc_find_derived_vtab,
1670         find_typebound_proc_uop,gfc_find_typebound_proc,
1671         gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
1672         gfc_get_tbp_symtree): Move to class.c.
1673
1674 2010-05-17  Nathan Froyd  <froydnj@codesourcery.com>
1675
1676         * trans-types.c (gfc_init_types): Use build_function_type_list.
1677         (gfc_get_ppc_type): Likewise.
1678         * trans-decl.c (gfc_generate_constructors): Likewise.
1679         * f95-lang.c (build_builtin_fntypes): Likewise.
1680         (gfc_init_builtin_functions): Likewise.
1681         (DEF_FUNCTION_TYPE_0): Likewise.
1682         (DEF_FUNCTION_TYPE_1): Likewise.
1683         (DEF_FUNCTION_TYPE_2): Likewise.
1684         (DEF_FUNCTION_TYPE_3): Likewise.
1685         (DEF_FUNCTION_TYPE_4): Likewise.
1686         (DEF_FUNCTION_TYPE_5): Likewise.
1687         (DEF_FUNCTION_TYPE_6): Likewise.
1688         (DEF_FUNCTION_TYPE_7): Likewise.  Use ARG7.
1689         (DEF_FUNCTION_TYPE_VAR_0): Use build_varags_function_type_list.
1690  
1691 2010-05-17  Nathan Froyd  <froydnj@codesourcery.com>
1692
1693         * trans-array.c (gfc_trans_array_constructor_value): Use
1694         build_constructor instead of build_constructor_from_list.
1695         (gfc_build_constant_array_constructor): Likewise.
1696         * trans-decl.c (create_main_function): Likewise.
1697         * trans-stmt.c (gfc_trans_character_select): Likewise.
1698
1699 2010-05-17  Janus Weil  <janus@gcc.gnu.org>
1700
1701         PR fortran/44044
1702         * resolve.c (resolve_fl_var_and_proc): Move error messages here from ...
1703         (resolve_fl_variable_derived): ... this place.
1704         (resolve_symbol): Make sure function symbols (and their result
1705         variables) are not resolved twice.
1706
1707 2010-05-16  Daniel Franke  <franke.daniel@gmail.com>
1708
1709         PR fortran/35779
1710         * array.c (match_array_list): Revert change from 2010-05-13.
1711
1712 2010-05-16  Richard Guenther  <rguenther@suse.de>
1713
1714         * trans-decl.c (module_htab_decls_hash): Revert last change.
1715
1716 2010-05-16  Richard Guenther  <rguenther@suse.de>
1717
1718         * trans-decl.c (module_htab_decls_hash): Use IDENTIFIER_HASH_VALUE.
1719
1720 2010-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1721
1722         * options.c (set_Wall): Remove special logic for Wuninitialized
1723         without -O.
1724
1725 2010-05-15  Janus Weil  <janus@gcc.gnu.org>
1726
1727         PR fortran/44154
1728         PR fortran/42647
1729         * trans-decl.c (gfc_trans_deferred_vars): Modify ordering of
1730         if branches.
1731
1732 2010-05-15  Janus Weil  <janus@gcc.gnu.org>
1733
1734         PR fortran/43207
1735         PR fortran/43969
1736         * gfortran.h (gfc_class_null_initializer): New prototype.
1737         * expr.c (gfc_class_null_initializer): New function to build a NULL
1738         initializer for CLASS pointers.
1739         * symbol.c (gfc_build_class_symbol): Modify internal naming of class
1740         containers. Remove default NULL initialization of $data component.
1741         * trans.c (gfc_allocate_array_with_status): Fix wording of an error 
1742         message.
1743         * trans-expr.c (gfc_conv_initializer,gfc_trans_subcomponent_assign):
1744         Use new function 'gfc_class_null_initializer'.
1745         * trans-intrinsic.c (gfc_conv_allocated): Handle allocatable scalar
1746         class variables.
1747
1748 2010-05-14  Steven G. Kargl  <kargl@gcc.gnu.org>
1749
1750         PR fortran/44135
1751         * fortran/interface.c (get_sym_storage_size): Use signed instead of
1752         unsigned mpz_get_?i routines.
1753
1754 2010-05-14  Jakub Jelinek  <jakub@redhat.com>
1755
1756         * trans.c (trans_code): Set backend locus early.
1757         * trans-decl.c (gfc_get_fake_result_decl): Use source location
1758         of the function instead of current input_location.
1759
1760 2010-05-13  Daniel Franke  <franke.daniel@gmail.com>
1761
1762         PR fortran/35779
1763         * intrinsic.c (gfc_init_expr): Renamed to gfc_init_expr_flag.
1764         Updated all usages.
1765         * expr.c (init_flag): Removed; use gfc_init_expr_flag everywhere.
1766         * array.c (match_array_list): Pass on gfc_init_expr_flag when matching
1767         iterators.
1768
1769 2010-05-13  Jakub Jelinek  <jakub@redhat.com>
1770
1771         PR fortran/44036
1772         * openmp.c (resolve_omp_clauses): Allow procedure pointers in clause
1773         variable lists.
1774         * trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize
1775         by reference dummy procedures or non-dummy procedure pointers.
1776         (gfc_omp_predetermined_sharing): Return
1777         OMP_CLAUSE_DEFAULT_FIRSTPRIVATE for dummy procedures.
1778
1779 2010-05-11  Daniel Franke  <franke.daniel@gmail.com>
1780
1781         PR fortran/43711
1782         * openmp.c (gfc_match_omp_taskwait): Report unexpected characters
1783         after OMP statement.
1784         (gfc_match_omp_critical): Likewise.
1785         (gfc_match_omp_flush): Likewise.
1786         (gfc_match_omp_workshare): Likewise.
1787         (gfc_match_omp_master): Likewise.
1788         (gfc_match_omp_ordered): Likewise.
1789         (gfc_match_omp_atomic): Likewise.
1790         (gfc_match_omp_barrier): Likewise.
1791         (gfc_match_omp_end_nowait): Likewise.
1792
1793 2010-05-11  Daniel Franke  <franke.daniel@gmail.com>
1794
1795         PR fortran/31820
1796         * resolve.c (validate_case_label_expr): Removed FIXME.
1797         (resolve_select): Raise default warning on case labels out of range
1798         of the case expression.
1799
1800 2010-05-10  Daniel Franke  <franke.daniel@gmail.com>
1801
1802         PR fortran/27866
1803         PR fortran/35003
1804         PR fortran/42809
1805         * intrinsic.c (gfc_convert_type_warn): Be more discriminative
1806         about conversion warnings.
1807
1808 2010-05-10  Janus Weil  <janus@gcc.gnu.org>
1809
1810         PR fortran/44044
1811         * match.c (gfc_match_select_type): Move error message to
1812         resolve_select_type.
1813         * resolve.c (resolve_select_type): Error message moved here from
1814         gfc_match_select_type. Correctly set type of temporary.
1815
1816 2010-05-10  Richard Guenther  <rguenther@suse.de>
1817
1818         * trans-decl.c (gfc_build_library_function_decl): Split out
1819         worker to ...
1820         (build_library_function_decl_1): ... this new function.
1821         Set a fnspec attribute if a specification was provided.
1822         (gfc_build_library_function_decl_with_spec): New function.
1823         (gfc_build_intrinsic_function_decls): Annotate internal_pack
1824         and internal_unpack.
1825
1826 2010-05-07  Daniel Franke  <franke.daniel@gmail.com>
1827
1828         PR fortran/40728
1829         * intrinc.c (gfc_is_intrinsic): Do not prematurely mark symbol
1830         as external.
1831
1832 2010-05-07  Jason Merrill  <jason@redhat.com>
1833
1834         * trans-expr.c (gfc_conv_procedure_call): Rename nullptr to null_ptr
1835         to avoid -Wc++-compat warning.
1836
1837 2010-05-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1838
1839         PR 40989
1840         * options.c (gfc_handle_option): Add argument kind.
1841         * gfortran.h (gfc_handle_option): Update declaration.
1842
1843 2010-05-06  Tobias Burnus  <burnus@net-b.de>
1844
1845         PR fortran/43985
1846         * trans-types.c (gfc_sym_type): Mark Cray pointees as
1847         GFC_POINTER_TYPE_P.
1848
1849 2010-05-05  Daniel Franke  <franke.daniel@gmail.com>
1850
1851         PR fortran/32331
1852         * resolve.c (traverse_data_list): Rephrase error message for
1853         non-constant bounds in data-implied-do.
1854
1855 2010-05-05  Daniel Franke  <franke.daniel@gmail.com>
1856
1857         PR fortran/24978
1858         * gfortran.h: Removed repeat count from constructor, removed
1859         all usages.
1860         * data.h (gfc_assign_data_value_range): Changed return value from
1861         void to gfc_try.
1862         * data.c (gfc_assign_data_value): Add location to constructor element.
1863         (gfc_assign_data_value_range): Call gfc_assign_data_value()
1864         for each element in range. Return early if an error was generated.
1865         * resolve.c (check_data_variable): Stop early if range assignment
1866         generated an error.
1867
1868 2010-05-05  Janus Weil  <janus@gcc.gnu.org>
1869
1870         PR fortran/43696
1871         * resolve.c (resolve_fl_derived): Some fixes for class variables.
1872         * symbol.c (gfc_build_class_symbol): Add separate class container for
1873         class pointers.
1874
1875 2010-05-03  Steven G. Kargl  <kargl@gcc.gnu.org>
1876
1877         PR fortran/43592
1878         * fortran/parse.c (parse_interface): Do not dereference a NULL pointer.
1879
1880 2010-05-02  Tobias Burnus  <burnus@net-b.de>
1881
1882         PR fortran/18918
1883         * intrinsic.c (add_functions): Fix GFC_STD and add gfc_resolve_ calls
1884         for lcobound, ucobound, image_index and this_image.
1885         * intrinsic.h (gfc_resolve_lcobound, gfc_resolve_this_image,
1886         gfc_resolve_image_index, gfc_resolve_ucobound): New prototypes.
1887         * iresolve.c (gfc_resolve_lcobound, gfc_resolve_this_image,
1888         gfc_resolve_image_index, gfc_resolve_ucobound, resolve_bound): New
1889         functions.
1890         (gfc_resolve_lbound, gfc_resolve_ubound): Use resolve_bound.
1891
1892 2010-04-30  Tobias Burnus  <burnus@net-b.de>
1893
1894         PR fortran/18918
1895         PR fortran/43931
1896         *  trans-types.c (gfc_get_array_descriptor_base): Fix index
1897         calculation for array descriptor types.
1898
1899 2010-04-29  Janus Weil  <janus@gcc.gnu.org>
1900
1901         PR fortran/43896
1902         * symbol.c (add_proc_component,copy_vtab_proc_comps): Remove
1903         initializers for PPC members of the vtabs.
1904
1905 2010-04-29  Janus Weil  <janus@gcc.gnu.org>
1906
1907         PR fortran/42274
1908         * symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc'
1909         attribute for all PPC members of the vtypes.
1910         (copy_vtab_proc_comps): Copy the correct interface.
1911         * trans.h (gfc_trans_assign_vtab_procs): Modified prototype.
1912         * trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as
1913         a dummy argument and make sure all PPC members of the vtab are
1914         initialized correctly.
1915         (gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument
1916         in call to gfc_trans_assign_vtab_procs.
1917         * trans-stmt.c (gfc_trans_allocate): Ditto.
1918
1919 2010-04-29  Paul Thomas  <pault@gcc.gnu.org>
1920
1921         PR fortran/43326
1922         * resolve.c (resolve_typebound_function): Renamed
1923         resolve_class_compcall.Do all the detection of class references
1924         here.
1925         (resolve_typebound_subroutine): resolve_class_typebound_call
1926         renamed. Otherwise same as resolve_typebound_function.
1927         (gfc_resolve_expr): Call resolve_typebound_function.
1928         (resolve_code): Call resolve_typebound_subroutine.
1929
1930 2010-04-29  Janus Weil  <janus@gcc.gnu.org>
1931
1932         PR fortran/43492
1933         * resolve.c (resolve_typebound_generic_call): For CLASS methods
1934         pass back the specific symtree name, rather than the target
1935         name.
1936
1937 2010-04-29  Paul Thomas  <pault@gcc.gnu.org>
1938
1939         PR fortran/42353
1940         * resolve.c (resolve_structure_cons): Make the initializer of
1941         the vtab component 'extends' the same type as the component.
1942
1943 2010-04-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1944
1945         PR fortran/42680
1946         * interface.c (check_interface1): Pass symbol name rather than NULL to
1947         gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to
1948         trap MULL. (gfc_compare_derived_types): Revert previous change
1949         incorporated incorrectly during merge from trunk, r155778.
1950         * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
1951         than NULL to gfc_compare_interfaces.
1952         * symbol.c (add_generic_specifics): Likewise.
1953
1954 2010-02-29  Janus Weil  <janus@gcc.gnu.org>
1955
1956         PR fortran/42353
1957         * interface.c (gfc_compare_derived_types): Add condition for vtype.
1958         * symbol.c (gfc_find_derived_vtab): Sey access to private.
1959         (gfc_find_derived_vtab): Likewise.
1960         * module.c (ab_attribute): Add enumerator AB_VTAB.
1961         (mio_symbol_attribute): Use new attribute, AB_VTAB.
1962         (check_for_ambiguous): Likewise.
1963
1964 2010-04-29  Paul Thomas  <pault@gcc.gnu.org>
1965             Janus Weil  <janus@gcc.gnu.org>
1966
1967         PR fortran/41829
1968         * trans-expr.c (select_class_proc): Remove function.
1969         (conv_function_val): Delete reference to previous.
1970         (gfc_conv_derived_to_class): Add second argument to the call to
1971         gfc_find_derived_vtab.
1972         (gfc_conv_structure): Exclude proc_pointer components when
1973         accessing $data field of class objects.
1974         (gfc_trans_assign_vtab_procs): New function.
1975         (gfc_trans_class_assign): Add second argument to the call to
1976         gfc_find_derived_vtab.
1977         * symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and
1978         implement holding off searching for the vptr derived type.
1979         (add_proc_component): New function.
1980         (add_proc_comps): New function.
1981         (add_procs_to_declared_vtab1): New function.
1982         (copy_vtab_proc_comps): New function.
1983         (add_procs_to_declared_vtab): New function.
1984         (void add_generic_specifics): New function.
1985         (add_generics_to_declared_vtab): New function.
1986         (gfc_find_derived_vtab): Add second argument to the call to
1987         gfc_find_derived_vtab. Add the calls to
1988         add_procs_to_declared_vtab and add_generics_to_declared_vtab.
1989         * decl.c (build_sym, build_struct): Use new arg in calls to
1990         gfc_build_class_symbol.
1991         * gfortran.h : Add vtype bitfield to symbol_attr. Remove the
1992         definition of struct gfc_class_esym_list. Modify prototypes
1993         of gfc_build_class_symbol and gfc_find_derived_vtab.
1994         * trans-stmt.c (gfc_trans_allocate): Add second argument to the
1995         call to gfc_find_derived_vtab.
1996         * module.c : Add the vtype attribute.
1997         * trans.h : Add prototype for gfc_trans_assign_vtab_procs.
1998         * resolve.c (resolve_typebound_generic_call): Add second arg
1999         to pass along the generic name for class methods.
2000         (resolve_typebound_call): The same.
2001         (resolve_compcall): Use the second arg to carry the generic
2002         name from the above. Remove the reference to class_esym.
2003         (check_members, check_class_members, resolve_class_esym,
2004         hash_value_expr): Remove functions.
2005         (resolve_class_compcall, resolve_class_typebound_call): Modify
2006         to use vtable rather than member by member calls.
2007         (gfc_resolve_expr): Modify second arg in call to
2008         resolve_compcall.
2009         (resolve_select_type): Add second arg in call to
2010         gfc_find_derived_vtab.
2011         (resolve_code): Add second arg in call resolve_typebound_call.
2012         (resolve_fl_derived): Exclude vtypes from check for late
2013         procedure definitions. Likewise for checking of explicit
2014         interface and checking of pass arg.
2015         * iresolve.c (gfc_resolve_extends_type_of): Add second arg in
2016         calls to gfc_find_derived_vtab.
2017         * match.c (select_type_set_tmp): Use new arg in call to
2018         gfc_build_class_symbol.
2019         * trans-decl.c (gfc_get_symbol_decl): Complete vtable if
2020         necessary.
2021         * parse.c (endType): Finish incomplete classes.
2022
2023 2010-04-28  Tobias Burnus  <burnus@net-b.de>
2024
2025         PR fortran/18918
2026         PR fortran/43919
2027         * simplify.c (simplify_cobound): Handle scalar coarrays.
2028
2029 2010-04-27  Tobias Burnus  <burnus@net-b.de>
2030
2031         * gfc-internals.texi: Update copyright year.
2032         * gfortran.texi: Ditto.
2033         * invoke.texi: Ditto.
2034
2035 2010-04-27  Tobias Burnus  <burnus@net-b.de>
2036
2037         PR fortran/18918
2038         * resolve.c (resolve_allocate_expr): Allow array coarrays.
2039         * trans-types.h (gfc_get_array_type_bounds): Update prototype.
2040         * trans-types.c (gfc_get_array_type_bounds,
2041         gfc_get_array_descriptor_base): Add corank argument.
2042         * trans-array.c (gfc_array_init_size): Handle corank.
2043         (gfc_trans_create_temp_array, gfc_array_allocate,
2044         gfc_conv_expr_descriptor): Add corank argument to call.
2045         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Ditto.
2046
2047 2010-04-24  Steven G. Kargl  <kargl@gcc.gnu.org>
2048
2049         PR fortran/30073
2050         PR fortran/43793
2051         * trans-array.c (gfc_trans_array_bound_check): Use TREE_CODE instead
2052         of mucking with a tree directly.
2053
2054 2010-04-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2055
2056         PR fortran/43832
2057         * io.c (gfc_match_open): Remove branch to syntax error. Add call to
2058         gfc_error with new error message.
2059
2060 2010-04-24  Paul Thomas  <pault@gcc.gnu.org>
2061
2062         PR fortran/43841
2063         PR fortran/43843
2064         * trans-expr.c (gfc_conv_expr): Supply an address expression for
2065         GFC_SS_REFERENCE.
2066         (gfc_conv_expr_reference): Call gfc_conv_expr and return for
2067         GFC_SS_REFERENCE.
2068         * trans-array.c (gfc_add_loop_ss_code): Store the value rather
2069         than the address of a GFC_SS_REFERENCE.
2070         * trans.h : Change comment on GFC_SS_REFERENCE. 
2071
2072 2010-04-22  Richard Guenther  <rguenther@suse.de>
2073
2074         PR fortran/43829
2075         * resolve.c (gfc_resolve_index): Wrap around ...
2076         (gfc_resolve_index_1): ... this.  Add parameter to allow
2077         any integer kind index type.
2078         (resolve_array_ref): Allow any integer kind for the start
2079         index of an array ref.
2080
2081 2010-04-21  Jakub Jelinek  <jakub@redhat.com>
2082
2083         PR fortran/43836
2084         * f95-lang.c (gfc_define_builtin): Set TREE_NOTHROW on
2085         the decl.
2086
2087 2010-04-20  Harald Anlauf  <anlauf@gmx.de>
2088
2089         * intrinsic.c (sort_actual): Remove 'is' in error message.
2090
2091 2010-04-20  Paul Thomas  <pault@gcc.gnu.org>
2092
2093         PR fortran/43227
2094         * resolve.c (resolve_fl_derived): If a component character
2095         length has not been resolved, do so now.
2096         (resolve_symbol): The same as above for a symbol character
2097         length.
2098         * trans-decl.c (gfc_create_module_variable): A 'length' decl is
2099         not needed for a character valued, procedure pointer.
2100
2101         PR fortran/43266
2102         * resolve.c (ensure_not_abstract_walker): If 'overriding' is
2103         not found, return FAILURE rather than ICEing.
2104
2105 2010-04-19  Jakub Jelinek  <jakub@redhat.com>
2106
2107         PR fortran/43339
2108         * openmp.c (gfc_resolve_do_iterator): Only make iteration vars for
2109         sequential loops private in the innermost containing task region.
2110
2111 2010-04-18  Eric Botcazou  <ebotcazou@adacore.com>
2112
2113         * f95-lang.c (gfc_init_decl_processing): Remove second argument in call
2114         to build_common_tree_nodes.
2115
2116 2010-04-17  Steven G. Kargl  <kargl@gcc.gnu.org>
2117
2118         PR fortran/31538
2119         * fortran/trans-array.c (gfc_conv_ss_startstride): Remove the use of
2120         gfc_msg_bounds by using 'Array bound mismatch' directly.
2121         (gfc_trans_dummy_array_bias):  Remove the use of gfc_msg_bounds.  Reword
2122         error message to include the mismatch in the extent of array bound.
2123         * fortran/trans.c: Remove gfc_msg_bounds.  It is only used in one place.
2124         * fortran/trans.h: Remove extern definition of gfc_msg_bounds.
2125
2126 2010-04-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2127
2128         * gfortran.texi: Update information on temporary file locations.
2129
2130 2010-04-16  Jakub Jelinek  <jakub@redhat.com>
2131
2132         * trans-decl.c (gfc_build_qualified_array): Ensure
2133         ubound.N and lbound.N artificial variable names don't appear
2134         in debug info.
2135
2136 2010-04-15  Steven G. Kargl  <kargl@gcc.gnu.org>
2137
2138         PR fortran/30073
2139         * trans-array.c (gfc_trans_array_bound_check): Eliminate a redundant
2140         block of code.  Set name to the variable associated with the descriptor.
2141
2142 2010-04-15  Jakub Jelinek  <jakub@redhat.com>
2143
2144         * trans-decl.c (gfc_build_qualified_array): Clear DECL_IGNORED_P
2145         on VAR_DECL LBOUND and/or UBOUND, even for -O1.
2146
2147 2010-04-14  Steven G. Kargl  <kargl@gcc.gnu.org>
2148
2149         * intrinsic.texi: Add the missing specific name of intrinsic
2150         procedure where the specific name is identical to the generic name.
2151         Fix inconsistent or mismatch in the argument names in intrinsic
2152         procedure descriptions.  Add the SCALAR allocatable description to
2153         ALLOCATED.
2154
2155 2010-04-14  Tobias Burnus  <burnus@net-b.de>
2156
2157         PR fortran/18918
2158         * array.c (gfc_find_array_ref): Handle codimensions.
2159         (gfc_match_array_spec,gfc_match_array_ref): Use gfc_fatal_error.
2160         * check.c (is_coarray, dim_corank_check, gfc_check_lcobound,
2161         gfc_check_image_index, gfc_check_this_image, gfc_check_ucobound):
2162         New functions.
2163         * gfortran.h (gfc_isym_id): Add GFC_ISYM_IMAGE_INDEX,
2164         GFC_ISYM_LCOBOUND, GFC_ISYM_THIS_IMAGE,
2165         GFC_ISYM_UCOBOUND.
2166         * intrinsic.h (add_functions): Add this_image, image_index,
2167         lcobound and ucobound intrinsics.
2168         * intrinsic.c (gfc_check_lcobound,gfc_check_ucobound,
2169         gfc_check_image_index, gfc_check_this_image,
2170         gfc_simplify_image_index, gfc_simplify_lcobound,
2171         gfc_simplify_this_image, gfc_simplify_ucobound):
2172         New function prototypes.
2173         * intrinsic.texi (IMAGE_INDEX, LCOBOUND, THIS_IMAGE
2174         IMAGE_INDEX): Document new intrinsic functions.
2175         * match.c (gfc_match_critical, sync_statement): Make -fcoarray=none
2176         error fatal.
2177         * simplify.c (simplify_bound_dim): Handle coarrays.
2178         (simplify_bound): Update simplify_bound_dim call.
2179         (gfc_simplify_num_images): Add -fcoarray=none check.
2180         (simplify_cobound, gfc_simplify_lcobound, gfc_simplify_ucobound,
2181         gfc_simplify_ucobound, gfc_simplify_ucobound): New functions.
2182
2183 2010-04-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2184
2185         PR fortran/43747
2186         * constructor.c: Fix typo in comment.
2187         * expr.c (find_array_section): Add check for max array limit.
2188
2189 2010-04-13  Iain Sandoe  <iains@gcc.gnu.org>
2190
2191         PR bootstrap/31400
2192         * gfortranspec.c (lookup_option): Check for -static and return
2193         OPTION_static.
2194         (lang_specific_driver): Break when OPTION_static is discovered.
2195
2196 2010-04-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2197
2198         * array.c (extract_element): Restore function from trunk.
2199         (gfc_get_array_element): Restore function from trunk.
2200         (gfc_expand_constructor): Restore check against
2201         flag_max_array_constructor.
2202         * constructor.c (node_copy_and_append): Delete unused.
2203         * gfortran.h: Delete comment and extra include.
2204         * constructor.h: Bump copyright and clean up TODO comments.
2205         * resolve.c: Whitespace.
2206
2207 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
2208
2209         * simplify.c (compute_dot_product): Replaced usage of ADVANCE macro
2210         with direct access access to elements. Adjusted prototype, fixed all
2211         callers.
2212         (gfc_simplify_dot_product): Removed duplicate check for zero-sized
2213         array.
2214         (gfc_simplify_matmul): Removed usage of ADVANCE macro.
2215         (gfc_simplify_spread): Removed workaround, directly insert elements
2216         at a given array position.
2217         (gfc_simplify_transpose): Likewise.
2218         (gfc_simplify_pack): Replaced usage of ADVANCE macro with corresponding
2219         function calls.
2220         (gfc_simplify_unpack): Likewise.
2221
2222 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
2223
2224         * simplify.c (only_convert_cmplx_boz): Renamed to ...
2225         (convert_boz): ... this and moved to start of file.
2226         (gfc_simplify_abs): Whitespace fix.
2227         (gfc_simplify_acos): Whitespace fix.
2228         (gfc_simplify_acosh): Whitespace fix.
2229         (gfc_simplify_aint): Whitespace fix.
2230         (gfc_simplify_dint): Whitespace fix.
2231         (gfc_simplify_anint): Whitespace fix.
2232         (gfc_simplify_and): Replaced if-gate by more common switch-over-type.
2233         (gfc_simplify_dnint): Whitespace fix.
2234         (gfc_simplify_asin): Whitespace fix.
2235         (gfc_simplify_asinh): Moved creation of result-expr out of switch.
2236         (gfc_simplify_atan): Likewise.
2237         (gfc_simplify_atanh): Whitespace fix.
2238         (gfc_simplify_atan2): Whitespace fix.
2239         (gfc_simplify_bessel_j0): Removed ATTRIBUTE_UNUSED.
2240         (gfc_simplify_bessel_j1): Likewise.
2241         (gfc_simplify_bessel_jn): Likewise.
2242         (gfc_simplify_bessel_y0): Likewise.
2243         (gfc_simplify_bessel_y1): Likewise.
2244         (gfc_simplify_bessel_yn): Likewise.
2245         (gfc_simplify_ceiling): Reorderd statements.
2246         (simplify_cmplx): Use convert_boz(), check for constant arguments.
2247         Whitespace fix.
2248         (gfc_simplify_cmplx): Use correct default kind. Removed check for
2249         constant arguments.
2250         (gfc_simplify_complex): Replaced if-gate. Removed check for
2251         constant arguments.
2252         (gfc_simplify_conjg): Whitespace fix.
2253         (gfc_simplify_cos): Whitespace fix.
2254         (gfc_simplify_cosh): Replaced if-gate by more common switch-over-type.
2255         (gfc_simplify_dcmplx): Removed check for constant arguments.
2256         (gfc_simplify_dble): Use convert_boz() and gfc_convert_constant().
2257         (gfc_simplify_digits): Whitespace fix.
2258         (gfc_simplify_dim): Whitespace fix.
2259         (gfc_simplify_dprod): Reordered statements.
2260         (gfc_simplify_erf): Whitespace fix.
2261         (gfc_simplify_erfc): Whitespace fix.
2262         (gfc_simplify_epsilon): Whitespace fix.
2263         (gfc_simplify_exp): Whitespace fix.
2264         (gfc_simplify_exponent): Use convert_boz().
2265         (gfc_simplify_floor): Reorderd statements.
2266         (gfc_simplify_gamma): Whitespace fix.
2267         (gfc_simplify_huge): Whitespace fix.
2268         (gfc_simplify_iand): Whitespace fix.
2269         (gfc_simplify_ieor): Whitespace fix.
2270         (simplify_intconv): Use gfc_convert_constant().
2271         (gfc_simplify_int): Use simplify_intconv().
2272         (gfc_simplify_int2): Reorderd statements.
2273         (gfc_simplify_idint): Reorderd statements.
2274         (gfc_simplify_ior): Whitespace fix.
2275         (gfc_simplify_ishftc): Removed duplicate type check.
2276         (gfc_simplify_len): Use range_check() instead of manual range check.
2277         (gfc_simplify_lgamma): Removed ATTRIBUTE_UNUSED. Whitespace fix.
2278         (gfc_simplify_log): Whitespace fix.
2279         (gfc_simplify_log10): Whitespace fix.
2280         (gfc_simplify_minval): Whitespace fix.
2281         (gfc_simplify_maxval): Whitespace fix.
2282         (gfc_simplify_mod): Whitespace fix.
2283         (gfc_simplify_modulo): Whitespace fix.
2284         (simplify_nint): Reorderd statements.
2285         (gfc_simplify_not): Whitespace fix.
2286         (gfc_simplify_or): Replaced if-gate by more common switch-over-type.
2287         (gfc_simplify_radix): Removed unused result-variable. Whitespace fix.
2288         (gfc_simplify_range): Removed unused result-variable. Whitespace fix.
2289         (gfc_simplify_real): Use convert_boz() and gfc_convert_constant().
2290         (gfc_simplify_realpart): Whitespace fix.
2291         (gfc_simplify_selected_char_kind): Removed unused result-variable.
2292         (gfc_simplify_selected_int_kind): Removed unused result-variable.
2293         (gfc_simplify_selected_real_kind): Removed unused result-variable.
2294         (gfc_simplify_sign): Whitespace fix.
2295         (gfc_simplify_sin): Whitespace fix.
2296         (gfc_simplify_sinh): Replaced if-gate by more common switch-over-type.
2297         (gfc_simplify_sqrt): Avoided goto by inlining check. Whitespace fix.
2298         (gfc_simplify_tan): Replaced if-gate by more common switch-over-type.
2299         (gfc_simplify_tanh): Replaced if-gate by more common switch-over-type.
2300         (gfc_simplify_xor): Replaced if-gate by more common switch-over-type.
2301
2302 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
2303
2304         * gfortran.h (gfc_start_constructor): Removed.
2305         (gfc_get_array_element): Removed.
2306         * array.c (gfc_start_constructor): Removed, use gfc_get_array_expr 
2307         instead. Fixed all callers.
2308         (extract_element): Removed.
2309         (gfc_expand_constructor): Temporarily removed check for
2310         max-array-constructor. Will be re-introduced later if still required.
2311         (gfc_get_array_element): Removed, use gfc_constructor_lookup_expr
2312         instead. Fixed all callers.
2313         * expr.c (find_array_section): Replaced manual lookup of elements
2314         by gfc_constructor_lookup.
2315
2316 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
2317
2318         * gfortran.h (gfc_get_null_expr): New prototype.
2319         (gfc_get_operator_expr): New prototype.
2320         (gfc_get_character_expr): New prototype.
2321         (gfc_get_iokind_expr): New prototype.
2322         * expr.c (gfc_get_null_expr): New.
2323         (gfc_get_character_expr): New.
2324         (gfc_get_iokind_expr): New.
2325         (gfc_get_operator_expr): Moved here from matchexp.c (build_node).
2326         * matchexp.c (build_node): Renamed and moved to
2327         expr.c (gfc_get_operator_expr). Reordered arguments to match 
2328         other functions. Fixed all callers.
2329         (gfc_get_parentheses): Use specific function to build expr.
2330         * array.c (gfc_match_array_constructor): Likewise.
2331         * arith.c (eval_intrinsic): Likewise.
2332         (gfc_hollerith2int): Likewise.
2333         (gfc_hollerith2real): Likewise.
2334         (gfc_hollerith2complex): Likewise.
2335         (gfc_hollerith2logical): Likewise.
2336         * data.c (create_character_intializer): Likewise.
2337         * decl.c (gfc_match_null): Likewise.
2338         (enum_initializer): Likewise.
2339         * io.c (gfc_match_format): Likewise.
2340         (match_io): Likewise.
2341         * match.c (gfc_match_nullify): Likewise.
2342         * primary.c (match_string_constant): Likewise.
2343         (match_logical_constant): Likewise.
2344         (build_actual_constructor): Likewise.
2345         * resolve.c (build_default_init_expr): Likewise.
2346         * symbol.c (generate_isocbinding_symbol): Likewise.
2347         (gfc_build_class_symbol): Likewise.
2348         (gfc_find_derived_vtab): Likewise.
2349         * simplify.c (simplify_achar_char): Likewise.
2350         (gfc_simplify_adjustl): Likewise.
2351         (gfc_simplify_adjustr): Likewise.
2352         (gfc_simplify_and): Likewise.
2353         (gfc_simplify_bit_size): Likewise.
2354         (gfc_simplify_is_iostat_end): Likewise.
2355         (gfc_simplify_is_iostat_eor): Likewise.
2356         (gfc_simplify_isnan): Likewise.
2357         (simplify_bound): Likewise.
2358         (gfc_simplify_leadz): Likewise.
2359         (gfc_simplify_len_trim): Likewise.
2360         (gfc_simplify_logical): Likewise.
2361         (gfc_simplify_maxexponent): Likewise.
2362         (gfc_simplify_minexponent): Likewise.
2363         (gfc_simplify_new_line): Likewise.
2364         (gfc_simplify_null): Likewise.
2365         (gfc_simplify_or): Likewise.
2366         (gfc_simplify_precision): Likewise.
2367         (gfc_simplify_repeat): Likewise.
2368         (gfc_simplify_scan): Likewise.
2369         (gfc_simplify_size): Likewise.
2370         (gfc_simplify_trailz): Likewise.
2371         (gfc_simplify_trim): Likewise.
2372         (gfc_simplify_verify): Likewise.
2373         (gfc_simplify_xor): Likewise.
2374         * trans-io.c (build_dt): Likewise.
2375         (gfc_new_nml_name_expr): Removed.
2376
2377 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
2378
2379         * arith.h (gfc_constant_result): Removed prototype.
2380         * constructor.h (gfc_build_array_expr): Removed prototype.
2381         (gfc_build_structure_constructor_expr): Removed prototype.
2382         * gfortran.h (gfc_int_expr): Removed prototype.
2383         (gfc_logical_expr): Removed prototype.
2384         (gfc_get_array_expr): New prototype.
2385         (gfc_get_structure_constructor_expr): New prototype.
2386         (gfc_get_constant_expr): New prototype.
2387         (gfc_get_int_expr): New prototype.
2388         (gfc_get_logical_expr): New prototype.
2389         * arith.c (gfc_constant_result): Moved and renamed to
2390         expr.c (gfc_get_constant_expr). Fixed all callers.
2391         * constructor.c (gfc_build_array_expr): Moved and renamed to
2392         expr.c (gfc_get_array_expr). Split gfc_typespec argument to type
2393         and kind. Fixed all callers.
2394         (gfc_build_structure_constructor_expr): Moved and renamed to
2395         expr.c (gfc_get_structure_constructor_expr). Split gfc_typespec argument
2396         to type and kind. Fixed all callers.
2397         * expr.c (gfc_logical_expr): Renamed to ...
2398         (gfc_get_logical_expr): ... this. Added kind argument. Fixed all callers.
2399         (gfc_int_expr): Renamed to ...
2400         (gfc_get_int_expr): ... this. Added kind and where arguments. Fixed all
2401         callers.
2402         (gfc_get_constant_expr): New.
2403         (gfc_get_array_expr): New.
2404         (gfc_get_structure_constructor_expr): New.
2405         * simplify.c (int_expr_with_kind): Removed, callers use gfc_get_int_expr
2406         instead.
2407
2408 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
2409
2410         * constructor.h: New.
2411         * constructor.c: New.
2412         * Make-lang.in: Add new files to F95_PARSER_OBJS.
2413         * arith.c (reducy_unary): Use constructor API.
2414         (reduce_binary_ac): Likewise.
2415         (reduce_binary_ca): Likewise.
2416         (reduce_binary_aa): Likewise.
2417         * check.c (gfc_check_pack): Likewise.
2418         (gfc_check_reshape): Likewise.
2419         (gfc_check_unpack): Likewise.
2420         * decl.c (add_init_expr_to_sym): Likewise.
2421         (build_struct): Likewise.
2422         * dependency.c (gfc_check_dependency): Likewise.
2423         (contains_forall_index_p): Likewise.
2424         * dump-parse-tree.c (show_constructor): Likewise.
2425         * expr.c (free_expr0): Likewise.
2426         (gfc_copy_expr): Likewise.
2427         (gfc_is_constant_expr): Likewise.
2428         (simplify_constructor): Likewise.
2429         (find_array_element): Likewise.
2430         (find_component_ref): Likewise.
2431         (find_array_section): Likewise.
2432         (find_substring_ref): Likewise.
2433         (simplify_const_ref): Likewise.
2434         (scalarize_intrinsic_call): Likewise.
2435         (check_alloc_comp_init): Likewise.
2436         (gfc_default_initializer): Likewise.
2437         (gfc_traverse_expr): Likewise.
2438         * iresolve.c (check_charlen_present): Likewise.
2439         (gfc_resolve_reshape): Likewise.
2440         (gfc_resolve_transfer): Likewise.
2441         * module.c (mio_constructor): Likewise.
2442         * primary.c (build_actual_constructor): Likewise.
2443         (gfc_match_structure_constructor): Likewise.
2444         * resolve.c (resolve_structure_cons): Likewise.
2445         * simplify.c (is_constant_array_expr): Likewise.
2446         (init_result_expr): Likewise.
2447         (transformational_result): Likewise.
2448         (simplify_transformation_to_scalar): Likewise.
2449         (simplify_transformation_to_array): Likewise.
2450         (gfc_simplify_dot_product): Likewise.
2451         (simplify_bound): Likewise.
2452         (simplify_matmul): Likewise.
2453         (simplify_minval_maxval): Likewise.
2454         (gfc_simplify_pack): Likewise.
2455         (gfc_simplify_reshape): Likewise.
2456         (gfc_simplify_shape): Likewise.
2457         (gfc_simplify_spread): Likewise.
2458         (gfc_simplify_transpose): Likewise.
2459         (gfc_simplify_unpack): Likewise.q
2460         (gfc_convert_constant): Likewise.
2461         (gfc_convert_char_constant): Likewise.
2462         * target-memory.c (size_array): Likewise.
2463         (encode_array): Likewise.
2464         (encode_derived): Likewise.
2465         (interpret_array): Likewise.
2466         (gfc_interpret_derived): Likewise.
2467         (expr_to_char): Likewise.
2468         (gfc_merge_initializers): Likewise.
2469         * trans-array.c (gfc_get_array_constructor_size): Likewise.
2470         (gfc_trans_array_constructor_value): Likewise.
2471         (get_array_ctor_strlen): Likewise.
2472         (gfc_constant_array_constructor_p): Likewise.
2473         (gfc_build_constant_array_constructor): Likewise.
2474         (gfc_trans_array_constructor): Likewise.
2475         (gfc_conv_array_initializer): Likewise.
2476         * trans-decl.c (check_constant_initializer): Likewise.
2477         * trans-expr.c (flatten_array_ctors_without_strlen): Likewise.
2478         (gfc_apply_interface_mapping_to_cons): Likewise.
2479         (gfc_trans_structure_assign): Likewise.
2480         (gfc_conv_structure): Likewise.
2481         * array.c (check_duplicate_iterator): Likewise.
2482         (match_array_list): Likewise.
2483         (match_array_cons_element): Likewise.
2484         (gfc_match_array_constructor): Likewise.
2485         (check_constructor_type): Likewise.
2486         (check_constructor): Likewise.
2487         (expand): Likewise.
2488         (expand_constructor): Likewise.
2489         (extract_element): Likewise.
2490         (gfc_expanded_ac): Likewise.
2491         (resolve_array_list): Likewise.
2492         (gfc_resolve_character_array_constructor): Likewise.
2493         (copy_iterator): Renamed to ...
2494         (gfc_copy_iterator): ... this.
2495         (gfc_append_constructor): Removed.
2496         (gfc_insert_constructor): Removed unused function.
2497         (gfc_get_constructor): Removed.
2498         (gfc_free_constructor): Removed.
2499         (qgfc_copy_constructor): Removed.
2500         * gfortran.h (struct gfc_expr): Removed member 'con_by_offset'.
2501         Removed all references. Replaced constructor list by splay-tree.
2502         (struct gfc_constructor): Removed member 'next', moved 'offset' from
2503         the inner struct, added member 'base'.
2504         (gfc_append_constructor): Removed prototype.
2505         (gfc_insert_constructor): Removed prototype.
2506         (gfc_get_constructor): Removed prototype.
2507         (gfc_free_constructor): Removed prototype.
2508         (qgfc_copy_constructor): Removed prototype.
2509         (gfc_copy_iterator): New prototype.
2510         * trans-array.h (gfc_constant_array_constructor_p): Adjusted prototype.
2511
2512 2010-04-10  Tobias Burnus  <burnus@net-b.de>
2513
2514         PR fortran/43591
2515         * expr.c (gfc_is_constant_expr, gfc_traverse_expr): Handle
2516         proc-pointers and type-bound procedures.
2517         (gfc_specification_expr): Check proc-pointers for pureness.
2518
2519 2010-04-09  Iain Sandoe  <iains@gcc.gnu.org>
2520
2521         PR bootstrap/43684
2522         * gfortranspec.c (lang_specific_driver): Do not expose vars 
2523         only used by HAVE_LD_STATIC_DYNAMIC targets unless compiling
2524         for such.
2525
2526 2010-04-09  Tobias Burnus  <burnus@net-b.de>
2527
2528         PR fortran/18918
2529         * decl.c (variable_decl, match_attr_spec): Fix setting the array
2530         spec.
2531         * array.c (match_subscript,gfc_match_array_ref): Add coarray support.
2532         * data.c (gfc_assign_data_value): Ditto.
2533         * expr.c (gfc_check_pointer_assign): Add check for coarray constraint.
2534         (gfc_traverse_expr): Traverse also through codimension expressions.
2535         (gfc_is_coindexed, gfc_has_ultimate_allocatable,
2536         gfc_has_ultimate_pointer): New functions.
2537         * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_STAR for coarrays.
2538         (gfc_array_ref): Add codimen.
2539         (gfc_array_ref): Add in_allocate.
2540         (gfc_is_coindexed, gfc_has_ultimate_allocatable,
2541         gfc_has_ultimate_pointer): Add prototypes.
2542         * interface.c (compare_parameter, compare_actual_formal,
2543         check_intents): Add coarray constraints.
2544         * match.c (gfc_match_iterator): Add coarray constraint.
2545         * match.h (gfc_match_array_ref): Update interface.
2546         * primary.c (gfc_match_varspec): Handle codimensions.
2547         * resolve.c (coarray_alloc, inquiry_argument): New static variables.
2548         (check_class_members): Return gfc_try instead for error recovery.
2549         (resolve_typebound_function,resolve_typebound_subroutine,
2550         check_members): Handle return value of check_class_members.
2551         (resolve_structure_cons, resolve_actual_arglist, resolve_function,
2552         check_dimension, compare_spec_to_ref, resolve_array_ref,
2553         resolve_ref, resolve_variable, gfc_resolve_expr, conformable_arrays,
2554         resolve_allocate_expr, resolve_ordinary_assign): Add coarray
2555         support.
2556         * trans-array.c (gfc_conv_array_ref, gfc_walk_variable_expr):
2557         Skip over coarray refs.
2558         (gfc_array_allocate) Add support for references containing coindexes.
2559         * trans-expr.c (gfc_add_interface_mapping): Copy coarray attribute.
2560         (gfc_map_intrinsic_function): Ignore codimensions.
2561
2562 2010-04-08  Bud Davis  <bdavis9659@sbcglobal.net>
2563
2564         PR fortran/28039
2565         * io.c (check_format_string):  Added check for additional non 
2566         blank characters after the format string was successfully 
2567         parsed.
2568         * io.c (check_format): Changed the error messages for positive
2569         int required and period required to drop through the error logic
2570         and report with gfc_error instead of gfc_error_now.  Corrected
2571         format postion for hollerith strings.
2572
2573 2010-04-08  Tobias Burnus  <burnus@net-b.de>
2574
2575         * module.c (use_iso_fortran_env_module): Fix standard check.
2576
2577 2010-04-07  Jakub Jelinek  <jakub@redhat.com>
2578
2579         * parse.c (parse_derived, parse_enum): Avoid set but not used
2580         warning.
2581
2582 2010-04-07  Janne Blomqvist  <jb@gcc.gnu.org>
2583
2584         PR fortran/40539
2585         * gfortran.texi: Add section about representation of
2586         LOGICAL variables.
2587
2588 2010-04-07  Simon Baldwin  <simonb@google.com>
2589
2590         * cpp.c (cb_cpp_error): Add warning reason argument, set a value
2591         for diagnostic_override_option_index if CPP_W_WARNING_DIRECTIVE.
2592
2593 2010-04-07  Richard Guenther  <rguenther@suse.de>
2594
2595         * options.c (gfc_init_options): Do not set.
2596
2597 2010-04-06  Tobias Burnus  <burnus@net-b.de>
2598
2599         PR fortran/18918
2600         * array.c (gfc_match_array_spec): Add error for -fcoarray=none.
2601         * match.c (gfc_match_critical, sync_statement): Ditto.
2602         * gfortran.h (gfc_fcoarray): New enum.
2603         (gfc_option_t): Use it.
2604         * lang.opt (fcoarray): Add new flag.
2605         * invoke.texi (fcoarray): Document it.
2606         * options.c (gfc_init_options,gfc_handle_option): Handle -fcoarray=.
2607         (gfc_handle_coarray_option): New function.
2608
2609 2010-04-06  Tobias Burnus  <burnus@net-b.de>
2610
2611         PR fortran/18918
2612         * gfortran.h (gfc_array_spec): Add cotype.
2613         * array.c (gfc_match_array_spec,gfc_set_array_spec): Use it
2614         and defer error diagnostic.
2615         * resolve.c (resolve_fl_derived): Add missing check.
2616         (resolve_symbol): Add cotype/type check.
2617         * parse.c (parse_derived): Fix setting of coarray_comp.
2618
2619 2010-04-06  Tobias Burnus  <burnus@net-b.de>
2620
2621         PR fortran/18918
2622         * array.c (gfc_free_array_spec,gfc_resolve_array_spec,
2623         match_array_element_spec,gfc_copy_array_spec,
2624         gfc_compare_array_spec): Include corank.
2625         (match_array_element_spec,gfc_set_array_spec): Support codimension.
2626         * decl.c (build_sym,build_struct,variable_decl,
2627         match_attr_spec,attr_decl1,cray_pointer_decl,
2628         gfc_match_volatile): Add codimension.
2629         (gfc_match_codimension): New function.
2630         * dump-parse-tree.c (show_array_spec,show_attr): Support codimension.
2631         * gfortran.h (symbol_attribute,gfc_array_spec): Ditto.
2632         (gfc_add_codimension): New function prototype.
2633         * match.h (gfc_match_codimension): New function prototype.
2634         (gfc_match_array_spec): Update prototype
2635         * match.c (gfc_match_common): Update gfc_match_array_spec call.
2636         * module.c (MOD_VERSION): Bump.
2637         (mio_symbol_attribute): Support coarray attributes.
2638         (mio_array_spec): Add corank support.
2639         * parse.c (decode_specification_statement,decode_statement,
2640         parse_derived): Add coarray support.
2641         * resolve.c (resolve_formal_arglist, was_declared,
2642         is_non_constant_shape_array, resolve_fl_variable,
2643         resolve_fl_derived, resolve_symbol): Add coarray support.
2644         * symbol.c (check_conflict, gfc_add_volatile, gfc_copy_attr,
2645         gfc_build_class_symbol): Add coarray support.
2646         (gfc_add_codimension): New function.
2647
2648 2010-04-06  Tobias Burnus  <burnus@net-b.de>
2649
2650         PR fortran/18918
2651         * iso-fortran-env.def: Add the integer parameters atomic_int_kind,
2652         atomic_logical_kind, iostat_inquire_internal_unit, stat_locked,
2653         stat_locked_other_image, stat_stopped_image and stat_unlocked of
2654         Fortran 2008.
2655         * intrinsic.texi (iso_fortran_env): Ditto.
2656         * libgfortran.h (libgfortran_stat_codes): New enum.
2657         * module.c (use_iso_fortran_env_module): Honour -std= when loading
2658         constants from the intrinsic module.
2659
2660 2010-04-06  Tobias Burnus  <burnus@net-b.de>
2661
2662         PR fortran/39997
2663         * intrinsic.c (add_functions): Add num_images.
2664         * decl.c (gfc_match_end): Handle END CRITICAL.
2665         * intrinsic.h (gfc_simplify_num_images): Add prototype.
2666         * dump-parse-tree.c (show_code_node): Dump CRITICAL, ERROR STOP,
2667         and SYNC.
2668         * gfortran.h (gfc_statement): Add enum items for those.
2669         (gfc_exec_op) Ditto.
2670         (gfc_isym_id): Add num_images.
2671         * trans-stmt.c (gfc_trans_stop): Handle ERROR STOP.
2672         (gfc_trans_sync,gfc_trans_critical): New functions.
2673         * trans-stmt.h (gfc_trans_stop,gfc_trans_sync,
2674         gfc_trans_critical): Add/update prototypes.
2675         * trans.c (gfc_trans_code): Handle CRITICAL, ERROR STOP,
2676         and SYNC statements.
2677         * trans.h (gfor_fndecl_error_stop_string) Add variable.
2678         * resolve.c (resolve_sync): Add function.
2679         (gfc_resolve_blocks): Handle CRITICAL.
2680         (resolve_code): Handle CRITICAL, ERROR STOP,
2681         (resolve_branch): Add CRITICAL constraint check.
2682         and SYNC statements.
2683         * st.c (gfc_free_statement): Add new statements.
2684         * trans-decl.c (gfor_fndecl_error_stop_string): Global variable.
2685         (gfc_build_builtin_function_decls): Initialize it.
2686         * match.c (gfc_match_if): Handle ERROR STOP and SYNC.
2687         (gfc_match_critical, gfc_match_error_stop, sync_statement,
2688         gfc_match_sync_all, gfc_match_sync_images, gfc_match_sync_memory):
2689         New functions.
2690         (match_exit_cycle): Handle CRITICAL constraint.
2691         (gfc_match_stopcode): Handle ERROR STOP.
2692         * match.h (gfc_match_critical, gfc_match_error_stop,
2693         gfc_match_sync_all, gfc_match_sync_images,
2694         gfc_match_sync_memory): Add prototype.
2695         * parse.c (decode_statement, gfc_ascii_statement,
2696         parse_executable): Handle new statements.
2697         (parse_critical_block): New function.
2698         * parse.h (gfc_compile_state): Add COMP_CRITICAL.
2699         * intrinsic.texi (num_images): Document new function.
2700         * simplify.c (gfc_simplify_num_images): Add function.
2701
2702 2010-04-06  Tobias Burnus  <burnus@net-b.de>
2703
2704         PR fortran/43178
2705         * trans-array.c (gfc_conv_expr_descriptor): Update
2706         gfc_trans_scalar_assign call.
2707         (has_default_initializer): New function.
2708         (gfc_trans_deferred_array): Nullify less often.
2709         * trans-expr.c (gfc_conv_subref_array_arg,
2710         gfc_trans_subcomponent_assign): Update call to
2711         gfc_trans_scalar_assign.
2712         (gfc_trans_scalar_assign): Add parameter and pass it on.
2713         (gfc_trans_assignment_1): Optionally, do not dealloc before
2714         assignment.
2715         * trans-openmp.c (gfc_trans_omp_array_reduction): Update
2716         call to gfc_trans_scalar_assign.
2717         * trans-decl.c (gfc_get_symbol_decl): Do not always apply
2718         initializer to static variables.
2719         (gfc_init_default_dt): Add dealloc parameter and pass it on.
2720         * trans-stmt.c (forall_make_variable_temp,
2721         generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
2722         gfc_trans_forall_1, gfc_trans_where_assign, gfc_trans_where_3
2723         gfc_trans_allocate): Update gfc_trans_assignment call.
2724         * trans.h (gfc_trans_scalar_assign, gfc_init_default_dt,
2725         gfc_init_default_dt, gfc_trans_assignment): Add bool dealloc
2726         parameter to prototype.
2727
2728 2010-03-31  Paul Thomas  <pault@gcc.gnu.org>
2729
2730         * ioparm.def : Update copyright.
2731         * lang.opt : ditto
2732         * trans-array.c : ditto
2733         * trans-array.h : ditto
2734         * expr.c: ditto
2735         * trans-types.c: ditto
2736         * dependency.c : ditto
2737         * gfortran.h : ditto
2738         * options.c : ditto
2739         * trans-io.c : ditto
2740         * trans-intrinsic.c : ditto
2741         * libgfortran.h : ditto
2742         * invoke.texi : ditto
2743         * intrinsic.texi : ditto
2744         * trans.c : ditto
2745         * trans.h : ditto
2746         * intrinsic.c : ditto
2747         * interface.c : ditto
2748         * iresolve.c : ditto
2749         * trans-stmt.c : ditto
2750         * trans-stmt.h : ditto
2751         * parse,c : ditto
2752         * match.h : ditto
2753         * error.c : ditto
2754
2755 2010-03-20  Paul Thomas  <pault@gcc.gnu.org>
2756
2757         PR fortran/43450
2758         * trans-decl.c (gfc_create_module_variable): With -fwhole-file
2759         do not assert the context of derived types.
2760
2761 2010-03-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2762
2763         PR fortran/43409
2764         * ioparm.def: Change inquire size variable to type pointer to
2765         GFC_IO_INT type.
2766
2767 2010-03-18  Paul Thomas  <pault@gcc.gnu.org>
2768
2769         PR fortran/43039
2770         * trans-expr.c (conv_parent_component_references): Ensure that
2771         'dt' has a backend_decl.
2772
2773         PR fortran/43043
2774         * trans-expr.c (gfc_conv_structure): Ensure that the derived
2775         type has a backend_decl.
2776
2777         PR fortran/43044
2778         * resolve.c (resolve_global_procedure): Check that the 'cl'
2779         structure is not NULL.
2780
2781 2010-03-18  Shujing Zhao  <pearly.zhao@oracle.com>
2782
2783         * lang.opt (-ffixed-line-length-, ffree-line-length-): Remove
2784         redundant tab.
2785
2786 2010-03-17  Tobias Burnus  <burnus@net-b.de>
2787
2788         PR fortran/43331
2789         * trans-array.c (gfc_conv_array_index_offset,gfc_conv_array_ref,
2790         gfc_conv_ss_startstride): Remove no-longer-needed cp_was_assumed
2791         check.
2792         * decl.c (gfc_match_derived_decl): Don't mark assumed-size Cray
2793         pointees as having explizit size.
2794         * expr.c (gfc_check_assign): Remove now unreachable Cray pointee
2795         check.
2796         * trans-types.c (gfc_is_nodesc_array): Add cp_was_assumed to assert.
2797         (gfc_sym_type): Don't mark Cray pointees as restricted pointers.
2798         * resolve.c (resolve_symbol): Handle cp_was_assumed.
2799         * trans-decl.c (gfc_trans_deferred_vars): Ditto.
2800         (gfc_finish_var_decl): Don't mark Cray pointees as restricted
2801         pointers.
2802
2803 2010-03-14  Tobias Burnus  <burnus@net-b.de>
2804
2805         PR fortran/43362
2806         * resolve.c (resolve_structure_cons): Add missing PURE constraint.
2807         (resolve_ordinary_assign): Add check to avoid segfault.
2808
2809 2010-03-12  Paul Thomas  <pault@gcc.gnu.org>
2810
2811         PR fortran/43291
2812         PR fortran/43326
2813         * resolve.c (resolve_compcall): Add new boolean dummy argument
2814         'class_members'. Only resolve expression at end if false.
2815         Remove redundant, static variable 'class_object'.
2816         (check_class_members): Add extra argument to call of
2817         resolve_compcall.
2818         (resolve_typebound_function): Renamed resolve_class_compcall.
2819         Do all the detection of class references here. Correct calls to
2820         resolve_compcall for extra argument.
2821         (resolve_typebound_subroutine): resolve_class_typebound_call
2822         renamed. Otherwise same as resolve_typebound_function.
2823         (gfc_resolve_expr): Call resolve_typebound_function.
2824         (resolve_code): Call resolve_typebound_subroutine.
2825
2826 2010-03-10  Tobias Burnus  <burnus@net-b.de
2827
2828         PR fortran/43303
2829         * symbol.c (get_iso_c_sym): Set sym->result.
2830
2831 2010-03-08  Janus Weil  <janus@gcc.gnu.org>
2832
2833         PR fortran/43256
2834         * resolve.c (resolve_compcall): Don't set 'value.function.name' here
2835         for TBPs, otherwise they will not be resolved properly.
2836         (resolve_function): Use 'value.function.esym' instead of
2837         'value.function.name' to check if we're dealing with a TBP.
2838         (check_class_members): Set correct type of passed object for all TBPs,
2839         not only generic ones, except if the type is abstract.
2840
2841 2010-03-04  Janus Weil  <janus@gcc.gnu.org>
2842
2843         PR fortran/43244
2844         * decl.c (gfc_match_final_decl): Make sure variable names starting with
2845         'final...' are not misinterpreted as FINAL statements.
2846
2847 2010-03-03  Paul Thomas  <pault@gcc.gnu.org>
2848
2849         PR fortran/43243
2850         * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
2851         allocatable ultimate components do not need temporaries, whilst
2852         ultimate pointer components do.
2853
2854 2010-03-03  Janus Weil  <janus@gcc.gnu.org>
2855
2856         PR fortran/43169
2857         * resolve.c (resolve_code): Correctly set gfc_current_ns for
2858         EXEC_SELECT_TYPE.
2859         (gfc_impure_variable): Make it work with sub-namespaces (BLOCK etc).
2860         (gfc_pure): Ditto.
2861
2862 2010-03-02  Paul Thomas  <pault@gcc.gnu.org>
2863
2864         PR fortran/43180
2865         * trans-array.c (gfc_conv_array_parameter): A full array of
2866         derived type need not be restricted to a symbol without an
2867         array spec to use the call to gfc_conv_expr_descriptor.
2868
2869         PR fortran/43173
2870         * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
2871         allocatable arrays do not need temporaries.
2872
2873 2010-03-01  Tobias Burnus  <burnus@net-b.de>
2874
2875         PR fortran/43199
2876         * resolve.c (find_array_spec): Handle REF_COMPONENT with
2877         CLASS components.
2878
2879 2010-02-28  Tobias Burnus  <burnus@net-b.de>
2880
2881         PR fortran/43205
2882         * trans-expr.c (is_zero_initializer_p): Move up in the file.
2883         (gfc_conv_initializer): Handle zero initializer as special case.
2884
2885 2010-02-27  Tobias Burnus  <burnus@net-b.de>
2886
2887         PR fortran/43185
2888         * resolve.c (resolve_fl_variable_derived): Imply SAVE
2889         for module variables for Fortran 2008.
2890
2891 2010-02-25  Jakub Jelinek  <jakub@redhat.com>
2892
2893         PR debug/43166
2894         * trans-common.c (build_common_decl): Also update DECL_MODE,
2895         and DECL_SIZE when encountering a larger common block and call
2896         layout_decl.
2897
2898 2010-02-24  Tobias Burnus  <burnus@net-b.de>
2899
2900         PR fortran/43042
2901         * trans-expr.c (gfc_conv_initializer): Call directly
2902         gfc_conv_constant for C_NULL_(FUN)PTR.
2903
2904 2010-02-22  Paul Thomas  <pault@gcc.gnu.org>
2905
2906         PR fortran/43072
2907         * dependency.c (gfc_full_array_ref_p): Check for contiguous by
2908         checking the rest of the dimensions for elements.
2909
2910 2010-02-21  Tobias Burnus  <burnus@net-b.de>
2911
2912         PR fortran/35259
2913         * gfortran.h (gfc_option_t): New flag -fprotect-parens.
2914         * lang.opt: Ditto.
2915         * option.c (gfc_init_options,gfc_handle_option): Ditto.
2916         * trans-expr.c (gfc_conv_expr_op): Use the flag.
2917         * invoke.texi: Document new -fno-protect-parens flag.
2918
2919 2010-02-20  Paul Thomas  <pault@gcc.gnu.org>
2920
2921         PR fortran/36932
2922         PR fortran/36933
2923         PR fortran/43072
2924         PR fortran/43111
2925         * dependency.c (gfc_check_argument_var_dependency): Use enum
2926         value instead of arithmetic vaue for 'elemental'.
2927         (check_data_pointer_types): New function.
2928         (gfc_check_dependency): Call check_data_pointer_types.
2929         * trans-array.h : Change fourth argument of
2930         gfc_conv_array_parameter to boolean.
2931         * trans-array.c (gfc_conv_array_parameter): A contiguous array
2932         can be a dummy but it must not be assumed shape or deferred.
2933         Change fourth argument to boolean. Array constructor exprs will
2934         always be contiguous and do not need packing and unpacking.
2935         * trans-expr.c (gfc_conv_procedure_call): Clean up some white
2936         space and change fourth argument of gfc_conv_array_parameter
2937         to boolean.
2938         (gfc_trans_arrayfunc_assign): Change fourth argument of
2939         gfc_conv_array_parameter to boolean.
2940         * trans-io.c (gfc_convert_array_to_string): The same.
2941         * trans-intrinsic.c (gfc_conv_intrinsic_loc): The same.
2942
2943 2010-02-20  Tobias Burnus  <burnus@net-b.de>
2944
2945         PR fortran/42958
2946         * libgfortran.h: Add GFC_RTCHECK_MEM.
2947         * invoke.texi (-fcheck=): Document -fcheck=mem.
2948         * tranc.c (gfc_call_malloc): Remove negative-size run-time error
2949         and enable malloc-success check only with -fcheck=mem.
2950         * option.c (gfc_handle_runtime_check_option): Add -fcheck=mem.
2951
2952 2010-02-16  Tobias Burnus  <burnus@net-b.de>
2953
2954         PR fortran/43040
2955         * gfortran.h (gfc_isym_id): Rename GFS_ISYM_GAMMA to GFS_ISYM_TGAMMA.
2956         * intrinsic.c (add_functions): Ditto.
2957         * iresolve.c (gfc_resolve_gamma): Call tgamma instead of gamma.
2958         * mathbuiltins.def: Use TGAMMA instead of GAMMA with "tgamma".
2959
2960 2010-02-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2961
2962         PR fortran/32382
2963         * trans-stmt.h: Add prototype for gfc_trans_code_cond. Add tree cond to
2964         gfc_trans_do prototype.
2965         * trans-stmt.c (gfc_trans_simple_do): Add optional argument to pass in
2966         a loop exit condition.  If exit condition is given, build the loop exit
2967         code, checking IO results of implied do loops in READ and WRITE.
2968         (gfc_trans_do): Likewise.
2969         * trans.c (trans_code): New static work function, previously
2970         gfc_trans_code. Passes exit condition to gfc_trans_do.
2971         (gfc_trans_code): Calls trans_code with NULL_TREE condition.
2972         (gfc_trans_code_cond): Calls trans_code with loop exit condition.
2973         * trans-io.c (build_dt): Build an exit condition to allow checking IO
2974         result status bits in the dtparm structure. Use this condition in call
2975         to gfc_trans_code_cond.
2976
2977 2010-02-13  Paul Thomas  <pault@gcc.gnu.org>
2978
2979         PR fortran/41113
2980         PR fortran/41117
2981         * trans-array.c (gfc_conv_array_parameter): Use
2982         gfc_full_array_ref_p to detect full and contiguous variable
2983         arrays. Full array components and contiguous arrays do not need
2984         internal_pack and internal_unpack.
2985
2986 2010-02-11  Jakub Jelinek  <jakub@redhat.com>
2987
2988         PR fortran/43030
2989         * resolve.c (gfc_resolve_dim_arg): Call gfc_clear_ts.
2990
2991         PR fortran/43029
2992         * decl.c (enumerator_decl): Don't call gfc_free_enum_history
2993         here.
2994         (gfc_match_enumerator_def): But here whenever enumerator_decl returns
2995         MATCH_ERROR.
2996
2997 2010-02-10  Joost VandeVondele <jv244@cam.ac.uk>
2998             Tobias Burnus <burnus@net-b.de>
2999
3000         PR fortran/40823
3001         * decl.c (gfc_match_subroutine): Explicitly set sym->declared_at.
3002
3003 2010-02-10  Tobias Burnus  <burnus@net-b.de>
3004
3005         PR fortran/43015
3006         * trans-decl.c (gfc_generate_function_code): Only check
3007         actual-vs.-dummy character bounds if not bind(C).
3008
3009 2010-02-10  Jakub Jelinek  <jakub@redhat.com>
3010
3011         PR fortran/42309
3012         * trans-expr.c (gfc_conv_subref_array_arg): Avoid accessing
3013         info->dimen after info has been freed.
3014
3015 2010-02-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3016
3017         PR fortran/42999
3018         * array.c (gfc_constant_ac): Do not prevent expansion of constructors
3019         with iterators.
3020
3021 2010-02-09  Jakub Jelinek  <jakub@redhat.com>
3022
3023         * module.c (fix_mio_expr): Declare sym.
3024
3025 2010-02-09  Paul Thomas  <pault@gcc.gnu.org>
3026
3027         PR fortran/41869
3028         * module.c (fix_mio_expr): Fix for private generic procedures.
3029
3030 2010-02-09  Daniel Kraft  <d@domob.eu>
3031
3032         PR fortran/39171
3033         * resolve.c (resolve_charlen): Change warning about negative CHARACTER
3034         length to be correct and issue only with -Wsurprising.
3035         * invoke.texi (Wsurprising): Mention this new warning that is
3036         turned on by -Wsurprising.
3037
3038 2010-02-09  Daniel Kraft  <d@domob.eu>
3039
3040         PR fortran/41507
3041         * intrinsic.texi (MAXVAL): Remove wrong claim that array argument
3042         can be CHARACTER type.
3043         (MINVAL), (MAXLOC), (MINLOC): Ditto.
3044
3045 2010-02-05  Paul Thomas  <pault@gcc.gnu.org>
3046
3047         PR fortran/42309
3048         * trans-expr.c (gfc_conv_subref_array_arg): Add new argument
3049         'formal_ptr'. If this is true, give returned descriptor unity
3050         lbounds, in all dimensions, and the appropriate offset.
3051         (gfc_conv_procedure_call); If formal is a pointer, set the last
3052         argument of gfc_conv_subref_array_arg to true.
3053         * trans.h : Add last argument for gfc_conv_subref_array_arg.
3054         * trans-io.c (set_internal_unit, gfc_trans_transfer): Set the
3055         new arg of gfc_conv_subref_array_arg to false.
3056         * trans-stmt.c (forall_make_variable_temp): The same.
3057
3058 2010-02-03  Tobias Burnus  <burnus@net-b.de>
3059
3060         PR fortran/42936
3061         * interface.c (compare_parameter): Disable rank-checking
3062         for NULL().
3063
3064 2010-02-02  Tobias Burnus  <burnus@net-b.de>
3065
3066         PR fortran/42650
3067         * parse.c (decode_specification_statement): Use sym->result not sym.
3068
3069 2010-02-01  Tobias Burnus  <burnus@net-b.de>
3070
3071         PR fortran/42922
3072         * decl.c (variable_decl): Allow default initializer in
3073         TYPE declarations in PURE functions.
3074
3075 2010-01-31  Janus Weil  <janus@gcc.gnu.org>
3076
3077         PR fortran/42888
3078         * resolve.c (resolve_allocate_expr): Move default initialization code
3079         here from gfc_trans_allocate.
3080         * trans.c (gfc_trans_code): Call gfc_trans_class_assign also for
3081         EXEC_INIT_ASSIGN.
3082         * trans-expr.c (gfc_trans_class_assign): Handle default initialization
3083         of CLASS variables via memcpy.
3084         * trans-stmt.c (gfc_trans_allocate): Move default initialization code
3085         to resolve_allocate_expr.
3086
3087 2010-01-31  Paul Thomas  <pault@gcc.gnu.org>
3088
3089         PR fortran/38324
3090         * expr.c (gfc_get_full_arrayspec_from_expr): New function.
3091         * gfortran.h : Add prototype for above.
3092         * trans-expr.c (gfc_trans_alloc_subarray_assign): New function.
3093         (gfc_trans_subcomponent_assign): Call new function to replace
3094         the code to deal with allocatable components.
3095         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Call
3096         gfc_get_full_arrayspec_from_expr to replace existing code.
3097
3098 2010-01-25  Tobias Burnus  <burnus@net-b.de>
3099
3100         PR fortran/42858
3101         * array.c (gfc_array_dimen_size): Fix intrinsic procedure
3102         check.
3103
3104 2010-01-24  Paul Thomas  <pault@gcc.gnu.org>
3105
3106         PR fortran/41044
3107         PR fortran/41167
3108         * expr.c (remove_subobject_ref): If the constructor is NULL use
3109         the expression as the source.
3110         (simplify_const_ref): Change the type of expression if
3111         there are component references.  Allow for substring to be at
3112         the end of an arbitrarily long chain of references.  If an
3113         element is found that is not in an EXPR_ARRAY, assume that this
3114         is scalar initialization of array. Call remove_subobject_ref in
3115         this case with NULL second argument.
3116
3117 2010-01-24  Tobias Burnus  <burnus@net-b.de>
3118
3119         PR fortran/39304
3120         * array.c (gfc_array_dimen_size): Use correct specific
3121         function in the check.
3122
3123 2010-01-21  Paul Thomas  <pault@gcc.gnu.org>
3124
3125         PR fortran/42736
3126         * trans-stmt.c (gfc_conv_elemental_dependencies): If temporary
3127         is required, turn any trailing array elements after a range
3128         into ranges so that offsets can be calculated.
3129
3130 2010-01-20  Joern Rennecke  <amylaar@spamcop.net>
3131
3132         * module.c (mio_f2k_derived): Use enumerator as initializer of
3133         enum variable.
3134
3135         PR bootstrap/42812
3136         * gfortran.h  (struct gfc_namespace) <resolved>: Change to signed
3137         bitfield of width 2.
3138
3139 2010-01-19  Janus Weil  <janus@gcc.gnu.org>
3140
3141         PR fortran/42804
3142         * resolve.c (extract_compcall_passed_object): Set locus for
3143         passed-object argument.
3144         (extract_ppc_passed_object): Set locus and correctly remove PPC
3145         reference.
3146
3147 2010-01-19  Paul Thomas  <pault@gcc.gnu.org>
3148
3149         PR fortran/42783
3150         * trans-decl.c (add_argument_checking): Do not use the backend
3151         decl directly to test for the presence of an optional dummy
3152         argument.  Use gfc_conv_expr_present, remembering to set the
3153         symbol referenced.
3154
3155         PR fortran/42772
3156         * trans-decl.c (gfc_generate_function_code): Small white space
3157         changes. If 'recurcheckvar' is NULL do not try to reset it.
3158
3159 2010-01-19  Janus Weil  <janus@gcc.gnu.org>
3160
3161         PR fortran/42545
3162         * resolve.c (resolve_fl_derived): Set the accessibility of the parent
3163         component for extended types.
3164         * symbol.c (gfc_find_component): Remove a wrongly-worded error message
3165         and take care of parent component accessibility.
3166
3167 2010-01-17  Janus Weil  <janus@gcc.gnu.org>
3168
3169         PR fortran/42677
3170         * gfortran.h (symbol_attribute): Remove 'ambiguous_interfaces'.
3171         * interface.c (check_interface1): Move a warning message here from
3172         resolve_fl_procedure.
3173         (check_sym_interfaces): Removed 'attr.ambiguous_interfaces'.
3174         * module.c (read_module): Remove call to gfc_check_interfaces, since
3175         this comes too early here.
3176         * resolve.c (resolve_fl_procedure): Move warning message to
3177         check_interface1.
3178
3179 2010-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3180
3181         PR fortran/42684
3182         * interface.c (check_interface1): Pass symbol name rather than NULL to
3183         gfc_compare_interfaces. (gfc_compare_interfaces): Add assert to
3184         trap MULL.
3185         * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
3186         than NULL to gfc_compare_interfaces.
3187
3188 2010-01-14  Paul Thomas  <pault@gcc.gnu.org>
3189
3190         PR fortran/41478
3191         * trans-array.c (duplicate_allocatable):  Static version of
3192         gfc_duplicate_allocatable with provision to handle scalar
3193         components. New boolean argument to switch off call to malloc
3194         if true.
3195         (gfc_duplicate_allocatable): New function to call above with
3196         new argument false.
3197         (gfc_copy_allocatable_data): New function to call above with
3198         new argument true.
3199         (structure_alloc_comps): Do not apply indirect reference to
3200         scalar pointers. Add new section to copy allocatable components
3201         of arrays. Extend copying of allocatable components to include
3202         scalars.
3203         (gfc_copy_only_alloc_comp): New function to copy allocatable
3204         component derived types, without allocating the base structure.
3205         * trans-array.h : Add primitive for gfc_copy_allocatable_data.
3206         Add primitive for gfc_copy_only_alloc_comp.
3207         * trans-expr.c (gfc_conv_procedure_call): After calls to
3208         transformational functions with results that are derived types
3209         with allocatable components, copy the components in the result.
3210         (gfc_trans_arrayfunc_assign): Deallocate allocatable components
3211         of lhs derived types before allocation.
3212         
3213 2010-01-14  Paul Thomas  <pault@gcc.gnu.org>
3214
3215         PR fortran/42481
3216         * module.c (load_generic_interfaces): If a procedure that is
3217         use associated but not generic is given an interface that
3218         includes itself, then make it generic.
3219
3220 2010-01-11  Joseph Myers  <joseph@codesourcery.com>
3221             Shujing Zhao  <pearly.zhao@oracle.com>
3222
3223         PR translation/42469
3224         * lang.opt (fblas-matmul-limit=, finit-character=, finit-integer=,
3225         finit-logical=, finit-real=, fmax-array-constructor=): Use tab
3226         character between option name and help text.
3227
3228 2010-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3229
3230         PR fortran/20923
3231         PR fortran/32489
3232         * trans-array.c (gfc_conv_array_initializer): Change call to
3233         gfc_error_now to call to gfc_fatal_error.
3234         * array.c (count_elements): Whitespace. (extract_element): Whitespace.
3235         (is_constant_element): Changed name from constant_element.
3236         (gfc_constant_ac): Only use expand_construuctor for expression
3237         types of EXPR_ARRAY.  If expression type is EXPR_CONSTANT, no need to
3238         call gfc_is_constant_expr.
3239         * expr.c (gfc_reduce_init_expr): Adjust conditionals and delete error
3240         message.
3241         * resolve.c (gfc_is_expandable_expr): New function that determiners if
3242         array expressions should have their constructors expanded.
3243         (gfc_resolve_expr): Use new function to determine whether or not to call
3244         gfc_expand_constructor.
3245
3246 2010-01-09  Tobias Burnus  <burnus@net-b.de>
3247
3248         PR fortran/41298
3249         * trans-expr.c (gfc_trans_structure_assign): Handle
3250         c_null_(fun)ptr.
3251         * symbol.c (gen_special_c_interop_ptr): Add NULL_EXPR
3252         to the constructor for c_null_(fun)ptr.
3253         * resolve.c (resolve_structure_cons): Add special case
3254         for c_null_(fun)ptr.
3255
3256 2010-01-09  Jakub Jelinek  <jakub@redhat.com>
3257
3258         * gfortranspec.c (lang_specific_driver): Update copyright notice
3259         dates.
3260
3261 2010-01-08  Tobias Burnus  <burnus@net-b.de>
3262
3263         PR/fortran 25829
3264         * symbol.c (check_conflict, gfc_copy_attr): Add
3265         ASYNCHRONOUS support.
3266         (gfc_add_asynchronous): New function.
3267         * decl.c (match_attr_spec): Add ASYNCHRONOUS support.
3268         (gfc_match_asynchronous): New function.
3269         * dump-parse-tree.c (show_attr): Add ASYNCHRONOUS support.
3270         * gfortran.h (symbol_attribute): New ASYNCHRONOUS bit.
3271         (gfc_add_asynchronous): New Prototype.
3272         * module.c (ab_attribute, mio_symbol_attribute): Add
3273         ASYNCHRONOUS support.
3274         * resolve.c (was_declared): Ditto.
3275         * match.h (gfc_match_asynchronous): New prototype.
3276         * parse.c (decode_specification_statement,decode_statement):
3277         Add ASYNCHRONOUS support.
3278
3279 2010-01-07  Tobias Burnus  <burnus@net-b.de>
3280
3281         PR fortran/42597
3282         * trans-decl.c (get_proc_pointer_decl): Fix call to
3283         gfc_conv_initializer for array-valued proc-pointer funcs.
3284
3285 2010-01-07  Tobias Burnus  <burnus@net-b.de>
3286
3287         PR fortran/41872
3288         * trans-decl.c (gfc_trans_deferred_vars): Don't initialize
3289         allocatable scalars with SAVE attribute.
3290
3291 2010-01-05  Tobias Burnus  <burnus@net-b.de>
3292
3293         PR fortran/42517
3294         * options.c (gfc_post_options): Set -frecursion
3295         when -fopenmp is used.
3296
3297 2010-01-05  Tobias Burnus  <burnus@net-b.de>
3298
3299         PR fortran/41872
3300         * trans-expr.c (gfc_conv_procedure_call): Nullify
3301         return value for allocatable-scalar character functions.
3302
3303 2010-01-04  Tobias Burnus  <burnus@net-b.de>
3304
3305         PR fortran/36161
3306         * error.c (error_printf, gfc_warning, gfc_notify_std,
3307         gfc_warning_now, gfc_error, gfc_error_now,
3308         gfc_fatal_error): Change argument name from nocmsgid to
3309         gmsgid to enable (x)gettext's % checking.
3310
3311 2010-01-04  Tobias Burnus  <burnus@net-b.de>
3312         
3313         * trans-decl.c (gfc_trans_deferred_vars): Fix spelling.
3314
3315 2010-01-04  Tobias Burnus  <burnus@net-b.de>
3316
3317         PR fortran/41872
3318         * trans-expr.c (gfc_conv_procedure_call): Add indirect ref
3319         for functions returning allocatable scalars.
3320         * trans-stmt.c (gfc_trans_allocate): Emmit error when
3321         reallocating an allocatable scalar.
3322         * trans.c (gfc_allocate_with_status): Fix pseudocode syntax
3323         in comment.
3324         * trans-decl.c (gfc_trans_deferred_vars): Nullify local
3325         allocatable scalars.
3326         (gfc_generate_function_code): Nullify result variable for
3327         allocatable scalars.
3328         
3329         PR fortran/40849
3330         * module.c (gfc_use_module): Fix warning string to allow
3331         for translation.
3332
3333         PR fortran/42517
3334         * invoke.texi (-fcheck=recursion): Mention that the checking
3335         is also disabled for -frecursive.
3336         * trans-decl.c (gfc_generate_function_code): Disable
3337         -fcheck=recursion when -frecursive is used.
3338
3339         * intrinsic.texi (iso_c_binding): Improve wording.
3340
3341 \f
3342 Copyright (C) 2010 Free Software Foundation, Inc.
3343
3344 Copying and distribution of this file, with or without modification,
3345 are permitted in any medium without royalty provided the copyright
3346 notice and this notice are preserved.