OSDN Git Service

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