1 2008-05-16 Paul Thomas <pault@gcc.gnu.org>
5 * trans-stmt.c (gfc_trans_where): Tighten up the dependency
6 check for calling gfc_trans_where_3.
9 * trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
10 if it is calculated to be negative.
13 * trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
14 ss->where for scalar right hand sides.
15 * trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
16 not evaluate scalars outside the loop. Clean up whitespace.
17 * trans.h : Add a bitfield 'where' to gfc_ss.
19 2008-05-16 Tobias Burnus <burnus@net-b.de>
21 * libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
22 * array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.
24 2008-04-16 Daniel Kraft <d@domob.eu>
27 * gfortran.h: Added field "length_from_typespec" to gfc_charlength.
28 * aray.c (gfc_match_array_constructor): Added code to parse typespec.
29 (check_element_type, check_constructor_type, gfc_check_constructor_type):
30 Extended to support explicit typespec on constructor.
31 (gfc_resolve_character_array_constructor): Pad strings correctly for
32 explicit, constant character length.
33 * trans-array.c: New static global variable "typespec_chararray_ctor"
34 (gfc_trans_array_constructor): New code to support explicit but dynamic
37 2008-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
40 * decl.c (match_attr_spec): Check for matching pairs of parenthesis.
41 * expr.c (gfc_specification_expr): Supplement the error message with the
43 * resolve.c (gfc_resolve_index): Likewise.
44 * match.c (gfc_match_parens): Clarify error message with "at or before".
45 (gfc_match_do): Check for matching pairs of parenthesis.
47 2008-05-16 Tobias Burnus <burnus@net-b.de
49 * intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
50 add missing KIND argument to ACHAR and NINT; and state that
51 the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
52 ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
54 2008-05-16 Daniel Kraft <d@domob.eu>
56 * primary.c: New private structure "gfc_structure_ctor_component".
57 (gfc_free_structure_ctor_component): New helper function.
58 (gfc_match_structure_constructor): Extended largely to support named
59 arguments and default initialization for structure constructors.
61 2008-05-15 Steven G. Kargl <kargls@comcast.net>
63 * simplify.c (gfc_simplify_dble, gfc_simplify_float,
64 simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
65 possible memory leaks.
66 (gfc_simplify_reshape): Plug possible memory leaks and dereferencing
69 2008-05-15 Steven G. Kargl <kargls@comcast.net>
72 * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
73 rolled integer conversion with gfc_int2int, gfc_real2int, and
75 (gfc_simplify_intconv): Renamed to simplify_intconv.
77 2008-05-15 Steven G. Kargl, <kargl@comcast.net>
78 * gfortran.dg/and_or_xor.f90: New test
80 * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
81 gfc_simplify_xor): Don't range check logical results.
83 2008-05-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
85 * trans-expr.c (gfc_conv_concat_op): Take care of nondefault
87 (gfc_build_compare_string): Add kind argument and use it.
88 (gfc_conv_statement_function): Fix indentation.
89 * gfortran.h (gfc_character_info): New structure.
90 (gfc_character_kinds): New array.
91 * trans-types.c (gfc_character_kinds, gfc_character_types,
92 gfc_pcharacter_types): New array.
93 (gfc_init_kinds): Fill character kinds array.
94 (validate_character): Take care of nondefault character kinds.
95 (gfc_build_uint_type): New function.
96 (gfc_init_types): Take care of nondefault character kinds.
97 (gfc_get_char_type, gfc_get_pchar_type): New functions.
98 (gfc_get_character_type_len): Use gfc_get_char_type.
99 * trans.h (gfc_build_compare_string): Adjust prototype.
100 (gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
101 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
102 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
103 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
104 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
106 * trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
108 * trans-decl.c (gfor_fndecl_compare_string_char4,
109 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
110 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
111 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
112 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
113 gfor_fndecl_concat_string_char4): New function decls.
114 (gfc_build_intrinsic_function_decls): Define new *_char4 function
116 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
117 gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
118 gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
119 gfc_conv_intrinsic_function): Deal with nondefault character kinds.
121 2008-05-15 Sa Liu <saliu@de.ibm.com>
123 * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
124 All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
125 c_int128_t, c_int_least128_t and c_int_fast128_t are added as
127 * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
128 to macro NAMED_INTCST.
129 * symbol.c (std_for_isocbinding_symbol): New helper function to
130 return the standard that supports this isocbinding symbol.
131 (generate_isocbinding_symbol): Do not generate GNU extension symbols
132 if std=f2003. Add new parameter to NAMED_INTCST.
133 * module.c (use_iso_fortran_env_module): Add new parameter to
134 NAMED_INTCST and new field standard to struct intmod_sym.
135 * gfortran.h: Add new parameter to NAMED_INTCST.
136 * trans-types.c (init_c_interop_kinds): Add new parameter to
138 * intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
141 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
144 * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
145 arrays that have the TARGET attribute.
147 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
150 * simplify.c (only_convert_cmplx_boz): New function.
151 (gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
152 Call only_convert_cmplx_boz.
154 2008-05-14 Paul Thomas <pault@gcc.gnu.org>
157 * interface.c (compare_actual_formal): Do not check sizes if the
158 actual is BT_PROCEDURE.
160 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
163 * trans-array.c (gfc_conv_ss_startstride): Any negative size is
164 the same as zero size.
165 (gfc_conv_loop_setup): Fix size calculation.
167 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
170 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
171 handle zero-size sections.
173 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
176 * scanner.c (preprocessor_line): Allocate enough memory for a
179 2008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
182 * target-memory.c (gfc_target_expr_size): Correctly treat
184 (gfc_target_encode_expr): Likewise.
185 (gfc_interpret_complex): Whitespace change.
187 2008-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
190 * trans.c (gfc_call_malloc): If size equals zero, allocate one
191 byte; don't return a null pointer.
193 2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
196 * module.c (quote_string): Fix sprintf format.
198 2008-05-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
201 * module.c (quote_string, unquote_string,
202 mio_allocated_wide_string): New functions.
203 (mio_expr): Call mio_allocated_wide_string where needed.
205 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
207 * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
208 Rename DECL_IS_PURE to DECL_PURE_P.
210 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
212 * arith.c: (gfc_arith_concat, gfc_compare_string,
213 gfc_compare_with_Cstring, hollerith2representation,
214 gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
215 gfc_hollerith2character, gfc_hollerith2logical): Use wide
216 characters for character constants.
217 * data.c (create_character_intializer): Likewise.
218 * decl.c (gfc_set_constant_character_len): Likewise.
219 * dump-parse-tree.c (show_char_const): Correctly dump wide
221 error.c (print_wide_char): Rename into gfc_print_wide_char.
222 (show_locus): Adapt to new prototype of gfc_print_wide_char.
223 expr.c (free_expr0): Representation is now disjunct from
224 character string value, so we always free it.
225 (gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
226 to wide character strings.
227 * gfortran.h (gfc_expr): Make value.character.string a wide string.
228 (gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
229 gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
230 (gfc_get_wide_string): New macro.
231 (gfc_print_wide_char): New prototype.
232 * io.c (format_string): Make a wide string.
233 (next_char, gfc_match_format, compare_to_allowed_values,
234 gfc_match_open): Deal with wide strings.
235 * module.c (mio_expr): Convert between wide strings and ASCII ones.
236 * primary.c (match_hollerith_constant, match_charkind_name):
238 * resolve.c (build_default_init_expr): Likewise.
239 * scanner.c (gfc_wide_toupper, gfc_wide_memset,
240 gfc_char_to_widechar): New functions.
241 (wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
242 Changes in prototypes.
243 (gfc_define_undef_line, load_line, preprocessor_line,
244 include_line, load_file, gfc_read_orig_filename): Handle wide
246 * simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
247 gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
248 gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
249 gfc_simplify_repeat): Handle wide strings.
250 (wide_strspn, wide_strcspn): New helper functions.
251 (gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
253 * symbol.c (generate_isocbinding_symbol): Likewise.
254 * target-memory.c (size_character, gfc_target_expr_size,
255 encode_character, gfc_target_encode_expr, gfc_interpret_character,
256 gfc_target_interpret_expr): Handle wide strings.
257 * trans-const.c (gfc_conv_string_init): Lower wide strings to
259 (gfc_conv_constant_to_tree): Likewise.
260 * trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
261 * trans-io.c (gfc_new_nml_name_expr): Likewise.
262 * trans-stmt.c (gfc_trans_label_assign): Likewise.
264 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
266 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
267 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
268 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
269 with ATTRIBUTE_UNUSED.
271 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
273 * check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
274 * simplify.c (gfc_simplify_lgamma): Likewise.
276 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
278 * openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
280 * decl.c (gfc_match_kind_spec, gfc_match_type_spec,
281 gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
282 match_string_p, match_attr_spec, gfc_match_suffix,
283 match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
285 * gfortran.h (gfc_char_t): New type.
286 (gfc_linebuf): Make line member a gfc_char_t.
287 (locus): Make nextc member a gfc_char_t.
288 (gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
289 gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
290 gfc_peek_ascii_char, gfc_check_digit): New prototypes.
291 * error.c (print_wide_char): New function.
292 (show_locus): Use print_wide_char and gfc_wide_strlen.
293 * io.c (next_char): Use gfc_char_t type.
294 (match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
295 * match.c (gfc_match_parens, gfc_match_eos,
296 gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
297 gfc_match_intrinsic_op, gfc_match_char, gfc_match_return,
298 gfc_match_common): Likewise.
299 * match.h (gfc_match_special_char): Change prototype.
300 * parse.c (decode_specification_statement, decode_statement,
301 decode_omp_directive, next_free, next_fixed): Use
302 gfc_peek_ascii_char and gfc_next_ascii_char.
303 * primary.c (gfc_check_digit): Change name.
304 (match_digits, match_hollerith_constant, match_boz_constant,
305 match_real_constant, next_string_char, match_charkind_name,
306 match_string_constant, match_logical_constant_string,
307 match_complex_constant, match_actual_arg, match_varspec,
308 gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
310 * scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
311 gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
312 gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
313 wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
314 gfc_next_ascii_char, gfc_peek_ascii_char):
316 (next_char, gfc_define_undef_line, skip_free_comments,
317 gfc_next_char_literal, gfc_next_char, gfc_peek_char,
318 gfc_error_recovery, load_line, preprocessor_line, include_line,
319 load_file, gfc_read_orig_filename): Use gfc_char_t for source
320 characters and the {gfc_,}wide_* functions to manipulate wide
323 2008-05-06 Tobias Burnus <burnus@net-b.de>
326 * intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
327 * intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
328 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
329 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
330 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
332 2008-05-03 Janus Weil <jaydub66@gmail.com>
334 * misc.c (gfc_clear_ts): Set interface to NULL.
336 2008-05-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
339 * gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
340 gfc_expr value union. Add io_kind enum to here from io.c.
341 * io.c (gfc_free_dt): Free extra_comma.
342 (gfc_resolve_dt): If an extra comma was encountered and io_unit is type
343 BT_CHARACTER, resolve to format_expr and set default unit. Error if
344 io_kind is M_WRITE. (match_io): Match the extra comma and set new
345 pointer, extra_comma.
347 2008-05-01 Bud Davis <bdavis9659@sbcglobal.net>
350 * simplify.c (gfc_simplify_index): Check for direction argument
353 2008-05-01 Janus Weil <jaydub66@gmail.com>
355 * gfortran.h (struct gfc_symbol): Moving "interface" member to
356 gfc_typespec (plus fixing a small docu error).
357 * interface.c (gfc_procedure_use): Ditto.
358 * decl.c (match_procedure_decl): Ditto.
359 * resolve.c (resolve_specific_f0,
360 resolve_specific_f0, resolve_symbol): Ditto.
362 2008-04-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
364 * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
365 * intrinsic.h (gfc_check_selected_char_kind,
366 gfc_simplify_selected_char_kind): New prototypes.
367 * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
368 * trans.h (gfor_fndecl_sc_kind): New function decl.
369 * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
370 * arith.c (gfc_compare_with_Cstring): New function.
371 * arith.h (gfc_compare_with_Cstring): New prototype.
372 * check.c (gfc_check_selected_char_kind): New function.
373 * primary.c (match_string_constant, match_kind_param): Mark
374 symbols used as literal constant kind param as referenced.
375 * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
376 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
377 * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
378 * simplify.c (gfc_simplify_selected_char_kind): New function.
380 2008-04-28 Paul Thomas <pault@gcc.gnu.org>
383 * module.c (find_symbol): Do not return a result for a symbol
384 that has been renamed in another module.
386 2008-04-26 George Helffrich <george@gcc.gnu.org>
390 * trans-common.c (create_common): Add decl to function
391 chain (if inside one) to preserve identifier scope in debug output.
393 2008-04-25 Jan Hubicka <jh@suse.cz>
395 * trans-decl.c (trans_function_start): Update.
397 2008-04-25 Tobias Burnus <burnus@net-b.de>
398 Daniel Franke <franke.daniel@gmail.com>
401 * gfortranspec.c (lang_specific_driver): Deprecate
402 -M option; fix ICE when "-M" is last argument and
404 * options.c (gfc_handle_module_path_options):
405 Use -J instead of -M in error messages.
406 * invoke.texi: Mark -M as depecated.
408 2008-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
409 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
412 * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
415 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
417 * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
418 * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
419 (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
420 (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
421 (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
422 * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
423 (create_common): Don't set TREE_INVARIANT.
424 * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
425 * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
427 2008-04-21 Steve Ellcey <sje@cup.hp.com>
429 * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
431 2008-04-21 Daniel Franke <franke.daniel@gmail.com>
434 * gfortranspec.c (lookup_option): Properly handle separated arguments
435 in -J option, print missing argument message when necessary.
437 2008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
440 * scanner.c (skip_fixed_comments): Update continue_line when comment is
441 detected. (gfc_next_char_literal): Likewise.
443 2008-04-19 Paul Thomas <pault@gcc.gnu.org>
448 * trans_array.c (gfc_trans_array_constructor): Temporarily
449 realign loop, if loop->from is not zero, before creating
450 the temporary array and provide an offset.
453 * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
454 and allow for NULL body. Change all references from
455 init_default_dt to gfc_init_default_dt.
456 * trans.h : Add prototype for gfc_init_default_dt.
457 * trans-array.c (gfc_trans_deferred_vars): After nullification
458 call gfc_init_default_dt for derived types with allocatable
461 2008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
464 * trans-common.c (create_common): Revert patch causing regression.
466 2008-04-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
469 * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
470 optional argument attribute.
472 2008-04-16 Paul Thomas <pault@gcc.gnu.org>
475 * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
476 is not used, the argument must be converted.
478 2008-04-16 Jakub Jelinek <jakub@redhat.com>
481 * f95-lang.c (gfc_init_builtin_functions): Make sure
482 BUILT_IN_SINCOS{,F,L} types aren't varargs.
484 2008-04-15 Paul Thomas <pault@gcc.gnu.org>
487 * expr.c (scalarize_intrinsic_call): Reorder identification of
488 array argument so that if one is not found a segfault does not
489 occur. Return FAILURE if all scalar arguments.
491 2008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
492 Tobias Burnus <burnus@net-b.de>
495 * options.c (gfc_init_options): Set the default maximum continuation
496 lines to 255 for both free and fixed form source for warnings.
497 (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
498 the -std=f95 free form max continuations to 39 for warnings.
499 * scanner.c (gfc_next_char_literal): Adjust the current_line number only
500 if it is less than the current locus.
502 2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
504 PR fortran/25829 28655
505 * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
506 round, sign, and id. (match_open_element): Match new tags.
507 (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
508 for DEFAULT only. Update error messages. (match_dt_element): Fix match
509 tag for asynchronous. Update error messages. (gfc_free_inquire): Free
510 new expressions. (match_inquire_element): Match new tags.
511 (gfc_match_inquire): Add constraint for ID and PENDING.
512 (gfc_resolve_inquire): Resolve new tags.
513 * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
514 mask for ID parameter.
515 * ioparm.def: Fix order of parameters for pending, round, and sign.
516 NOTE: These must line up with the definitions in libgfortran/io/io.h. or
519 2008-04-06 Paul Thomas <pault@gcc.gnu.org>
522 * expr.c (scalarize_intrinsic_call): Identify which argument is
523 an array and use that as the template.
524 (check_init_expr): Remove tests that first argument is an array
525 in the call to scalarize_intrinsic_call.
527 2008-04-06 Tobias Schlüter <tobi@gcc.gnu.org>
530 * io.c (io_tag): Add field 'value'. Split 'spec' field in
532 (match_etag, match_vtag, match_ltag): Split parsing in two steps
533 to give better error messages.
535 2008-04-06 Tobias Burnus <burnus@net-b.de>
537 * io.c (check_io_constraints): Add constrains. ID= requires
538 asynchronous= and asynchronous= must be init expression.
540 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
542 * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
544 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
546 * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
547 gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
548 functions and make them static. Add new gfc_dump_parse_tree
550 * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
551 (gfc_status, gfc_status_char): Delete prototypes.
552 * error.c (gfc_status, gfc_status_char): Remove functions.
553 * scanner.c (gfc_new_file): Use printf instead of gfc_status.
554 * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
555 (gfc_handle_module_path_options): Use gfc_fatal_error instead of
557 (gfc_handle_option): Rename verbose into dump_parse_tree.
558 * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
560 2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
561 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
563 PR fortran/25829 28655
564 * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
565 * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
566 (gfc_open): Add pointers for decimal, encoding, round, sign,
567 asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
568 encoding, pending, round, sign, size, id.
569 (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
570 asynchronous, blank, decimal, delim, pad, round, sign.
571 (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
572 wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
573 * trans-stmt.h (gfc_trans_wait): New function prototype.
574 * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
575 * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
576 ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
577 (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
578 tags. (gfc_resolve_open): Remove comment around check for allowed
579 values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
580 ROUND, and SIGN. (match_dt_element): Add matching for new tags.
581 (gfc_free_wait): New function. (gfc_resolve_wait): New function.
582 (match_wait_element): New function. (gfc_match_wait): New function.
583 * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
584 (resolve_code): Add case for EXEC_WAIT.
585 * st.c (gfc_free_statement): Add case for EXEC_WAIT.
586 * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
587 Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
588 (gfc_build_io_library_fndecls): Add function declaration for st_wait.
589 (gfc_trans_open): Add mask bits for new I/O tags.
590 (gfc_trans_inquire): Add mask bits for new I/O tags.
591 (gfc_trans_wait): New translation function.
592 (build_dt): Add mask bits for new I/O tags.
593 * match.c (gfc_match_if) Add matcher for "wait".
594 * match.h (gfc_match_wait): Prototype for new function.
595 * ioparm.def: Add new I/O parameter definitions.
596 * parse.c (decode_statement): Add match for "wait" statement.
597 (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
599 2008-04-03 Jakub Jelinek <jakub@redhat.com>
602 * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
605 2008-04-03 Tom Tromey <tromey@redhat.com>
607 * Make-lang.in (fortran_OBJS): New variable.
609 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
611 * f95-lang.c (insert_block): Kill.
613 2008-04-01 George Helffrich <george@gcc.gnu.org>
615 PR fortran/35154, fortran/23057
616 * trans-common.c (create_common): Add decl to function
617 chain to preserve identifier scope in debug output.
619 2008-04-01 Joseph Myers <joseph@codesourcery.com>
621 * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
622 * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
625 2008-03-30 Paul Thomas <pault@gcc.gnu.org>
628 * resolve.c (resolve_function, resolve_call): If the procedure
629 is elemental do not look for noncopying intrinsics.
631 2008-03-29 Paul Thomas <pault@gcc.gnu.org>
634 * trans-array.c (gfc_array_init_size): Set 'size' zero if
635 negative in one dimension.
638 * trans-expr.c (gfc_trans_string_copy): Only assign a char
639 directly if the lhs and rhs types are the same.
641 2008-03-28 Daniel Franke <franke.daniel@gmail.com>
642 Paul Richard Thomas <paul.richard.thomas@gmail.com>
645 * primary.c (match_variable): Improved matching of function
647 * resolve.c (resolve_allocate_deallocate): Removed checks if
648 the actual argument for STAT is a variable.
650 2008-03-28 Tobias Burnus <burnus@net-b.de>
652 * symbol.c (gfc_get_default_type): Fix error message; option
653 -fallow_leading_underscore should be -fallow-leading-underscore
655 2008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
658 * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
659 optional argument attribute.
661 2008-03-27 Tom Tromey <tromey@redhat.com>
663 * Make-lang.in: Revert automatic dependency patch.
665 2008-03-25 Tom Tromey <tromey@redhat.com>
667 * Make-lang.in: Remove .o targets.
668 (fortran_OBJS): New variable.
669 (fortran/gfortranspec.o): Move to fortran/. Reduce to variable
671 (GFORTRAN_D_OBJS): Update.
672 (GFORTRAN_TRANS_DEPS): Remove.
674 2008-03-24 Paul Thomas <pault@gcc.gnu.org>
677 * resolve.c (resolve_structure_cons): It is an error to assign
678 NULL to anything other than a pointer or allocatable component.
681 * resolve.c (resolve_symbol): If the symbol is a derived type,
682 resolve the derived type. If the symbol is a derived type
683 function, ensure that the derived type is visible in the same
684 namespace as the function.
686 2008-03-23 Tobias Schlüter <tobi@gcc.gnu.org>
688 * trans.h: Use fold_build in build1_v, build2_v and build3_v
690 * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
691 Don't use build2_v macro.
693 2008-03-19 Daniel Franke <franke.daniel@gmail.com>
696 * interface.c (gfc_procedure_use): Check for keyworded arguments in
697 procedures without explicit interfaces.
699 2008-03-16 Paul Thomas <pault@gcc.gnu.org>
702 * resolve.c (check_assumed_size_reference): Only visit the
703 first reference and look directly at the highest dimension.
705 2008-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
708 * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
711 2008-03-15 Daniel Franke <franke.daniel@gmail.com>
714 * resolve.c (resolve_branch): Less strict and pessimistic warning
717 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
719 * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
720 (gfc_be_parse_file): Call clear_binding_stack from here.
721 (gfc_clear_binding_stack): Rename to clear_binding_stack.
723 2008-03-09 Paul Thomas <pault@gcc.gnu.org>
726 * module.c (mio_symtree_ref): After providing a symbol for a
727 missing equivalence member, resolve and NULL the fixups.
729 2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
731 * invoke.texi (Error and Warning Options): Document
734 2008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
737 * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
738 checking bounds of absent optional arguments.
740 2008-03-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
743 * intrinsic.c (add_functions): Add simplification routines for
744 ERF, DERF, ERFC and DERFC.
745 * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
746 extensions into Fortran 2008 features.
747 * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
749 * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
751 2008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
754 * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
755 ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
756 ERFC_SCALED, LOG_GAMMA and HYPOT.
757 * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
758 gfc_resolve_hypot): New prototypes.
759 * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
760 ACOSH, ASINH and ATANH available.
761 * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
762 * lang.opt: Add -std=f2008 option.
763 * libgfortran.h: Define GFC_STD_F2008.
764 * lang-specs.h: Add .f08 and .F08 file suffixes.
765 * iresolve.c (gfc_resolve_hypot): New function.
766 * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
767 * check.c (gfc_check_hypot): New function.
768 * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
769 * options.c (set_default_std_flags): Allow Fortran 2008 by default.
770 (form_from_filename): Add .f08 suffix.
771 (gfc_handle_option): Handle -std=f2008 option.
772 * simplify.c (gfc_simplify_hypot): New function.
773 * gfortran.texi: Document Fortran 2008 status and file extensions.
774 * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
775 as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
776 ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
777 * invoke.texi: Document the new -std=f2008 option.
779 2008-03-02 Jakub Jelinek <jakub@redhat.com>
781 * gfortranspec.c (lang_specific_driver): Update copyright notice
784 2008-02-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
787 * expr.c (find_array_element): Modify traversing the constructor to
788 avoid trying to access NULL memory pointed to by next for the
789 last element. (find_array_section): Exit while loop if cons->next is
791 * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
792 (gfc_conv_function_call): Same.
793 * decl.c (gfc_match_implicit): Same.
794 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
796 2008-02-28 Daniel Franke <franke.daniel@gmail.com>
801 * lang.opt: Added -Wreturn-type.
802 * options.c (gfc_handle_option): Recognize -Wreturn-type.
803 * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
804 where the result value is not set.
805 (gfc_generate_function_code): Likewise.
806 (generate_local_decl): Emit warnings for funtions whose RESULT
809 2008-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
812 * trans-expr.c (gfc_conv_variable): Don't build indirect
813 references when explicit interface is mandated.
814 * resolve.c (resolve_formal_arglist): Set attr.always_explicit
815 on the result symbol as well as the procedure symbol.
817 2008-02-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
820 * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
821 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
822 gfor_fndecl_math_exponent16.
823 * f95-lang.c (build_builtin_fntypes): Add new function types.
824 (gfc_init_builtin_functions): Add new builtins for nextafter,
825 frexp, ldexp, fabs, scalbn and inf.
826 * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
827 (gfc_resolve_scale): Don't convert type of second argument.
828 (gfc_resolve_set_exponent): Likewise.
829 (gfc_resolve_size): Don't add hidden arguments.
830 * trans-decl.c: Remove gfor_fndecl_math_exponent4,
831 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
832 gfor_fndecl_math_exponent16.
833 * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
834 for scalbn, fraction, nearest, rrspacing, set_exponent and
836 (gfc_conv_intrinsic_exponent): Directly call frexp.
837 (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
838 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
839 gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
841 (gfc_conv_intrinsic_function): Use the new functions above.
843 2008-02-26 Tobias Burnus <burnus@net-b.de>
846 * interface.c (check_operator_interface): Show better line for error
847 messages; fix constrains for user-defined assignment operators.
848 (gfc_extend_assign): Fix constrains for user-defined assignment
851 2008-02-26 Tom Tromey <tromey@redhat.com>
853 * trans-io.c (set_error_locus): Remove old location code.
854 * trans-decl.c (gfc_set_decl_location): Remove old location code.
855 * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
856 * scanner.c (gfc_gobble_whitespace): Remove old location code.
857 (get_file): Likewise.
858 (preprocessor_line): Likewise.
859 (load_file): Likewise.
860 (gfc_new_file): Likewise.
861 * trans.c (gfc_trans_runtime_check): Remove old location code.
862 (gfc_get_backend_locus): Likewise.
863 (gfc_set_backend_locus): Likewise.
864 * data.c (gfc_assign_data_value): Remove old location code.
865 * error.c (show_locus): Remove old location code.
866 * gfortran.h (gfc_linebuf): Remove old location code.
867 (gfc_linebuf_linenum): Remove old-location variant.
869 2008-02-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
872 * trans-const.c (gfc_build_string_const): Don't call gettext.
873 (gfc_build_localized_string_const): New function.
874 * trans-const.h (gfc_build_localized_string_const): New prototype.
875 * trans.c (gfc_trans_runtime_check): Use
876 gfc_build_localized_string_const instead of gfc_build_string_const.
877 (gfc_call_malloc): Likewise.
878 (gfc_allocate_with_status): Likewise.
879 (gfc_allocate_array_with_status): Likewise.
880 (gfc_deallocate_with_status): Likewise.
881 (gfc_call_realloc): Likewise.
882 * trans-io.c (gfc_trans_io_runtime_check): Likewise.
884 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
886 * arith.c: Update copyright years.
894 * dependency.c: Likewise.
895 * dependency.h: Likewise.
896 * dump-parse-tree.c: Likewise.
899 * gfc-internals.texi: Likewise.
900 * gfortran.h: Likewise.
901 * gfortran.texi: Likewise.
902 * gfortranspec.c: Likewise.
903 * interface.c: Likewise.
904 * intrinsic.c: Likewise.
905 * intrinsic.h: Likewise.
906 * intrinsic.texi: Likewise.
907 * invoke.texi: Likewise.
909 * iresolve.c: Likewise.
910 * iso-c-binding.def: Likewise.
911 * iso-fortran-env.def: Likewise.
912 * lang-specs.h: Likewise.
913 * lang.opt: Likewise.
914 * libgfortran.h: Likewise.
917 * matchexp.c: Likewise.
919 * module.c: Likewise.
920 * openmp.c: Likewise.
921 * options.c: Likewise.
924 * primary.c: Likewise.
925 * resolve.c: Likewise.
926 * scanner.c: Likewise.
927 * simplify.c: Likewise.
929 * symbol.c: Likewise.
930 * target-memory.c: Likewise.
931 * target-memory.h: Likewise.
932 * trans-array.h: Likewise.
933 * trans-const.h: Likewise.
934 * trans-stmt.h: Likewise.
935 * trans-types.c: Likewise.
936 * trans-types.h: Likewise.
937 * types.def: Likewise.
939 2008-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
942 * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
943 (gfc_simplify_ibset): Remove call to range_check.
944 (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
945 (gfc_simplify_real): Add call gfc_clear_ts to initialize the
946 temporary gfc_typspec variable.
948 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
950 * trans-array.c (gfc_conv_descriptor_data_get,
951 gfc_conv_descriptor_data_set_internal,
952 gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
953 gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
954 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
955 gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
956 gfc_conv_array_transpose, gfc_grow_array,
957 gfc_trans_array_constructor_subarray,
958 gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
959 gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
960 gfc_conv_array_initializer, gfc_trans_array_bounds,
961 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
962 gfc_get_dataptr_offset, gfc_conv_array_parameter,
963 gfc_trans_dealloc_allocated, get_full_array_size,
964 gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
966 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
967 gfc_conv_component_ref, gfc_conv_cst_int_power,
968 gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
969 * trans-common.c (create_common): Likewise.
970 * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
972 * trans-const.c (gfc_conv_constant_to_tree): Likewise.
973 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
974 gfc_trans_integer_select, gfc_trans_character_select,
975 gfc_trans_forall_loop, compute_overall_iter_number,
976 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
977 gfc_trans_deallocate): Likewise.
978 * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
979 gfc_allocate_with_status, gfc_allocate_array_with_status,
980 gfc_deallocate_with_status): Likewise.
981 * f95-lang.c (gfc_truthvalue_conversion): Likewise.
982 * trans-io.c (set_parameter_const, set_parameter_value,
983 set_parameter_ref, set_string, set_internal_unit, io_result,
984 set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
985 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
986 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
987 gfc_generate_function_code): Likewise.
988 * convert.c (convert): Likewise.
989 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
990 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
991 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
992 gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
993 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
994 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
995 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
996 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
997 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
998 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
999 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1000 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
1001 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
1002 gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
1003 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
1004 gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
1005 gfc_conv_intrinsic_repeat): Likewise.
1007 2008-02-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1010 * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
1011 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
1012 * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
1013 gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
1014 * trans-decl.c: Likewise.
1016 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1019 * expr.c (find_array_element): Modify traversing the constructor to
1020 avoid trying to access NULL memory pointed to by next for the
1021 last element. (find_array_section): Exit while loop if cons->next is
1024 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1027 * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
1029 (gfc_resolve_aint): Likewise.
1030 (gfc_resolve_anint): Likewise.
1031 (gfc_resolve_besn): Likewise.
1032 (gfc_resolve_cshift): Likewise.
1033 (gfc_resolve_ctime): Likewise.
1034 (gfc_resolve_eoshift): Likewise.
1035 (gfc_resolve_index_func): Likewise.
1036 (gfc_resolve_isatty): Likewise.
1037 (gfc_resolve_malloc): Likewise.
1038 (gfc_resolve_rrspacing): Likewise.
1039 (gfc_resolve_scale): Likewise.
1040 (gfc_resolve_set_exponent): Likewise.
1041 (gfc_resolve_spacing): Likewise.
1042 (gfc_resolve_spacing): Likewise.
1043 (gfc_resolve_fgetc): Likewise.
1044 (gfc_resolve_fputc): Likewise.
1045 (gfc_resolve_ftell): Likewise.
1046 (gfc_resolve_ttynam): Likewise.
1047 (gfc_resolve_alarm_sub): Likewise.
1048 (gfc_resolve_mvbits): Likewise.
1049 (gfc_resolve_getarg): Likewise.
1050 (gfc_resolve_signal_sub): Likewise.
1051 (gfc_resolve_exit): Likewise.
1052 (gfc_resolve_flush): Likewise.
1053 (gfc_resolve_free): Likewise.
1054 (gfc_resolve_ctime_sub): Likewise.
1055 (gfc_resolve_fgetc_sub): Likewise.
1056 (gfc_resolve_fputc_sub): Likewise.
1057 (gfc_resolve_fseek_sub): Likewise.
1058 (gfc_resolve_ftell_sub): Likewise.
1059 (gfc_resolve_ttynam_sub): Likewise.
1061 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1063 * gfc-internals.texi: Fix typos and markup nits.
1064 * gfortran.texi: Likewise.
1065 * intrinsic.texi: Likewise.
1067 2008-02-21 Richard Guenther <rguenther@suse.de>
1069 * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
1070 as unary PAREN_EXPR for real and complex typed expressions.
1071 (gfc_conv_unary_op): Fold the built tree.
1073 2008-02-20 Tobias Burnus <burnus@net-b.de>
1076 * match.c (gfc_match_name): Improve error message for '$'.
1078 2008-02-19 Daniel Franke <franke.daniel@gmail.com>
1081 * expr.c (gfc_check_pointer_assign): Add type and kind information
1082 to type-mismatch message.
1083 (gfc_check_assign): Unify error messages.
1085 2008-02-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1088 * gfortran.texi: Create new section for unimplemented extensions.
1089 Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
1090 Remove "smaller projects" list. Fix a few typos.
1092 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1094 * intrinsic.texi: Rename INDEX node to avoid clashing with
1095 index.html on case-insensitive systems.
1097 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1100 * trans-expr.c (gfc_conv_function_call): Force evaluation of
1103 2008-02-10 Daniel Franke <franke.daniel@gmail.com>
1106 * lang.opt: Allow '-J<dir>' next to '-J <dir>',
1107 likewise '-I <dir>' and '-I<dir>'.
1109 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1112 * Make-lang.in (f951): Add $(GMPLIBS).
1114 2008-02-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1117 * trans-common.c (build_field): Mark fields as volatile when needed.
1119 2008-02-05 Tobias Burnus <burnus@net-b.de>
1122 * data.c (gfc_assign_data_value): Only free "size" if
1123 it has not already been freed.
1125 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
1128 * array.c (match_array_element_spec): Remove check for negative
1130 (gfc_resolve_array_spec): Add check for negative size.
1132 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
1135 * data.c (gfc_assign_data_value): Add bounds check for array
1138 2008-02-04 Daniel Franke <franke.daniel@gmail.com>
1140 * resolve.c (resolve_where): Fix typo.
1141 (gfc_resolve_where_code_in_forall): Likewise.
1143 2008-02-03 Paul Thomas <pault@gcc.gnu.org>
1146 * resolve.c (resolve_allocate_deallocate): New function.
1147 (resolve_code): Call it for allocate and deallocate.
1148 * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
1149 the checking of the STAT tag and put in above new function.
1150 * primary,c (match_variable): Do not fix flavor of host
1151 associated symbols yet if the type is not known.
1153 2008-01-31 Paul Thomas <pault@gcc.gnu.org>
1156 * expr.c (gfc_check_assign): It is an error to assign
1157 to a sibling procedure.
1159 2008-01-30 Paul Thomas <pault@gcc.gnu.org>
1162 * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
1163 delete_symtree to gfc_delete_symtree.
1164 * gfortran.h : Add prototype for gfc_delete_symtree.
1165 * module.c (load_generic_interfaces): Transfer symbol to a
1166 unique symtree and delete old symtree, instead of renaming.
1167 (read_module): The rsym and the found symbol are the same, so
1168 the found symtree can be deleted.
1171 * decl.c (match_char_spec): Remove the constraint on deferred
1172 matching of functions and free the length expression.
1173 delete_symtree to gfc_delete_symtree.
1174 (gfc_match_type_spec): Whitespace.
1175 (gfc_match_function_decl): Defer characteristic association for
1176 all types except BT_UNKNOWN.
1177 * parse.c (decode_specification_statement): Only derived type
1178 function matching is delayed to the end of specification.
1180 2008-01-28 Tobias Burnus <burnus@net-b.de>
1183 * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
1185 2008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1188 * array.c (gfc_check_constructor_type): Revert clearing the expression.
1190 2008-01-26 Tobias Burnus <burnus@net-b.de>
1193 * trans-expr.c (gfc_conv_function_call): Don't call
1194 gfc_add_interface_mapping if the expression is NULL.
1196 2008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1199 * trans-array.c (gfc_trans_create_temp_array): Remove call to
1200 gcc_assert (integer_zerop (loop->from[n])).
1202 2008-01-25 Daniel Franke <franke.daniel@gmail.com>
1205 * resolve.c (resolve_where): Added check if user-defined assignment
1206 operator is an elemental subroutine.
1207 (gfc_resolve_where_code_in_forall): Likewise.
1209 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1213 * gfortran.h: Revert changes from 2008-01-17.
1214 * match.c: Likewise.
1215 * symbol.c: Likewise.
1216 (gfc_undo_symbols): Undo namespace changes related to common blocks.
1218 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1221 * data.c (formalize_structure_cons): Skip formalization on
1224 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1226 * gfortran.texi (OpenMP): Extended existing documentation.
1227 (contributors): Added major contributors of 2008 that were
1229 (proposed extensions): Removed implemented items.
1231 2008-01-24 Paul Thomas <pault@gcc.gnu.org>
1234 * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
1235 seen, check for a statement label and, if present, delete it
1236 and set the locus to the start of the statement.
1238 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
1241 * trans-io.c (gfc_trans_transfer): If the array reference in a
1242 read has a vector subscript, use gfc_conv_subref_array_arg to
1243 copy back the temporary.
1245 2008-01-22 Tobias Burnus <burnus@net-b.de>
1248 * interface.c (compare_actual_formal): Fix adding type
1249 to missing_arg_type for absent optional arguments.
1251 2008-01-22 Tobias Burnus <burnus@net-b.de>
1254 * parse.c (parse_spec): Change = into ==.
1256 2008-01-22 Daniel Franke <franke.daniel@gmail.com>
1259 * expr.c (check_elemental): Fix check for valid data types.
1261 2008-01-22 Tobias Burnus <burnus@net-b.de>
1264 * scanner.c (load_line): Support <tab><digit> continuation lines.
1265 * invoke.texi (-Wtabs): Document this.
1267 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
1270 * module.c (read_module): Set use_rename attribute.
1272 2007-01-21 Tobias Burnus <burnus@net-b.de>
1275 * interface.c (compare_parameter): Improved error message
1276 for arguments of same type and mismatched kinds.
1278 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
1281 * resolve.c (resolve_entries): Do not do an array bounds check
1282 if the result symbols are the same.
1285 * module.c (read_module) : Hide the symtree of the previous
1286 version of the symbol if this symbol is renamed.
1288 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
1291 * array.c (gfc_check_constructor_type): Clear the expression ts
1292 so that the checking starts from the deepest level of array
1294 * primary.c (match_varspec): If an unknown type is changed to
1295 default character and the attempt to match a substring fails,
1296 change it back to unknown.
1299 * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
1300 NULL for an array constructor, use the cl.length expression to
1302 (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
1305 2008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1309 * iresolve.c (gfc_resolve_all): Remove conversion of mask
1310 argument to kind=1 by removing call to resolve_mask_arg().
1311 (gfc_resolve_any): Likewise.
1313 2008-01-19 Tobias Burnus <burnus@net-b.de>
1316 * primary.c (match_variable): Handle FL_UNKNOWN without
1317 uneducated guessing.
1318 (match_variable): Improve error message.
1320 2008-01-18 Tobias Burnus <burnus@net-b.de>
1323 * interface.c (get_expr_storage_size): Return storage size
1324 for array element designators.
1325 (compare_actual_formal): Reject unequal string sizes for
1326 assumed-shape dummy arguments. And fix error message for
1327 array-sections with vector subscripts.
1329 2008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1332 * simplify.c (is_constant_array_expr): New static function that returns
1333 true if the given expression is an array and is constant.
1334 (gfc_simplify_reshape): Use new function.
1336 2008-01-17 H.J. Lu <hongjiu.lu@intel.com>
1339 * symbol.c (free_common_tree): Renamed to ...
1340 (gfc_free_common_tree): This. Remove static.
1341 (gfc_free_namespace): Updated.
1343 * gfortran.h (gfc_free_common_tree): New.
1345 * match.c (gfc_match_common): Call gfc_free_common_tree () with
1346 gfc_current_ns->common_root and set gfc_current_ns->common_root
1347 to NULL on syntax error.
1349 2008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
1352 * trans-expr.c (gfc_conv_function_call): Use proper
1353 type for returned character pointers.
1355 2008-01-17 Paul Thomas <pault@gcc.gnu.org>
1360 * decl.c : Remove gfc_function_kind_locus and
1361 gfc_function_type_locus. Add gfc_matching_function.
1362 (match_char_length): If matching a function and the length
1363 does not match, return MATCH_YES and try again later.
1364 (gfc_match_kind_spec): The same.
1365 (match_char_kind): The same.
1366 (gfc_match_type_spec): The same for numeric and derived types.
1367 (match_prefix): Rename as gfc_match_prefix.
1368 (gfc_match_function_decl): Except for function valued character
1369 lengths, defer applying kind, type and charlen info until the
1370 end of specification block.
1371 gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
1372 parse.c (decode_specification_statement): New function.
1373 (decode_statement): Call it when a function has kind = -1. Set
1374 and reset gfc_matching function, as function statement is being
1376 (match_deferred_characteristics): Simplify with a single call
1377 to gfc_match_prefix. Do appropriate error handling. In any
1378 case, make sure that kind = -1 is reset or corrected.
1379 (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
1380 Throw an error if kind = -1 after last specification statement.
1381 parse.h : Prototype for gfc_match_prefix.
1383 2008-01-16 Tobias Burnus <burnus@net-b.de>
1386 * interface.c (compare_parameter): Allow AS_DEFERRED array
1387 elements and reject attr.pointer array elemenents.
1388 (get_expr_storage_size): Return storage size of elements of
1389 assumed-shape and pointer arrays.
1391 2008-01-15 Sebastian Pop <sebastian.pop@amd.com>
1393 * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
1394 for flag_tree_parallelize_loops.
1396 2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1399 * iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
1400 (gfc_resolve_any): Likewise.
1401 (gfc_resolve_count): Likewise. Don't append kind of
1402 argument to function name.
1404 2008-01-13 Tobias Burnus <burnus@net-b.de>
1407 * resolve.c (resolve_actual_arglist): For expressions,
1408 also check for assume-sized arrays.
1409 * interface.c (compare_parameter): Move F2003 character checks
1410 here, print error messages here, reject elements of
1411 assumed-shape array as argument to dummy arrays.
1412 (compare_actual_formal): Update for the changes above.
1414 2008-01-13 Tobias Burnus <burnus@net-b.de>
1417 * decl.c (contained_procedure): Only check directly preceeding state.
1419 2008-01-13 Tobias Burnus <burnus@net-b.de>
1422 * check.c (gfc_check_shape): Accept array ranges of
1423 assumed-size arrays.
1425 2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1428 * match.c (gfc_match_name): Don't error if leading character is a '(',
1429 just return MATCH_NO.
1431 2008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1434 * trans-io.c (create_dummy_iostat): Commit the symbol.
1436 2008-01-11 Paul Thomas <pault@gcc.gnu.org>
1439 * simplify.c (gfc_simplify_transfer): Return NULL if the size
1440 of the element is unavailable and only assign character length
1441 to the result, if 'mold' is constant.
1443 2008-01-10 Paul Thomas <pault@gcc.gnu.org>
1446 * trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
1447 to assign strings and perform bounds checks on the string length.
1448 (get_array_ctor_strlen): Remove bounds checking.
1449 (gfc_trans_array_constructor): Initialize string length checking.
1450 * trans-array.h : Add prototype for gfc_trans_string_copy.
1452 2008-01-08 Richard Guenther <rguenther@suse.de>
1455 PR tree-optimization/34683
1456 * trans-types.c (gfc_get_array_type_bounds): Use an array type
1457 with known size for accesses if that is known.
1459 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
1462 * expr.c (find_array_element): Check that the array bounds are
1463 constant before using them. Use lower, as well as upper bound.
1464 (check_restricted): Allow implied index variable.
1466 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
1469 * trans_array.c (gfc_trans_deferred_array): Do not null the
1470 data pointer on entering scope, nor deallocate it on leaving
1471 scope, if the symbol has the 'save' attribute.
1474 * trans_decl.c (gfc_finish_var_decl): Derived types with
1475 allocatable components and an initializer must be TREE_STATIC.
1477 2008-01-07 Paul Thomas <pault@gcc.gnu.org>
1480 * module.c (write_generic): Rewrite completely.
1481 (write_module): Change call to write_generic.
1483 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1486 * scanner.c (load_line): Do not count ' ' as printable when checking for
1489 2008-01-06 Paul Thomas <pault@gcc.gnu.org>
1492 * module.c (load_needed): If the namespace has no proc_name
1493 give it the module symbol.
1495 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1498 * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
1499 the dummy variable expression, test for NULL, and pass the variable
1500 address to the called function.
1502 2007-01-06 Tobias Burnus <burnus@net-b.de>
1505 * match.c (gfc_match_common): Remove blank common in
1507 * resolve.c (resolve_common_vars): New function.
1508 (resolve_common_blocks): Move checks to resolve_common_vars
1509 and invoke that function.
1510 (resolve_types): Call resolve_common_vars for blank commons.
1512 2008-01-06 Tobias Burnus <burnus@net-b.de>
1515 * resolve.c (resolve_equivalence_derived): Reject derived types with
1516 default initialization if equivalenced with COMMON variable.
1518 2008-01-06 Tobias Burnus <burnus@net-b.de>
1521 * io.c (check_io_constraints): Disallow unformatted I/O for
1524 2008-01-06 Tobias Burnus <burnus@net-b.de>
1527 * resolve.c (resolve_formal_arglist): Reject dummy procedure in
1528 ELEMENTAL functions.
1530 2008-01-06 Tobias Burnus <burnus@net-b.de>
1533 * interface.c (compare_actual_formal): Reject parameter
1534 actual to intent(out) dummy.
1536 2008-01-04 Tobias Burnus <burnus@net-b.de>
1539 * primary.c (match_varspec): Gobble whitespace before