OSDN Git Service

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