OSDN Git Service

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