OSDN Git Service

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