OSDN Git Service

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