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