OSDN Git Service

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