OSDN Git Service

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