OSDN Git Service

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