1 2008-04-16 Daniel Kraft <d@domob.eu>
4 * gfortran.h: Added field "length_from_typespec" to gfc_charlength.
5 * aray.c (gfc_match_array_constructor): Added code to parse typespec.
6 (check_element_type, check_constructor_type, gfc_check_constructor_type):
7 Extended to support explicit typespec on constructor.
8 (gfc_resolve_character_array_constructor): Pad strings correctly for
9 explicit, constant character length.
10 * trans-array.c: New static global variable "typespec_chararray_ctor"
11 (gfc_trans_array_constructor): New code to support explicit but dynamic
14 2008-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
17 * decl.c (match_attr_spec): Check for matching pairs of parenthesis.
18 * expr.c (gfc_specification_expr): Supplement the error message with the
20 * resolve.c (gfc_resolve_index): Likewise.
21 * match.c (gfc_match_parens): Clarify error message with "at or before".
22 (gfc_match_do): Check for matching pairs of parenthesis.
24 2008-05-16 Tobias Burnus <burnus@net-b.de
26 * intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
27 add missing KIND argument to ACHAR and NINT; and state that
28 the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
29 ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
31 2008-05-16 Daniel Kraft <d@domob.eu>
33 * primary.c: New private structure "gfc_structure_ctor_component".
34 (gfc_free_structure_ctor_component): New helper function.
35 (gfc_match_structure_constructor): Extended largely to support named
36 arguments and default initialization for structure constructors.
38 2008-05-15 Steven G. Kargl <kargls@comcast.net>
40 * simplify.c (gfc_simplify_dble, gfc_simplify_float,
41 simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
42 possible memory leaks.
43 (gfc_simplify_reshape): Plug possible memory leaks and dereferencing
46 2008-05-15 Steven G. Kargl <kargls@comcast.net>
49 * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
50 rolled integer conversion with gfc_int2int, gfc_real2int, and
52 (gfc_simplify_intconv): Renamed to simplify_intconv.
54 2008-05-15 Steven G. Kargl, <kargl@comcast.net>
55 * gfortran.dg/and_or_xor.f90: New test
57 * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
58 gfc_simplify_xor): Don't range check logical results.
60 2008-05-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
62 * trans-expr.c (gfc_conv_concat_op): Take care of nondefault
64 (gfc_build_compare_string): Add kind argument and use it.
65 (gfc_conv_statement_function): Fix indentation.
66 * gfortran.h (gfc_character_info): New structure.
67 (gfc_character_kinds): New array.
68 * trans-types.c (gfc_character_kinds, gfc_character_types,
69 gfc_pcharacter_types): New array.
70 (gfc_init_kinds): Fill character kinds array.
71 (validate_character): Take care of nondefault character kinds.
72 (gfc_build_uint_type): New function.
73 (gfc_init_types): Take care of nondefault character kinds.
74 (gfc_get_char_type, gfc_get_pchar_type): New functions.
75 (gfc_get_character_type_len): Use gfc_get_char_type.
76 * trans.h (gfc_build_compare_string): Adjust prototype.
77 (gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
78 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
79 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
80 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
81 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
83 * trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
85 * trans-decl.c (gfor_fndecl_compare_string_char4,
86 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
87 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
88 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
89 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
90 gfor_fndecl_concat_string_char4): New function decls.
91 (gfc_build_intrinsic_function_decls): Define new *_char4 function
93 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
94 gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
95 gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
96 gfc_conv_intrinsic_function): Deal with nondefault character kinds.
98 2008-05-15 Sa Liu <saliu@de.ibm.com>
100 * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
101 All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
102 c_int128_t, c_int_least128_t and c_int_fast128_t are added as
104 * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
105 to macro NAMED_INTCST.
106 * symbol.c (std_for_isocbinding_symbol): New helper function to
107 return the standard that supports this isocbinding symbol.
108 (generate_isocbinding_symbol): Do not generate GNU extension symbols
109 if std=f2003. Add new parameter to NAMED_INTCST.
110 * module.c (use_iso_fortran_env_module): Add new parameter to
111 NAMED_INTCST and new field standard to struct intmod_sym.
112 * gfortran.h: Add new parameter to NAMED_INTCST.
113 * trans-types.c (init_c_interop_kinds): Add new parameter to
115 * intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
118 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
121 * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
122 arrays that have the TARGET attribute.
124 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
127 * simplify.c (only_convert_cmplx_boz): New function.
128 (gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
129 Call only_convert_cmplx_boz.
131 2008-05-14 Paul Thomas <pault@gcc.gnu.org>
134 * interface.c (compare_actual_formal): Do not check sizes if the
135 actual is BT_PROCEDURE.
137 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
140 * trans-array.c (gfc_conv_ss_startstride): Any negative size is
141 the same as zero size.
142 (gfc_conv_loop_setup): Fix size calculation.
144 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
147 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
148 handle zero-size sections.
150 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
153 * scanner.c (preprocessor_line): Allocate enough memory for a
156 2008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
159 * target-memory.c (gfc_target_expr_size): Correctly treat
161 (gfc_target_encode_expr): Likewise.
162 (gfc_interpret_complex): Whitespace change.
164 2008-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
167 * trans.c (gfc_call_malloc): If size equals zero, allocate one
168 byte; don't return a null pointer.
170 2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
173 * module.c (quote_string): Fix sprintf format.
175 2008-05-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
178 * module.c (quote_string, unquote_string,
179 mio_allocated_wide_string): New functions.
180 (mio_expr): Call mio_allocated_wide_string where needed.
182 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
184 * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
185 Rename DECL_IS_PURE to DECL_PURE_P.
187 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
189 * arith.c: (gfc_arith_concat, gfc_compare_string,
190 gfc_compare_with_Cstring, hollerith2representation,
191 gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
192 gfc_hollerith2character, gfc_hollerith2logical): Use wide
193 characters for character constants.
194 * data.c (create_character_intializer): Likewise.
195 * decl.c (gfc_set_constant_character_len): Likewise.
196 * dump-parse-tree.c (show_char_const): Correctly dump wide
198 error.c (print_wide_char): Rename into gfc_print_wide_char.
199 (show_locus): Adapt to new prototype of gfc_print_wide_char.
200 expr.c (free_expr0): Representation is now disjunct from
201 character string value, so we always free it.
202 (gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
203 to wide character strings.
204 * gfortran.h (gfc_expr): Make value.character.string a wide string.
205 (gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
206 gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
207 (gfc_get_wide_string): New macro.
208 (gfc_print_wide_char): New prototype.
209 * io.c (format_string): Make a wide string.
210 (next_char, gfc_match_format, compare_to_allowed_values,
211 gfc_match_open): Deal with wide strings.
212 * module.c (mio_expr): Convert between wide strings and ASCII ones.
213 * primary.c (match_hollerith_constant, match_charkind_name):
215 * resolve.c (build_default_init_expr): Likewise.
216 * scanner.c (gfc_wide_toupper, gfc_wide_memset,
217 gfc_char_to_widechar): New functions.
218 (wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
219 Changes in prototypes.
220 (gfc_define_undef_line, load_line, preprocessor_line,
221 include_line, load_file, gfc_read_orig_filename): Handle wide
223 * simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
224 gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
225 gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
226 gfc_simplify_repeat): Handle wide strings.
227 (wide_strspn, wide_strcspn): New helper functions.
228 (gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
230 * symbol.c (generate_isocbinding_symbol): Likewise.
231 * target-memory.c (size_character, gfc_target_expr_size,
232 encode_character, gfc_target_encode_expr, gfc_interpret_character,
233 gfc_target_interpret_expr): Handle wide strings.
234 * trans-const.c (gfc_conv_string_init): Lower wide strings to
236 (gfc_conv_constant_to_tree): Likewise.
237 * trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
238 * trans-io.c (gfc_new_nml_name_expr): Likewise.
239 * trans-stmt.c (gfc_trans_label_assign): Likewise.
241 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
243 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
244 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
245 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
246 with ATTRIBUTE_UNUSED.
248 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
250 * check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
251 * simplify.c (gfc_simplify_lgamma): Likewise.
253 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
255 * openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
257 * decl.c (gfc_match_kind_spec, gfc_match_type_spec,
258 gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
259 match_string_p, match_attr_spec, gfc_match_suffix,
260 match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
262 * gfortran.h (gfc_char_t): New type.
263 (gfc_linebuf): Make line member a gfc_char_t.
264 (locus): Make nextc member a gfc_char_t.
265 (gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
266 gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
267 gfc_peek_ascii_char, gfc_check_digit): New prototypes.
268 * error.c (print_wide_char): New function.
269 (show_locus): Use print_wide_char and gfc_wide_strlen.
270 * io.c (next_char): Use gfc_char_t type.
271 (match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
272 * match.c (gfc_match_parens, gfc_match_eos,
273 gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
274 gfc_match_intrinsic_op, gfc_match_char, gfc_match_return,
275 gfc_match_common): Likewise.
276 * match.h (gfc_match_special_char): Change prototype.
277 * parse.c (decode_specification_statement, decode_statement,
278 decode_omp_directive, next_free, next_fixed): Use
279 gfc_peek_ascii_char and gfc_next_ascii_char.
280 * primary.c (gfc_check_digit): Change name.
281 (match_digits, match_hollerith_constant, match_boz_constant,
282 match_real_constant, next_string_char, match_charkind_name,
283 match_string_constant, match_logical_constant_string,
284 match_complex_constant, match_actual_arg, match_varspec,
285 gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
287 * scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
288 gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
289 gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
290 wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
291 gfc_next_ascii_char, gfc_peek_ascii_char):
293 (next_char, gfc_define_undef_line, skip_free_comments,
294 gfc_next_char_literal, gfc_next_char, gfc_peek_char,
295 gfc_error_recovery, load_line, preprocessor_line, include_line,
296 load_file, gfc_read_orig_filename): Use gfc_char_t for source
297 characters and the {gfc_,}wide_* functions to manipulate wide
300 2008-05-06 Tobias Burnus <burnus@net-b.de>
303 * intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
304 * intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
305 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
306 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
307 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
309 2008-05-03 Janus Weil <jaydub66@gmail.com>
311 * misc.c (gfc_clear_ts): Set interface to NULL.
313 2008-05-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
316 * gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
317 gfc_expr value union. Add io_kind enum to here from io.c.
318 * io.c (gfc_free_dt): Free extra_comma.
319 (gfc_resolve_dt): If an extra comma was encountered and io_unit is type
320 BT_CHARACTER, resolve to format_expr and set default unit. Error if
321 io_kind is M_WRITE. (match_io): Match the extra comma and set new
322 pointer, extra_comma.
324 2008-05-01 Bud Davis <bdavis9659@sbcglobal.net>
327 * simplify.c (gfc_simplify_index): Check for direction argument
330 2008-05-01 Janus Weil <jaydub66@gmail.com>
332 * gfortran.h (struct gfc_symbol): Moving "interface" member to
333 gfc_typespec (plus fixing a small docu error).
334 * interface.c (gfc_procedure_use): Ditto.
335 * decl.c (match_procedure_decl): Ditto.
336 * resolve.c (resolve_specific_f0,
337 resolve_specific_f0, resolve_symbol): Ditto.
339 2008-04-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
341 * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
342 * intrinsic.h (gfc_check_selected_char_kind,
343 gfc_simplify_selected_char_kind): New prototypes.
344 * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
345 * trans.h (gfor_fndecl_sc_kind): New function decl.
346 * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
347 * arith.c (gfc_compare_with_Cstring): New function.
348 * arith.h (gfc_compare_with_Cstring): New prototype.
349 * check.c (gfc_check_selected_char_kind): New function.
350 * primary.c (match_string_constant, match_kind_param): Mark
351 symbols used as literal constant kind param as referenced.
352 * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
353 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
354 * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
355 * simplify.c (gfc_simplify_selected_char_kind): New function.
357 2008-04-28 Paul Thomas <pault@gcc.gnu.org>
360 * module.c (find_symbol): Do not return a result for a symbol
361 that has been renamed in another module.
363 2008-04-26 George Helffrich <george@gcc.gnu.org>
367 * trans-common.c (create_common): Add decl to function
368 chain (if inside one) to preserve identifier scope in debug output.
370 2008-04-25 Jan Hubicka <jh@suse.cz>
372 * trans-decl.c (trans_function_start): Update.
374 2008-04-25 Tobias Burnus <burnus@net-b.de>
375 Daniel Franke <franke.daniel@gmail.com>
378 * gfortranspec.c (lang_specific_driver): Deprecate
379 -M option; fix ICE when "-M" is last argument and
381 * options.c (gfc_handle_module_path_options):
382 Use -J instead of -M in error messages.
383 * invoke.texi: Mark -M as depecated.
385 2008-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
386 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
389 * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
392 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
394 * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
395 * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
396 (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
397 (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
398 (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
399 * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
400 (create_common): Don't set TREE_INVARIANT.
401 * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
402 * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
404 2008-04-21 Steve Ellcey <sje@cup.hp.com>
406 * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
408 2008-04-21 Daniel Franke <franke.daniel@gmail.com>
411 * gfortranspec.c (lookup_option): Properly handle separated arguments
412 in -J option, print missing argument message when necessary.
414 2008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
417 * scanner.c (skip_fixed_comments): Update continue_line when comment is
418 detected. (gfc_next_char_literal): Likewise.
420 2008-04-19 Paul Thomas <pault@gcc.gnu.org>
425 * trans_array.c (gfc_trans_array_constructor): Temporarily
426 realign loop, if loop->from is not zero, before creating
427 the temporary array and provide an offset.
430 * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
431 and allow for NULL body. Change all references from
432 init_default_dt to gfc_init_default_dt.
433 * trans.h : Add prototype for gfc_init_default_dt.
434 * trans-array.c (gfc_trans_deferred_vars): After nullification
435 call gfc_init_default_dt for derived types with allocatable
438 2008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
441 * trans-common.c (create_common): Revert patch causing regression.
443 2008-04-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
446 * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
447 optional argument attribute.
449 2008-04-16 Paul Thomas <pault@gcc.gnu.org>
452 * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
453 is not used, the argument must be converted.
455 2008-04-16 Jakub Jelinek <jakub@redhat.com>
458 * f95-lang.c (gfc_init_builtin_functions): Make sure
459 BUILT_IN_SINCOS{,F,L} types aren't varargs.
461 2008-04-15 Paul Thomas <pault@gcc.gnu.org>
464 * expr.c (scalarize_intrinsic_call): Reorder identification of
465 array argument so that if one is not found a segfault does not
466 occur. Return FAILURE if all scalar arguments.
468 2008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
469 Tobias Burnus <burnus@net-b.de>
472 * options.c (gfc_init_options): Set the default maximum continuation
473 lines to 255 for both free and fixed form source for warnings.
474 (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
475 the -std=f95 free form max continuations to 39 for warnings.
476 * scanner.c (gfc_next_char_literal): Adjust the current_line number only
477 if it is less than the current locus.
479 2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
481 PR fortran/25829 28655
482 * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
483 round, sign, and id. (match_open_element): Match new tags.
484 (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
485 for DEFAULT only. Update error messages. (match_dt_element): Fix match
486 tag for asynchronous. Update error messages. (gfc_free_inquire): Free
487 new expressions. (match_inquire_element): Match new tags.
488 (gfc_match_inquire): Add constraint for ID and PENDING.
489 (gfc_resolve_inquire): Resolve new tags.
490 * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
491 mask for ID parameter.
492 * ioparm.def: Fix order of parameters for pending, round, and sign.
493 NOTE: These must line up with the definitions in libgfortran/io/io.h. or
496 2008-04-06 Paul Thomas <pault@gcc.gnu.org>
499 * expr.c (scalarize_intrinsic_call): Identify which argument is
500 an array and use that as the template.
501 (check_init_expr): Remove tests that first argument is an array
502 in the call to scalarize_intrinsic_call.
504 2008-04-06 Tobias Schlüter <tobi@gcc.gnu.org>
507 * io.c (io_tag): Add field 'value'. Split 'spec' field in
509 (match_etag, match_vtag, match_ltag): Split parsing in two steps
510 to give better error messages.
512 2008-04-06 Tobias Burnus <burnus@net-b.de>
514 * io.c (check_io_constraints): Add constrains. ID= requires
515 asynchronous= and asynchronous= must be init expression.
517 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
519 * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
521 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
523 * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
524 gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
525 functions and make them static. Add new gfc_dump_parse_tree
527 * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
528 (gfc_status, gfc_status_char): Delete prototypes.
529 * error.c (gfc_status, gfc_status_char): Remove functions.
530 * scanner.c (gfc_new_file): Use printf instead of gfc_status.
531 * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
532 (gfc_handle_module_path_options): Use gfc_fatal_error instead of
534 (gfc_handle_option): Rename verbose into dump_parse_tree.
535 * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
537 2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
538 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
540 PR fortran/25829 28655
541 * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
542 * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
543 (gfc_open): Add pointers for decimal, encoding, round, sign,
544 asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
545 encoding, pending, round, sign, size, id.
546 (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
547 asynchronous, blank, decimal, delim, pad, round, sign.
548 (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
549 wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
550 * trans-stmt.h (gfc_trans_wait): New function prototype.
551 * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
552 * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
553 ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
554 (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
555 tags. (gfc_resolve_open): Remove comment around check for allowed
556 values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
557 ROUND, and SIGN. (match_dt_element): Add matching for new tags.
558 (gfc_free_wait): New function. (gfc_resolve_wait): New function.
559 (match_wait_element): New function. (gfc_match_wait): New function.
560 * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
561 (resolve_code): Add case for EXEC_WAIT.
562 * st.c (gfc_free_statement): Add case for EXEC_WAIT.
563 * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
564 Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
565 (gfc_build_io_library_fndecls): Add function declaration for st_wait.
566 (gfc_trans_open): Add mask bits for new I/O tags.
567 (gfc_trans_inquire): Add mask bits for new I/O tags.
568 (gfc_trans_wait): New translation function.
569 (build_dt): Add mask bits for new I/O tags.
570 * match.c (gfc_match_if) Add matcher for "wait".
571 * match.h (gfc_match_wait): Prototype for new function.
572 * ioparm.def: Add new I/O parameter definitions.
573 * parse.c (decode_statement): Add match for "wait" statement.
574 (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
576 2008-04-03 Jakub Jelinek <jakub@redhat.com>
579 * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
582 2008-04-03 Tom Tromey <tromey@redhat.com>
584 * Make-lang.in (fortran_OBJS): New variable.
586 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
588 * f95-lang.c (insert_block): Kill.
590 2008-04-01 George Helffrich <george@gcc.gnu.org>
592 PR fortran/35154, fortran/23057
593 * trans-common.c (create_common): Add decl to function
594 chain to preserve identifier scope in debug output.
596 2008-04-01 Joseph Myers <joseph@codesourcery.com>
598 * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
599 * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
602 2008-03-30 Paul Thomas <pault@gcc.gnu.org>
605 * resolve.c (resolve_function, resolve_call): If the procedure
606 is elemental do not look for noncopying intrinsics.
608 2008-03-29 Paul Thomas <pault@gcc.gnu.org>
611 * trans-array.c (gfc_array_init_size): Set 'size' zero if
612 negative in one dimension.
615 * trans-expr.c (gfc_trans_string_copy): Only assign a char
616 directly if the lhs and rhs types are the same.
618 2008-03-28 Daniel Franke <franke.daniel@gmail.com>
619 Paul Richard Thomas <paul.richard.thomas@gmail.com>
622 * primary.c (match_variable): Improved matching of function
624 * resolve.c (resolve_allocate_deallocate): Removed checks if
625 the actual argument for STAT is a variable.
627 2008-03-28 Tobias Burnus <burnus@net-b.de>
629 * symbol.c (gfc_get_default_type): Fix error message; option
630 -fallow_leading_underscore should be -fallow-leading-underscore
632 2008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
635 * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
636 optional argument attribute.
638 2008-03-27 Tom Tromey <tromey@redhat.com>
640 * Make-lang.in: Revert automatic dependency patch.
642 2008-03-25 Tom Tromey <tromey@redhat.com>
644 * Make-lang.in: Remove .o targets.
645 (fortran_OBJS): New variable.
646 (fortran/gfortranspec.o): Move to fortran/. Reduce to variable
648 (GFORTRAN_D_OBJS): Update.
649 (GFORTRAN_TRANS_DEPS): Remove.
651 2008-03-24 Paul Thomas <pault@gcc.gnu.org>
654 * resolve.c (resolve_structure_cons): It is an error to assign
655 NULL to anything other than a pointer or allocatable component.
658 * resolve.c (resolve_symbol): If the symbol is a derived type,
659 resolve the derived type. If the symbol is a derived type
660 function, ensure that the derived type is visible in the same
661 namespace as the function.
663 2008-03-23 Tobias Schlüter <tobi@gcc.gnu.org>
665 * trans.h: Use fold_build in build1_v, build2_v and build3_v
667 * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
668 Don't use build2_v macro.
670 2008-03-19 Daniel Franke <franke.daniel@gmail.com>
673 * interface.c (gfc_procedure_use): Check for keyworded arguments in
674 procedures without explicit interfaces.
676 2008-03-16 Paul Thomas <pault@gcc.gnu.org>
679 * resolve.c (check_assumed_size_reference): Only visit the
680 first reference and look directly at the highest dimension.
682 2008-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
685 * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
688 2008-03-15 Daniel Franke <franke.daniel@gmail.com>
691 * resolve.c (resolve_branch): Less strict and pessimistic warning
694 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
696 * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
697 (gfc_be_parse_file): Call clear_binding_stack from here.
698 (gfc_clear_binding_stack): Rename to clear_binding_stack.
700 2008-03-09 Paul Thomas <pault@gcc.gnu.org>
703 * module.c (mio_symtree_ref): After providing a symbol for a
704 missing equivalence member, resolve and NULL the fixups.
706 2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
708 * invoke.texi (Error and Warning Options): Document
711 2008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
714 * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
715 checking bounds of absent optional arguments.
717 2008-03-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
720 * intrinsic.c (add_functions): Add simplification routines for
721 ERF, DERF, ERFC and DERFC.
722 * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
723 extensions into Fortran 2008 features.
724 * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
726 * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
728 2008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
731 * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
732 ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
733 ERFC_SCALED, LOG_GAMMA and HYPOT.
734 * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
735 gfc_resolve_hypot): New prototypes.
736 * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
737 ACOSH, ASINH and ATANH available.
738 * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
739 * lang.opt: Add -std=f2008 option.
740 * libgfortran.h: Define GFC_STD_F2008.
741 * lang-specs.h: Add .f08 and .F08 file suffixes.
742 * iresolve.c (gfc_resolve_hypot): New function.
743 * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
744 * check.c (gfc_check_hypot): New function.
745 * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
746 * options.c (set_default_std_flags): Allow Fortran 2008 by default.
747 (form_from_filename): Add .f08 suffix.
748 (gfc_handle_option): Handle -std=f2008 option.
749 * simplify.c (gfc_simplify_hypot): New function.
750 * gfortran.texi: Document Fortran 2008 status and file extensions.
751 * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
752 as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
753 ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
754 * invoke.texi: Document the new -std=f2008 option.
756 2008-03-02 Jakub Jelinek <jakub@redhat.com>
758 * gfortranspec.c (lang_specific_driver): Update copyright notice
761 2008-02-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
764 * expr.c (find_array_element): Modify traversing the constructor to
765 avoid trying to access NULL memory pointed to by next for the
766 last element. (find_array_section): Exit while loop if cons->next is
768 * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
769 (gfc_conv_function_call): Same.
770 * decl.c (gfc_match_implicit): Same.
771 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
773 2008-02-28 Daniel Franke <franke.daniel@gmail.com>
778 * lang.opt: Added -Wreturn-type.
779 * options.c (gfc_handle_option): Recognize -Wreturn-type.
780 * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
781 where the result value is not set.
782 (gfc_generate_function_code): Likewise.
783 (generate_local_decl): Emit warnings for funtions whose RESULT
786 2008-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
789 * trans-expr.c (gfc_conv_variable): Don't build indirect
790 references when explicit interface is mandated.
791 * resolve.c (resolve_formal_arglist): Set attr.always_explicit
792 on the result symbol as well as the procedure symbol.
794 2008-02-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
797 * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
798 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
799 gfor_fndecl_math_exponent16.
800 * f95-lang.c (build_builtin_fntypes): Add new function types.
801 (gfc_init_builtin_functions): Add new builtins for nextafter,
802 frexp, ldexp, fabs, scalbn and inf.
803 * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
804 (gfc_resolve_scale): Don't convert type of second argument.
805 (gfc_resolve_set_exponent): Likewise.
806 (gfc_resolve_size): Don't add hidden arguments.
807 * trans-decl.c: Remove gfor_fndecl_math_exponent4,
808 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
809 gfor_fndecl_math_exponent16.
810 * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
811 for scalbn, fraction, nearest, rrspacing, set_exponent and
813 (gfc_conv_intrinsic_exponent): Directly call frexp.
814 (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
815 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
816 gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
818 (gfc_conv_intrinsic_function): Use the new functions above.
820 2008-02-26 Tobias Burnus <burnus@net-b.de>
823 * interface.c (check_operator_interface): Show better line for error
824 messages; fix constrains for user-defined assignment operators.
825 (gfc_extend_assign): Fix constrains for user-defined assignment
828 2008-02-26 Tom Tromey <tromey@redhat.com>
830 * trans-io.c (set_error_locus): Remove old location code.
831 * trans-decl.c (gfc_set_decl_location): Remove old location code.
832 * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
833 * scanner.c (gfc_gobble_whitespace): Remove old location code.
834 (get_file): Likewise.
835 (preprocessor_line): Likewise.
836 (load_file): Likewise.
837 (gfc_new_file): Likewise.
838 * trans.c (gfc_trans_runtime_check): Remove old location code.
839 (gfc_get_backend_locus): Likewise.
840 (gfc_set_backend_locus): Likewise.
841 * data.c (gfc_assign_data_value): Remove old location code.
842 * error.c (show_locus): Remove old location code.
843 * gfortran.h (gfc_linebuf): Remove old location code.
844 (gfc_linebuf_linenum): Remove old-location variant.
846 2008-02-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
849 * trans-const.c (gfc_build_string_const): Don't call gettext.
850 (gfc_build_localized_string_const): New function.
851 * trans-const.h (gfc_build_localized_string_const): New prototype.
852 * trans.c (gfc_trans_runtime_check): Use
853 gfc_build_localized_string_const instead of gfc_build_string_const.
854 (gfc_call_malloc): Likewise.
855 (gfc_allocate_with_status): Likewise.
856 (gfc_allocate_array_with_status): Likewise.
857 (gfc_deallocate_with_status): Likewise.
858 (gfc_call_realloc): Likewise.
859 * trans-io.c (gfc_trans_io_runtime_check): Likewise.
861 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
863 * arith.c: Update copyright years.
871 * dependency.c: Likewise.
872 * dependency.h: Likewise.
873 * dump-parse-tree.c: Likewise.
876 * gfc-internals.texi: Likewise.
877 * gfortran.h: Likewise.
878 * gfortran.texi: Likewise.
879 * gfortranspec.c: Likewise.
880 * interface.c: Likewise.
881 * intrinsic.c: Likewise.
882 * intrinsic.h: Likewise.
883 * intrinsic.texi: Likewise.
884 * invoke.texi: Likewise.
886 * iresolve.c: Likewise.
887 * iso-c-binding.def: Likewise.
888 * iso-fortran-env.def: Likewise.
889 * lang-specs.h: Likewise.
890 * lang.opt: Likewise.
891 * libgfortran.h: Likewise.
894 * matchexp.c: Likewise.
896 * module.c: Likewise.
897 * openmp.c: Likewise.
898 * options.c: Likewise.
901 * primary.c: Likewise.
902 * resolve.c: Likewise.
903 * scanner.c: Likewise.
904 * simplify.c: Likewise.
906 * symbol.c: Likewise.
907 * target-memory.c: Likewise.
908 * target-memory.h: Likewise.
909 * trans-array.h: Likewise.
910 * trans-const.h: Likewise.
911 * trans-stmt.h: Likewise.
912 * trans-types.c: Likewise.
913 * trans-types.h: Likewise.
914 * types.def: Likewise.
916 2008-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
919 * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
920 (gfc_simplify_ibset): Remove call to range_check.
921 (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
922 (gfc_simplify_real): Add call gfc_clear_ts to initialize the
923 temporary gfc_typspec variable.
925 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
927 * trans-array.c (gfc_conv_descriptor_data_get,
928 gfc_conv_descriptor_data_set_internal,
929 gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
930 gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
931 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
932 gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
933 gfc_conv_array_transpose, gfc_grow_array,
934 gfc_trans_array_constructor_subarray,
935 gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
936 gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
937 gfc_conv_array_initializer, gfc_trans_array_bounds,
938 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
939 gfc_get_dataptr_offset, gfc_conv_array_parameter,
940 gfc_trans_dealloc_allocated, get_full_array_size,
941 gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
943 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
944 gfc_conv_component_ref, gfc_conv_cst_int_power,
945 gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
946 * trans-common.c (create_common): Likewise.
947 * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
949 * trans-const.c (gfc_conv_constant_to_tree): Likewise.
950 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
951 gfc_trans_integer_select, gfc_trans_character_select,
952 gfc_trans_forall_loop, compute_overall_iter_number,
953 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
954 gfc_trans_deallocate): Likewise.
955 * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
956 gfc_allocate_with_status, gfc_allocate_array_with_status,
957 gfc_deallocate_with_status): Likewise.
958 * f95-lang.c (gfc_truthvalue_conversion): Likewise.
959 * trans-io.c (set_parameter_const, set_parameter_value,
960 set_parameter_ref, set_string, set_internal_unit, io_result,
961 set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
962 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
963 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
964 gfc_generate_function_code): Likewise.
965 * convert.c (convert): Likewise.
966 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
967 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
968 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
969 gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
970 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
971 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
972 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
973 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
974 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
975 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
976 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
977 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
978 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
979 gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
980 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
981 gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
982 gfc_conv_intrinsic_repeat): Likewise.
984 2008-02-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
987 * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
988 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
989 * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
990 gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
991 * trans-decl.c: Likewise.
993 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
996 * expr.c (find_array_element): Modify traversing the constructor to
997 avoid trying to access NULL memory pointed to by next for the
998 last element. (find_array_section): Exit while loop if cons->next is
1001 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1004 * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
1006 (gfc_resolve_aint): Likewise.
1007 (gfc_resolve_anint): Likewise.
1008 (gfc_resolve_besn): Likewise.
1009 (gfc_resolve_cshift): Likewise.
1010 (gfc_resolve_ctime): Likewise.
1011 (gfc_resolve_eoshift): Likewise.
1012 (gfc_resolve_index_func): Likewise.
1013 (gfc_resolve_isatty): Likewise.
1014 (gfc_resolve_malloc): Likewise.
1015 (gfc_resolve_rrspacing): Likewise.
1016 (gfc_resolve_scale): Likewise.
1017 (gfc_resolve_set_exponent): Likewise.
1018 (gfc_resolve_spacing): Likewise.
1019 (gfc_resolve_spacing): Likewise.
1020 (gfc_resolve_fgetc): Likewise.
1021 (gfc_resolve_fputc): Likewise.
1022 (gfc_resolve_ftell): Likewise.
1023 (gfc_resolve_ttynam): Likewise.
1024 (gfc_resolve_alarm_sub): Likewise.
1025 (gfc_resolve_mvbits): Likewise.
1026 (gfc_resolve_getarg): Likewise.
1027 (gfc_resolve_signal_sub): Likewise.
1028 (gfc_resolve_exit): Likewise.
1029 (gfc_resolve_flush): Likewise.
1030 (gfc_resolve_free): Likewise.
1031 (gfc_resolve_ctime_sub): Likewise.
1032 (gfc_resolve_fgetc_sub): Likewise.
1033 (gfc_resolve_fputc_sub): Likewise.
1034 (gfc_resolve_fseek_sub): Likewise.
1035 (gfc_resolve_ftell_sub): Likewise.
1036 (gfc_resolve_ttynam_sub): Likewise.
1038 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1040 * gfc-internals.texi: Fix typos and markup nits.
1041 * gfortran.texi: Likewise.
1042 * intrinsic.texi: Likewise.
1044 2008-02-21 Richard Guenther <rguenther@suse.de>
1046 * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
1047 as unary PAREN_EXPR for real and complex typed expressions.
1048 (gfc_conv_unary_op): Fold the built tree.
1050 2008-02-20 Tobias Burnus <burnus@net-b.de>
1053 * match.c (gfc_match_name): Improve error message for '$'.
1055 2008-02-19 Daniel Franke <franke.daniel@gmail.com>
1058 * expr.c (gfc_check_pointer_assign): Add type and kind information
1059 to type-mismatch message.
1060 (gfc_check_assign): Unify error messages.
1062 2008-02-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1065 * gfortran.texi: Create new section for unimplemented extensions.
1066 Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
1067 Remove "smaller projects" list. Fix a few typos.
1069 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1071 * intrinsic.texi: Rename INDEX node to avoid clashing with
1072 index.html on case-insensitive systems.
1074 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1077 * trans-expr.c (gfc_conv_function_call): Force evaluation of
1080 2008-02-10 Daniel Franke <franke.daniel@gmail.com>
1083 * lang.opt: Allow '-J<dir>' next to '-J <dir>',
1084 likewise '-I <dir>' and '-I<dir>'.
1086 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1089 * Make-lang.in (f951): Add $(GMPLIBS).
1091 2008-02-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1094 * trans-common.c (build_field): Mark fields as volatile when needed.
1096 2008-02-05 Tobias Burnus <burnus@net-b.de>
1099 * data.c (gfc_assign_data_value): Only free "size" if
1100 it has not already been freed.
1102 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
1105 * array.c (match_array_element_spec): Remove check for negative
1107 (gfc_resolve_array_spec): Add check for negative size.
1109 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
1112 * data.c (gfc_assign_data_value): Add bounds check for array
1115 2008-02-04 Daniel Franke <franke.daniel@gmail.com>
1117 * resolve.c (resolve_where): Fix typo.
1118 (gfc_resolve_where_code_in_forall): Likewise.
1120 2008-02-03 Paul Thomas <pault@gcc.gnu.org>
1123 * resolve.c (resolve_allocate_deallocate): New function.
1124 (resolve_code): Call it for allocate and deallocate.
1125 * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
1126 the checking of the STAT tag and put in above new function.
1127 * primary,c (match_variable): Do not fix flavor of host
1128 associated symbols yet if the type is not known.
1130 2008-01-31 Paul Thomas <pault@gcc.gnu.org>
1133 * expr.c (gfc_check_assign): It is an error to assign
1134 to a sibling procedure.
1136 2008-01-30 Paul Thomas <pault@gcc.gnu.org>
1139 * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
1140 delete_symtree to gfc_delete_symtree.
1141 * gfortran.h : Add prototype for gfc_delete_symtree.
1142 * module.c (load_generic_interfaces): Transfer symbol to a
1143 unique symtree and delete old symtree, instead of renaming.
1144 (read_module): The rsym and the found symbol are the same, so
1145 the found symtree can be deleted.
1148 * decl.c (match_char_spec): Remove the constraint on deferred
1149 matching of functions and free the length expression.
1150 delete_symtree to gfc_delete_symtree.
1151 (gfc_match_type_spec): Whitespace.
1152 (gfc_match_function_decl): Defer characteristic association for
1153 all types except BT_UNKNOWN.
1154 * parse.c (decode_specification_statement): Only derived type
1155 function matching is delayed to the end of specification.
1157 2008-01-28 Tobias Burnus <burnus@net-b.de>
1160 * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
1162 2008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1165 * array.c (gfc_check_constructor_type): Revert clearing the expression.
1167 2008-01-26 Tobias Burnus <burnus@net-b.de>
1170 * trans-expr.c (gfc_conv_function_call): Don't call
1171 gfc_add_interface_mapping if the expression is NULL.
1173 2008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1176 * trans-array.c (gfc_trans_create_temp_array): Remove call to
1177 gcc_assert (integer_zerop (loop->from[n])).
1179 2008-01-25 Daniel Franke <franke.daniel@gmail.com>
1182 * resolve.c (resolve_where): Added check if user-defined assignment
1183 operator is an elemental subroutine.
1184 (gfc_resolve_where_code_in_forall): Likewise.
1186 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1190 * gfortran.h: Revert changes from 2008-01-17.
1191 * match.c: Likewise.
1192 * symbol.c: Likewise.
1193 (gfc_undo_symbols): Undo namespace changes related to common blocks.
1195 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1198 * data.c (formalize_structure_cons): Skip formalization on
1201 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1203 * gfortran.texi (OpenMP): Extended existing documentation.
1204 (contributors): Added major contributors of 2008 that were
1206 (proposed extensions): Removed implemented items.
1208 2008-01-24 Paul Thomas <pault@gcc.gnu.org>
1211 * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
1212 seen, check for a statement label and, if present, delete it
1213 and set the locus to the start of the statement.
1215 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
1218 * trans-io.c (gfc_trans_transfer): If the array reference in a
1219 read has a vector subscript, use gfc_conv_subref_array_arg to
1220 copy back the temporary.
1222 2008-01-22 Tobias Burnus <burnus@net-b.de>
1225 * interface.c (compare_actual_formal): Fix adding type
1226 to missing_arg_type for absent optional arguments.
1228 2008-01-22 Tobias Burnus <burnus@net-b.de>
1231 * parse.c (parse_spec): Change = into ==.
1233 2008-01-22 Daniel Franke <franke.daniel@gmail.com>
1236 * expr.c (check_elemental): Fix check for valid data types.
1238 2008-01-22 Tobias Burnus <burnus@net-b.de>
1241 * scanner.c (load_line): Support <tab><digit> continuation lines.
1242 * invoke.texi (-Wtabs): Document this.
1244 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
1247 * module.c (read_module): Set use_rename attribute.
1249 2007-01-21 Tobias Burnus <burnus@net-b.de>
1252 * interface.c (compare_parameter): Improved error message
1253 for arguments of same type and mismatched kinds.
1255 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
1258 * resolve.c (resolve_entries): Do not do an array bounds check
1259 if the result symbols are the same.
1262 * module.c (read_module) : Hide the symtree of the previous
1263 version of the symbol if this symbol is renamed.
1265 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
1268 * array.c (gfc_check_constructor_type): Clear the expression ts
1269 so that the checking starts from the deepest level of array
1271 * primary.c (match_varspec): If an unknown type is changed to
1272 default character and the attempt to match a substring fails,
1273 change it back to unknown.
1276 * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
1277 NULL for an array constructor, use the cl.length expression to
1279 (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
1282 2008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1286 * iresolve.c (gfc_resolve_all): Remove conversion of mask
1287 argument to kind=1 by removing call to resolve_mask_arg().
1288 (gfc_resolve_any): Likewise.
1290 2008-01-19 Tobias Burnus <burnus@net-b.de>
1293 * primary.c (match_variable): Handle FL_UNKNOWN without
1294 uneducated guessing.
1295 (match_variable): Improve error message.
1297 2008-01-18 Tobias Burnus <burnus@net-b.de>
1300 * interface.c (get_expr_storage_size): Return storage size
1301 for array element designators.
1302 (compare_actual_formal): Reject unequal string sizes for
1303 assumed-shape dummy arguments. And fix error message for
1304 array-sections with vector subscripts.
1306 2008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1309 * simplify.c (is_constant_array_expr): New static function that returns
1310 true if the given expression is an array and is constant.
1311 (gfc_simplify_reshape): Use new function.
1313 2008-01-17 H.J. Lu <hongjiu.lu@intel.com>
1316 * symbol.c (free_common_tree): Renamed to ...
1317 (gfc_free_common_tree): This. Remove static.
1318 (gfc_free_namespace): Updated.
1320 * gfortran.h (gfc_free_common_tree): New.
1322 * match.c (gfc_match_common): Call gfc_free_common_tree () with
1323 gfc_current_ns->common_root and set gfc_current_ns->common_root
1324 to NULL on syntax error.
1326 2008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
1329 * trans-expr.c (gfc_conv_function_call): Use proper
1330 type for returned character pointers.
1332 2008-01-17 Paul Thomas <pault@gcc.gnu.org>
1337 * decl.c : Remove gfc_function_kind_locus and
1338 gfc_function_type_locus. Add gfc_matching_function.
1339 (match_char_length): If matching a function and the length
1340 does not match, return MATCH_YES and try again later.
1341 (gfc_match_kind_spec): The same.
1342 (match_char_kind): The same.
1343 (gfc_match_type_spec): The same for numeric and derived types.
1344 (match_prefix): Rename as gfc_match_prefix.
1345 (gfc_match_function_decl): Except for function valued character
1346 lengths, defer applying kind, type and charlen info until the
1347 end of specification block.
1348 gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
1349 parse.c (decode_specification_statement): New function.
1350 (decode_statement): Call it when a function has kind = -1. Set
1351 and reset gfc_matching function, as function statement is being
1353 (match_deferred_characteristics): Simplify with a single call
1354 to gfc_match_prefix. Do appropriate error handling. In any
1355 case, make sure that kind = -1 is reset or corrected.
1356 (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
1357 Throw an error if kind = -1 after last specification statement.
1358 parse.h : Prototype for gfc_match_prefix.
1360 2008-01-16 Tobias Burnus <burnus@net-b.de>
1363 * interface.c (compare_parameter): Allow AS_DEFERRED array
1364 elements and reject attr.pointer array elemenents.
1365 (get_expr_storage_size): Return storage size of elements of
1366 assumed-shape and pointer arrays.
1368 2008-01-15 Sebastian Pop <sebastian.pop@amd.com>
1370 * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
1371 for flag_tree_parallelize_loops.
1373 2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1376 * iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
1377 (gfc_resolve_any): Likewise.
1378 (gfc_resolve_count): Likewise. Don't append kind of
1379 argument to function name.
1381 2008-01-13 Tobias Burnus <burnus@net-b.de>
1384 * resolve.c (resolve_actual_arglist): For expressions,
1385 also check for assume-sized arrays.
1386 * interface.c (compare_parameter): Move F2003 character checks
1387 here, print error messages here, reject elements of
1388 assumed-shape array as argument to dummy arrays.
1389 (compare_actual_formal): Update for the changes above.
1391 2008-01-13 Tobias Burnus <burnus@net-b.de>
1394 * decl.c (contained_procedure): Only check directly preceeding state.
1396 2008-01-13 Tobias Burnus <burnus@net-b.de>
1399 * check.c (gfc_check_shape): Accept array ranges of
1400 assumed-size arrays.
1402 2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1405 * match.c (gfc_match_name): Don't error if leading character is a '(',
1406 just return MATCH_NO.
1408 2008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1411 * trans-io.c (create_dummy_iostat): Commit the symbol.
1413 2008-01-11 Paul Thomas <pault@gcc.gnu.org>
1416 * simplify.c (gfc_simplify_transfer): Return NULL if the size
1417 of the element is unavailable and only assign character length
1418 to the result, if 'mold' is constant.
1420 2008-01-10 Paul Thomas <pault@gcc.gnu.org>
1423 * trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
1424 to assign strings and perform bounds checks on the string length.
1425 (get_array_ctor_strlen): Remove bounds checking.
1426 (gfc_trans_array_constructor): Initialize string length checking.
1427 * trans-array.h : Add prototype for gfc_trans_string_copy.
1429 2008-01-08 Richard Guenther <rguenther@suse.de>
1432 PR tree-optimization/34683
1433 * trans-types.c (gfc_get_array_type_bounds): Use an array type
1434 with known size for accesses if that is known.
1436 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
1439 * expr.c (find_array_element): Check that the array bounds are
1440 constant before using them. Use lower, as well as upper bound.
1441 (check_restricted): Allow implied index variable.
1443 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
1446 * trans_array.c (gfc_trans_deferred_array): Do not null the
1447 data pointer on entering scope, nor deallocate it on leaving
1448 scope, if the symbol has the 'save' attribute.
1451 * trans_decl.c (gfc_finish_var_decl): Derived types with
1452 allocatable components and an initializer must be TREE_STATIC.
1454 2008-01-07 Paul Thomas <pault@gcc.gnu.org>
1457 * module.c (write_generic): Rewrite completely.
1458 (write_module): Change call to write_generic.
1460 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1463 * scanner.c (load_line): Do not count ' ' as printable when checking for
1466 2008-01-06 Paul Thomas <pault@gcc.gnu.org>
1469 * module.c (load_needed): If the namespace has no proc_name
1470 give it the module symbol.
1472 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1475 * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
1476 the dummy variable expression, test for NULL, and pass the variable
1477 address to the called function.
1479 2007-01-06 Tobias Burnus <burnus@net-b.de>
1482 * match.c (gfc_match_common): Remove blank common in
1484 * resolve.c (resolve_common_vars): New function.
1485 (resolve_common_blocks): Move checks to resolve_common_vars
1486 and invoke that function.
1487 (resolve_types): Call resolve_common_vars for blank commons.
1489 2008-01-06 Tobias Burnus <burnus@net-b.de>
1492 * resolve.c (resolve_equivalence_derived): Reject derived types with
1493 default initialization if equivalenced with COMMON variable.
1495 2008-01-06 Tobias Burnus <burnus@net-b.de>
1498 * io.c (check_io_constraints): Disallow unformatted I/O for
1501 2008-01-06 Tobias Burnus <burnus@net-b.de>
1504 * resolve.c (resolve_formal_arglist): Reject dummy procedure in
1505 ELEMENTAL functions.
1507 2008-01-06 Tobias Burnus <burnus@net-b.de>
1510 * interface.c (compare_actual_formal): Reject parameter
1511 actual to intent(out) dummy.
1513 2008-01-04 Tobias Burnus <burnus@net-b.de>
1516 * primary.c (match_varspec): Gobble whitespace before