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