1 2007-08-27 Tobias Burnus <burnus@net-b.de>
3 * simplify.c (gfc_simplify_lgamma): Fix mpfr_lgamma call.
5 2007-08-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
8 * trans-io.c (create_dummy_iostat): New function to create a unique
9 dummy variable expression to use with IOSTAT.
10 (gfc_trans_inquire): Use the new function to pass unit number error info
11 to run-time library if a regular IOSTAT variable was not given.
13 2007-08-26 H.J. Lu <hongjiu.lu@intel.com>
15 * gfortran.h (gfc_isym_id): Add GFC_ISYM_GAMMA and
18 2007-08-26 Asher Langton <langton2@llnl.gov>
19 Tobias Burnus <burnus@net-b.de>
21 * gfortran.h (gfc_option_t): Add flag_recursive.
22 * lang.opt: Add -frecursive option and update -fopenmp.
23 * invoke.texi (-frecursive): Document new option.
24 (-fopenmp,-fno-automatic,-fmax-stack-var-size): Update.
25 * options.c (gfc_init_options, gfc_post_options,
26 gfc_handle_option): Add -frecursive and modify -fopenmp.
27 (gfc_post_options): Add warning for conflicting flags.
29 2007-08-26 Tobias Burnus <burnus@net-b.de>
32 * module.c (mio_symbol_ref,mio_interface_rest): Return pointer_info.
33 (load_operator_interfaces): Support multible loading of an operator.
35 2007-08-26 Tobias Burnus <burnus@net-b.de>
38 * match.c (gfc_match_common): Remove SEQUENCE diagnostics.
39 * resolve.c (resolve_common_blocks): Add SEQUENCE diagnostics;
40 fix walking through the tree.
42 2007-08-26 Tobias Burnus <burnus@net-b.de>
45 * intrinsic.h (gfc_simplify_gamma,gfc_simplify_lgamma,
46 gfc_resolve_gamma,gfc_resolve_lgamma): New function declations.
47 * mathbuiltins.def: Define GAMMA and LGAMMA.
48 * intrinsic.c (add_functions): Add GAMMA, DGAMMA, LGAMMA, ALGAMA
50 * simplify.c (gfc_simplify_gamma,gfc_simplify_lgamma): New functions.
51 * iresolve.c (gfc_resolve_gamma,gfc_resolve_lgamma): New functions.
52 * intrinsic.texi: Add documentation for GAMMA and LGAMMA.
54 2007-08-26 Tobias Burnus <burnus@net-b.de>
57 * parse.c (parse_derived): Support empty derived type
58 definitions for Fortran 2003.
60 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
62 * trans-openmp.c (gfc_omp_privatize_by_reference): Constify.
63 * trans.h (gfc_omp_privatize_by_reference): Likewise.
65 2007-08-24 Tobias Burnus <burnus@net-b.de>
68 * intrinsic.c (gfc_intrinsic_func_interface): Fix initialization
71 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org>
74 * iresolve.c: Don't convert array masks.
76 2007-08-24 Tobias Burnus <burnus@net-b.de>
79 * trans-array.c (gfc_conv_expr_descriptor): Copy bounds for
80 whole-array pointer assignments.
82 2007-08-23 Jakub Jelinek <jakub@redhat.com>
84 * decl.c (variable_decl): Don't share charlen structs if
86 * trans-decl.c (create_function_arglist): Assert
87 f->sym->ts.cl->backend_decl is NULL instead of unsharing
90 2007-08-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
93 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Remove
94 runtime error checking.
96 2007-08-22 Roger Sayle <roger@eyesopen.com>
97 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
99 * match.c (intrinsic_operators): Delete.
100 (gfc_match_intrinsic_op): Rewrite matcher to avoid calling
103 2007-08-22 Christopher D. Rickett <crickett@lanl.gov>
106 * resolve.c (gfc_iso_c_sub_interface): Remove setting of type and
107 kind for optional SHAPE parameter of C_F_POINTER.
109 2007-08-22 Janus Weil <jaydub66@gmail.com>
111 * decl.c (match_attr_spec): Pass on errors from gfc_match_bind_c.
112 (gfc_match_bind_c): Bugfix in check for NAME= with abstract interfaces.
113 (gfc_match_mopdproc): Bugfix to reject module procedures in
116 2007-08-22 Kai Tietz <kai.tietz@onevision.com>
118 * f95-lang.c: (gfc_init_decl_processing): Choose sizetype by using
121 2007-08-21 Paul Brook <paul@codesourcery.com>
122 Nathan Sidwell <nathan@codesourcery.com>
123 Mark Mitchell <mark@codesourcery.com>
124 Joseph Myers <joseph@codesourcery.com>
126 * gfortranspec.c (lang_specific_driver): Use pkgversion_string.
127 * Make-lang.in (gfortran.pod): Define BUGURL.
128 * invoke.texi: Use BUGURL for bug-reporting instructions.
130 2007-08-19 Roger Sayle <roger@eyesopen.com>
132 * match.c (intrinsic_operators): Make static.
133 (gfc_op2string): New function for converting a gfc_intrinsic_op to
134 to a "const char*", replacing the macro of the same name.
135 * gfortran.h (intrinsic_operators): Delete prototype.
136 (gfc_op2string): Replace macro with function prototype.
138 2007-08-18 Tobias Burnus <burnus@net-b.de>
140 * gfortran.h (gfc_is_intrinsic_typename): Add declaration.
141 * symbol.c (gfc_is_intrinsic_typename): New function.
142 * parse.c (decode_statement): Check for space in ABSTRACT INTERFACE.
143 (parse_interface): Use gfc_is_intrinsic_typename.
144 * decl.c (gfc_match_derived_decl): Ditto.
145 * module.c (gfc_match_use): Use gcc_unreachable() for
146 INTERFACE_ABSTRACT in switch().
148 2007-08-18 Roger Sayle <roger@eyesopen.com>
150 * primary.c (match_logical_constant_string): New function to match
151 a ".true." or a ".false.".
152 (match_logical_constant): Use it instead of gfc_match_strings.
154 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
155 Janus Weil <jaydub66@gmail.com>
157 * interface.c (gfc_match_interface,gfc_match_abstract_interface,
158 gfc_match_end_interface,gfc_add_interface): Add abstract interface.
159 * dump-parse-tree.c (gfc_show_attr): Ditto.
160 * gfortran.h (interface_type,symbol_attribute): Ditto.
161 * module.c (gfc_match_use,ab_attribute,attr_bits,
162 mio_symbol_attribute): Ditto.
163 * resolve.c (resolve_function): Ditto.
165 * parse.c (decode_statement): Ditto.
166 (parse_interface): Ditto, check for C1203 (name of abstract interface
167 cannot be the same as an intrinsic type).
168 * decl.c (gfc_match_bind_c): Check for NAME= with abstract interfaces.
169 (access_attr_decl): Handle Abstract interfaces.
171 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
174 * expr.c (gfc_check_pointer_assign): If the rhs is the
175 initialization expression for the rhs, there is no error.
177 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
180 * trans-array.c (get_array_ctor_strlen): Set the character
181 length of a zero length array to zero.
183 2007-08-16 Tobias Burnus <burnus@net-b.de>
186 * module.c (gfc_match_use): Mark user operators as such.
187 (find_use_name_n): Distinguish between operators and other symbols.
188 (find_use_name,number_use_names,mio_namelist,
189 load_operator_interfaces,load_generic_interfaces,read_module,
190 write_generic): Update find_use_name_n calls.
192 2007-08-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
195 * trans.c (gfc_create_var_np): Do not emit warnings for
198 2007-08-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
201 * decl.c (gfc_get_type_attr_spec): Fix whitespace.
202 (gfc_match_derived_decl): Fix logic.
204 2007-08-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
207 * trans-intrinsic.c (build_fixbound_expr): Convert to result type
210 2007-08-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
213 * trans-expr.c (gfc_conv_substring_expr): Only call
214 gfc_conv_substring if expr->ref is not NULL.
215 * expr.c (gfc_is_constant_expr): If e->ref is NULL, the substring
216 expression might be a constant.
217 (gfc_simplify_expr): Handle missing start and end, as well as
220 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
223 * match.c (gfc_match_call): Do not create a new symtree in the
224 case where the existing symbol is external and not referenced.
226 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
229 * decl.c (variable_decl): Check for an imported symbol
230 by looking for its symtree and testing for the imported
232 (gfc_match_import): Remove change of symbol's namespace
233 and set the attribute imported instead.
234 * symbol.c (gfc_get_sym_tree): It is not an error if a
236 * gfortran.h : Add the 'imported' to symbol_attribute.
238 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
241 * trans-array.c (gfc_conv_array_transpose): Set the offset
242 of the destination to zero if the loop is zero based.
244 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
247 * intrinsic.c (add_functions): Add optional KIND argument to ACHAR.
248 * iresolve.c (gfc_resolve_achar): Handle the KIND argument.
249 * check.c (gfc_check_achar): Check for the optional KIND argument.
250 * simplify.c (gfc_simplify_achar): Use KIND argument.
251 * intrinsic.h (gfc_check_achar, gfc_simplify_achar,
252 gfc_resolve_achar): Adjust prototypes.
254 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
258 * trans-expr.c (gfc_conv_function_call): When no formal argument
259 list is available, we still substitute missing optional arguments.
260 * check.c (gfc_check_random_seed): Correct the check on the
261 number of arguments to RANDOM_SEED.
262 * intrinsic.c (add_subroutines): Add a resolution function to
264 * iresolve.c (gfc_resolve_random_seed): New function.
265 * intrinsic.h (gfc_resolve_random_seed): New prototype.
267 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
270 * error.c (error_uinteger): New function.
271 (error_integer): Call error_uinteger.
272 (error_print): Handle %u, %lu, %li and %ld format specifiers.
273 * interface.c (compare_actual_formal): Use the new %lu specifier.
275 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
278 * lang.opt (-fmodule-private): New option.
279 * gfortran.h (gfc_option_t): Add flag_module_private member.
280 * invoke.texi (-fmodule-private): Document the new option.
281 * module.c (gfc_check_access): Allow the -fmodule-private option
282 to modify the default behaviour.
283 * options.c (gfc_init_options): Initialize flag_module_private.
284 (gfc_handle_option): Handle -fmodule-private.
286 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
289 * intrinsic.c (add_functions): Add KIND arguments to COUNT,
290 IACHAR, ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND
292 * iresolve.c (gfc_resolve_count): Add kind argument.
293 (gfc_resolve_iachar): New function.
294 (gfc_resolve_ichar): Add kind argument.
295 (gfc_resolve_index_func): Likewise.
296 (gfc_resolve_lbound): Likewise.
297 (gfc_resolve_len): Likewise.
298 (gfc_resolve_len_trim): Likewise.
299 (gfc_resolve_scan): Likewise.
300 (gfc_resolve_size): New function.
301 (gfc_resolve_ubound): Add kind argument.
302 (gfc_resolve_verify): Likewise.
303 * trans-decl.c (gfc_get_extern_function_decl): Allow specific
304 intrinsics to have 4 arguments.
305 * check.c (gfc_check_count): Add kind argument.
306 (gfc_check_ichar_iachar): Likewise.
307 (gfc_check_index): Likewise.
308 (gfc_check_lbound): Likewise.
309 (gfc_check_len_lentrim): New function.
310 (gfc_check_scan): Add kind argument.
311 (gfc_check_size): Likewise.
312 (gfc_check_ubound): Likewise.
313 (gfc_check_verify): Likewise.
314 * intrinsic.texi: Update documentation for COUNT, IACHAR, ICHAR,
315 INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND and VERIFY.
316 * simplify.c (get_kind): Whitespace fix.
317 (int_expr_with_kind): New function.
318 (gfc_simplify_iachar): Add kind argument.
319 (gfc_simplify_iachar): Likewise.
320 (gfc_simplify_ichar): Likewise.
321 (gfc_simplify_index): Likewise.
322 (simplify_bound_dim): Likewise.
323 (simplify_bound): Likewise.
324 (gfc_simplify_lbound): Likewise.
325 (gfc_simplify_len): Likewise.
326 (gfc_simplify_len_trim): Likewise.
327 (gfc_simplify_scan): Likewise.
328 (gfc_simplify_shape): Pass NULL as kind argument to gfc_simplify_size.
329 (gfc_simplify_size): Add kind argument.
330 (gfc_simplify_ubound): Likewise.
331 (gfc_simplify_verify): Likewise.
332 * intrinsic.h: Update prototypes and add new ones.
333 * trans-intrinsic.c (gfc_conv_intrinsic_index): Rename into
334 gfc_conv_intrinsic_index_scan_verify.
335 (gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove.
336 (gfc_conv_intrinsic_function): Call
337 gfc_conv_intrinsic_index_scan_verify to translate the INDEX,
338 SCAN and VERIFY intrinsics.
340 2007-08-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
343 * invoke.texi (-fbacktrace): Document the new behaviour.
345 2007-08-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
348 * trans-array.c (gfc_conv_expr_descriptor): Use
349 gfc_conv_const_charlen to generate backend_decl of right type.
350 * trans-expr.c (gfc_conv_expr_op): Use correct return type.
351 (gfc_build_compare_string): Use int type instead of default
352 integer kind for single character comparison.
353 (gfc_conv_aliased_arg): Give backend_decl the right type.
354 * trans-decl.c (gfc_build_intrinsic_function_decls): Make
355 compare_string return an int.
357 2007-08-11 Ian Lance Taylor <iant@google.com>
359 * f95-lang.c (gfc_get_alias_set): Change return type to
362 2007-08-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
365 * trans.c (gfc_trans_runtime_check): Reorder arguments and
366 add extra variable arguments. Hand them to the library function.
367 * trans.h (gfc_trans_runtime_check): Update prototype.
368 * trans-array.c (gfc_trans_array_bound_check): Issue more
369 detailled error messages.
370 (gfc_conv_array_ref): Likewise.
371 (gfc_conv_ss_startstride): Likewise.
372 (gfc_trans_dummy_array_bias): Reorder arguments to
373 gfc_trans_runtime_check.
374 * trans-expr.c (gfc_conv_substring): Issue more detailled
376 (gfc_conv_function_call): Reorder arguments to gfc_trans_runtime_check.
377 * trans-stmt.c (gfc_trans_goto): Likewise.
378 * trans-io.c (set_string): Reorder arguments to
379 gfc_trans_runtime_check and issue a more detailled error message.
380 * trans-decl.c (gfc_build_builtin_function_decls): Make
381 runtime_error and runtime_error_at handle a variable number of
383 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Reorder arguments
384 to gfc_trans_runtime_check.
385 (gfc_conv_intrinsic_minmax): Likewise.
386 (gfc_conv_intrinsic_repeat): Issue more detailled error messages.
388 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
390 * gfortranspec.c (lang_specific_driver): Use CONST_CAST.
391 * options.c (gfc_post_options): Likewise.
392 * parse.c (parse_omp_structured_block): Likewise.
393 * st.c (gfc_free_statement): Likewise.
395 2007-08-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
398 * trans-decl.c (gfc_build_builtin_function_decls): Change
399 prototype for associated.
400 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert the
401 result of __builtin_isnan into a boolean.
402 (gfc_conv_intrinsic_strcmp): Cleanup.
403 (gfc_conv_associated): Convert the result of the associated
404 function into a boolean.
406 2007-08-09 Tobias Burnus <burnus@net-b.de>
409 * io.c (format_token): Add FMT_ERROR.
410 (next_char_not_space): Print error/warning when
411 '\t' are used in format specifications.
412 (format_lex): Propagate error.
413 (check_format): Ditto.
415 2007-08-09 Tobias Burnus <burnus@net-b.de>
418 * arith.c (arith_error): Point in the error message
421 2007-08-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
424 * intrinsic.texi (SIZEOF): Add mention to C_SIZE_T.
426 2007-08-06 Christopher D. Rickett <crickett@lanl.gov>
429 * trans-expr.c (gfc_conv_scalar_char_value): Convert the tree and
430 actual arg expressions for scalar characters passed by-value to
432 (gfc_conv_function_call): Call gfc_conv_scalar_char_value.
433 * trans.h: Add prototype for gfc_conv_scalar_char_value.
434 * trans-decl.c (generate_local_decl): Convert by-value character
435 dummy args of bind(c) procedures using
436 gfc_conv_scalar_char_value.
438 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
441 * iresolve.c (gfc_resolve_alarm_sub): Suffix the subroutine name
442 with the kind of the STATUS argument.
444 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
447 * intrinsic.c (add_functions): Fix name of argument to CHDIR.
449 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
452 * iresolve.c (gfc_resolve_exit): Convert argument to default
455 2007-08-06 Daniel Franke <franke.daniel@gmail.com>
457 * resolve.c (derived_pointer): Removed, replaced callers by access
458 to appropiate attribute bit.
459 (derived_inaccessable): Shortcut recursion depth.
460 (resolve_fl_namelist): Fixed checks for private components in namelists.
462 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
465 * trans.h (gfor_fndecl_string_minmax): New prototype.
466 * trans-decl.c (gfor_fndecl_string_minmax): New variable.
467 (gfc_build_intrinsic_function_decls): Create gfor_fndecl_string_minmax.
468 * check.c (gfc_check_min_max): Allow for character arguments.
469 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): New function.
470 (gfc_conv_intrinsic_function): Add special case for MIN and MAX
471 intrinsics with character arguments.
472 * simplify.c (simplify_min_max): Add simplification for character
475 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
478 * invoke.texi: Adjust documentation for option -fsyntax-only.
480 2007-08-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
481 Tobias Burnus <burnus@gcc.gnu.org>
484 * intrinsic.h (gfc_check_isnan): Add prototype.
485 * gfortran.h (gfc_isym_id): Add GFC_ISYM_ISNAN.
486 * intrinsic.c (add_functions): Add ISNAN intrinsic.
487 * check.c (gfc_check_isnan): New function.
488 * trans-intrinsic.c (gfc_conv_intrinsic_isnan): New function.
489 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_isnan
491 * intrinsic.texi: Document ISNAN.
493 2007-08-04 Paul Thomas <pault@gcc.gnu.org>
496 * symbol.c (get_unique_symtree): Moved from module.c.
497 * module.c (get_unique_symtree): Moved to symbol.c.
498 * decl.c (get_proc_name): Transfer the typespec from the local
499 symbol to the module symbol, in the case that an entry is also
500 a module procedure. Ensure the local symbol is cleaned up by
501 pointing to it with a unique symtree.
503 * dump_parse_tree (gfc_show_code_node): Add EXEC_ASSIGN_CALL.
505 2008-08-04 Steven G. Kargl <kargl@gcc.gnu.org>
508 * iresolve.c (gfc_resolve_rrspacing): Convert argument(s) to
510 (gfc_resolve_scale): Ditto.
511 (gfc_resolve_set_exponent): Ditto.
512 (gfc_resolve_spacing): Ditto.
515 * trans-intrinsic.c (gfc_conv_intrinsic_si_kind,
516 gfc_conv_intrinsic_sr_kind): Convert the argument(s) to the
517 expected KIND, and fold the result to the expected KIND.
519 2007-08-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
522 * f95-lang.c (gfc_init_builtin_functions): Defin builtins for
523 lround{f,,l} and llround{f,,l}.
524 * trans-intrinsic.c (build_fix_expr): Generate calls to the
525 {l,}round{f,,l} functions.
527 2007-08-01 Thomas Koenig <tkoenig@gcc.gnu.org>
530 * intrinsic.c (resolve_mask_arg): New function.
531 (gfc_resolve_maxloc): Use resolve_mask_arg for mask resolution.
532 (gfc_resolve_maxval): Likewise.
533 (gfc_resolve_minloc): Likewise.
534 (gfc_resolve_minval): Likewise.
535 (gfc_resolve_pack): Likewise.
536 (gfc_resolve_product): Likewise.
537 (gfc_resolve_sum): Likewise.
538 (gfc_resolve_unpack): Likewise.
540 2007-08-01 Tobias Burnus <burnus@net-b.de>
543 * match.c (gfc_match_allocate): Better check that STAT is
546 * check.c (gfc_check_allocated): Reorder checks to improve
549 2007-08-01 Nick Clifton <nickc@redhat.com>
551 * arith.c: Change copyright header to refer to version 3 of the
552 GNU General Public License and to point readers at the COPYING3
553 file and the FSF's license web page.
554 * openmp.c, interface.c, intrinsic.c, trans-array.c, trans-expr.c,
555 symbol.c, iso-fortran-env.def, intrinsic.h, decl.c, trans-array.h,
556 matchexp.c, dump-parse-tree.c, trans-common.c, array.c,
557 Make-lang.in, trans-openmp.c, gfortran.h, error.c,
558 iso-c-binding.def, lang.opt, data.c, trans-const.c, trans-stmt.c,
559 expr.c, trans-const.h, trans-stmt.h, module.c, trans.c, scanner.c,
560 trans-types.c, trans.h, gfortranspec.c, trans-types.h,
561 lang-specs.h, io.c, bbt.c, resolve.c, f95-lang.c, st.c,
562 iresolve.c, match.c, trans-decl.c, trans-io.c, target-memory.c,
563 match.h, target-memory.h, parse.c, arith.h, check.c, dependency.c,
564 parse.h, types.def, convert.c, dependency.h, primary.c,
565 trans-intrinsic.c, options.c, misc.c, simplify.c: Likewise.
567 2007-08-01 Daniel Franke <franke.daniel@gmail.com>
569 * trans-decl.c (generate_local_decl): Emit warning on unused parameter
570 on "-Wall -Wextra" or "-Wunused-parameter" but not on "-Wall", changed
571 messages that start with lower case to upper case.
572 * invoke.texi (-Wparameter-unused): Document differences between gcc
573 and gfortran regarding this option.
575 2007-08-01 Daniel Franke <franke.daniel@gmail.com>
578 * expr.c (check_specification_function): Skip check if no symtree
581 2007-08-01 Paul Thomas <pault@gcc.gnu.org>
584 * resolve.c (resolve_entries): Entries declared to be module
585 procedures must point to the function namespace.
587 2007-07-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
590 * trans-stmt.c (gfc_trans_return): Convert to correct type.
592 2007-07-31 Steven G. Kargl <kargl@gcc.gnu.org>
595 * trans-intrinsic.c (gfc_conv_intrinsic_exponent): Convert to correct
598 2007-07-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
600 * invoke.texi: Document -fsign-zero flag.
602 2007-07-29 Paul Thomas <pault@gcc.gnu.org>
605 * trans-expr.c (gfc_conv_expr_reference): Add block for case of
606 scalar pointer functions so that NULL result is correctly
610 * trans-array.c (gfc_trans_array_constructor): On detecting a
611 multi-dimensional parameter array, set the loop limits.
613 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
616 * resolve.c (resolve_fl_parameter): Check for constant shape arrays,
617 adjusted error message.
619 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
621 * invoke.texi: Removed -w from option summary.
623 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
626 * intrinsic.texi (IRAND, RAND, RANDOM_NUMBER): Document algorithm
627 used for random number generator.
629 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
631 * gfortran.h, interface.c, resolve.c, symbol.c: Fix comment
633 * intrinsic.texi, invoke.texi: Fix typos.
635 2007-07-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
638 * resolve.c (generic_sym): Check for a same symbol and if so, return to
639 avoid infinite recursion.
641 2007-07-28 Daniel Franke <franke.daniel@gmail.com>
646 * gfortran.h (symbol_attribute): Added bits for pointer_comp,
648 * parse.c (parse_derived): Set pointer_comp/private_comp bits if
649 the derived type ultimately contains pointer components or private
651 * module.c (ab_attribute): New values AB_POINTER_COMP, AB_PRIVATE_COMP.
652 (attr_bits): Added names for new ab_attributes.
653 (mio_symbol_attribute): Save/restore new attribute bits in modules.
654 * match.c (gfc_match_namelist): Removed check for namelist objects
656 * resolve.c (resolve_fl_namelist): Added check for pointer or
657 private components in nested types. Added check for namelist objects
660 2007-07-28 Paul Thomas <pault@gcc.gnu.org>
663 * trans-expr.c (gfc_trans_scalar_assign): Revert to fixed order
664 for lse and rse pre expressions, for derived types with
665 allocatable components. Instead, assign the lhs to a temporary
666 and deallocate after the assignment.
668 2007-07-28 Janne Blomqvist <jb@gcc.gnu.org>
671 * trans-stmt.c (gfc_trans_character_select): Replace occurrences
672 of gfc_c_int_type_node with integer_type_node.
673 * trans-decl.c (gfc_build_intrinsic_function_decls): Likewise.
674 (gfc_build_builtin_function_decls): Likewise.
675 (gfc_generate_function_code): Likewise.
676 * trans-io.c (gfc_build_io_library_fndecls): Likewise.
678 2007-07-27 Janne Blomqvist <jb@gcc.gnu.org>
680 * trans-decl.c (gfc_build_builtin_function_decls): Use existing
681 gfc_array_index_type rather than creating another typenode for
682 gfc_index_integer_kind.
684 2007-07-27 Janne Blomqvist <jb@gcc.gnu.org>
686 * trans-io.c (gfc_build_io_library_fndecls): Change to use
687 gfc_array_index_type for array descriptor triplets instead of
690 2007-07-26 Steven G. Kargl <kargl@gcc.gnu.org>
693 * resolve.c (resolve_operator): Add INTRINSIC_EQ_OS comparison.
695 2007-07-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
696 Daniel Franke <franke.daniel@gmail.com>
699 * primary.c (match_variable): Do not call gfc_add_flavor if symbol has
700 attribute of ACCESS_PUBLIC or ACCESS_PRIVATE already marked.
702 2007-07-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
705 * trans-stmt.c (gfc_trans_character_select): Replace the
706 mechanism with labels by a SWITCH_EXPR.
707 * trans-decl.c (gfc_build_builtin_function_decls): Change
708 return type for select_string.
710 2007-07-27 Paul Thomas <pault@gcc.gnu.org>
713 * trans-decl.c (gfc_trans_deferred_vars): Set intent(out)
714 derived types as referenced, if they have the the default
717 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
719 * gfortran.h (generate_isocbinding_symbol): Constify.
720 * symbol.c (gen_special_c_interop_ptr, gen_cptr_param,
721 generate_isocbinding_symbol): Likewise.
723 2007-07-24 Paul Thomas <pault@gcc.gnu.org>
727 * trans-expr.c (gfc_conv_function_call): Remove the default
728 initialization of intent(out) derived types.
729 * symbol.c (gfc_lval_expr_from_sym): New function.
730 * matchexp.c (gfc_get_parentheses): Return argument, if it is
731 character and posseses a ref.
732 * gfortran.h : Add prototype for gfc_lval_expr_from_sym.
733 * resolve.c (has_default_initializer): Move higher up in file.
734 (resolve_code): On detecting an interface assignment, check
735 if the rhs and the lhs are the same symbol. If this is so,
736 enclose the rhs in parenetheses to generate a temporary and
737 prevent any possible aliasing.
738 (apply_default_init): Remove code making the lval and call
739 gfc_lval_expr_from_sym instead.
740 (resolve_operator): Give a parentheses expression a type-
741 spec if it has no type.
742 * trans-decl.c (gfc_trans_deferred_vars): Apply the a default
743 initializer, if any, to an intent(out) derived type, using
744 gfc_lval_expr_from_sym and gfc_trans_assignment. Check if
745 the dummy is present.
747 2007-07-24 Daniel Franke <franke.daniel@gmail.com>
750 * expr.c (check_init_expr): Simplify matched functions.
752 2007-07-24 Daniel Franke <franke.daniel@gmail.com>
755 * intrinsic.c (add_sym): Do not exclude any symbols, even if not part
756 of the selected standard.
757 (make generic): Likewise.
758 (make alias): Likewise, set standard the alias belongs to.
759 (add_subroutines): Call make_noreturn unconditionally.
760 (check_intrinsic_standard): Change return value to try.
761 (gfc_intrinsic_func_interface): Check return value of above function.
762 (gfc_intrinsic_sub_interface): Likewise.
764 2007-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
767 * trans-decl.c (generate_function_code): Add argument
768 for flag_bounds_check to the array for set_options.
769 * invoke.texi (-fbounds-check): Document new libarary run-time
772 2007-07-23 Daniel Franke <franke.daniel@gmail.com>
776 * expr.c (check_transformational): Reject valid transformational
777 intrinsics to avoid ICE.
778 (check_inquiry): Report error for assumed character lengths for
779 all supported standards.
780 (check_init_expr): Whitespace fix.
782 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
786 * decl.c (verify_bind_c_sym): Use the result symbol for functions
787 with a result clause. Warn if implicitly typed. Verify the type
788 and rank of the SHAPE argument, if given.
789 * resolve.c (gfc_iso_c_sub_interface): Use gfc_procedure_use to
790 check the actual args against the formal, sorting them if
792 * symbol.c (gen_shape_param): Initialize type of SHAPE param to
795 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
798 * trans-decl.c (generate_local_decl): Convert the TREE_TYPE for by
799 value character dummy args of BIND(C) procedures.
800 * trans-expr.c (gfc_conv_variable): Do not build address
801 expression for BT_CHARACTER dummy args.
803 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
804 Tobias Burnus <burnus@net-b.de>
807 * trans-expr.c (gfc_conv_function_call): Handle c_funloc.
808 * trans-types.c: Add pfunc_type_node.
809 (gfc_init_types,gfc_typenode_for_spec): Use it.
810 * resolve.c (gfc_iso_c_func_interface): Fix whitespace and
811 improve error message.
813 2007-07-22 Daniel Franke <franke.daniel@gmail.com>
816 * parse.c (gfc_fixup_sibling_symbols): No replacement of symbols if
817 the current is a namelist.
819 2007-07-22 Daniel Franke <franke.daniel@gmail.com>
825 * gfortran.h (gfc_intrinsic_sym): Changed members elemental, pure,
826 generic, specific, actual_ok, noreturn into bits of a bitfield,
827 added bits for inquiry, transformational, conversion.
828 * check.c (non_init_transformational): Removed, removed all callers.
829 * intrinsic.c (enum class): New.
830 (add_sym*): Replaced argument elemetal by enum class. Changed all
832 (add_functions): Assign appropriate classes to intrinsic functions.
833 (add_subroutines): Assign appropriate classes to intrinsic subroutines.
834 (add_conv): Set conversion attribute.
835 (gfc_init_expr_extensions): Removed, removed all callers.
836 (gfc_intrinsic_func_interface): Reimplemented check for non-standard
837 initializatione expressions.
838 * expr.c (check_specification_function): New.
839 (gfc_is_constant_expr): Added check for specification functions.
840 (check_init_expr_arguments): New.
841 (check_inquiry): Changed return value to MATCH, added checks for
842 inquiry functions defined by F2003.
843 (check_transformational): New.
845 (check_elemental): New.
846 (check_conversion): New.
847 (check_init_expr): Call new check functions, add more specific error
850 2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
853 * resolve.c (set_name_and_label): Set kind number for character
854 version of c_f_pointer.
855 (gfc_iso_c_sub_interface): Set the kind of the SHAPE formal arg to
856 that of the actual SHAPE arg.
857 * symbol.c (gen_shape_param): Initialize kind for SHAPE arg.
859 2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
862 * symbol.c (generate_isocbinding_symbol): Remove unnecessary
866 * resolve.c (gfc_iso_c_func_interface): Reject assumed-shape and
867 deferred-shape arrays as args to C_LOC. Fix bug in testing
868 character args to C_LOC.
870 2007-07-21 Lee Millward <lee.millward@gmail.com>
873 * trans-intrinsic.c (gfc_conv_intrinsic_int): Evaluate all
874 arguments passed, not just the first one. Adjust code to
875 refer to "args[0]" instead of "arg" as a result.
877 2007-07-19 Christopher D. Rickett <crickett@lanl.gov>
880 * trans-expr.c (gfc_conv_function_call): Inline C_LOC.
882 2007-07-18 Christopher D. Rickett <crickett@lanl.gov>
885 * symbol.c (generate_isocbinding_symbol): Fix bug where
886 ISOCBINDING_FUNPTR was generated for C_LOC instead of the needed
889 2007-07-17 Janus Weil <jaydub66@gmail.com>
892 * resolve.c (resolve_fl_namelist): Check for namelist private
893 components in contained subprograms.
895 2007-07-17 Paul Thomas <pault@gcc.gnu.org>
899 * trans-expr.c (gfc_trans_subcomponent_assign): Ensure that
900 renormalization unity base is done independently of existing
902 (gfc_trans_scalar_assign): If rhs is not a variable, put
903 lse->pre after rse->pre to ensure that de-allocation of lhs
904 occurs after evaluation of rhs.
906 2007-07-16 Lee Millward <lee.millward@gmail.com>
911 * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
912 to operate on a stack allocated array for the intrinsic arguments
913 instead of creating a TREE_LIST. Add two new parameters for the
914 array and the number of elements. Update all callers to allocate
915 an array of the correct length to pass in. Update comment.
916 (gfc_intrinsic_argument_list_length): New function.
917 (gfc_conv_intrinsic_conversion): Call it.
918 (gfc_conv_intrinsic_mnimax): Likewise.
919 (gfc_conv_intrinsic_merge): Likewise.
920 (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
922 (gfc_conv_intrinsic_cmplx): Likewise.
923 (gfc_conv_intrinsic_ctime): Likewise.
924 (gfc_covn_intrinsic_fdate): Likewise.
925 (gfc_conv_intrinsic_ttynam): Likewise.
926 (gfc_conv_intrinsic_ishftc): Likewise.
927 (gfc_conv_intrinsic_index): Likewise.
928 (gfc_conv_intrinsic_scan): Likewise.
929 (gfc_conv_intrinsic_verify): Likewise.
930 (gfc_conv_intrinsic_trim): Likewise.
931 (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
932 (gfc_conv_intrinsic_exponent): Likewise.
933 (gfc_conv_intrinsic_bound): Likewise.
934 (gfc_conv_intrinsic_abs): Likewise.
935 (gfc_conv_intrinsic_mod): Likewise.
936 (gfc_conv_intrinsic_sign): Likewise.
937 (gfc_conv_intrinsic_len): Likewise.
938 (gfc_conv_intrinsic_adjust): Likewise.
939 (gfc_conv_intrinsic_si_kind): Likewise.
941 2007-07-16 Janne Blomqvist <jb@gcc.gnu.org>
944 * trans-decl.c (gfc_build_builtin_function_decls): Remove
945 DECL_IS_MALLOC attribute from internal_realloc, thus reverting
946 part of my 2007-07-03 patch.
948 2007-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
949 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
952 * gfortran.h (gfc_option_t): Add flag_sign_zero field.
953 * lang.opt (-fsign-zero): New option.
954 * trans.h: Rename gfor_fndecl_set_std into gfor_fndecl_set_options.
955 * trans-decl.c (gfc_build_builtin_function_decls): Build the function
956 declaration to pass an array containing the options to be used by the
957 runtime library. (gfc_generate_function_code): Build an array that
958 contains option values to be passed to the runtime library and the call
960 * options.c (gfc_init_options): Initialize the flag_sign_zero field.
961 (gfc_handle_option): Handle the -fsign-zero option.
963 2007-07-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
966 * trans-array.c (gfc_conv_array_ref): Only evaluate index once.
968 2007-07-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
971 * iresolve.c (gfc_resolve_mvbits): Convert FROMPOS, LEN and TOPOS
974 2007-07-14 Thomas Koenig <tkoenig@gcc.gnu.org>
977 * iresolve.c(gfc_resolve_pack): A scalar mask has
978 to be kind=4, an array mask with kind<4 is converted
979 to gfc_default_logical_kind automatically.
980 (gfc_resolve_unpack): Convert mask to gfc_default_lotical_kind
983 2007-07-14 Paul Thomas <pault@gcc.gnu.org>
986 * parse.c (parse_spec): Emit error on unexpected statement
989 2007-07-13 Daniel Franke <franke.daniel@gmail.com>
991 * invoke.texi: Unified upper- and lower-case in menus.
992 (-w, -W): Removed, documented by gcc.
993 * intrinsic.texi: Unified Class-section entries, added
994 subroutine/function warning where appropiate.
996 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
999 * decl.c (gfc_match_suffix): Removed surplus general error that hides
1000 a more specific message.
1001 * resolve.c (resolve_fl_variable): Reject illegal initializiers only
1002 if not already done.
1003 (resolve_fl_procedure): Added check for initializers of functions.
1005 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
1008 * invoke.texi (-static-libgfortran): Document new option.
1010 2007-07-12 Paul Thomas <pault@gcc.gnu.org>
1014 * module.c (write_generic): Restore patch of 2007-07-10 and use
1015 symbol name if there are no use names.
1017 2007-07-12 Christopher D. Rickett <crickett@lanl.gov>
1020 * decl.c (verify_c_interop_param): Require character string dummy
1021 args to BIND(C) procedures to have length 1.
1022 * resolve.c (resolve_fl_procedure): Modify parameter checking for
1026 * resolve.c (gfc_iso_c_func_interface): Verify that a valid
1027 expression is given as an argument to C_LOC and C_ASSOCIATED.
1028 * trans-io.c (transfer_expr): Add argument for code block. Add
1029 standards check to determine if an error message should be
1030 reported for printing C_PTR or C_FUNPTR.
1031 (transfer_array_component): Update arguments to transfer_expr.
1032 (gfc_trans_transfer): Ditto.
1034 * symbol.c (gen_cptr_param): Fix whitespace.
1036 2007-07-12 Jakub Jelinek <jakub@redhat.com>
1039 * trans.h (GFC_POINTER_TYPE_P): Define.
1040 * trans-types.c (gfc_sym_type): Set it for types on attr->sym.pointer.
1041 * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
1042 if GFC_POINTER_TYPE_P is set on the type.
1044 2007-07-12 Richard Guenther <rguenther@suse.de>
1046 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Convert
1047 arguments to gfc_charlen_type_node.
1048 * trans-io.c (gfc_convert_array_to_string): Convert type
1049 size to gfc_array_index_type.
1051 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
1055 * module.c: Reverted Paul's patch from 2007-07-10.
1057 2007-07-11 Richard Guenther <rguenther@suse.de>
1059 * trans-array.c (gfc_conv_array_parameter): Use correct
1060 types for comparison.
1061 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
1062 correct types for POINTER_PLUS_EXPR.
1063 * trans-stmt.c (gfc_trans_forall_loop): Use correct type
1064 for integer one constant.
1066 2007-07-10 Paul Thomas <pault@gcc.gnu.org>
1069 * resolve.c (is_external_proc): New function. Adds test that
1070 the symbol is not an intrinsic procedure.
1071 * (resolve_function, resolve_call): Replace logical statements
1072 with call to is_external_proc.
1075 * simplify.c (gfc_simplify_transfer): If mold has rank, the
1079 * module.c (write_generic): Write the local name of the
1082 2007-07-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1085 * trans-array.c (gfc_trans_array_constructor): Mark offset field
1086 with TREE_NO_WARNING.
1087 * trans-decl.c (gfc_build_qualified_array): Mark lbound, ubound,
1088 stride and size variables with TREE_NO_WARNING.
1090 2007-07-09 Steven G. Kargl <kargl@gcc.gnu.org>
1092 * trans-decl.c (set_tree_decl_type_code): Remove function.
1093 (generate_local_decl): Remove reference to set_tree_decl_type_code.
1095 2007-07-09 Daniel Franke <franke.daniel@gmail.com>
1098 * trans-decl.c (generate_local_decl) Emit a warning if an unused
1101 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
1104 * module.c (gfc_match_use): Do not set an non-existant
1105 intrinsic operator if a user-defined operator is found.
1107 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
1111 * trans-decl.c (generate_local_decl): Adjusted warning on unused
1112 dummy arguments, tell middle-end not to emit additional warnings.
1114 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
1115 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1118 * gfortran.h (gfc_intrinsic_op): Added INTRINSIC_EQ_OS,
1119 INTRINSIC_NE_OS, INTRINSIC_GT_OS, INTRINSIC_GE_OS,
1120 INTRINSIC_LT_OS and INTRINSIC_LE_OS.
1121 * arith.c (eval_intrinsic, eval_type_intrinsic0): Likewise.
1122 * arith.h (gfc_eq, gfc_ne, gfc_gt, gfc_ge, gfc_lt, gfc_le):
1123 Added gfc_intrinsic_op as third argument type.
1124 * dump-parse-tree.c (gfc_show_expr): Account for new enum values.
1125 * expr.c (simplify_intrinsic_op, check_intrinsic_op): Likewise.
1126 * interface.c (check_operator_interface): Likewise.
1127 (gfc_check_interfaces): Added cross-checks for FORTRAN 77 and
1128 Fortran 90 style operators using new enum values.
1129 (gfc_extend_expr): Likewise.
1130 (gfc_add_interface): Likewise.
1131 * match.c (intrinsic_operators): Distinguish FORTRAN 77 style
1132 operators from Fortran 90 style operators using new enum values.
1133 * matchexp.c (match_level_4): Account for new enum values.
1134 * module.c (mio_expr): Likewise.
1135 * resolve.c (resolve_operator): Deal with new enum values, fix
1136 inconsistent error messages.
1137 * trans-expr.c (gfc_conv_expr_op): Account for new enum values.
1139 2007-07-08 Tobias Burnus <burnus@net-b.de>
1142 * interface.c (get_expr_storage_size): Properly obtain lower bound.
1143 (compare_actual_formal): Add space before parenthesis.
1145 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
1148 * resolve.c (resolve_fl_procedure): Added check for PRIVATE types
1149 in PUBLIC interfaces.
1151 2007-07-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1154 * decl.c (match_attr_spec): Don't return MATCH_ERROR if comma found and
1155 gfc_match_bind_c does not return MATCH_YES.
1157 2007-07-07 Kazu Hirata <kazu@codesourcery.com>
1159 * decl.c, gfortran.h, interface.c, module.c, resolve.c,
1160 trans-array.c, trans-decl.c: Fix comment typos. Follow
1161 spelling conventions.
1162 * intrinsic.texi: Fix typos. Follow spelling conventions.
1164 2007-05-06 Daniel Franke <franke.daniel@gmail.com>
1167 * symbol.c (save_status): New.
1168 * gfortran.h (save_status): Added external declaration.
1169 (check_conflict): Check for conflicting explicite SAVE statements
1171 (gen_special_c_interop_ptr): Use SAVE_EXPLICIT constant.
1172 * module.c (ab_attribute, attr_bits): Removed enumerator value
1173 AB_SAVE for save attribute.
1174 (mio_symbol_attribute): Import/export the full SAVE status,
1175 removed usage of AB_SAVE.
1176 * dump-parse-tree.c (gfc_show_attr): Dump full SAVE status.
1177 * decl.c (add_init_expr_to_sym): Set SAVE_IMPLICIT only if not
1180 2007-07-05 Daniel Franke <franke.daniel@gmail.com>
1181 Tobias Burnus <burnus@net-b.de>
1184 * gfortran.h (symbol_attribute): Change save attribute into an enum.
1185 * decl.c (add_init_expr_to_sym): Set it to SAVE_IMPLICIT.
1186 * symbol.c (gfc_add_save): Check for SAVE_EXPLICIT.
1187 * resolve.c (resolve_fl_variable): Check for SAVE_EXPLICIT.
1188 (resolve_symbol): Allow OMP threadprivate with
1189 initialization SAVEd and save_all variable.
1190 * trans-decl.c (gfc_finish_var_decl): Remove obsolete sym->value check.
1192 2007-07-05 Paul Thomas <pault@gcc.gnu.org>
1195 * match.c (gfc_match_call): Check, in all cases, that a symbol
1196 is neither generic nor a subroutine before trying to add it as
1200 * match.c (gfc_match_do): Reset the implied_index attribute.
1202 2007-07-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1205 * trans-intrinsic.c (trans-intrinsic.c): Handle optional
1206 arguments correctly for MIN and MAX intrinsics.
1208 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1211 * io.c (check_format): Always call gfc_error for errors.
1212 (check_format_string): Change type of this function to try and
1213 return the result of check_format.
1214 (check_io_constraints): Return MATCH_ERROR if check_format_string
1217 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1220 * decl.c (get_proc_name): Include attr->mod_proc in check for error.
1222 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1225 * gfortran.h: Change type of gfc_assign_data_value from void to try.
1226 * data.c (gfc_assign_data_value): Return FAILURE if error found.
1227 * resolve.c (check_data_variable): If gfc_assign_data_value returns
1228 failure, break out of loop and return failure.
1230 2007-07-03 Christopher D. Rickett <crickett@lanl.gov>
1233 * symbol.c (gen_cptr_param): Generate C_PTR and C_FUNPTR if necessary.
1234 (build_formal_args): Pass intrinsic module symbol id to
1237 2007-07-03 Tobias Burnus <burnus@net-b.de>
1240 * resolve.c (resolve_common_blocks): New check function.
1241 (resolve_types): Use it.
1243 2007-07-03 Tobias Burnus <burnus@net-b.de>
1246 * interface.c (get_sym_storage_size): New function.
1247 (get_sym_storage_size): New function.
1248 (compare_actual_formal): Enhance sequence association
1249 support and improve checking.
1251 2007-07-03 Janne Blomqvist <jb@gcc.gnu.org>
1253 * trans-decl.c (gfc_build_builtin_function_decls): Mark
1254 internal_realloc as a malloc function.
1256 2007-07-03 Tobias Burnus <burnus@net-b.de>
1259 * resolve.c (resolve_operator): Check for NULL as operand.
1261 2007-07-02 Tobias Burnus <burnus@net-b.de>
1263 * gfortran.texi (Fortran 2003): Add ISO Bind C.
1264 * intrinsic.texi (C_ASSOCIATED,C_F_POINTER,C_F_PROCPOINTER,
1265 C_FUNLOC,C_LOC): Document new ISO Bind C intrinsics.
1267 2007-07-01 Christopher D. Rickett <crickett@lanl.gov>
1269 * interface.c (gfc_compare_derived_types): Special case for comparing
1270 derived types across namespaces.
1271 (gfc_compare_types): Deal with BT_VOID.
1272 (compare_parameter): Use BT_VOID to accept ISO C Binding pointers.
1273 * trans-expr.c (gfc_conv_function_call): Remove setting parm_kind
1275 (gfc_conv_initializer): Deal with ISO C Binding NULL_PTR and
1277 (gfc_conv_expr): Convert expressions for ISO C Binding derived types.
1278 * symbol.c (gfc_set_default_type): BIND(C) variables should not be
1279 Implicitly declared.
1280 (check_conflict): Add BIND(C) and check for conflicts.
1281 (gfc_add_explicit_interface): Whitespace.
1282 (gfc_add_is_bind_c): New function.
1283 (gfc_copy_attr): Use it.
1284 (gfc_new_symbol): Initialize ISO C Binding objects.
1285 (get_iso_c_binding_dt): New function.
1286 (verify_bind_c_derived_type): Ditto.
1287 (gen_special_c_interop_ptr): Ditto.
1288 (add_formal_arg): Ditto.
1289 (gen_cptr_param): Ditto.
1290 (gen_fptr_param): Ditto.
1291 (gen_shape_param): Ditto.
1292 (add_proc_interface): Ditto.
1293 (build_formal_args): Ditto.
1294 (generate_isocbinding_symbol): Ditto.
1295 (get_iso_c_sym): Ditto.
1296 * decl.c (num_idents_on_line, has_name_equals): New variables.
1297 (verify_c_interop_param): New function.
1298 (build_sym): Finish binding labels and deal with COMMON blocks.
1299 (add_init_expr_to_sym): Check if the initialized expression is
1300 an iso_c_binding named constants
1301 (variable_decl): Set ISO C Binding type_spec components.
1302 (gfc_match_kind_spec): Check match for C interoperable kind.
1303 (match_char_spec): Fix comment. Chnage gfc_match_small_int
1304 to gfc_match_small_int_expr. Check for C interoperable kind.
1305 (match_type_spec): Clear the current binding label.
1306 (match_attr_spec): Add DECL_IS_BIND_C. If BIND(C) is found, use it
1308 (set_binding_label): New function.
1309 (set_com_block_bind_c): Ditto.
1310 (verify_c_interop): Ditto.
1311 (verify_com_block_vars_c_interop): Ditto.
1312 (verify_bind_c_sym): Ditto.
1313 (set_verify_bind_c_sym): Ditto.
1314 (set_verify_bind_c_com_block): Ditto.
1315 (get_bind_c_idents): Ditto.
1316 (gfc_match_bind_c_stmt): Ditto.
1317 (gfc_match_data_decl): Use num_idents_on_line.
1318 (match_result): Deal with right paren in BIND(C).
1319 (gfc_match_suffix): New function.
1320 (gfc_match_function_decl): Use it. Code is re-arranged to deal with
1321 ISO C Binding result clauses.
1322 (gfc_match_subroutine): Deal with BIND(C).
1323 (gfc_match_bind_c): New function.
1324 (gfc_get_type_attr_spec): New function. Code is re-arranged in and
1325 taken from gfc_match_derived_decl.
1326 (gfc_match_derived_decl): Add check for BIND(C).
1327 * trans-common.c: Forward declare gfc_get_common.
1328 (gfc_sym_mangled_common_id): Change arg from 'const char *name' to
1329 'gfc_common_head *com'. Check for ISO C Binding of the common block.
1330 (build_common_decl): 'com->name' to 'com in SET_DECL_ASSEMBLER_NAME.
1331 * gfortran.h: Add GFC_MAX_BINDING_LABEL_LEN
1333 (sym_flavor): Add FL_VOID.
1334 (iso_fortran_env_symbol, iso_c_binding_symbol, intmod_id): New enum
1335 (CInteropKind_t): New struct.
1336 (c_interop_kinds_table): Use it. Declare an array of structs.
1337 (symbol_attribute): Add is_bind_c, is_c_interop, and is_iso_c
1339 (gfc_typespec): Add is_c_interop; is_iso_c, and f90_type members.
1340 (gfc_symbol): Add from_intmod, intmod_sym_id, binding_label, and
1341 common_block members.
1342 (gfc_common_head): Add binding_label and is_bind_c members.
1343 (gfc_gsymbol): Add sym_name, mod_name, and binding_label members.
1344 Add prototypes for get_c_kind, gfc_validate_c_kind,
1345 gfc_check_any_c_kind, gfc_add_is_bind_c, gfc_add_value,
1346 verify_c_interop, verify_c_interop_param, verify_bind_c_sym,
1347 verify_bind_c_derived_type, verify_com_block_vars_c_interop,
1348 generate_isocbinding_symbol, get_iso_c_sym, gfc_iso_c_sub_interface
1349 * iso-c-binding.def: New file. This file contains the definitions
1350 of the types provided by the Fortran 2003 ISO_C_BINDING intrinsic
1352 * trans-const.c (gfc_conv_constant_to_tree): Deal with C_NULL_PTR
1353 or C_NULL_FUNPTR expressions.
1354 * expr.c (gfc_copy_expr): Add BT_VOID case. For BT_CHARACTER, the
1355 ISO C Binding requires a minimum string length of 1 for '\0'.
1356 * module.c (intmod_sym): New struct.
1357 (pointer_info): Add binding_label member.
1358 (write_atom): Set len to 0 for NULL pointers. Check for NULL p and *p.
1359 (ab_attribute): Add AB_IS_BIND_C, AB_IS_C_INTEROP and AB_IS_ISO_C.
1360 (attr_bits): Add "IS_BIND_C", "IS_C_INTEROP", and "IS_ISO_C".
1361 (mio_symbol_attribute): Deal with ISO C Binding attributes.
1362 (bt_types): Add "VOID".
1363 (mio_typespec): Deal with ISO C Binding components.
1364 (mio_namespace_ref): Add intmod variable.
1365 (mio_symbol): Check for symbols from an intrinsic module.
1366 (load_commons): Check for BIND(C) common block.
1367 (read_module): Read binding_label and use it.
1368 (write_common): Add label. Write BIND(C) info.
1369 (write_blank_common): Blank commons are not BIND(C). Explicitly
1371 (write_symbol): Deal with binding_label.
1372 (sort_iso_c_rename_list): New function.
1373 (import_iso_c_binding_module): Ditto.
1374 (create_int_parameter): Add to args.
1375 (use_iso_fortran_env_module): Adjust to deal with iso_c_binding
1377 * trans-types.c (c_interop_kinds_table): new array of structs.
1378 (gfc_validate_c_kind): New function.
1379 (gfc_check_any_c_kind): Ditto.
1380 (get_real_kind_from_node): Ditto.
1381 (get_int_kind_from_node): Ditto.
1382 (get_int_kind_from_width): Ditto.
1383 (get_int_kind_from_minimal_width): Ditto.
1384 (init_c_interop_kinds): Ditto.
1385 (gfc_init_kinds): call init_c_interop_kinds.
1386 (gfc_typenode_for_spec): Adjust for BT_VOID and ISO C Binding pointers.
1387 Adjust handling of BT_DERIVED.
1388 (gfc_sym_type): Whitespace.
1389 (gfc_get_derived_type): Account for iso_c_binding derived types
1390 * resolve.c (is_scalar_expr_ptr): New function.
1391 (gfc_iso_c_func_interface): Ditto.
1392 (resolve_function): Use gfc_iso_c_func_interface.
1393 (set_name_and_label): New function.
1394 (gfc_iso_c_sub_interface): Ditto.
1395 (resolve_specific_s0): Use gfc_iso_c_sub_interface.
1396 (resolve_bind_c_comms): New function.
1397 (resolve_bind_c_derived_types): Ditto.
1398 (gfc_verify_binding_labels): Ditto.
1399 (resolve_fl_procedure): Check for ISO C interoperability.
1400 (resolve_symbol): Check C interoperability.
1401 (resolve_types): Walk the namespace. Check COMMON blocks.
1402 * trans-decl.c (gfc_sym_mangled_identifier): Prevent the mangling
1403 of identifiers that have an assigned binding label.
1404 (gfc_sym_mangled_function_id): Use the binding label rather than
1406 (gfc_finish_var_decl): Put variables that are BIND(C) into a common
1407 segment of the object file, because this is what C would do.
1408 (gfc_create_module_variable): Conver to proper types
1409 (set_tree_decl_type_code): New function.
1410 (generate_local_decl): Check dummy variables and derived types for
1411 ISO C Binding attributes.
1412 * match.c (gfc_match_small_int_expr): New function.
1413 (gfc_match_name_C): Ditto.
1414 (match_common_name): Deal with ISO C Binding in COMMON blocks
1415 * trans-io.c (transfer_expr): Deal with C_NULL_PTR or C_NULL_FUNPTR
1417 * match.h: Add prototypes for gfc_match_small_int_expr,
1418 gfc_match_name_C, match_common_name, set_com_block_bind_c,
1419 set_binding_label, set_verify_bind_c_sym,
1420 set_verify_bind_c_com_block, get_bind_c_idents,
1421 gfc_match_bind_c_stmt, gfc_match_suffix, gfc_match_bind_c,
1422 gfc_get_type_attr_spec
1423 * parse.c (decode_statement): Use gfc_match_bind_c_stmt
1424 (parse_derived): Init *derived_sym = NULL, and gfc_current_block
1425 later for valiadation.
1426 * primary.c (got_delim): Set ISO C Binding components of ts.
1427 (match_logical_constant): Ditto.
1428 (match_complex_constant): Ditto.
1429 (match_complex_constant): Ditto.
1430 (gfc_match_rvalue): Check for existence of at least one arg for
1431 C_LOC, C_FUNLOC, and C_ASSOCIATED.
1432 * misc.c (gfc_clear_ts): Clear ISO C Bindoing components in ts.
1433 (get_c_kind): New function.
1435 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
1438 * trans-expr.c (gfc_conv_power_op): Use builtin_powi for
1440 * f95-lang.c (gfc_init_builtin_functions): Add builtin_powi to the
1443 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
1445 * trans.h: Remove decls for 64-bit allocation functions.
1446 * trans-array.c (gfc_grow_array): Always pick the standard realloc
1448 (gfc_array_allocate): Likewise.
1449 * trans-decl.c: Remove trees for 64-bit allocation functions.
1450 (gfc_build_builtin_function_decls): Don't build fndecls for 64-bit
1451 allocations functions, use index_int_type for normal allocation
1454 2007-06-30 Daniel Franke <franke.daniel@gmail.com>
1457 * intrinsic.c (add_functions): Additional function types.
1458 (gfc_convert_type_warn): Remove intrinsic-flag from
1459 conversion functions.
1460 * resolve.c (resolve_symbol): Added type checks to
1461 explicitly defined intrinsics.
1463 2007-06-30 Tobias Burnus <burnus@net-b.de>
1466 * io.c (check_format): Allow zero to precede the
1469 2007-06-30 Paul Thomas <pault@gcc.gnu.org>
1472 * simplify.c (gfc_simplify_repeat): Add handling of character
1473 literal for first argument.
1475 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
1477 * resolve.c (resolve_operator): Added check whether a user
1478 defined operator is available.
1480 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
1482 * openmp.c (resolve_omp_clauses): Adjust error message to
1483 better reflect the actual requirement.
1485 2007-06-29 Tobias Burnus <burnus@net-b.de>
1488 * io.c (format_lex): Fix FMT_ZERO.
1489 (check_format,check_format_string,gfc_match_format,
1490 check_io_constraints) Additional checking for READ.
1492 2007-06-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1495 * lang.opt (static-libgfortran): New option.
1496 * gfortranspec.c (ADD_ARG_LIBGFORTRAN): New macro.
1497 (Option): Add OPTION_static and OPTION_static_libgfortran.
1498 (lookup_option): Handle the new -static-libgfortran option.
1499 (lang_specific_driver): Check whether -static is passed.
1500 Handle the new -static-libgfortran option.
1501 * options.c (gfc_handle_option): If -static-libgfortran is
1502 passed and isn't supported on this configuration, error out.
1504 2007-06-27 Daniel Franke <franke.daniel@gmail.com>
1507 * openmp.c (resolve_omp_clauses): Emit error on allocatable
1508 components in COPYIN, COPYPRIVATE, FIRSTPRIVATE and LASTPRIVATE
1511 2007-06-25 Paul Thomas <pault@gcc.gnu.org>
1514 * resolve.c (check_host_association): Return if the old symbol
1515 is use associated. Introduce retval to reduce the number of
1516 evaluations of the first-order return value.
1519 * match.c (gfc_match_call): If a host associated symbol is not
1520 a subroutine, build a new symtree/symbol in the current name
1523 2007-06-24 Tobias Burnus <burnus@net-de>
1526 * interface.c (gfc_compare_derived_types): Add access check.
1527 * symbol.c (gfc_find_component): Ditto.
1528 (gfc_set_component_attr,gfc_get_component_attr) Copy access state.
1529 * dump-parse-tree.c (gfc_show_components): Dump access state.
1530 * gfortran.h (struct gfc_component): Add gfc_access.
1531 * module.c (mio_component): Add access state.
1532 * (gfc_match_structure_constructor): Check for private access state.
1534 2007-06-24 Paul Thomas <pault@gcc.gnu.org>
1538 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Calculate
1539 the offset between the loop counter and the position as
1540 defined. Add the offset within the loop so that the mask acts
1541 correctly. Do not advance the location on the basis that it
1544 2007-06-22 Daniel Franke <franke.daniel@gmail.com>
1547 * symbol.c (gfc_copy_attr): Emit errors for duplicate
1548 EXTERNAL/INTRINSIC statements.
1550 2007-06-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1553 * expr.c (gfc_check_assign): If the rvalue expression type is NULL_EXPR,
1554 check to see if the lvalue has attribute pointer and data.
1556 2007-06-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1559 * resolve.c (gfc_resolve_iterator_expr): Add check for REAL using
1560 gfc_notify_standard. (gfc_resolve_iterator): Remove check.
1561 (resolve_branch): Change "Obsolete" to "Deleted feature".
1562 * io.c (resolve_tag): Ditto.
1563 * match.c (gfc_match_pause, gfc_match_assign, gfc_match_goto): Ditto.
1565 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1568 * match.c (gfc_match_common): If the symbol value expression type is
1569 NULL_EXPR, don't error if previously initialized.
1571 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1574 * decl.c (get_proc_name) Check symbol for generic interface
1577 2007-06-20 Andrew Pinski <andrew_pinski@playstation.sony.com>
1578 Richard Guenther <rguenther@suse.de>
1581 * trans.c (gfc_build_addr_expr): Use the correct types.
1583 2007-06-19 Paul Thomas <pault@gcc.gnu.org>
1587 * resolve.c (resolve_code): Use gfc_impure_variable as a
1588 condition for rejecting derived types with pointers, in pure
1590 (gfc_impure_variable): Add test for dummy arguments of pure
1591 procedures; any for functions and INTENT_IN for subroutines.
1594 * data.c (gfc_assign_data_value): Change the ICE on an array
1595 reference initializer not being an array into an error and
1596 clear init to prevent a repetition of the error.
1598 2007-06-17 Janne Blomqvist <jb@gcc.gnu.org>
1600 * gfortran.texi: Add documentation for GFORTRAN_UNBUFFERED_n
1601 environment variables. Fix documentation for
1602 GFORTRAN_UNBUFFERED_ALL environment variable.
1604 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1606 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
1607 POINTER_PLUS_EXPR instead of PLUS_EXPR for pointer addition.
1608 * trans-expr.c (gfc_trans_string_copy): Create
1609 POINTER_PLUS_EXPR instead of a PLUS_EXPR
1612 2007-06-14 Paul Thomas <pault@gcc.gnu.org>
1615 * trans-common.c (build_common_decl): If resizing of common
1616 decl is needed, update the TREE_TYPE.
1618 2007-06-13 Tobias Burnus <burnus@net-b.de>
1621 * interface.c (has_vector_section): New.
1622 (compare_actual_formal): Check for array sections with vector subscript.
1624 2007-06-12 Dirk Mueller <dmueller@suse.de>
1626 * trans-stmt.c (gfc_trans_call): fix gcc_assert to
1627 a comparison, not an assignment.
1629 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
1631 * trans-common.c (create_common): Initialize 'field_init'.
1633 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
1637 * trans-common.c (get_init_field): New function.
1638 (create_common): Call get_init_field for overlapping
1639 initializers in equivalence blocks.
1640 * resolve.c (resolve_equivalence_derived, resolve_equivalence):
1641 Remove constraints on initializers in equivalence blocks.
1642 * target-memory.c (expr_to_char, gfc_merge_initializers):
1644 (encode_derived): Add the bit offset to the byte offset to get
1645 the total offset to the field.
1646 * target-memory.h : Add prototype for gfc_merge_initializers.
1648 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
1650 * trans-types.c (gfc_signed_type): Remove.
1651 * trans-types.h (gfc_signed_type): Remove.
1652 * f95-lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
1654 2007-06-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1656 * trans-intrinsic.c: Revert Lee's 2007-06-04 patch.
1658 2007-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
1659 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1662 * match.c (gfc_match_special_char): New function. Match special char.
1664 * match.h: Add prototype.
1665 * io.c (next_char): Use it.
1666 * primary.c (next_string_char): Ditto.
1668 2007-06-06 Steven G. Kargl <kargl@gcc.gnu.org>
1670 * decl.c: Miscellaneous whitespace fixes.
1672 * gfortran.h: Likewise.
1673 * interface.c : Likewise.
1675 * match.c: Likewise.
1676 * match.h: Likewise.
1677 * module.c: Likewise.
1678 * parse.c: Likewise.
1679 * resolve.c: Likewise.
1680 * symbol.c: Likewise.
1681 * trans-array.c: Likewise.
1682 * trans-common.c: Likewise.
1683 * trans-decl.c: Likewise.
1684 * trans-intrinsic.c: Likewise.
1685 * trans-io.c: Likewise.
1686 * trans-stmt.c: Likewise.
1687 * trans-types.c: Likewise.
1689 2007-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1692 * parse.c (decode_statement): Don't call gfc_undo_symbols on MATCH_ERROR
1693 for ST_FUNCTION since it is called in reject_statement.
1694 (parse_contained): If error, loop back after reject_statement and try
1695 again. Free the namespace if an error occured.
1697 2007-06-04 Lee Millward <lee.millward@codesourcery.com>
1699 * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
1700 to operate on a stack allocated array for the intrinsic arguments
1701 instead of creating a TREE_LIST. Add two new parameters for the
1702 array and the number of elements. Update all callers to allocate
1703 an array of the correct length to pass in. Update comment.
1704 (gfc_intrinsic_argument_list_length): New function.
1705 (gfc_conv_intrinsic_mnimax): Call it.
1706 (gfc_conv_intrinsic_merge): Likewise.
1707 (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
1709 (gfc_conv_intrinsic_cmplx): Likewise.
1710 (gfc_conv_intrinsic_ctime): Likewise.
1711 (gfc_covn_intrinsic_fdate): Likewise.
1712 (gfc_conv_intrinsic_ttynam): Likewise.
1713 (gfc_conv_intrinsic_ishftc): Likewise.
1714 (gfc_conv_intrinsic_index): Likewise.
1715 (gfc_conv_intrinsic_scan): Likewise.
1716 (gfc_conv_intrinsic_verify): Likewise.
1717 (gfc_conv_intrinsic_trim): Likewise.
1718 (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
1719 (gfc_conv_intrinsic_exponent): Likewise.
1720 (gfc_conv_intrinsic_bound): Likewise.
1721 (gfc_conv_intrinsic_abs): Likewise.
1722 (gfc_conv_intrinsic_mod): Likewise.
1723 (gfc_conv_intrinsic_sign): Likewise.
1724 (gfc_conv_intrinsic_len): Likewise.
1725 (gfc_conv_intrinsic_adjust): Likewise.
1726 (gfc_conv_intrinsic_si_kind): Likewise.
1728 2007-06-04 Steve Ellcey <sje@cup.hp.com>
1730 * trans-array.c (gfc_conv_array_parameter): Initialize tmp.
1732 2007-05-31 Richard Guenther <rguenther@suse.de>
1734 * trans-expr.c (gfc_conv_expr_op): Use zero constant
1735 that matches the lse type.
1736 (gfc_trans_string_copy): Use sizetype zero constant.
1737 * intrinsic.c (add_functions): The sizeof intrinsic has
1739 * trans-types.c (gfc_get_dtype): Convert size to index
1740 type before shifting.
1741 * trans-array.c (gfc_trans_array_constructor_value): Use
1742 index type for offset computation.
1743 * trans-intrinsic.c (gfc_conv_associated): Use correct type
1746 2007-05-31 Paul Thomas <pault@gcc.gnu.org>
1749 * trans-array.c (gfc_trans_array_constructor): Treat the case
1750 where the ss expression charlen is missing.
1752 22007-05-31 Paul Thomas <pault@gcc.gnu.org>
1755 * module.c (mio_symtree_ref): If an equivalence group member
1756 is not used, give it a hidden symbol and set the pointer_info.
1757 (load_equiv): Only free the equivalence if none of the members
1760 2007-05-29 Daniel Franke <franke.daniel@gmail.com>
1762 * gfortran.h: Renamed 'enum gfc_generic_isym_id' to 'enum gfc_isym_id',
1763 added missing GFC_ISYM_* enumerators, ordered alphabetically.
1764 (struct gfc_intrinsic_sym): Renamed 'generic_id' to 'id'.
1765 (gfc_find_subroutine): New prototype.
1766 * intrinsic.c (add_sym, add_sym_*): Added argument 'id' and changed all callers.
1767 (find_subroutine): Renamed to 'gfc_find_subroutine', removed static.
1768 * dependency.c: Changed usage of isym->generic_id to isym->id.
1769 * openmp.c: Likewise.
1770 * resolve.c: Likewise.
1771 * trans-array.c: Likewise.
1772 * trans-expr.c: Likewise.
1773 * trans-intrinsic.c: Likewise.
1774 * trans-openmp.c: Likewise.
1776 2007-05-28 Tobias Schlüter <tobi@gcc.gnu.org>
1778 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIZEOF.
1779 * intrinsic.c (add_functions): Add stuff for SIZEOF intrinsic.
1780 * intrinsic.h (gfc_check_sizeof): Add prototype of ...
1781 * check.c (gfc_check_sizeof): .. new function.
1782 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): New function.
1783 (gfc_conv_intrinsic_strcmp): Whitespace fix.
1784 (gfc_conv_intrinsic_array_transfer): Remove double initialization,
1785 use fold_build. where appropriate.
1786 (gfc_conv_intrinsic_function): Add case for SIZEOF.
1787 * intrinsic.texi: Add documentation for SIZEOF.
1789 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
1791 * trans-array.c (gfc_conv_expr_descriptor): Edit comment.
1793 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
1796 * target-memory.c (gfc_target_expr_size): Add handling
1797 for size of BT_HOLLERITH variables.
1798 * check.c (gfc_check_transfer): Reject BT_HOLLERITH
1799 variables in MOLD argument of TRANSFER.
1801 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
1803 * gfortran.h (gfc_expr): Remove from_H, add "representation"
1805 * primary.c (match_hollerith_constant): Store the representation
1806 of the Hollerith in representation, not in value.character.
1807 * arith.c: Add dependency on target-memory.h.
1808 (eval_intrinsic): Remove check for from_H.
1809 (hollerith2representation): New function.
1810 (gfc_hollerith2int): Determine value of the new constant.
1811 (gfc_hollerith2real): Likewise.
1812 (gfc_hollerith2complex): Likewise.
1813 (gfc_hollerith2logical): Likewise.
1814 (gfc_hollerith2character): Point both representation.string and
1815 value.character.string at the value string.
1816 * data.c (create_character_initializer): For BT_HOLLERITH
1817 rvalues, get the value from the representation rather than
1819 * expr.c (free_expr0): Update handling of BT_HOLLERITH values
1820 and values with representation.string.
1821 (gfc_copy_expr): Likewise.
1822 * intrinsic.c (do_simplify): Remove special treatement of
1823 variables resulting from Hollerith constants.
1824 * dump-parse-trees.c (gfc_show_expr): Update handling of
1826 * trans-const.c (gfc_conv_constant_to_tree): Replace from_H
1827 check with check for representation.string; get Hollerith
1828 representation from representation.string, not value.character.
1829 * trans-expr.c (is_zero_initializer_p): Replace from_H check
1830 with check for representation.string.
1831 * trans-stmt.c (gfc_trans_integer_select): Use
1832 gfc_conv_mpz_to_tree for case values, so as to avoid picking up
1833 the memory representation if the case is given by a transfer
1835 * target-memory.c (gfc_target_encode_expr): Use the known memory
1836 representation rather than the value, if it exists.
1837 (gfc_target_interpret_expr): Store the memory representation of
1838 the interpreted expression as well as its value.
1839 (interpret_integer): Move to gfc_interpret_integer, make
1841 (interpret_float): Move to gfc_interpret_float, make non-static.
1842 (interpret_complex): Move to gfc_interpret_complex, make
1844 (interpret_logical): Move to gfc_interpret_logical, make
1846 (interpret_character): Move to gfc_interpret_character, make
1848 (interpret_derived): Move to gfc_interpret_derived, make
1850 * target-memory.h: Add prototypes for newly-exported
1851 gfc_interpret_* functions.
1853 2007-05-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1856 * parse.c (next_statement): Warn for truncated lines if source is free
1859 2007-05-27 Paul Thomas <pault@gcc.gnu.org>
1860 Tobias Burnus <burnus@net-b.de>
1863 * symbol.c (gfc_check_function_type): Copy dimensions of
1865 * resolve.c (resolve_contained_fntype): Improve symbol output in
1868 2007-05-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1871 * io.c (check_format): Add warning for H specifier in format.
1873 2007-05-26 Tobias Burnus <burnus@net-b.de>
1875 * gfortran.texi: Document the GFORTRAN_ERROR_DUMPCORE and
1876 GFORTRAN_ERROR_BACKTRACE environment variables.
1878 2007-05-26 Paul Thomas <pault@gcc.gnu.org>
1881 * trans.h : Add no_function_call bitfield to gfc_se structure.
1882 Add stmtblock_t argument to prototype of get_array_ctor_strlen.
1883 * trans-array.c (get_array_ctor_all_strlen): New function.
1884 (get_array_ctor_strlen): Add new stmtblock_t argument and call
1885 new function for character elements that are not constants,
1886 arrays or variables.
1887 (gfc_conv_array_parameter): Call get_array_ctor_strlen to get
1889 * trans-intrinsic (gfc_conv_intrinsic_len): Add new argument
1890 to call of get_array_ctor_strlen.
1892 2007-05-25 Kazu Hirata <kazu@codesourcery.com>
1894 * intrinsic.texi: Fix typos.
1896 2007-05-25 Paul Thomas <pault@gcc.gnu.org>
1899 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Change
1900 order in logic under EXPR_FUNCTION to handle functions with
1903 2007-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1906 * array.c (spec_dimen_size): Test for correct BT_INTEGER type.
1908 2007-05-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1911 * trans-expr.c (gfc_trans_zero_assign): Convert the result of
1912 TYPE_SIZE_UNIT into a signed type.
1913 (gfc_trans_array_copy): Likewise.
1914 (gfc_trans_array_constructor_copy): Likewise.
1915 * trans-array.c (gfc_trans_create_temp_array): Likewise.
1916 (gfc_grow_array): Likewise.
1917 (gfc_array_init_size): Likewise.
1918 (gfc_duplicate_allocatable): Likewise.
1919 * trans-stmt.c (allocate_temp_for_forall_nest_1): Likewise.
1921 2007-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1924 * resolve.c (resolve_function): Don't call resolve_global_procedure if
1925 there is no name. Delete duplicated statement in ELSE clause.
1927 2007-05-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1930 * trans-array.c (gfc_trans_array_bound_check): Take extra argument to
1931 indicate whether we should check the upper bound in that dimension.
1932 (gfc_conv_array_index_offset): Check only the lower bound of the
1933 last dimension for assumed-size arrays.
1934 (gfc_conv_array_ref): Likewise.
1935 (gfc_conv_ss_startstride): Likewise.
1937 2007-05-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1938 Daniel Franke <franke.daniel@gmail.com>
1941 * resolve.c (resolve_actual_arglist): Resolve actual argument after
1942 being identified as variable.
1944 2007-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1947 * trans-stmt.c (gfc_trans_do): Fix the value of loop variable
1950 2007-05-21 H.J. Lu <hongjiu.lu@intel.com>
1952 * trans-stmt.c (gfc_trans_do): Fix a typo in comment.
1954 2007-05-21 Paul Thomas <pault@gcc.gnu.org>
1958 * trans-array.c (gfc_conv_expr_descriptor): Obtain the stored
1959 offset for non-descriptor, source arrays and correct for stride
1960 not equal to one before writing to field of output descriptor.
1962 2007-05-20 Daniel Franke <franke.daniel@gmail.com>
1965 * check.c (check_rest): Improved argument conformance check and
1966 fixed error message generation.
1968 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1971 * Make-lang.in: Remove use of -Wno-error for expr.o, resolve.o,
1972 simplify.o and trans-common.o.
1974 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1977 * trans-array.c (gfc_trans_auto_array_allocation): Avoid
1978 multiplication of mismatched types.
1980 2007-05-18 Daniel Franke <franke.daniel@gmail.com>
1983 * symbol.c (gfc_add_flavor): Add the NAME to error message if
1986 2007-05-15 Daniel Franke <franke.daniel@gmail.com>
1991 * intrinsic.c (check_specific): Check elemental intrinsics for
1993 (add_functions): Fixed dummy argument names of BESJN and BESYN.
1994 Fixed elemental status of MCLOCK and MCLOCK8.
1995 * check.c (check_rest): Added check for array conformance.
1996 (gfc_check_merge): Removed check for array conformance.
1997 (gfc_check_besn): Removed check for scalarity.
1998 * intrinsic.texi (CSHIFT, EOSHIFT): Fixed typos.
1999 (BESJN, BESYN): Clarified documentation.
2001 2007-05-17 Tobias Burnus <burnus@net-b.de>
2003 * gfortran.texi (GFORTRAN_CONVERT_UNIT): Improve documentation.
2005 2007-05-16 Brooks Moses <brooks.moses@codesourcery.com>
2012 * target-memory.c: New file.
2013 * target-memory.h: New file.
2014 * simplify.c: Add #include "target-memory.h".
2015 (gfc_simplify_transfer): Implement constant-
2016 folding for TRANSFER intrinsic.
2017 * Make-lang.in: Add dependencies on new target-memory.* files.
2019 2007-05-15 Paul Brook <paul@codesourcery.com>
2021 * trans-types.c (gfc_type_for_size): Handle signed TImode.
2023 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2026 * trans.h (gfor_fndecl_internal_malloc, gfor_fndecl_internal_malloc64,
2027 gfor_fndecl_internal_free): Remove prototypes.
2028 (gfor_fndecl_os_error, gfc_call_free, gfc_call_malloc): Add prototypes.
2029 * trans.c (gfc_call_malloc, gfc_call_free): New functions.
2030 * f95-lang.c (gfc_init_builtin_functions): Add __builtin_free
2031 and __builtin_malloc builtins.
2032 * trans-decl.c (gfor_fndecl_internal_malloc,
2033 gfor_fndecl_internal_malloc64, gfor_fndecl_internal_free): Remove.
2034 (gfor_fndecl_os_error): Add.
2035 (gfc_build_builtin_function_decls): Don't create internal_malloc,
2036 internal_malloc64 and internal_free library function declaration.
2037 Create os_error library call function declaration.
2038 * trans-array.c (gfc_trans_allocate_array_storage,
2039 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2040 gfc_conv_array_parameter, gfc_duplicate_allocatable): Use
2041 gfc_call_malloc and gfc_call_free instead of building calls to
2042 internal_malloc and internal_free.
2043 * trans-expr.c (gfc_conv_string_tmp): Likewise.
2044 * trans-stmt.c (gfc_do_allocate, gfc_trans_assign_need_temp,
2045 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
2046 gfc_trans_where_2: Likewise.
2047 * trans-intrinsic.c (gfc_conv_intrinsic_ctime,
2048 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
2049 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_trim): Likewise.
2051 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2054 * trans-expr.c (gfc_conv_substring): Evaluate substring bounds
2057 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
2059 * f95-lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
2060 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use unsigned_type_for
2061 instead of gfc_unsigned_type.
2062 * trans-stmt.c (gfc_trans_do): Use unsigned_type_for instead of
2064 * trans-types.c (gfc_unsigned_type): Remove.
2065 * trans-types.h (gfc_unsigned_type): Remove.
2067 2007-05-12 Paul Thomas <pault@gcc.gnu.org>
2070 * resolve.c (check_host_association): New function that detects
2071 incorrect host association and corrects it.
2072 (gfc_resolve_expr): Call the new function for variables and
2074 * match.h : Remove prototype for gfc_match_rvalue.
2075 * gfortran.h : Add prototype for gfc_match_rvalue.
2077 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
2080 * trans-expr.c (gfc_conv_function_call): Reduce indirection for
2081 direct assignments of recursive array valued functions.
2082 * primary.c (gfc_match_rvalue): Correct error for recursive
2083 function calls such that directly recursive calls of scalar
2084 function without an explicit result are disallowed.
2086 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
2089 * resolve.c (resolve_fl_namelist): It is not an error if the
2090 namelist element is the result variable of the enclosing
2091 function. Search for the symbol in current and all parent
2092 namespaces for a potential conflict.
2093 * symbol.c (check_conflict): Remove the conflict between
2094 'in_namelist' and 'FL_PROCEDURE' because the symbol info
2095 is not available to exclude function result variables.
2096 * trans-io.c (nml_get_addr_expr): Use the fake result decl
2097 if the symbol is an implicit result variable.
2099 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
2102 * decl.c (get_proc_name): If an entry has already been declared
2103 as a module procedure, pick up the symbol and the symtree and
2104 use them for the entry.
2106 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
2109 * resolve.c (resolve_symbol): Remove the flagging mechanism from the
2110 formal namespace resolution and instead check that the formal
2111 namespace is not the current namespace.
2113 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
2116 * trans-array.c (gfc_conv_array_parameter): Convert full array
2117 references to the result of the procedure enclusing the call.
2119 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
2123 * decl.c (add_init_expr_to_sym): Expand a scalar initializer
2124 for a parameter array into an array expression with the right
2126 * array.c (spec_dimen_size): Remove static attribute.
2127 * gfortran.h : Prototype for spec_dimen_size.
2129 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2132 * trans-stmt.c (gfc_trans_do): Handle large loop counts.
2134 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2137 * simplify.c (gfc_simplify_new_line): NEW_LINE can be simplified
2138 even for non constant arguments.
2140 2007-05-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2141 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2144 * gfortran.h: Add runtime error codes from libgfortran.h. Define
2146 * trans.c (gfc_trans_runtime_check): Update the format of runtime error
2147 messages to match library runtime errors. Use call to new library
2148 function runtime_error_at().
2149 * trans.h: Add prototype for new function gfc_trans_io_runtime_check.
2150 Add declaration for library functions runtime_error_at and
2152 * trans_io.c (gfc_trans_io_runtime_check): New function.
2153 (set_parameter_value): Add error checking for UNIT numbers.
2154 (set_parameter_ref): Initialize the users variable to zero.
2155 (gfc_trans_open): Move setting of unit number to after setting of common
2156 flags so that runtime error trapping can be detected.
2157 (gfc_trans_close): Likewise. (build_filepos): Likewise.
2158 (gfc_trans_inquire): Likewise. (build_dt): Likewise.
2159 * trans-decl.c: Add declarations for runtime_error_at and
2160 generate_error. (gfc_build_builtin_function_decls): Build function
2161 declarations for runtime_error_at and generate_error.
2163 2007-05-06 Paul Thomas <pault@gcc.gnu.org>
2166 * resolve.c (resolve_fl_procedure): Resolve constant character
2169 2007-05-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2172 * decl.c (match_char_spec): Add check for invalid character lengths.
2174 2007-05-04 Brooks Moses <brooks.moses@codesourcery.com>
2176 * intrinsic.texi (CMPLX): Document result kind.
2177 (COMPLEX): Add documentation.
2179 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
2182 * intrinsic.c (add_functions): Replaced calls to gfc_check_g77_math1
2183 by gfc_check_fn_r to avoid checks for scalarity.
2184 * check.c (gfc_check_besn): Removed check for scalarity.
2185 (gfc_check_g77_math1): Removed.
2186 * intrinsic.h (gfc_check_g77_math1): Removed.
2188 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
2190 * check.c (gfc_check_fseek_sub): Fixed typo.
2192 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
2195 * intrinsic.c (add_subroutines): Added FSEEK.
2196 * intrinsic.h (gfc_resolve_fseek_sub, gfc_check_fseek_sub): New.
2197 * iresolve.c (gfc_resolve_fseek_sub): New.
2198 * check.c (gfc_check_fseek_sub): New.
2199 * intrinsic.texi (FSEEK): Updated.
2201 2007-05-04 Tobias Burnus <burnus@net-b.de>
2204 * expr.c (gfc_check_pointer_assign): Check for NULL pointer.
2206 2007-05-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2209 * simplify.c (gfc_simplify_len): Only simplify integer lengths.
2211 2007-05-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2214 * simplify.c (gfc_simplify_repeat): Don't put function call with
2215 side effect in a gcc_assert().
2217 2007-05-04 Tobias Burnus <burnus@net-b.de>
2220 * interface.c (compare_actual_formal): Check character length.
2222 2007-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
2225 * dependency.c (gfc_full_array_ref_p): If the reference is
2226 to a single element, check that the array has a single
2227 element and that the correct element is referenced.
2229 2007-05-01 Daniel Franke <franke.daniel@gmail.com>
2231 * intrinsic.c (add_functions): Fixed ELEMENTAL specifications.
2232 (add_subroutines): Replaced magic numbers in function calls by
2233 ELEMENTAL and NOT_ELEMENTAL respectively.
2234 * intrinsic.texi (MVBITS): Changed class to elemental subroutine.
2235 (RANDOM_NUMBER): Changed class to subroutine.
2236 (HUGE, TINY): Changed class to inquiry function.
2238 2007-04-30 Brooks Moses <brooks.moses@codesourcery.com>
2240 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_get_double_int.
2241 (gfc_conv_tree_to_mpz): New function.
2242 (gfc_conv_mpfr_to_tree): Use real_from_mpfr.
2243 (gfc_conv_tree_to_mpfr): New function.
2244 * trans-const.h: (gfc_conv_tree_to_mpz): New prototype.
2245 (gfc_conv_tree_to_mpfr): New prototype.
2247 2007-04-30 Daniel Franke <franke.daniel@gmail.com>
2249 * intrinsic.texi (IERRNO): Changed class to non-elemental function.
2250 (LOG10): Removed COMPLEX as accepted argument type.
2251 (NEW_LINE): Changed class from elemental to inquiry function.
2252 (SIGN): Removed requirement of scalar arguments.
2253 (SNGL): Changed class to elemental function.
2255 2007-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2258 * simplify.c (simplify_bound_dim): New function.
2259 (simplify_bound): Use the above. Perform simplification of LBOUND
2260 and UBOUND when DIM argument is not present.
2262 2007-04-29 Daniel Franke <franke.daniel@gmail.com>
2264 * gfortran.texi: Cleaned up keyword index.
2265 * invoke.texi: Likewise.
2266 * intrinsic.texi: Likewise.
2268 2007-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2271 * scanner.c (load_file): Discard the byte order mark if one is
2272 found on the first non-preprocessor line of a file.
2274 2007-04-29 Paul Thomas <pault@gcc.gnu.org>
2277 * trans-array.c (gfc_conv_resolve_dependencies): Create a temp
2278 whenever a dependency is found.
2280 2007-04-28 Tobias Schlüter <tobi@gcc.gnu.org>
2282 * options.c (gfc_handle_option): Ensure requested free form line
2283 length is not too small.
2285 2007-04-27 Brooks Moses <brooks.moses@codesourcery.com>
2287 * intrinsic.texi (Transfer): Improve documentation.
2289 2007-04-27 Brooks Moses <brooks.moses@codesourcery.com>
2291 * gfortran.texi (Option Index): Add @samp as needed.
2293 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
2295 * gfortran.texi: Added node and menu entry for an option index.
2296 * invoke.texi: Moved command line option related entries of the concept
2297 index to the option index.
2299 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
2301 * intrinsic.texi (AND, FPUT, FPUTC, MODULO, OR, SET_EXPONENT,
2302 XOR): Fixed examples.
2304 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
2306 * intrinsic.texi (PRODUCT, RESHAPE, SPACING, SPREAD, SUM,
2307 SYSTEM_CLOCK, TRANSFER, UNPACK): New.
2308 (DATE_AND_TIME, CPU_TIME, RRSPACING): Added cross references.
2310 2007-04-26 Daniel Franke <franke.daniel@gmail.com>
2312 * intrinsic.texi (NULL, PACK, PRESENT, REPEAT, SCAN, SHAPE,
2313 SIZE, TRANSPOSE, TRIM, VERIFY): New.
2314 (ADJUSTL, ADJUSTR, INDEX): Added cross references.
2315 (INT, INT2, INT8, LONG): Enabled section header.
2317 2007-04-25 Janne Blomqvist <jb@gcc.gnu.org>
2319 * module.c (module_char): Replace fgetc() with
2321 (write_char): Replace fputc() with putc().
2322 * scanner.c (load_line): Replace fgetc() with getc().
2323 (gfc_read_orig_filename): Likewise.
2325 2007-04-25 Tobias Burnus <burnus@net-b.de>
2328 * error.c (error_print): Fix %% support.
2329 * intrinsic.c (sort_actual): Improve error message.
2330 * resolve.c (resolve_actual_arglist): Allow %VAL for
2331 interfaces defined in the module declaration part.
2333 2007-04-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2336 * intrinsic.texi (GETLOG): Update documentation to reflect
2339 2007-04-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2342 * module.c (write_char): Add character to the MD5 buffer.
2343 (read_md5_from_module_file): New function.
2344 (gfc_dump_module): Compute MD5 for new module file. Call
2345 read_md5_from_module_file. Only overwrite old module file
2346 if the new MD5 is different.
2348 2007-04-23 Paul Thomas <pault@gcc.gnu.org>
2351 * resolve.c (resolve_symbol): Allow resolution of formal
2352 namespaces nested within formal namespaces coming from modules.
2355 * trans-expr.c (gfc_trans_assignment): Make the call to
2356 gfc_trans_zero_assign conditional on the lhs array ref being
2359 2007-04-23 Tobias Burnus <burnus@net-b.de>
2361 * primary.c (match_integer_constant): Mention -fno-range-check
2362 in the error message.
2364 2007-04-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2367 * scanner.c (load_line): Remove check for comment after ampersand and
2368 adjust tracking of ampersand.
2370 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
2372 * f95-lang.c (lang_tree_node): Use GENERIC_NEXT
2373 instead of checking GIMPLE_STMT_P in chain_next.
2375 2007-04-17 Tobias Schlüter <tobi@gcc.gnu.org>
2377 * trans-types.h (gfc_packed): New enum.
2378 (gfc_get_nodesc_array_type): Change prototype to use new enum.
2379 * trans-types.c (gfc_get_nodesc_array): Use gfc_packed for
2380 argument packed. Adapt all references to values accordingly.
2381 (gfc_sym_type): Use enum values in call to gfc_get_nodesc_array.
2382 (gfc_get_derived_type): Likewise.
2383 * trans-array.c (gfc_build_constant_array_constructor): Likewise.
2384 * trans-expr.c (gfc_get_interface_mapping_charlen): Changed packed
2385 argument to type gfc_packed.
2386 (gfc_add_interface_mapping): Use enum values in call to
2387 gfc_get_interface_mapping.
2388 * trans-decl.c (gfc_build_dummy_array_decl): Adapt to use enum
2389 values when determining packing.
2391 * trans-decl.c (gfc_finish_decl): Remove unused second argument
2392 'init'. Simplify code accordingly. Remove calls to
2393 gfc_fatal_error in favor of gcc_assert.
2394 (create_function_arglist): Remove second argument from calls to
2396 (gfc_trans_dummy_character): Likewise.
2398 * arith.h: Update copyright years.
2399 * dependency.h: Likewise.
2400 * gfortran.h: Likewise.
2401 * lang-specs.h: Likewise.
2402 * parse.h: Likewise.
2403 * symbol.c: Likewise.
2404 * trans.h: Likewise.
2405 * trans.c: Likewise.
2406 * trans-array.c: Likewise.
2407 * trans-common.c: Likewise.
2408 * trans-const.h: Likewise.
2409 * trans-const.c: Likewise.
2410 * trans-decl.c: Likewise.
2411 * trans-expr.c: Likewise.
2412 * trans-io.c: Likewise.
2413 * trans-openmp.c: Likewise.
2414 * trans-types.h: Likewise.
2415 * types.def: Likewise.
2417 2007-04-17 Tobias Schlüter <tobi@gcc.gnu.org>
2420 * decl.c (gfc_sym_mangled_identifier): Use capital letters in name
2422 (gfc_sym_mangled_function_id): Likewise.
2424 2007-04-15 Paul Thomas <pault@gcc.gnu.org>
2427 * primary.c (check_for_implicit_index): New function to check
2428 that a host associated variable is not an undeclared implied
2430 (gfc_match_rvalue, match_variable): Use it and reset the
2431 implied_index attribute.
2432 * gfortran.h : Add the implied_index field to symbol_attribute.
2433 * match.c (gfc_match_iterator): Mark the iterator variable
2434 with the new attribute.
2435 * decl.c (build_sym): Reset the new attribute.
2437 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
2439 * gfc-internals.texi: Fix typos.
2440 * simplify.c: Fix a comment typo.
2442 2007-04-14 Bernhard Fischer <aldot@gcc.gnu.org>
2444 * primary.c: Commentary typo fix; Add question about redundant (?)
2447 2007-04-14 Paul Thomas <pault@gcc.gnu.org>
2451 * expr.c (scalarize_intrinsic_call): New function to
2452 scalarize elemental intrinsic functions in initialization
2454 (check_init_expr): Detect elemental intrinsic functions
2455 in initalization expressions and call previous.
2457 2007-04-13 Tobias Burnus <burnus@net-b.de>
2460 * primary.c (match_variable): External functions
2463 2007-04-13 Paul Thomas <pault@gcc.gnu.org>
2466 * trans-types.c (copy_dt_decls_ifequal): Do not get pointer
2467 derived type components.
2469 2007-04-13 Tobias Schlüter <tobi@gcc.gnu.org>
2472 * resolve.c: Include obstack.h and bitmap.h. New variable
2474 (code_stack): Add tail and reachable_labels fields.
2475 (reachable_labels): New function.
2476 (resolve_branch): Rework to use new fields in code_stack.
2477 (resolve_code): Call reachable_labels.
2478 (resolve_codes): Allocate and free labels_obstack.
2480 2007-04-12 Tobias Schlüter <tobi@gcc.gnu.org>
2483 * decl.c (match_char_spec): Move check for negative CHARACTER
2485 * resolve.c (resolve_charlen): ... here.
2486 (resolve_types): Resolve CHARACTER lengths earlier.
2488 2007-04-12 Daniel Franke <franke.daniel@gmail.com>
2491 * intrinsic.texi (RANDOM_SEED, RANDOM_NUMBER): New.
2493 2007-04-12 Tobias Schlüter <tobi@gcc.gnu.org>
2496 * primary.c (gfc_variable_attr): Don't copy string length if it
2498 * resolve.c (resolve_code): Clarify error message.
2501 * decl.c (gfc_match_end): Also check for construct name in END
2502 FORALL and END WERE statements.
2503 * match.c (match_case_eos): Use uppercase for statement name in
2505 (match_elsewhere): Construct name may appear iff construct has a
2508 * trans-types.c: Update copyright years. Reformat long comment
2509 explaining array descriptor format. Remove obsolete mention of
2512 * arith.c (gfc_arith_uplus): Rename to ...
2513 (gfc_arith_identity): ... this.
2514 (gfc_parentheses): New function.
2515 (gfc_uplus): Adapt to renamed function.
2516 * arith.h (gfc_parentheses): Add prototype.
2517 * expr.c (gfc_copy_expr): Deal with INTRINSIC_PARENTHESES.
2518 (simplifiy_intrinsic_op): Treat INTRINSIC_UPLUS separately from
2519 INTRINSIC_PARENTHESES.
2521 2007-04-12 Tobias Burnus <burnus@net-b.de>
2524 * decl.c (match_attr_spec): Allow PRIVATE/PUBLIC
2525 attribute in type definitions.
2526 (gfc_match_private): Allow PRIVATE statement only
2527 in specification part of modules.
2528 (gfc_match_public): Ditto for PUBLIC.
2529 (gfc_match_derived_decl): Allow PRIVATE/PUBLIC attribute only in
2530 specificification part of modules.
2532 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
2535 * intrinsic.c (add_functions): Add ref. to gfc_resolve_achar.
2536 * intrinsic.h : Add prototype for gfc_resolve_achar.
2537 * iresolve.c (gfc_resolve_achar): New function.
2539 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
2542 * resolve.c (resolve_fl_variable): Set flag to 2 for automatic
2543 arrays. Make condition for automatic array error explicit.
2544 If a dummy, no error on an INTENT(OUT) derived type.
2546 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
2549 * expr.c (find_array_element): Correct arithmetic for rank > 1.
2551 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
2554 * check.c (numeric_check): If an expresson has not got a type,
2555 see if it is a symbol for which a default type applies.
2557 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
2560 * trans-decl.c (gfc_get_symbol_decl): Allow unreferenced use
2563 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
2566 * symbol.c (gfc_check_function_type): New function.
2567 * gfortran.h : Add prototype for previous.
2568 * parse.c (parse_progunit): Call it after parsing specification
2571 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
2574 * trans-expr.c (gfc_conv_function_call): Give a dummy
2575 procedure the correct type if it has alternate returns.
2577 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
2580 * decl.c (gfc_match_modproc): Go up to the top of the namespace
2581 tree to find the module namespace for gfc_get_symbol.
2583 2007-04-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2586 * fortran/gfortran.h (gfc_charlen_int_kind): New prototype.
2587 * fortran/trans-types.c (gfc_charlen_int_kind): New variable.
2588 (gfc_init_types): Define gfc_charlen_int_kind.
2589 * fortran/trans.h (gfor_fndecl_string_repeat): Remove prototype.
2590 * fortran/trans-decl.c (gfor_fndecl_string_repeat): Delete.
2591 (gfc_build_intrinsic_function_decls): Don't set
2592 gfor_fndecl_string_repeat.
2593 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_repeat): Rewrite
2594 so that we don't have to call a library function.
2595 * fortran/simplify.c (gfc_simplify_repeat): Perform the necessary
2596 checks on the NCOPIES argument, and work with arbitrary size
2599 2007-03-31 Tobias Burnus <burnus@net-b.de>
2601 * intrinsic.c (add_functions): Fix name of dummy argument
2602 for new_line and exit intrinsic.
2604 2007-03-31 Paul Thomas <pault@gcc.gnu.org>
2607 * gfortran.texi: Add a section for the %VAL, %REF and %LOC
2610 2007-03-30 Rafael Avila de Espindola <espindola@google.com>
2612 * trans-types.c (gfc_signed_or_unsigned_type): Remove.
2613 (gfc_unsigned_type): Use get_signed_or_unsigned_type instead of
2614 gfc_signed_or_unsigned_type.
2615 (gfc_signed_type): Ditto.
2616 * trans-types.h (gfc_signed_or_unsigned_type): Remove.
2617 * f95-lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
2619 2007-03-30 Tobias Schlüter <tobi@gcc.gnu.org>
2621 * symbol.c (gfc_find_gsymbol): Simplify, don't unconditionally
2622 descend into all branches.
2624 2007-03-29 Tobias Schlüter <tobi@gcc.gnu.org>
2626 * intrinsic.c (conv_name): Let gfc_get_string handle the format.
2627 (find_conv): Compare pointers instead of calling strcmp.
2628 (find_sym): Likewise, but ensure that the compared pointer is in
2629 the global string table.
2631 2007-03-28 Tobias Schlüter <tobi@gcc.gnu.org>
2633 * gfc-internals.texi: Fix output filename. Merge type index into
2634 concept index. Start documentation of gfc_code structure.
2636 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
2638 * gfc-internals.texi: New file,
2639 * Make-lang.in: Add rules to convert it to dvi, pdf, and info.
2641 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
2643 * error.c (show_locus): Remove always-false test.
2645 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
2647 * lang.opt: Minor edits to descriptions.
2649 2007-03-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2652 * fortran/interface.c (check_operator_interface): Implement
2653 the standard checks on user operators extending intrinsic operators.
2654 * fortran/resolve.c (resolve_operator): If the ranks of operators
2655 don't match, don't error out but try the user-defined ones first.
2657 2007-03-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2660 * expr.c (check_dimension): Fix logic of comparisons.
2662 2007-03-24 Paul Thomas <pault@gcc.gnu.org>
2665 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Return
2666 int result that is non-zero if the expression is the function
2667 result. Only the characteristics of the result expression
2668 can be used in a procedure interface, so simplify LEN in situ
2669 using its character length.
2673 * trans-expr.c (gfc_conv_function_call): Do not use
2674 gfc_conv_expr_reference for actual pointer function with formal
2675 target because a temporary is created that does not transfer
2676 the reference correctly. Do not indirect formal pointer
2677 functions since it is the function reference that is needed.
2679 2007-03-24 Brooks Moses <brooks.moses@codesourcery.com>
2681 * gfortran.h: Edit comments on GFC_STD_*.
2683 2007-03-23 Brooks Moses <brooks.moses@codesourcery.com>
2685 * invoke.texi: Misc. small typo fixes.
2686 (-Wcharacter-truncation): Add.
2687 (-Wnonstd-intrinsics): Correct spelling.
2689 (-fintrinsic-modules-path): Add.
2691 2007-03-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2694 * arith.c (complex_pow): Rewrite to handle large power.
2695 (gfc_arith_power): Handle large power in the real and integer
2698 2007-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2701 * trans-const.c (gfc_conv_mpz_to_tree): Allow integer constants
2702 larger than twice the width of a HOST_WIDE_INT.
2704 2006-03-22 Paul Thomas <pault@gcc.gnu.org>
2707 * trans-intrinsic.c (gfc_size_in_bytes): Remove function.
2708 (gfc_conv_intrinsic_array_transfer): Remove calls to previous.
2709 Explicitly extract TREE_TYPEs for source and mold. Use these
2710 to calculate length of source and mold, except for characters,
2711 where the se string_length is used. For mold, the TREE_TYPE is
2712 recalculated using gfc_get_character_type_len so that the
2713 result is correctly cast for character literals and substrings.
2714 Do not use gfc_typenode_for_spec for the final cast.
2716 2007-03-22 Tobias Schlüter <tobi@gcc.gnu.org>
2719 * decl.c (gfc_match_derived_decl): Reliably reject
2720 'doubleprecision' and 'doublecomplex' as type names.
2722 2007-03-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2725 * trans-expr.c (gfc_trans_init_string_length): Length should
2727 (gfc_conv_function_call): Likewise.
2729 2007-03-18 Paul Thomas <pault@gcc.gnu.org>
2733 * symbo.c : Add gfc_derived_types.
2734 (gfc_free_dt_list): Free derived type list gfc_derived_types.
2735 (gfc_free_namespace): Remove call to gfc_free_dt_list.
2736 (gfc_symbol_done_2): Call gfc_free_dt_list.
2737 * gfortran.h : Declare gfc_derived_types to be external. Remove
2738 derived types field from gfc_namespace.
2739 * resolve.c (resolve_fl_derived): Refer to gfc_derived types
2740 rather than namespace derived_types.
2741 (resolve_fntype): Remove special treatment for module
2742 derived type functions.
2743 * trans-types.c (gfc_get_derived_type): Remove search for like
2744 derived types. Finish by copying back end declaration to like
2745 derived types in the derived type list gfc_derived_types.
2747 2007-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2750 * trans-expr.c (gfc_conv_powi): Make n argument unsigned hwi.
2751 (gfc_conv_cst_int_power): Handle integer exponent with care,
2752 since it might be too large for us.
2754 2007-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2757 * invoke.texi: Fix typo.
2759 2007-03-16 Tobias Burnus <burnus@net-b.de>
2761 * trans-decl.c (gfc_generate_function_code): Use all arguments of
2764 2007-03-15 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2766 * gfortran.h (gfc_option_t): Add flag_backtrace field.
2767 * lang.opt: Add -fbacktrace option.
2768 * invoke.texi: Document the new option.
2769 * trans-decl.c (gfc_build_builtin_function_decls): Add new
2770 option to the call to set_std.
2771 * options.c (gfc_init_options, gfc_handle_option): Handle the
2774 2007-03-15 Tobias Burnus <burnus@gcc.gnu.org>
2775 Paul Thomas <pault@gcc.gnu.org>
2778 * decl.c (gfc_match_import): If the parent of the current name-
2779 space is null, try looking for an imported symbol in the parent
2780 of the proc_name interface.
2781 * resolve.c (resolve_fl_variable): Do not check for blocking of
2782 host association by a same symbol, if the symbol is in an
2785 2007-03-15 Paul Thomas <pault@gcc.gnu.org>
2788 * decl.c (match_data_constant): Before going on to try to match
2789 a name, try to match a structure component.
2793 * resolve.c (resolve_actual_arglist): Do not reject a generic
2794 actual argument if it has a same name specific interface.
2797 * trans-array.c (parse_interface): Do not nullify allocatable
2798 components if the symbol has the saved attribute.
2800 2007-03-14 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2802 * trans-array.c (gfc_trans_auto_array_allocation): Replace
2803 fold(convert()) by fold_convert().
2804 (gfc_duplicate_allocatable): Likewise.
2805 * trans-intrinsic.c (gfc_conv_intrinsic_dot_product): Use
2806 build_int_cst instead of converting an integer_zero_node
2809 2007-03-14 Jakub Jelinek <jakub@redhat.com>
2811 * module.c (mio_typespec): Don't look at ts->cl if not BT_CHARACTER.
2813 2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
2818 * intrinsics.texi (CHDIR): Fix argument names, note
2819 that STATUS must be a default integer.
2820 (CTIME): Fix argument names, note that RESULT must
2821 be a default integer.
2822 (EXIT): Note that STATUS must be a default integer.
2824 2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
2827 * intrinsic.texi: General whitespace cleanup, remove
2828 comment about missing intrinsics.
2829 (menu): Add lines for new entries listed below.
2830 (ACOSH): Mention specific function DACOSH, correct
2831 description phrasing.
2832 (ASINH): Mention specific function DASINH, correct
2833 description phrasing.
2834 (ATANH): Mention specific function DATANH, correct
2835 description phrasing.
2836 (COS): Add index entry for CCOS.
2837 (CPU_TIME): Correct "REAL" to "REAL(*)".
2838 (EXP): Add index entry for CEXP.
2839 (INT): Correct argument name to "A".
2843 (MAX): Add index entries for specific variants.
2844 (MCLOCK): New entry.
2845 (MCLOCK8): New entry.
2846 (SECNDS): Adjust to a more standard form.
2847 (SECOND): New entry.
2848 (TIME): Add cross-reference to MCLOCK.
2849 (TIME8): Add cross-reference to MCLOCK8.
2851 2007-03-11 Paul Thomas <pault@gcc.gnu.org>
2854 * parse.c (parse_interface): Use the default types from the
2855 formal namespace if a function or its result do not have a type
2856 after parsing the specification statements.
2858 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
2860 * intrinsic.texi: (ICHAR) Improve internal I/O note.
2861 (ACHAR): Reference it.
2862 (CHAR): Reference it.
2863 (IACHAR): Reference it.
2865 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
2867 * intrinsic.texi: (LINK) Document function form.
2873 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
2875 * intrinsic.texi: minor typo fixes, removed prologue.
2876 (FSEEK): moved to correct place in alphabetical order.
2878 2007-03-08 Daniel Franke <franke.daniel@gmail.com>
2881 * check.c (gfc_check_alarm_sub): Added check for default integer
2882 kind of status argument.
2883 * iresolve.c (gfc_resolve_alarm_sub): Removed conversion of
2885 * intrinsic.texi (ALARM): Extended documentation.
2887 2007-03-08 Daniel Franke <franke.daniel@gmail.com>
2889 * intrinsic.texi (GERROR, ISATTY, TTYNAM): New.
2890 (ABORT, FLUSH, FNUM, IRAND, MALLOC, SIGNAL, SRAND): Fixed typo.
2891 * intrinsic.c (add_subroutines): Adjusted dummy argument names
2892 of GERROR and TTYNAM.
2894 2007-07-08 Tobias Burnus <burnus@net-b.de>
2896 * module.c (gfc_match_use): Support renaming of operators
2898 * gfortran.texi (Fortran 2003 Status): Document support of
2899 renaming of operators.
2901 2007-07-08 Tobias Burnus <burnus@net-b.de>
2904 * module.c (read_module): Always import module name as symbol.
2905 (gfc_match_use): Disallow module name in the only clause of
2908 2007-03-08 Paul Thomas <pault@gcc.gnu.org>
2911 * expr.c (find_array_section): Correct arithmetic for section
2914 2007-03-07 Brooks Moses <brooks.moses@codesourcery.com>
2916 * iresolve.c (gfc_resolve_ishftc): Correct s_kind value.
2918 2007-03-06 Daniel Franke <franke.daniel@gmail.com>
2920 PR documentation/30950
2921 * intrinsic.texi (AND, CPU_TIME): Fix dummy argument names.
2922 (FREE): Fix call syntax.
2924 2007-03-06 Brooks Moses <brooks.moses@codesourcery.com>
2926 * intrinsic.texi: Limit column widths to a total of .85.
2928 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
2930 * gfortran.texi (GFortran and G77): Rewrite completely.
2932 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
2934 * match.c (gfc_match_name): Expanded comment.
2936 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
2938 * gfortran.texi (Old-style kind specifications): Document
2939 special handling of old-style kind specifiers for COMPLEX.
2940 * decl.c (gfc_match_old_kind_spec): Document kind/bytesize
2941 assumptions for COMPLEX in comment.
2943 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
2946 * gfortranspec.c (lang_specific_driver): Update program
2947 name and copyright date.
2949 2007-03-03 Paul Thomas <pault@gcc.gnu.org>
2952 * check.c (dim_rank_check): The shape of subsections of
2953 assumed-size arrays is known.
2955 2007-03-02 Paul Thomas <pault@gcc.gnu.org>
2956 Tobias Burnus <burnus@net-b.de>
2959 * decl.c (gfc_match_entry): Remove erroneous entry result check.
2961 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
2963 * Make-lang.in: Add install-pdf target as copied from
2964 automake v1.10 rules.
2966 2007-03-01 Tobias Burnus <burnus@net-b.de>
2969 * trans-intrinsic.c (gfc_conv_intrinsic_size): Compare pointers.
2971 2007-02-28 Tobias Burnus <burnus@net-b.de>
2972 Paul Thomas <pault@gcc.gnu.org>
2976 * resolve.c (resolve_actual_arglist): Allow by-value
2977 arguments and non-default-kind for %VAL().
2978 * trans-expr.c (conv_arglist_function): Allow
2979 non-default-kind for %VAL().
2981 2007-02-28 Tobias Burnus <burnus@net-b.de>
2984 * primary.c (next_string_char): Correct reading a character
2985 after the delimiter.
2986 (match_string_constant): Print warning message only once.
2988 2007-02-27 Richard Guenther <rguenther@suse.de>
2990 * trans-array.c (structure_alloc_comps): Use correct type
2991 for null pointer constant.
2993 2007-02-26 Brooks Moses <brooks.moses@codesourcery.com>
2995 * gfortran.texi: Standardize title page, remove version number
2996 from copyright page.
2998 2007-02-26 Thomas Koenig <Thomas.Koenig@online.de>
2999 Paul Thomas <pault@gcc.gnu.org>
3002 * trans-intrinsic.c (gfc_conv_intrinsic_size):
3003 If dim is an optional argument, check for its
3004 presence and call size0 or size1, respectively.
3006 2007-02-23 Paul Thomas <pault@gcc.gnu.org>
3009 * resolve.c (has_default_initializer): New function.
3010 (resolve_fl_variable): Call has_default_initializer to determine if
3011 the derived type has a default initializer to its ultimate
3015 2007-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3017 * options.c (set_default_std_flags): New function to consolidate
3019 (gfc_init_options): Use new function.
3020 (gfc_handle_option): Use new function.
3022 2007-02-22 Brooks Moses <brooks.moses@codesourcery.com>
3024 * gfortran.texi (Old-style kind specifications): Document
3025 special handling of old-style kind specifiers for COMPLEX.
3026 * decl.c (gfc_match_old_kind_spec): Documented kind/bytesize
3027 assumptions in comment.
3029 2007-02-21 Bernhard Fischer <aldot@gcc.gnu.org>
3031 * parse.c (next_free): Gooble spaces after OpenMP sentinel.
3033 2007-02-20 Thomas Koenig <Thomas.Koenig@online.de>
3036 * match.c (gfc_match_iterator): Remove conflict between
3037 loop variable and pointer.
3039 2007-02-20 Tobias Burnus <burnus@net-b.de>
3042 * symbol.c (gfc_add_volatile): Allow to set VOLATILE
3043 attribute for host-associated variables.
3044 * gfortran.h (symbol_attribute): Save namespace
3045 where VOLATILE has been set.
3046 * trans-decl.c (gfc_finish_var_decl): Move variable
3047 declaration to the top.
3049 2007-02-20 Tobias Burnus <burnus@net-b.de>
3052 * resolve.c (resolve_symbol): Add character dummy VALUE check.
3054 2007-02-19 Thomas Koenig <Thomas.Koenig@online.de>
3057 * fortran/iresolve.c (gfc_resolve_maxloc): Remove coercion of
3058 argument to default integer.
3059 (gfc_resolve_minloc): Likewise.
3061 2007-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3064 * options.c (gfc_init_options): Relax warning level for obsolescent.
3065 * match.c (match_arithmetic_if): Change to obsolescent from deleted.
3066 (gfc_match_if): Same.
3068 2007-02-18 Roger Sayle <roger@eyesopen.com>
3070 * trans-array.c (gfc_build_constant_array_constructor): When the
3071 shape of the constructor is known, use that to construct the
3073 (gfc_trans_constant_array_constructor): Initialize the "info"
3074 information for all of the dimensions of the array constructor.
3075 (constant_array_constructor_loop_size): New function.
3076 (gfc_trans_array_constructor): Use it to determine whether a
3077 loop is suitable for "constant array constructor" optimization.
3079 * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Use fold_build2
3080 instead of build2, to avoid conditions like "(a != b) != 0".
3082 2007-02-18 Roger Sayle <roger@eyesopen.com>
3083 Paul Thomas <pault@gcc.gnu.org>
3086 * match.c (match_forall_iterator): Use gfc_match_expr instead
3087 of gfc_match_variable to match the iterator variable. Return
3088 MATCH_NO if not a variable. Remove the reset of the symbol's
3091 2007-02-16 Tobias Burnus <burnus@net-b.de>
3094 * trans-decl.c (gfc_generate_function_code): Do not initialize
3095 pointers to derived components.
3097 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
3098 Brooks Moses <brooks.moses@codesourcery.com>
3099 Lee Millward <lee.millward@codesourcery.com>
3101 * trans-expr.c (gfc_conv_power_op): Use build_call_expr.
3102 (gfc_conv_string_tmp): Likewise.
3103 (gfc_conv_concat_op): Likewise.
3104 (gfc_build_compare_string): Likewise.
3105 (gfc_conv_function_call): Use build_call_list instead of build3.
3107 * trans-array.c (gfc_trans_allocate_array_storage): Use
3109 (gfc_grow_array): Likewise.
3110 (gfc_trans_array_ctor_element): Likewise.
3111 (gfc_trans_array_constructor_value): Likewise.
3112 (gfc_array_allocate): Likewise.
3113 (gfc_array_deallocate): Likewise.
3114 (gfc_trans_auto_array_allocation): Likewise.
3115 (gfc_trans_dummy_array_bias): Likewise.
3116 (gfc_conv_array_parameter): Likewise.
3117 (gfc_trans_dealloc_allocated): Likewise.
3118 (gfc_duplicate_allocatable): Likewise.
3120 * trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr.
3121 (gfc_trans_omp_flush): Likewise.
3123 * trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr.
3124 (gfc_trans_pause): Likewise.
3125 (gfc_trans_stop): Likewise.
3126 (gfc_trans_character_select): Likewise.
3127 (gfc_do_allocate): Likewise.
3128 (gfc_trans_assign_need_temp): Likewise.
3129 (gfc_trans_pointer_assign_need_temp): Likewise.
3130 (gfc_trans_forall_1): Likewise.
3131 (gfc_trans_where_2): Likewise.
3132 (gfc_trans_allocate): Likewise.
3133 (gfc_trans_deallocate): Likewise.
3135 * trans.c (gfc_trans_runtime_check): Use build_call_expr.
3137 * trans-io.c (gfc_trans_open): Use build_call_expr.
3138 (gfc_trans_close): Likewise.
3139 (build_filepos): Likewise.
3140 (gfc_trans_inquire): Likewise.
3141 (NML_FIRST_ARG): Delete.
3142 (NML_ADD_ARG): Delete.
3143 (transfer_namelist_element): Use build_call_expr.
3144 (build_dt): Likewise.
3145 (gfc_trans_dt_end): Likewise.
3146 (transfer_expr): Likewise.
3147 (transfer_array-desc): Likewise.
3149 * trans-decl.c (gfc_generate_function_code): Use build_call_expr.
3150 (gfc_generate_constructors): Likewise.
3152 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr.
3153 (gfc_conv_intrinsic_fdate): Likewise.
3154 (gfc_conv_intrinsic_ttynam): Likewise.
3155 (gfc_conv_intrinsic_array_transfer): Likewise.
3156 (gfc_conv_associated): Likewise.
3157 (gfc_conv_intrinsic_si_kind): Likewise.
3158 (gfc_conv_intrinsic_trim): Likewise.
3159 (gfc_conv_intrinsic_repeat: Likewise.
3160 (gfc_conv_intrinsic_iargc): Likewise.
3162 2007-02-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3165 * scanner.c (gfc_next_char_literal): Add check for end of file after
3166 call to advance_line.
3168 2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>
3171 * primary.c (match_logical_constant): Return MATCH_ERROR on invalid
3174 2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>
3176 * misc.c (gfc_typename): Fix potential buffer overflow.
3178 2007-02-13 Paul Thomas <pault@gcc.gnu.org>
3181 * module.c (read_module): Set pointer_info to referenced if the
3182 symbol has no namespace.
3184 2007-02-12 Nick Clifton <nickc@redhat.com>
3186 * lang.opt: Add Warning attribute to warning options.
3188 2007-02-11 Daniel Franke <franke.daniel@gmail.com>
3190 * intrinsic.texi (HOSTNM): Fix typographical error in syntax.
3191 (SLEEP): Added section and documentation.
3193 2007-02-11 Tobias Schlüter <tobi@gcc.gnu.org>
3196 * decl.c (add_init_expr_to_sym): Remove ENUM specific code.
3197 (variable_decl): Likewise. Rewrap comment.
3198 (match_attr_spec): Remove ENUM specific code.
3199 (gfc_match_enum): Fix typo in error message.
3200 (enumerator_decl): New function.
3201 (gfc_match_enumerator_def): Use enumerator_decl instead of
3202 variable_decl. Adapt code accordingly.
3204 2007-02-11 Paul Thomas <pault@gcc.gnu.org>
3207 * module.c (find_symtree_for_symbol): New function to return
3208 a symtree that is not a "unique symtree" given a symbol.
3209 (read_module): Do not automatically set pointer_info to
3210 referenced because this inhibits the generation of a unique
3211 symtree. Recycle the existing symtree if possible by calling
3212 find_symtree_for_symbol.
3215 * decl.c (add_init_expr_to_sym): Make new charlen for an array
3216 constructor initializer.
3218 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
3220 * f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address
3221 and __emutls_register_common.
3222 * openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls.
3223 * trans-common.c (build_common_decl): Don't check have_tls.
3224 * trans-decl.c (gfc_finish_var_decl): Likewise.
3225 * types.def (BT_WORD, BT_FN_PTR_PTR): New.
3226 (BT_FN_VOID_PTR_WORD_WORD_PTR): New.
3228 2007-02-09 Tobias Burnus <burnus@net-b.de>
3231 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc,
3232 gfc_conv_intrinsic_minmaxval): Use HUGE-1 for most negative integer.
3234 2007-02-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3237 * trans-array.c (gfc_trans_create_temp_array): Remove use of the
3238 function argument. Always generate code for negative extent.
3240 * trans-array.h (gfc_trans_create_temp_array): Change prototype.
3241 * trans-expr.c (gfc_conv_function_call): Remove use of last argument
3242 of gfc_trans_create_temp_array.
3243 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Likewise.
3244 * trans-stmt.c (gfc_conv_elemental_dependencies): Likewise.
3246 2007-02-08 Roger Sayle <roger@eyesopen.com>
3248 * trans-stmt.c (gfc_trans_forall_1): Optimize the cases where the
3249 mask expression is a compile-time constant (".true." or ".false.").
3251 2007-02-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3254 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Evaluate
3255 arguments only once. Generate check that NCOPIES argument is not
3258 2007-02-04 Steven G. Kargl <kargl@gcc.gnu.org>
3261 * fortran/invoke.texi: Update documentation.
3262 * fortran/options.c (gfc_post_options): Deal with tabs with -std=f2003
3265 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
3267 * trans-array.c: Fix a comment typo.
3269 2007-02-03 Paul Thomas <pault@gcc.gnu.org>
3272 * array.c (match_array_element_spec): If the length of an array is
3273 negative, adjust the upper limit to make it zero length.
3276 * resolve.c (pure_function, resolve_function): Initialize name to
3277 null to clear up build warnings.
3278 (resolve_fl_variable): Look at components explicitly to check for
3279 default initializer, rather than using gfc_default_initializer.
3281 2007-02-02 Steven G. Kargl <kargl@gcc.gnu.org>
3284 * resolve.c (resolve_generic_f): Check for non-NULL sym.
3286 2007-02-02 Roger Sayle <roger@eyesopen.com>
3288 * trans.c (gfc_build_array_ref): Use STRIP_TYPE_NOPS to eliminate
3289 NON_LVALUE_EXPR nodes and useless type conversions.
3291 2007-02-02 Paul Thomas <pault@gcc.gnu.org>
3295 * trans-expr.c (gfc_conv_aliased_arg): Remove static attribute
3296 from function and make sure that substring lengths are
3298 (is_aliased_array): Remove static attribute.
3299 * trans.c : Add prototypes for gfc_conv_aliased_arg and
3301 * trans-io.c (set_internal_unit): Add the post block to the
3302 arguments of the function. Use is_aliased_array to check if
3303 temporary is needed; if so call gfc_conv_aliased_arg.
3304 (build_dt): Pass the post block to set_internal_unit and
3305 add to the block after all io activiy is done.
3307 2007-02-01 Roger Sayle <roger@eyesopen.com>
3309 * trans-array.c (gfc_conv_expr_descriptor): We don't need to use
3310 a temporary array to pass a constant non-character array constructor.
3311 Generalize the descriptor generation code to handle scalarizer
3312 "info" without an array reference.
3314 2007-02-01 Roger Sayle <roger@eyesopen.com>
3316 * dependency.c (gfc_check_dependency) <EXPR_ARRAY>: Implement
3317 dependency checking for array constructors.
3319 2007-02-01 Roger Sayle <roger@eyesopen.com>
3321 * trans-stmt.c (compute_overall_iter_number): Document function
3322 arguments. Generalize "unconditional forall nest with constant
3323 bounds" optimization to eliminate unconditional inner loops with
3326 2007-01-31 Tobias Burnus <burnus@net-b.de>
3329 * interface.c (compare_actual_formal): Check conformance between
3330 actual and VOLATILE dummy arguments.
3331 * symbol.c (gfc_add_volatile): Allow setting of VOLATILE
3332 multiple times in different scopes.
3333 * decl.c (gfc_match_volatile): Search symbol in host association.
3335 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
3337 * simplify.c, trans-array.c: Fix comment typos.
3339 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3341 * invoke.texi (Code Gen Options): Fix abbreviation typo.
3342 * intrinsic.texi (ACCESS, LSHIFT, RSHIFT): Fix typos.
3344 2007-01-30 Steve Ellcey <sje@cup.hp.com>
3347 * trans-types.c (gfc_get_function_type): Do not add void_type_node
3349 * trans-decl.c (create_function_arglist): Change assert.
3351 2007-01-29 Paul Thomas <pault@gcc.gnu.org>
3354 * module.c (read_module): If a symbol is excluded by an ONLY
3355 clause, check to see if there is a symtree already loaded. If
3356 so, attach the symtree to the pointer_info.
3358 2007-01-28 Thomas Koenig <Thomas.Koenig@online.de>
3361 * gfortran.h: Remove gfc_simplify_init_1.
3362 * arith.h: Remove third argument from gfc_compare_string.
3363 * arith.c (gfc_compare_expression): Remove third argument
3364 from call to gfc_compare_string.
3365 (gfc_compare_string): Remove third argument xcoll_table.
3366 Remove use of xcoll_table.
3367 * misc.c (gfc_init_1): Remove call to gfc_simplify_init_1.
3368 * simplify.c (ascii_table): Remove.
3369 (xascii_table): Likewise.
3370 (gfc_simplify_achar): ICE if extract_int fails. Remove use of
3371 ascii_table. Warn if -Wsurprising and value < 0 or > 127.
3372 (gfc_simplify_char): ICE if extract_int fails. Error if
3373 value < 0 or value > 255.
3374 (gfc_simplify_iachar): Remove use of xascii_table.
3375 Char values outside of 0..255 are an ICE.
3376 (gfc_simplify_lge): Remove use of xascii_table.
3377 (gfc_simplify_lgt): Likewise.
3378 (gfc_simplify_lle): Likewise.
3379 (gfc_simplify_llt): Likewise.
3380 (invert_table): Remove.
3381 (gfc_simplify_init_1): Remove.