OSDN Git Service

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