1 2008-05-16 Daniel Kraft <d@domob.eu>
3 * primary.c: New private structure "gfc_structure_ctor_component".
4 (gfc_free_structure_ctor_component): New helper function.
5 (gfc_match_structure_constructor): Extended largely to support named
6 arguments and default initialization for structure constructors.
8 2008-05-15 Steven G. Kargl <kargls@comcast.net>
10 * simplify.c (gfc_simplify_dble, gfc_simplify_float,
11 simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
12 possible memory leaks.
13 (gfc_simplify_reshape): Plug possible memory leaks and dereferencing
16 2008-05-15 Steven G. Kargl <kargls@comcast.net>
19 * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
20 rolled integer conversion with gfc_int2int, gfc_real2int, and
22 (gfc_simplify_intconv): Renamed to simplify_intconv.
24 2008-05-15 Steven G. Kargl, <kargl@comcast.net>
25 * gfortran.dg/and_or_xor.f90: New test
27 * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
28 gfc_simplify_xor): Don't range check logical results.
30 2008-05-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
32 * trans-expr.c (gfc_conv_concat_op): Take care of nondefault
34 (gfc_build_compare_string): Add kind argument and use it.
35 (gfc_conv_statement_function): Fix indentation.
36 * gfortran.h (gfc_character_info): New structure.
37 (gfc_character_kinds): New array.
38 * trans-types.c (gfc_character_kinds, gfc_character_types,
39 gfc_pcharacter_types): New array.
40 (gfc_init_kinds): Fill character kinds array.
41 (validate_character): Take care of nondefault character kinds.
42 (gfc_build_uint_type): New function.
43 (gfc_init_types): Take care of nondefault character kinds.
44 (gfc_get_char_type, gfc_get_pchar_type): New functions.
45 (gfc_get_character_type_len): Use gfc_get_char_type.
46 * trans.h (gfc_build_compare_string): Adjust prototype.
47 (gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
48 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
49 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
50 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
51 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
53 * trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
55 * trans-decl.c (gfor_fndecl_compare_string_char4,
56 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
57 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
58 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
59 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
60 gfor_fndecl_concat_string_char4): New function decls.
61 (gfc_build_intrinsic_function_decls): Define new *_char4 function
63 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
64 gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
65 gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
66 gfc_conv_intrinsic_function): Deal with nondefault character kinds.
68 2008-05-15 Sa Liu <saliu@de.ibm.com>
70 * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
71 All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
72 c_int128_t, c_int_least128_t and c_int_fast128_t are added as
74 * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
75 to macro NAMED_INTCST.
76 * symbol.c (std_for_isocbinding_symbol): New helper function to
77 return the standard that supports this isocbinding symbol.
78 (generate_isocbinding_symbol): Do not generate GNU extension symbols
79 if std=f2003. Add new parameter to NAMED_INTCST.
80 * module.c (use_iso_fortran_env_module): Add new parameter to
81 NAMED_INTCST and new field standard to struct intmod_sym.
82 * gfortran.h: Add new parameter to NAMED_INTCST.
83 * trans-types.c (init_c_interop_kinds): Add new parameter to
85 * intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
88 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
91 * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
92 arrays that have the TARGET attribute.
94 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
97 * simplify.c (only_convert_cmplx_boz): New function.
98 (gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
99 Call only_convert_cmplx_boz.
101 2008-05-14 Paul Thomas <pault@gcc.gnu.org>
104 * interface.c (compare_actual_formal): Do not check sizes if the
105 actual is BT_PROCEDURE.
107 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
110 * trans-array.c (gfc_conv_ss_startstride): Any negative size is
111 the same as zero size.
112 (gfc_conv_loop_setup): Fix size calculation.
114 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
117 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
118 handle zero-size sections.
120 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
123 * scanner.c (preprocessor_line): Allocate enough memory for a
126 2008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
129 * target-memory.c (gfc_target_expr_size): Correctly treat
131 (gfc_target_encode_expr): Likewise.
132 (gfc_interpret_complex): Whitespace change.
134 2008-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
137 * trans.c (gfc_call_malloc): If size equals zero, allocate one
138 byte; don't return a null pointer.
140 2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
143 * module.c (quote_string): Fix sprintf format.
145 2008-05-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
148 * module.c (quote_string, unquote_string,
149 mio_allocated_wide_string): New functions.
150 (mio_expr): Call mio_allocated_wide_string where needed.
152 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
154 * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
155 Rename DECL_IS_PURE to DECL_PURE_P.
157 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
159 * arith.c: (gfc_arith_concat, gfc_compare_string,
160 gfc_compare_with_Cstring, hollerith2representation,
161 gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
162 gfc_hollerith2character, gfc_hollerith2logical): Use wide
163 characters for character constants.
164 * data.c (create_character_intializer): Likewise.
165 * decl.c (gfc_set_constant_character_len): Likewise.
166 * dump-parse-tree.c (show_char_const): Correctly dump wide
168 error.c (print_wide_char): Rename into gfc_print_wide_char.
169 (show_locus): Adapt to new prototype of gfc_print_wide_char.
170 expr.c (free_expr0): Representation is now disjunct from
171 character string value, so we always free it.
172 (gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
173 to wide character strings.
174 * gfortran.h (gfc_expr): Make value.character.string a wide string.
175 (gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
176 gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
177 (gfc_get_wide_string): New macro.
178 (gfc_print_wide_char): New prototype.
179 * io.c (format_string): Make a wide string.
180 (next_char, gfc_match_format, compare_to_allowed_values,
181 gfc_match_open): Deal with wide strings.
182 * module.c (mio_expr): Convert between wide strings and ASCII ones.
183 * primary.c (match_hollerith_constant, match_charkind_name):
185 * resolve.c (build_default_init_expr): Likewise.
186 * scanner.c (gfc_wide_toupper, gfc_wide_memset,
187 gfc_char_to_widechar): New functions.
188 (wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
189 Changes in prototypes.
190 (gfc_define_undef_line, load_line, preprocessor_line,
191 include_line, load_file, gfc_read_orig_filename): Handle wide
193 * simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
194 gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
195 gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
196 gfc_simplify_repeat): Handle wide strings.
197 (wide_strspn, wide_strcspn): New helper functions.
198 (gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
200 * symbol.c (generate_isocbinding_symbol): Likewise.
201 * target-memory.c (size_character, gfc_target_expr_size,
202 encode_character, gfc_target_encode_expr, gfc_interpret_character,
203 gfc_target_interpret_expr): Handle wide strings.
204 * trans-const.c (gfc_conv_string_init): Lower wide strings to
206 (gfc_conv_constant_to_tree): Likewise.
207 * trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
208 * trans-io.c (gfc_new_nml_name_expr): Likewise.
209 * trans-stmt.c (gfc_trans_label_assign): Likewise.
211 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
213 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
214 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
215 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
216 with ATTRIBUTE_UNUSED.
218 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
220 * check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
221 * simplify.c (gfc_simplify_lgamma): Likewise.
223 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
225 * openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
227 * decl.c (gfc_match_kind_spec, gfc_match_type_spec,
228 gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
229 match_string_p, match_attr_spec, gfc_match_suffix,
230 match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
232 * gfortran.h (gfc_char_t): New type.
233 (gfc_linebuf): Make line member a gfc_char_t.
234 (locus): Make nextc member a gfc_char_t.
235 (gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
236 gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
237 gfc_peek_ascii_char, gfc_check_digit): New prototypes.
238 * error.c (print_wide_char): New function.
239 (show_locus): Use print_wide_char and gfc_wide_strlen.
240 * io.c (next_char): Use gfc_char_t type.
241 (match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
242 * match.c (gfc_match_parens, gfc_match_eos,
243 gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
244 gfc_match_intrinsic_op, gfc_match_char, gfc_match_return,
245 gfc_match_common): Likewise.
246 * match.h (gfc_match_special_char): Change prototype.
247 * parse.c (decode_specification_statement, decode_statement,
248 decode_omp_directive, next_free, next_fixed): Use
249 gfc_peek_ascii_char and gfc_next_ascii_char.
250 * primary.c (gfc_check_digit): Change name.
251 (match_digits, match_hollerith_constant, match_boz_constant,
252 match_real_constant, next_string_char, match_charkind_name,
253 match_string_constant, match_logical_constant_string,
254 match_complex_constant, match_actual_arg, match_varspec,
255 gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
257 * scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
258 gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
259 gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
260 wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
261 gfc_next_ascii_char, gfc_peek_ascii_char):
263 (next_char, gfc_define_undef_line, skip_free_comments,
264 gfc_next_char_literal, gfc_next_char, gfc_peek_char,
265 gfc_error_recovery, load_line, preprocessor_line, include_line,
266 load_file, gfc_read_orig_filename): Use gfc_char_t for source
267 characters and the {gfc_,}wide_* functions to manipulate wide
270 2008-05-06 Tobias Burnus <burnus@net-b.de>
273 * intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
274 * intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
275 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
276 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
277 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
279 2008-05-03 Janus Weil <jaydub66@gmail.com>
281 * misc.c (gfc_clear_ts): Set interface to NULL.
283 2008-05-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
286 * gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
287 gfc_expr value union. Add io_kind enum to here from io.c.
288 * io.c (gfc_free_dt): Free extra_comma.
289 (gfc_resolve_dt): If an extra comma was encountered and io_unit is type
290 BT_CHARACTER, resolve to format_expr and set default unit. Error if
291 io_kind is M_WRITE. (match_io): Match the extra comma and set new
292 pointer, extra_comma.
294 2008-05-01 Bud Davis <bdavis9659@sbcglobal.net>
297 * simplify.c (gfc_simplify_index): Check for direction argument
300 2008-05-01 Janus Weil <jaydub66@gmail.com>
302 * gfortran.h (struct gfc_symbol): Moving "interface" member to
303 gfc_typespec (plus fixing a small docu error).
304 * interface.c (gfc_procedure_use): Ditto.
305 * decl.c (match_procedure_decl): Ditto.
306 * resolve.c (resolve_specific_f0,
307 resolve_specific_f0, resolve_symbol): Ditto.
309 2008-04-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
311 * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
312 * intrinsic.h (gfc_check_selected_char_kind,
313 gfc_simplify_selected_char_kind): New prototypes.
314 * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
315 * trans.h (gfor_fndecl_sc_kind): New function decl.
316 * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
317 * arith.c (gfc_compare_with_Cstring): New function.
318 * arith.h (gfc_compare_with_Cstring): New prototype.
319 * check.c (gfc_check_selected_char_kind): New function.
320 * primary.c (match_string_constant, match_kind_param): Mark
321 symbols used as literal constant kind param as referenced.
322 * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
323 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
324 * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
325 * simplify.c (gfc_simplify_selected_char_kind): New function.
327 2008-04-28 Paul Thomas <pault@gcc.gnu.org>
330 * module.c (find_symbol): Do not return a result for a symbol
331 that has been renamed in another module.
333 2008-04-26 George Helffrich <george@gcc.gnu.org>
337 * trans-common.c (create_common): Add decl to function
338 chain (if inside one) to preserve identifier scope in debug output.
340 2008-04-25 Jan Hubicka <jh@suse.cz>
342 * trans-decl.c (trans_function_start): Update.
344 2008-04-25 Tobias Burnus <burnus@net-b.de>
345 Daniel Franke <franke.daniel@gmail.com>
348 * gfortranspec.c (lang_specific_driver): Deprecate
349 -M option; fix ICE when "-M" is last argument and
351 * options.c (gfc_handle_module_path_options):
352 Use -J instead of -M in error messages.
353 * invoke.texi: Mark -M as depecated.
355 2008-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
356 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
359 * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
362 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
364 * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
365 * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
366 (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
367 (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
368 (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
369 * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
370 (create_common): Don't set TREE_INVARIANT.
371 * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
372 * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
374 2008-04-21 Steve Ellcey <sje@cup.hp.com>
376 * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
378 2008-04-21 Daniel Franke <franke.daniel@gmail.com>
381 * gfortranspec.c (lookup_option): Properly handle separated arguments
382 in -J option, print missing argument message when necessary.
384 2008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
387 * scanner.c (skip_fixed_comments): Update continue_line when comment is
388 detected. (gfc_next_char_literal): Likewise.
390 2008-04-19 Paul Thomas <pault@gcc.gnu.org>
395 * trans_array.c (gfc_trans_array_constructor): Temporarily
396 realign loop, if loop->from is not zero, before creating
397 the temporary array and provide an offset.
400 * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
401 and allow for NULL body. Change all references from
402 init_default_dt to gfc_init_default_dt.
403 * trans.h : Add prototype for gfc_init_default_dt.
404 * trans-array.c (gfc_trans_deferred_vars): After nullification
405 call gfc_init_default_dt for derived types with allocatable
408 2008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
411 * trans-common.c (create_common): Revert patch causing regression.
413 2008-04-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
416 * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
417 optional argument attribute.
419 2008-04-16 Paul Thomas <pault@gcc.gnu.org>
422 * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
423 is not used, the argument must be converted.
425 2008-04-16 Jakub Jelinek <jakub@redhat.com>
428 * f95-lang.c (gfc_init_builtin_functions): Make sure
429 BUILT_IN_SINCOS{,F,L} types aren't varargs.
431 2008-04-15 Paul Thomas <pault@gcc.gnu.org>
434 * expr.c (scalarize_intrinsic_call): Reorder identification of
435 array argument so that if one is not found a segfault does not
436 occur. Return FAILURE if all scalar arguments.
438 2008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
439 Tobias Burnus <burnus@net-b.de>
442 * options.c (gfc_init_options): Set the default maximum continuation
443 lines to 255 for both free and fixed form source for warnings.
444 (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
445 the -std=f95 free form max continuations to 39 for warnings.
446 * scanner.c (gfc_next_char_literal): Adjust the current_line number only
447 if it is less than the current locus.
449 2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
451 PR fortran/25829 28655
452 * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
453 round, sign, and id. (match_open_element): Match new tags.
454 (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
455 for DEFAULT only. Update error messages. (match_dt_element): Fix match
456 tag for asynchronous. Update error messages. (gfc_free_inquire): Free
457 new expressions. (match_inquire_element): Match new tags.
458 (gfc_match_inquire): Add constraint for ID and PENDING.
459 (gfc_resolve_inquire): Resolve new tags.
460 * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
461 mask for ID parameter.
462 * ioparm.def: Fix order of parameters for pending, round, and sign.
463 NOTE: These must line up with the definitions in libgfortran/io/io.h. or
466 2008-04-06 Paul Thomas <pault@gcc.gnu.org>
469 * expr.c (scalarize_intrinsic_call): Identify which argument is
470 an array and use that as the template.
471 (check_init_expr): Remove tests that first argument is an array
472 in the call to scalarize_intrinsic_call.
474 2008-04-06 Tobias Schlüter <tobi@gcc.gnu.org>
477 * io.c (io_tag): Add field 'value'. Split 'spec' field in
479 (match_etag, match_vtag, match_ltag): Split parsing in two steps
480 to give better error messages.
482 2008-04-06 Tobias Burnus <burnus@net-b.de>
484 * io.c (check_io_constraints): Add constrains. ID= requires
485 asynchronous= and asynchronous= must be init expression.
487 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
489 * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
491 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
493 * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
494 gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
495 functions and make them static. Add new gfc_dump_parse_tree
497 * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
498 (gfc_status, gfc_status_char): Delete prototypes.
499 * error.c (gfc_status, gfc_status_char): Remove functions.
500 * scanner.c (gfc_new_file): Use printf instead of gfc_status.
501 * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
502 (gfc_handle_module_path_options): Use gfc_fatal_error instead of
504 (gfc_handle_option): Rename verbose into dump_parse_tree.
505 * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
507 2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
508 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
510 PR fortran/25829 28655
511 * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
512 * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
513 (gfc_open): Add pointers for decimal, encoding, round, sign,
514 asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
515 encoding, pending, round, sign, size, id.
516 (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
517 asynchronous, blank, decimal, delim, pad, round, sign.
518 (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
519 wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
520 * trans-stmt.h (gfc_trans_wait): New function prototype.
521 * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
522 * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
523 ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
524 (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
525 tags. (gfc_resolve_open): Remove comment around check for allowed
526 values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
527 ROUND, and SIGN. (match_dt_element): Add matching for new tags.
528 (gfc_free_wait): New function. (gfc_resolve_wait): New function.
529 (match_wait_element): New function. (gfc_match_wait): New function.
530 * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
531 (resolve_code): Add case for EXEC_WAIT.
532 * st.c (gfc_free_statement): Add case for EXEC_WAIT.
533 * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
534 Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
535 (gfc_build_io_library_fndecls): Add function declaration for st_wait.
536 (gfc_trans_open): Add mask bits for new I/O tags.
537 (gfc_trans_inquire): Add mask bits for new I/O tags.
538 (gfc_trans_wait): New translation function.
539 (build_dt): Add mask bits for new I/O tags.
540 * match.c (gfc_match_if) Add matcher for "wait".
541 * match.h (gfc_match_wait): Prototype for new function.
542 * ioparm.def: Add new I/O parameter definitions.
543 * parse.c (decode_statement): Add match for "wait" statement.
544 (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
546 2008-04-03 Jakub Jelinek <jakub@redhat.com>
549 * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
552 2008-04-03 Tom Tromey <tromey@redhat.com>
554 * Make-lang.in (fortran_OBJS): New variable.
556 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
558 * f95-lang.c (insert_block): Kill.
560 2008-04-01 George Helffrich <george@gcc.gnu.org>
562 PR fortran/35154, fortran/23057
563 * trans-common.c (create_common): Add decl to function
564 chain to preserve identifier scope in debug output.
566 2008-04-01 Joseph Myers <joseph@codesourcery.com>
568 * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
569 * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
572 2008-03-30 Paul Thomas <pault@gcc.gnu.org>
575 * resolve.c (resolve_function, resolve_call): If the procedure
576 is elemental do not look for noncopying intrinsics.
578 2008-03-29 Paul Thomas <pault@gcc.gnu.org>
581 * trans-array.c (gfc_array_init_size): Set 'size' zero if
582 negative in one dimension.
585 * trans-expr.c (gfc_trans_string_copy): Only assign a char
586 directly if the lhs and rhs types are the same.
588 2008-03-28 Daniel Franke <franke.daniel@gmail.com>
589 Paul Richard Thomas <paul.richard.thomas@gmail.com>
592 * primary.c (match_variable): Improved matching of function
594 * resolve.c (resolve_allocate_deallocate): Removed checks if
595 the actual argument for STAT is a variable.
597 2008-03-28 Tobias Burnus <burnus@net-b.de>
599 * symbol.c (gfc_get_default_type): Fix error message; option
600 -fallow_leading_underscore should be -fallow-leading-underscore
602 2008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
605 * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
606 optional argument attribute.
608 2008-03-27 Tom Tromey <tromey@redhat.com>
610 * Make-lang.in: Revert automatic dependency patch.
612 2008-03-25 Tom Tromey <tromey@redhat.com>
614 * Make-lang.in: Remove .o targets.
615 (fortran_OBJS): New variable.
616 (fortran/gfortranspec.o): Move to fortran/. Reduce to variable
618 (GFORTRAN_D_OBJS): Update.
619 (GFORTRAN_TRANS_DEPS): Remove.
621 2008-03-24 Paul Thomas <pault@gcc.gnu.org>
624 * resolve.c (resolve_structure_cons): It is an error to assign
625 NULL to anything other than a pointer or allocatable component.
628 * resolve.c (resolve_symbol): If the symbol is a derived type,
629 resolve the derived type. If the symbol is a derived type
630 function, ensure that the derived type is visible in the same
631 namespace as the function.
633 2008-03-23 Tobias Schlüter <tobi@gcc.gnu.org>
635 * trans.h: Use fold_build in build1_v, build2_v and build3_v
637 * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
638 Don't use build2_v macro.
640 2008-03-19 Daniel Franke <franke.daniel@gmail.com>
643 * interface.c (gfc_procedure_use): Check for keyworded arguments in
644 procedures without explicit interfaces.
646 2008-03-16 Paul Thomas <pault@gcc.gnu.org>
649 * resolve.c (check_assumed_size_reference): Only visit the
650 first reference and look directly at the highest dimension.
652 2008-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
655 * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
658 2008-03-15 Daniel Franke <franke.daniel@gmail.com>
661 * resolve.c (resolve_branch): Less strict and pessimistic warning
664 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
666 * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
667 (gfc_be_parse_file): Call clear_binding_stack from here.
668 (gfc_clear_binding_stack): Rename to clear_binding_stack.
670 2008-03-09 Paul Thomas <pault@gcc.gnu.org>
673 * module.c (mio_symtree_ref): After providing a symbol for a
674 missing equivalence member, resolve and NULL the fixups.
676 2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
678 * invoke.texi (Error and Warning Options): Document
681 2008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
684 * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
685 checking bounds of absent optional arguments.
687 2008-03-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
690 * intrinsic.c (add_functions): Add simplification routines for
691 ERF, DERF, ERFC and DERFC.
692 * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
693 extensions into Fortran 2008 features.
694 * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
696 * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
698 2008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
701 * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
702 ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
703 ERFC_SCALED, LOG_GAMMA and HYPOT.
704 * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
705 gfc_resolve_hypot): New prototypes.
706 * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
707 ACOSH, ASINH and ATANH available.
708 * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
709 * lang.opt: Add -std=f2008 option.
710 * libgfortran.h: Define GFC_STD_F2008.
711 * lang-specs.h: Add .f08 and .F08 file suffixes.
712 * iresolve.c (gfc_resolve_hypot): New function.
713 * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
714 * check.c (gfc_check_hypot): New function.
715 * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
716 * options.c (set_default_std_flags): Allow Fortran 2008 by default.
717 (form_from_filename): Add .f08 suffix.
718 (gfc_handle_option): Handle -std=f2008 option.
719 * simplify.c (gfc_simplify_hypot): New function.
720 * gfortran.texi: Document Fortran 2008 status and file extensions.
721 * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
722 as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
723 ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
724 * invoke.texi: Document the new -std=f2008 option.
726 2008-03-02 Jakub Jelinek <jakub@redhat.com>
728 * gfortranspec.c (lang_specific_driver): Update copyright notice
731 2008-02-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
734 * expr.c (find_array_element): Modify traversing the constructor to
735 avoid trying to access NULL memory pointed to by next for the
736 last element. (find_array_section): Exit while loop if cons->next is
738 * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
739 (gfc_conv_function_call): Same.
740 * decl.c (gfc_match_implicit): Same.
741 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
743 2008-02-28 Daniel Franke <franke.daniel@gmail.com>
748 * lang.opt: Added -Wreturn-type.
749 * options.c (gfc_handle_option): Recognize -Wreturn-type.
750 * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
751 where the result value is not set.
752 (gfc_generate_function_code): Likewise.
753 (generate_local_decl): Emit warnings for funtions whose RESULT
756 2008-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
759 * trans-expr.c (gfc_conv_variable): Don't build indirect
760 references when explicit interface is mandated.
761 * resolve.c (resolve_formal_arglist): Set attr.always_explicit
762 on the result symbol as well as the procedure symbol.
764 2008-02-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
767 * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
768 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
769 gfor_fndecl_math_exponent16.
770 * f95-lang.c (build_builtin_fntypes): Add new function types.
771 (gfc_init_builtin_functions): Add new builtins for nextafter,
772 frexp, ldexp, fabs, scalbn and inf.
773 * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
774 (gfc_resolve_scale): Don't convert type of second argument.
775 (gfc_resolve_set_exponent): Likewise.
776 (gfc_resolve_size): Don't add hidden arguments.
777 * trans-decl.c: Remove gfor_fndecl_math_exponent4,
778 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
779 gfor_fndecl_math_exponent16.
780 * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
781 for scalbn, fraction, nearest, rrspacing, set_exponent and
783 (gfc_conv_intrinsic_exponent): Directly call frexp.
784 (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
785 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
786 gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
788 (gfc_conv_intrinsic_function): Use the new functions above.
790 2008-02-26 Tobias Burnus <burnus@net-b.de>
793 * interface.c (check_operator_interface): Show better line for error
794 messages; fix constrains for user-defined assignment operators.
795 (gfc_extend_assign): Fix constrains for user-defined assignment
798 2008-02-26 Tom Tromey <tromey@redhat.com>
800 * trans-io.c (set_error_locus): Remove old location code.
801 * trans-decl.c (gfc_set_decl_location): Remove old location code.
802 * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
803 * scanner.c (gfc_gobble_whitespace): Remove old location code.
804 (get_file): Likewise.
805 (preprocessor_line): Likewise.
806 (load_file): Likewise.
807 (gfc_new_file): Likewise.
808 * trans.c (gfc_trans_runtime_check): Remove old location code.
809 (gfc_get_backend_locus): Likewise.
810 (gfc_set_backend_locus): Likewise.
811 * data.c (gfc_assign_data_value): Remove old location code.
812 * error.c (show_locus): Remove old location code.
813 * gfortran.h (gfc_linebuf): Remove old location code.
814 (gfc_linebuf_linenum): Remove old-location variant.
816 2008-02-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
819 * trans-const.c (gfc_build_string_const): Don't call gettext.
820 (gfc_build_localized_string_const): New function.
821 * trans-const.h (gfc_build_localized_string_const): New prototype.
822 * trans.c (gfc_trans_runtime_check): Use
823 gfc_build_localized_string_const instead of gfc_build_string_const.
824 (gfc_call_malloc): Likewise.
825 (gfc_allocate_with_status): Likewise.
826 (gfc_allocate_array_with_status): Likewise.
827 (gfc_deallocate_with_status): Likewise.
828 (gfc_call_realloc): Likewise.
829 * trans-io.c (gfc_trans_io_runtime_check): Likewise.
831 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
833 * arith.c: Update copyright years.
841 * dependency.c: Likewise.
842 * dependency.h: Likewise.
843 * dump-parse-tree.c: Likewise.
846 * gfc-internals.texi: Likewise.
847 * gfortran.h: Likewise.
848 * gfortran.texi: Likewise.
849 * gfortranspec.c: Likewise.
850 * interface.c: Likewise.
851 * intrinsic.c: Likewise.
852 * intrinsic.h: Likewise.
853 * intrinsic.texi: Likewise.
854 * invoke.texi: Likewise.
856 * iresolve.c: Likewise.
857 * iso-c-binding.def: Likewise.
858 * iso-fortran-env.def: Likewise.
859 * lang-specs.h: Likewise.
860 * lang.opt: Likewise.
861 * libgfortran.h: Likewise.
864 * matchexp.c: Likewise.
866 * module.c: Likewise.
867 * openmp.c: Likewise.
868 * options.c: Likewise.
871 * primary.c: Likewise.
872 * resolve.c: Likewise.
873 * scanner.c: Likewise.
874 * simplify.c: Likewise.
876 * symbol.c: Likewise.
877 * target-memory.c: Likewise.
878 * target-memory.h: Likewise.
879 * trans-array.h: Likewise.
880 * trans-const.h: Likewise.
881 * trans-stmt.h: Likewise.
882 * trans-types.c: Likewise.
883 * trans-types.h: Likewise.
884 * types.def: Likewise.
886 2008-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
889 * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
890 (gfc_simplify_ibset): Remove call to range_check.
891 (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
892 (gfc_simplify_real): Add call gfc_clear_ts to initialize the
893 temporary gfc_typspec variable.
895 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
897 * trans-array.c (gfc_conv_descriptor_data_get,
898 gfc_conv_descriptor_data_set_internal,
899 gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
900 gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
901 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
902 gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
903 gfc_conv_array_transpose, gfc_grow_array,
904 gfc_trans_array_constructor_subarray,
905 gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
906 gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
907 gfc_conv_array_initializer, gfc_trans_array_bounds,
908 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
909 gfc_get_dataptr_offset, gfc_conv_array_parameter,
910 gfc_trans_dealloc_allocated, get_full_array_size,
911 gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
913 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
914 gfc_conv_component_ref, gfc_conv_cst_int_power,
915 gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
916 * trans-common.c (create_common): Likewise.
917 * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
919 * trans-const.c (gfc_conv_constant_to_tree): Likewise.
920 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
921 gfc_trans_integer_select, gfc_trans_character_select,
922 gfc_trans_forall_loop, compute_overall_iter_number,
923 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
924 gfc_trans_deallocate): Likewise.
925 * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
926 gfc_allocate_with_status, gfc_allocate_array_with_status,
927 gfc_deallocate_with_status): Likewise.
928 * f95-lang.c (gfc_truthvalue_conversion): Likewise.
929 * trans-io.c (set_parameter_const, set_parameter_value,
930 set_parameter_ref, set_string, set_internal_unit, io_result,
931 set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
932 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
933 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
934 gfc_generate_function_code): Likewise.
935 * convert.c (convert): Likewise.
936 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
937 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
938 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
939 gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
940 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
941 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
942 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
943 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
944 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
945 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
946 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
947 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
948 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
949 gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
950 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
951 gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
952 gfc_conv_intrinsic_repeat): Likewise.
954 2008-02-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
957 * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
958 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
959 * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
960 gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
961 * trans-decl.c: Likewise.
963 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
966 * expr.c (find_array_element): Modify traversing the constructor to
967 avoid trying to access NULL memory pointed to by next for the
968 last element. (find_array_section): Exit while loop if cons->next is
971 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
974 * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
976 (gfc_resolve_aint): Likewise.
977 (gfc_resolve_anint): Likewise.
978 (gfc_resolve_besn): Likewise.
979 (gfc_resolve_cshift): Likewise.
980 (gfc_resolve_ctime): Likewise.
981 (gfc_resolve_eoshift): Likewise.
982 (gfc_resolve_index_func): Likewise.
983 (gfc_resolve_isatty): Likewise.
984 (gfc_resolve_malloc): Likewise.
985 (gfc_resolve_rrspacing): Likewise.
986 (gfc_resolve_scale): Likewise.
987 (gfc_resolve_set_exponent): Likewise.
988 (gfc_resolve_spacing): Likewise.
989 (gfc_resolve_spacing): Likewise.
990 (gfc_resolve_fgetc): Likewise.
991 (gfc_resolve_fputc): Likewise.
992 (gfc_resolve_ftell): Likewise.
993 (gfc_resolve_ttynam): Likewise.
994 (gfc_resolve_alarm_sub): Likewise.
995 (gfc_resolve_mvbits): Likewise.
996 (gfc_resolve_getarg): Likewise.
997 (gfc_resolve_signal_sub): Likewise.
998 (gfc_resolve_exit): Likewise.
999 (gfc_resolve_flush): Likewise.
1000 (gfc_resolve_free): Likewise.
1001 (gfc_resolve_ctime_sub): Likewise.
1002 (gfc_resolve_fgetc_sub): Likewise.
1003 (gfc_resolve_fputc_sub): Likewise.
1004 (gfc_resolve_fseek_sub): Likewise.
1005 (gfc_resolve_ftell_sub): Likewise.
1006 (gfc_resolve_ttynam_sub): Likewise.
1008 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1010 * gfc-internals.texi: Fix typos and markup nits.
1011 * gfortran.texi: Likewise.
1012 * intrinsic.texi: Likewise.
1014 2008-02-21 Richard Guenther <rguenther@suse.de>
1016 * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
1017 as unary PAREN_EXPR for real and complex typed expressions.
1018 (gfc_conv_unary_op): Fold the built tree.
1020 2008-02-20 Tobias Burnus <burnus@net-b.de>
1023 * match.c (gfc_match_name): Improve error message for '$'.
1025 2008-02-19 Daniel Franke <franke.daniel@gmail.com>
1028 * expr.c (gfc_check_pointer_assign): Add type and kind information
1029 to type-mismatch message.
1030 (gfc_check_assign): Unify error messages.
1032 2008-02-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1035 * gfortran.texi: Create new section for unimplemented extensions.
1036 Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
1037 Remove "smaller projects" list. Fix a few typos.
1039 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1041 * intrinsic.texi: Rename INDEX node to avoid clashing with
1042 index.html on case-insensitive systems.
1044 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1047 * trans-expr.c (gfc_conv_function_call): Force evaluation of
1050 2008-02-10 Daniel Franke <franke.daniel@gmail.com>
1053 * lang.opt: Allow '-J<dir>' next to '-J <dir>',
1054 likewise '-I <dir>' and '-I<dir>'.
1056 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1059 * Make-lang.in (f951): Add $(GMPLIBS).
1061 2008-02-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1064 * trans-common.c (build_field): Mark fields as volatile when needed.
1066 2008-02-05 Tobias Burnus <burnus@net-b.de>
1069 * data.c (gfc_assign_data_value): Only free "size" if
1070 it has not already been freed.
1072 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
1075 * array.c (match_array_element_spec): Remove check for negative
1077 (gfc_resolve_array_spec): Add check for negative size.
1079 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
1082 * data.c (gfc_assign_data_value): Add bounds check for array
1085 2008-02-04 Daniel Franke <franke.daniel@gmail.com>
1087 * resolve.c (resolve_where): Fix typo.
1088 (gfc_resolve_where_code_in_forall): Likewise.
1090 2008-02-03 Paul Thomas <pault@gcc.gnu.org>
1093 * resolve.c (resolve_allocate_deallocate): New function.
1094 (resolve_code): Call it for allocate and deallocate.
1095 * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
1096 the checking of the STAT tag and put in above new function.
1097 * primary,c (match_variable): Do not fix flavor of host
1098 associated symbols yet if the type is not known.
1100 2008-01-31 Paul Thomas <pault@gcc.gnu.org>
1103 * expr.c (gfc_check_assign): It is an error to assign
1104 to a sibling procedure.
1106 2008-01-30 Paul Thomas <pault@gcc.gnu.org>
1109 * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
1110 delete_symtree to gfc_delete_symtree.
1111 * gfortran.h : Add prototype for gfc_delete_symtree.
1112 * module.c (load_generic_interfaces): Transfer symbol to a
1113 unique symtree and delete old symtree, instead of renaming.
1114 (read_module): The rsym and the found symbol are the same, so
1115 the found symtree can be deleted.
1118 * decl.c (match_char_spec): Remove the constraint on deferred
1119 matching of functions and free the length expression.
1120 delete_symtree to gfc_delete_symtree.
1121 (gfc_match_type_spec): Whitespace.
1122 (gfc_match_function_decl): Defer characteristic association for
1123 all types except BT_UNKNOWN.
1124 * parse.c (decode_specification_statement): Only derived type
1125 function matching is delayed to the end of specification.
1127 2008-01-28 Tobias Burnus <burnus@net-b.de>
1130 * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
1132 2008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1135 * array.c (gfc_check_constructor_type): Revert clearing the expression.
1137 2008-01-26 Tobias Burnus <burnus@net-b.de>
1140 * trans-expr.c (gfc_conv_function_call): Don't call
1141 gfc_add_interface_mapping if the expression is NULL.
1143 2008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1146 * trans-array.c (gfc_trans_create_temp_array): Remove call to
1147 gcc_assert (integer_zerop (loop->from[n])).
1149 2008-01-25 Daniel Franke <franke.daniel@gmail.com>
1152 * resolve.c (resolve_where): Added check if user-defined assignment
1153 operator is an elemental subroutine.
1154 (gfc_resolve_where_code_in_forall): Likewise.
1156 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1160 * gfortran.h: Revert changes from 2008-01-17.
1161 * match.c: Likewise.
1162 * symbol.c: Likewise.
1163 (gfc_undo_symbols): Undo namespace changes related to common blocks.
1165 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1168 * data.c (formalize_structure_cons): Skip formalization on
1171 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1173 * gfortran.texi (OpenMP): Extended existing documentation.
1174 (contributors): Added major contributors of 2008 that were
1176 (proposed extensions): Removed implemented items.
1178 2008-01-24 Paul Thomas <pault@gcc.gnu.org>
1181 * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
1182 seen, check for a statement label and, if present, delete it
1183 and set the locus to the start of the statement.
1185 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
1188 * trans-io.c (gfc_trans_transfer): If the array reference in a
1189 read has a vector subscript, use gfc_conv_subref_array_arg to
1190 copy back the temporary.
1192 2008-01-22 Tobias Burnus <burnus@net-b.de>
1195 * interface.c (compare_actual_formal): Fix adding type
1196 to missing_arg_type for absent optional arguments.
1198 2008-01-22 Tobias Burnus <burnus@net-b.de>
1201 * parse.c (parse_spec): Change = into ==.
1203 2008-01-22 Daniel Franke <franke.daniel@gmail.com>
1206 * expr.c (check_elemental): Fix check for valid data types.
1208 2008-01-22 Tobias Burnus <burnus@net-b.de>
1211 * scanner.c (load_line): Support <tab><digit> continuation lines.
1212 * invoke.texi (-Wtabs): Document this.
1214 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
1217 * module.c (read_module): Set use_rename attribute.
1219 2007-01-21 Tobias Burnus <burnus@net-b.de>
1222 * interface.c (compare_parameter): Improved error message
1223 for arguments of same type and mismatched kinds.
1225 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
1228 * resolve.c (resolve_entries): Do not do an array bounds check
1229 if the result symbols are the same.
1232 * module.c (read_module) : Hide the symtree of the previous
1233 version of the symbol if this symbol is renamed.
1235 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
1238 * array.c (gfc_check_constructor_type): Clear the expression ts
1239 so that the checking starts from the deepest level of array
1241 * primary.c (match_varspec): If an unknown type is changed to
1242 default character and the attempt to match a substring fails,
1243 change it back to unknown.
1246 * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
1247 NULL for an array constructor, use the cl.length expression to
1249 (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
1252 2008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1256 * iresolve.c (gfc_resolve_all): Remove conversion of mask
1257 argument to kind=1 by removing call to resolve_mask_arg().
1258 (gfc_resolve_any): Likewise.
1260 2008-01-19 Tobias Burnus <burnus@net-b.de>
1263 * primary.c (match_variable): Handle FL_UNKNOWN without
1264 uneducated guessing.
1265 (match_variable): Improve error message.
1267 2008-01-18 Tobias Burnus <burnus@net-b.de>
1270 * interface.c (get_expr_storage_size): Return storage size
1271 for array element designators.
1272 (compare_actual_formal): Reject unequal string sizes for
1273 assumed-shape dummy arguments. And fix error message for
1274 array-sections with vector subscripts.
1276 2008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1279 * simplify.c (is_constant_array_expr): New static function that returns
1280 true if the given expression is an array and is constant.
1281 (gfc_simplify_reshape): Use new function.
1283 2008-01-17 H.J. Lu <hongjiu.lu@intel.com>
1286 * symbol.c (free_common_tree): Renamed to ...
1287 (gfc_free_common_tree): This. Remove static.
1288 (gfc_free_namespace): Updated.
1290 * gfortran.h (gfc_free_common_tree): New.
1292 * match.c (gfc_match_common): Call gfc_free_common_tree () with
1293 gfc_current_ns->common_root and set gfc_current_ns->common_root
1294 to NULL on syntax error.
1296 2008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
1299 * trans-expr.c (gfc_conv_function_call): Use proper
1300 type for returned character pointers.
1302 2008-01-17 Paul Thomas <pault@gcc.gnu.org>
1307 * decl.c : Remove gfc_function_kind_locus and
1308 gfc_function_type_locus. Add gfc_matching_function.
1309 (match_char_length): If matching a function and the length
1310 does not match, return MATCH_YES and try again later.
1311 (gfc_match_kind_spec): The same.
1312 (match_char_kind): The same.
1313 (gfc_match_type_spec): The same for numeric and derived types.
1314 (match_prefix): Rename as gfc_match_prefix.
1315 (gfc_match_function_decl): Except for function valued character
1316 lengths, defer applying kind, type and charlen info until the
1317 end of specification block.
1318 gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
1319 parse.c (decode_specification_statement): New function.
1320 (decode_statement): Call it when a function has kind = -1. Set
1321 and reset gfc_matching function, as function statement is being
1323 (match_deferred_characteristics): Simplify with a single call
1324 to gfc_match_prefix. Do appropriate error handling. In any
1325 case, make sure that kind = -1 is reset or corrected.
1326 (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
1327 Throw an error if kind = -1 after last specification statement.
1328 parse.h : Prototype for gfc_match_prefix.
1330 2008-01-16 Tobias Burnus <burnus@net-b.de>
1333 * interface.c (compare_parameter): Allow AS_DEFERRED array
1334 elements and reject attr.pointer array elemenents.
1335 (get_expr_storage_size): Return storage size of elements of
1336 assumed-shape and pointer arrays.
1338 2008-01-15 Sebastian Pop <sebastian.pop@amd.com>
1340 * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
1341 for flag_tree_parallelize_loops.
1343 2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1346 * iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
1347 (gfc_resolve_any): Likewise.
1348 (gfc_resolve_count): Likewise. Don't append kind of
1349 argument to function name.
1351 2008-01-13 Tobias Burnus <burnus@net-b.de>
1354 * resolve.c (resolve_actual_arglist): For expressions,
1355 also check for assume-sized arrays.
1356 * interface.c (compare_parameter): Move F2003 character checks
1357 here, print error messages here, reject elements of
1358 assumed-shape array as argument to dummy arrays.
1359 (compare_actual_formal): Update for the changes above.
1361 2008-01-13 Tobias Burnus <burnus@net-b.de>
1364 * decl.c (contained_procedure): Only check directly preceeding state.
1366 2008-01-13 Tobias Burnus <burnus@net-b.de>
1369 * check.c (gfc_check_shape): Accept array ranges of
1370 assumed-size arrays.
1372 2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1375 * match.c (gfc_match_name): Don't error if leading character is a '(',
1376 just return MATCH_NO.
1378 2008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1381 * trans-io.c (create_dummy_iostat): Commit the symbol.
1383 2008-01-11 Paul Thomas <pault@gcc.gnu.org>
1386 * simplify.c (gfc_simplify_transfer): Return NULL if the size
1387 of the element is unavailable and only assign character length
1388 to the result, if 'mold' is constant.
1390 2008-01-10 Paul Thomas <pault@gcc.gnu.org>
1393 * trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
1394 to assign strings and perform bounds checks on the string length.
1395 (get_array_ctor_strlen): Remove bounds checking.
1396 (gfc_trans_array_constructor): Initialize string length checking.
1397 * trans-array.h : Add prototype for gfc_trans_string_copy.
1399 2008-01-08 Richard Guenther <rguenther@suse.de>
1402 PR tree-optimization/34683
1403 * trans-types.c (gfc_get_array_type_bounds): Use an array type
1404 with known size for accesses if that is known.
1406 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
1409 * expr.c (find_array_element): Check that the array bounds are
1410 constant before using them. Use lower, as well as upper bound.
1411 (check_restricted): Allow implied index variable.
1413 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
1416 * trans_array.c (gfc_trans_deferred_array): Do not null the
1417 data pointer on entering scope, nor deallocate it on leaving
1418 scope, if the symbol has the 'save' attribute.
1421 * trans_decl.c (gfc_finish_var_decl): Derived types with
1422 allocatable components and an initializer must be TREE_STATIC.
1424 2008-01-07 Paul Thomas <pault@gcc.gnu.org>
1427 * module.c (write_generic): Rewrite completely.
1428 (write_module): Change call to write_generic.
1430 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1433 * scanner.c (load_line): Do not count ' ' as printable when checking for
1436 2008-01-06 Paul Thomas <pault@gcc.gnu.org>
1439 * module.c (load_needed): If the namespace has no proc_name
1440 give it the module symbol.
1442 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1445 * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
1446 the dummy variable expression, test for NULL, and pass the variable
1447 address to the called function.
1449 2007-01-06 Tobias Burnus <burnus@net-b.de>
1452 * match.c (gfc_match_common): Remove blank common in
1454 * resolve.c (resolve_common_vars): New function.
1455 (resolve_common_blocks): Move checks to resolve_common_vars
1456 and invoke that function.
1457 (resolve_types): Call resolve_common_vars for blank commons.
1459 2008-01-06 Tobias Burnus <burnus@net-b.de>
1462 * resolve.c (resolve_equivalence_derived): Reject derived types with
1463 default initialization if equivalenced with COMMON variable.
1465 2008-01-06 Tobias Burnus <burnus@net-b.de>
1468 * io.c (check_io_constraints): Disallow unformatted I/O for
1471 2008-01-06 Tobias Burnus <burnus@net-b.de>
1474 * resolve.c (resolve_formal_arglist): Reject dummy procedure in
1475 ELEMENTAL functions.
1477 2008-01-06 Tobias Burnus <burnus@net-b.de>
1480 * interface.c (compare_actual_formal): Reject parameter
1481 actual to intent(out) dummy.
1483 2008-01-04 Tobias Burnus <burnus@net-b.de>
1486 * primary.c (match_varspec): Gobble whitespace before