1 2007-08-24 Tobias Burnus <burnus@net-b.de>
4 * intrinsic.c (gfc_intrinsic_func_interface): Fix initialization
7 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org>
10 * iresolve.c: Don't convert array masks.
12 2007-08-24 Tobias Burnus <burnus@net-b.de>
15 * trans-array.c (gfc_conv_expr_descriptor): Copy bounds for
16 whole-array pointer assignments.
18 2007-08-23 Jakub Jelinek <jakub@redhat.com>
20 * decl.c (variable_decl): Don't share charlen structs if
22 * trans-decl.c (create_function_arglist): Assert
23 f->sym->ts.cl->backend_decl is NULL instead of unsharing
26 2007-08-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
29 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Remove
30 runtime error checking.
32 2007-08-22 Roger Sayle <roger@eyesopen.com>
33 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
35 * match.c (intrinsic_operators): Delete.
36 (gfc_match_intrinsic_op): Rewrite matcher to avoid calling
39 2007-08-22 Christopher D. Rickett <crickett@lanl.gov>
42 * resolve.c (gfc_iso_c_sub_interface): Remove setting of type and
43 kind for optional SHAPE parameter of C_F_POINTER.
45 2007-08-22 Janus Weil <jaydub66@gmail.com>
47 * decl.c (match_attr_spec): Pass on errors from gfc_match_bind_c.
48 (gfc_match_bind_c): Bugfix in check for NAME= with abstract interfaces.
49 (gfc_match_mopdproc): Bugfix to reject module procedures in
52 2007-08-22 Kai Tietz <kai.tietz@onevision.com>
54 * f95-lang.c: (gfc_init_decl_processing): Choose sizetype by using
57 2007-08-21 Paul Brook <paul@codesourcery.com>
58 Nathan Sidwell <nathan@codesourcery.com>
59 Mark Mitchell <mark@codesourcery.com>
60 Joseph Myers <joseph@codesourcery.com>
62 * gfortranspec.c (lang_specific_driver): Use pkgversion_string.
63 * Make-lang.in (gfortran.pod): Define BUGURL.
64 * invoke.texi: Use BUGURL for bug-reporting instructions.
66 2007-08-19 Roger Sayle <roger@eyesopen.com>
68 * match.c (intrinsic_operators): Make static.
69 (gfc_op2string): New function for converting a gfc_intrinsic_op to
70 to a "const char*", replacing the macro of the same name.
71 * gfortran.h (intrinsic_operators): Delete prototype.
72 (gfc_op2string): Replace macro with function prototype.
74 2007-08-18 Tobias Burnus <burnus@net-b.de>
76 * gfortran.h (gfc_is_intrinsic_typename): Add declaration.
77 * symbol.c (gfc_is_intrinsic_typename): New function.
78 * parse.c (decode_statement): Check for space in ABSTRACT INTERFACE.
79 (parse_interface): Use gfc_is_intrinsic_typename.
80 * decl.c (gfc_match_derived_decl): Ditto.
81 * module.c (gfc_match_use): Use gcc_unreachable() for
82 INTERFACE_ABSTRACT in switch().
84 2007-08-18 Roger Sayle <roger@eyesopen.com>
86 * primary.c (match_logical_constant_string): New function to match
87 a ".true." or a ".false.".
88 (match_logical_constant): Use it instead of gfc_match_strings.
90 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
91 Janus Weil <jaydub66@gmail.com>
93 * interface.c (gfc_match_interface,gfc_match_abstract_interface,
94 gfc_match_end_interface,gfc_add_interface): Add abstract interface.
95 * dump-parse-tree.c (gfc_show_attr): Ditto.
96 * gfortran.h (interface_type,symbol_attribute): Ditto.
97 * module.c (gfc_match_use,ab_attribute,attr_bits,
98 mio_symbol_attribute): Ditto.
99 * resolve.c (resolve_function): Ditto.
101 * parse.c (decode_statement): Ditto.
102 (parse_interface): Ditto, check for C1203 (name of abstract interface
103 cannot be the same as an intrinsic type).
104 * decl.c (gfc_match_bind_c): Check for NAME= with abstract interfaces.
105 (access_attr_decl): Handle Abstract interfaces.
107 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
110 * expr.c (gfc_check_pointer_assign): If the rhs is the
111 initialization expression for the rhs, there is no error.
113 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
116 * trans-array.c (get_array_ctor_strlen): Set the character
117 length of a zero length array to zero.
119 2007-08-16 Tobias Burnus <burnus@net-b.de>
122 * module.c (gfc_match_use): Mark user operators as such.
123 (find_use_name_n): Distinguish between operators and other symbols.
124 (find_use_name,number_use_names,mio_namelist,
125 load_operator_interfaces,load_generic_interfaces,read_module,
126 write_generic): Update find_use_name_n calls.
128 2007-08-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
131 * trans.c (gfc_create_var_np): Do not emit warnings for
134 2007-08-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
137 * decl.c (gfc_get_type_attr_spec): Fix whitespace.
138 (gfc_match_derived_decl): Fix logic.
140 2007-08-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
143 * trans-intrinsic.c (build_fixbound_expr): Convert to result type
146 2007-08-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
149 * trans-expr.c (gfc_conv_substring_expr): Only call
150 gfc_conv_substring if expr->ref is not NULL.
151 * expr.c (gfc_is_constant_expr): If e->ref is NULL, the substring
152 expression might be a constant.
153 (gfc_simplify_expr): Handle missing start and end, as well as
156 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
159 * match.c (gfc_match_call): Do not create a new symtree in the
160 case where the existing symbol is external and not referenced.
162 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
165 * decl.c (variable_decl): Check for an imported symbol
166 by looking for its symtree and testing for the imported
168 (gfc_match_import): Remove change of symbol's namespace
169 and set the attribute imported instead.
170 * symbol.c (gfc_get_sym_tree): It is not an error if a
172 * gfortran.h : Add the 'imported' to symbol_attribute.
174 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
177 * trans-array.c (gfc_conv_array_transpose): Set the offset
178 of the destination to zero if the loop is zero based.
180 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
183 * intrinsic.c (add_functions): Add optional KIND argument to ACHAR.
184 * iresolve.c (gfc_resolve_achar): Handle the KIND argument.
185 * check.c (gfc_check_achar): Check for the optional KIND argument.
186 * simplify.c (gfc_simplify_achar): Use KIND argument.
187 * intrinsic.h (gfc_check_achar, gfc_simplify_achar,
188 gfc_resolve_achar): Adjust prototypes.
190 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
194 * trans-expr.c (gfc_conv_function_call): When no formal argument
195 list is available, we still substitute missing optional arguments.
196 * check.c (gfc_check_random_seed): Correct the check on the
197 number of arguments to RANDOM_SEED.
198 * intrinsic.c (add_subroutines): Add a resolution function to
200 * iresolve.c (gfc_resolve_random_seed): New function.
201 * intrinsic.h (gfc_resolve_random_seed): New prototype.
203 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
206 * error.c (error_uinteger): New function.
207 (error_integer): Call error_uinteger.
208 (error_print): Handle %u, %lu, %li and %ld format specifiers.
209 * interface.c (compare_actual_formal): Use the new %lu specifier.
211 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
214 * lang.opt (-fmodule-private): New option.
215 * gfortran.h (gfc_option_t): Add flag_module_private member.
216 * invoke.texi (-fmodule-private): Document the new option.
217 * module.c (gfc_check_access): Allow the -fmodule-private option
218 to modify the default behaviour.
219 * options.c (gfc_init_options): Initialize flag_module_private.
220 (gfc_handle_option): Handle -fmodule-private.
222 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
225 * intrinsic.c (add_functions): Add KIND arguments to COUNT,
226 IACHAR, ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND
228 * iresolve.c (gfc_resolve_count): Add kind argument.
229 (gfc_resolve_iachar): New function.
230 (gfc_resolve_ichar): Add kind argument.
231 (gfc_resolve_index_func): Likewise.
232 (gfc_resolve_lbound): Likewise.
233 (gfc_resolve_len): Likewise.
234 (gfc_resolve_len_trim): Likewise.
235 (gfc_resolve_scan): Likewise.
236 (gfc_resolve_size): New function.
237 (gfc_resolve_ubound): Add kind argument.
238 (gfc_resolve_verify): Likewise.
239 * trans-decl.c (gfc_get_extern_function_decl): Allow specific
240 intrinsics to have 4 arguments.
241 * check.c (gfc_check_count): Add kind argument.
242 (gfc_check_ichar_iachar): Likewise.
243 (gfc_check_index): Likewise.
244 (gfc_check_lbound): Likewise.
245 (gfc_check_len_lentrim): New function.
246 (gfc_check_scan): Add kind argument.
247 (gfc_check_size): Likewise.
248 (gfc_check_ubound): Likewise.
249 (gfc_check_verify): Likewise.
250 * intrinsic.texi: Update documentation for COUNT, IACHAR, ICHAR,
251 INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND and VERIFY.
252 * simplify.c (get_kind): Whitespace fix.
253 (int_expr_with_kind): New function.
254 (gfc_simplify_iachar): Add kind argument.
255 (gfc_simplify_iachar): Likewise.
256 (gfc_simplify_ichar): Likewise.
257 (gfc_simplify_index): Likewise.
258 (simplify_bound_dim): Likewise.
259 (simplify_bound): Likewise.
260 (gfc_simplify_lbound): Likewise.
261 (gfc_simplify_len): Likewise.
262 (gfc_simplify_len_trim): Likewise.
263 (gfc_simplify_scan): Likewise.
264 (gfc_simplify_shape): Pass NULL as kind argument to gfc_simplify_size.
265 (gfc_simplify_size): Add kind argument.
266 (gfc_simplify_ubound): Likewise.
267 (gfc_simplify_verify): Likewise.
268 * intrinsic.h: Update prototypes and add new ones.
269 * trans-intrinsic.c (gfc_conv_intrinsic_index): Rename into
270 gfc_conv_intrinsic_index_scan_verify.
271 (gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove.
272 (gfc_conv_intrinsic_function): Call
273 gfc_conv_intrinsic_index_scan_verify to translate the INDEX,
274 SCAN and VERIFY intrinsics.
276 2007-08-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
279 * invoke.texi (-fbacktrace): Document the new behaviour.
281 2007-08-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
284 * trans-array.c (gfc_conv_expr_descriptor): Use
285 gfc_conv_const_charlen to generate backend_decl of right type.
286 * trans-expr.c (gfc_conv_expr_op): Use correct return type.
287 (gfc_build_compare_string): Use int type instead of default
288 integer kind for single character comparison.
289 (gfc_conv_aliased_arg): Give backend_decl the right type.
290 * trans-decl.c (gfc_build_intrinsic_function_decls): Make
291 compare_string return an int.
293 2007-08-11 Ian Lance Taylor <iant@google.com>
295 * f95-lang.c (gfc_get_alias_set): Change return type to
298 2007-08-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
301 * trans.c (gfc_trans_runtime_check): Reorder arguments and
302 add extra variable arguments. Hand them to the library function.
303 * trans.h (gfc_trans_runtime_check): Update prototype.
304 * trans-array.c (gfc_trans_array_bound_check): Issue more
305 detailled error messages.
306 (gfc_conv_array_ref): Likewise.
307 (gfc_conv_ss_startstride): Likewise.
308 (gfc_trans_dummy_array_bias): Reorder arguments to
309 gfc_trans_runtime_check.
310 * trans-expr.c (gfc_conv_substring): Issue more detailled
312 (gfc_conv_function_call): Reorder arguments to gfc_trans_runtime_check.
313 * trans-stmt.c (gfc_trans_goto): Likewise.
314 * trans-io.c (set_string): Reorder arguments to
315 gfc_trans_runtime_check and issue a more detailled error message.
316 * trans-decl.c (gfc_build_builtin_function_decls): Make
317 runtime_error and runtime_error_at handle a variable number of
319 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Reorder arguments
320 to gfc_trans_runtime_check.
321 (gfc_conv_intrinsic_minmax): Likewise.
322 (gfc_conv_intrinsic_repeat): Issue more detailled error messages.
324 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
326 * gfortranspec.c (lang_specific_driver): Use CONST_CAST.
327 * options.c (gfc_post_options): Likewise.
328 * parse.c (parse_omp_structured_block): Likewise.
329 * st.c (gfc_free_statement): Likewise.
331 2007-08-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
334 * trans-decl.c (gfc_build_builtin_function_decls): Change
335 prototype for associated.
336 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert the
337 result of __builtin_isnan into a boolean.
338 (gfc_conv_intrinsic_strcmp): Cleanup.
339 (gfc_conv_associated): Convert the result of the associated
340 function into a boolean.
342 2007-08-09 Tobias Burnus <burnus@net-b.de>
345 * io.c (format_token): Add FMT_ERROR.
346 (next_char_not_space): Print error/warning when
347 '\t' are used in format specifications.
348 (format_lex): Propagate error.
349 (check_format): Ditto.
351 2007-08-09 Tobias Burnus <burnus@net-b.de>
354 * arith.c (arith_error): Point in the error message
357 2007-08-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
360 * intrinsic.texi (SIZEOF): Add mention to C_SIZE_T.
362 2007-08-06 Christopher D. Rickett <crickett@lanl.gov>
365 * trans-expr.c (gfc_conv_scalar_char_value): Convert the tree and
366 actual arg expressions for scalar characters passed by-value to
368 (gfc_conv_function_call): Call gfc_conv_scalar_char_value.
369 * trans.h: Add prototype for gfc_conv_scalar_char_value.
370 * trans-decl.c (generate_local_decl): Convert by-value character
371 dummy args of bind(c) procedures using
372 gfc_conv_scalar_char_value.
374 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
377 * iresolve.c (gfc_resolve_alarm_sub): Suffix the subroutine name
378 with the kind of the STATUS argument.
380 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
383 * intrinsic.c (add_functions): Fix name of argument to CHDIR.
385 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
388 * iresolve.c (gfc_resolve_exit): Convert argument to default
391 2007-08-06 Daniel Franke <franke.daniel@gmail.com>
393 * resolve.c (derived_pointer): Removed, replaced callers by access
394 to appropiate attribute bit.
395 (derived_inaccessable): Shortcut recursion depth.
396 (resolve_fl_namelist): Fixed checks for private components in namelists.
398 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
401 * trans.h (gfor_fndecl_string_minmax): New prototype.
402 * trans-decl.c (gfor_fndecl_string_minmax): New variable.
403 (gfc_build_intrinsic_function_decls): Create gfor_fndecl_string_minmax.
404 * check.c (gfc_check_min_max): Allow for character arguments.
405 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): New function.
406 (gfc_conv_intrinsic_function): Add special case for MIN and MAX
407 intrinsics with character arguments.
408 * simplify.c (simplify_min_max): Add simplification for character
411 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
414 * invoke.texi: Adjust documentation for option -fsyntax-only.
416 2007-08-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
417 Tobias Burnus <burnus@gcc.gnu.org>
420 * intrinsic.h (gfc_check_isnan): Add prototype.
421 * gfortran.h (gfc_isym_id): Add GFC_ISYM_ISNAN.
422 * intrinsic.c (add_functions): Add ISNAN intrinsic.
423 * check.c (gfc_check_isnan): New function.
424 * trans-intrinsic.c (gfc_conv_intrinsic_isnan): New function.
425 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_isnan
427 * intrinsic.texi: Document ISNAN.
429 2007-08-04 Paul Thomas <pault@gcc.gnu.org>
432 * symbol.c (get_unique_symtree): Moved from module.c.
433 * module.c (get_unique_symtree): Moved to symbol.c.
434 * decl.c (get_proc_name): Transfer the typespec from the local
435 symbol to the module symbol, in the case that an entry is also
436 a module procedure. Ensure the local symbol is cleaned up by
437 pointing to it with a unique symtree.
439 * dump_parse_tree (gfc_show_code_node): Add EXEC_ASSIGN_CALL.
441 2008-08-04 Steven G. Kargl <kargl@gcc.gnu.org>
444 * iresolve.c (gfc_resolve_rrspacing): Convert argument(s) to
446 (gfc_resolve_scale): Ditto.
447 (gfc_resolve_set_exponent): Ditto.
448 (gfc_resolve_spacing): Ditto.
451 * trans-intrinsic.c (gfc_conv_intrinsic_si_kind,
452 gfc_conv_intrinsic_sr_kind): Convert the argument(s) to the
453 expected KIND, and fold the result to the expected KIND.
455 2007-08-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
458 * f95-lang.c (gfc_init_builtin_functions): Defin builtins for
459 lround{f,,l} and llround{f,,l}.
460 * trans-intrinsic.c (build_fix_expr): Generate calls to the
461 {l,}round{f,,l} functions.
463 2007-08-01 Thomas Koenig <tkoenig@gcc.gnu.org>
466 * intrinsic.c (resolve_mask_arg): New function.
467 (gfc_resolve_maxloc): Use resolve_mask_arg for mask resolution.
468 (gfc_resolve_maxval): Likewise.
469 (gfc_resolve_minloc): Likewise.
470 (gfc_resolve_minval): Likewise.
471 (gfc_resolve_pack): Likewise.
472 (gfc_resolve_product): Likewise.
473 (gfc_resolve_sum): Likewise.
474 (gfc_resolve_unpack): Likewise.
476 2007-08-01 Tobias Burnus <burnus@net-b.de>
479 * match.c (gfc_match_allocate): Better check that STAT is
482 * check.c (gfc_check_allocated): Reorder checks to improve
485 2007-08-01 Nick Clifton <nickc@redhat.com>
487 * arith.c: Change copyright header to refer to version 3 of the
488 GNU General Public License and to point readers at the COPYING3
489 file and the FSF's license web page.
490 * openmp.c, interface.c, intrinsic.c, trans-array.c, trans-expr.c,
491 symbol.c, iso-fortran-env.def, intrinsic.h, decl.c, trans-array.h,
492 matchexp.c, dump-parse-tree.c, trans-common.c, array.c,
493 Make-lang.in, trans-openmp.c, gfortran.h, error.c,
494 iso-c-binding.def, lang.opt, data.c, trans-const.c, trans-stmt.c,
495 expr.c, trans-const.h, trans-stmt.h, module.c, trans.c, scanner.c,
496 trans-types.c, trans.h, gfortranspec.c, trans-types.h,
497 lang-specs.h, io.c, bbt.c, resolve.c, f95-lang.c, st.c,
498 iresolve.c, match.c, trans-decl.c, trans-io.c, target-memory.c,
499 match.h, target-memory.h, parse.c, arith.h, check.c, dependency.c,
500 parse.h, types.def, convert.c, dependency.h, primary.c,
501 trans-intrinsic.c, options.c, misc.c, simplify.c: Likewise.
503 2007-08-01 Daniel Franke <franke.daniel@gmail.com>
505 * trans-decl.c (generate_local_decl): Emit warning on unused parameter
506 on "-Wall -Wextra" or "-Wunused-parameter" but not on "-Wall", changed
507 messages that start with lower case to upper case.
508 * invoke.texi (-Wparameter-unused): Document differences between gcc
509 and gfortran regarding this option.
511 2007-08-01 Daniel Franke <franke.daniel@gmail.com>
514 * expr.c (check_specification_function): Skip check if no symtree
517 2007-08-01 Paul Thomas <pault@gcc.gnu.org>
520 * resolve.c (resolve_entries): Entries declared to be module
521 procedures must point to the function namespace.
523 2007-07-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
526 * trans-stmt.c (gfc_trans_return): Convert to correct type.
528 2007-07-31 Steven G. Kargl <kargl@gcc.gnu.org>
531 * trans-intrinsic.c (gfc_conv_intrinsic_exponent): Convert to correct
534 2007-07-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
536 * invoke.texi: Document -fsign-zero flag.
538 2007-07-29 Paul Thomas <pault@gcc.gnu.org>
541 * trans-expr.c (gfc_conv_expr_reference): Add block for case of
542 scalar pointer functions so that NULL result is correctly
546 * trans-array.c (gfc_trans_array_constructor): On detecting a
547 multi-dimensional parameter array, set the loop limits.
549 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
552 * resolve.c (resolve_fl_parameter): Check for constant shape arrays,
553 adjusted error message.
555 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
557 * invoke.texi: Removed -w from option summary.
559 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
562 * intrinsic.texi (IRAND, RAND, RANDOM_NUMBER): Document algorithm
563 used for random number generator.
565 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
567 * gfortran.h, interface.c, resolve.c, symbol.c: Fix comment
569 * intrinsic.texi, invoke.texi: Fix typos.
571 2007-07-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
574 * resolve.c (generic_sym): Check for a same symbol and if so, return to
575 avoid infinite recursion.
577 2007-07-28 Daniel Franke <franke.daniel@gmail.com>
582 * gfortran.h (symbol_attribute): Added bits for pointer_comp,
584 * parse.c (parse_derived): Set pointer_comp/private_comp bits if
585 the derived type ultimately contains pointer components or private
587 * module.c (ab_attribute): New values AB_POINTER_COMP, AB_PRIVATE_COMP.
588 (attr_bits): Added names for new ab_attributes.
589 (mio_symbol_attribute): Save/restore new attribute bits in modules.
590 * match.c (gfc_match_namelist): Removed check for namelist objects
592 * resolve.c (resolve_fl_namelist): Added check for pointer or
593 private components in nested types. Added check for namelist objects
596 2007-07-28 Paul Thomas <pault@gcc.gnu.org>
599 * trans-expr.c (gfc_trans_scalar_assign): Revert to fixed order
600 for lse and rse pre expressions, for derived types with
601 allocatable components. Instead, assign the lhs to a temporary
602 and deallocate after the assignment.
604 2007-07-28 Janne Blomqvist <jb@gcc.gnu.org>
607 * trans-stmt.c (gfc_trans_character_select): Replace occurrences
608 of gfc_c_int_type_node with integer_type_node.
609 * trans-decl.c (gfc_build_intrinsic_function_decls): Likewise.
610 (gfc_build_builtin_function_decls): Likewise.
611 (gfc_generate_function_code): Likewise.
612 * trans-io.c (gfc_build_io_library_fndecls): Likewise.
614 2007-07-27 Janne Blomqvist <jb@gcc.gnu.org>
616 * trans-decl.c (gfc_build_builtin_function_decls): Use existing
617 gfc_array_index_type rather than creating another typenode for
618 gfc_index_integer_kind.
620 2007-07-27 Janne Blomqvist <jb@gcc.gnu.org>
622 * trans-io.c (gfc_build_io_library_fndecls): Change to use
623 gfc_array_index_type for array descriptor triplets instead of
626 2007-07-26 Steven G. Kargl <kargl@gcc.gnu.org>
629 * resolve.c (resolve_operator): Add INTRINSIC_EQ_OS comparison.
631 2007-07-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
632 Daniel Franke <franke.daniel@gmail.com>
635 * primary.c (match_variable): Do not call gfc_add_flavor if symbol has
636 attribute of ACCESS_PUBLIC or ACCESS_PRIVATE already marked.
638 2007-07-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
641 * trans-stmt.c (gfc_trans_character_select): Replace the
642 mechanism with labels by a SWITCH_EXPR.
643 * trans-decl.c (gfc_build_builtin_function_decls): Change
644 return type for select_string.
646 2007-07-27 Paul Thomas <pault@gcc.gnu.org>
649 * trans-decl.c (gfc_trans_deferred_vars): Set intent(out)
650 derived types as referenced, if they have the the default
653 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
655 * gfortran.h (generate_isocbinding_symbol): Constify.
656 * symbol.c (gen_special_c_interop_ptr, gen_cptr_param,
657 generate_isocbinding_symbol): Likewise.
659 2007-07-24 Paul Thomas <pault@gcc.gnu.org>
663 * trans-expr.c (gfc_conv_function_call): Remove the default
664 initialization of intent(out) derived types.
665 * symbol.c (gfc_lval_expr_from_sym): New function.
666 * matchexp.c (gfc_get_parentheses): Return argument, if it is
667 character and posseses a ref.
668 * gfortran.h : Add prototype for gfc_lval_expr_from_sym.
669 * resolve.c (has_default_initializer): Move higher up in file.
670 (resolve_code): On detecting an interface assignment, check
671 if the rhs and the lhs are the same symbol. If this is so,
672 enclose the rhs in parenetheses to generate a temporary and
673 prevent any possible aliasing.
674 (apply_default_init): Remove code making the lval and call
675 gfc_lval_expr_from_sym instead.
676 (resolve_operator): Give a parentheses expression a type-
677 spec if it has no type.
678 * trans-decl.c (gfc_trans_deferred_vars): Apply the a default
679 initializer, if any, to an intent(out) derived type, using
680 gfc_lval_expr_from_sym and gfc_trans_assignment. Check if
681 the dummy is present.
683 2007-07-24 Daniel Franke <franke.daniel@gmail.com>
686 * expr.c (check_init_expr): Simplify matched functions.
688 2007-07-24 Daniel Franke <franke.daniel@gmail.com>
691 * intrinsic.c (add_sym): Do not exclude any symbols, even if not part
692 of the selected standard.
693 (make generic): Likewise.
694 (make alias): Likewise, set standard the alias belongs to.
695 (add_subroutines): Call make_noreturn unconditionally.
696 (check_intrinsic_standard): Change return value to try.
697 (gfc_intrinsic_func_interface): Check return value of above function.
698 (gfc_intrinsic_sub_interface): Likewise.
700 2007-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
703 * trans-decl.c (generate_function_code): Add argument
704 for flag_bounds_check to the array for set_options.
705 * invoke.texi (-fbounds-check): Document new libarary run-time
708 2007-07-23 Daniel Franke <franke.daniel@gmail.com>
712 * expr.c (check_transformational): Reject valid transformational
713 intrinsics to avoid ICE.
714 (check_inquiry): Report error for assumed character lengths for
715 all supported standards.
716 (check_init_expr): Whitespace fix.
718 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
722 * decl.c (verify_bind_c_sym): Use the result symbol for functions
723 with a result clause. Warn if implicitly typed. Verify the type
724 and rank of the SHAPE argument, if given.
725 * resolve.c (gfc_iso_c_sub_interface): Use gfc_procedure_use to
726 check the actual args against the formal, sorting them if
728 * symbol.c (gen_shape_param): Initialize type of SHAPE param to
731 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
734 * trans-decl.c (generate_local_decl): Convert the TREE_TYPE for by
735 value character dummy args of BIND(C) procedures.
736 * trans-expr.c (gfc_conv_variable): Do not build address
737 expression for BT_CHARACTER dummy args.
739 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
740 Tobias Burnus <burnus@net-b.de>
743 * trans-expr.c (gfc_conv_function_call): Handle c_funloc.
744 * trans-types.c: Add pfunc_type_node.
745 (gfc_init_types,gfc_typenode_for_spec): Use it.
746 * resolve.c (gfc_iso_c_func_interface): Fix whitespace and
747 improve error message.
749 2007-07-22 Daniel Franke <franke.daniel@gmail.com>
752 * parse.c (gfc_fixup_sibling_symbols): No replacement of symbols if
753 the current is a namelist.
755 2007-07-22 Daniel Franke <franke.daniel@gmail.com>
761 * gfortran.h (gfc_intrinsic_sym): Changed members elemental, pure,
762 generic, specific, actual_ok, noreturn into bits of a bitfield,
763 added bits for inquiry, transformational, conversion.
764 * check.c (non_init_transformational): Removed, removed all callers.
765 * intrinsic.c (enum class): New.
766 (add_sym*): Replaced argument elemetal by enum class. Changed all
768 (add_functions): Assign appropriate classes to intrinsic functions.
769 (add_subroutines): Assign appropriate classes to intrinsic subroutines.
770 (add_conv): Set conversion attribute.
771 (gfc_init_expr_extensions): Removed, removed all callers.
772 (gfc_intrinsic_func_interface): Reimplemented check for non-standard
773 initializatione expressions.
774 * expr.c (check_specification_function): New.
775 (gfc_is_constant_expr): Added check for specification functions.
776 (check_init_expr_arguments): New.
777 (check_inquiry): Changed return value to MATCH, added checks for
778 inquiry functions defined by F2003.
779 (check_transformational): New.
781 (check_elemental): New.
782 (check_conversion): New.
783 (check_init_expr): Call new check functions, add more specific error
786 2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
789 * resolve.c (set_name_and_label): Set kind number for character
790 version of c_f_pointer.
791 (gfc_iso_c_sub_interface): Set the kind of the SHAPE formal arg to
792 that of the actual SHAPE arg.
793 * symbol.c (gen_shape_param): Initialize kind for SHAPE arg.
795 2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
798 * symbol.c (generate_isocbinding_symbol): Remove unnecessary
802 * resolve.c (gfc_iso_c_func_interface): Reject assumed-shape and
803 deferred-shape arrays as args to C_LOC. Fix bug in testing
804 character args to C_LOC.
806 2007-07-21 Lee Millward <lee.millward@gmail.com>
809 * trans-intrinsic.c (gfc_conv_intrinsic_int): Evaluate all
810 arguments passed, not just the first one. Adjust code to
811 refer to "args[0]" instead of "arg" as a result.
813 2007-07-19 Christopher D. Rickett <crickett@lanl.gov>
816 * trans-expr.c (gfc_conv_function_call): Inline C_LOC.
818 2007-07-18 Christopher D. Rickett <crickett@lanl.gov>
821 * symbol.c (generate_isocbinding_symbol): Fix bug where
822 ISOCBINDING_FUNPTR was generated for C_LOC instead of the needed
825 2007-07-17 Janus Weil <jaydub66@gmail.com>
828 * resolve.c (resolve_fl_namelist): Check for namelist private
829 components in contained subprograms.
831 2007-07-17 Paul Thomas <pault@gcc.gnu.org>
835 * trans-expr.c (gfc_trans_subcomponent_assign): Ensure that
836 renormalization unity base is done independently of existing
838 (gfc_trans_scalar_assign): If rhs is not a variable, put
839 lse->pre after rse->pre to ensure that de-allocation of lhs
840 occurs after evaluation of rhs.
842 2007-07-16 Lee Millward <lee.millward@gmail.com>
847 * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
848 to operate on a stack allocated array for the intrinsic arguments
849 instead of creating a TREE_LIST. Add two new parameters for the
850 array and the number of elements. Update all callers to allocate
851 an array of the correct length to pass in. Update comment.
852 (gfc_intrinsic_argument_list_length): New function.
853 (gfc_conv_intrinsic_conversion): Call it.
854 (gfc_conv_intrinsic_mnimax): Likewise.
855 (gfc_conv_intrinsic_merge): Likewise.
856 (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
858 (gfc_conv_intrinsic_cmplx): Likewise.
859 (gfc_conv_intrinsic_ctime): Likewise.
860 (gfc_covn_intrinsic_fdate): Likewise.
861 (gfc_conv_intrinsic_ttynam): Likewise.
862 (gfc_conv_intrinsic_ishftc): Likewise.
863 (gfc_conv_intrinsic_index): Likewise.
864 (gfc_conv_intrinsic_scan): Likewise.
865 (gfc_conv_intrinsic_verify): Likewise.
866 (gfc_conv_intrinsic_trim): Likewise.
867 (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
868 (gfc_conv_intrinsic_exponent): Likewise.
869 (gfc_conv_intrinsic_bound): Likewise.
870 (gfc_conv_intrinsic_abs): Likewise.
871 (gfc_conv_intrinsic_mod): Likewise.
872 (gfc_conv_intrinsic_sign): Likewise.
873 (gfc_conv_intrinsic_len): Likewise.
874 (gfc_conv_intrinsic_adjust): Likewise.
875 (gfc_conv_intrinsic_si_kind): Likewise.
877 2007-07-16 Janne Blomqvist <jb@gcc.gnu.org>
880 * trans-decl.c (gfc_build_builtin_function_decls): Remove
881 DECL_IS_MALLOC attribute from internal_realloc, thus reverting
882 part of my 2007-07-03 patch.
884 2007-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
885 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
888 * gfortran.h (gfc_option_t): Add flag_sign_zero field.
889 * lang.opt (-fsign-zero): New option.
890 * trans.h: Rename gfor_fndecl_set_std into gfor_fndecl_set_options.
891 * trans-decl.c (gfc_build_builtin_function_decls): Build the function
892 declaration to pass an array containing the options to be used by the
893 runtime library. (gfc_generate_function_code): Build an array that
894 contains option values to be passed to the runtime library and the call
896 * options.c (gfc_init_options): Initialize the flag_sign_zero field.
897 (gfc_handle_option): Handle the -fsign-zero option.
899 2007-07-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
902 * trans-array.c (gfc_conv_array_ref): Only evaluate index once.
904 2007-07-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
907 * iresolve.c (gfc_resolve_mvbits): Convert FROMPOS, LEN and TOPOS
910 2007-07-14 Thomas Koenig <tkoenig@gcc.gnu.org>
913 * iresolve.c(gfc_resolve_pack): A scalar mask has
914 to be kind=4, an array mask with kind<4 is converted
915 to gfc_default_logical_kind automatically.
916 (gfc_resolve_unpack): Convert mask to gfc_default_lotical_kind
919 2007-07-14 Paul Thomas <pault@gcc.gnu.org>
922 * parse.c (parse_spec): Emit error on unexpected statement
925 2007-07-13 Daniel Franke <franke.daniel@gmail.com>
927 * invoke.texi: Unified upper- and lower-case in menus.
928 (-w, -W): Removed, documented by gcc.
929 * intrinsic.texi: Unified Class-section entries, added
930 subroutine/function warning where appropiate.
932 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
935 * decl.c (gfc_match_suffix): Removed surplus general error that hides
936 a more specific message.
937 * resolve.c (resolve_fl_variable): Reject illegal initializiers only
939 (resolve_fl_procedure): Added check for initializers of functions.
941 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
944 * invoke.texi (-static-libgfortran): Document new option.
946 2007-07-12 Paul Thomas <pault@gcc.gnu.org>
950 * module.c (write_generic): Restore patch of 2007-07-10 and use
951 symbol name if there are no use names.
953 2007-07-12 Christopher D. Rickett <crickett@lanl.gov>
956 * decl.c (verify_c_interop_param): Require character string dummy
957 args to BIND(C) procedures to have length 1.
958 * resolve.c (resolve_fl_procedure): Modify parameter checking for
962 * resolve.c (gfc_iso_c_func_interface): Verify that a valid
963 expression is given as an argument to C_LOC and C_ASSOCIATED.
964 * trans-io.c (transfer_expr): Add argument for code block. Add
965 standards check to determine if an error message should be
966 reported for printing C_PTR or C_FUNPTR.
967 (transfer_array_component): Update arguments to transfer_expr.
968 (gfc_trans_transfer): Ditto.
970 * symbol.c (gen_cptr_param): Fix whitespace.
972 2007-07-12 Jakub Jelinek <jakub@redhat.com>
975 * trans.h (GFC_POINTER_TYPE_P): Define.
976 * trans-types.c (gfc_sym_type): Set it for types on attr->sym.pointer.
977 * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
978 if GFC_POINTER_TYPE_P is set on the type.
980 2007-07-12 Richard Guenther <rguenther@suse.de>
982 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Convert
983 arguments to gfc_charlen_type_node.
984 * trans-io.c (gfc_convert_array_to_string): Convert type
985 size to gfc_array_index_type.
987 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
991 * module.c: Reverted Paul's patch from 2007-07-10.
993 2007-07-11 Richard Guenther <rguenther@suse.de>
995 * trans-array.c (gfc_conv_array_parameter): Use correct
996 types for comparison.
997 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
998 correct types for POINTER_PLUS_EXPR.
999 * trans-stmt.c (gfc_trans_forall_loop): Use correct type
1000 for integer one constant.
1002 2007-07-10 Paul Thomas <pault@gcc.gnu.org>
1005 * resolve.c (is_external_proc): New function. Adds test that
1006 the symbol is not an intrinsic procedure.
1007 * (resolve_function, resolve_call): Replace logical statements
1008 with call to is_external_proc.
1011 * simplify.c (gfc_simplify_transfer): If mold has rank, the
1015 * module.c (write_generic): Write the local name of the
1018 2007-07-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1021 * trans-array.c (gfc_trans_array_constructor): Mark offset field
1022 with TREE_NO_WARNING.
1023 * trans-decl.c (gfc_build_qualified_array): Mark lbound, ubound,
1024 stride and size variables with TREE_NO_WARNING.
1026 2007-07-09 Steven G. Kargl <kargl@gcc.gnu.org>
1028 * trans-decl.c (set_tree_decl_type_code): Remove function.
1029 (generate_local_decl): Remove reference to set_tree_decl_type_code.
1031 2007-07-09 Daniel Franke <franke.daniel@gmail.com>
1034 * trans-decl.c (generate_local_decl) Emit a warning if an unused
1037 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
1040 * module.c (gfc_match_use): Do not set an non-existant
1041 intrinsic operator if a user-defined operator is found.
1043 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
1047 * trans-decl.c (generate_local_decl): Adjusted warning on unused
1048 dummy arguments, tell middle-end not to emit additional warnings.
1050 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
1051 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1054 * gfortran.h (gfc_intrinsic_op): Added INTRINSIC_EQ_OS,
1055 INTRINSIC_NE_OS, INTRINSIC_GT_OS, INTRINSIC_GE_OS,
1056 INTRINSIC_LT_OS and INTRINSIC_LE_OS.
1057 * arith.c (eval_intrinsic, eval_type_intrinsic0): Likewise.
1058 * arith.h (gfc_eq, gfc_ne, gfc_gt, gfc_ge, gfc_lt, gfc_le):
1059 Added gfc_intrinsic_op as third argument type.
1060 * dump-parse-tree.c (gfc_show_expr): Account for new enum values.
1061 * expr.c (simplify_intrinsic_op, check_intrinsic_op): Likewise.
1062 * interface.c (check_operator_interface): Likewise.
1063 (gfc_check_interfaces): Added cross-checks for FORTRAN 77 and
1064 Fortran 90 style operators using new enum values.
1065 (gfc_extend_expr): Likewise.
1066 (gfc_add_interface): Likewise.
1067 * match.c (intrinsic_operators): Distinguish FORTRAN 77 style
1068 operators from Fortran 90 style operators using new enum values.
1069 * matchexp.c (match_level_4): Account for new enum values.
1070 * module.c (mio_expr): Likewise.
1071 * resolve.c (resolve_operator): Deal with new enum values, fix
1072 inconsistent error messages.
1073 * trans-expr.c (gfc_conv_expr_op): Account for new enum values.
1075 2007-07-08 Tobias Burnus <burnus@net-b.de>
1078 * interface.c (get_expr_storage_size): Properly obtain lower bound.
1079 (compare_actual_formal): Add space before parenthesis.
1081 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
1084 * resolve.c (resolve_fl_procedure): Added check for PRIVATE types
1085 in PUBLIC interfaces.
1087 2007-07-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1090 * decl.c (match_attr_spec): Don't return MATCH_ERROR if comma found and
1091 gfc_match_bind_c does not return MATCH_YES.
1093 2007-07-07 Kazu Hirata <kazu@codesourcery.com>
1095 * decl.c, gfortran.h, interface.c, module.c, resolve.c,
1096 trans-array.c, trans-decl.c: Fix comment typos. Follow
1097 spelling conventions.
1098 * intrinsic.texi: Fix typos. Follow spelling conventions.
1100 2007-05-06 Daniel Franke <franke.daniel@gmail.com>
1103 * symbol.c (save_status): New.
1104 * gfortran.h (save_status): Added external declaration.
1105 (check_conflict): Check for conflicting explicite SAVE statements
1107 (gen_special_c_interop_ptr): Use SAVE_EXPLICIT constant.
1108 * module.c (ab_attribute, attr_bits): Removed enumerator value
1109 AB_SAVE for save attribute.
1110 (mio_symbol_attribute): Import/export the full SAVE status,
1111 removed usage of AB_SAVE.
1112 * dump-parse-tree.c (gfc_show_attr): Dump full SAVE status.
1113 * decl.c (add_init_expr_to_sym): Set SAVE_IMPLICIT only if not
1116 2007-07-05 Daniel Franke <franke.daniel@gmail.com>
1117 Tobias Burnus <burnus@net-b.de>
1120 * gfortran.h (symbol_attribute): Change save attribute into an enum.
1121 * decl.c (add_init_expr_to_sym): Set it to SAVE_IMPLICIT.
1122 * symbol.c (gfc_add_save): Check for SAVE_EXPLICIT.
1123 * resolve.c (resolve_fl_variable): Check for SAVE_EXPLICIT.
1124 (resolve_symbol): Allow OMP threadprivate with
1125 initialization SAVEd and save_all variable.
1126 * trans-decl.c (gfc_finish_var_decl): Remove obsolete sym->value check.
1128 2007-07-05 Paul Thomas <pault@gcc.gnu.org>
1131 * match.c (gfc_match_call): Check, in all cases, that a symbol
1132 is neither generic nor a subroutine before trying to add it as
1136 * match.c (gfc_match_do): Reset the implied_index attribute.
1138 2007-07-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1141 * trans-intrinsic.c (trans-intrinsic.c): Handle optional
1142 arguments correctly for MIN and MAX intrinsics.
1144 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1147 * io.c (check_format): Always call gfc_error for errors.
1148 (check_format_string): Change type of this function to try and
1149 return the result of check_format.
1150 (check_io_constraints): Return MATCH_ERROR if check_format_string
1153 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1156 * decl.c (get_proc_name): Include attr->mod_proc in check for error.
1158 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1161 * gfortran.h: Change type of gfc_assign_data_value from void to try.
1162 * data.c (gfc_assign_data_value): Return FAILURE if error found.
1163 * resolve.c (check_data_variable): If gfc_assign_data_value returns
1164 failure, break out of loop and return failure.
1166 2007-07-03 Christopher D. Rickett <crickett@lanl.gov>
1169 * symbol.c (gen_cptr_param): Generate C_PTR and C_FUNPTR if necessary.
1170 (build_formal_args): Pass intrinsic module symbol id to
1173 2007-07-03 Tobias Burnus <burnus@net-b.de>
1176 * resolve.c (resolve_common_blocks): New check function.
1177 (resolve_types): Use it.
1179 2007-07-03 Tobias Burnus <burnus@net-b.de>
1182 * interface.c (get_sym_storage_size): New function.
1183 (get_sym_storage_size): New function.
1184 (compare_actual_formal): Enhance sequence association
1185 support and improve checking.
1187 2007-07-03 Janne Blomqvist <jb@gcc.gnu.org>
1189 * trans-decl.c (gfc_build_builtin_function_decls): Mark
1190 internal_realloc as a malloc function.
1192 2007-07-03 Tobias Burnus <burnus@net-b.de>
1195 * resolve.c (resolve_operator): Check for NULL as operand.
1197 2007-07-02 Tobias Burnus <burnus@net-b.de>
1199 * gfortran.texi (Fortran 2003): Add ISO Bind C.
1200 * intrinsic.texi (C_ASSOCIATED,C_F_POINTER,C_F_PROCPOINTER,
1201 C_FUNLOC,C_LOC): Document new ISO Bind C intrinsics.
1203 2007-07-01 Christopher D. Rickett <crickett@lanl.gov>
1205 * interface.c (gfc_compare_derived_types): Special case for comparing
1206 derived types across namespaces.
1207 (gfc_compare_types): Deal with BT_VOID.
1208 (compare_parameter): Use BT_VOID to accept ISO C Binding pointers.
1209 * trans-expr.c (gfc_conv_function_call): Remove setting parm_kind
1211 (gfc_conv_initializer): Deal with ISO C Binding NULL_PTR and
1213 (gfc_conv_expr): Convert expressions for ISO C Binding derived types.
1214 * symbol.c (gfc_set_default_type): BIND(C) variables should not be
1215 Implicitly declared.
1216 (check_conflict): Add BIND(C) and check for conflicts.
1217 (gfc_add_explicit_interface): Whitespace.
1218 (gfc_add_is_bind_c): New function.
1219 (gfc_copy_attr): Use it.
1220 (gfc_new_symbol): Initialize ISO C Binding objects.
1221 (get_iso_c_binding_dt): New function.
1222 (verify_bind_c_derived_type): Ditto.
1223 (gen_special_c_interop_ptr): Ditto.
1224 (add_formal_arg): Ditto.
1225 (gen_cptr_param): Ditto.
1226 (gen_fptr_param): Ditto.
1227 (gen_shape_param): Ditto.
1228 (add_proc_interface): Ditto.
1229 (build_formal_args): Ditto.
1230 (generate_isocbinding_symbol): Ditto.
1231 (get_iso_c_sym): Ditto.
1232 * decl.c (num_idents_on_line, has_name_equals): New variables.
1233 (verify_c_interop_param): New function.
1234 (build_sym): Finish binding labels and deal with COMMON blocks.
1235 (add_init_expr_to_sym): Check if the initialized expression is
1236 an iso_c_binding named constants
1237 (variable_decl): Set ISO C Binding type_spec components.
1238 (gfc_match_kind_spec): Check match for C interoperable kind.
1239 (match_char_spec): Fix comment. Chnage gfc_match_small_int
1240 to gfc_match_small_int_expr. Check for C interoperable kind.
1241 (match_type_spec): Clear the current binding label.
1242 (match_attr_spec): Add DECL_IS_BIND_C. If BIND(C) is found, use it
1244 (set_binding_label): New function.
1245 (set_com_block_bind_c): Ditto.
1246 (verify_c_interop): Ditto.
1247 (verify_com_block_vars_c_interop): Ditto.
1248 (verify_bind_c_sym): Ditto.
1249 (set_verify_bind_c_sym): Ditto.
1250 (set_verify_bind_c_com_block): Ditto.
1251 (get_bind_c_idents): Ditto.
1252 (gfc_match_bind_c_stmt): Ditto.
1253 (gfc_match_data_decl): Use num_idents_on_line.
1254 (match_result): Deal with right paren in BIND(C).
1255 (gfc_match_suffix): New function.
1256 (gfc_match_function_decl): Use it. Code is re-arranged to deal with
1257 ISO C Binding result clauses.
1258 (gfc_match_subroutine): Deal with BIND(C).
1259 (gfc_match_bind_c): New function.
1260 (gfc_get_type_attr_spec): New function. Code is re-arranged in and
1261 taken from gfc_match_derived_decl.
1262 (gfc_match_derived_decl): Add check for BIND(C).
1263 * trans-common.c: Forward declare gfc_get_common.
1264 (gfc_sym_mangled_common_id): Change arg from 'const char *name' to
1265 'gfc_common_head *com'. Check for ISO C Binding of the common block.
1266 (build_common_decl): 'com->name' to 'com in SET_DECL_ASSEMBLER_NAME.
1267 * gfortran.h: Add GFC_MAX_BINDING_LABEL_LEN
1269 (sym_flavor): Add FL_VOID.
1270 (iso_fortran_env_symbol, iso_c_binding_symbol, intmod_id): New enum
1271 (CInteropKind_t): New struct.
1272 (c_interop_kinds_table): Use it. Declare an array of structs.
1273 (symbol_attribute): Add is_bind_c, is_c_interop, and is_iso_c
1275 (gfc_typespec): Add is_c_interop; is_iso_c, and f90_type members.
1276 (gfc_symbol): Add from_intmod, intmod_sym_id, binding_label, and
1277 common_block members.
1278 (gfc_common_head): Add binding_label and is_bind_c members.
1279 (gfc_gsymbol): Add sym_name, mod_name, and binding_label members.
1280 Add prototypes for get_c_kind, gfc_validate_c_kind,
1281 gfc_check_any_c_kind, gfc_add_is_bind_c, gfc_add_value,
1282 verify_c_interop, verify_c_interop_param, verify_bind_c_sym,
1283 verify_bind_c_derived_type, verify_com_block_vars_c_interop,
1284 generate_isocbinding_symbol, get_iso_c_sym, gfc_iso_c_sub_interface
1285 * iso-c-binding.def: New file. This file contains the definitions
1286 of the types provided by the Fortran 2003 ISO_C_BINDING intrinsic
1288 * trans-const.c (gfc_conv_constant_to_tree): Deal with C_NULL_PTR
1289 or C_NULL_FUNPTR expressions.
1290 * expr.c (gfc_copy_expr): Add BT_VOID case. For BT_CHARACTER, the
1291 ISO C Binding requires a minimum string length of 1 for '\0'.
1292 * module.c (intmod_sym): New struct.
1293 (pointer_info): Add binding_label member.
1294 (write_atom): Set len to 0 for NULL pointers. Check for NULL p and *p.
1295 (ab_attribute): Add AB_IS_BIND_C, AB_IS_C_INTEROP and AB_IS_ISO_C.
1296 (attr_bits): Add "IS_BIND_C", "IS_C_INTEROP", and "IS_ISO_C".
1297 (mio_symbol_attribute): Deal with ISO C Binding attributes.
1298 (bt_types): Add "VOID".
1299 (mio_typespec): Deal with ISO C Binding components.
1300 (mio_namespace_ref): Add intmod variable.
1301 (mio_symbol): Check for symbols from an intrinsic module.
1302 (load_commons): Check for BIND(C) common block.
1303 (read_module): Read binding_label and use it.
1304 (write_common): Add label. Write BIND(C) info.
1305 (write_blank_common): Blank commons are not BIND(C). Explicitly
1307 (write_symbol): Deal with binding_label.
1308 (sort_iso_c_rename_list): New function.
1309 (import_iso_c_binding_module): Ditto.
1310 (create_int_parameter): Add to args.
1311 (use_iso_fortran_env_module): Adjust to deal with iso_c_binding
1313 * trans-types.c (c_interop_kinds_table): new array of structs.
1314 (gfc_validate_c_kind): New function.
1315 (gfc_check_any_c_kind): Ditto.
1316 (get_real_kind_from_node): Ditto.
1317 (get_int_kind_from_node): Ditto.
1318 (get_int_kind_from_width): Ditto.
1319 (get_int_kind_from_minimal_width): Ditto.
1320 (init_c_interop_kinds): Ditto.
1321 (gfc_init_kinds): call init_c_interop_kinds.
1322 (gfc_typenode_for_spec): Adjust for BT_VOID and ISO C Binding pointers.
1323 Adjust handling of BT_DERIVED.
1324 (gfc_sym_type): Whitespace.
1325 (gfc_get_derived_type): Account for iso_c_binding derived types
1326 * resolve.c (is_scalar_expr_ptr): New function.
1327 (gfc_iso_c_func_interface): Ditto.
1328 (resolve_function): Use gfc_iso_c_func_interface.
1329 (set_name_and_label): New function.
1330 (gfc_iso_c_sub_interface): Ditto.
1331 (resolve_specific_s0): Use gfc_iso_c_sub_interface.
1332 (resolve_bind_c_comms): New function.
1333 (resolve_bind_c_derived_types): Ditto.
1334 (gfc_verify_binding_labels): Ditto.
1335 (resolve_fl_procedure): Check for ISO C interoperability.
1336 (resolve_symbol): Check C interoperability.
1337 (resolve_types): Walk the namespace. Check COMMON blocks.
1338 * trans-decl.c (gfc_sym_mangled_identifier): Prevent the mangling
1339 of identifiers that have an assigned binding label.
1340 (gfc_sym_mangled_function_id): Use the binding label rather than
1342 (gfc_finish_var_decl): Put variables that are BIND(C) into a common
1343 segment of the object file, because this is what C would do.
1344 (gfc_create_module_variable): Conver to proper types
1345 (set_tree_decl_type_code): New function.
1346 (generate_local_decl): Check dummy variables and derived types for
1347 ISO C Binding attributes.
1348 * match.c (gfc_match_small_int_expr): New function.
1349 (gfc_match_name_C): Ditto.
1350 (match_common_name): Deal with ISO C Binding in COMMON blocks
1351 * trans-io.c (transfer_expr): Deal with C_NULL_PTR or C_NULL_FUNPTR
1353 * match.h: Add prototypes for gfc_match_small_int_expr,
1354 gfc_match_name_C, match_common_name, set_com_block_bind_c,
1355 set_binding_label, set_verify_bind_c_sym,
1356 set_verify_bind_c_com_block, get_bind_c_idents,
1357 gfc_match_bind_c_stmt, gfc_match_suffix, gfc_match_bind_c,
1358 gfc_get_type_attr_spec
1359 * parse.c (decode_statement): Use gfc_match_bind_c_stmt
1360 (parse_derived): Init *derived_sym = NULL, and gfc_current_block
1361 later for valiadation.
1362 * primary.c (got_delim): Set ISO C Binding components of ts.
1363 (match_logical_constant): Ditto.
1364 (match_complex_constant): Ditto.
1365 (match_complex_constant): Ditto.
1366 (gfc_match_rvalue): Check for existence of at least one arg for
1367 C_LOC, C_FUNLOC, and C_ASSOCIATED.
1368 * misc.c (gfc_clear_ts): Clear ISO C Bindoing components in ts.
1369 (get_c_kind): New function.
1371 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
1374 * trans-expr.c (gfc_conv_power_op): Use builtin_powi for
1376 * f95-lang.c (gfc_init_builtin_functions): Add builtin_powi to the
1379 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
1381 * trans.h: Remove decls for 64-bit allocation functions.
1382 * trans-array.c (gfc_grow_array): Always pick the standard realloc
1384 (gfc_array_allocate): Likewise.
1385 * trans-decl.c: Remove trees for 64-bit allocation functions.
1386 (gfc_build_builtin_function_decls): Don't build fndecls for 64-bit
1387 allocations functions, use index_int_type for normal allocation
1390 2007-06-30 Daniel Franke <franke.daniel@gmail.com>
1393 * intrinsic.c (add_functions): Additional function types.
1394 (gfc_convert_type_warn): Remove intrinsic-flag from
1395 conversion functions.
1396 * resolve.c (resolve_symbol): Added type checks to
1397 explicitly defined intrinsics.
1399 2007-06-30 Tobias Burnus <burnus@net-b.de>
1402 * io.c (check_format): Allow zero to precede the
1405 2007-06-30 Paul Thomas <pault@gcc.gnu.org>
1408 * simplify.c (gfc_simplify_repeat): Add handling of character
1409 literal for first argument.
1411 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
1413 * resolve.c (resolve_operator): Added check whether a user
1414 defined operator is available.
1416 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
1418 * openmp.c (resolve_omp_clauses): Adjust error message to
1419 better reflect the actual requirement.
1421 2007-06-29 Tobias Burnus <burnus@net-b.de>
1424 * io.c (format_lex): Fix FMT_ZERO.
1425 (check_format,check_format_string,gfc_match_format,
1426 check_io_constraints) Additional checking for READ.
1428 2007-06-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1431 * lang.opt (static-libgfortran): New option.
1432 * gfortranspec.c (ADD_ARG_LIBGFORTRAN): New macro.
1433 (Option): Add OPTION_static and OPTION_static_libgfortran.
1434 (lookup_option): Handle the new -static-libgfortran option.
1435 (lang_specific_driver): Check whether -static is passed.
1436 Handle the new -static-libgfortran option.
1437 * options.c (gfc_handle_option): If -static-libgfortran is
1438 passed and isn't supported on this configuration, error out.
1440 2007-06-27 Daniel Franke <franke.daniel@gmail.com>
1443 * openmp.c (resolve_omp_clauses): Emit error on allocatable
1444 components in COPYIN, COPYPRIVATE, FIRSTPRIVATE and LASTPRIVATE
1447 2007-06-25 Paul Thomas <pault@gcc.gnu.org>
1450 * resolve.c (check_host_association): Return if the old symbol
1451 is use associated. Introduce retval to reduce the number of
1452 evaluations of the first-order return value.
1455 * match.c (gfc_match_call): If a host associated symbol is not
1456 a subroutine, build a new symtree/symbol in the current name
1459 2007-06-24 Tobias Burnus <burnus@net-de>
1462 * interface.c (gfc_compare_derived_types): Add access check.
1463 * symbol.c (gfc_find_component): Ditto.
1464 (gfc_set_component_attr,gfc_get_component_attr) Copy access state.
1465 * dump-parse-tree.c (gfc_show_components): Dump access state.
1466 * gfortran.h (struct gfc_component): Add gfc_access.
1467 * module.c (mio_component): Add access state.
1468 * (gfc_match_structure_constructor): Check for private access state.
1470 2007-06-24 Paul Thomas <pault@gcc.gnu.org>
1474 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Calculate
1475 the offset between the loop counter and the position as
1476 defined. Add the offset within the loop so that the mask acts
1477 correctly. Do not advance the location on the basis that it
1480 2007-06-22 Daniel Franke <franke.daniel@gmail.com>
1483 * symbol.c (gfc_copy_attr): Emit errors for duplicate
1484 EXTERNAL/INTRINSIC statements.
1486 2007-06-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1489 * expr.c (gfc_check_assign): If the rvalue expression type is NULL_EXPR,
1490 check to see if the lvalue has attribute pointer and data.
1492 2007-06-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1495 * resolve.c (gfc_resolve_iterator_expr): Add check for REAL using
1496 gfc_notify_standard. (gfc_resolve_iterator): Remove check.
1497 (resolve_branch): Change "Obsolete" to "Deleted feature".
1498 * io.c (resolve_tag): Ditto.
1499 * match.c (gfc_match_pause, gfc_match_assign, gfc_match_goto): Ditto.
1501 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1504 * match.c (gfc_match_common): If the symbol value expression type is
1505 NULL_EXPR, don't error if previously initialized.
1507 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1510 * decl.c (get_proc_name) Check symbol for generic interface
1513 2007-06-20 Andrew Pinski <andrew_pinski@playstation.sony.com>
1514 Richard Guenther <rguenther@suse.de>
1517 * trans.c (gfc_build_addr_expr): Use the correct types.
1519 2007-06-19 Paul Thomas <pault@gcc.gnu.org>
1523 * resolve.c (resolve_code): Use gfc_impure_variable as a
1524 condition for rejecting derived types with pointers, in pure
1526 (gfc_impure_variable): Add test for dummy arguments of pure
1527 procedures; any for functions and INTENT_IN for subroutines.
1530 * data.c (gfc_assign_data_value): Change the ICE on an array
1531 reference initializer not being an array into an error and
1532 clear init to prevent a repetition of the error.
1534 2007-06-17 Janne Blomqvist <jb@gcc.gnu.org>
1536 * gfortran.texi: Add documentation for GFORTRAN_UNBUFFERED_n
1537 environment variables. Fix documentation for
1538 GFORTRAN_UNBUFFERED_ALL environment variable.
1540 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1542 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
1543 POINTER_PLUS_EXPR instead of PLUS_EXPR for pointer addition.
1544 * trans-expr.c (gfc_trans_string_copy): Create
1545 POINTER_PLUS_EXPR instead of a PLUS_EXPR
1548 2007-06-14 Paul Thomas <pault@gcc.gnu.org>
1551 * trans-common.c (build_common_decl): If resizing of common
1552 decl is needed, update the TREE_TYPE.
1554 2007-06-13 Tobias Burnus <burnus@net-b.de>
1557 * interface.c (has_vector_section): New.
1558 (compare_actual_formal): Check for array sections with vector subscript.
1560 2007-06-12 Dirk Mueller <dmueller@suse.de>
1562 * trans-stmt.c (gfc_trans_call): fix gcc_assert to
1563 a comparison, not an assignment.
1565 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
1567 * trans-common.c (create_common): Initialize 'field_init'.
1569 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
1573 * trans-common.c (get_init_field): New function.
1574 (create_common): Call get_init_field for overlapping
1575 initializers in equivalence blocks.
1576 * resolve.c (resolve_equivalence_derived, resolve_equivalence):
1577 Remove constraints on initializers in equivalence blocks.
1578 * target-memory.c (expr_to_char, gfc_merge_initializers):
1580 (encode_derived): Add the bit offset to the byte offset to get
1581 the total offset to the field.
1582 * target-memory.h : Add prototype for gfc_merge_initializers.
1584 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
1586 * trans-types.c (gfc_signed_type): Remove.
1587 * trans-types.h (gfc_signed_type): Remove.
1588 * f95-lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
1590 2007-06-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1592 * trans-intrinsic.c: Revert Lee's 2007-06-04 patch.
1594 2007-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
1595 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1598 * match.c (gfc_match_special_char): New function. Match special char.
1600 * match.h: Add prototype.
1601 * io.c (next_char): Use it.
1602 * primary.c (next_string_char): Ditto.
1604 2007-06-06 Steven G. Kargl <kargl@gcc.gnu.org>
1606 * decl.c: Miscellaneous whitespace fixes.
1608 * gfortran.h: Likewise.
1609 * interface.c : Likewise.
1611 * match.c: Likewise.
1612 * match.h: Likewise.
1613 * module.c: Likewise.
1614 * parse.c: Likewise.
1615 * resolve.c: Likewise.
1616 * symbol.c: Likewise.
1617 * trans-array.c: Likewise.
1618 * trans-common.c: Likewise.
1619 * trans-decl.c: Likewise.
1620 * trans-intrinsic.c: Likewise.
1621 * trans-io.c: Likewise.
1622 * trans-stmt.c: Likewise.
1623 * trans-types.c: Likewise.
1625 2007-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1628 * parse.c (decode_statement): Don't call gfc_undo_symbols on MATCH_ERROR
1629 for ST_FUNCTION since it is called in reject_statement.
1630 (parse_contained): If error, loop back after reject_statement and try
1631 again. Free the namespace if an error occured.
1633 2007-06-04 Lee Millward <lee.millward@codesourcery.com>
1635 * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
1636 to operate on a stack allocated array for the intrinsic arguments
1637 instead of creating a TREE_LIST. Add two new parameters for the
1638 array and the number of elements. Update all callers to allocate
1639 an array of the correct length to pass in. Update comment.
1640 (gfc_intrinsic_argument_list_length): New function.
1641 (gfc_conv_intrinsic_mnimax): Call it.
1642 (gfc_conv_intrinsic_merge): Likewise.
1643 (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
1645 (gfc_conv_intrinsic_cmplx): Likewise.
1646 (gfc_conv_intrinsic_ctime): Likewise.
1647 (gfc_covn_intrinsic_fdate): Likewise.
1648 (gfc_conv_intrinsic_ttynam): Likewise.
1649 (gfc_conv_intrinsic_ishftc): Likewise.
1650 (gfc_conv_intrinsic_index): Likewise.
1651 (gfc_conv_intrinsic_scan): Likewise.
1652 (gfc_conv_intrinsic_verify): Likewise.
1653 (gfc_conv_intrinsic_trim): Likewise.
1654 (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
1655 (gfc_conv_intrinsic_exponent): Likewise.
1656 (gfc_conv_intrinsic_bound): Likewise.
1657 (gfc_conv_intrinsic_abs): Likewise.
1658 (gfc_conv_intrinsic_mod): Likewise.
1659 (gfc_conv_intrinsic_sign): Likewise.
1660 (gfc_conv_intrinsic_len): Likewise.
1661 (gfc_conv_intrinsic_adjust): Likewise.
1662 (gfc_conv_intrinsic_si_kind): Likewise.
1664 2007-06-04 Steve Ellcey <sje@cup.hp.com>
1666 * trans-array.c (gfc_conv_array_parameter): Initialize tmp.
1668 2007-05-31 Richard Guenther <rguenther@suse.de>
1670 * trans-expr.c (gfc_conv_expr_op): Use zero constant
1671 that matches the lse type.
1672 (gfc_trans_string_copy): Use sizetype zero constant.
1673 * intrinsic.c (add_functions): The sizeof intrinsic has
1675 * trans-types.c (gfc_get_dtype): Convert size to index
1676 type before shifting.
1677 * trans-array.c (gfc_trans_array_constructor_value): Use
1678 index type for offset computation.
1679 * trans-intrinsic.c (gfc_conv_associated): Use correct type
1682 2007-05-31 Paul Thomas <pault@gcc.gnu.org>
1685 * trans-array.c (gfc_trans_array_constructor): Treat the case
1686 where the ss expression charlen is missing.
1688 22007-05-31 Paul Thomas <pault@gcc.gnu.org>
1691 * module.c (mio_symtree_ref): If an equivalence group member
1692 is not used, give it a hidden symbol and set the pointer_info.
1693 (load_equiv): Only free the equivalence if none of the members
1696 2007-05-29 Daniel Franke <franke.daniel@gmail.com>
1698 * gfortran.h: Renamed 'enum gfc_generic_isym_id' to 'enum gfc_isym_id',
1699 added missing GFC_ISYM_* enumerators, ordered alphabetically.
1700 (struct gfc_intrinsic_sym): Renamed 'generic_id' to 'id'.
1701 (gfc_find_subroutine): New prototype.
1702 * intrinsic.c (add_sym, add_sym_*): Added argument 'id' and changed all callers.
1703 (find_subroutine): Renamed to 'gfc_find_subroutine', removed static.
1704 * dependency.c: Changed usage of isym->generic_id to isym->id.
1705 * openmp.c: Likewise.
1706 * resolve.c: Likewise.
1707 * trans-array.c: Likewise.
1708 * trans-expr.c: Likewise.
1709 * trans-intrinsic.c: Likewise.
1710 * trans-openmp.c: Likewise.
1712 2007-05-28 Tobias Schlüter <tobi@gcc.gnu.org>
1714 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIZEOF.
1715 * intrinsic.c (add_functions): Add stuff for SIZEOF intrinsic.
1716 * intrinsic.h (gfc_check_sizeof): Add prototype of ...
1717 * check.c (gfc_check_sizeof): .. new function.
1718 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): New function.
1719 (gfc_conv_intrinsic_strcmp): Whitespace fix.
1720 (gfc_conv_intrinsic_array_transfer): Remove double initialization,
1721 use fold_build. where appropriate.
1722 (gfc_conv_intrinsic_function): Add case for SIZEOF.
1723 * intrinsic.texi: Add documentation for SIZEOF.
1725 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
1727 * trans-array.c (gfc_conv_expr_descriptor): Edit comment.
1729 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
1732 * target-memory.c (gfc_target_expr_size): Add handling
1733 for size of BT_HOLLERITH variables.
1734 * check.c (gfc_check_transfer): Reject BT_HOLLERITH
1735 variables in MOLD argument of TRANSFER.
1737 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
1739 * gfortran.h (gfc_expr): Remove from_H, add "representation"
1741 * primary.c (match_hollerith_constant): Store the representation
1742 of the Hollerith in representation, not in value.character.
1743 * arith.c: Add dependency on target-memory.h.
1744 (eval_intrinsic): Remove check for from_H.
1745 (hollerith2representation): New function.
1746 (gfc_hollerith2int): Determine value of the new constant.
1747 (gfc_hollerith2real): Likewise.
1748 (gfc_hollerith2complex): Likewise.
1749 (gfc_hollerith2logical): Likewise.
1750 (gfc_hollerith2character): Point both representation.string and
1751 value.character.string at the value string.
1752 * data.c (create_character_initializer): For BT_HOLLERITH
1753 rvalues, get the value from the representation rather than
1755 * expr.c (free_expr0): Update handling of BT_HOLLERITH values
1756 and values with representation.string.
1757 (gfc_copy_expr): Likewise.
1758 * intrinsic.c (do_simplify): Remove special treatement of
1759 variables resulting from Hollerith constants.
1760 * dump-parse-trees.c (gfc_show_expr): Update handling of
1762 * trans-const.c (gfc_conv_constant_to_tree): Replace from_H
1763 check with check for representation.string; get Hollerith
1764 representation from representation.string, not value.character.
1765 * trans-expr.c (is_zero_initializer_p): Replace from_H check
1766 with check for representation.string.
1767 * trans-stmt.c (gfc_trans_integer_select): Use
1768 gfc_conv_mpz_to_tree for case values, so as to avoid picking up
1769 the memory representation if the case is given by a transfer
1771 * target-memory.c (gfc_target_encode_expr): Use the known memory
1772 representation rather than the value, if it exists.
1773 (gfc_target_interpret_expr): Store the memory representation of
1774 the interpreted expression as well as its value.
1775 (interpret_integer): Move to gfc_interpret_integer, make
1777 (interpret_float): Move to gfc_interpret_float, make non-static.
1778 (interpret_complex): Move to gfc_interpret_complex, make
1780 (interpret_logical): Move to gfc_interpret_logical, make
1782 (interpret_character): Move to gfc_interpret_character, make
1784 (interpret_derived): Move to gfc_interpret_derived, make
1786 * target-memory.h: Add prototypes for newly-exported
1787 gfc_interpret_* functions.
1789 2007-05-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1792 * parse.c (next_statement): Warn for truncated lines if source is free
1795 2007-05-27 Paul Thomas <pault@gcc.gnu.org>
1796 Tobias Burnus <burnus@net-b.de>
1799 * symbol.c (gfc_check_function_type): Copy dimensions of
1801 * resolve.c (resolve_contained_fntype): Improve symbol output in
1804 2007-05-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1807 * io.c (check_format): Add warning for H specifier in format.
1809 2007-05-26 Tobias Burnus <burnus@net-b.de>
1811 * gfortran.texi: Document the GFORTRAN_ERROR_DUMPCORE and
1812 GFORTRAN_ERROR_BACKTRACE environment variables.
1814 2007-05-26 Paul Thomas <pault@gcc.gnu.org>
1817 * trans.h : Add no_function_call bitfield to gfc_se structure.
1818 Add stmtblock_t argument to prototype of get_array_ctor_strlen.
1819 * trans-array.c (get_array_ctor_all_strlen): New function.
1820 (get_array_ctor_strlen): Add new stmtblock_t argument and call
1821 new function for character elements that are not constants,
1822 arrays or variables.
1823 (gfc_conv_array_parameter): Call get_array_ctor_strlen to get
1825 * trans-intrinsic (gfc_conv_intrinsic_len): Add new argument
1826 to call of get_array_ctor_strlen.
1828 2007-05-25 Kazu Hirata <kazu@codesourcery.com>
1830 * intrinsic.texi: Fix typos.
1832 2007-05-25 Paul Thomas <pault@gcc.gnu.org>
1835 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Change
1836 order in logic under EXPR_FUNCTION to handle functions with
1839 2007-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1842 * array.c (spec_dimen_size): Test for correct BT_INTEGER type.
1844 2007-05-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1847 * trans-expr.c (gfc_trans_zero_assign): Convert the result of
1848 TYPE_SIZE_UNIT into a signed type.
1849 (gfc_trans_array_copy): Likewise.
1850 (gfc_trans_array_constructor_copy): Likewise.
1851 * trans-array.c (gfc_trans_create_temp_array): Likewise.
1852 (gfc_grow_array): Likewise.
1853 (gfc_array_init_size): Likewise.
1854 (gfc_duplicate_allocatable): Likewise.
1855 * trans-stmt.c (allocate_temp_for_forall_nest_1): Likewise.
1857 2007-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1860 * resolve.c (resolve_function): Don't call resolve_global_procedure if
1861 there is no name. Delete duplicated statement in ELSE clause.
1863 2007-05-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1866 * trans-array.c (gfc_trans_array_bound_check): Take extra argument to
1867 indicate whether we should check the upper bound in that dimension.
1868 (gfc_conv_array_index_offset): Check only the lower bound of the
1869 last dimension for assumed-size arrays.
1870 (gfc_conv_array_ref): Likewise.
1871 (gfc_conv_ss_startstride): Likewise.
1873 2007-05-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1874 Daniel Franke <franke.daniel@gmail.com>
1877 * resolve.c (resolve_actual_arglist): Resolve actual argument after
1878 being identified as variable.
1880 2007-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1883 * trans-stmt.c (gfc_trans_do): Fix the value of loop variable
1886 2007-05-21 H.J. Lu <hongjiu.lu@intel.com>
1888 * trans-stmt.c (gfc_trans_do): Fix a typo in comment.
1890 2007-05-21 Paul Thomas <pault@gcc.gnu.org>
1894 * trans-array.c (gfc_conv_expr_descriptor): Obtain the stored
1895 offset for non-descriptor, source arrays and correct for stride
1896 not equal to one before writing to field of output descriptor.
1898 2007-05-20 Daniel Franke <franke.daniel@gmail.com>
1901 * check.c (check_rest): Improved argument conformance check and
1902 fixed error message generation.
1904 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1907 * Make-lang.in: Remove use of -Wno-error for expr.o, resolve.o,
1908 simplify.o and trans-common.o.
1910 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1913 * trans-array.c (gfc_trans_auto_array_allocation): Avoid
1914 multiplication of mismatched types.
1916 2007-05-18 Daniel Franke <franke.daniel@gmail.com>
1919 * symbol.c (gfc_add_flavor): Add the NAME to error message if
1922 2007-05-15 Daniel Franke <franke.daniel@gmail.com>
1927 * intrinsic.c (check_specific): Check elemental intrinsics for
1929 (add_functions): Fixed dummy argument names of BESJN and BESYN.
1930 Fixed elemental status of MCLOCK and MCLOCK8.
1931 * check.c (check_rest): Added check for array conformance.
1932 (gfc_check_merge): Removed check for array conformance.
1933 (gfc_check_besn): Removed check for scalarity.
1934 * intrinsic.texi (CSHIFT, EOSHIFT): Fixed typos.
1935 (BESJN, BESYN): Clarified documentation.
1937 2007-05-17 Tobias Burnus <burnus@net-b.de>
1939 * gfortran.texi (GFORTRAN_CONVERT_UNIT): Improve documentation.
1941 2007-05-16 Brooks Moses <brooks.moses@codesourcery.com>
1948 * target-memory.c: New file.
1949 * target-memory.h: New file.
1950 * simplify.c: Add #include "target-memory.h".
1951 (gfc_simplify_transfer): Implement constant-
1952 folding for TRANSFER intrinsic.
1953 * Make-lang.in: Add dependencies on new target-memory.* files.
1955 2007-05-15 Paul Brook <paul@codesourcery.com>
1957 * trans-types.c (gfc_type_for_size): Handle signed TImode.
1959 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1962 * trans.h (gfor_fndecl_internal_malloc, gfor_fndecl_internal_malloc64,
1963 gfor_fndecl_internal_free): Remove prototypes.
1964 (gfor_fndecl_os_error, gfc_call_free, gfc_call_malloc): Add prototypes.
1965 * trans.c (gfc_call_malloc, gfc_call_free): New functions.
1966 * f95-lang.c (gfc_init_builtin_functions): Add __builtin_free
1967 and __builtin_malloc builtins.
1968 * trans-decl.c (gfor_fndecl_internal_malloc,
1969 gfor_fndecl_internal_malloc64, gfor_fndecl_internal_free): Remove.
1970 (gfor_fndecl_os_error): Add.
1971 (gfc_build_builtin_function_decls): Don't create internal_malloc,
1972 internal_malloc64 and internal_free library function declaration.
1973 Create os_error library call function declaration.
1974 * trans-array.c (gfc_trans_allocate_array_storage,
1975 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1976 gfc_conv_array_parameter, gfc_duplicate_allocatable): Use
1977 gfc_call_malloc and gfc_call_free instead of building calls to
1978 internal_malloc and internal_free.
1979 * trans-expr.c (gfc_conv_string_tmp): Likewise.
1980 * trans-stmt.c (gfc_do_allocate, gfc_trans_assign_need_temp,
1981 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
1982 gfc_trans_where_2: Likewise.
1983 * trans-intrinsic.c (gfc_conv_intrinsic_ctime,
1984 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
1985 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_trim): Likewise.
1987 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1990 * trans-expr.c (gfc_conv_substring): Evaluate substring bounds
1993 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
1995 * f95-lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1996 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use unsigned_type_for
1997 instead of gfc_unsigned_type.
1998 * trans-stmt.c (gfc_trans_do): Use unsigned_type_for instead of
2000 * trans-types.c (gfc_unsigned_type): Remove.
2001 * trans-types.h (gfc_unsigned_type): Remove.
2003 2007-05-12 Paul Thomas <pault@gcc.gnu.org>
2006 * resolve.c (check_host_association): New function that detects
2007 incorrect host association and corrects it.
2008 (gfc_resolve_expr): Call the new function for variables and
2010 * match.h : Remove prototype for gfc_match_rvalue.
2011 * gfortran.h : Add prototype for gfc_match_rvalue.
2013 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
2016 * trans-expr.c (gfc_conv_function_call): Reduce indirection for
2017 direct assignments of recursive array valued functions.
2018 * primary.c (gfc_match_rvalue): Correct error for recursive
2019 function calls such that directly recursive calls of scalar
2020 function without an explicit result are disallowed.
2022 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
2025 * resolve.c (resolve_fl_namelist): It is not an error if the
2026 namelist element is the result variable of the enclosing
2027 function. Search for the symbol in current and all parent
2028 namespaces for a potential conflict.
2029 * symbol.c (check_conflict): Remove the conflict between
2030 'in_namelist' and 'FL_PROCEDURE' because the symbol info
2031 is not available to exclude function result variables.
2032 * trans-io.c (nml_get_addr_expr): Use the fake result decl
2033 if the symbol is an implicit result variable.
2035 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
2038 * decl.c (get_proc_name): If an entry has already been declared
2039 as a module procedure, pick up the symbol and the symtree and
2040 use them for the entry.
2042 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
2045 * resolve.c (resolve_symbol): Remove the flagging mechanism from the
2046 formal namespace resolution and instead check that the formal
2047 namespace is not the current namespace.
2049 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
2052 * trans-array.c (gfc_conv_array_parameter): Convert full array
2053 references to the result of the procedure enclusing the call.
2055 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
2059 * decl.c (add_init_expr_to_sym): Expand a scalar initializer
2060 for a parameter array into an array expression with the right
2062 * array.c (spec_dimen_size): Remove static attribute.
2063 * gfortran.h : Prototype for spec_dimen_size.
2065 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2068 * trans-stmt.c (gfc_trans_do): Handle large loop counts.
2070 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2073 * simplify.c (gfc_simplify_new_line): NEW_LINE can be simplified
2074 even for non constant arguments.
2076 2007-05-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2077 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2080 * gfortran.h: Add runtime error codes from libgfortran.h. Define
2082 * trans.c (gfc_trans_runtime_check): Update the format of runtime error
2083 messages to match library runtime errors. Use call to new library
2084 function runtime_error_at().
2085 * trans.h: Add prototype for new function gfc_trans_io_runtime_check.
2086 Add declaration for library functions runtime_error_at and
2088 * trans_io.c (gfc_trans_io_runtime_check): New function.
2089 (set_parameter_value): Add error checking for UNIT numbers.
2090 (set_parameter_ref): Initialize the users variable to zero.
2091 (gfc_trans_open): Move setting of unit number to after setting of common
2092 flags so that runtime error trapping can be detected.
2093 (gfc_trans_close): Likewise. (build_filepos): Likewise.
2094 (gfc_trans_inquire): Likewise. (build_dt): Likewise.
2095 * trans-decl.c: Add declarations for runtime_error_at and
2096 generate_error. (gfc_build_builtin_function_decls): Build function
2097 declarations for runtime_error_at and generate_error.
2099 2007-05-06 Paul Thomas <pault@gcc.gnu.org>
2102 * resolve.c (resolve_fl_procedure): Resolve constant character
2105 2007-05-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2108 * decl.c (match_char_spec): Add check for invalid character lengths.
2110 2007-05-04 Brooks Moses <brooks.moses@codesourcery.com>
2112 * intrinsic.texi (CMPLX): Document result kind.
2113 (COMPLEX): Add documentation.
2115 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
2118 * intrinsic.c (add_functions): Replaced calls to gfc_check_g77_math1
2119 by gfc_check_fn_r to avoid checks for scalarity.
2120 * check.c (gfc_check_besn): Removed check for scalarity.
2121 (gfc_check_g77_math1): Removed.
2122 * intrinsic.h (gfc_check_g77_math1): Removed.
2124 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
2126 * check.c (gfc_check_fseek_sub): Fixed typo.
2128 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
2131 * intrinsic.c (add_subroutines): Added FSEEK.
2132 * intrinsic.h (gfc_resolve_fseek_sub, gfc_check_fseek_sub): New.
2133 * iresolve.c (gfc_resolve_fseek_sub): New.
2134 * check.c (gfc_check_fseek_sub): New.
2135 * intrinsic.texi (FSEEK): Updated.
2137 2007-05-04 Tobias Burnus <burnus@net-b.de>
2140 * expr.c (gfc_check_pointer_assign): Check for NULL pointer.
2142 2007-05-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2145 * simplify.c (gfc_simplify_len): Only simplify integer lengths.
2147 2007-05-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2150 * simplify.c (gfc_simplify_repeat): Don't put function call with
2151 side effect in a gcc_assert().
2153 2007-05-04 Tobias Burnus <burnus@net-b.de>
2156 * interface.c (compare_actual_formal): Check character length.
2158 2007-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
2161 * dependency.c (gfc_full_array_ref_p): If the reference is
2162 to a single element, check that the array has a single
2163 element and that the correct element is referenced.
2165 2007-05-01 Daniel Franke <franke.daniel@gmail.com>
2167 * intrinsic.c (add_functions): Fixed ELEMENTAL specifications.
2168 (add_subroutines): Replaced magic numbers in function calls by
2169 ELEMENTAL and NOT_ELEMENTAL respectively.
2170 * intrinsic.texi (MVBITS): Changed class to elemental subroutine.
2171 (RANDOM_NUMBER): Changed class to subroutine.
2172 (HUGE, TINY): Changed class to inquiry function.
2174 2007-04-30 Brooks Moses <brooks.moses@codesourcery.com>
2176 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_get_double_int.
2177 (gfc_conv_tree_to_mpz): New function.
2178 (gfc_conv_mpfr_to_tree): Use real_from_mpfr.
2179 (gfc_conv_tree_to_mpfr): New function.
2180 * trans-const.h: (gfc_conv_tree_to_mpz): New prototype.
2181 (gfc_conv_tree_to_mpfr): New prototype.
2183 2007-04-30 Daniel Franke <franke.daniel@gmail.com>
2185 * intrinsic.texi (IERRNO): Changed class to non-elemental function.
2186 (LOG10): Removed COMPLEX as accepted argument type.
2187 (NEW_LINE): Changed class from elemental to inquiry function.
2188 (SIGN): Removed requirement of scalar arguments.
2189 (SNGL): Changed class to elemental function.
2191 2007-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2194 * simplify.c (simplify_bound_dim): New function.
2195 (simplify_bound): Use the above. Perform simplification of LBOUND
2196 and UBOUND when DIM argument is not present.
2198 2007-04-29 Daniel Franke <franke.daniel@gmail.com>
2200 * gfortran.texi: Cleaned up keyword index.
2201 * invoke.texi: Likewise.
2202 * intrinsic.texi: Likewise.
2204 2007-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2207 * scanner.c (load_file): Discard the byte order mark if one is
2208 found on the first non-preprocessor line of a file.
2210 2007-04-29 Paul Thomas <pault@gcc.gnu.org>
2213 * trans-array.c (gfc_conv_resolve_dependencies): Create a temp
2214 whenever a dependency is found.
2216 2007-04-28 Tobias Schlüter <tobi@gcc.gnu.org>
2218 * options.c (gfc_handle_option): Ensure requested free form line
2219 length is not too small.
2221 2007-04-27 Brooks Moses <brooks.moses@codesourcery.com>
2223 * intrinsic.texi (Transfer): Improve documentation.
2225 2007-04-27 Brooks Moses <brooks.moses@codesourcery.com>
2227 * gfortran.texi (Option Index): Add @samp as needed.
2229 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
2231 * gfortran.texi: Added node and menu entry for an option index.
2232 * invoke.texi: Moved command line option related entries of the concept
2233 index to the option index.
2235 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
2237 * intrinsic.texi (AND, FPUT, FPUTC, MODULO, OR, SET_EXPONENT,
2238 XOR): Fixed examples.
2240 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
2242 * intrinsic.texi (PRODUCT, RESHAPE, SPACING, SPREAD, SUM,
2243 SYSTEM_CLOCK, TRANSFER, UNPACK): New.
2244 (DATE_AND_TIME, CPU_TIME, RRSPACING): Added cross references.
2246 2007-04-26 Daniel Franke <franke.daniel@gmail.com>
2248 * intrinsic.texi (NULL, PACK, PRESENT, REPEAT, SCAN, SHAPE,
2249 SIZE, TRANSPOSE, TRIM, VERIFY): New.
2250 (ADJUSTL, ADJUSTR, INDEX): Added cross references.
2251 (INT, INT2, INT8, LONG): Enabled section header.
2253 2007-04-25 Janne Blomqvist <jb@gcc.gnu.org>
2255 * module.c (module_char): Replace fgetc() with
2257 (write_char): Replace fputc() with putc().
2258 * scanner.c (load_line): Replace fgetc() with getc().
2259 (gfc_read_orig_filename): Likewise.
2261 2007-04-25 Tobias Burnus <burnus@net-b.de>
2264 * error.c (error_print): Fix %% support.
2265 * intrinsic.c (sort_actual): Improve error message.
2266 * resolve.c (resolve_actual_arglist): Allow %VAL for
2267 interfaces defined in the module declaration part.
2269 2007-04-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2272 * intrinsic.texi (GETLOG): Update documentation to reflect
2275 2007-04-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2278 * module.c (write_char): Add character to the MD5 buffer.
2279 (read_md5_from_module_file): New function.
2280 (gfc_dump_module): Compute MD5 for new module file. Call
2281 read_md5_from_module_file. Only overwrite old module file
2282 if the new MD5 is different.
2284 2007-04-23 Paul Thomas <pault@gcc.gnu.org>
2287 * resolve.c (resolve_symbol): Allow resolution of formal
2288 namespaces nested within formal namespaces coming from modules.
2291 * trans-expr.c (gfc_trans_assignment): Make the call to
2292 gfc_trans_zero_assign conditional on the lhs array ref being
2295 2007-04-23 Tobias Burnus <burnus@net-b.de>
2297 * primary.c (match_integer_constant): Mention -fno-range-check
2298 in the error message.
2300 2007-04-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2303 * scanner.c (load_line): Remove check for comment after ampersand and
2304 adjust tracking of ampersand.
2306 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
2308 * f95-lang.c (lang_tree_node): Use GENERIC_NEXT
2309 instead of checking GIMPLE_STMT_P in chain_next.
2311 2007-04-17 Tobias Schlüter <tobi@gcc.gnu.org>
2313 * trans-types.h (gfc_packed): New enum.
2314 (gfc_get_nodesc_array_type): Change prototype to use new enum.
2315 * trans-types.c (gfc_get_nodesc_array): Use gfc_packed for
2316 argument packed. Adapt all references to values accordingly.
2317 (gfc_sym_type): Use enum values in call to gfc_get_nodesc_array.
2318 (gfc_get_derived_type): Likewise.
2319 * trans-array.c (gfc_build_constant_array_constructor): Likewise.
2320 * trans-expr.c (gfc_get_interface_mapping_charlen): Changed packed
2321 argument to type gfc_packed.
2322 (gfc_add_interface_mapping): Use enum values in call to
2323 gfc_get_interface_mapping.
2324 * trans-decl.c (gfc_build_dummy_array_decl): Adapt to use enum
2325 values when determining packing.
2327 * trans-decl.c (gfc_finish_decl): Remove unused second argument
2328 'init'. Simplify code accordingly. Remove calls to
2329 gfc_fatal_error in favor of gcc_assert.
2330 (create_function_arglist): Remove second argument from calls to
2332 (gfc_trans_dummy_character): Likewise.
2334 * arith.h: Update copyright years.
2335 * dependency.h: Likewise.
2336 * gfortran.h: Likewise.
2337 * lang-specs.h: Likewise.
2338 * parse.h: Likewise.
2339 * symbol.c: Likewise.
2340 * trans.h: Likewise.
2341 * trans.c: Likewise.
2342 * trans-array.c: Likewise.
2343 * trans-common.c: Likewise.
2344 * trans-const.h: Likewise.
2345 * trans-const.c: Likewise.
2346 * trans-decl.c: Likewise.
2347 * trans-expr.c: Likewise.
2348 * trans-io.c: Likewise.
2349 * trans-openmp.c: Likewise.
2350 * trans-types.h: Likewise.
2351 * types.def: Likewise.
2353 2007-04-17 Tobias Schlüter <tobi@gcc.gnu.org>
2356 * decl.c (gfc_sym_mangled_identifier): Use capital letters in name
2358 (gfc_sym_mangled_function_id): Likewise.
2360 2007-04-15 Paul Thomas <pault@gcc.gnu.org>
2363 * primary.c (check_for_implicit_index): New function to check
2364 that a host associated variable is not an undeclared implied
2366 (gfc_match_rvalue, match_variable): Use it and reset the
2367 implied_index attribute.
2368 * gfortran.h : Add the implied_index field to symbol_attribute.
2369 * match.c (gfc_match_iterator): Mark the iterator variable
2370 with the new attribute.
2371 * decl.c (build_sym): Reset the new attribute.
2373 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
2375 * gfc-internals.texi: Fix typos.
2376 * simplify.c: Fix a comment typo.
2378 2007-04-14 Bernhard Fischer <aldot@gcc.gnu.org>
2380 * primary.c: Commentary typo fix; Add question about redundant (?)
2383 2007-04-14 Paul Thomas <pault@gcc.gnu.org>
2387 * expr.c (scalarize_intrinsic_call): New function to
2388 scalarize elemental intrinsic functions in initialization
2390 (check_init_expr): Detect elemental intrinsic functions
2391 in initalization expressions and call previous.
2393 2007-04-13 Tobias Burnus <burnus@net-b.de>
2396 * primary.c (match_variable): External functions
2399 2007-04-13 Paul Thomas <pault@gcc.gnu.org>
2402 * trans-types.c (copy_dt_decls_ifequal): Do not get pointer
2403 derived type components.
2405 2007-04-13 Tobias Schlüter <tobi@gcc.gnu.org>
2408 * resolve.c: Include obstack.h and bitmap.h. New variable
2410 (code_stack): Add tail and reachable_labels fields.
2411 (reachable_labels): New function.
2412 (resolve_branch): Rework to use new fields in code_stack.
2413 (resolve_code): Call reachable_labels.
2414 (resolve_codes): Allocate and free labels_obstack.
2416 2007-04-12 Tobias Schlüter <tobi@gcc.gnu.org>
2419 * decl.c (match_char_spec): Move check for negative CHARACTER
2421 * resolve.c (resolve_charlen): ... here.
2422 (resolve_types): Resolve CHARACTER lengths earlier.
2424 2007-04-12 Daniel Franke <franke.daniel@gmail.com>
2427 * intrinsic.texi (RANDOM_SEED, RANDOM_NUMBER): New.
2429 2007-04-12 Tobias Schlüter <tobi@gcc.gnu.org>
2432 * primary.c (gfc_variable_attr): Don't copy string length if it
2434 * resolve.c (resolve_code): Clarify error message.
2437 * decl.c (gfc_match_end): Also check for construct name in END
2438 FORALL and END WERE statements.
2439 * match.c (match_case_eos): Use uppercase for statement name in
2441 (match_elsewhere): Construct name may appear iff construct has a
2444 * trans-types.c: Update copyright years. Reformat long comment
2445 explaining array descriptor format. Remove obsolete mention of
2448 * arith.c (gfc_arith_uplus): Rename to ...
2449 (gfc_arith_identity): ... this.
2450 (gfc_parentheses): New function.
2451 (gfc_uplus): Adapt to renamed function.
2452 * arith.h (gfc_parentheses): Add prototype.
2453 * expr.c (gfc_copy_expr): Deal with INTRINSIC_PARENTHESES.
2454 (simplifiy_intrinsic_op): Treat INTRINSIC_UPLUS separately from
2455 INTRINSIC_PARENTHESES.
2457 2007-04-12 Tobias Burnus <burnus@net-b.de>
2460 * decl.c (match_attr_spec): Allow PRIVATE/PUBLIC
2461 attribute in type definitions.
2462 (gfc_match_private): Allow PRIVATE statement only
2463 in specification part of modules.
2464 (gfc_match_public): Ditto for PUBLIC.
2465 (gfc_match_derived_decl): Allow PRIVATE/PUBLIC attribute only in
2466 specificification part of modules.
2468 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
2471 * intrinsic.c (add_functions): Add ref. to gfc_resolve_achar.
2472 * intrinsic.h : Add prototype for gfc_resolve_achar.
2473 * iresolve.c (gfc_resolve_achar): New function.
2475 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
2478 * resolve.c (resolve_fl_variable): Set flag to 2 for automatic
2479 arrays. Make condition for automatic array error explicit.
2480 If a dummy, no error on an INTENT(OUT) derived type.
2482 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
2485 * expr.c (find_array_element): Correct arithmetic for rank > 1.
2487 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
2490 * check.c (numeric_check): If an expresson has not got a type,
2491 see if it is a symbol for which a default type applies.
2493 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
2496 * trans-decl.c (gfc_get_symbol_decl): Allow unreferenced use
2499 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
2502 * symbol.c (gfc_check_function_type): New function.
2503 * gfortran.h : Add prototype for previous.
2504 * parse.c (parse_progunit): Call it after parsing specification
2507 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
2510 * trans-expr.c (gfc_conv_function_call): Give a dummy
2511 procedure the correct type if it has alternate returns.
2513 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
2516 * decl.c (gfc_match_modproc): Go up to the top of the namespace
2517 tree to find the module namespace for gfc_get_symbol.
2519 2007-04-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2522 * fortran/gfortran.h (gfc_charlen_int_kind): New prototype.
2523 * fortran/trans-types.c (gfc_charlen_int_kind): New variable.
2524 (gfc_init_types): Define gfc_charlen_int_kind.
2525 * fortran/trans.h (gfor_fndecl_string_repeat): Remove prototype.
2526 * fortran/trans-decl.c (gfor_fndecl_string_repeat): Delete.
2527 (gfc_build_intrinsic_function_decls): Don't set
2528 gfor_fndecl_string_repeat.
2529 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_repeat): Rewrite
2530 so that we don't have to call a library function.
2531 * fortran/simplify.c (gfc_simplify_repeat): Perform the necessary
2532 checks on the NCOPIES argument, and work with arbitrary size
2535 2007-03-31 Tobias Burnus <burnus@net-b.de>
2537 * intrinsic.c (add_functions): Fix name of dummy argument
2538 for new_line and exit intrinsic.
2540 2007-03-31 Paul Thomas <pault@gcc.gnu.org>
2543 * gfortran.texi: Add a section for the %VAL, %REF and %LOC
2546 2007-03-30 Rafael Avila de Espindola <espindola@google.com>
2548 * trans-types.c (gfc_signed_or_unsigned_type): Remove.
2549 (gfc_unsigned_type): Use get_signed_or_unsigned_type instead of
2550 gfc_signed_or_unsigned_type.
2551 (gfc_signed_type): Ditto.
2552 * trans-types.h (gfc_signed_or_unsigned_type): Remove.
2553 * f95-lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
2555 2007-03-30 Tobias Schlüter <tobi@gcc.gnu.org>
2557 * symbol.c (gfc_find_gsymbol): Simplify, don't unconditionally
2558 descend into all branches.
2560 2007-03-29 Tobias Schlüter <tobi@gcc.gnu.org>
2562 * intrinsic.c (conv_name): Let gfc_get_string handle the format.
2563 (find_conv): Compare pointers instead of calling strcmp.
2564 (find_sym): Likewise, but ensure that the compared pointer is in
2565 the global string table.
2567 2007-03-28 Tobias Schlüter <tobi@gcc.gnu.org>
2569 * gfc-internals.texi: Fix output filename. Merge type index into
2570 concept index. Start documentation of gfc_code structure.
2572 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
2574 * gfc-internals.texi: New file,
2575 * Make-lang.in: Add rules to convert it to dvi, pdf, and info.
2577 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
2579 * error.c (show_locus): Remove always-false test.
2581 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
2583 * lang.opt: Minor edits to descriptions.
2585 2007-03-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2588 * fortran/interface.c (check_operator_interface): Implement
2589 the standard checks on user operators extending intrinsic operators.
2590 * fortran/resolve.c (resolve_operator): If the ranks of operators
2591 don't match, don't error out but try the user-defined ones first.
2593 2007-03-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2596 * expr.c (check_dimension): Fix logic of comparisons.
2598 2007-03-24 Paul Thomas <pault@gcc.gnu.org>
2601 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Return
2602 int result that is non-zero if the expression is the function
2603 result. Only the characteristics of the result expression
2604 can be used in a procedure interface, so simplify LEN in situ
2605 using its character length.
2609 * trans-expr.c (gfc_conv_function_call): Do not use
2610 gfc_conv_expr_reference for actual pointer function with formal
2611 target because a temporary is created that does not transfer
2612 the reference correctly. Do not indirect formal pointer
2613 functions since it is the function reference that is needed.
2615 2007-03-24 Brooks Moses <brooks.moses@codesourcery.com>
2617 * gfortran.h: Edit comments on GFC_STD_*.
2619 2007-03-23 Brooks Moses <brooks.moses@codesourcery.com>
2621 * invoke.texi: Misc. small typo fixes.
2622 (-Wcharacter-truncation): Add.
2623 (-Wnonstd-intrinsics): Correct spelling.
2625 (-fintrinsic-modules-path): Add.
2627 2007-03-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2630 * arith.c (complex_pow): Rewrite to handle large power.
2631 (gfc_arith_power): Handle large power in the real and integer
2634 2007-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2637 * trans-const.c (gfc_conv_mpz_to_tree): Allow integer constants
2638 larger than twice the width of a HOST_WIDE_INT.
2640 2006-03-22 Paul Thomas <pault@gcc.gnu.org>
2643 * trans-intrinsic.c (gfc_size_in_bytes): Remove function.
2644 (gfc_conv_intrinsic_array_transfer): Remove calls to previous.
2645 Explicitly extract TREE_TYPEs for source and mold. Use these
2646 to calculate length of source and mold, except for characters,
2647 where the se string_length is used. For mold, the TREE_TYPE is
2648 recalculated using gfc_get_character_type_len so that the
2649 result is correctly cast for character literals and substrings.
2650 Do not use gfc_typenode_for_spec for the final cast.
2652 2007-03-22 Tobias Schlüter <tobi@gcc.gnu.org>
2655 * decl.c (gfc_match_derived_decl): Reliably reject
2656 'doubleprecision' and 'doublecomplex' as type names.
2658 2007-03-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2661 * trans-expr.c (gfc_trans_init_string_length): Length should
2663 (gfc_conv_function_call): Likewise.
2665 2007-03-18 Paul Thomas <pault@gcc.gnu.org>
2669 * symbo.c : Add gfc_derived_types.
2670 (gfc_free_dt_list): Free derived type list gfc_derived_types.
2671 (gfc_free_namespace): Remove call to gfc_free_dt_list.
2672 (gfc_symbol_done_2): Call gfc_free_dt_list.
2673 * gfortran.h : Declare gfc_derived_types to be external. Remove
2674 derived types field from gfc_namespace.
2675 * resolve.c (resolve_fl_derived): Refer to gfc_derived types
2676 rather than namespace derived_types.
2677 (resolve_fntype): Remove special treatment for module
2678 derived type functions.
2679 * trans-types.c (gfc_get_derived_type): Remove search for like
2680 derived types. Finish by copying back end declaration to like
2681 derived types in the derived type list gfc_derived_types.
2683 2007-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2686 * trans-expr.c (gfc_conv_powi): Make n argument unsigned hwi.
2687 (gfc_conv_cst_int_power): Handle integer exponent with care,
2688 since it might be too large for us.
2690 2007-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2693 * invoke.texi: Fix typo.
2695 2007-03-16 Tobias Burnus <burnus@net-b.de>
2697 * trans-decl.c (gfc_generate_function_code): Use all arguments of
2700 2007-03-15 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2702 * gfortran.h (gfc_option_t): Add flag_backtrace field.
2703 * lang.opt: Add -fbacktrace option.
2704 * invoke.texi: Document the new option.
2705 * trans-decl.c (gfc_build_builtin_function_decls): Add new
2706 option to the call to set_std.
2707 * options.c (gfc_init_options, gfc_handle_option): Handle the
2710 2007-03-15 Tobias Burnus <burnus@gcc.gnu.org>
2711 Paul Thomas <pault@gcc.gnu.org>
2714 * decl.c (gfc_match_import): If the parent of the current name-
2715 space is null, try looking for an imported symbol in the parent
2716 of the proc_name interface.
2717 * resolve.c (resolve_fl_variable): Do not check for blocking of
2718 host association by a same symbol, if the symbol is in an
2721 2007-03-15 Paul Thomas <pault@gcc.gnu.org>
2724 * decl.c (match_data_constant): Before going on to try to match
2725 a name, try to match a structure component.
2729 * resolve.c (resolve_actual_arglist): Do not reject a generic
2730 actual argument if it has a same name specific interface.
2733 * trans-array.c (parse_interface): Do not nullify allocatable
2734 components if the symbol has the saved attribute.
2736 2007-03-14 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2738 * trans-array.c (gfc_trans_auto_array_allocation): Replace
2739 fold(convert()) by fold_convert().
2740 (gfc_duplicate_allocatable): Likewise.
2741 * trans-intrinsic.c (gfc_conv_intrinsic_dot_product): Use
2742 build_int_cst instead of converting an integer_zero_node
2745 2007-03-14 Jakub Jelinek <jakub@redhat.com>
2747 * module.c (mio_typespec): Don't look at ts->cl if not BT_CHARACTER.
2749 2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
2754 * intrinsics.texi (CHDIR): Fix argument names, note
2755 that STATUS must be a default integer.
2756 (CTIME): Fix argument names, note that RESULT must
2757 be a default integer.
2758 (EXIT): Note that STATUS must be a default integer.
2760 2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
2763 * intrinsic.texi: General whitespace cleanup, remove
2764 comment about missing intrinsics.
2765 (menu): Add lines for new entries listed below.
2766 (ACOSH): Mention specific function DACOSH, correct
2767 description phrasing.
2768 (ASINH): Mention specific function DASINH, correct
2769 description phrasing.
2770 (ATANH): Mention specific function DATANH, correct
2771 description phrasing.
2772 (COS): Add index entry for CCOS.
2773 (CPU_TIME): Correct "REAL" to "REAL(*)".
2774 (EXP): Add index entry for CEXP.
2775 (INT): Correct argument name to "A".
2779 (MAX): Add index entries for specific variants.
2780 (MCLOCK): New entry.
2781 (MCLOCK8): New entry.
2782 (SECNDS): Adjust to a more standard form.
2783 (SECOND): New entry.
2784 (TIME): Add cross-reference to MCLOCK.
2785 (TIME8): Add cross-reference to MCLOCK8.
2787 2007-03-11 Paul Thomas <pault@gcc.gnu.org>
2790 * parse.c (parse_interface): Use the default types from the
2791 formal namespace if a function or its result do not have a type
2792 after parsing the specification statements.
2794 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
2796 * intrinsic.texi: (ICHAR) Improve internal I/O note.
2797 (ACHAR): Reference it.
2798 (CHAR): Reference it.
2799 (IACHAR): Reference it.
2801 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
2803 * intrinsic.texi: (LINK) Document function form.
2809 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
2811 * intrinsic.texi: minor typo fixes, removed prologue.
2812 (FSEEK): moved to correct place in alphabetical order.
2814 2007-03-08 Daniel Franke <franke.daniel@gmail.com>
2817 * check.c (gfc_check_alarm_sub): Added check for default integer
2818 kind of status argument.
2819 * iresolve.c (gfc_resolve_alarm_sub): Removed conversion of
2821 * intrinsic.texi (ALARM): Extended documentation.
2823 2007-03-08 Daniel Franke <franke.daniel@gmail.com>
2825 * intrinsic.texi (GERROR, ISATTY, TTYNAM): New.
2826 (ABORT, FLUSH, FNUM, IRAND, MALLOC, SIGNAL, SRAND): Fixed typo.
2827 * intrinsic.c (add_subroutines): Adjusted dummy argument names
2828 of GERROR and TTYNAM.
2830 2007-07-08 Tobias Burnus <burnus@net-b.de>
2832 * module.c (gfc_match_use): Support renaming of operators
2834 * gfortran.texi (Fortran 2003 Status): Document support of
2835 renaming of operators.
2837 2007-07-08 Tobias Burnus <burnus@net-b.de>
2840 * module.c (read_module): Always import module name as symbol.
2841 (gfc_match_use): Disallow module name in the only clause of
2844 2007-03-08 Paul Thomas <pault@gcc.gnu.org>
2847 * expr.c (find_array_section): Correct arithmetic for section
2850 2007-03-07 Brooks Moses <brooks.moses@codesourcery.com>
2852 * iresolve.c (gfc_resolve_ishftc): Correct s_kind value.
2854 2007-03-06 Daniel Franke <franke.daniel@gmail.com>
2856 PR documentation/30950
2857 * intrinsic.texi (AND, CPU_TIME): Fix dummy argument names.
2858 (FREE): Fix call syntax.
2860 2007-03-06 Brooks Moses <brooks.moses@codesourcery.com>
2862 * intrinsic.texi: Limit column widths to a total of .85.
2864 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
2866 * gfortran.texi (GFortran and G77): Rewrite completely.
2868 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
2870 * match.c (gfc_match_name): Expanded comment.
2872 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
2874 * gfortran.texi (Old-style kind specifications): Document
2875 special handling of old-style kind specifiers for COMPLEX.
2876 * decl.c (gfc_match_old_kind_spec): Document kind/bytesize
2877 assumptions for COMPLEX in comment.
2879 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
2882 * gfortranspec.c (lang_specific_driver): Update program
2883 name and copyright date.
2885 2007-03-03 Paul Thomas <pault@gcc.gnu.org>
2888 * check.c (dim_rank_check): The shape of subsections of
2889 assumed-size arrays is known.
2891 2007-03-02 Paul Thomas <pault@gcc.gnu.org>
2892 Tobias Burnus <burnus@net-b.de>
2895 * decl.c (gfc_match_entry): Remove erroneous entry result check.
2897 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
2899 * Make-lang.in: Add install-pdf target as copied from
2900 automake v1.10 rules.
2902 2007-03-01 Tobias Burnus <burnus@net-b.de>
2905 * trans-intrinsic.c (gfc_conv_intrinsic_size): Compare pointers.
2907 2007-02-28 Tobias Burnus <burnus@net-b.de>
2908 Paul Thomas <pault@gcc.gnu.org>
2912 * resolve.c (resolve_actual_arglist): Allow by-value
2913 arguments and non-default-kind for %VAL().
2914 * trans-expr.c (conv_arglist_function): Allow
2915 non-default-kind for %VAL().
2917 2007-02-28 Tobias Burnus <burnus@net-b.de>
2920 * primary.c (next_string_char): Correct reading a character
2921 after the delimiter.
2922 (match_string_constant): Print warning message only once.
2924 2007-02-27 Richard Guenther <rguenther@suse.de>
2926 * trans-array.c (structure_alloc_comps): Use correct type
2927 for null pointer constant.
2929 2007-02-26 Brooks Moses <brooks.moses@codesourcery.com>
2931 * gfortran.texi: Standardize title page, remove version number
2932 from copyright page.
2934 2007-02-26 Thomas Koenig <Thomas.Koenig@online.de>
2935 Paul Thomas <pault@gcc.gnu.org>
2938 * trans-intrinsic.c (gfc_conv_intrinsic_size):
2939 If dim is an optional argument, check for its
2940 presence and call size0 or size1, respectively.
2942 2007-02-23 Paul Thomas <pault@gcc.gnu.org>
2945 * resolve.c (has_default_initializer): New function.
2946 (resolve_fl_variable): Call has_default_initializer to determine if
2947 the derived type has a default initializer to its ultimate
2951 2007-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2953 * options.c (set_default_std_flags): New function to consolidate
2955 (gfc_init_options): Use new function.
2956 (gfc_handle_option): Use new function.
2958 2007-02-22 Brooks Moses <brooks.moses@codesourcery.com>
2960 * gfortran.texi (Old-style kind specifications): Document
2961 special handling of old-style kind specifiers for COMPLEX.
2962 * decl.c (gfc_match_old_kind_spec): Documented kind/bytesize
2963 assumptions in comment.
2965 2007-02-21 Bernhard Fischer <aldot@gcc.gnu.org>
2967 * parse.c (next_free): Gooble spaces after OpenMP sentinel.
2969 2007-02-20 Thomas Koenig <Thomas.Koenig@online.de>
2972 * match.c (gfc_match_iterator): Remove conflict between
2973 loop variable and pointer.
2975 2007-02-20 Tobias Burnus <burnus@net-b.de>
2978 * symbol.c (gfc_add_volatile): Allow to set VOLATILE
2979 attribute for host-associated variables.
2980 * gfortran.h (symbol_attribute): Save namespace
2981 where VOLATILE has been set.
2982 * trans-decl.c (gfc_finish_var_decl): Move variable
2983 declaration to the top.
2985 2007-02-20 Tobias Burnus <burnus@net-b.de>
2988 * resolve.c (resolve_symbol): Add character dummy VALUE check.
2990 2007-02-19 Thomas Koenig <Thomas.Koenig@online.de>
2993 * fortran/iresolve.c (gfc_resolve_maxloc): Remove coercion of
2994 argument to default integer.
2995 (gfc_resolve_minloc): Likewise.
2997 2007-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3000 * options.c (gfc_init_options): Relax warning level for obsolescent.
3001 * match.c (match_arithmetic_if): Change to obsolescent from deleted.
3002 (gfc_match_if): Same.
3004 2007-02-18 Roger Sayle <roger@eyesopen.com>
3006 * trans-array.c (gfc_build_constant_array_constructor): When the
3007 shape of the constructor is known, use that to construct the
3009 (gfc_trans_constant_array_constructor): Initialize the "info"
3010 information for all of the dimensions of the array constructor.
3011 (constant_array_constructor_loop_size): New function.
3012 (gfc_trans_array_constructor): Use it to determine whether a
3013 loop is suitable for "constant array constructor" optimization.
3015 * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Use fold_build2
3016 instead of build2, to avoid conditions like "(a != b) != 0".
3018 2007-02-18 Roger Sayle <roger@eyesopen.com>
3019 Paul Thomas <pault@gcc.gnu.org>
3022 * match.c (match_forall_iterator): Use gfc_match_expr instead
3023 of gfc_match_variable to match the iterator variable. Return
3024 MATCH_NO if not a variable. Remove the reset of the symbol's
3027 2007-02-16 Tobias Burnus <burnus@net-b.de>
3030 * trans-decl.c (gfc_generate_function_code): Do not initialize
3031 pointers to derived components.
3033 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
3034 Brooks Moses <brooks.moses@codesourcery.com>
3035 Lee Millward <lee.millward@codesourcery.com>
3037 * trans-expr.c (gfc_conv_power_op): Use build_call_expr.
3038 (gfc_conv_string_tmp): Likewise.
3039 (gfc_conv_concat_op): Likewise.
3040 (gfc_build_compare_string): Likewise.
3041 (gfc_conv_function_call): Use build_call_list instead of build3.
3043 * trans-array.c (gfc_trans_allocate_array_storage): Use
3045 (gfc_grow_array): Likewise.
3046 (gfc_trans_array_ctor_element): Likewise.
3047 (gfc_trans_array_constructor_value): Likewise.
3048 (gfc_array_allocate): Likewise.
3049 (gfc_array_deallocate): Likewise.
3050 (gfc_trans_auto_array_allocation): Likewise.
3051 (gfc_trans_dummy_array_bias): Likewise.
3052 (gfc_conv_array_parameter): Likewise.
3053 (gfc_trans_dealloc_allocated): Likewise.
3054 (gfc_duplicate_allocatable): Likewise.
3056 * trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr.
3057 (gfc_trans_omp_flush): Likewise.
3059 * trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr.
3060 (gfc_trans_pause): Likewise.
3061 (gfc_trans_stop): Likewise.
3062 (gfc_trans_character_select): Likewise.
3063 (gfc_do_allocate): Likewise.
3064 (gfc_trans_assign_need_temp): Likewise.
3065 (gfc_trans_pointer_assign_need_temp): Likewise.
3066 (gfc_trans_forall_1): Likewise.
3067 (gfc_trans_where_2): Likewise.
3068 (gfc_trans_allocate): Likewise.
3069 (gfc_trans_deallocate): Likewise.
3071 * trans.c (gfc_trans_runtime_check): Use build_call_expr.
3073 * trans-io.c (gfc_trans_open): Use build_call_expr.
3074 (gfc_trans_close): Likewise.
3075 (build_filepos): Likewise.
3076 (gfc_trans_inquire): Likewise.
3077 (NML_FIRST_ARG): Delete.
3078 (NML_ADD_ARG): Delete.
3079 (transfer_namelist_element): Use build_call_expr.
3080 (build_dt): Likewise.
3081 (gfc_trans_dt_end): Likewise.
3082 (transfer_expr): Likewise.
3083 (transfer_array-desc): Likewise.
3085 * trans-decl.c (gfc_generate_function_code): Use build_call_expr.
3086 (gfc_generate_constructors): Likewise.
3088 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr.
3089 (gfc_conv_intrinsic_fdate): Likewise.
3090 (gfc_conv_intrinsic_ttynam): Likewise.
3091 (gfc_conv_intrinsic_array_transfer): Likewise.
3092 (gfc_conv_associated): Likewise.
3093 (gfc_conv_intrinsic_si_kind): Likewise.
3094 (gfc_conv_intrinsic_trim): Likewise.
3095 (gfc_conv_intrinsic_repeat: Likewise.
3096 (gfc_conv_intrinsic_iargc): Likewise.
3098 2007-02-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3101 * scanner.c (gfc_next_char_literal): Add check for end of file after
3102 call to advance_line.
3104 2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>
3107 * primary.c (match_logical_constant): Return MATCH_ERROR on invalid
3110 2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>
3112 * misc.c (gfc_typename): Fix potential buffer overflow.
3114 2007-02-13 Paul Thomas <pault@gcc.gnu.org>
3117 * module.c (read_module): Set pointer_info to referenced if the
3118 symbol has no namespace.
3120 2007-02-12 Nick Clifton <nickc@redhat.com>
3122 * lang.opt: Add Warning attribute to warning options.
3124 2007-02-11 Daniel Franke <franke.daniel@gmail.com>
3126 * intrinsic.texi (HOSTNM): Fix typographical error in syntax.
3127 (SLEEP): Added section and documentation.
3129 2007-02-11 Tobias Schlüter <tobi@gcc.gnu.org>
3132 * decl.c (add_init_expr_to_sym): Remove ENUM specific code.
3133 (variable_decl): Likewise. Rewrap comment.
3134 (match_attr_spec): Remove ENUM specific code.
3135 (gfc_match_enum): Fix typo in error message.
3136 (enumerator_decl): New function.
3137 (gfc_match_enumerator_def): Use enumerator_decl instead of
3138 variable_decl. Adapt code accordingly.
3140 2007-02-11 Paul Thomas <pault@gcc.gnu.org>
3143 * module.c (find_symtree_for_symbol): New function to return
3144 a symtree that is not a "unique symtree" given a symbol.
3145 (read_module): Do not automatically set pointer_info to
3146 referenced because this inhibits the generation of a unique
3147 symtree. Recycle the existing symtree if possible by calling
3148 find_symtree_for_symbol.
3151 * decl.c (add_init_expr_to_sym): Make new charlen for an array
3152 constructor initializer.
3154 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
3156 * f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address
3157 and __emutls_register_common.
3158 * openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls.
3159 * trans-common.c (build_common_decl): Don't check have_tls.
3160 * trans-decl.c (gfc_finish_var_decl): Likewise.
3161 * types.def (BT_WORD, BT_FN_PTR_PTR): New.
3162 (BT_FN_VOID_PTR_WORD_WORD_PTR): New.
3164 2007-02-09 Tobias Burnus <burnus@net-b.de>
3167 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc,
3168 gfc_conv_intrinsic_minmaxval): Use HUGE-1 for most negative integer.
3170 2007-02-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3173 * trans-array.c (gfc_trans_create_temp_array): Remove use of the
3174 function argument. Always generate code for negative extent.
3176 * trans-array.h (gfc_trans_create_temp_array): Change prototype.
3177 * trans-expr.c (gfc_conv_function_call): Remove use of last argument
3178 of gfc_trans_create_temp_array.
3179 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Likewise.
3180 * trans-stmt.c (gfc_conv_elemental_dependencies): Likewise.
3182 2007-02-08 Roger Sayle <roger@eyesopen.com>
3184 * trans-stmt.c (gfc_trans_forall_1): Optimize the cases where the
3185 mask expression is a compile-time constant (".true." or ".false.").
3187 2007-02-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3190 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Evaluate
3191 arguments only once. Generate check that NCOPIES argument is not
3194 2007-02-04 Steven G. Kargl <kargl@gcc.gnu.org>
3197 * fortran/invoke.texi: Update documentation.
3198 * fortran/options.c (gfc_post_options): Deal with tabs with -std=f2003
3201 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
3203 * trans-array.c: Fix a comment typo.
3205 2007-02-03 Paul Thomas <pault@gcc.gnu.org>
3208 * array.c (match_array_element_spec): If the length of an array is
3209 negative, adjust the upper limit to make it zero length.
3212 * resolve.c (pure_function, resolve_function): Initialize name to
3213 null to clear up build warnings.
3214 (resolve_fl_variable): Look at components explicitly to check for
3215 default initializer, rather than using gfc_default_initializer.
3217 2007-02-02 Steven G. Kargl <kargl@gcc.gnu.org>
3220 * resolve.c (resolve_generic_f): Check for non-NULL sym.
3222 2007-02-02 Roger Sayle <roger@eyesopen.com>
3224 * trans.c (gfc_build_array_ref): Use STRIP_TYPE_NOPS to eliminate
3225 NON_LVALUE_EXPR nodes and useless type conversions.
3227 2007-02-02 Paul Thomas <pault@gcc.gnu.org>
3231 * trans-expr.c (gfc_conv_aliased_arg): Remove static attribute
3232 from function and make sure that substring lengths are
3234 (is_aliased_array): Remove static attribute.
3235 * trans.c : Add prototypes for gfc_conv_aliased_arg and
3237 * trans-io.c (set_internal_unit): Add the post block to the
3238 arguments of the function. Use is_aliased_array to check if
3239 temporary is needed; if so call gfc_conv_aliased_arg.
3240 (build_dt): Pass the post block to set_internal_unit and
3241 add to the block after all io activiy is done.
3243 2007-02-01 Roger Sayle <roger@eyesopen.com>
3245 * trans-array.c (gfc_conv_expr_descriptor): We don't need to use
3246 a temporary array to pass a constant non-character array constructor.
3247 Generalize the descriptor generation code to handle scalarizer
3248 "info" without an array reference.
3250 2007-02-01 Roger Sayle <roger@eyesopen.com>
3252 * dependency.c (gfc_check_dependency) <EXPR_ARRAY>: Implement
3253 dependency checking for array constructors.
3255 2007-02-01 Roger Sayle <roger@eyesopen.com>
3257 * trans-stmt.c (compute_overall_iter_number): Document function
3258 arguments. Generalize "unconditional forall nest with constant
3259 bounds" optimization to eliminate unconditional inner loops with
3262 2007-01-31 Tobias Burnus <burnus@net-b.de>
3265 * interface.c (compare_actual_formal): Check conformance between
3266 actual and VOLATILE dummy arguments.
3267 * symbol.c (gfc_add_volatile): Allow setting of VOLATILE
3268 multiple times in different scopes.
3269 * decl.c (gfc_match_volatile): Search symbol in host association.
3271 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
3273 * simplify.c, trans-array.c: Fix comment typos.
3275 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3277 * invoke.texi (Code Gen Options): Fix abbreviation typo.
3278 * intrinsic.texi (ACCESS, LSHIFT, RSHIFT): Fix typos.
3280 2007-01-30 Steve Ellcey <sje@cup.hp.com>
3283 * trans-types.c (gfc_get_function_type): Do not add void_type_node
3285 * trans-decl.c (create_function_arglist): Change assert.
3287 2007-01-29 Paul Thomas <pault@gcc.gnu.org>
3290 * module.c (read_module): If a symbol is excluded by an ONLY
3291 clause, check to see if there is a symtree already loaded. If
3292 so, attach the symtree to the pointer_info.
3294 2007-01-28 Thomas Koenig <Thomas.Koenig@online.de>
3297 * gfortran.h: Remove gfc_simplify_init_1.
3298 * arith.h: Remove third argument from gfc_compare_string.
3299 * arith.c (gfc_compare_expression): Remove third argument
3300 from call to gfc_compare_string.
3301 (gfc_compare_string): Remove third argument xcoll_table.
3302 Remove use of xcoll_table.
3303 * misc.c (gfc_init_1): Remove call to gfc_simplify_init_1.
3304 * simplify.c (ascii_table): Remove.
3305 (xascii_table): Likewise.
3306 (gfc_simplify_achar): ICE if extract_int fails. Remove use of
3307 ascii_table. Warn if -Wsurprising and value < 0 or > 127.
3308 (gfc_simplify_char): ICE if extract_int fails. Error if
3309 value < 0 or value > 255.
3310 (gfc_simplify_iachar): Remove use of xascii_table.
3311 Char values outside of 0..255 are an ICE.
3312 (gfc_simplify_lge): Remove use of xascii_table.
3313 (gfc_simplify_lgt): Likewise.
3314 (gfc_simplify_lle): Likewise.
3315 (gfc_simplify_llt): Likewise.
3316 (invert_table): Remove.
3317 (gfc_simplify_init_1): Remove.
3319 2007-01-27 Roger Sayle <roger@eyesopen.com>
3321 * trans-stmt.c (forall_info): Replace the next_nest and outer
3322 fields that previously implemented a doubly-linked list with a
3323 single prev_nest field (singly-linked list).
3324 (gfc_trans_nested_forall_loop): The nested_forall_info argument
3325 now denotes the innermost FORALL in the loop nest.
3326 (compute_overall_iter_number): Use prev_nest instead of next_nest.
3327 (gfc_trans_forall_1): Link/cons the new "info" to the head of the
3328 nested_forall_info linked list. Free the current "info" when done.
3330 2007-01-27 Paul Thomas <pault@gcc.gnu.org>
3333 * trans-expr.c (gfc_conv_operator_assign): New function.
3334 * trans.h : Add prototype for gfc_conv_operator_assign.
3335 * trans-stmt.c (gfc_trans_where_assign): Add a gfc_symbol for
3336 a potential operator assignment subroutine. If it is non-NULL
3337 call gfc_conv_operator_assign instead of the first assignment.
3338 ( gfc_trans_where_2): In the case of an operator assignment,
3339 extract the argument expressions from the code for the
3340 subroutine call and pass the symbol to gfc_trans_where_assign.
3341 resolve.c (resolve_where, gfc_resolve_where_code_in_forall,
3342 gfc_resolve_forall_body): Resolve the subroutine call for
3343 operator assignments.
3345 2007-01-26 Steven Bosscher <stevenb.gcc@gmail.com>
3346 Steven G. Kargl <kargl@gcc.gnu.org>
3349 * fortran/io.c (next_char): Deal with backslash escaped characters.
3350 Issue warnings in non -std=gnu cases.
3351 * fortran/primary.c (next_string_char): Issue warnings in non
3353 2007-01-26 Tobias Burnus <burnus@net-b.de>
3355 * lang-specs.h: Add support for .f03 and .F03 extensions.
3356 * gfortran.texi: Document .f03 extension.
3357 * options.c (form_from_filename): Recognize .f03.
3359 2007-01-25 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3362 * lang.opt (Wall): Remove RejectNegative.
3363 * options.c (gfc_handle_option): Wall can be disabled.
3364 (set_Wall): Add a parameter for disabling Wall.
3366 2007-01-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3369 * scanner.c (load_line): Remove check fot ctrl-z and don't gobble.
3371 2007-01-23 Paul Thomas <pault@gcc.gnu.org>
3374 * match.c (gfc_match_namelist): Add check for assumed size character
3375 in namelist and provide error if found.
3377 2007-01-21 Brooks Moses <brooks.moses@codesourcery.com>
3379 * intrinsic.texi (ACHAR): Added cross-references.
3380 (CHAR): Put cross-references in alphabetical order.
3381 (IACHAR): Added cross-references.
3382 (ICHAR): Added cross-references.
3384 2007-01-20 Brooks Moses <brooks.moses@codesourcery.com>
3386 * intrinsic.texi: Edited all "Syntax" examples to a consistent form.
3387 (MAXVAL): Corrected description of result characteristics.
3389 (UMASK): Added documentation.
3391 2007-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
3393 * openmp.c, matchexp.c, module.c, scanner.c, resolve.c, st.c,
3394 parse.c, primary.c, options.c, misc.c, simplify.c: Next installment
3395 in the massive whitespace patch.
3397 2007-01-20 Roger Sayle <roger@eyesopen.com>
3399 * module.c (mio_array_ref): The dimen_type fields of an array ref
3400 are an enumerated type and can't be read/written directly with a
3401 call to mio_integer. Instead loop over and cast each element.
3403 2007-01-20 Roger Sayle <roger@eyesopen.com>
3405 * dependency.c (gfc_full_array_ref_p): Check that ref->next is NULL,
3406 i.e. that the ARRAY_REF doesn't mention components.
3407 * trans-array.c (gfc_constant_array_constructor_p): Export external
3408 function renamed from constant_array_constructor_p.
3409 (gfc_build_constant_array_constructor): Export.
3410 (gfc_trans_array_constructor): Update call to the renamed function
3411 constant_array_constructor_p.
3412 * trans-array.h (gfc_constant_array_constructor_p): Prototype here.
3413 (gfc_build_constant_array_constructor): Likewise.
3414 * trans-expr.c (gfc_build_memcpy_call): New helper function split
3415 out from gfc_trans_array_copy.
3416 (gfc_trans_array_copy): Use gfc_build_memcpy_call.
3417 (gfc_trans_array_constructor_copy): New function to optimize
3418 assigning an entire array from a constant array constructor.
3419 (gfc_trans_assignment): Call gfc_trans_array_constructor_copy
3422 2007-01-20 Roger Sayle <roger@eyesopen.com>
3424 * trans-intrinsic.c (gfc_conv_intrinsic_sign): New branchless
3425 implementation for the SIGN intrinsic with integral operands.
3426 (gfc_conv_intrinsic_minmax): Fix whitespace.
3428 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3430 * gfortran.h (gfc_options_t): Add flag_allow_leading_underscore.
3431 * lang.opt: Add -fallow-leading-underscore.
3432 * match.c (gfc_match_name): Allow leading underscore in symbol
3433 name if -fallow-leading-underscore is used.
3434 * symbol.c (gfc_get_default_type): Add special case for symbol
3435 names beginning with an underscore.
3436 * trans-decl.c (gfc_get_extern_function_decl,
3437 gfc_build_intrinsic_function_decls): Add _gfortran prefix to
3438 library symbols selected_int_kind, selected_real_kind and
3440 * options.c (gfc_init_options, gfc_handle_option): Handle the
3441 new -fallow-leading-underscore option.
3443 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3446 * options.c (gfc_handle_module_path_options): Path used in -J
3447 option is now added to the module search path.
3449 2007-01-20 Richard Guenther <rguenther@suse.de>
3452 * f95-lang.c (gfc_init_builtin_functions): Provide cbrt and
3453 cexpi builtins if we have TARGET_C99_FUNCTIONS. Provide
3454 sincos builtins if the target has sincos.
3456 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
3458 * intrinsic.texi (MATMUL): Corrected a typo.
3459 (MAX): Separated @var arguments.
3460 (MIN): Separated @var arguments.
3462 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
3464 * intrinsic.texi: general whitespace cleanup.
3465 (menu): Added TIME8, removed UNMASK.
3466 (AINT): Clarified argument requirement.
3467 (ANINT): Clarified argument requirement.
3468 (CEILING): Clarified argument requirement.
3469 (CHAR): Clarified argument requirement.
3470 (CMPLX): Clarified argument requirement.
3471 (DCMPLX): Clarified argument requirement.
3472 (FGET): Line rewrapping.
3473 (FLOOR): Clarified argument requirement.
3474 (GMTIME): Added documentation.
3475 (IAND): Added cross-reference.
3476 (IBCLR): Added cross-reference.
3477 (IBSET): Added cross-reference.
3478 (IEOR): Added cross-reference.
3479 (INT): Collapsed examples, clarified argument requirement.
3480 (IOR): Added cross-references.
3481 (LEN_TRIM): Corrected result kind.
3482 (LINK): Added cross-reference.
3483 (LLT): Removed "documentation pending".
3484 (LOGICAL): Added documentation.
3485 (LSHIFT): Added documentation.
3486 (LTIME): Added documentation.
3487 (MATMUL): Added documentation.
3488 (MAX): Added documentation.
3489 (MAXLOC): Added documentation.
3490 (MAXVAL): Added documentation.
3491 (MERGE): Added documentation.
3492 (MIN): Added documentation.
3493 (MINLOC): Added documentation.
3494 (MINVAL): Added documentation.
3495 (MVBITS): Moved to correct place, added documentation.
3496 (NOT): Added documentation.
3497 (PERROR): Added documentation.
3498 (RAN): Moved to correct place, added documentation.
3499 (REAL): Clarified argument requirement.
3500 (RENAME): Added documentation.
3501 (RSHIFT): Clarified argument requirement.
3502 (SIGN): Corrected table specification.
3503 (SYMLNK): Added documentation.
3504 (SYSTEM): Added documentation.
3505 (TIME): Added documentation.
3506 (TIME8): Added section and documentation.
3507 (UNMASK): Removed erroneous section.
3509 2007-01-18 H.J. Lu <hongjiu.lu@intel.com>
3511 * trans-stmt.c (compute_overall_iter_number): Fix a typo.
3513 2007-01-18 Roger Sayle <roger@eyesopen.com>
3515 * trans-expr.c (copyable_array_p): Consider user derived types without
3516 allocatable components to be copyable.
3518 2007-01-18 Roger Sayle <roger@eyesopen.com>
3520 * trans-stmt.c (compute_overall_iter_number): Enhance to precompute
3521 the number of interations in unconditional FORALL nests with constant
3524 2007-01-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3525 Tobias Burnus <burnus@net-b.de>
3528 * gfortran.h (gfc_option_t): Add flag_dump_core.
3529 * lang.opt: Add -fdump-core option.
3530 * invoke.texi: Document the new options.
3531 * trans-decl.c (gfc_build_builtin_function_decls): Add new
3532 options to the call to set_std.
3533 * options.c (gfc_init_options, gfc_handle_option): Set the
3536 2007-01-17 Paul Thomas <pault@gcc.gnu.org>
3539 * module.c (load_generic_interfaces): Make the marking of the
3540 symbol as ambiguous conditional on the module names being
3542 (write_generic): Ensure that the generic interface has a
3543 non-NULL module field.
3545 2007-01-16 Roger Sayle <roger@eyesopen.com>
3548 * trans-stmt.c (forall_info): Remove pmask field.
3549 (gfc_trans_forall_loop): Remove NVAR argument, instead assume that
3550 NVAR covers all the interation variables in the current forall_info.
3551 Add an extra OUTER parameter, which specified the loop header in
3552 which to place mask index initializations.
3553 (gfc_trans_nested_forall_loop): Remove NEST_FLAG argument.
3554 Change the semantics of MASK_FLAG to only control the mask in the
3556 (compute_overall_iter_number): Optimize the trivial case of a
3557 top-level loop having a constant number of iterations. Update
3558 call to gfc_trans_nested_forall_loop. Calculate the number of
3559 times the inner loop will be executed, not to size of the
3561 (allocate_temp_for_forall_nest_1): Reuse SIZE as BYTESIZE when
3562 sizeof(type) == 1. Tidy up.
3563 (gfc_trans_assign_need_temp): Remove NEST_FLAG argument from calls
3564 to gfc_trans_nested_forall_loop.
3565 (gfc_trans_pointer_assign_need_temp): Likewise.
3566 (gfc_trans_forall_1): Remove unused BYTESIZE, TMPVAR, SIZEVAR and
3567 LENVAR local variables. Split mask allocation into a separate
3568 hunk/pass from mask population. Use allocate_temp_for_forall_nest
3569 to allocate the FORALL mask with the correct size. Update calls
3570 to gfc_trans_nested_forall_loop.
3571 (gfc_evaluate_where_mask): Update call to
3572 gfc_trans_nested_forall_loop.
3573 (gfc_trans_where_2): Likewise.
3575 2007-01-15 Paul Thomas <pault@gcc.gnu.org>
3578 * trans-stmt.c (gfc_trans_call): If it does not have one, get
3579 a backend_decl for an alternate return.
3582 * resolve.c (pure_function): Statement functions are pure. Note
3583 that this will have to recurse to comply fully with F95.
3586 * resolve.c (resolve_function): Only a reference to the final
3587 dimension of an assumed size array is an error in an inquiry
3591 * resolve.c (resolve_function): Make sure that the function
3592 expression has a type.
3594 2007-01-14 Paul Thomas <pault@gcc.gnu.org>
3597 * trans-decl.c (gfc_sym_mangled_function_id): Module, external
3598 symbols must not have the module name prepended.
3600 2007-01-11 Thomas Koenig <Thomas.Koenig@online.de>
3603 * iresolve.c (gfc_resolve_maxloc): If the rank
3604 of the return array is nonzero and we process an
3605 integer array smaller than default kind, coerce
3606 the array to default integer.
3607 * iresolve.c (gfc_resolve_minloc): Likewise.
3609 2007-01-11 Brooks Moses <brooks.moses@codesourcery.com>
3611 * simplify.c: Update copyright to 2007.
3614 2007-01-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3617 * scanner.c (gfc_release_include_path): Free gfc_option.module_dir
3620 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
3622 * simplify.c (gfc_simplify_ibclr): Fix POS comparison.
3623 (gfc_simplify_ibset): Same.
3625 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
3629 * simplify.c (convert_mpz_to_unsigned): New function.
3630 (convert_mpz_to_signed): New function, largely based on
3632 (twos_complement): Removed.
3633 (gfc_simplify_ibclr): Add conversions to and from an
3634 unsigned representation before bit-twiddling.
3635 (gfc_simplify_ibset): Same.
3636 (gfc_simplify_ishftc): Add checks for overly large
3637 constant arguments, only check the third argument if
3638 it's present, carry over high bits into the result as
3639 appropriate, and perform the final conversion back to
3640 a signed representation using the correct sign bit.
3641 (gfc_simplify_not): Removed unnecessary masking.
3643 2007-01-09 Paul Thomas <pault@gcc.gnu.org>
3646 * resolve.c (resolve_code): Use the code->expr character length
3647 directly to set length of llen.
3649 2007-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3652 * lang.opt: Add Wcharacter_truncation option.
3653 * options.c (gfc_init_options): Initialize
3654 gfc_option.warn_character_truncation to zero.
3655 (gfc_handle_option): Add case for OPT_Wcharacter_truncation.
3657 2007-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
3659 * interface.c, intrinsic.c, gfortranspec.c, io.c, f95-lang.c,
3660 iresolve.c, match.c: Update Copyright years. Whitespace.
3662 2007-01-08 Richard Guenther <rguenther@suse.de>
3664 * trans-io.c (transfer_array_desc): Use build_int_cst instead
3667 2007-01-08 Roger Sayle <roger@eyesopen.com>
3669 * trans-array.c (constant_array_constructor_p): New function to
3670 determine whether an array constructor consists only of constant
3671 elements, and if so return it's size.
3672 (gfc_build_constant_array_constructor): Construct a statically
3673 initialized gfortran array for a given EXPR_ARRAY.
3674 (gfc_trans_constant_array_constructor): Efficiently scalarize
3675 a constant array constructor.
3676 (gfc_trans_array_constructor): Tidy up use of CONST_STRING.
3677 Special case scalarization of constant array constructors, all of
3678 whose elements are specified, using constant_array_constructor_p
3679 and gfc_trans_constant_array_constructor.
3680 (gfc_conv_scalarized_array_ref): Check whetger info->offset is zero
3681 before adding it to index, to avoid creating a NON_LVALUE_EXPR.
3683 2007-01-08 Kazu Hirata <kazu@codesourcery.com>
3685 gfortran.texi: Fix typos.
3687 2007-01-07 Steven G. Kargl <kargl@gcc.gnu.org>
3689 * decl.c, dump-parse-tree.c, error.c, data.c, expr.c, dependency.c,
3690 convert.c: Update Copyright dates. Fix whitespace.
3692 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
3694 * data.c (gfc_assign_data_value): Fix whitespace.
3696 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
3698 * trans-array.c (gfc_trans_create_temp_array, gfc_array_init_size):
3699 Commentary typo fix.
3701 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
3704 * match.c (gfc_match_name): Print diagnostics for invalid
3707 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
3709 * array.c: Fix whitespace in comment table.
3711 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
3713 * array.c, bbt.c, check.c: Update copyright years. Whitespace.
3715 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
3717 * arith.c: Update copyright years. Whitespace.
3719 2007-01-05 Roger Sayle <roger@eyesopen.com>
3721 * trans-expr.c (gfc_trans_assignment_1): New subroutine to scalarize
3722 array assignments split out from gfc_trans_assignment.
3723 (gfc_trans_array_copy): New function to implement array to array
3724 copies via calls to __builtin_memcpy.
3725 (copyable_array_p): New helper function to identify an array of
3726 simple/POD types, that may be copied/assigned using memcpy.
3727 (gfc_trans_assignment): Use gfc_trans_array_copy to handle simple
3728 whole array assignments considered suitable by copyable_array_p.
3729 Invoke gfc_trans_assignment_1 to perform the fallback scalarization.
3731 2007-01-05 Roger Sayle <roger@eyesopen.com>
3733 * trans-array.c (gfc_trans_array_constructor_value): Make the
3734 static const "data" array as TREE_READONLY.
3735 * trans-stmt.c (gfc_trans_character_select): Likewise.
3737 2007-01-05 Roger Sayle <roger@eyesopen.com>
3739 * trans-array.c (gfc_conv_loop_setup): Test whether the loop
3740 stride is one, to avoid fold_build2 introducing a useless
3741 NON_LVALUE_EXPR node.
3743 2007-01-05 Tobias Burnus <burnus@net-b.de>
3745 * symbol.c (check_conflict): Fix error message.
3747 2007-01-05 Paul Thomas <pault@gcc.gnu.org>
3750 * decl.c (gfc_in_match_data, gfc_set_in_match_data): New
3751 functions to signal that a DATA statement is being matched.
3752 (gfc_match_data): Call gfc_set_in_match_data on entry and on
3754 * gfortran.h : Add prototypes for above.
3755 * expr.c (check_init_expr): Avoid check on parameter or
3756 variable if gfc_in_match_data is true.
3757 (gfc_match_init_expr): Do not call error on non-reduction of
3758 expression if gfc_in_match_data is true.
3762 * decl.c (gfc_set_constant_character_len): Add boolean arg to
3763 flag array constructor resolution. Warn if string is being
3764 truncated. Standard dependent error if string is padded. Set
3765 new arg to false for all three calls to
3766 gfc_set_constant_character_len.
3767 * match.h : Add boolean arg to prototype for
3768 gfc_set_constant_character_len.
3769 * gfortran.h : Add warn_character_truncation to gfc_options.
3770 * options.c (set_Wall): Set warn_character_truncation if -Wall
3772 * resolve.c (resolve_code): Warn if rhs string in character
3773 assignment has to be truncated.
3774 * array.c (gfc_resolve_character_array_constructor): Set new
3775 argument to true for call to gfc_set_constant_character_len.
3777 2007-01-05 Tobias Burnus <burnus@net-b.de>
3780 * interface.c (compare_parameter_intent): New function.
3781 (check_intents): Support pointer intents.
3782 * symbol.c (check_conflict): Support pointer intents,
3783 better conflict_std message.
3784 * expr.c (gfc_check_assign,gfc_check_pointer_assign):
3785 Support pointer intents.
3786 * resolve.c (resolve_deallocate_expr,resolve_allocate_expr):
3787 Support pointer intents.
3789 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3792 * check.c (gfc_check_kill_sub): Add checks for non-scalar
3795 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
3797 * intrinsic.texi: Minor cleanup, reflowing overlong
3798 paragraphs, and correcting whitespace.
3800 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
3802 * intrinsic.texi (LBOUND): Add documentation.
3803 (LGE): Add documentation.
3804 (LGT): Add documentation.
3805 (LINK): Add documentation.
3806 (LLE): Add documentation.
3807 (LLT): Add documentation.
3808 (LNBLNK): Add documentation.
3809 (UBOUND): Add documentation.
3810 (UNLINK): Add documentation.
3812 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
3814 * intrinsic.texi (IAND): Clarify argument specifications.
3815 (IBCLR): Add documentation.
3816 (IBITS): Add documentation.
3817 (IBSET): Add documentation.
3818 (IEOR): Add documentation.
3819 (IERRNO): Add documentation.
3820 (INDEX): Add documentation.
3821 (IOR): Add documentation.
3822 (ISHFT): Add documentation.
3823 (ISHFTC): Add documentation.
3824 (KILL): Add documentation.
3825 (LEN_TRIM): Add documentation.
3827 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
3830 * interface.c (compare_actual_formal): check for
3831 alternate returns when iterating over non-present
3834 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
3836 * invoke.texi: Update manpage copyright to include 2007.
3838 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
3840 * gfortran.texi: Update copyright to include 2007.
3841 * intrinsic.texi: Update copyright to include 2007.
3842 * invoke.texi: Update copyright to include 2007.
3844 2007-01-02 Tobias Burnus <burnus@net-b.de>
3845 Jakub Jelinek <jakub@redhat.com>
3848 * scanner.c (open_included_file): Revert patch.
3849 (gfc_open_included_file): Support absolute pathnames.
3850 (gfc_open_intrinsic_module): Support absolute pathnames.
3852 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3854 * gfortran.texi (GNU Fortran and GCC): Rewrite
3856 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3858 * gfortran.texi (Introduction): Lower "Part I:
3859 Introduction" to a chapter, renumber Parts II and III to
3861 * intrinsic.texi (Introduction): Rename to "Introduction
3862 to Intrinsics" to avoid conflict with the new chapter.
3864 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3866 * intrinsic.texi (Introduction): Rewrite first paragraph.
3868 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3870 * invoke.texi (OpenMP): Added index entry.
3871 * gfortran.texi (title page): Removed erroneous '*'.
3873 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3875 * gfortran.texi (GFORTRAN_DEFAULT_RECL): Added units
3877 (Extensions): Miscellaneous minor rewriting and copyediting.
3878 (BOZ-literal constants): Renamed from Hexadecimal constants.
3879 (Hollerith constants support): Added explanation and
3880 suggestions for standard-conforming modern equivalents.
3882 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3884 * intrinsic.texi: Improvements to index entries; change
3885 @findex entries to @cindex entries.
3886 * invoke.texi: Standardize and improve index entries.
3887 * gfortran.texi: Fix @code in one index entry.
3889 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3891 * invoke.texi: Change @code-type macros to appropriate
3892 variants (@command, @option, etc.)
3893 * gfortran.texi: Same.
3895 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3897 * intrinsic.texi: Various minor cleanups.
3899 2007-01-02 Steven G. Kargl <kargls@comcast.net>
3901 * trans-intrinsic.c (gfc_conv_intrinsic_ibits): Fix call to
3904 2007-01-02 Tobias Burnus <burnus@net-b.de>
3907 * scanner.c (open_included_file): Support full-path filenames.
3909 2007-01-02 Paul Thomas <pault@gcc.gnu.org>
3912 * interface.c (check_sym_interfaces): Remove call to
3913 resolve_global_procedure.
3914 gfortran.h : Remove prototype for resolve_global_procedure.
3915 resolve.c (resolve_global_procedure): Add static attribute
3916 to function declaration.
3918 2007-01-01 Steven G. Kargl <kargls@comcast.net>
3920 * ChangeLog: Copy to ...
3921 * ChangeLog-2006: here.