OSDN Git Service

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