OSDN Git Service

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