OSDN Git Service

2008-07-28 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2008-07-28  Richard Guenther  <rguenther@suse.de>
2
3         Merge from gimple-tuples-branch.
4
5         2008-07-18  Aldy Hernandez  <aldyh@redhat.com>
6
7         * trans-expr.c: Include gimple.h instead of tree-gimple.h.
8         * trans-array.c: Same.
9         * trans-openmp.c: Same.
10         * trans-stmt.c: Same.
11         * f95-lang.c: Same.
12         * trans-io.c: Same.
13         * trans-decl.c: Same.
14         * trans-intrinsic.c: Same.
15         * trans.c: Same.  Include tree-iterator.h.
16         * Make-lang.in (trans.o): Depend on tree-iterator.h
17
18         2008-07-14  Aldy Hernandez  <aldyh@redhat.com>
19
20         * trans-array.h (gfc_conv_descriptor_data_set_internal):
21         Rename to gfc_conv_descriptor_data_set.
22         (gfc_conv_descriptor_data_set_tuples): Remove.
23         * trans-array.c (gfc_conv_descriptor_data_get): Rename
24         from gfc_conv_descriptor_data_set_internal.
25         Remove last argument to gfc_add_modify.
26         (gfc_trans_allocate_array_storage): Rename gfc_add_modify_expr to
27         gfc_add_modify.
28         (gfc_trans_create_temp_array): Same.
29         (gfc_conv_array_transpose): Same.
30         (gfc_grow_array): Same.
31         (gfc_put_offset_into_var): Same.
32         (gfc_trans_array_ctor_element): Same.
33         (gfc_trans_array_constructor_subarray): Same.
34         (gfc_trans_array_constructor_value): Same.
35         (gfc_trans_scalarized_loop_end): Same.
36         (gfc_array_init_size): Same.
37         (gfc_array_allocate): Same.
38         (gfc_trans_array_bounds): Same.
39         (gfc_trans_auto_array_allocation): Same.
40         (gfc_trans_g77_array): Same.
41         (gfc_trans_dummy_array_bias): Same.
42         (gfc_conv_expr_descriptor): Same.
43         (structure_alloc_comps): Same.
44         * trans-expr.c: Same.
45         * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
46         Rename gfc_conv_descriptor_data_set_tuples to
47         gfc_conv_descriptor_data_set.
48         (gfc_omp_clause_copy_ctor): Change build_gimple_modify_stmt to
49         build2_v.
50         (gfc_omp_clause_assign_op): Same.
51         (gfc_trans_omp_array_reduction): Rename gfc_add_modify_expr to
52         gfc_add_modify.
53         (gfc_trans_omp_atomic): Same.
54         (gfc_trans_omp_do): Same.  Change GIMPLE_MODIFY_STMT to MODIFY_EXPR.
55         Rename gfc_add_modify_stmt to gfc_add_modify.
56         * trans-stmt.c: Rename gfc_add_modify_expr to
57         gfc_add_modify.
58         * trans.c: Rename gfc_add_modify_expr to
59         gfc_add_modify.
60         (gfc_add_modify): Remove last argument.
61         Rename GIMPLE_MODIFY_STMT to MODIFY_EXPR.
62         * trans.h: Remove gfc_add_modify_expr, gfc_add_modify_stmt.
63         Add prototype for gfc_add_modify.
64         * f95-lang.c (union lang_tree_node): Rename GENERIC_NEXT to TREE_CHAIN.
65         * trans-decl.c: Rename gfc_add_modify_stmt to gfc_add_modify.
66         * trans-io.c: Same.
67         * trans-intrinsic.c: Same.
68
69         2008-02-25  Aldy Hernandez  <aldyh@redhat.com>
70
71         * Make-lang.in (fortran-warn): Add -Wno-format.
72
73         2008-02-19  Diego Novillo  <dnovillo@google.com>
74
75         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
76
77         * fortran/Make-lang.in (fortran-warn): Remove.
78
79         2007-11-22  Aldy Hernandez  <aldyh@redhat.com>
80
81         * trans-expr.c (gfc_trans_string_copy): Use "void *" when building a
82         memset.
83
84         2007-11-10  Aldy Hernandez  <aldyh@redhat.com>
85
86         * Make-lang.in (fortran-warn): Set to -Wno-format.
87         * trans.c (gfc_trans_code): Update comment to say GENERIC.
88         Call tree_annotate_all_with_locus instead of annotate_all_with_locus.
89
90 2008-07-27  Tobias Burnus  <burnus@net-b.de>
91
92         PR fortran/36132
93         PR fortran/29952
94         PR fortran/36909
95         * trans.c (gfc_trans_runtime_check): Allow run-time warning besides
96         run-time error.
97         * trans.h (gfc_trans_runtime_check): Update declaration.
98         * trans-array.c (gfc_trans_array_ctor_element,gfc_trans_array_bound_check,
99         gfc_conv_array_ref,gfc_conv_ss_startstride,gfc_trans_dummy_array_bias):
100         Updated gfc_trans_runtime_check calls.
101         (gfc_conv_array_parameter): Implement flag_check_array_temporaries,
102         fix packing/unpacking for nonpresent optional actuals to optional
103         formals.
104         * trans-array.h (gfc_conv_array_parameter): Update declaration.
105         * trans-expr.c (gfc_conv_substring,gfc_trans_arrayfunc_assign,
106         gfc_conv_function_call): Updated gfc_trans_runtime_check calls.
107         (gfc_conv_function_call): Update gfc_conv_array_parameter calls.
108         * trans-expr.c (gfc_trans_goto): Updated gfc_trans_runtime_check
109         calls.
110         * trans-io.c (set_string,gfc_conv_intrinsic_repeat): Ditto.
111         (gfc_conv_intrinsic_transfer,gfc_conv_intrinsic_loc): Same for
112         gfc_conv_array_parameter.
113         * trans-intrinsics.c (gfc_conv_intrinsic_bound): Ditto.
114         * trans-decl.c (gfc_build_builtin_function_decls): Add
115         gfor_fndecl_runtime_warning_at.
116         * lang.opt: New option fcheck-array-temporaries.
117         * gfortran.h (gfc_options): New flag_check_array_temporaries.
118         * options.c (gfc_init_options, gfc_handle_option): Handle flag.
119         * invoke.texi: New option fcheck-array-temporaries.
120
121 2008-07-24  Jan Hubicka  <jh@suse.cz>
122
123         * fortran/options.c (gfc_post_options): Remove flag_unline_trees code.
124
125 2008-07-24  Daniel Kraft  <d@domob.eu>
126
127         PR fortran/33141
128         * lang.opt (Wnonstd-intrinsics):  Removed option.
129         (Wintrinsics-std), (Wintrinsic-shadow):  New options.
130         * invoke.texi (Option Summary):  Removed -Wnonstd-intrinsics
131         from the list and added -Wintrinsics-std and -Wintrinsic-shadow.
132         (Error and Warning Options):  Documented the new options and removed
133         the documentation for -Wnonstd-intrinsics.
134         * gfortran.h (gfc_option_t):  New members warn_intrinsic_shadow and
135         warn_intrinsics_std, removed warn_nonstd_intrinsics.
136         (gfc_is_intrinsic):  Renamed from gfc_intrinsic_name.
137         (gfc_warn_intrinsic_shadow), (gfc_check_intrinsic_standard):  New.
138         * decl.c (match_procedure_decl):  Replaced gfc_intrinsic_name by
139         the new name gfc_is_intrinsic.
140         (warn_intrinsic_shadow):  New helper method.
141         (gfc_match_function_decl), (gfc_match_subroutine):  Call the new method
142         warn_intrinsic_shadow to check the just-parsed procedure.
143         * expr.c (check_init_expr):  Call new gfc_is_intrinsic to check whether
144         the function called is really an intrinsic in the selected standard.
145         * intrinsic.c (gfc_is_intrinsic):  Renamed from gfc_intrinsic_name and
146         extended to take into account the selected standard settings when trying
147         to find out whether a symbol is an intrinsic or not.
148         (gfc_check_intrinsic_standard):  Made public and extended.
149         (gfc_intrinsic_func_interface), (gfc_intrinsic_sub_interface):  Removed
150         the calls to check_intrinsic_standard, this check now happens inside
151         gfc_is_intrinsic.
152         (gfc_warn_intrinsic_shadow):  New method defined.
153         * options.c (gfc_init_options):  Initialize new warning flags to false
154         and removed intialization of Wnonstd-intrinsics flag.
155         (gfc_post_options):  Removed logic for Wnonstd-intrinsics flag.
156         (set_Wall):  Set new warning flags and removed Wnonstd-intrinsics flag.
157         (gfc_handle_option):  Handle the new flags and removed handling of the
158         old Wnonstd-intrinsics flag.
159         * primary.c (gfc_match_rvalue):  Replaced call to gfc_intrinsic_name by
160         the new name gfc_is_intrinsic.
161         * resolve.c (resolve_actual_arglist):  Ditto.
162         (resolve_generic_f), (resolve_unknown_f):  Ditto.
163         (is_external_proc):  Ditto.
164         (resolve_generic_s), (resolve_unknown_s):  Ditto.
165         (resolve_symbol):  Ditto and ensure for symbols declared INTRINSIC that
166         they are really available in the selected standard setting.
167
168 2008-07-24  Daniel Kraft  <d@domob.eu>
169
170         * match.c (gfc_match):  Add assertion to catch wrong calls trying to
171         match upper-case characters.
172
173 2008-07-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
174
175         PR fortran/29952
176         * gfortran.h:  Add "warn_array_temp" to gfc_option_t.
177         * lang.opt:  Add -Warray-temporaries.
178         * invoke.texi:  Document -Warray-temporaries
179         * trans-array.h (gfc_trans_create_temp_array):  Add argument of
180         type *locus.
181         (gfc_conv_loop_setup):  Likewise.
182         * trans-array.c (gfc_trans_create_temp_array):  If
183         -Warray-temporaries is given and locus is present, warn about
184         creation of array temporaries.
185         (gfc_trans_array_constructor_subarray):  Add locus to call
186         of gfc_conv_loop_setup.
187         (gfc_trans_array_constructor):  Add where argument.  Pass where
188         argument to call of gfc_trans_create_temp_array.
189         (gfc_add_loop_ss_code):  Add where argument.  Pass where argument
190         to recursive call of gfc_add_loop_ss_code and to call of
191         gfc_trans_array_constructor.
192         (gfc_conv_loop_setup):  Add where argument.  Pass where argument
193         to calls to gfc_add_loop_ss_code and to gfc_trans_create_temp_array.
194         (gfc_conv_expr_descriptor):  Pass location to call of
195         gfc_conv_loop_setup.
196         (gfc_conv_array_parameter):  If -Warray-temporaries is given,
197         warn about creation of temporary arrays.
198         * trans-expr.c (gfc_conv_subref_array_arg):  Add where argument
199         to call to gfc_conv_loop_setup.
200         (gfc_conv_function_call):  Add where argument to call to
201         gfc_trans_creat_temp_array.
202         (gfc_trans_subarray_assign):  Likewise.
203         (gfc_trans_assignment_1):  Add where argument to call to
204         gfc_conv_loop_setup.
205         * trans-stmt.c (gfc_conv_elemental_dependencies):  Add where
206         argument to call to gfc_trans_create_temp_array.
207         (gfc_trans_call):  Add where argument to call to gfc_conv_loop_setup.
208         (generate_loop_for_temp_to_lhs):  Likewise.
209         (generate_loop_for_rhs_to_temp):  Likewise.
210         (compute_inner_temp_size):  Likewise.
211         (gfc_trans-pointer_assign_need_temp):  Likewise.
212         (gfc_evaluate_where_mask):  Likewise.
213         (gfc_trans_where_assign):  Likewise.
214         (gfc_trans_where_3):  Likewise.
215         * trans-io.c (transfer_srray_component):  Add where argument
216         to function. Add where argument to call to gfc_conv_loop_setup.
217         (transfer_expr):  Add where argument to call to
218         transfer_array_component.
219         (gfc_trans_transfer):  Add where expression to call to
220         gfc_conv_loop_setup.
221         * trans-intrinsic.c (gfc_conv_intrinsic_anyall):  Add
222         where argument to call to gfc_conv_loop_setup.
223         (gfc_conv_intrinsic_count):  Likewise.
224         (gfc_conv_intrinsic_arith):  Likewise.
225         (gfc_conv_intrinsic_dot_product):  Likewise.
226         (gfc_conv_intrinsic_minmaxloc):  Likewise.
227         (gfc_conv_intrinsic_minmaxval):  Likewise.
228         (gfc_conv_intrinsic_array_transfer):  Warn about
229         creation of temporary array.
230         Add where argument to call to gfc_trans_create_temp_array.
231         * options.c (gfc_init_options):  Initialize gfc_option.warn_array_temp.
232         (gfc_handle_option):  Set gfc_option.warn_array_temp.
233
234 2008-07-23  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
235
236         PR 35058
237         * f95-lang.c (gfc_mark_addressable): All calls to pedwarn changed.
238
239 2008-07-22  Daniel Kraft  <d@domob.eu>
240
241         PR fortran/29835
242         * io.c (error_element), (format_locus):  New static globals.
243         (unexpected_element):  Spelled out this message fully.
244         (next_char):  Keep track of locus when not MODE_STRING.
245         (next_char_not_space):  Remember last parsed element in error_element.
246         (format_lex):  Fix two indentation errors.
247         (check_format):  Use format_locus and possibly error_element for a
248         slightly better error message on invalid format.
249         (check_format_string):  Set format_locus to start of the string
250         expression used as format.
251
252 2008-07-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
253
254         * expr.c (gfc_check_pointer_assign): Fix typo in string.
255         * io.c (check_format): Fix typo in string.  Fix comment typos.
256         * parse.c (gfc_global_used): Likewise.
257         * resolve.c (resolve_allocate_expr): Likewise.
258         * symbol.c (gfc_set_default_type): Likewise.
259         * arith.c: Fix typos in comments.
260         * array.c: Likewise.
261         * data.c: Likewise.
262         * decl.c: Likewise.
263         * dependency.c: Likewise.
264         * f95-lang.c: Likewise.
265         * gfortran.h: Likewise.
266         * matchexp.c: Likewise.
267         * module.c: Likewise.
268         * primary.c: Likewise.
269         * scanner.c: Likewise.
270         * trans-array.c: Likewise.
271         * trans-common.c: Likewise.
272         * trans-decl.c: Likewise.
273         * trans-expr.c: Likewise.
274         * trans-intrinsic.c: Likewise.
275         * trans-types.c: Likewise.
276         * trans.c: Likewise.
277         * trans.h: Likewise.
278
279 2008-07-19  Tobias Burnus  <burnus@net-b.de>
280
281         PR fortran/36795
282         * matchexp.c (gfc_get_parentheses): Remove obsolete workaround,
283         which caused the generation of wrong code.
284
285 2008-07-19  Tobias Burnus  <burnus@net-b.de>
286
287         PR fortran/36342
288         * scanner.c (load_file): Add argument to destinguish between
289         true filename and displayed filename.
290         (include_line,gfc_new_file): Adapt accordingly.
291
292 2008-07-19  Tobias Burnus  <burnus@net-b.de>
293
294         * check.c (gfc_check_cshift,gfc_check_eoshift,gfc_check_unpack): Add rank
295         checks for cshift's shift and eoshift's shift and boundary args.
296         (gfc_check_unpack): Add rank and shape tests for unpack.
297
298 2008-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
299
300         * gfortran.h (new): Remove macro.
301         * array.c (gfc_append_constructor, match_array_list,
302         gfc_match_array_constructor): Likewise.
303         * bbt.c (insert, gfc_insert_bbt): Likewise.
304         * decl.c (var_element, top_var_list, top_val_list, gfc_match_data,
305         get_proc_name): Likewise.
306         * expr.c (gfc_copy_actual_arglist): Likewise.
307         * interface.c (compare_actual_formal, check_new_interface,
308         gfc_add_interface): Likewise.
309         * intrinsic.c gfc_convert_type_warn, gfc_convert_chartype):
310         Likewise.
311         * io.c (match_io_iterator, match_io_list): Likewise.
312         * match.c (match_forall_header): Likewise.
313         * matchexp.c (build_node): Likewise.
314         * module.c (gfc_match_use): Likewise.
315         * scanner.c (load_file): Likewise.
316         * st.c (gfc_append_code): Likewise.
317         * symbol.c (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
318         gfc_commit_symbols): Likewise.
319         * trans-common.c (build_field): Likewise.
320         * trans-decl.c (gfc_finish_var_decl): Likewise.
321         * trans-expr.c (gfc_free_interface_mapping,
322         gfc_get_interface_mapping_charlen, gfc_add_interface_mapping,
323         gfc_finish_interface_mapping,
324         gfc_apply_interface_mapping_to_expr): Likewise.
325         * trans.h (gfc_interface_sym_mapping): Likewise.
326
327 2008-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
328
329         * gfortran.h (operator): Remove macro.
330         (gfc_namespace, gfc_expr): Avoid C++ keywords.
331         * arith.c (eval_intrinsic, eval_intrinsic_f2, eval_intrinsic_f3):
332         Likewise.
333         * decl.c (access_attr_decl): Likewise.
334         * dependency.c (gfc_dep_compare_expr): Likewise.
335         * dump-parse-tree.c (show_expr, show_uop, show_namespace):
336         Likewise.
337         * expr.c (gfc_copy_expr, gfc_type_convert_binary,
338         simplify_intrinsic_op, check_intrinsic_op): Likewise.
339         * interface.c (fold_unary, gfc_match_generic_spec,
340         gfc_match_interface, gfc_match_end_interface,
341         check_operator_interface, check_uop_interfaces,
342         gfc_check_interfaces, gfc_extend_expr, gfc_extend_assign,
343         gfc_add_interface, gfc_current_interface_head,
344         gfc_set_current_interface_head): Likewise.
345         * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
346         Likewise.
347         * matchexp.c (gfc_get_parentheses, build_node): Likewise.
348         * module.c (gfc_use_rename, gfc_match_use, find_use_name_n,
349         number_use_names, mio_expr, load_operator_interfaces, read_module,
350         write_operator, write_module): Likewise.
351         * openmp.c (resolve_omp_atomic): Likewise.
352         * resolve.c (resolve_operator, gfc_resolve_character_operator,
353         gfc_resolve_uops): Likewise.
354         * symbol.c (free_uop_tree, gfc_free_namespace): Likewise.
355         * trans-expr.c (gfc_conv_expr_op): Likewise.
356         * trans-openmp.c (gfc_trans_omp_atomic): Likewise.
357
358 2008-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
359
360         * gfortran.h (protected): Remove macro.
361         * dump-parse-tree.c (show_attr): Avoid C++ keywords.
362         * expr.c (gfc_check_pointer_assign): Likewise.
363         * interface.c (compare_parameter_protected): Likewise.
364         * intrinsic.c (enum class, add_sym, add_sym_0, add_sym_1,
365         add_sym_1s, add_sym_1m, add_sym_2, add_sym_2s, add_sym_3,
366         add_sym_3ml, add_sym_3red, add_sym_3s, add_sym_4, add_sym_4s,
367         add_sym_5s): Likewise.
368         * match.c (gfc_match_assignment, gfc_match_pointer_assignment):
369         Likewise.
370         * module.c (mio_symbol_attribute): Likewise.
371         * primary.c (match_variable): Likewise.
372         * resolve.c (resolve_equivalence): Likewise.
373         * symbol.c (check_conflict, gfc_add_protected, gfc_copy_attr):
374         Likewise.
375         * trans-types.c (gfc_get_array_type_bounds): Likewise.
376
377 2008-07-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
378
379         * arith.c (eval_type_intrinsic0): Avoid C++ keywords.
380         * gfortran.h (try, protected, operator, new): Likewise.
381
382 2008-07-17  Tobias Burnus  <burnus@net-b.de>
383
384         PR fortran/36825
385         PR fortran/36824
386         * array.c (gfc_match_array_spec): Fix array-rank check.
387         * resolve.c (resolve_fl_derived): Fix constentness check
388         for the array dimensions.
389
390 2008-07-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
391
392         * Make-lang.in (gfortranspec.o): Fix dependencies.
393
394 2008-07-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
395
396         PR fortran/36725
397         * io.c: Add error check for g0 edit descriptor followed by '.'.
398
399 2008-07-12  Daniel Kraft  <d@domob.eu>
400
401         * resolve.c (resolve_fl_derived):  Allow pointer components to empty
402         derived types fixing a missing part of PR fortran/33221.
403
404 2008-07-10  Daniel Kraft  <d@domob.eu>
405
406         * gfc-internals.texi (section gfc_expr):  Created documentation about
407         the gfc_expr internal data structure.
408
409 2008-07-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
410
411         PR fortran/36670
412         * iresolve.c (gfc_resolve_product):  Set shape of return
413         value from array.
414         (gfc_resolve_sum):  Likewise.
415
416 2008-07-07  Jakub Jelinek  <jakub@redhat.com>
417
418         PR middle-end/36726
419         * f95-lang.c (poplevel): Don't ever add subblocks to
420         global_binding_level.
421
422 2008-07-02  Janus Weil  <janus@gcc.gnu.org>
423             Tobias Burnus  <burnus@net-b.de>
424             Paul Thomas  <pault@gcc.gnu.org>
425
426         PR fortran/32580
427         * gfortran.h (struct gfc_symbol): New member "proc_pointer".
428         * check.c (gfc_check_associated,gfc_check_null): Implement
429         procedure pointers.
430         * decl.c (match_procedure_decl): Ditto.
431         * expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol): Ditto.
432         * interface.c (compare_actual_formal): Ditto.
433         * match.h: Ditto.
434         * match.c (gfc_match_pointer_assignment): Ditto.
435         * parse.c (parse_interface): Ditto.
436         * primary.c (gfc_match_rvalue,match_variable): Ditto.
437         * resolve.c (resolve_fl_procedure): Ditto.
438         * symbol.c (check_conflict,gfc_add_external,gfc_add_pointer,
439         gfc_copy_attr,gen_fptr_param,build_formal_args): Ditto.
440         * trans-decl.c (get_proc_pointer_decl,gfc_get_extern_function_decl,
441         create_function_arglist): Ditto.
442         * trans-expr.c (gfc_conv_variable,gfc_conv_function_val,
443         gfc_conv_function_call,gfc_trans_pointer_assignment): Ditto.
444
445 2008-07-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
446
447         PR fortran/36590
448         PR fortran/36681
449         * iresolve.c (resolve_mask_arg):  Don't convert mask to
450         kind=1 logical if it is of that type already.
451
452 2008-06-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
453
454         PR fortran/36341
455         * iresolve.c (gfc_resolve_matmul): Copy shapes
456         from arguments.
457
458 2008-06-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
459
460         * invoke.texi: Add documentation for runtime behavior of
461         -fno-range-check.
462
463 2008-06-28  Daniel Kraft  <d@domob.eu>
464
465         * gfc-internals.texi (section gfc_code):  Extended documentation about
466         gfc_code in the internal datastructures chapter including details about
467         how IF, DO and SELECT blocks look like and an example for how the
468         block-chaining works.
469
470 2008-06-25  Paul Thomas  <pault@gcc.gnu.org>
471
472         PR fortran/36526
473         * interface.c (check_intents):  Correct error where the actual
474         arg was checked for a pointer argument, rather than the formal.
475
476 2008-06-24  Paul Thomas  <pault@gcc.gnu.org>
477
478         PR fortran/34371
479         * expr.c (gfc_check_assign):  Change message and locus for
480         error when conform == 0.
481
482 2008-06-23  Jakub Jelinek  <jakub@redhat.com>
483
484         PR fortran/36597
485         * cpp.c (cpp_define_builtins): Change _OPENMP value to 200805.
486
487 2008-06-20  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
488             Tobias Burnus  <burnus@net-b.de>
489
490         PR fortran/34908
491         PR fortran/36276
492         * scanner.c (preprocessor_line): do not call gfc_free for
493         current_file->filename if it differs from filename.
494
495 2008-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
496
497         * arith.c (hollerith2representation): Fix for -Wc++-compat.
498         * array.c (gfc_get_constructor): Likewise.
499         * decl.c (gfc_get_data_variable, gfc_get_data_value, gfc_get_data,
500         create_enum_history, gfc_match_final_decl): Likewise.
501         * error.c (error_char): Likewise.
502         * expr.c (gfc_get_expr, gfc_copy_expr): Likewise.
503         * gfortran.h (gfc_get_charlen, gfc_get_array_spec,
504         gfc_get_component, gfc_get_formal_arglist, gfc_get_actual_arglist,
505         gfc_get_namelist, gfc_get_omp_clauses, gfc_get_interface,
506         gfc_get_common_head, gfc_get_dt_list, gfc_get_array_ref,
507         gfc_get_ref, gfc_get_equiv, gfc_get_case, gfc_get_iterator,
508         gfc_get_alloc, gfc_get_wide_string): Likewise.
509         * interface.c (count_types_test): Likewise.
510         * intrinsic.c (add_char_conversions, gfc_intrinsic_init_1):
511         Likewise.
512         * io.c (gfc_match_open, gfc_match_close, match_filepos, match_io,
513         gfc_match_inquire, gfc_match_wait): Likewise.
514         * match.c (gfc_match, match_forall_iterator): Likewise.
515         * module.c (gfc_get_pointer_info, gfc_get_use_rename, add_fixup,
516         add_true_name, parse_string, write_atom, quote_string,
517         mio_symtree_ref, mio_gmp_real, write_common_0): Likewise.
518         * options.c (gfc_post_options): Likewise.
519         * primary.c (match_integer_constant, match_hollerith_constant,
520         match_boz_constant, match_real_constant,
521         gfc_get_structure_ctor_component, gfc_match_structure_constructor): Likewise.
522         * scanner.c (gfc_widechar_to_char, add_path_to_list,
523         add_file_change, load_line, get_file, preprocessor_line,
524         load_file, unescape_filename, gfc_read_orig_filename): Likewise.
525         * simplify.c (gfc_simplify_ibits, gfc_simplify_ishft,
526         gfc_simplify_ishftc): Likewise.
527         * symbol.c (gfc_get_st_label, gfc_get_namespace, gfc_new_symtree,
528         gfc_get_uop, gfc_new_symbol, save_symbol_data, gfc_get_gsymbol):
529         Likewise.
530         * target-memory.c (gfc_target_interpret_expr): Likewise.
531         * trans-const.c (gfc_build_wide_string_const): Likewise.
532         * trans-expr.c (gfc_add_interface_mapping): Likewise.
533         * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
534         gfc_conv_intrinsic_int, gfc_conv_intrinsic_lib_function,
535         gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_ctime,
536         gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
537         gfc_conv_intrinsic_minmax, gfc_conv_intrinsic_minmax_char,
538         gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_index_scan_verify,
539         gfc_conv_intrinsic_merge, gfc_conv_intrinsic_trim): Likewise.
540         * trans.c (gfc_get_backend_locus): Likewise.
541         * trans.h (gfc_get_ss): Likewise.
542
543 2008-06-18  Daniel Kraft  <d@domob.eu>
544
545         PR fortran/36517, fortran/36492
546         * array.c (gfc_resolve_character_array_constructor):  Call
547         gfc_set_constant_character_len with changed length-chec argument.
548         * decl.c (gfc_set_constant_character_len):  Changed array argument to
549         be a generic length-checking argument that can be used for correct
550         checking with typespec and in special cases where the should-be length
551         is different from the target length.
552         (build_struct):  Call gfc_set_constant_character_len with changed length
553         checking argument and introduced additional checks for exceptional
554         conditions on invalid code.
555         (add_init_expr_to_sym), (do_parm):  Call gfc_set_constant_character_len
556         with changed argument.
557         * match.h (gfc_set_constant_character_len):  Changed third argument to
558         int for the should-be length rather than bool.
559
560 2008-06-17  Daniel Kraft  <d@domob.eu>
561
562         PR fortran/36112
563         * array.c (gfc_resolve_character_array_constructor):  Check that all
564         elements with constant character length have the same one rather than
565         fixing it if no typespec is given, emit an error if they don't.  Changed
566         return type to "try" and return FAILURE for the case above.
567         (gfc_resolve_array_constructor):  Removed unneeded call to
568         gfc_resolve_character_array_constructor in this function.
569         * gfortran.h (gfc_resolve_character_array_constructor):  Returns try.
570         * trans-array.c (get_array_ctor_strlen):  Return length of first element
571         rather than last element.
572         * resolve.c (gfc_resolve_expr):  Handle FAILURE return from
573         gfc_resolve_character_array_constructor.
574
575 2008-06-17  Paul Thomas  <pault@gcc.gnu.org>
576
577         PR fortran/34396
578         * resolve.c (add_dt_to_dt_list):  New function.
579         (resolve_fl_derived): Call new function for pointer components
580         and when derived type resolved.
581
582 2008-06-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
583
584         PR fortran/36515
585         * trans-decl.c (gfc_generate_function_code): Add range_check to options
586         array.
587
588 2008-06-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
589
590         * gfc-internals.texi: Expand TABs, drop indentation outside examples.
591         * gfortran.texi: Likewise.
592         * intrinsic.texi: Likewise.
593         * invoke.texi: Likewise.
594
595 2008-06-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
596
597         PR fortran/35863
598         * trans-io.c (gfc_build_io_library_fndecls): Build declaration for
599         transfer_character_wide which includes passing in the character kind to
600         support wide character IO. (transfer_expr): If the kind == 4, create the
601         argument and build the call.
602         * gfortran.texi: Fix typo.
603
604 2008-06-13  Tobias Burnus  <burnus@net-b.de>
605
606         PR fortran/36476
607         * decl.c (do_parm): Handle init expression for len=*.
608
609 2008-06-12  Tobias Burnus  <burnus@net-b.de>
610
611         PR fortran/36462
612         * trans-intrinsic.c (gfc_conv_intrinsic_index_scan_verify):
613         Fix passing of the BACK= argument.
614
615 2008-06-10  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
616
617         * cpp.c: Add copyright notice.
618         * cpp.h: Add copyright notice.
619
620 2008-06-08  Janus Weil  <janus@gcc.gnu.org>
621
622         PR fortran/36459
623         * decl.c (match_procedure_decl): Correctly recognize if the interface
624         is an intrinsic procedure.
625
626 2008-06-08  Tobias Burnus  <burnus@net-b.de>
627
628         PR fortran/35830
629         * resolve.c (resolve_symbol): Copy more attributes for
630         PROCEDUREs with interfaces.
631
632 2008-06-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
633
634         PR fortran/36420
635         PR fortran/36422
636         * io.c (check_format): Add new error message for zero width.
637         Use new error message for FMT_A and with READ, FMT_G.  Allow
638         FMT_G with WRITE except when -std=F95 and -std=F2003.
639
640 2008-06-07  Tobias Burnus  <burnus@net-b.de>
641
642         PR fortran/36437
643         * intrinsic.c (add_functions): Implement c_sizeof.
644         * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Do not
645         create unneeded variable in the scalar case.
646         * intrinsic.texi: Add C_SIZEOF documentation.
647
648 2008-06-06  Tobias Burnus  <burnus@net-b.de>
649
650         * intrinsic.texi (BESSEL_J1): Fix BES(S)EL_J1 typo.
651
652 2008-06-06  Jakub Jelinek  <jakub@redhat.com>
653
654         * scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
655         * parse.c (next_free): Allow tab after !$omp.
656         (decode_omp_directive): Handle !$omp task, !$omp taskwait
657         and !$omp end task.
658         (case_executable): Add ST_OMP_TASKWAIT.
659         (case_exec_markers): Add ST_OMP_TASK.
660         (gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
661         ST_OMP_TASKWAIT.
662         (parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
663         * gfortran.h (gfc_find_sym_in_expr): New prototype.
664         (gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
665         (gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
666         OMP_DEFAULT_FIRSTPRIVATE to default_sharing.  Add collapse and
667         untied fields.
668         (gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
669         * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
670         LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
671         LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
672         * trans.h (gfc_omp_clause_default_ctor): Add another argument.
673         (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
674         gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
675         * types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
676         BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
677         BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
678         BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
679         BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
680         BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
681         (BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
682         than boolean_type_node.
683         * dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
684         EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
685         untied and collapse clauses.
686         (gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
687         * trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
688         EXEC_OMP_TASKWAIT.
689         * st.c (gfc_free_statement): Likewise.
690         * resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
691         (find_sym_in_expr): Rename to...
692         (gfc_find_sym_in_expr): ... this.  No longer static.
693         (resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
694         * match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
695         prototypes.
696         * openmp.c (resolve_omp_clauses): Allow allocatable arrays in
697         firstprivate, lastprivate, reduction, copyprivate and copyin
698         clauses.
699         (omp_current_do_code): Made static.
700         (omp_current_do_collapse): New variable.
701         (gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
702         clear omp_current_do_code and omp_current_do_collapse on return.
703         (gfc_resolve_do_iterator): Handle collapsed do loops.
704         (resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
705         (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
706         (gfc_match_omp_clauses): Handle default (firstprivate),
707         schedule (auto), untied and collapse (n) clauses.
708         (OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
709         (OMP_TASK_CLAUSES): Define.
710         (gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
711         * trans-openmp.c (gfc_omp_private_outer_ref): New function.
712         (gfc_omp_clause_default_ctor): Add outer argument.  For allocatable
713         arrays allocate them with the bounds of the outer var if outer
714         var is allocated.
715         (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
716         gfc_omp_clause_dtor): New functions.
717         (gfc_trans_omp_array_reduction): If decl is allocatable array,
718         allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
719         and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
720         (gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
721         for assumed-size arrays.
722         (gfc_trans_omp_do): Add par_clauses argument.  If dovar is
723         present in lastprivate clause and do loop isn't simple,
724         set OMP_CLAUSE_LASTPRIVATE_STMT.  If dovar is present in
725         parallel's lastprivate clause, change it to shared and add
726         lastprivate clause to OMP_FOR_CLAUSES.  Handle collapsed do loops.
727         (gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
728         (gfc_trans_omp_parallel_do): Likewise.  Move collapse clause to
729         OMP_FOR from OMP_PARALLEL.
730         (gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
731         OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
732         (gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
733         (gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
734         EXEC_OMP_TASKWAIT.
735
736 2008-06-04  Janus Weil  <janus@gcc.gnu.org>
737
738         PR fortran/36322
739         PR fortran/36275
740         * resolve.c (resolve_symbol): Correctly copy the interface for a
741         PROCEDURE declaration.
742
743 2008-06-02  Janus Weil  <janus@gcc.gnu.org>
744
745         PR fortran/36361
746         * symbol.c (gfc_add_allocatable,gfc_add_dimension,
747         gfc_add_explicit_interface): Added checks.
748         * decl.c (attr_decl1): Added missing "var_locus".
749         * parse.c (parse_interface): Checking for errors.
750
751 2008-06-02  Daniel Kraft  <d@domob.eu>
752
753         * gfortran.h:  New statement-type ST_FINAL for FINAL declarations.
754         (struct gfc_symbol):  New member f2k_derived.
755         (struct gfc_namespace):  New member finalizers, for use in the above
756         mentioned f2k_derived namespace.
757         (struct gfc_finalizer):  New type defined for finalizers linked list.
758         * match.h (gfc_match_final_decl):  New function header.
759         * decl.c (gfc_match_derived_decl):  Create f2k_derived namespace on
760         constructed symbol node.
761         (gfc_match_final_decl):  New function to match a FINAL declaration line.
762         * parse.c (decode_statement):  match-call for keyword FINAL.
763         (parse_derived):  Parse CONTAINS section and accept FINAL statements.
764         * resolve.c (gfc_resolve_finalizers):  New function to resolve (that is
765         in this case, check) a list of finalizer procedures.
766         (resolve_fl_derived):  Call gfc_resolve_finalizers here.
767         * symbol.c (gfc_get_namespace):  Initialize new finalizers to NULL.
768         (gfc_free_namespace):  Free finalizers list.
769         (gfc_new_symbol):  Initialize new f2k_derived to NULL.
770         (gfc_free_symbol):  Free f2k_derived namespace.
771         (gfc_free_finalizer):  New function to free a single gfc_finalizer node.
772         (gfc_free_finalizer_list):  New function to free a linked list of
773         gfc_finalizer nodes.
774
775 2008-06-02  Daniel Franke  <franke.daniel@gmail.com>
776
777         PR fortran/36375
778         PR fortran/36377
779         * cpp.c (gfc_cpp_init): Do not initialize builtins if
780         processing already preprocessed input.
781         (gfc_cpp_preprocess): Finalize output with newline.
782
783 2008-05-31  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
784
785         * intrinsic.texi: Revert wrong commit.
786
787 2008-05-31  Steven G. Kargl  <kargls@comcast.net>
788
789         * arith.c (gfc_arith_init_1): Remove now unused r and c variables.
790         Cleanup numerical inquiry function initialization.
791         (gfc_arith_done_1): Replace multiple mpfr_clear() invocations with
792         a single mpfr_clears().
793         (gfc_check_real_range): Re-arrange logic to eliminate multiple
794         unnecessary branching and assignments.
795         (gfc_arith_times): Use mpfr_clears() in preference to multiple
796         mpfr_clear().
797         (gfc_arith_divide): Ditto.
798         (complex_reciprocal): Eliminate now unused variables a, re, im.
799         Cleanup the mpfr abuse.  Use mpfr_clears() in preference to
800         multiple mpfr_clear().
801         (complex_pow): Fix comment whitespace.  Use mpfr_clears() in
802         preference to multiple mpfr_clear().
803         * simplify.c (gfc_simplify_and): Remove blank line.
804         (gfc_simplify_atan2): Move error checking earlier to eliminate
805         a now unnecessay gfc_free_expr().
806         (gfc_simplify_bessel_j0): Remove unnecessary gfc_set_model_kind().
807         (gfc_simplify_bessel_j1): Ditto.
808         (gfc_simplify_bessel_jn): Ditto.
809         (gfc_simplify_bessel_y0): Ditto.
810         (gfc_simplify_bessel_y1): Ditto.
811         (gfc_simplify_bessel_yn): Ditto. 
812         (only_convert_cmplx_boz): Eliminate unnecessary duplicate code, and
813         combine nested if statement rational expressions.
814         (gfc_simplify_cos): Use mpfr_clears() in preference to multiple
815         mpfr_clear().
816         (gfc_simplify_exp): Ditto.
817         (gfc_simplify_fraction): Move gfc_set_model_kind() to after the
818         special case of 0.  Use mpfr_clears() in preference to multiple
819         mpfr_clear().
820         (gfc_simplify_gamma): Eliminate unnecessary gfc_set_model_kind().
821         (gfc_simplify_lgamma): Ditto.
822         (gfc_simplify_log10): Ditto.
823         (gfc_simplify_log): Move gfc_set_model_kind () inside switch
824         statement. Use mpfr_clears() in preference to multiple mpfr_clear().
825         (gfc_simplify_mod):  Eliminate now unused variables quot, iquot,
826         and term.  Simplify the mpfr magic.
827         (gfc_simplify_modulo): Ditto.
828         (gfc_simplify_nearest): Eliminate unnecessary gfc_set_model_kind().
829         (gfc_simplify_scale): Use mpfr_clears() in preference to multiple
830         mpfr_clear().
831         (gfc_simplify_sin): Ditto
832         (gfc_simplify_sqrt): Ditto
833         (gfc_simplify_set_exponent):  Move gfc_set_model_kind() to after the
834         special case of 0.  Use mpfr_clears() in preference to multiple
835         mpfr_clear().
836
837 2008-05-29  Daniel Franke  <franke.daniel@gmail.com>
838
839         PR target/36348
840         * Make-lang.in (F95_OBJS): Added dependency on FORTRAN_TARGET_OBJS.
841
842 2008-05-29  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
843
844         * scanner.c (load_line): Add first_char argument. Don't call ungetc.
845         (gfc_read_orig_filename): Adjust call to load_line. Don't call
846         ungetc.
847         (load_file): Adjust call to load_line.
848
849 2008-05-28  Janus Weil  <janus@gcc.gnu.org>
850
851         PR fortran/36325
852         PR fortran/35830
853         * interface.c (gfc_procedure_use): Enable argument checking for
854         external procedures with explicit interface.
855         * symbol.c (check_conflict): Fix conflict checking for externals.
856         (copy_formal_args): Fix handling of arrays.
857         * resolve.c (resolve_specific_f0, resolve_specific_s0): Fix handling
858         of intrinsics.
859         * parse.c (parse_interface): Non-abstract INTERFACE statement implies
860         EXTERNAL attribute.
861
862 2008-05-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
863
864         PR fortran/36319
865         * intrinsic.c (gfc_convert_chartype): Don't mark conversion
866         function as pure.
867         * trans-array.c (gfc_trans_array_ctor_element): Divide element
868         size by the size of one character to obtain length.
869         * iresolve.c (gfc_resolve_cshift): Call the _char4 variant when
870         appropriate.
871         (gfc_resolve_eoshift): Likewise.
872         * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Minor beautification.
873         (gfc_conv_intrinsic_fdate): Minor beautification.
874         (gfc_conv_intrinsic_ttynam): Minor beautification.
875         (gfc_conv_intrinsic_minmax_char): Allow all character kinds.
876         (size_of_string_in_bytes): New function.
877         (gfc_conv_intrinsic_size): Call size_of_string_in_bytes for
878         character expressions.
879         (gfc_conv_intrinsic_sizeof): Likewise.
880         (gfc_conv_intrinsic_array_transfer): Likewise.
881         (gfc_conv_intrinsic_trim): Allow all character kinds. Minor
882         beautification.
883         (gfc_conv_intrinsic_repeat): Fix comment typo.
884         * simplify.c (gfc_convert_char_constant): Take care of conversion
885         of array constructors.
886
887 2008-05-27  Tobias Burnus  <burnus@net-b.de>
888
889         PR fortran/36316
890         * trans-array.c (gfc_set_loop_bounds_from_array_spec):
891         Add missing fold_convert.
892
893 2008-05-26  Daniel Franke  <franke.daniel@gmail.com>
894
895         * fortran/cpp.c (cpp_define_builtins): Remove usage of TARGET_* macros,
896         added FIXME instead.
897
898 2008-05-26  Daniel Franke  <franke.daniel@gmail.com>
899
900         PR fortran/18428
901         * lang.opt (A, C, CC, D, E, H, P, U, cpp, d, fworking-directory,
902         imultilib, iprefix, iquote, isysroot, isystem, nocpp, nostdinc,
903         o, undef, v): New options.
904         * options.c (gfc_init_options): Also initialize preprocessor
905         options.
906         (gfc_post_options): Also handle post-initialization of preprocessor
907         options.
908         (gfc_handle_option): Check if option is a preprocessor option.
909         If yes, let gfc_cpp_handle_option() handle the option.
910         * lang-specs.h: Reorganized to handle new options.
911         * scanner.c (gfc_new_file): Read temporary file instead of
912         input source if preprocessing is enabled.
913         * f95-lang.c (gfc_init): Initialize preprocessor.
914         (gfc_finish): Clean up preprocessor.
915         * cpp.c: New.
916         * cpp.h: New.
917         * Make-lang.in: Added new objects and dependencies.
918         * gfortran.texi: Updated section "Preprocessing and
919         conditional compilation".
920         * invoke.texi: Added new section "Preprocessing Options",
921         listed and documented the preprocessing options handled
922         by gfortran.
923
924 2008-05-25  Tobias Burnus  <burnus@net-b.de>
925
926         PR fortran/32600
927         * trans-expr.c (gfc_conv_function_call): Remove library
928         call for c_f_pointer with scalar Fortran pointers and for
929         c_f_procpointer.
930
931 2008-05-21  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
932
933         PR fortran/36257
934         * iresolve.c (check_charlen_present): Don't force the rank to 1.
935
936 2008-05-19  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
937
938         PR fortran/36265
939         * trans-expr.c (gfc_conv_string_tmp): Pick the correct type for
940         the temporary variable.
941
942 2008-05-19  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
943
944         * simplify.c (gfc_simplify_dble, gfc_simplify_real): Initialize
945         result variable to avoid warnings.
946
947 2008-05-18  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
948
949         * intrinsic.c (char_conversions, ncharconv): New static variables.
950         (find_char_conv): New function.
951         (add_functions): Add simplification functions for ADJUSTL and
952         ADJUSTR. Don't check the kind of their argument. Add checking for
953         LGE, LLE, LGT and LLT.
954         (add_subroutines): Fix argument type for SLEEP. Fix argument name
955         for SYSTEM.
956         (add_char_conversions): New function.
957         (gfc_intrinsic_init_1): Call add_char_conversions.
958         (gfc_intrinsic_done_1): Free char_conversions.
959         (check_arglist): Use kind == 0 as a signal that we don't want
960         the kind value to be checked.
961         (do_simplify): Also simplify character functions.
962         (gfc_convert_chartype): New function
963         * trans-array.c (gfc_trans_array_ctor_element): Don't force the
964         use of default character type.
965         (gfc_trans_array_constructor_value): Likewise.
966         (get_array_ctor_var_strlen): Use integer kind to build an integer
967         instead of a character kind!
968         (gfc_build_constant_array_constructor): Don't force the use of
969         default character type.
970         (gfc_conv_loop_setup): Likewise.
971         * trans-expr.c (gfc_conv_string_tmp): Don't force the use of
972         default character type. Allocate enough memory for wide strings.
973         (gfc_conv_concat_op): Make sure operand kind are the same.
974         (string_to_single_character): Remove gfc_ prefix. Reindent.
975         Don't force the use of default character type.
976         (gfc_conv_scalar_char_value): Likewise.
977         (gfc_build_compare_string): Call string_to_single_character.
978         (fill_with_spaces): New function
979         (gfc_trans_string_copy): Add kind arguments. Use them to deal
980         with wide character kinds.
981         (gfc_conv_statement_function): Whitespace fix. Call
982         gfc_trans_string_copy with new kind arguments.
983         (gfc_conv_substring_expr): Call gfc_build_wide_string_const
984         instead of using gfc_widechar_to_char.
985         (gfc_conv_string_parameter): Don't force the use of default
986         character type.
987         (gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy.
988         * intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant,
989         gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes.
990         * decl.c (gfc_set_constant_character_len): Don't assert the
991         existence of a single character kind.
992         * trans-array.h (gfc_trans_string_copy): New prototype.
993         * gfortran.h (gfc_check_character_range, gfc_convert_chartype):
994         New prototypes.
995         * error.c (print_wide_char_into_buffer): New function lifting
996         code from gfc_print_wide_char. Fix order to output '\x??' instead
997         of 'x\??'.
998         (gfc_print_wide_char): Call print_wide_char_into_buffer.
999         (show_locus): Call print_wide_char_into_buffer with buffer local
1000         to this function.
1001         * trans-const.c (gfc_build_wide_string_const): New function.
1002         (gfc_conv_string_init): Deal with wide characters strings
1003         constructors.
1004         (gfc_conv_constant_to_tree): Call gfc_build_wide_string_const.
1005         * trans-stmt.c (gfc_trans_label_assign): Likewise.
1006         (gfc_trans_character_select): Deal with wide strings.
1007         * expr.c (gfc_check_assign): Allow conversion between character
1008         kinds on assignment.
1009         * trans-const.h (gfc_build_wide_string_const): New prototype.
1010         * trans-types.c (gfc_get_character_type_len_for_eltype,
1011         gfc_get_character_type_len): Create too variants of the old
1012         gfc_get_character_type_len, one getting kind argument and the
1013         other one directly taking a type tree.
1014         * trans.h (gfor_fndecl_select_string_char4,
1015         gfor_fndecl_convert_char1_to_char4,
1016         gfor_fndecl_convert_char4_to_char1): New prototypes.
1017         * trans-types.h (gfc_get_character_type_len_for_eltype): New
1018         prototype.
1019         * resolve.c (resolve_operator): Exit early when kind mismatches
1020         are detected, because that makes us issue an error message later.
1021         (validate_case_label_expr): Fix wording of error message.
1022         * iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New
1023         functions.
1024         (gfc_resolve_pack): Call _char4 variants of library function
1025         when dealing with wide characters.
1026         (gfc_resolve_reshape): Likewise.
1027         (gfc_resolve_spread): Likewise.
1028         (gfc_resolve_transpose): Likewise.
1029         (gfc_resolve_unpack): Likewise.
1030         * target-memory.c (size_character): Take character kind bit size
1031         correctly into account (not that it changes anything for now, but
1032         it's more generic).
1033         (gfc_encode_character): Added gfc_ prefix. Encoding each
1034         character of a string by calling native_encode_expr for the
1035         corresponding unsigned integer.
1036         (gfc_target_encode_expr): Add gfc_ prefix to encode_character.
1037         * trans-decl.c (gfc_build_intrinsic_function_decls): Build
1038         gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4
1039         and gfor_fndecl_convert_char4_to_char1.
1040         * target-memory.h (gfc_encode_character): New prototype.
1041         * arith.c (gfc_check_character_range): New function.
1042         (eval_intrinsic): Allow non-default character kinds.
1043         * check.c (gfc_check_access_func): Only allow default
1044         character kind arguments.
1045         (gfc_check_chdir): Likewise.
1046         (gfc_check_chdir_sub): Likewise.
1047         (gfc_check_chmod): Likewise.
1048         (gfc_check_chmod_sub): Likewise.
1049         (gfc_check_lge_lgt_lle_llt): New function.
1050         (gfc_check_link): Likewise.
1051         (gfc_check_link_sub): Likewise.
1052         (gfc_check_symlnk): Likewise.
1053         (gfc_check_symlnk_sub): Likewise.
1054         (gfc_check_rename): Likewise.
1055         (gfc_check_rename_sub): Likewise.
1056         (gfc_check_fgetputc_sub): Likewise.
1057         (gfc_check_fgetput_sub): Likewise.
1058         (gfc_check_stat): Likewise.
1059         (gfc_check_stat_sub): Likewise.
1060         (gfc_check_date_and_time): Likewise.
1061         (gfc_check_ctime_sub): Likewise.
1062         (gfc_check_fdate_sub): Likewise.
1063         (gfc_check_gerror): Likewise.
1064         (gfc_check_getcwd_sub): Likewise.
1065         (gfc_check_getarg): Likewise.
1066         (gfc_check_getlog): Likewise.
1067         (gfc_check_hostnm): Likewise.
1068         (gfc_check_hostnm_sub): Likewise.
1069         (gfc_check_ttynam_sub): Likewise.
1070         (gfc_check_perror): Likewise.
1071         (gfc_check_unlink): Likewise.
1072         (gfc_check_unlink_sub): Likewise.
1073         (gfc_check_system_sub): Likewise.
1074         * primary.c (got_delim): Perform correct character range checking
1075         for all kinds.
1076         * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate
1077         calls to library functions convert_char4_to_char1 and
1078         convert_char1_to_char4 for character conversions.
1079         (gfc_conv_intrinsic_char): Allow all character kings.
1080         (gfc_conv_intrinsic_strcmp): Fix whitespace.
1081         (gfc_conv_intrinsic_repeat): Take care of all character kinds.
1082         * intrinsic.texi: For all GNU intrinsics accepting character
1083         arguments, mention that they're restricted to the default kind.
1084         * simplify.c (simplify_achar_char): New function.
1085         (gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char.
1086         gfc_simplify_ichar): Don't error out for wide characters.
1087         (gfc_convert_char_constant): New function.
1088
1089 2008-05-18  Steven G. Kargl  <kargls@comcast.net>
1090
1091         PR fortran/36251
1092         * symbol.c (check_conflict): Issue errors for abuse of PUBLIC, PRIVATE,
1093         and BIND(C).
1094         * resolve.c (gfc_verify_binding_labels): Fix NULL pointer dereference.
1095
1096 2008-05-17  Tobias Burnus  <burnus@net-b.de>
1097
1098         * intrinsic.texi: Correct description of GET_COMMAND_ARGUMENT
1099         and GET_ENVIRONMENT_VARIABLE; fix keyword= name for GETENV,
1100         GETLOG, GMTIME, HOSTNM, IRAND, ITIME, KILL.
1101         Move LOG_GAMMA after LOG10.
1102
1103 2008-05-17  Tobias Burnus  <burnus@net-b.de>
1104
1105         * intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).
1106         * intrinsic.texi: Change INTEGER(*) to INTEGER; fix keyword= name for
1107         ABS, ADJUSTL, AINT, ALLOCATED, ANINT, ASSOCIATED, C_ASSOCIATED,
1108         CEILING, DBLE, DFLOAT, DOT_PRODUCT, DREAL, FLOAT, FLOOR, GET_COMMAND.
1109
1110 2008-05-16  Paul Thomas  <pault@gcc.gnu.org>
1111
1112         PR fortran/35756
1113         PR fortran/35759
1114         * trans-stmt.c (gfc_trans_where): Tighten up the dependency
1115         check for calling gfc_trans_where_3.
1116
1117         PR fortran/35743
1118         * trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
1119         if it is calculated to be negative.
1120
1121         PR fortran/35745
1122         * trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
1123         ss->where for scalar right hand sides.
1124         * trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
1125         not evaluate scalars outside the loop.  Clean up whitespace.
1126         * trans.h : Add a bitfield 'where' to gfc_ss.
1127
1128 2008-05-16  Tobias Burnus  <burnus@net-b.de>
1129
1130         * libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
1131         * array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.
1132
1133 2008-04-16  Daniel Kraft  <d@domob.eu>
1134
1135         PR fortran/27997
1136         * gfortran.h:  Added field "length_from_typespec" to gfc_charlength.
1137         * aray.c (gfc_match_array_constructor):  Added code to parse typespec.
1138         (check_element_type, check_constructor_type, gfc_check_constructor_type):
1139         Extended to support explicit typespec on constructor.
1140         (gfc_resolve_character_array_constructor):  Pad strings correctly for
1141         explicit, constant character length.
1142         * trans-array.c:  New static global variable "typespec_chararray_ctor"
1143         (gfc_trans_array_constructor):  New code to support explicit but dynamic
1144         character lengths.
1145
1146 2008-05-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1147
1148         PR fortran/34325
1149         * decl.c (match_attr_spec): Check for matching pairs of parenthesis.
1150         * expr.c (gfc_specification_expr): Supplement the error message with the
1151         type that was found.
1152         * resolve.c (gfc_resolve_index): Likewise.
1153         * match.c (gfc_match_parens): Clarify error message with "at or before".
1154         (gfc_match_do): Check for matching pairs of parenthesis.
1155
1156 2008-05-16  Tobias Burnus  <burnus@net-b.de
1157
1158         * intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
1159         add missing KIND argument to ACHAR and NINT; and state that
1160         the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
1161         ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
1162
1163 2008-05-16  Daniel Kraft  <d@domob.eu>
1164
1165         * primary.c:  New private structure "gfc_structure_ctor_component".
1166         (gfc_free_structure_ctor_component):  New helper function.
1167         (gfc_match_structure_constructor):  Extended largely to support named
1168         arguments and default initialization for structure constructors.
1169
1170 2008-05-15  Steven G. Kargl  <kargls@comcast.net>
1171
1172         * simplify.c (gfc_simplify_dble, gfc_simplify_float,
1173         simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
1174         possible memory leaks.
1175         (gfc_simplify_reshape): Plug possible memory leaks and dereferencing
1176         of NULL pointers.
1177
1178 2008-05-15  Steven G. Kargl  <kargls@comcast.net>
1179
1180         PR fortran/36239
1181         * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
1182         rolled integer conversion with gfc_int2int, gfc_real2int, and
1183         gfc_complex2int.
1184         (gfc_simplify_intconv): Renamed to simplify_intconv.
1185         
1186 2008-05-15  Steven G. Kargl,   <kargl@comcast.net>
1187         * gfortran.dg/and_or_xor.f90: New test
1188
1189         * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
1190         gfc_simplify_xor): Don't range check logical results.
1191
1192 2008-05-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1193
1194         * trans-expr.c (gfc_conv_concat_op): Take care of nondefault
1195         character kinds.
1196         (gfc_build_compare_string): Add kind argument and use it.
1197         (gfc_conv_statement_function): Fix indentation.
1198         * gfortran.h (gfc_character_info): New structure.
1199         (gfc_character_kinds): New array.
1200         * trans-types.c (gfc_character_kinds, gfc_character_types,
1201         gfc_pcharacter_types): New array.
1202         (gfc_init_kinds): Fill character kinds array.
1203         (validate_character): Take care of nondefault character kinds.
1204         (gfc_build_uint_type): New function.
1205         (gfc_init_types): Take care of nondefault character kinds.
1206         (gfc_get_char_type, gfc_get_pchar_type): New functions.
1207         (gfc_get_character_type_len): Use gfc_get_char_type.
1208         * trans.h (gfc_build_compare_string): Adjust prototype.
1209         (gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
1210         gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
1211         gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
1212         gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
1213         gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
1214         prototypes.
1215         * trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
1216         prototypes.
1217         * trans-decl.c (gfor_fndecl_compare_string_char4,
1218         gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
1219         gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
1220         gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
1221         gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
1222         gfor_fndecl_concat_string_char4): New function decls.
1223         (gfc_build_intrinsic_function_decls): Define new *_char4 function
1224         decls.
1225         * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
1226         gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
1227         gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
1228         gfc_conv_intrinsic_function): Deal with nondefault character kinds.
1229
1230 2008-05-15  Sa Liu  <saliu@de.ibm.com>
1231
1232         * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
1233         All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
1234         c_int128_t, c_int_least128_t and c_int_fast128_t are added as
1235         GNU extensions.
1236         * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
1237         to macro NAMED_INTCST.
1238         * symbol.c (std_for_isocbinding_symbol): New helper function to 
1239         return the standard that supports this isocbinding symbol.
1240         (generate_isocbinding_symbol): Do not generate GNU extension symbols
1241         if std=f2003. Add new parameter to NAMED_INTCST.
1242         * module.c (use_iso_fortran_env_module): Add new parameter to
1243         NAMED_INTCST and new field standard to struct intmod_sym.
1244         * gfortran.h: Add new parameter to NAMED_INTCST.
1245         * trans-types.c (init_c_interop_kinds): Add new parameter to 
1246         NAMED_INTCST.
1247         * intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
1248         and C_INT_FAST128_T.
1249
1250 2008-05-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1251
1252         PR fortran/36059
1253         * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
1254         arrays that have the TARGET attribute.
1255
1256 2008-05-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1257
1258         PR fortran/36186
1259         * simplify.c (only_convert_cmplx_boz): New function.
1260         (gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
1261         Call only_convert_cmplx_boz.
1262
1263 2008-05-14  Paul Thomas  <pault@gcc.gnu.org>
1264
1265         PR fortran/36233
1266         * interface.c (compare_actual_formal): Do not check sizes if the
1267         actual is BT_PROCEDURE.
1268
1269 2008-05-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1270
1271         PR fortran/35682
1272         * trans-array.c (gfc_conv_ss_startstride): Any negative size is
1273         the same as zero size.
1274         (gfc_conv_loop_setup): Fix size calculation.
1275
1276 2008-05-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1277
1278         PR fortran/35685
1279         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
1280         handle zero-size sections.
1281
1282 2008-05-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1283
1284         PR fortran/36215
1285         * scanner.c (preprocessor_line): Allocate enough memory for a
1286         wide string.
1287
1288 2008-05-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1289
1290         PR fortran/36176
1291         * target-memory.c (gfc_target_expr_size): Correctly treat
1292         substrings.
1293         (gfc_target_encode_expr): Likewise.
1294         (gfc_interpret_complex): Whitespace change.
1295
1296 2008-05-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
1297
1298         PR fortran/35719
1299         * trans.c (gfc_call_malloc): If size equals zero, allocate one
1300         byte; don't return a null pointer.
1301
1302 2008-05-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1303
1304         PR fortran/36197
1305         * module.c (quote_string): Fix sprintf format.
1306
1307 2008-05-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1308
1309         PR fortran/36162
1310         * module.c (quote_string, unquote_string,
1311         mio_allocated_wide_string): New functions.
1312         (mio_expr): Call mio_allocated_wide_string where needed.
1313
1314 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1315
1316          * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
1317          Rename DECL_IS_PURE to DECL_PURE_P.
1318
1319 2008-05-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1320
1321         * arith.c: (gfc_arith_concat, gfc_compare_string,
1322         gfc_compare_with_Cstring, hollerith2representation,
1323         gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
1324         gfc_hollerith2character, gfc_hollerith2logical): Use wide
1325         characters for character constants.
1326         * data.c (create_character_intializer): Likewise.
1327         * decl.c (gfc_set_constant_character_len): Likewise.
1328         * dump-parse-tree.c (show_char_const): Correctly dump wide
1329         character strings.
1330         error.c (print_wide_char): Rename into gfc_print_wide_char.
1331         (show_locus): Adapt to new prototype of gfc_print_wide_char.
1332         expr.c (free_expr0): Representation is now disjunct from
1333         character string value, so we always free it.
1334         (gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
1335         to wide character strings.
1336         * gfortran.h (gfc_expr): Make value.character.string a wide string.
1337         (gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
1338         gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
1339         (gfc_get_wide_string): New macro.
1340         (gfc_print_wide_char): New prototype.
1341         * io.c (format_string): Make a wide string.
1342         (next_char, gfc_match_format, compare_to_allowed_values, 
1343         gfc_match_open): Deal with wide strings.
1344         * module.c (mio_expr): Convert between wide strings and ASCII ones.
1345         * primary.c (match_hollerith_constant, match_charkind_name): 
1346         Handle wide strings.
1347         * resolve.c (build_default_init_expr): Likewise.
1348         * scanner.c (gfc_wide_toupper, gfc_wide_memset,
1349         gfc_char_to_widechar): New functions.
1350         (wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
1351         Changes in prototypes.
1352         (gfc_define_undef_line, load_line, preprocessor_line,
1353         include_line, load_file, gfc_read_orig_filename): Handle wide
1354         strings.
1355         * simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
1356         gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
1357         gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
1358         gfc_simplify_repeat): Handle wide strings.
1359         (wide_strspn, wide_strcspn): New helper functions.
1360         (gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
1361         Handle wide strings.
1362         * symbol.c (generate_isocbinding_symbol): Likewise.
1363         * target-memory.c (size_character, gfc_target_expr_size,
1364         encode_character, gfc_target_encode_expr, gfc_interpret_character,
1365         gfc_target_interpret_expr): Handle wide strings.
1366         * trans-const.c (gfc_conv_string_init): Lower wide strings to
1367         narrow ones.
1368         (gfc_conv_constant_to_tree): Likewise.
1369         * trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
1370         * trans-io.c (gfc_new_nml_name_expr): Likewise.
1371         * trans-stmt.c (gfc_trans_label_assign): Likewise.
1372
1373 2008-05-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1374
1375         * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
1376         gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
1377         gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
1378         with ATTRIBUTE_UNUSED.
1379
1380 2008-05-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1381
1382         * check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
1383         * simplify.c (gfc_simplify_lgamma): Likewise.
1384
1385 2008-05-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1386
1387         * openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
1388         gfc_peek_ascii_char.
1389         * decl.c (gfc_match_kind_spec, gfc_match_type_spec,
1390         gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
1391         match_string_p, match_attr_spec, gfc_match_suffix,
1392         match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
1393         Likewise.
1394         * gfortran.h (gfc_char_t): New type.
1395         (gfc_linebuf): Make line member a gfc_char_t.
1396         (locus): Make nextc member a gfc_char_t.
1397         (gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
1398         gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
1399         gfc_peek_ascii_char, gfc_check_digit): New prototypes.
1400         * error.c (print_wide_char): New function.
1401         (show_locus): Use print_wide_char and gfc_wide_strlen.
1402         * io.c (next_char): Use gfc_char_t type.
1403         (match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
1404         * match.c (gfc_match_parens, gfc_match_eos,
1405         gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
1406         gfc_match_intrinsic_op, gfc_match_char,  gfc_match_return,
1407         gfc_match_common): Likewise.
1408         * match.h (gfc_match_special_char): Change prototype.
1409         * parse.c (decode_specification_statement, decode_statement,
1410         decode_omp_directive, next_free, next_fixed): Use
1411         gfc_peek_ascii_char and gfc_next_ascii_char.
1412         * primary.c (gfc_check_digit): Change name.
1413         (match_digits, match_hollerith_constant, match_boz_constant,
1414         match_real_constant, next_string_char, match_charkind_name,
1415         match_string_constant, match_logical_constant_string,
1416         match_complex_constant, match_actual_arg, match_varspec,
1417         gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
1418         gfc_next_ascii_char.
1419         * scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
1420         gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
1421         gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
1422         wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
1423         gfc_next_ascii_char, gfc_peek_ascii_char):
1424         New functions.
1425         (next_char, gfc_define_undef_line, skip_free_comments,
1426         gfc_next_char_literal, gfc_next_char, gfc_peek_char,
1427         gfc_error_recovery, load_line, preprocessor_line, include_line,
1428         load_file, gfc_read_orig_filename): Use gfc_char_t for source
1429         characters and the {gfc_,}wide_* functions to manipulate wide
1430         strings.
1431
1432 2008-05-06  Tobias Burnus  <burnus@net-b.de>
1433
1434         PR fortran/36117
1435         * intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
1436         * intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
1437         * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
1438         gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
1439         gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
1440
1441 2008-05-03  Janus Weil  <jaydub66@gmail.com>
1442
1443         * misc.c (gfc_clear_ts): Set interface to NULL.
1444
1445 2008-05-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1446
1447         PR fortran/33268
1448         * gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
1449         gfc_expr value union. Add io_kind enum to here from io.c.
1450         * io.c (gfc_free_dt): Free extra_comma.
1451         (gfc_resolve_dt): If an extra comma was encountered and io_unit is type
1452         BT_CHARACTER, resolve to format_expr and set default unit.  Error if
1453         io_kind is M_WRITE. (match_io):  Match the extra comma and set new
1454         pointer, extra_comma.
1455
1456 2008-05-01  Bud Davis  <bdavis9659@sbcglobal.net>
1457
1458         PR35940/Fortran
1459         * simplify.c (gfc_simplify_index): Check for direction argument 
1460         being a constant.
1461
1462 2008-05-01  Janus Weil  <jaydub66@gmail.com>
1463
1464         * gfortran.h (struct gfc_symbol): Moving "interface" member to
1465         gfc_typespec (plus fixing a small docu error).
1466         * interface.c (gfc_procedure_use): Ditto.
1467         * decl.c (match_procedure_decl): Ditto.
1468         * resolve.c (resolve_specific_f0,
1469         resolve_specific_f0, resolve_symbol): Ditto.
1470
1471 2008-04-30  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1472
1473         * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
1474         * intrinsic.h (gfc_check_selected_char_kind,
1475         gfc_simplify_selected_char_kind): New prototypes.
1476         * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
1477         * trans.h (gfor_fndecl_sc_kind): New function decl.
1478         * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
1479         * arith.c (gfc_compare_with_Cstring): New function.
1480         * arith.h (gfc_compare_with_Cstring): New prototype.
1481         * check.c (gfc_check_selected_char_kind): New function.
1482         * primary.c (match_string_constant, match_kind_param): Mark
1483         symbols used as literal constant kind param as referenced.
1484         * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
1485         (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
1486         * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
1487         * simplify.c (gfc_simplify_selected_char_kind): New function.
1488
1489 2008-04-28  Paul Thomas  <pault@gcc.gnu.org>
1490
1491         PR fortran/35997
1492         * module.c (find_symbol): Do not return a result for a symbol
1493         that has been renamed in another module.
1494
1495 2008-04-26  George Helffrich <george@gcc.gnu.org>
1496
1497         PR fortran/35892
1498         PR fortran/35154
1499         * trans-common.c (create_common):  Add decl to function
1500         chain (if inside one) to preserve identifier scope in debug output.
1501
1502 2008-04-25  Jan Hubicka  <jh@suse.cz>
1503
1504         * trans-decl.c (trans_function_start): Update.
1505
1506 2008-04-25  Tobias Burnus  <burnus@net-b.de>
1507             Daniel Franke <franke.daniel@gmail.com>
1508
1509         PR fortran/35156
1510         * gfortranspec.c (lang_specific_driver): Deprecate
1511         -M option; fix ICE when "-M" is last argument and
1512         make "-M<dir>" work.
1513         * options.c (gfc_handle_module_path_options): 
1514         Use -J instead of -M in error messages.
1515         * invoke.texi: Mark -M as depecated.
1516
1517 2008-04-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1518             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1519
1520         PR fortran/35994
1521         * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
1522         loop counter offset.
1523
1524 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
1525
1526         * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
1527         * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
1528         (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
1529         (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
1530         (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
1531         * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
1532         (create_common): Don't set TREE_INVARIANT.
1533         * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
1534         * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
1535
1536 2008-04-21  Steve Ellcey  <sje@cup.hp.com>
1537
1538         * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
1539
1540 2008-04-21  Daniel Franke  <franke.daniel@gmail.com>
1541
1542         PR fortran/35019
1543         * gfortranspec.c (lookup_option): Properly handle separated arguments
1544         in -J option, print missing argument message when necessary.
1545
1546 2008-04-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1547
1548         PR fortran/35882
1549         * scanner.c (skip_fixed_comments): Update continue_line when comment is
1550         detected. (gfc_next_char_literal): Likewise.
1551
1552 2008-04-19  Paul Thomas  <pault@gcc.gnu.org>
1553
1554         PR fortran/35944
1555         PR fortran/35946
1556         PR fortran/35947
1557         * trans_array.c (gfc_trans_array_constructor): Temporarily
1558         realign loop, if loop->from is not zero, before creating
1559         the temporary array and provide an offset.
1560
1561         PR fortran/35959
1562         * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
1563         and allow for NULL body.  Change all references from
1564         init_default_dt to gfc_init_default_dt.
1565         * trans.h : Add prototype for gfc_init_default_dt.
1566         * trans-array.c (gfc_trans_deferred_vars): After nullification
1567         call gfc_init_default_dt for derived types with allocatable
1568         components.
1569
1570 2008-04-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1571
1572         PR fortran/35892
1573         * trans-common.c (create_common): Revert patch causing regression.
1574
1575 2008-04-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1576
1577         PR fortran/35724
1578         * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
1579         optional argument attribute.
1580         
1581 2008-04-16  Paul Thomas  <pault@gcc.gnu.org>
1582
1583         PR fortran/35932
1584         * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
1585         is not used, the argument must be converted.
1586
1587 2008-04-16  Jakub Jelinek  <jakub@redhat.com>
1588
1589         PR target/35662
1590         * f95-lang.c (gfc_init_builtin_functions): Make sure
1591         BUILT_IN_SINCOS{,F,L} types aren't varargs.
1592
1593 2008-04-15  Paul Thomas  <pault@gcc.gnu.org>
1594
1595         PR fortran/35864
1596         * expr.c (scalarize_intrinsic_call): Reorder identification of
1597         array argument so that if one is not found a segfault does not
1598         occur.  Return FAILURE if all scalar arguments.
1599
1600 2008-04-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1601             Tobias Burnus  <burnus@net-b.de>
1602
1603         PR fortran/35882
1604         * options.c (gfc_init_options): Set the default maximum continuation
1605         lines to 255 for both free and fixed form source for warnings.
1606         (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
1607         the -std=f95 free form max continuations to 39 for warnings.
1608         * scanner.c (gfc_next_char_literal): Adjust the current_line number only
1609         if it is less than the current locus.
1610
1611 2008-04-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1612
1613         PR fortran/25829 28655
1614         * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
1615         round, sign, and id. (match_open_element): Match new tags.
1616         (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
1617         for DEFAULT only. Update error messages. (match_dt_element): Fix match
1618         tag for asynchronous. Update error messages. (gfc_free_inquire): Free
1619         new expressions. (match_inquire_element): Match new tags.
1620         (gfc_match_inquire): Add constraint for ID and PENDING.
1621         (gfc_resolve_inquire): Resolve new tags.
1622         * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
1623         mask for ID parameter.
1624         * ioparm.def: Fix order of parameters for pending, round, and sign.
1625         NOTE: These must line up with the definitions in libgfortran/io/io.h. or
1626         things don't work.
1627
1628 2008-04-06  Paul Thomas  <pault@gcc.gnu.org>
1629
1630         PR fortran/35780
1631         * expr.c (scalarize_intrinsic_call): Identify which argument is
1632         an array and use that as the template.
1633         (check_init_expr): Remove tests that first argument is an array
1634         in the call to scalarize_intrinsic_call.
1635
1636 2008-04-06  Tobias Schlüter  <tobi@gcc.gnu.org>
1637
1638         PR fortran/35832
1639         * io.c (io_tag): Add field 'value'.  Split 'spec' field in
1640         existing io_tags.
1641         (match_etag, match_vtag, match_ltag): Split parsing in two steps
1642         to give better error messages.
1643
1644 2008-04-06  Tobias Burnus  <burnus@net-b.de>
1645
1646         * io.c (check_io_constraints): Add constrains. ID= requires
1647         asynchronous= and asynchronous= must be init expression.
1648
1649 2008-04-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1650
1651         * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
1652
1653 2008-04-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1654
1655         * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
1656         gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
1657         functions and make them static. Add new gfc_dump_parse_tree
1658         function.
1659         * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
1660         (gfc_status, gfc_status_char): Delete prototypes.
1661         * error.c (gfc_status, gfc_status_char): Remove functions.
1662         * scanner.c (gfc_new_file): Use printf instead of gfc_status.
1663         * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
1664         (gfc_handle_module_path_options): Use gfc_fatal_error instead of
1665         gfc_status and exit.
1666         (gfc_handle_option): Rename verbose into dump_parse_tree.
1667         * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
1668
1669 2008-04-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1670             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1671
1672         PR fortran/25829 28655
1673         * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
1674         * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
1675         (gfc_open): Add pointers for decimal, encoding, round, sign,
1676         asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
1677         encoding, pending, round, sign, size, id.
1678         (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
1679         asynchronous, blank, decimal, delim, pad, round, sign.
1680         (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
1681         wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
1682         * trans-stmt.h (gfc_trans_wait): New function prototype.
1683         * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
1684         * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
1685         ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
1686         (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
1687         tags. (gfc_resolve_open): Remove comment around check for allowed
1688         values and ASYNCHRONOUS, update it.  Likewise for DECIMAL, ENCODING,
1689         ROUND, and SIGN. (match_dt_element): Add matching for new tags.
1690         (gfc_free_wait): New function. (gfc_resolve_wait): New function.
1691         (match_wait_element): New function. (gfc_match_wait): New function.
1692         * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
1693         (resolve_code): Add case for EXEC_WAIT. 
1694         * st.c (gfc_free_statement): Add case for EXEC_WAIT.
1695         * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
1696         Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
1697         (gfc_build_io_library_fndecls): Add function declaration for st_wait.
1698         (gfc_trans_open): Add mask bits for new I/O tags.
1699         (gfc_trans_inquire): Add mask bits for new I/O tags.
1700         (gfc_trans_wait): New translation function.
1701         (build_dt): Add mask bits for new I/O tags.
1702         * match.c (gfc_match_if) Add matcher for "wait".
1703         * match.h (gfc_match_wait): Prototype for new function.
1704         * ioparm.def: Add new I/O parameter definitions.
1705         * parse.c (decode_statement): Add match for "wait" statement.
1706         (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
1707
1708 2008-04-03  Jakub Jelinek  <jakub@redhat.com>
1709
1710         PR fortran/35786
1711         * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
1712         isn't a variable.
1713
1714 2008-04-03  Tom Tromey  <tromey@redhat.com>
1715
1716         * Make-lang.in (fortran_OBJS): New variable.
1717
1718 2008-04-03  Paolo Bonzini  <bonzini@gnu.org>
1719
1720         * f95-lang.c (insert_block): Kill.
1721
1722 2008-04-01  George Helffrich <george@gcc.gnu.org>
1723
1724         PR fortran/35154, fortran/23057
1725         * trans-common.c (create_common):  Add decl to function
1726         chain to preserve identifier scope in debug output.
1727
1728 2008-04-01  Joseph Myers  <joseph@codesourcery.com>
1729
1730         * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
1731         * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
1732         gpl.texi.
1733
1734 2008-03-30  Paul Thomas  <pault@gcc.gnu.org>
1735
1736         PR fortran/35740
1737         * resolve.c (resolve_function, resolve_call): If the procedure
1738         is elemental do not look for noncopying intrinsics.
1739
1740 2008-03-29  Paul Thomas  <pault@gcc.gnu.org>
1741
1742         PR fortran/35698
1743         * trans-array.c (gfc_array_init_size): Set 'size' zero if
1744         negative in one dimension.
1745
1746         PR fortran/35702
1747         * trans-expr.c (gfc_trans_string_copy): Only assign a char
1748         directly if the lhs and rhs types are the same.
1749
1750 2008-03-28  Daniel Franke  <franke.daniel@gmail.com>
1751             Paul Richard Thomas <paul.richard.thomas@gmail.com>
1752
1753         PR fortran/34714
1754         * primary.c (match_variable): Improved matching of function 
1755         result variables.
1756         * resolve.c (resolve_allocate_deallocate): Removed checks if
1757         the actual argument for STAT is a variable.
1758
1759 2008-03-28  Tobias Burnus  <burnus@net-b.de>
1760
1761         * symbol.c (gfc_get_default_type): Fix error message; option
1762         -fallow_leading_underscore should be -fallow-leading-underscore
1763
1764 2008-03-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1765
1766         PR fortran/35724
1767         * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
1768         optional argument attribute.
1769
1770 2008-03-27  Tom Tromey  <tromey@redhat.com>
1771
1772         * Make-lang.in: Revert automatic dependency patch.
1773
1774 2008-03-25  Tom Tromey  <tromey@redhat.com>
1775
1776         * Make-lang.in: Remove .o targets.
1777         (fortran_OBJS): New variable.
1778         (fortran/gfortranspec.o): Move to fortran/.  Reduce to variable
1779         setting.
1780         (GFORTRAN_D_OBJS): Update.
1781         (GFORTRAN_TRANS_DEPS): Remove.
1782
1783 2008-03-24  Paul Thomas  <pault@gcc.gnu.org>
1784
1785         PR fortran/34813
1786         * resolve.c (resolve_structure_cons): It is an error to assign
1787         NULL to anything other than a pointer or allocatable component.
1788
1789         PR fortran/33295
1790         * resolve.c (resolve_symbol): If the symbol is a derived type,
1791         resolve the derived type.  If the symbol is a derived type
1792         function, ensure that the derived type is visible in the same
1793         namespace as the function.
1794
1795 2008-03-23  Tobias Schlüter  <tobi@gcc.gnu.org>
1796
1797         * trans.h: Use fold_build in build1_v, build2_v and build3_v
1798         macros.
1799         * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
1800         Don't use build2_v macro.
1801
1802 2008-03-19  Daniel Franke  <franke.daniel@gmail.com>
1803
1804         PR fortran/35152
1805         * interface.c (gfc_procedure_use): Check for keyworded arguments in
1806         procedures without explicit interfaces.
1807
1808 2008-03-16  Paul Thomas  <pault@gcc.gnu.org>
1809
1810         PR fortran/35470
1811         * resolve.c (check_assumed_size_reference):  Only visit the
1812         first reference and look directly at the highest dimension.
1813
1814 2008-03-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1815
1816         PR fortran/35184
1817         * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
1818         assert.
1819
1820 2008-03-15  Daniel Franke  <franke.daniel@gmail.com>
1821
1822         PR fortran/35584
1823         * resolve.c (resolve_branch): Less strict and pessimistic warning
1824         message.
1825
1826 2008-03-11  Paolo Bonzini  <bonzini@gnu.org>
1827
1828         * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
1829         (gfc_be_parse_file): Call clear_binding_stack from here.
1830         (gfc_clear_binding_stack): Rename to clear_binding_stack.
1831                 
1832 2008-03-09  Paul Thomas  <pault@gcc.gnu.org>
1833
1834         PR fortran/35474
1835         * module.c (mio_symtree_ref): After providing a symbol for a
1836         missing equivalence member, resolve and NULL the fixups.
1837
1838 2008-03-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1839
1840         * invoke.texi (Error and Warning Options): Document
1841         -Wline-truncation.
1842
1843 2008-03-08  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1844
1845         PR fortran/34956
1846         * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
1847         checking bounds of absent optional arguments.
1848
1849 2008-03-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1850
1851         PR fortran/33197
1852         * intrinsic.c (add_functions): Add simplification routines for
1853         ERF, DERF, ERFC and DERFC.
1854         * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
1855         extensions into Fortran 2008 features.
1856         * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
1857         prototypes.
1858         * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
1859
1860 2008-03-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1861
1862         PR fortran/33197
1863         * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
1864         ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
1865         ERFC_SCALED, LOG_GAMMA and HYPOT.
1866         * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
1867         gfc_resolve_hypot): New prototypes.
1868         * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
1869         ACOSH, ASINH and ATANH available.
1870         * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
1871         * lang.opt: Add -std=f2008 option.
1872         * libgfortran.h: Define GFC_STD_F2008.
1873         * lang-specs.h: Add .f08 and .F08 file suffixes.
1874         * iresolve.c (gfc_resolve_hypot): New function.
1875         * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
1876         * check.c (gfc_check_hypot): New function.
1877         * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
1878         * options.c (set_default_std_flags): Allow Fortran 2008 by default.
1879         (form_from_filename): Add .f08 suffix.
1880         (gfc_handle_option): Handle -std=f2008 option.
1881         * simplify.c (gfc_simplify_hypot): New function.
1882         * gfortran.texi: Document Fortran 2008 status and file extensions.
1883         * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
1884         as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
1885         ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
1886         * invoke.texi: Document the new -std=f2008 option.
1887
1888 2008-03-02  Jakub Jelinek  <jakub@redhat.com>
1889
1890         * gfortranspec.c (lang_specific_driver): Update copyright notice
1891         dates.
1892
1893 2008-02-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1894
1895         PR fortran/35059
1896         * expr.c (find_array_element): Modify traversing the constructor to
1897         avoid trying to access NULL memory pointed to by next for the
1898         last element. (find_array_section): Exit while loop if cons->next is
1899         NULL.
1900         * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
1901         (gfc_conv_function_call): Same.
1902         * decl.c (gfc_match_implicit): Same.
1903         * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
1904
1905 2008-02-28  Daniel Franke  <franke.daniel@gmail.com>
1906
1907         PR fortran/31463
1908         PR fortran/33950
1909         PR fortran/34296
1910         * lang.opt: Added -Wreturn-type.
1911         * options.c (gfc_handle_option): Recognize -Wreturn-type.
1912         * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
1913         where the result value is not set.
1914         (gfc_generate_function_code): Likewise.
1915         (generate_local_decl): Emit warnings for funtions whose RESULT
1916         variable is not set.
1917
1918 2008-02-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1919
1920         PR fortran/34868
1921         * trans-expr.c (gfc_conv_variable): Don't build indirect
1922         references when explicit interface is mandated.
1923         * resolve.c (resolve_formal_arglist): Set attr.always_explicit
1924         on the result symbol as well as the procedure symbol.
1925
1926 2008-02-27  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1927
1928         PR fortran/33387
1929         * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
1930         gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
1931         gfor_fndecl_math_exponent16.
1932         * f95-lang.c (build_builtin_fntypes): Add new function types.
1933         (gfc_init_builtin_functions): Add new builtins for nextafter,
1934         frexp, ldexp, fabs, scalbn and inf.
1935         * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
1936         (gfc_resolve_scale): Don't convert type of second argument.
1937         (gfc_resolve_set_exponent): Likewise.
1938         (gfc_resolve_size): Don't add hidden arguments.
1939         * trans-decl.c: Remove gfor_fndecl_math_exponent4,
1940         gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
1941         gfor_fndecl_math_exponent16.
1942         * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
1943         for scalbn, fraction, nearest, rrspacing, set_exponent and
1944         spacing.
1945         (gfc_conv_intrinsic_exponent): Directly call frexp.
1946         (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
1947         gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
1948         gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
1949         functions.
1950         (gfc_conv_intrinsic_function): Use the new functions above.
1951
1952 2008-02-26  Tobias Burnus  <burnus@net-b.de>
1953
1954         PR fortran/35033
1955         * interface.c (check_operator_interface): Show better line for error
1956         messages; fix constrains for user-defined assignment operators.
1957         (gfc_extend_assign): Fix constrains for user-defined assignment
1958         operators.
1959
1960 2008-02-26  Tom Tromey  <tromey@redhat.com>
1961
1962         * trans-io.c (set_error_locus): Remove old location code.
1963         * trans-decl.c (gfc_set_decl_location): Remove old location code.
1964         * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
1965         * scanner.c (gfc_gobble_whitespace): Remove old location code.
1966         (get_file): Likewise.
1967         (preprocessor_line): Likewise.
1968         (load_file): Likewise.
1969         (gfc_new_file): Likewise.
1970         * trans.c (gfc_trans_runtime_check): Remove old location code.
1971         (gfc_get_backend_locus): Likewise.
1972         (gfc_set_backend_locus): Likewise.
1973         * data.c (gfc_assign_data_value): Remove old location code.
1974         * error.c (show_locus): Remove old location code.
1975         * gfortran.h (gfc_linebuf): Remove old location code.
1976         (gfc_linebuf_linenum): Remove old-location variant.
1977
1978 2008-02-25  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1979
1980         PR fortran/34729
1981         * trans-const.c (gfc_build_string_const): Don't call gettext.
1982         (gfc_build_localized_string_const): New function.
1983         * trans-const.h (gfc_build_localized_string_const): New prototype.
1984         * trans.c (gfc_trans_runtime_check): Use
1985         gfc_build_localized_string_const instead of gfc_build_string_const.
1986         (gfc_call_malloc): Likewise.
1987         (gfc_allocate_with_status): Likewise.
1988         (gfc_allocate_array_with_status): Likewise.
1989         (gfc_deallocate_with_status): Likewise.
1990         (gfc_call_realloc): Likewise.
1991         * trans-io.c (gfc_trans_io_runtime_check): Likewise.
1992
1993 2008-02-24  Tobias Schlüter  <tobi@gcc.gnu.org>
1994
1995         * arith.c: Update copyright years.
1996         * arith.h: Likewise.
1997         * array.c: Likewise.
1998         * bbt.c: Likewise.
1999         * check.c: Likewise.
2000         * data.c: Likewise.
2001         * data.h: Likewise.
2002         * decl.c: Likewise.
2003         * dependency.c: Likewise.
2004         * dependency.h: Likewise.
2005         * dump-parse-tree.c: Likewise.
2006         * error.c: Likewise.
2007         * expr.c: Likewise.
2008         * gfc-internals.texi: Likewise.
2009         * gfortran.h: Likewise.
2010         * gfortran.texi: Likewise.
2011         * gfortranspec.c: Likewise.
2012         * interface.c: Likewise.
2013         * intrinsic.c: Likewise.
2014         * intrinsic.h: Likewise.
2015         * intrinsic.texi: Likewise.
2016         * invoke.texi: Likewise.
2017         * io.c: Likewise.
2018         * iresolve.c: Likewise.
2019         * iso-c-binding.def: Likewise.
2020         * iso-fortran-env.def: Likewise.
2021         * lang-specs.h: Likewise.
2022         * lang.opt: Likewise.
2023         * libgfortran.h: Likewise.
2024         * match.c: Likewise.
2025         * match.h: Likewise.
2026         * matchexp.c: Likewise.
2027         * misc.c: Likewise.
2028         * module.c: Likewise.
2029         * openmp.c: Likewise.
2030         * options.c: Likewise.
2031         * parse.c: Likewise.
2032         * parse.h: Likewise.
2033         * primary.c: Likewise.
2034         * resolve.c: Likewise.
2035         * scanner.c: Likewise.
2036         * simplify.c: Likewise.
2037         * st.c: Likewise.
2038         * symbol.c: Likewise.
2039         * target-memory.c: Likewise.
2040         * target-memory.h: Likewise.
2041         * trans-array.h: Likewise.
2042         * trans-const.h: Likewise.
2043         * trans-stmt.h: Likewise.
2044         * trans-types.c: Likewise.
2045         * trans-types.h: Likewise.
2046         * types.def: Likewise.
2047
2048 2008-02-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2049
2050         PR fortran/35223
2051         * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
2052         (gfc_simplify_ibset): Remove call to range_check.
2053         (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
2054         (gfc_simplify_real): Add call gfc_clear_ts to initialize the
2055         temporary gfc_typspec variable.
2056
2057 2008-02-24  Tobias Schlüter  <tobi@gcc.gnu.org>
2058
2059         * trans-array.c (gfc_conv_descriptor_data_get,
2060         gfc_conv_descriptor_data_set_internal,
2061         gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
2062         gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
2063         gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
2064         gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
2065         gfc_conv_array_transpose, gfc_grow_array,
2066         gfc_trans_array_constructor_subarray,
2067         gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
2068         gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
2069         gfc_conv_array_initializer, gfc_trans_array_bounds,
2070         gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2071         gfc_get_dataptr_offset, gfc_conv_array_parameter,
2072         gfc_trans_dealloc_allocated, get_full_array_size,
2073         gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
2074         instead of buildN.
2075         * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
2076         gfc_conv_component_ref, gfc_conv_cst_int_power,
2077         gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
2078         * trans-common.c (create_common): Likewise.
2079         * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
2080         Likewise.
2081         * trans-const.c (gfc_conv_constant_to_tree): Likewise.
2082         * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
2083         gfc_trans_integer_select, gfc_trans_character_select,
2084         gfc_trans_forall_loop, compute_overall_iter_number,
2085         gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
2086         gfc_trans_deallocate): Likewise.
2087         * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
2088         gfc_allocate_with_status, gfc_allocate_array_with_status,
2089         gfc_deallocate_with_status): Likewise.
2090         * f95-lang.c (gfc_truthvalue_conversion): Likewise.
2091         * trans-io.c (set_parameter_const, set_parameter_value,
2092         set_parameter_ref, set_string, set_internal_unit, io_result,
2093         set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
2094         * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
2095         gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
2096         gfc_generate_function_code): Likewise.
2097         * convert.c (convert): Likewise.
2098         * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
2099         build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
2100         gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
2101         gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
2102         gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
2103         gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
2104         gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
2105         gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
2106         gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
2107         gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
2108         gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
2109         gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
2110         gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
2111         gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
2112         gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
2113         gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
2114         gfc_conv_intrinsic_repeat): Likewise.
2115
2116 2008-02-23  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2117
2118         PR target/25477
2119         * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
2120         * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
2121         * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
2122         gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
2123         * trans-decl.c: Likewise.
2124
2125 2008-02-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2126
2127         PR fortran/35059
2128         * expr.c (find_array_element): Modify traversing the constructor to
2129         avoid trying to access NULL memory pointed to by next for the
2130         last element. (find_array_section): Exit while loop if cons->next is
2131         NULL.
2132
2133 2008-02-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2134
2135         PR fortran/34907
2136         * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
2137         structure.
2138         (gfc_resolve_aint): Likewise.
2139         (gfc_resolve_anint): Likewise.
2140         (gfc_resolve_besn): Likewise.
2141         (gfc_resolve_cshift): Likewise.
2142         (gfc_resolve_ctime): Likewise.
2143         (gfc_resolve_eoshift): Likewise.
2144         (gfc_resolve_index_func): Likewise.
2145         (gfc_resolve_isatty): Likewise.
2146         (gfc_resolve_malloc): Likewise.
2147         (gfc_resolve_rrspacing): Likewise.
2148         (gfc_resolve_scale): Likewise.
2149         (gfc_resolve_set_exponent): Likewise.
2150         (gfc_resolve_spacing): Likewise.
2151         (gfc_resolve_spacing): Likewise.
2152         (gfc_resolve_fgetc): Likewise.
2153         (gfc_resolve_fputc): Likewise.
2154         (gfc_resolve_ftell): Likewise.
2155         (gfc_resolve_ttynam): Likewise.
2156         (gfc_resolve_alarm_sub): Likewise.
2157         (gfc_resolve_mvbits): Likewise.
2158         (gfc_resolve_getarg): Likewise.
2159         (gfc_resolve_signal_sub): Likewise.
2160         (gfc_resolve_exit): Likewise.
2161         (gfc_resolve_flush): Likewise.
2162         (gfc_resolve_free): Likewise.
2163         (gfc_resolve_ctime_sub): Likewise.
2164         (gfc_resolve_fgetc_sub): Likewise.
2165         (gfc_resolve_fputc_sub): Likewise.
2166         (gfc_resolve_fseek_sub): Likewise.
2167         (gfc_resolve_ftell_sub): Likewise.
2168         (gfc_resolve_ttynam_sub): Likewise.
2169
2170 2008-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2171
2172         * gfc-internals.texi: Fix typos and markup nits.
2173         * gfortran.texi: Likewise.
2174         * intrinsic.texi: Likewise.
2175
2176 2008-02-21  Richard Guenther  <rguenther@suse.de>
2177
2178         * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
2179         as unary PAREN_EXPR for real and complex typed expressions.
2180         (gfc_conv_unary_op): Fold the built tree.
2181
2182 2008-02-20  Tobias Burnus  <burnus@net-b.de>
2183
2184         PR fortran/34997
2185         * match.c (gfc_match_name): Improve error message for '$'.
2186
2187 2008-02-19  Daniel Franke  <franke.daniel@gmail.com>
2188
2189         PR fortran/35030
2190         * expr.c (gfc_check_pointer_assign): Add type and kind information
2191         to type-mismatch message.
2192         (gfc_check_assign): Unify error messages.
2193
2194 2008-02-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2195
2196         PR fortran/34952
2197         * gfortran.texi: Create new section for unimplemented extensions.
2198         Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
2199         Remove "smaller projects" list. Fix a few typos.
2200
2201 2008-02-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2202
2203         * intrinsic.texi: Rename INDEX node to avoid clashing with
2204         index.html on case-insensitive systems.
2205
2206 2008-02-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2207
2208         PR fortran/35150
2209         * trans-expr.c (gfc_conv_function_call): Force evaluation of
2210         se->expr.
2211
2212 2008-02-10  Daniel Franke  <franke.daniel@gmail.com>
2213
2214         PR fortran/35019
2215         * lang.opt: Allow '-J<dir>' next to '-J <dir>', 
2216         likewise '-I <dir>' and '-I<dir>'.
2217
2218 2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2219
2220         PR other/35107
2221         * Make-lang.in (f951): Add $(GMPLIBS).
2222
2223 2008-02-05  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2224
2225         PR fortran/35037
2226         * trans-common.c (build_field): Mark fields as volatile when needed.
2227
2228 2008-02-05  Tobias Burnus  <burnus@net-b.de>
2229
2230         PR fortran/35093
2231         * data.c (gfc_assign_data_value): Only free "size" if
2232         it has not already been freed.
2233
2234 2008-02-05  Paul Thomas  <pault@gcc.gnu.org>
2235
2236         PR fortran/34945
2237         * array.c (match_array_element_spec): Remove check for negative
2238         array size.
2239         (gfc_resolve_array_spec): Add check for negative size.
2240
2241 2008-02-05  Paul Thomas  <pault@gcc.gnu.org>
2242
2243         PR fortran/32315
2244         * data.c (gfc_assign_data_value): Add bounds check for array
2245         references.
2246
2247 2008-02-04  Daniel Franke  <franke.daniel@gmail.com>
2248
2249         * resolve.c (resolve_where): Fix typo.
2250         (gfc_resolve_where_code_in_forall): Likewise.
2251
2252 2008-02-03  Paul Thomas  <pault@gcc.gnu.org>
2253
2254         PR fortran/32760
2255         * resolve.c (resolve_allocate_deallocate): New function.
2256         (resolve_code): Call it for allocate and deallocate.
2257         * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
2258         the checking of the STAT tag and put in above new function.
2259         * primary,c (match_variable): Do not fix flavor of host
2260         associated symbols yet if the type is not known.
2261
2262 2008-01-31  Paul Thomas  <pault@gcc.gnu.org>
2263
2264         PR fortran/34910
2265         * expr.c (gfc_check_assign): It is an error to assign
2266         to a sibling procedure.
2267
2268 2008-01-30  Paul Thomas  <pault@gcc.gnu.org>
2269
2270         PR fortran/34975
2271         * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
2272         delete_symtree to gfc_delete_symtree.
2273         * gfortran.h : Add prototype for gfc_delete_symtree.
2274         * module.c (load_generic_interfaces): Transfer symbol to a
2275         unique symtree and delete old symtree, instead of renaming.
2276         (read_module): The rsym and the found symbol are the same, so
2277         the found symtree can be deleted.
2278
2279         PR fortran/34429
2280         * decl.c (match_char_spec): Remove the constraint on deferred
2281         matching of functions and free the length expression.
2282         delete_symtree to gfc_delete_symtree.
2283         (gfc_match_type_spec): Whitespace.
2284         (gfc_match_function_decl): Defer characteristic association for
2285         all types except BT_UNKNOWN.
2286         * parse.c (decode_specification_statement): Only derived type
2287         function matching is delayed to the end of specification.
2288
2289 2008-01-28  Tobias Burnus  <burnus@net-b.de>
2290
2291         PR libfortran/34980
2292         * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
2293
2294 2008-01-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2295
2296         PR fortran/34990
2297         * array.c (gfc_check_constructor_type): Revert clearing the expression.
2298
2299 2008-01-26  Tobias Burnus  <burnus@net-b.de>
2300
2301         PR fortran/34848
2302         * trans-expr.c (gfc_conv_function_call): Don't call
2303         gfc_add_interface_mapping if the expression is NULL.
2304
2305 2008-01-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2306
2307         PR fortran/31610
2308         * trans-array.c (gfc_trans_create_temp_array): Remove call to
2309         gcc_assert (integer_zerop (loop->from[n])).
2310
2311 2008-01-25  Daniel Franke  <franke.daniel@gmail.com>
2312
2313         PR fortran/34661
2314         * resolve.c (resolve_where): Added check if user-defined assignment 
2315         operator is an elemental subroutine.
2316         (gfc_resolve_where_code_in_forall): Likewise.
2317
2318 2008-01-24  Daniel Franke  <franke.daniel@gmail.com>
2319
2320         PR fortran/33375
2321         PR fortran/34858
2322         * gfortran.h: Revert changes from 2008-01-17.
2323         * match.c: Likewise.
2324         * symbol.c: Likewise.
2325         (gfc_undo_symbols): Undo namespace changes related to common blocks.
2326
2327 2008-01-24  Daniel Franke  <franke.daniel@gmail.com>
2328
2329         PR fortran/34202
2330         * data.c (formalize_structure_cons): Skip formalization on
2331         empty structures.
2332
2333 2008-01-24  Daniel Franke  <franke.daniel@gmail.com>
2334
2335         * gfortran.texi (OpenMP): Extended existing documentation.
2336         (contributors): Added major contributors of 2008 that were
2337         not listed yet.
2338         (proposed extensions): Removed implemented items.
2339
2340 2008-01-24  Paul Thomas  <pault@gcc.gnu.org>
2341
2342         PR fortran/34872
2343         * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS  is
2344         seen, check for a statement label and, if present, delete it
2345         and set the locus to the start of the statement.
2346
2347 2008-01-22  Paul Thomas  <pault@gcc.gnu.org>
2348
2349         PR fortran/34875
2350         * trans-io.c (gfc_trans_transfer): If the array reference in a
2351         read has a vector subscript, use gfc_conv_subref_array_arg to
2352         copy back the temporary.
2353
2354 2008-01-22  Tobias Burnus  <burnus@net-b.de>
2355
2356         PR fortran/34848
2357         * interface.c (compare_actual_formal): Fix adding type
2358         to missing_arg_type for absent optional arguments.
2359
2360 2008-01-22  Tobias Burnus  <burnus@net-b.de>
2361
2362         PR fortran/34907
2363         * parse.c (parse_spec): Change = into ==.
2364
2365 2008-01-22  Daniel Franke  <franke.daniel@gmail.com>
2366
2367         PR fortran/34915
2368         * expr.c (check_elemental): Fix check for valid data types.
2369
2370 2008-01-22  Tobias Burnus  <burnus@net-b.de>
2371
2372         PR fortran/34899
2373         * scanner.c (load_line): Support <tab><digit> continuation lines.
2374         * invoke.texi (-Wtabs): Document this.
2375
2376 2008-01-22  Paul Thomas  <pault@gcc.gnu.org>
2377
2378         PR fortran/34896
2379         * module.c (read_module): Set use_rename attribute.
2380
2381 2007-01-21  Tobias Burnus  <burnus@net-b.de>
2382
2383         PR fortran/34901
2384         * interface.c (compare_parameter): Improved error message
2385         for arguments of same type and mismatched kinds.
2386
2387 2008-01-20  Paul Thomas  <pault@gcc.gnu.org>
2388
2389         PR fortran/34861
2390         * resolve.c (resolve_entries): Do not do an array bounds check
2391         if the result symbols are the same.
2392
2393         PR fortran/34854
2394         * module.c (read_module) : Hide the symtree of the previous
2395         version of the symbol if this symbol is renamed.
2396
2397 2008-01-20  Paul Thomas  <pault@gcc.gnu.org>
2398
2399         PR fortran/34784
2400         * array.c (gfc_check_constructor_type): Clear the expression ts
2401         so that the checking starts from the deepest level of array
2402         constructor.
2403         * primary.c (match_varspec): If an unknown type is changed to
2404         default character and the attempt to match a substring fails,
2405         change it back to unknown.
2406
2407         PR fortran/34785
2408         * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
2409         NULL for an array constructor, use the cl.length expression to
2410         build it.
2411         (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
2412         a tree assignment.
2413
2414 2008-01-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
2415
2416         PR fortran/34817
2417         PR fortran/34838
2418         * iresolve.c (gfc_resolve_all):  Remove conversion of mask
2419         argument to kind=1 by removing call to resolve_mask_arg().
2420         (gfc_resolve_any):  Likewise.
2421
2422 2008-01-19  Tobias Burnus  <burnus@net-b.de>
2423
2424         PR fortran/34760
2425         * primary.c (match_variable): Handle FL_UNKNOWN without
2426         uneducated guessing.
2427         (match_variable): Improve error message.
2428
2429 2008-01-18  Tobias Burnus  <burnus@net-b.de>
2430
2431         PR fortran/32616
2432         * interface.c (get_expr_storage_size): Return storage size
2433         for array element designators.
2434         (compare_actual_formal): Reject unequal string sizes for
2435         assumed-shape dummy arguments. And fix error message for
2436         array-sections with vector subscripts.
2437
2438 2008-01-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2439
2440         PR fortran/34556
2441         * simplify.c (is_constant_array_expr): New static function that returns
2442         true if the given expression is an array and is constant.
2443         (gfc_simplify_reshape): Use new function.
2444
2445 2008-01-17  H.J. Lu  <hongjiu.lu@intel.com>
2446
2447         PR fortran/33375
2448         * symbol.c (free_common_tree): Renamed to ...
2449         (gfc_free_common_tree): This.  Remove static.
2450         (gfc_free_namespace): Updated.
2451
2452         * gfortran.h (gfc_free_common_tree): New.
2453
2454         * match.c (gfc_match_common): Call gfc_free_common_tree () with
2455         gfc_current_ns->common_root and set gfc_current_ns->common_root
2456         to NULL on syntax error.
2457
2458 2008-01-18  Richard Sandiford  <rsandifo@nildram.co.uk>
2459
2460         PR fortran/34686
2461         * trans-expr.c (gfc_conv_function_call): Use proper
2462         type for returned character pointers.
2463
2464 2008-01-17  Paul Thomas  <pault@gcc.gnu.org>
2465
2466         PR fortran/34429
2467         PR fortran/34431
2468         PR fortran/34471
2469         * decl.c : Remove gfc_function_kind_locus and
2470         gfc_function_type_locus. Add gfc_matching_function.
2471         (match_char_length): If matching a function and the length
2472         does not match, return MATCH_YES and try again later.
2473         (gfc_match_kind_spec): The same.
2474         (match_char_kind): The same.
2475         (gfc_match_type_spec): The same for numeric and derived types.
2476         (match_prefix): Rename as gfc_match_prefix.
2477         (gfc_match_function_decl): Except for function valued character
2478         lengths, defer applying kind, type and charlen info until the
2479         end of specification block.
2480         gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
2481         parse.c (decode_specification_statement): New function.
2482         (decode_statement): Call it when a function has kind = -1. Set
2483         and reset gfc_matching function, as function statement is being
2484         matched.
2485         (match_deferred_characteristics): Simplify with a single call
2486         to gfc_match_prefix. Do appropriate error handling. In any
2487         case, make sure that kind = -1 is reset or corrected.
2488         (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
2489         Throw an error if kind = -1 after last specification statement.
2490         parse.h : Prototype for gfc_match_prefix.
2491
2492 2008-01-16  Tobias Burnus  <burnus@net-b.de>
2493
2494         PR fortran/34796
2495         * interface.c (compare_parameter): Allow AS_DEFERRED array
2496         elements and reject attr.pointer array elemenents.
2497         (get_expr_storage_size): Return storage size of elements of
2498         assumed-shape and pointer arrays.
2499
2500 2008-01-15  Sebastian Pop  <sebastian.pop@amd.com>
2501
2502         * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
2503         for flag_tree_parallelize_loops.
2504
2505 2008-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
2506
2507         PR libfortran/34671
2508         * iresolve.c (gfc_resolve_all):  Call resolve_mask_arg.
2509         (gfc_resolve_any):  Likewise.
2510         (gfc_resolve_count):  Likewise.  Don't append kind of
2511         argument to function name.
2512
2513 2008-01-13  Tobias Burnus  <burnus@net-b.de>
2514
2515         PR fortran/34665
2516         * resolve.c (resolve_actual_arglist): For expressions,
2517         also check for assume-sized arrays.
2518         * interface.c (compare_parameter): Move F2003 character checks
2519         here, print error messages here, reject elements of
2520         assumed-shape array as argument to dummy arrays.
2521         (compare_actual_formal): Update for the changes above.
2522
2523 2008-01-13  Tobias Burnus  <burnus@net-b.de>
2524
2525         PR fortran/34763
2526         * decl.c (contained_procedure): Only check directly preceeding state.
2527
2528 2008-01-13  Tobias Burnus  <burnus@net-b.de>
2529
2530         PR fortran/34759
2531         * check.c (gfc_check_shape): Accept array ranges of
2532         assumed-size arrays.
2533
2534 2008-01-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2535
2536         PR fortran/34432
2537         * match.c (gfc_match_name): Don't error if leading character is a '(',
2538         just return MATCH_NO.
2539
2540 2008-01-11  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2541
2542         PR fortran/34722
2543         * trans-io.c (create_dummy_iostat): Commit the symbol.
2544
2545 2008-01-11  Paul Thomas  <pault@gcc.gnu.org>
2546
2547         PR fortran/34537
2548         * simplify.c (gfc_simplify_transfer): Return NULL if the size
2549         of the element is unavailable and only assign character length
2550         to the result, if 'mold' is constant.
2551
2552 2008-01-10  Paul Thomas  <pault@gcc.gnu.org>
2553
2554         PR fortran/34396
2555         * trans-array.c (gfc_trans_array_ctor_element):  Use gfc_trans_string_copy
2556         to assign strings and perform bounds checks on the string length.
2557         (get_array_ctor_strlen): Remove bounds checking.
2558         (gfc_trans_array_constructor): Initialize string length checking.
2559         * trans-array.h : Add prototype for gfc_trans_string_copy.
2560
2561 2008-01-08  Richard Guenther  <rguenther@suse.de>
2562
2563         PR fortran/34706
2564         PR tree-optimization/34683
2565         * trans-types.c (gfc_get_array_type_bounds): Use an array type
2566         with known size for accesses if that is known.
2567
2568 2008-01-08  Paul Thomas  <pault@gcc.gnu.org>
2569
2570         PR fortran/34476
2571         * expr.c (find_array_element): Check that the array bounds are
2572         constant before using them.  Use lower, as well as upper bound.
2573         (check_restricted): Allow implied index variable.
2574
2575 2008-01-08  Paul Thomas  <pault@gcc.gnu.org>
2576
2577         PR fortran/34681
2578         * trans_array.c (gfc_trans_deferred_array): Do not null the
2579         data pointer on entering scope, nor deallocate it on leaving
2580         scope, if the symbol has the 'save' attribute.
2581
2582         PR fortran/34704
2583         * trans_decl.c (gfc_finish_var_decl): Derived types with
2584         allocatable components and an initializer must be TREE_STATIC.
2585
2586 2008-01-07  Paul Thomas  <pault@gcc.gnu.org>
2587
2588         PR fortran/34672
2589         * module.c (write_generic): Rewrite completely.
2590         (write_module): Change call to write_generic.
2591
2592 2008-01-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2593
2594         PR fortran/34659
2595         * scanner.c (load_line): Do not count ' ' as printable when checking for
2596         continuations.
2597
2598 2008-01-06  Paul Thomas  <pault@gcc.gnu.org>
2599
2600         PR fortran/34545
2601         * module.c (load_needed): If the namespace has no proc_name
2602         give it the module symbol.
2603
2604 2008-01-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2605
2606         PR fortran/34387
2607         * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
2608         the dummy variable expression, test for NULL, and pass the variable
2609         address to the called function.
2610
2611 2007-01-06  Tobias Burnus  <burnus@net-b.de>
2612
2613         PR fortran/34658
2614         * match.c (gfc_match_common): Remove blank common in
2615         DATA BLOCK warning.
2616         * resolve.c (resolve_common_vars): New function.
2617         (resolve_common_blocks): Move checks to resolve_common_vars
2618         and invoke that function.
2619         (resolve_types): Call resolve_common_vars for blank commons.
2620
2621 2008-01-06  Tobias Burnus  <burnus@net-b.de>
2622
2623         PR fortran/34655
2624         * resolve.c (resolve_equivalence_derived): Reject derived types with
2625         default initialization if equivalenced with COMMON variable.
2626
2627 2008-01-06  Tobias Burnus  <burnus@net-b.de>
2628
2629         PR fortran/34654
2630         * io.c (check_io_constraints): Disallow unformatted I/O for
2631         internal units.
2632
2633 2008-01-06  Tobias Burnus  <burnus@net-b.de>
2634
2635         PR fortran/34660
2636         * resolve.c (resolve_formal_arglist): Reject dummy procedure in
2637         ELEMENTAL functions.
2638
2639 2008-01-06  Tobias Burnus  <burnus@net-b.de>
2640
2641         PR fortran/34662
2642         * interface.c (compare_actual_formal): Reject parameter
2643         actual to intent(out) dummy.
2644
2645 2008-01-04  Tobias Burnus  <burnus@net-b.de>
2646
2647         PR fortran/34557
2648         * primary.c (match_varspec): Gobble whitespace before
2649         checking for '('.