1 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3 * gfortranspec.c (lang_specific_driver): Use CONST_CAST.
4 * options.c (gfc_post_options): Likewise.
5 * parse.c (parse_omp_structured_block): Likewise.
6 * st.c (gfc_free_statement): Likewise.
8 2007-08-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
11 * trans-decl.c (gfc_build_builtin_function_decls): Change
12 prototype for associated.
13 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert the
14 result of __builtin_isnan into a boolean.
15 (gfc_conv_intrinsic_strcmp): Cleanup.
16 (gfc_conv_associated): Convert the result of the associated
17 function into a boolean.
19 2007-08-09 Tobias Burnus <burnus@net-b.de>
22 * io.c (format_token): Add FMT_ERROR.
23 (next_char_not_space): Print error/warning when
24 '\t' are used in format specifications.
25 (format_lex): Propagate error.
26 (check_format): Ditto.
28 2007-08-09 Tobias Burnus <burnus@net-b.de>
31 * arith.c (arith_error): Point in the error message
34 2007-08-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
37 * intrinsic.texi (SIZEOF): Add mention to C_SIZE_T.
39 2007-08-06 Christopher D. Rickett <crickett@lanl.gov>
42 * trans-expr.c (gfc_conv_scalar_char_value): Convert the tree and
43 actual arg expressions for scalar characters passed by-value to
45 (gfc_conv_function_call): Call gfc_conv_scalar_char_value.
46 * trans.h: Add prototype for gfc_conv_scalar_char_value.
47 * trans-decl.c (generate_local_decl): Convert by-value character
48 dummy args of bind(c) procedures using
49 gfc_conv_scalar_char_value.
51 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
54 * iresolve.c (gfc_resolve_alarm_sub): Suffix the subroutine name
55 with the kind of the STATUS argument.
57 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
60 * intrinsic.c (add_functions): Fix name of argument to CHDIR.
62 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
65 * iresolve.c (gfc_resolve_exit): Convert argument to default
68 2007-08-06 Daniel Franke <franke.daniel@gmail.com>
70 * resolve.c (derived_pointer): Removed, replaced callers by access
71 to appropiate attribute bit.
72 (derived_inaccessable): Shortcut recursion depth.
73 (resolve_fl_namelist): Fixed checks for private components in namelists.
75 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
78 * trans.h (gfor_fndecl_string_minmax): New prototype.
79 * trans-decl.c (gfor_fndecl_string_minmax): New variable.
80 (gfc_build_intrinsic_function_decls): Create gfor_fndecl_string_minmax.
81 * check.c (gfc_check_min_max): Allow for character arguments.
82 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): New function.
83 (gfc_conv_intrinsic_function): Add special case for MIN and MAX
84 intrinsics with character arguments.
85 * simplify.c (simplify_min_max): Add simplification for character
88 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
91 * invoke.texi: Adjust documentation for option -fsyntax-only.
93 2007-08-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
94 Tobias Burnus <burnus@gcc.gnu.org>
97 * intrinsic.h (gfc_check_isnan): Add prototype.
98 * gfortran.h (gfc_isym_id): Add GFC_ISYM_ISNAN.
99 * intrinsic.c (add_functions): Add ISNAN intrinsic.
100 * check.c (gfc_check_isnan): New function.
101 * trans-intrinsic.c (gfc_conv_intrinsic_isnan): New function.
102 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_isnan
104 * intrinsic.texi: Document ISNAN.
106 2007-08-04 Paul Thomas <pault@gcc.gnu.org>
109 * symbol.c (get_unique_symtree): Moved from module.c.
110 * module.c (get_unique_symtree): Moved to symbol.c.
111 * decl.c (get_proc_name): Transfer the typespec from the local
112 symbol to the module symbol, in the case that an entry is also
113 a module procedure. Ensure the local symbol is cleaned up by
114 pointing to it with a unique symtree.
116 * dump_parse_tree (gfc_show_code_node): Add EXEC_ASSIGN_CALL.
118 2008-08-04 Steven G. Kargl <kargl@gcc.gnu.org>
121 * iresolve.c (gfc_resolve_rrspacing): Convert argument(s) to
123 (gfc_resolve_scale): Ditto.
124 (gfc_resolve_set_exponent): Ditto.
125 (gfc_resolve_spacing): Ditto.
128 * trans-intrinsic.c (gfc_conv_intrinsic_si_kind,
129 gfc_conv_intrinsic_sr_kind): Convert the argument(s) to the
130 expected KIND, and fold the result to the expected KIND.
132 2007-08-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
135 * f95-lang.c (gfc_init_builtin_functions): Defin builtins for
136 lround{f,,l} and llround{f,,l}.
137 * trans-intrinsic.c (build_fix_expr): Generate calls to the
138 {l,}round{f,,l} functions.
140 2007-08-01 Thomas Koenig <tkoenig@gcc.gnu.org>
143 * intrinsic.c (resolve_mask_arg): New function.
144 (gfc_resolve_maxloc): Use resolve_mask_arg for mask resolution.
145 (gfc_resolve_maxval): Likewise.
146 (gfc_resolve_minloc): Likewise.
147 (gfc_resolve_minval): Likewise.
148 (gfc_resolve_pack): Likewise.
149 (gfc_resolve_product): Likewise.
150 (gfc_resolve_sum): Likewise.
151 (gfc_resolve_unpack): Likewise.
153 2007-08-01 Tobias Burnus <burnus@net-b.de>
156 * match.c (gfc_match_allocate): Better check that STAT is
159 * check.c (gfc_check_allocated): Reorder checks to improve
162 2007-08-01 Nick Clifton <nickc@redhat.com>
164 * arith.c: Change copyright header to refer to version 3 of the
165 GNU General Public License and to point readers at the COPYING3
166 file and the FSF's license web page.
167 * openmp.c, interface.c, intrinsic.c, trans-array.c, trans-expr.c,
168 symbol.c, iso-fortran-env.def, intrinsic.h, decl.c, trans-array.h,
169 matchexp.c, dump-parse-tree.c, trans-common.c, array.c,
170 Make-lang.in, trans-openmp.c, gfortran.h, error.c,
171 iso-c-binding.def, lang.opt, data.c, trans-const.c, trans-stmt.c,
172 expr.c, trans-const.h, trans-stmt.h, module.c, trans.c, scanner.c,
173 trans-types.c, trans.h, gfortranspec.c, trans-types.h,
174 lang-specs.h, io.c, bbt.c, resolve.c, f95-lang.c, st.c,
175 iresolve.c, match.c, trans-decl.c, trans-io.c, target-memory.c,
176 match.h, target-memory.h, parse.c, arith.h, check.c, dependency.c,
177 parse.h, types.def, convert.c, dependency.h, primary.c,
178 trans-intrinsic.c, options.c, misc.c, simplify.c: Likewise.
180 2007-08-01 Daniel Franke <franke.daniel@gmail.com>
182 * trans-decl.c (generate_local_decl): Emit warning on unused parameter
183 on "-Wall -Wextra" or "-Wunused-parameter" but not on "-Wall", changed
184 messages that start with lower case to upper case.
185 * invoke.texi (-Wparameter-unused): Document differences between gcc
186 and gfortran regarding this option.
188 2007-08-01 Daniel Franke <franke.daniel@gmail.com>
191 * expr.c (check_specification_function): Skip check if no symtree
194 2007-08-01 Paul Thomas <pault@gcc.gnu.org>
197 * resolve.c (resolve_entries): Entries declared to be module
198 procedures must point to the function namespace.
200 2007-07-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
203 * trans-stmt.c (gfc_trans_return): Convert to correct type.
205 2007-07-31 Steven G. Kargl <kargl@gcc.gnu.org>
208 * trans-intrinsic.c (gfc_conv_intrinsic_exponent): Convert to correct
211 2007-07-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
213 * invoke.texi: Document -fsign-zero flag.
215 2007-07-29 Paul Thomas <pault@gcc.gnu.org>
218 * trans-expr.c (gfc_conv_expr_reference): Add block for case of
219 scalar pointer functions so that NULL result is correctly
223 * trans-array.c (gfc_trans_array_constructor): On detecting a
224 multi-dimensional parameter array, set the loop limits.
226 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
229 * resolve.c (resolve_fl_parameter): Check for constant shape arrays,
230 adjusted error message.
232 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
234 * invoke.texi: Removed -w from option summary.
236 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
239 * intrinsic.texi (IRAND, RAND, RANDOM_NUMBER): Document algorithm
240 used for random number generator.
242 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
244 * gfortran.h, interface.c, resolve.c, symbol.c: Fix comment
246 * intrinsic.texi, invoke.texi: Fix typos.
248 2007-07-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
251 * resolve.c (generic_sym): Check for a same symbol and if so, return to
252 avoid infinite recursion.
254 2007-07-28 Daniel Franke <franke.daniel@gmail.com>
259 * gfortran.h (symbol_attribute): Added bits for pointer_comp,
261 * parse.c (parse_derived): Set pointer_comp/private_comp bits if
262 the derived type ultimately contains pointer components or private
264 * module.c (ab_attribute): New values AB_POINTER_COMP, AB_PRIVATE_COMP.
265 (attr_bits): Added names for new ab_attributes.
266 (mio_symbol_attribute): Save/restore new attribute bits in modules.
267 * match.c (gfc_match_namelist): Removed check for namelist objects
269 * resolve.c (resolve_fl_namelist): Added check for pointer or
270 private components in nested types. Added check for namelist objects
273 2007-07-28 Paul Thomas <pault@gcc.gnu.org>
276 * trans-expr.c (gfc_trans_scalar_assign): Revert to fixed order
277 for lse and rse pre expressions, for derived types with
278 allocatable components. Instead, assign the lhs to a temporary
279 and deallocate after the assignment.
281 2007-07-28 Janne Blomqvist <jb@gcc.gnu.org>
284 * trans-stmt.c (gfc_trans_character_select): Replace occurrences
285 of gfc_c_int_type_node with integer_type_node.
286 * trans-decl.c (gfc_build_intrinsic_function_decls): Likewise.
287 (gfc_build_builtin_function_decls): Likewise.
288 (gfc_generate_function_code): Likewise.
289 * trans-io.c (gfc_build_io_library_fndecls): Likewise.
291 2007-07-27 Janne Blomqvist <jb@gcc.gnu.org>
293 * trans-decl.c (gfc_build_builtin_function_decls): Use existing
294 gfc_array_index_type rather than creating another typenode for
295 gfc_index_integer_kind.
297 2007-07-27 Janne Blomqvist <jb@gcc.gnu.org>
299 * trans-io.c (gfc_build_io_library_fndecls): Change to use
300 gfc_array_index_type for array descriptor triplets instead of
303 2007-07-26 Steven G. Kargl <kargl@gcc.gnu.org>
306 * resolve.c (resolve_operator): Add INTRINSIC_EQ_OS comparison.
308 2007-07-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
309 Daniel Franke <franke.daniel@gmail.com>
312 * primary.c (match_variable): Do not call gfc_add_flavor if symbol has
313 attribute of ACCESS_PUBLIC or ACCESS_PRIVATE already marked.
315 2007-07-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
318 * trans-stmt.c (gfc_trans_character_select): Replace the
319 mechanism with labels by a SWITCH_EXPR.
320 * trans-decl.c (gfc_build_builtin_function_decls): Change
321 return type for select_string.
323 2007-07-27 Paul Thomas <pault@gcc.gnu.org>
326 * trans-decl.c (gfc_trans_deferred_vars): Set intent(out)
327 derived types as referenced, if they have the the default
330 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
332 * gfortran.h (generate_isocbinding_symbol): Constify.
333 * symbol.c (gen_special_c_interop_ptr, gen_cptr_param,
334 generate_isocbinding_symbol): Likewise.
336 2007-07-24 Paul Thomas <pault@gcc.gnu.org>
340 * trans-expr.c (gfc_conv_function_call): Remove the default
341 initialization of intent(out) derived types.
342 * symbol.c (gfc_lval_expr_from_sym): New function.
343 * matchexp.c (gfc_get_parentheses): Return argument, if it is
344 character and posseses a ref.
345 * gfortran.h : Add prototype for gfc_lval_expr_from_sym.
346 * resolve.c (has_default_initializer): Move higher up in file.
347 (resolve_code): On detecting an interface assignment, check
348 if the rhs and the lhs are the same symbol. If this is so,
349 enclose the rhs in parenetheses to generate a temporary and
350 prevent any possible aliasing.
351 (apply_default_init): Remove code making the lval and call
352 gfc_lval_expr_from_sym instead.
353 (resolve_operator): Give a parentheses expression a type-
354 spec if it has no type.
355 * trans-decl.c (gfc_trans_deferred_vars): Apply the a default
356 initializer, if any, to an intent(out) derived type, using
357 gfc_lval_expr_from_sym and gfc_trans_assignment. Check if
358 the dummy is present.
360 2007-07-24 Daniel Franke <franke.daniel@gmail.com>
363 * expr.c (check_init_expr): Simplify matched functions.
365 2007-07-24 Daniel Franke <franke.daniel@gmail.com>
368 * intrinsic.c (add_sym): Do not exclude any symbols, even if not part
369 of the selected standard.
370 (make generic): Likewise.
371 (make alias): Likewise, set standard the alias belongs to.
372 (add_subroutines): Call make_noreturn unconditionally.
373 (check_intrinsic_standard): Change return value to try.
374 (gfc_intrinsic_func_interface): Check return value of above function.
375 (gfc_intrinsic_sub_interface): Likewise.
377 2007-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
380 * trans-decl.c (generate_function_code): Add argument
381 for flag_bounds_check to the array for set_options.
382 * invoke.texi (-fbounds-check): Document new libarary run-time
385 2007-07-23 Daniel Franke <franke.daniel@gmail.com>
389 * expr.c (check_transformational): Reject valid transformational
390 intrinsics to avoid ICE.
391 (check_inquiry): Report error for assumed character lengths for
392 all supported standards.
393 (check_init_expr): Whitespace fix.
395 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
399 * decl.c (verify_bind_c_sym): Use the result symbol for functions
400 with a result clause. Warn if implicitly typed. Verify the type
401 and rank of the SHAPE argument, if given.
402 * resolve.c (gfc_iso_c_sub_interface): Use gfc_procedure_use to
403 check the actual args against the formal, sorting them if
405 * symbol.c (gen_shape_param): Initialize type of SHAPE param to
408 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
411 * trans-decl.c (generate_local_decl): Convert the TREE_TYPE for by
412 value character dummy args of BIND(C) procedures.
413 * trans-expr.c (gfc_conv_variable): Do not build address
414 expression for BT_CHARACTER dummy args.
416 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
417 Tobias Burnus <burnus@net-b.de>
420 * trans-expr.c (gfc_conv_function_call): Handle c_funloc.
421 * trans-types.c: Add pfunc_type_node.
422 (gfc_init_types,gfc_typenode_for_spec): Use it.
423 * resolve.c (gfc_iso_c_func_interface): Fix whitespace and
424 improve error message.
426 2007-07-22 Daniel Franke <franke.daniel@gmail.com>
429 * parse.c (gfc_fixup_sibling_symbols): No replacement of symbols if
430 the current is a namelist.
432 2007-07-22 Daniel Franke <franke.daniel@gmail.com>
438 * gfortran.h (gfc_intrinsic_sym): Changed members elemental, pure,
439 generic, specific, actual_ok, noreturn into bits of a bitfield,
440 added bits for inquiry, transformational, conversion.
441 * check.c (non_init_transformational): Removed, removed all callers.
442 * intrinsic.c (enum class): New.
443 (add_sym*): Replaced argument elemetal by enum class. Changed all
445 (add_functions): Assign appropriate classes to intrinsic functions.
446 (add_subroutines): Assign appropriate classes to intrinsic subroutines.
447 (add_conv): Set conversion attribute.
448 (gfc_init_expr_extensions): Removed, removed all callers.
449 (gfc_intrinsic_func_interface): Reimplemented check for non-standard
450 initializatione expressions.
451 * expr.c (check_specification_function): New.
452 (gfc_is_constant_expr): Added check for specification functions.
453 (check_init_expr_arguments): New.
454 (check_inquiry): Changed return value to MATCH, added checks for
455 inquiry functions defined by F2003.
456 (check_transformational): New.
458 (check_elemental): New.
459 (check_conversion): New.
460 (check_init_expr): Call new check functions, add more specific error
463 2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
466 * resolve.c (set_name_and_label): Set kind number for character
467 version of c_f_pointer.
468 (gfc_iso_c_sub_interface): Set the kind of the SHAPE formal arg to
469 that of the actual SHAPE arg.
470 * symbol.c (gen_shape_param): Initialize kind for SHAPE arg.
472 2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
475 * symbol.c (generate_isocbinding_symbol): Remove unnecessary
479 * resolve.c (gfc_iso_c_func_interface): Reject assumed-shape and
480 deferred-shape arrays as args to C_LOC. Fix bug in testing
481 character args to C_LOC.
483 2007-07-21 Lee Millward <lee.millward@gmail.com>
486 * trans-intrinsic.c (gfc_conv_intrinsic_int): Evaluate all
487 arguments passed, not just the first one. Adjust code to
488 refer to "args[0]" instead of "arg" as a result.
490 2007-07-19 Christopher D. Rickett <crickett@lanl.gov>
493 * trans-expr.c (gfc_conv_function_call): Inline C_LOC.
495 2007-07-18 Christopher D. Rickett <crickett@lanl.gov>
498 * symbol.c (generate_isocbinding_symbol): Fix bug where
499 ISOCBINDING_FUNPTR was generated for C_LOC instead of the needed
502 2007-07-17 Janus Weil <jaydub66@gmail.com>
505 * resolve.c (resolve_fl_namelist): Check for namelist private
506 components in contained subprograms.
508 2007-07-17 Paul Thomas <pault@gcc.gnu.org>
512 * trans-expr.c (gfc_trans_subcomponent_assign): Ensure that
513 renormalization unity base is done independently of existing
515 (gfc_trans_scalar_assign): If rhs is not a variable, put
516 lse->pre after rse->pre to ensure that de-allocation of lhs
517 occurs after evaluation of rhs.
519 2007-07-16 Lee Millward <lee.millward@gmail.com>
524 * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
525 to operate on a stack allocated array for the intrinsic arguments
526 instead of creating a TREE_LIST. Add two new parameters for the
527 array and the number of elements. Update all callers to allocate
528 an array of the correct length to pass in. Update comment.
529 (gfc_intrinsic_argument_list_length): New function.
530 (gfc_conv_intrinsic_conversion): Call it.
531 (gfc_conv_intrinsic_mnimax): Likewise.
532 (gfc_conv_intrinsic_merge): Likewise.
533 (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
535 (gfc_conv_intrinsic_cmplx): Likewise.
536 (gfc_conv_intrinsic_ctime): Likewise.
537 (gfc_covn_intrinsic_fdate): Likewise.
538 (gfc_conv_intrinsic_ttynam): Likewise.
539 (gfc_conv_intrinsic_ishftc): Likewise.
540 (gfc_conv_intrinsic_index): Likewise.
541 (gfc_conv_intrinsic_scan): Likewise.
542 (gfc_conv_intrinsic_verify): Likewise.
543 (gfc_conv_intrinsic_trim): Likewise.
544 (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
545 (gfc_conv_intrinsic_exponent): Likewise.
546 (gfc_conv_intrinsic_bound): Likewise.
547 (gfc_conv_intrinsic_abs): Likewise.
548 (gfc_conv_intrinsic_mod): Likewise.
549 (gfc_conv_intrinsic_sign): Likewise.
550 (gfc_conv_intrinsic_len): Likewise.
551 (gfc_conv_intrinsic_adjust): Likewise.
552 (gfc_conv_intrinsic_si_kind): Likewise.
554 2007-07-16 Janne Blomqvist <jb@gcc.gnu.org>
557 * trans-decl.c (gfc_build_builtin_function_decls): Remove
558 DECL_IS_MALLOC attribute from internal_realloc, thus reverting
559 part of my 2007-07-03 patch.
561 2007-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
562 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
565 * gfortran.h (gfc_option_t): Add flag_sign_zero field.
566 * lang.opt (-fsign-zero): New option.
567 * trans.h: Rename gfor_fndecl_set_std into gfor_fndecl_set_options.
568 * trans-decl.c (gfc_build_builtin_function_decls): Build the function
569 declaration to pass an array containing the options to be used by the
570 runtime library. (gfc_generate_function_code): Build an array that
571 contains option values to be passed to the runtime library and the call
573 * options.c (gfc_init_options): Initialize the flag_sign_zero field.
574 (gfc_handle_option): Handle the -fsign-zero option.
576 2007-07-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
579 * trans-array.c (gfc_conv_array_ref): Only evaluate index once.
581 2007-07-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
584 * iresolve.c (gfc_resolve_mvbits): Convert FROMPOS, LEN and TOPOS
587 2007-07-14 Thomas Koenig <tkoenig@gcc.gnu.org>
590 * iresolve.c(gfc_resolve_pack): A scalar mask has
591 to be kind=4, an array mask with kind<4 is converted
592 to gfc_default_logical_kind automatically.
593 (gfc_resolve_unpack): Convert mask to gfc_default_lotical_kind
596 2007-07-14 Paul Thomas <pault@gcc.gnu.org>
599 * parse.c (parse_spec): Emit error on unexpected statement
602 2007-07-13 Daniel Franke <franke.daniel@gmail.com>
604 * invoke.texi: Unified upper- and lower-case in menus.
605 (-w, -W): Removed, documented by gcc.
606 * intrinsic.texi: Unified Class-section entries, added
607 subroutine/function warning where appropiate.
609 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
612 * decl.c (gfc_match_suffix): Removed surplus general error that hides
613 a more specific message.
614 * resolve.c (resolve_fl_variable): Reject illegal initializiers only
616 (resolve_fl_procedure): Added check for initializers of functions.
618 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
621 * invoke.texi (-static-libgfortran): Document new option.
623 2007-07-12 Paul Thomas <pault@gcc.gnu.org>
627 * module.c (write_generic): Restore patch of 2007-07-10 and use
628 symbol name if there are no use names.
630 2007-07-12 Christopher D. Rickett <crickett@lanl.gov>
633 * decl.c (verify_c_interop_param): Require character string dummy
634 args to BIND(C) procedures to have length 1.
635 * resolve.c (resolve_fl_procedure): Modify parameter checking for
639 * resolve.c (gfc_iso_c_func_interface): Verify that a valid
640 expression is given as an argument to C_LOC and C_ASSOCIATED.
641 * trans-io.c (transfer_expr): Add argument for code block. Add
642 standards check to determine if an error message should be
643 reported for printing C_PTR or C_FUNPTR.
644 (transfer_array_component): Update arguments to transfer_expr.
645 (gfc_trans_transfer): Ditto.
647 * symbol.c (gen_cptr_param): Fix whitespace.
649 2007-07-12 Jakub Jelinek <jakub@redhat.com>
652 * trans.h (GFC_POINTER_TYPE_P): Define.
653 * trans-types.c (gfc_sym_type): Set it for types on attr->sym.pointer.
654 * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
655 if GFC_POINTER_TYPE_P is set on the type.
657 2007-07-12 Richard Guenther <rguenther@suse.de>
659 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Convert
660 arguments to gfc_charlen_type_node.
661 * trans-io.c (gfc_convert_array_to_string): Convert type
662 size to gfc_array_index_type.
664 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
668 * module.c: Reverted Paul's patch from 2007-07-10.
670 2007-07-11 Richard Guenther <rguenther@suse.de>
672 * trans-array.c (gfc_conv_array_parameter): Use correct
673 types for comparison.
674 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
675 correct types for POINTER_PLUS_EXPR.
676 * trans-stmt.c (gfc_trans_forall_loop): Use correct type
677 for integer one constant.
679 2007-07-10 Paul Thomas <pault@gcc.gnu.org>
682 * resolve.c (is_external_proc): New function. Adds test that
683 the symbol is not an intrinsic procedure.
684 * (resolve_function, resolve_call): Replace logical statements
685 with call to is_external_proc.
688 * simplify.c (gfc_simplify_transfer): If mold has rank, the
692 * module.c (write_generic): Write the local name of the
695 2007-07-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
698 * trans-array.c (gfc_trans_array_constructor): Mark offset field
699 with TREE_NO_WARNING.
700 * trans-decl.c (gfc_build_qualified_array): Mark lbound, ubound,
701 stride and size variables with TREE_NO_WARNING.
703 2007-07-09 Steven G. Kargl <kargl@gcc.gnu.org>
705 * trans-decl.c (set_tree_decl_type_code): Remove function.
706 (generate_local_decl): Remove reference to set_tree_decl_type_code.
708 2007-07-09 Daniel Franke <franke.daniel@gmail.com>
711 * trans-decl.c (generate_local_decl) Emit a warning if an unused
714 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
717 * module.c (gfc_match_use): Do not set an non-existant
718 intrinsic operator if a user-defined operator is found.
720 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
724 * trans-decl.c (generate_local_decl): Adjusted warning on unused
725 dummy arguments, tell middle-end not to emit additional warnings.
727 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
728 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
731 * gfortran.h (gfc_intrinsic_op): Added INTRINSIC_EQ_OS,
732 INTRINSIC_NE_OS, INTRINSIC_GT_OS, INTRINSIC_GE_OS,
733 INTRINSIC_LT_OS and INTRINSIC_LE_OS.
734 * arith.c (eval_intrinsic, eval_type_intrinsic0): Likewise.
735 * arith.h (gfc_eq, gfc_ne, gfc_gt, gfc_ge, gfc_lt, gfc_le):
736 Added gfc_intrinsic_op as third argument type.
737 * dump-parse-tree.c (gfc_show_expr): Account for new enum values.
738 * expr.c (simplify_intrinsic_op, check_intrinsic_op): Likewise.
739 * interface.c (check_operator_interface): Likewise.
740 (gfc_check_interfaces): Added cross-checks for FORTRAN 77 and
741 Fortran 90 style operators using new enum values.
742 (gfc_extend_expr): Likewise.
743 (gfc_add_interface): Likewise.
744 * match.c (intrinsic_operators): Distinguish FORTRAN 77 style
745 operators from Fortran 90 style operators using new enum values.
746 * matchexp.c (match_level_4): Account for new enum values.
747 * module.c (mio_expr): Likewise.
748 * resolve.c (resolve_operator): Deal with new enum values, fix
749 inconsistent error messages.
750 * trans-expr.c (gfc_conv_expr_op): Account for new enum values.
752 2007-07-08 Tobias Burnus <burnus@net-b.de>
755 * interface.c (get_expr_storage_size): Properly obtain lower bound.
756 (compare_actual_formal): Add space before parenthesis.
758 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
761 * resolve.c (resolve_fl_procedure): Added check for PRIVATE types
762 in PUBLIC interfaces.
764 2007-07-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
767 * decl.c (match_attr_spec): Don't return MATCH_ERROR if comma found and
768 gfc_match_bind_c does not return MATCH_YES.
770 2007-07-07 Kazu Hirata <kazu@codesourcery.com>
772 * decl.c, gfortran.h, interface.c, module.c, resolve.c,
773 trans-array.c, trans-decl.c: Fix comment typos. Follow
774 spelling conventions.
775 * intrinsic.texi: Fix typos. Follow spelling conventions.
777 2007-05-06 Daniel Franke <franke.daniel@gmail.com>
780 * symbol.c (save_status): New.
781 * gfortran.h (save_status): Added external declaration.
782 (check_conflict): Check for conflicting explicite SAVE statements
784 (gen_special_c_interop_ptr): Use SAVE_EXPLICIT constant.
785 * module.c (ab_attribute, attr_bits): Removed enumerator value
786 AB_SAVE for save attribute.
787 (mio_symbol_attribute): Import/export the full SAVE status,
788 removed usage of AB_SAVE.
789 * dump-parse-tree.c (gfc_show_attr): Dump full SAVE status.
790 * decl.c (add_init_expr_to_sym): Set SAVE_IMPLICIT only if not
793 2007-07-05 Daniel Franke <franke.daniel@gmail.com>
794 Tobias Burnus <burnus@net-b.de>
797 * gfortran.h (symbol_attribute): Change save attribute into an enum.
798 * decl.c (add_init_expr_to_sym): Set it to SAVE_IMPLICIT.
799 * symbol.c (gfc_add_save): Check for SAVE_EXPLICIT.
800 * resolve.c (resolve_fl_variable): Check for SAVE_EXPLICIT.
801 (resolve_symbol): Allow OMP threadprivate with
802 initialization SAVEd and save_all variable.
803 * trans-decl.c (gfc_finish_var_decl): Remove obsolete sym->value check.
805 2007-07-05 Paul Thomas <pault@gcc.gnu.org>
808 * match.c (gfc_match_call): Check, in all cases, that a symbol
809 is neither generic nor a subroutine before trying to add it as
813 * match.c (gfc_match_do): Reset the implied_index attribute.
815 2007-07-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
818 * trans-intrinsic.c (trans-intrinsic.c): Handle optional
819 arguments correctly for MIN and MAX intrinsics.
821 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
824 * io.c (check_format): Always call gfc_error for errors.
825 (check_format_string): Change type of this function to try and
826 return the result of check_format.
827 (check_io_constraints): Return MATCH_ERROR if check_format_string
830 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
833 * decl.c (get_proc_name): Include attr->mod_proc in check for error.
835 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
838 * gfortran.h: Change type of gfc_assign_data_value from void to try.
839 * data.c (gfc_assign_data_value): Return FAILURE if error found.
840 * resolve.c (check_data_variable): If gfc_assign_data_value returns
841 failure, break out of loop and return failure.
843 2007-07-03 Christopher D. Rickett <crickett@lanl.gov>
846 * symbol.c (gen_cptr_param): Generate C_PTR and C_FUNPTR if necessary.
847 (build_formal_args): Pass intrinsic module symbol id to
850 2007-07-03 Tobias Burnus <burnus@net-b.de>
853 * resolve.c (resolve_common_blocks): New check function.
854 (resolve_types): Use it.
856 2007-07-03 Tobias Burnus <burnus@net-b.de>
859 * interface.c (get_sym_storage_size): New function.
860 (get_sym_storage_size): New function.
861 (compare_actual_formal): Enhance sequence association
862 support and improve checking.
864 2007-07-03 Janne Blomqvist <jb@gcc.gnu.org>
866 * trans-decl.c (gfc_build_builtin_function_decls): Mark
867 internal_realloc as a malloc function.
869 2007-07-03 Tobias Burnus <burnus@net-b.de>
872 * resolve.c (resolve_operator): Check for NULL as operand.
874 2007-07-02 Tobias Burnus <burnus@net-b.de>
876 * gfortran.texi (Fortran 2003): Add ISO Bind C.
877 * intrinsic.texi (C_ASSOCIATED,C_F_POINTER,C_F_PROCPOINTER,
878 C_FUNLOC,C_LOC): Document new ISO Bind C intrinsics.
880 2007-07-01 Christopher D. Rickett <crickett@lanl.gov>
882 * interface.c (gfc_compare_derived_types): Special case for comparing
883 derived types across namespaces.
884 (gfc_compare_types): Deal with BT_VOID.
885 (compare_parameter): Use BT_VOID to accept ISO C Binding pointers.
886 * trans-expr.c (gfc_conv_function_call): Remove setting parm_kind
888 (gfc_conv_initializer): Deal with ISO C Binding NULL_PTR and
890 (gfc_conv_expr): Convert expressions for ISO C Binding derived types.
891 * symbol.c (gfc_set_default_type): BIND(C) variables should not be
893 (check_conflict): Add BIND(C) and check for conflicts.
894 (gfc_add_explicit_interface): Whitespace.
895 (gfc_add_is_bind_c): New function.
896 (gfc_copy_attr): Use it.
897 (gfc_new_symbol): Initialize ISO C Binding objects.
898 (get_iso_c_binding_dt): New function.
899 (verify_bind_c_derived_type): Ditto.
900 (gen_special_c_interop_ptr): Ditto.
901 (add_formal_arg): Ditto.
902 (gen_cptr_param): Ditto.
903 (gen_fptr_param): Ditto.
904 (gen_shape_param): Ditto.
905 (add_proc_interface): Ditto.
906 (build_formal_args): Ditto.
907 (generate_isocbinding_symbol): Ditto.
908 (get_iso_c_sym): Ditto.
909 * decl.c (num_idents_on_line, has_name_equals): New variables.
910 (verify_c_interop_param): New function.
911 (build_sym): Finish binding labels and deal with COMMON blocks.
912 (add_init_expr_to_sym): Check if the initialized expression is
913 an iso_c_binding named constants
914 (variable_decl): Set ISO C Binding type_spec components.
915 (gfc_match_kind_spec): Check match for C interoperable kind.
916 (match_char_spec): Fix comment. Chnage gfc_match_small_int
917 to gfc_match_small_int_expr. Check for C interoperable kind.
918 (match_type_spec): Clear the current binding label.
919 (match_attr_spec): Add DECL_IS_BIND_C. If BIND(C) is found, use it
921 (set_binding_label): New function.
922 (set_com_block_bind_c): Ditto.
923 (verify_c_interop): Ditto.
924 (verify_com_block_vars_c_interop): Ditto.
925 (verify_bind_c_sym): Ditto.
926 (set_verify_bind_c_sym): Ditto.
927 (set_verify_bind_c_com_block): Ditto.
928 (get_bind_c_idents): Ditto.
929 (gfc_match_bind_c_stmt): Ditto.
930 (gfc_match_data_decl): Use num_idents_on_line.
931 (match_result): Deal with right paren in BIND(C).
932 (gfc_match_suffix): New function.
933 (gfc_match_function_decl): Use it. Code is re-arranged to deal with
934 ISO C Binding result clauses.
935 (gfc_match_subroutine): Deal with BIND(C).
936 (gfc_match_bind_c): New function.
937 (gfc_get_type_attr_spec): New function. Code is re-arranged in and
938 taken from gfc_match_derived_decl.
939 (gfc_match_derived_decl): Add check for BIND(C).
940 * trans-common.c: Forward declare gfc_get_common.
941 (gfc_sym_mangled_common_id): Change arg from 'const char *name' to
942 'gfc_common_head *com'. Check for ISO C Binding of the common block.
943 (build_common_decl): 'com->name' to 'com in SET_DECL_ASSEMBLER_NAME.
944 * gfortran.h: Add GFC_MAX_BINDING_LABEL_LEN
946 (sym_flavor): Add FL_VOID.
947 (iso_fortran_env_symbol, iso_c_binding_symbol, intmod_id): New enum
948 (CInteropKind_t): New struct.
949 (c_interop_kinds_table): Use it. Declare an array of structs.
950 (symbol_attribute): Add is_bind_c, is_c_interop, and is_iso_c
952 (gfc_typespec): Add is_c_interop; is_iso_c, and f90_type members.
953 (gfc_symbol): Add from_intmod, intmod_sym_id, binding_label, and
954 common_block members.
955 (gfc_common_head): Add binding_label and is_bind_c members.
956 (gfc_gsymbol): Add sym_name, mod_name, and binding_label members.
957 Add prototypes for get_c_kind, gfc_validate_c_kind,
958 gfc_check_any_c_kind, gfc_add_is_bind_c, gfc_add_value,
959 verify_c_interop, verify_c_interop_param, verify_bind_c_sym,
960 verify_bind_c_derived_type, verify_com_block_vars_c_interop,
961 generate_isocbinding_symbol, get_iso_c_sym, gfc_iso_c_sub_interface
962 * iso-c-binding.def: New file. This file contains the definitions
963 of the types provided by the Fortran 2003 ISO_C_BINDING intrinsic
965 * trans-const.c (gfc_conv_constant_to_tree): Deal with C_NULL_PTR
966 or C_NULL_FUNPTR expressions.
967 * expr.c (gfc_copy_expr): Add BT_VOID case. For BT_CHARACTER, the
968 ISO C Binding requires a minimum string length of 1 for '\0'.
969 * module.c (intmod_sym): New struct.
970 (pointer_info): Add binding_label member.
971 (write_atom): Set len to 0 for NULL pointers. Check for NULL p and *p.
972 (ab_attribute): Add AB_IS_BIND_C, AB_IS_C_INTEROP and AB_IS_ISO_C.
973 (attr_bits): Add "IS_BIND_C", "IS_C_INTEROP", and "IS_ISO_C".
974 (mio_symbol_attribute): Deal with ISO C Binding attributes.
975 (bt_types): Add "VOID".
976 (mio_typespec): Deal with ISO C Binding components.
977 (mio_namespace_ref): Add intmod variable.
978 (mio_symbol): Check for symbols from an intrinsic module.
979 (load_commons): Check for BIND(C) common block.
980 (read_module): Read binding_label and use it.
981 (write_common): Add label. Write BIND(C) info.
982 (write_blank_common): Blank commons are not BIND(C). Explicitly
984 (write_symbol): Deal with binding_label.
985 (sort_iso_c_rename_list): New function.
986 (import_iso_c_binding_module): Ditto.
987 (create_int_parameter): Add to args.
988 (use_iso_fortran_env_module): Adjust to deal with iso_c_binding
990 * trans-types.c (c_interop_kinds_table): new array of structs.
991 (gfc_validate_c_kind): New function.
992 (gfc_check_any_c_kind): Ditto.
993 (get_real_kind_from_node): Ditto.
994 (get_int_kind_from_node): Ditto.
995 (get_int_kind_from_width): Ditto.
996 (get_int_kind_from_minimal_width): Ditto.
997 (init_c_interop_kinds): Ditto.
998 (gfc_init_kinds): call init_c_interop_kinds.
999 (gfc_typenode_for_spec): Adjust for BT_VOID and ISO C Binding pointers.
1000 Adjust handling of BT_DERIVED.
1001 (gfc_sym_type): Whitespace.
1002 (gfc_get_derived_type): Account for iso_c_binding derived types
1003 * resolve.c (is_scalar_expr_ptr): New function.
1004 (gfc_iso_c_func_interface): Ditto.
1005 (resolve_function): Use gfc_iso_c_func_interface.
1006 (set_name_and_label): New function.
1007 (gfc_iso_c_sub_interface): Ditto.
1008 (resolve_specific_s0): Use gfc_iso_c_sub_interface.
1009 (resolve_bind_c_comms): New function.
1010 (resolve_bind_c_derived_types): Ditto.
1011 (gfc_verify_binding_labels): Ditto.
1012 (resolve_fl_procedure): Check for ISO C interoperability.
1013 (resolve_symbol): Check C interoperability.
1014 (resolve_types): Walk the namespace. Check COMMON blocks.
1015 * trans-decl.c (gfc_sym_mangled_identifier): Prevent the mangling
1016 of identifiers that have an assigned binding label.
1017 (gfc_sym_mangled_function_id): Use the binding label rather than
1019 (gfc_finish_var_decl): Put variables that are BIND(C) into a common
1020 segment of the object file, because this is what C would do.
1021 (gfc_create_module_variable): Conver to proper types
1022 (set_tree_decl_type_code): New function.
1023 (generate_local_decl): Check dummy variables and derived types for
1024 ISO C Binding attributes.
1025 * match.c (gfc_match_small_int_expr): New function.
1026 (gfc_match_name_C): Ditto.
1027 (match_common_name): Deal with ISO C Binding in COMMON blocks
1028 * trans-io.c (transfer_expr): Deal with C_NULL_PTR or C_NULL_FUNPTR
1030 * match.h: Add prototypes for gfc_match_small_int_expr,
1031 gfc_match_name_C, match_common_name, set_com_block_bind_c,
1032 set_binding_label, set_verify_bind_c_sym,
1033 set_verify_bind_c_com_block, get_bind_c_idents,
1034 gfc_match_bind_c_stmt, gfc_match_suffix, gfc_match_bind_c,
1035 gfc_get_type_attr_spec
1036 * parse.c (decode_statement): Use gfc_match_bind_c_stmt
1037 (parse_derived): Init *derived_sym = NULL, and gfc_current_block
1038 later for valiadation.
1039 * primary.c (got_delim): Set ISO C Binding components of ts.
1040 (match_logical_constant): Ditto.
1041 (match_complex_constant): Ditto.
1042 (match_complex_constant): Ditto.
1043 (gfc_match_rvalue): Check for existence of at least one arg for
1044 C_LOC, C_FUNLOC, and C_ASSOCIATED.
1045 * misc.c (gfc_clear_ts): Clear ISO C Bindoing components in ts.
1046 (get_c_kind): New function.
1048 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
1051 * trans-expr.c (gfc_conv_power_op): Use builtin_powi for
1053 * f95-lang.c (gfc_init_builtin_functions): Add builtin_powi to the
1056 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
1058 * trans.h: Remove decls for 64-bit allocation functions.
1059 * trans-array.c (gfc_grow_array): Always pick the standard realloc
1061 (gfc_array_allocate): Likewise.
1062 * trans-decl.c: Remove trees for 64-bit allocation functions.
1063 (gfc_build_builtin_function_decls): Don't build fndecls for 64-bit
1064 allocations functions, use index_int_type for normal allocation
1067 2007-06-30 Daniel Franke <franke.daniel@gmail.com>
1070 * intrinsic.c (add_functions): Additional function types.
1071 (gfc_convert_type_warn): Remove intrinsic-flag from
1072 conversion functions.
1073 * resolve.c (resolve_symbol): Added type checks to
1074 explicitly defined intrinsics.
1076 2007-06-30 Tobias Burnus <burnus@net-b.de>
1079 * io.c (check_format): Allow zero to precede the
1082 2007-06-30 Paul Thomas <pault@gcc.gnu.org>
1085 * simplify.c (gfc_simplify_repeat): Add handling of character
1086 literal for first argument.
1088 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
1090 * resolve.c (resolve_operator): Added check whether a user
1091 defined operator is available.
1093 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
1095 * openmp.c (resolve_omp_clauses): Adjust error message to
1096 better reflect the actual requirement.
1098 2007-06-29 Tobias Burnus <burnus@net-b.de>
1101 * io.c (format_lex): Fix FMT_ZERO.
1102 (check_format,check_format_string,gfc_match_format,
1103 check_io_constraints) Additional checking for READ.
1105 2007-06-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1108 * lang.opt (static-libgfortran): New option.
1109 * gfortranspec.c (ADD_ARG_LIBGFORTRAN): New macro.
1110 (Option): Add OPTION_static and OPTION_static_libgfortran.
1111 (lookup_option): Handle the new -static-libgfortran option.
1112 (lang_specific_driver): Check whether -static is passed.
1113 Handle the new -static-libgfortran option.
1114 * options.c (gfc_handle_option): If -static-libgfortran is
1115 passed and isn't supported on this configuration, error out.
1117 2007-06-27 Daniel Franke <franke.daniel@gmail.com>
1120 * openmp.c (resolve_omp_clauses): Emit error on allocatable
1121 components in COPYIN, COPYPRIVATE, FIRSTPRIVATE and LASTPRIVATE
1124 2007-06-25 Paul Thomas <pault@gcc.gnu.org>
1127 * resolve.c (check_host_association): Return if the old symbol
1128 is use associated. Introduce retval to reduce the number of
1129 evaluations of the first-order return value.
1132 * match.c (gfc_match_call): If a host associated symbol is not
1133 a subroutine, build a new symtree/symbol in the current name
1136 2007-06-24 Tobias Burnus <burnus@net-de>
1139 * interface.c (gfc_compare_derived_types): Add access check.
1140 * symbol.c (gfc_find_component): Ditto.
1141 (gfc_set_component_attr,gfc_get_component_attr) Copy access state.
1142 * dump-parse-tree.c (gfc_show_components): Dump access state.
1143 * gfortran.h (struct gfc_component): Add gfc_access.
1144 * module.c (mio_component): Add access state.
1145 * (gfc_match_structure_constructor): Check for private access state.
1147 2007-06-24 Paul Thomas <pault@gcc.gnu.org>
1151 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Calculate
1152 the offset between the loop counter and the position as
1153 defined. Add the offset within the loop so that the mask acts
1154 correctly. Do not advance the location on the basis that it
1157 2007-06-22 Daniel Franke <franke.daniel@gmail.com>
1160 * symbol.c (gfc_copy_attr): Emit errors for duplicate
1161 EXTERNAL/INTRINSIC statements.
1163 2007-06-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1166 * expr.c (gfc_check_assign): If the rvalue expression type is NULL_EXPR,
1167 check to see if the lvalue has attribute pointer and data.
1169 2007-06-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1172 * resolve.c (gfc_resolve_iterator_expr): Add check for REAL using
1173 gfc_notify_standard. (gfc_resolve_iterator): Remove check.
1174 (resolve_branch): Change "Obsolete" to "Deleted feature".
1175 * io.c (resolve_tag): Ditto.
1176 * match.c (gfc_match_pause, gfc_match_assign, gfc_match_goto): Ditto.
1178 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1181 * match.c (gfc_match_common): If the symbol value expression type is
1182 NULL_EXPR, don't error if previously initialized.
1184 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1187 * decl.c (get_proc_name) Check symbol for generic interface
1190 2007-06-20 Andrew Pinski <andrew_pinski@playstation.sony.com>
1191 Richard Guenther <rguenther@suse.de>
1194 * trans.c (gfc_build_addr_expr): Use the correct types.
1196 2007-06-19 Paul Thomas <pault@gcc.gnu.org>
1200 * resolve.c (resolve_code): Use gfc_impure_variable as a
1201 condition for rejecting derived types with pointers, in pure
1203 (gfc_impure_variable): Add test for dummy arguments of pure
1204 procedures; any for functions and INTENT_IN for subroutines.
1207 * data.c (gfc_assign_data_value): Change the ICE on an array
1208 reference initializer not being an array into an error and
1209 clear init to prevent a repetition of the error.
1211 2007-06-17 Janne Blomqvist <jb@gcc.gnu.org>
1213 * gfortran.texi: Add documentation for GFORTRAN_UNBUFFERED_n
1214 environment variables. Fix documentation for
1215 GFORTRAN_UNBUFFERED_ALL environment variable.
1217 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1219 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
1220 POINTER_PLUS_EXPR instead of PLUS_EXPR for pointer addition.
1221 * trans-expr.c (gfc_trans_string_copy): Create
1222 POINTER_PLUS_EXPR instead of a PLUS_EXPR
1225 2007-06-14 Paul Thomas <pault@gcc.gnu.org>
1228 * trans-common.c (build_common_decl): If resizing of common
1229 decl is needed, update the TREE_TYPE.
1231 2007-06-13 Tobias Burnus <burnus@net-b.de>
1234 * interface.c (has_vector_section): New.
1235 (compare_actual_formal): Check for array sections with vector subscript.
1237 2007-06-12 Dirk Mueller <dmueller@suse.de>
1239 * trans-stmt.c (gfc_trans_call): fix gcc_assert to
1240 a comparison, not an assignment.
1242 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
1244 * trans-common.c (create_common): Initialize 'field_init'.
1246 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
1250 * trans-common.c (get_init_field): New function.
1251 (create_common): Call get_init_field for overlapping
1252 initializers in equivalence blocks.
1253 * resolve.c (resolve_equivalence_derived, resolve_equivalence):
1254 Remove constraints on initializers in equivalence blocks.
1255 * target-memory.c (expr_to_char, gfc_merge_initializers):
1257 (encode_derived): Add the bit offset to the byte offset to get
1258 the total offset to the field.
1259 * target-memory.h : Add prototype for gfc_merge_initializers.
1261 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
1263 * trans-types.c (gfc_signed_type): Remove.
1264 * trans-types.h (gfc_signed_type): Remove.
1265 * f95-lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
1267 2007-06-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1269 * trans-intrinsic.c: Revert Lee's 2007-06-04 patch.
1271 2007-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
1272 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1275 * match.c (gfc_match_special_char): New function. Match special char.
1277 * match.h: Add prototype.
1278 * io.c (next_char): Use it.
1279 * primary.c (next_string_char): Ditto.
1281 2007-06-06 Steven G. Kargl <kargl@gcc.gnu.org>
1283 * decl.c: Miscellaneous whitespace fixes.
1285 * gfortran.h: Likewise.
1286 * interface.c : Likewise.
1288 * match.c: Likewise.
1289 * match.h: Likewise.
1290 * module.c: Likewise.
1291 * parse.c: Likewise.
1292 * resolve.c: Likewise.
1293 * symbol.c: Likewise.
1294 * trans-array.c: Likewise.
1295 * trans-common.c: Likewise.
1296 * trans-decl.c: Likewise.
1297 * trans-intrinsic.c: Likewise.
1298 * trans-io.c: Likewise.
1299 * trans-stmt.c: Likewise.
1300 * trans-types.c: Likewise.
1302 2007-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1305 * parse.c (decode_statement): Don't call gfc_undo_symbols on MATCH_ERROR
1306 for ST_FUNCTION since it is called in reject_statement.
1307 (parse_contained): If error, loop back after reject_statement and try
1308 again. Free the namespace if an error occured.
1310 2007-06-04 Lee Millward <lee.millward@codesourcery.com>
1312 * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
1313 to operate on a stack allocated array for the intrinsic arguments
1314 instead of creating a TREE_LIST. Add two new parameters for the
1315 array and the number of elements. Update all callers to allocate
1316 an array of the correct length to pass in. Update comment.
1317 (gfc_intrinsic_argument_list_length): New function.
1318 (gfc_conv_intrinsic_mnimax): Call it.
1319 (gfc_conv_intrinsic_merge): Likewise.
1320 (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
1322 (gfc_conv_intrinsic_cmplx): Likewise.
1323 (gfc_conv_intrinsic_ctime): Likewise.
1324 (gfc_covn_intrinsic_fdate): Likewise.
1325 (gfc_conv_intrinsic_ttynam): Likewise.
1326 (gfc_conv_intrinsic_ishftc): Likewise.
1327 (gfc_conv_intrinsic_index): Likewise.
1328 (gfc_conv_intrinsic_scan): Likewise.
1329 (gfc_conv_intrinsic_verify): Likewise.
1330 (gfc_conv_intrinsic_trim): Likewise.
1331 (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
1332 (gfc_conv_intrinsic_exponent): Likewise.
1333 (gfc_conv_intrinsic_bound): Likewise.
1334 (gfc_conv_intrinsic_abs): Likewise.
1335 (gfc_conv_intrinsic_mod): Likewise.
1336 (gfc_conv_intrinsic_sign): Likewise.
1337 (gfc_conv_intrinsic_len): Likewise.
1338 (gfc_conv_intrinsic_adjust): Likewise.
1339 (gfc_conv_intrinsic_si_kind): Likewise.
1341 2007-06-04 Steve Ellcey <sje@cup.hp.com>
1343 * trans-array.c (gfc_conv_array_parameter): Initialize tmp.
1345 2007-05-31 Richard Guenther <rguenther@suse.de>
1347 * trans-expr.c (gfc_conv_expr_op): Use zero constant
1348 that matches the lse type.
1349 (gfc_trans_string_copy): Use sizetype zero constant.
1350 * intrinsic.c (add_functions): The sizeof intrinsic has
1352 * trans-types.c (gfc_get_dtype): Convert size to index
1353 type before shifting.
1354 * trans-array.c (gfc_trans_array_constructor_value): Use
1355 index type for offset computation.
1356 * trans-intrinsic.c (gfc_conv_associated): Use correct type
1359 2007-05-31 Paul Thomas <pault@gcc.gnu.org>
1362 * trans-array.c (gfc_trans_array_constructor): Treat the case
1363 where the ss expression charlen is missing.
1365 22007-05-31 Paul Thomas <pault@gcc.gnu.org>
1368 * module.c (mio_symtree_ref): If an equivalence group member
1369 is not used, give it a hidden symbol and set the pointer_info.
1370 (load_equiv): Only free the equivalence if none of the members
1373 2007-05-29 Daniel Franke <franke.daniel@gmail.com>
1375 * gfortran.h: Renamed 'enum gfc_generic_isym_id' to 'enum gfc_isym_id',
1376 added missing GFC_ISYM_* enumerators, ordered alphabetically.
1377 (struct gfc_intrinsic_sym): Renamed 'generic_id' to 'id'.
1378 (gfc_find_subroutine): New prototype.
1379 * intrinsic.c (add_sym, add_sym_*): Added argument 'id' and changed all callers.
1380 (find_subroutine): Renamed to 'gfc_find_subroutine', removed static.
1381 * dependency.c: Changed usage of isym->generic_id to isym->id.
1382 * openmp.c: Likewise.
1383 * resolve.c: Likewise.
1384 * trans-array.c: Likewise.
1385 * trans-expr.c: Likewise.
1386 * trans-intrinsic.c: Likewise.
1387 * trans-openmp.c: Likewise.
1389 2007-05-28 Tobias Schlüter <tobi@gcc.gnu.org>
1391 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIZEOF.
1392 * intrinsic.c (add_functions): Add stuff for SIZEOF intrinsic.
1393 * intrinsic.h (gfc_check_sizeof): Add prototype of ...
1394 * check.c (gfc_check_sizeof): .. new function.
1395 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): New function.
1396 (gfc_conv_intrinsic_strcmp): Whitespace fix.
1397 (gfc_conv_intrinsic_array_transfer): Remove double initialization,
1398 use fold_build. where appropriate.
1399 (gfc_conv_intrinsic_function): Add case for SIZEOF.
1400 * intrinsic.texi: Add documentation for SIZEOF.
1402 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
1404 * trans-array.c (gfc_conv_expr_descriptor): Edit comment.
1406 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
1409 * target-memory.c (gfc_target_expr_size): Add handling
1410 for size of BT_HOLLERITH variables.
1411 * check.c (gfc_check_transfer): Reject BT_HOLLERITH
1412 variables in MOLD argument of TRANSFER.
1414 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
1416 * gfortran.h (gfc_expr): Remove from_H, add "representation"
1418 * primary.c (match_hollerith_constant): Store the representation
1419 of the Hollerith in representation, not in value.character.
1420 * arith.c: Add dependency on target-memory.h.
1421 (eval_intrinsic): Remove check for from_H.
1422 (hollerith2representation): New function.
1423 (gfc_hollerith2int): Determine value of the new constant.
1424 (gfc_hollerith2real): Likewise.
1425 (gfc_hollerith2complex): Likewise.
1426 (gfc_hollerith2logical): Likewise.
1427 (gfc_hollerith2character): Point both representation.string and
1428 value.character.string at the value string.
1429 * data.c (create_character_initializer): For BT_HOLLERITH
1430 rvalues, get the value from the representation rather than
1432 * expr.c (free_expr0): Update handling of BT_HOLLERITH values
1433 and values with representation.string.
1434 (gfc_copy_expr): Likewise.
1435 * intrinsic.c (do_simplify): Remove special treatement of
1436 variables resulting from Hollerith constants.
1437 * dump-parse-trees.c (gfc_show_expr): Update handling of
1439 * trans-const.c (gfc_conv_constant_to_tree): Replace from_H
1440 check with check for representation.string; get Hollerith
1441 representation from representation.string, not value.character.
1442 * trans-expr.c (is_zero_initializer_p): Replace from_H check
1443 with check for representation.string.
1444 * trans-stmt.c (gfc_trans_integer_select): Use
1445 gfc_conv_mpz_to_tree for case values, so as to avoid picking up
1446 the memory representation if the case is given by a transfer
1448 * target-memory.c (gfc_target_encode_expr): Use the known memory
1449 representation rather than the value, if it exists.
1450 (gfc_target_interpret_expr): Store the memory representation of
1451 the interpreted expression as well as its value.
1452 (interpret_integer): Move to gfc_interpret_integer, make
1454 (interpret_float): Move to gfc_interpret_float, make non-static.
1455 (interpret_complex): Move to gfc_interpret_complex, make
1457 (interpret_logical): Move to gfc_interpret_logical, make
1459 (interpret_character): Move to gfc_interpret_character, make
1461 (interpret_derived): Move to gfc_interpret_derived, make
1463 * target-memory.h: Add prototypes for newly-exported
1464 gfc_interpret_* functions.
1466 2007-05-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1469 * parse.c (next_statement): Warn for truncated lines if source is free
1472 2007-05-27 Paul Thomas <pault@gcc.gnu.org>
1473 Tobias Burnus <burnus@net-b.de>
1476 * symbol.c (gfc_check_function_type): Copy dimensions of
1478 * resolve.c (resolve_contained_fntype): Improve symbol output in
1481 2007-05-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1484 * io.c (check_format): Add warning for H specifier in format.
1486 2007-05-26 Tobias Burnus <burnus@net-b.de>
1488 * gfortran.texi: Document the GFORTRAN_ERROR_DUMPCORE and
1489 GFORTRAN_ERROR_BACKTRACE environment variables.
1491 2007-05-26 Paul Thomas <pault@gcc.gnu.org>
1494 * trans.h : Add no_function_call bitfield to gfc_se structure.
1495 Add stmtblock_t argument to prototype of get_array_ctor_strlen.
1496 * trans-array.c (get_array_ctor_all_strlen): New function.
1497 (get_array_ctor_strlen): Add new stmtblock_t argument and call
1498 new function for character elements that are not constants,
1499 arrays or variables.
1500 (gfc_conv_array_parameter): Call get_array_ctor_strlen to get
1502 * trans-intrinsic (gfc_conv_intrinsic_len): Add new argument
1503 to call of get_array_ctor_strlen.
1505 2007-05-25 Kazu Hirata <kazu@codesourcery.com>
1507 * intrinsic.texi: Fix typos.
1509 2007-05-25 Paul Thomas <pault@gcc.gnu.org>
1512 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Change
1513 order in logic under EXPR_FUNCTION to handle functions with
1516 2007-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1519 * array.c (spec_dimen_size): Test for correct BT_INTEGER type.
1521 2007-05-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1524 * trans-expr.c (gfc_trans_zero_assign): Convert the result of
1525 TYPE_SIZE_UNIT into a signed type.
1526 (gfc_trans_array_copy): Likewise.
1527 (gfc_trans_array_constructor_copy): Likewise.
1528 * trans-array.c (gfc_trans_create_temp_array): Likewise.
1529 (gfc_grow_array): Likewise.
1530 (gfc_array_init_size): Likewise.
1531 (gfc_duplicate_allocatable): Likewise.
1532 * trans-stmt.c (allocate_temp_for_forall_nest_1): Likewise.
1534 2007-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1537 * resolve.c (resolve_function): Don't call resolve_global_procedure if
1538 there is no name. Delete duplicated statement in ELSE clause.
1540 2007-05-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1543 * trans-array.c (gfc_trans_array_bound_check): Take extra argument to
1544 indicate whether we should check the upper bound in that dimension.
1545 (gfc_conv_array_index_offset): Check only the lower bound of the
1546 last dimension for assumed-size arrays.
1547 (gfc_conv_array_ref): Likewise.
1548 (gfc_conv_ss_startstride): Likewise.
1550 2007-05-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1551 Daniel Franke <franke.daniel@gmail.com>
1554 * resolve.c (resolve_actual_arglist): Resolve actual argument after
1555 being identified as variable.
1557 2007-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1560 * trans-stmt.c (gfc_trans_do): Fix the value of loop variable
1563 2007-05-21 H.J. Lu <hongjiu.lu@intel.com>
1565 * trans-stmt.c (gfc_trans_do): Fix a typo in comment.
1567 2007-05-21 Paul Thomas <pault@gcc.gnu.org>
1571 * trans-array.c (gfc_conv_expr_descriptor): Obtain the stored
1572 offset for non-descriptor, source arrays and correct for stride
1573 not equal to one before writing to field of output descriptor.
1575 2007-05-20 Daniel Franke <franke.daniel@gmail.com>
1578 * check.c (check_rest): Improved argument conformance check and
1579 fixed error message generation.
1581 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1584 * Make-lang.in: Remove use of -Wno-error for expr.o, resolve.o,
1585 simplify.o and trans-common.o.
1587 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1590 * trans-array.c (gfc_trans_auto_array_allocation): Avoid
1591 multiplication of mismatched types.
1593 2007-05-18 Daniel Franke <franke.daniel@gmail.com>
1596 * symbol.c (gfc_add_flavor): Add the NAME to error message if
1599 2007-05-15 Daniel Franke <franke.daniel@gmail.com>
1604 * intrinsic.c (check_specific): Check elemental intrinsics for
1606 (add_functions): Fixed dummy argument names of BESJN and BESYN.
1607 Fixed elemental status of MCLOCK and MCLOCK8.
1608 * check.c (check_rest): Added check for array conformance.
1609 (gfc_check_merge): Removed check for array conformance.
1610 (gfc_check_besn): Removed check for scalarity.
1611 * intrinsic.texi (CSHIFT, EOSHIFT): Fixed typos.
1612 (BESJN, BESYN): Clarified documentation.
1614 2007-05-17 Tobias Burnus <burnus@net-b.de>
1616 * gfortran.texi (GFORTRAN_CONVERT_UNIT): Improve documentation.
1618 2007-05-16 Brooks Moses <brooks.moses@codesourcery.com>
1625 * target-memory.c: New file.
1626 * target-memory.h: New file.
1627 * simplify.c: Add #include "target-memory.h".
1628 (gfc_simplify_transfer): Implement constant-
1629 folding for TRANSFER intrinsic.
1630 * Make-lang.in: Add dependencies on new target-memory.* files.
1632 2007-05-15 Paul Brook <paul@codesourcery.com>
1634 * trans-types.c (gfc_type_for_size): Handle signed TImode.
1636 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1639 * trans.h (gfor_fndecl_internal_malloc, gfor_fndecl_internal_malloc64,
1640 gfor_fndecl_internal_free): Remove prototypes.
1641 (gfor_fndecl_os_error, gfc_call_free, gfc_call_malloc): Add prototypes.
1642 * trans.c (gfc_call_malloc, gfc_call_free): New functions.
1643 * f95-lang.c (gfc_init_builtin_functions): Add __builtin_free
1644 and __builtin_malloc builtins.
1645 * trans-decl.c (gfor_fndecl_internal_malloc,
1646 gfor_fndecl_internal_malloc64, gfor_fndecl_internal_free): Remove.
1647 (gfor_fndecl_os_error): Add.
1648 (gfc_build_builtin_function_decls): Don't create internal_malloc,
1649 internal_malloc64 and internal_free library function declaration.
1650 Create os_error library call function declaration.
1651 * trans-array.c (gfc_trans_allocate_array_storage,
1652 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1653 gfc_conv_array_parameter, gfc_duplicate_allocatable): Use
1654 gfc_call_malloc and gfc_call_free instead of building calls to
1655 internal_malloc and internal_free.
1656 * trans-expr.c (gfc_conv_string_tmp): Likewise.
1657 * trans-stmt.c (gfc_do_allocate, gfc_trans_assign_need_temp,
1658 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
1659 gfc_trans_where_2: Likewise.
1660 * trans-intrinsic.c (gfc_conv_intrinsic_ctime,
1661 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
1662 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_trim): Likewise.
1664 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1667 * trans-expr.c (gfc_conv_substring): Evaluate substring bounds
1670 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
1672 * f95-lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1673 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use unsigned_type_for
1674 instead of gfc_unsigned_type.
1675 * trans-stmt.c (gfc_trans_do): Use unsigned_type_for instead of
1677 * trans-types.c (gfc_unsigned_type): Remove.
1678 * trans-types.h (gfc_unsigned_type): Remove.
1680 2007-05-12 Paul Thomas <pault@gcc.gnu.org>
1683 * resolve.c (check_host_association): New function that detects
1684 incorrect host association and corrects it.
1685 (gfc_resolve_expr): Call the new function for variables and
1687 * match.h : Remove prototype for gfc_match_rvalue.
1688 * gfortran.h : Add prototype for gfc_match_rvalue.
1690 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
1693 * trans-expr.c (gfc_conv_function_call): Reduce indirection for
1694 direct assignments of recursive array valued functions.
1695 * primary.c (gfc_match_rvalue): Correct error for recursive
1696 function calls such that directly recursive calls of scalar
1697 function without an explicit result are disallowed.
1699 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
1702 * resolve.c (resolve_fl_namelist): It is not an error if the
1703 namelist element is the result variable of the enclosing
1704 function. Search for the symbol in current and all parent
1705 namespaces for a potential conflict.
1706 * symbol.c (check_conflict): Remove the conflict between
1707 'in_namelist' and 'FL_PROCEDURE' because the symbol info
1708 is not available to exclude function result variables.
1709 * trans-io.c (nml_get_addr_expr): Use the fake result decl
1710 if the symbol is an implicit result variable.
1712 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
1715 * decl.c (get_proc_name): If an entry has already been declared
1716 as a module procedure, pick up the symbol and the symtree and
1717 use them for the entry.
1719 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
1722 * resolve.c (resolve_symbol): Remove the flagging mechanism from the
1723 formal namespace resolution and instead check that the formal
1724 namespace is not the current namespace.
1726 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
1729 * trans-array.c (gfc_conv_array_parameter): Convert full array
1730 references to the result of the procedure enclusing the call.
1732 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
1736 * decl.c (add_init_expr_to_sym): Expand a scalar initializer
1737 for a parameter array into an array expression with the right
1739 * array.c (spec_dimen_size): Remove static attribute.
1740 * gfortran.h : Prototype for spec_dimen_size.
1742 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1745 * trans-stmt.c (gfc_trans_do): Handle large loop counts.
1747 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1750 * simplify.c (gfc_simplify_new_line): NEW_LINE can be simplified
1751 even for non constant arguments.
1753 2007-05-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1754 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1757 * gfortran.h: Add runtime error codes from libgfortran.h. Define
1759 * trans.c (gfc_trans_runtime_check): Update the format of runtime error
1760 messages to match library runtime errors. Use call to new library
1761 function runtime_error_at().
1762 * trans.h: Add prototype for new function gfc_trans_io_runtime_check.
1763 Add declaration for library functions runtime_error_at and
1765 * trans_io.c (gfc_trans_io_runtime_check): New function.
1766 (set_parameter_value): Add error checking for UNIT numbers.
1767 (set_parameter_ref): Initialize the users variable to zero.
1768 (gfc_trans_open): Move setting of unit number to after setting of common
1769 flags so that runtime error trapping can be detected.
1770 (gfc_trans_close): Likewise. (build_filepos): Likewise.
1771 (gfc_trans_inquire): Likewise. (build_dt): Likewise.
1772 * trans-decl.c: Add declarations for runtime_error_at and
1773 generate_error. (gfc_build_builtin_function_decls): Build function
1774 declarations for runtime_error_at and generate_error.
1776 2007-05-06 Paul Thomas <pault@gcc.gnu.org>
1779 * resolve.c (resolve_fl_procedure): Resolve constant character
1782 2007-05-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1785 * decl.c (match_char_spec): Add check for invalid character lengths.
1787 2007-05-04 Brooks Moses <brooks.moses@codesourcery.com>
1789 * intrinsic.texi (CMPLX): Document result kind.
1790 (COMPLEX): Add documentation.
1792 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
1795 * intrinsic.c (add_functions): Replaced calls to gfc_check_g77_math1
1796 by gfc_check_fn_r to avoid checks for scalarity.
1797 * check.c (gfc_check_besn): Removed check for scalarity.
1798 (gfc_check_g77_math1): Removed.
1799 * intrinsic.h (gfc_check_g77_math1): Removed.
1801 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
1803 * check.c (gfc_check_fseek_sub): Fixed typo.
1805 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
1808 * intrinsic.c (add_subroutines): Added FSEEK.
1809 * intrinsic.h (gfc_resolve_fseek_sub, gfc_check_fseek_sub): New.
1810 * iresolve.c (gfc_resolve_fseek_sub): New.
1811 * check.c (gfc_check_fseek_sub): New.
1812 * intrinsic.texi (FSEEK): Updated.
1814 2007-05-04 Tobias Burnus <burnus@net-b.de>
1817 * expr.c (gfc_check_pointer_assign): Check for NULL pointer.
1819 2007-05-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1822 * simplify.c (gfc_simplify_len): Only simplify integer lengths.
1824 2007-05-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1827 * simplify.c (gfc_simplify_repeat): Don't put function call with
1828 side effect in a gcc_assert().
1830 2007-05-04 Tobias Burnus <burnus@net-b.de>
1833 * interface.c (compare_actual_formal): Check character length.
1835 2007-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1838 * dependency.c (gfc_full_array_ref_p): If the reference is
1839 to a single element, check that the array has a single
1840 element and that the correct element is referenced.
1842 2007-05-01 Daniel Franke <franke.daniel@gmail.com>
1844 * intrinsic.c (add_functions): Fixed ELEMENTAL specifications.
1845 (add_subroutines): Replaced magic numbers in function calls by
1846 ELEMENTAL and NOT_ELEMENTAL respectively.
1847 * intrinsic.texi (MVBITS): Changed class to elemental subroutine.
1848 (RANDOM_NUMBER): Changed class to subroutine.
1849 (HUGE, TINY): Changed class to inquiry function.
1851 2007-04-30 Brooks Moses <brooks.moses@codesourcery.com>
1853 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_get_double_int.
1854 (gfc_conv_tree_to_mpz): New function.
1855 (gfc_conv_mpfr_to_tree): Use real_from_mpfr.
1856 (gfc_conv_tree_to_mpfr): New function.
1857 * trans-const.h: (gfc_conv_tree_to_mpz): New prototype.
1858 (gfc_conv_tree_to_mpfr): New prototype.
1860 2007-04-30 Daniel Franke <franke.daniel@gmail.com>
1862 * intrinsic.texi (IERRNO): Changed class to non-elemental function.
1863 (LOG10): Removed COMPLEX as accepted argument type.
1864 (NEW_LINE): Changed class from elemental to inquiry function.
1865 (SIGN): Removed requirement of scalar arguments.
1866 (SNGL): Changed class to elemental function.
1868 2007-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1871 * simplify.c (simplify_bound_dim): New function.
1872 (simplify_bound): Use the above. Perform simplification of LBOUND
1873 and UBOUND when DIM argument is not present.
1875 2007-04-29 Daniel Franke <franke.daniel@gmail.com>
1877 * gfortran.texi: Cleaned up keyword index.
1878 * invoke.texi: Likewise.
1879 * intrinsic.texi: Likewise.
1881 2007-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1884 * scanner.c (load_file): Discard the byte order mark if one is
1885 found on the first non-preprocessor line of a file.
1887 2007-04-29 Paul Thomas <pault@gcc.gnu.org>
1890 * trans-array.c (gfc_conv_resolve_dependencies): Create a temp
1891 whenever a dependency is found.
1893 2007-04-28 Tobias Schlüter <tobi@gcc.gnu.org>
1895 * options.c (gfc_handle_option): Ensure requested free form line
1896 length is not too small.
1898 2007-04-27 Brooks Moses <brooks.moses@codesourcery.com>
1900 * intrinsic.texi (Transfer): Improve documentation.
1902 2007-04-27 Brooks Moses <brooks.moses@codesourcery.com>
1904 * gfortran.texi (Option Index): Add @samp as needed.
1906 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
1908 * gfortran.texi: Added node and menu entry for an option index.
1909 * invoke.texi: Moved command line option related entries of the concept
1910 index to the option index.
1912 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
1914 * intrinsic.texi (AND, FPUT, FPUTC, MODULO, OR, SET_EXPONENT,
1915 XOR): Fixed examples.
1917 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
1919 * intrinsic.texi (PRODUCT, RESHAPE, SPACING, SPREAD, SUM,
1920 SYSTEM_CLOCK, TRANSFER, UNPACK): New.
1921 (DATE_AND_TIME, CPU_TIME, RRSPACING): Added cross references.
1923 2007-04-26 Daniel Franke <franke.daniel@gmail.com>
1925 * intrinsic.texi (NULL, PACK, PRESENT, REPEAT, SCAN, SHAPE,
1926 SIZE, TRANSPOSE, TRIM, VERIFY): New.
1927 (ADJUSTL, ADJUSTR, INDEX): Added cross references.
1928 (INT, INT2, INT8, LONG): Enabled section header.
1930 2007-04-25 Janne Blomqvist <jb@gcc.gnu.org>
1932 * module.c (module_char): Replace fgetc() with
1934 (write_char): Replace fputc() with putc().
1935 * scanner.c (load_line): Replace fgetc() with getc().
1936 (gfc_read_orig_filename): Likewise.
1938 2007-04-25 Tobias Burnus <burnus@net-b.de>
1941 * error.c (error_print): Fix %% support.
1942 * intrinsic.c (sort_actual): Improve error message.
1943 * resolve.c (resolve_actual_arglist): Allow %VAL for
1944 interfaces defined in the module declaration part.
1946 2007-04-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1949 * intrinsic.texi (GETLOG): Update documentation to reflect
1952 2007-04-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1955 * module.c (write_char): Add character to the MD5 buffer.
1956 (read_md5_from_module_file): New function.
1957 (gfc_dump_module): Compute MD5 for new module file. Call
1958 read_md5_from_module_file. Only overwrite old module file
1959 if the new MD5 is different.
1961 2007-04-23 Paul Thomas <pault@gcc.gnu.org>
1964 * resolve.c (resolve_symbol): Allow resolution of formal
1965 namespaces nested within formal namespaces coming from modules.
1968 * trans-expr.c (gfc_trans_assignment): Make the call to
1969 gfc_trans_zero_assign conditional on the lhs array ref being
1972 2007-04-23 Tobias Burnus <burnus@net-b.de>
1974 * primary.c (match_integer_constant): Mention -fno-range-check
1975 in the error message.
1977 2007-04-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1980 * scanner.c (load_line): Remove check for comment after ampersand and
1981 adjust tracking of ampersand.
1983 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
1985 * f95-lang.c (lang_tree_node): Use GENERIC_NEXT
1986 instead of checking GIMPLE_STMT_P in chain_next.
1988 2007-04-17 Tobias Schlüter <tobi@gcc.gnu.org>
1990 * trans-types.h (gfc_packed): New enum.
1991 (gfc_get_nodesc_array_type): Change prototype to use new enum.
1992 * trans-types.c (gfc_get_nodesc_array): Use gfc_packed for
1993 argument packed. Adapt all references to values accordingly.
1994 (gfc_sym_type): Use enum values in call to gfc_get_nodesc_array.
1995 (gfc_get_derived_type): Likewise.
1996 * trans-array.c (gfc_build_constant_array_constructor): Likewise.
1997 * trans-expr.c (gfc_get_interface_mapping_charlen): Changed packed
1998 argument to type gfc_packed.
1999 (gfc_add_interface_mapping): Use enum values in call to
2000 gfc_get_interface_mapping.
2001 * trans-decl.c (gfc_build_dummy_array_decl): Adapt to use enum
2002 values when determining packing.
2004 * trans-decl.c (gfc_finish_decl): Remove unused second argument
2005 'init'. Simplify code accordingly. Remove calls to
2006 gfc_fatal_error in favor of gcc_assert.
2007 (create_function_arglist): Remove second argument from calls to
2009 (gfc_trans_dummy_character): Likewise.
2011 * arith.h: Update copyright years.
2012 * dependency.h: Likewise.
2013 * gfortran.h: Likewise.
2014 * lang-specs.h: Likewise.
2015 * parse.h: Likewise.
2016 * symbol.c: Likewise.
2017 * trans.h: Likewise.
2018 * trans.c: Likewise.
2019 * trans-array.c: Likewise.
2020 * trans-common.c: Likewise.
2021 * trans-const.h: Likewise.
2022 * trans-const.c: Likewise.
2023 * trans-decl.c: Likewise.
2024 * trans-expr.c: Likewise.
2025 * trans-io.c: Likewise.
2026 * trans-openmp.c: Likewise.
2027 * trans-types.h: Likewise.
2028 * types.def: Likewise.
2030 2007-04-17 Tobias Schlüter <tobi@gcc.gnu.org>
2033 * decl.c (gfc_sym_mangled_identifier): Use capital letters in name
2035 (gfc_sym_mangled_function_id): Likewise.
2037 2007-04-15 Paul Thomas <pault@gcc.gnu.org>
2040 * primary.c (check_for_implicit_index): New function to check
2041 that a host associated variable is not an undeclared implied
2043 (gfc_match_rvalue, match_variable): Use it and reset the
2044 implied_index attribute.
2045 * gfortran.h : Add the implied_index field to symbol_attribute.
2046 * match.c (gfc_match_iterator): Mark the iterator variable
2047 with the new attribute.
2048 * decl.c (build_sym): Reset the new attribute.
2050 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
2052 * gfc-internals.texi: Fix typos.
2053 * simplify.c: Fix a comment typo.
2055 2007-04-14 Bernhard Fischer <aldot@gcc.gnu.org>
2057 * primary.c: Commentary typo fix; Add question about redundant (?)
2060 2007-04-14 Paul Thomas <pault@gcc.gnu.org>
2064 * expr.c (scalarize_intrinsic_call): New function to
2065 scalarize elemental intrinsic functions in initialization
2067 (check_init_expr): Detect elemental intrinsic functions
2068 in initalization expressions and call previous.
2070 2007-04-13 Tobias Burnus <burnus@net-b.de>
2073 * primary.c (match_variable): External functions
2076 2007-04-13 Paul Thomas <pault@gcc.gnu.org>
2079 * trans-types.c (copy_dt_decls_ifequal): Do not get pointer
2080 derived type components.
2082 2007-04-13 Tobias Schlüter <tobi@gcc.gnu.org>
2085 * resolve.c: Include obstack.h and bitmap.h. New variable
2087 (code_stack): Add tail and reachable_labels fields.
2088 (reachable_labels): New function.
2089 (resolve_branch): Rework to use new fields in code_stack.
2090 (resolve_code): Call reachable_labels.
2091 (resolve_codes): Allocate and free labels_obstack.
2093 2007-04-12 Tobias Schlüter <tobi@gcc.gnu.org>
2096 * decl.c (match_char_spec): Move check for negative CHARACTER
2098 * resolve.c (resolve_charlen): ... here.
2099 (resolve_types): Resolve CHARACTER lengths earlier.
2101 2007-04-12 Daniel Franke <franke.daniel@gmail.com>
2104 * intrinsic.texi (RANDOM_SEED, RANDOM_NUMBER): New.
2106 2007-04-12 Tobias Schlüter <tobi@gcc.gnu.org>
2109 * primary.c (gfc_variable_attr): Don't copy string length if it
2111 * resolve.c (resolve_code): Clarify error message.
2114 * decl.c (gfc_match_end): Also check for construct name in END
2115 FORALL and END WERE statements.
2116 * match.c (match_case_eos): Use uppercase for statement name in
2118 (match_elsewhere): Construct name may appear iff construct has a
2121 * trans-types.c: Update copyright years. Reformat long comment
2122 explaining array descriptor format. Remove obsolete mention of
2125 * arith.c (gfc_arith_uplus): Rename to ...
2126 (gfc_arith_identity): ... this.
2127 (gfc_parentheses): New function.
2128 (gfc_uplus): Adapt to renamed function.
2129 * arith.h (gfc_parentheses): Add prototype.
2130 * expr.c (gfc_copy_expr): Deal with INTRINSIC_PARENTHESES.
2131 (simplifiy_intrinsic_op): Treat INTRINSIC_UPLUS separately from
2132 INTRINSIC_PARENTHESES.
2134 2007-04-12 Tobias Burnus <burnus@net-b.de>
2137 * decl.c (match_attr_spec): Allow PRIVATE/PUBLIC
2138 attribute in type definitions.
2139 (gfc_match_private): Allow PRIVATE statement only
2140 in specification part of modules.
2141 (gfc_match_public): Ditto for PUBLIC.
2142 (gfc_match_derived_decl): Allow PRIVATE/PUBLIC attribute only in
2143 specificification part of modules.
2145 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
2148 * intrinsic.c (add_functions): Add ref. to gfc_resolve_achar.
2149 * intrinsic.h : Add prototype for gfc_resolve_achar.
2150 * iresolve.c (gfc_resolve_achar): New function.
2152 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
2155 * resolve.c (resolve_fl_variable): Set flag to 2 for automatic
2156 arrays. Make condition for automatic array error explicit.
2157 If a dummy, no error on an INTENT(OUT) derived type.
2159 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
2162 * expr.c (find_array_element): Correct arithmetic for rank > 1.
2164 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
2167 * check.c (numeric_check): If an expresson has not got a type,
2168 see if it is a symbol for which a default type applies.
2170 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
2173 * trans-decl.c (gfc_get_symbol_decl): Allow unreferenced use
2176 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
2179 * symbol.c (gfc_check_function_type): New function.
2180 * gfortran.h : Add prototype for previous.
2181 * parse.c (parse_progunit): Call it after parsing specification
2184 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
2187 * trans-expr.c (gfc_conv_function_call): Give a dummy
2188 procedure the correct type if it has alternate returns.
2190 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
2193 * decl.c (gfc_match_modproc): Go up to the top of the namespace
2194 tree to find the module namespace for gfc_get_symbol.
2196 2007-04-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2199 * fortran/gfortran.h (gfc_charlen_int_kind): New prototype.
2200 * fortran/trans-types.c (gfc_charlen_int_kind): New variable.
2201 (gfc_init_types): Define gfc_charlen_int_kind.
2202 * fortran/trans.h (gfor_fndecl_string_repeat): Remove prototype.
2203 * fortran/trans-decl.c (gfor_fndecl_string_repeat): Delete.
2204 (gfc_build_intrinsic_function_decls): Don't set
2205 gfor_fndecl_string_repeat.
2206 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_repeat): Rewrite
2207 so that we don't have to call a library function.
2208 * fortran/simplify.c (gfc_simplify_repeat): Perform the necessary
2209 checks on the NCOPIES argument, and work with arbitrary size
2212 2007-03-31 Tobias Burnus <burnus@net-b.de>
2214 * intrinsic.c (add_functions): Fix name of dummy argument
2215 for new_line and exit intrinsic.
2217 2007-03-31 Paul Thomas <pault@gcc.gnu.org>
2220 * gfortran.texi: Add a section for the %VAL, %REF and %LOC
2223 2007-03-30 Rafael Avila de Espindola <espindola@google.com>
2225 * trans-types.c (gfc_signed_or_unsigned_type): Remove.
2226 (gfc_unsigned_type): Use get_signed_or_unsigned_type instead of
2227 gfc_signed_or_unsigned_type.
2228 (gfc_signed_type): Ditto.
2229 * trans-types.h (gfc_signed_or_unsigned_type): Remove.
2230 * f95-lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
2232 2007-03-30 Tobias Schlüter <tobi@gcc.gnu.org>
2234 * symbol.c (gfc_find_gsymbol): Simplify, don't unconditionally
2235 descend into all branches.
2237 2007-03-29 Tobias Schlüter <tobi@gcc.gnu.org>
2239 * intrinsic.c (conv_name): Let gfc_get_string handle the format.
2240 (find_conv): Compare pointers instead of calling strcmp.
2241 (find_sym): Likewise, but ensure that the compared pointer is in
2242 the global string table.
2244 2007-03-28 Tobias Schlüter <tobi@gcc.gnu.org>
2246 * gfc-internals.texi: Fix output filename. Merge type index into
2247 concept index. Start documentation of gfc_code structure.
2249 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
2251 * gfc-internals.texi: New file,
2252 * Make-lang.in: Add rules to convert it to dvi, pdf, and info.
2254 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
2256 * error.c (show_locus): Remove always-false test.
2258 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
2260 * lang.opt: Minor edits to descriptions.
2262 2007-03-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2265 * fortran/interface.c (check_operator_interface): Implement
2266 the standard checks on user operators extending intrinsic operators.
2267 * fortran/resolve.c (resolve_operator): If the ranks of operators
2268 don't match, don't error out but try the user-defined ones first.
2270 2007-03-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2273 * expr.c (check_dimension): Fix logic of comparisons.
2275 2007-03-24 Paul Thomas <pault@gcc.gnu.org>
2278 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Return
2279 int result that is non-zero if the expression is the function
2280 result. Only the characteristics of the result expression
2281 can be used in a procedure interface, so simplify LEN in situ
2282 using its character length.
2286 * trans-expr.c (gfc_conv_function_call): Do not use
2287 gfc_conv_expr_reference for actual pointer function with formal
2288 target because a temporary is created that does not transfer
2289 the reference correctly. Do not indirect formal pointer
2290 functions since it is the function reference that is needed.
2292 2007-03-24 Brooks Moses <brooks.moses@codesourcery.com>
2294 * gfortran.h: Edit comments on GFC_STD_*.
2296 2007-03-23 Brooks Moses <brooks.moses@codesourcery.com>
2298 * invoke.texi: Misc. small typo fixes.
2299 (-Wcharacter-truncation): Add.
2300 (-Wnonstd-intrinsics): Correct spelling.
2302 (-fintrinsic-modules-path): Add.
2304 2007-03-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2307 * arith.c (complex_pow): Rewrite to handle large power.
2308 (gfc_arith_power): Handle large power in the real and integer
2311 2007-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2314 * trans-const.c (gfc_conv_mpz_to_tree): Allow integer constants
2315 larger than twice the width of a HOST_WIDE_INT.
2317 2006-03-22 Paul Thomas <pault@gcc.gnu.org>
2320 * trans-intrinsic.c (gfc_size_in_bytes): Remove function.
2321 (gfc_conv_intrinsic_array_transfer): Remove calls to previous.
2322 Explicitly extract TREE_TYPEs for source and mold. Use these
2323 to calculate length of source and mold, except for characters,
2324 where the se string_length is used. For mold, the TREE_TYPE is
2325 recalculated using gfc_get_character_type_len so that the
2326 result is correctly cast for character literals and substrings.
2327 Do not use gfc_typenode_for_spec for the final cast.
2329 2007-03-22 Tobias Schlüter <tobi@gcc.gnu.org>
2332 * decl.c (gfc_match_derived_decl): Reliably reject
2333 'doubleprecision' and 'doublecomplex' as type names.
2335 2007-03-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2338 * trans-expr.c (gfc_trans_init_string_length): Length should
2340 (gfc_conv_function_call): Likewise.
2342 2007-03-18 Paul Thomas <pault@gcc.gnu.org>
2346 * symbo.c : Add gfc_derived_types.
2347 (gfc_free_dt_list): Free derived type list gfc_derived_types.
2348 (gfc_free_namespace): Remove call to gfc_free_dt_list.
2349 (gfc_symbol_done_2): Call gfc_free_dt_list.
2350 * gfortran.h : Declare gfc_derived_types to be external. Remove
2351 derived types field from gfc_namespace.
2352 * resolve.c (resolve_fl_derived): Refer to gfc_derived types
2353 rather than namespace derived_types.
2354 (resolve_fntype): Remove special treatment for module
2355 derived type functions.
2356 * trans-types.c (gfc_get_derived_type): Remove search for like
2357 derived types. Finish by copying back end declaration to like
2358 derived types in the derived type list gfc_derived_types.
2360 2007-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2363 * trans-expr.c (gfc_conv_powi): Make n argument unsigned hwi.
2364 (gfc_conv_cst_int_power): Handle integer exponent with care,
2365 since it might be too large for us.
2367 2007-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2370 * invoke.texi: Fix typo.
2372 2007-03-16 Tobias Burnus <burnus@net-b.de>
2374 * trans-decl.c (gfc_generate_function_code): Use all arguments of
2377 2007-03-15 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2379 * gfortran.h (gfc_option_t): Add flag_backtrace field.
2380 * lang.opt: Add -fbacktrace option.
2381 * invoke.texi: Document the new option.
2382 * trans-decl.c (gfc_build_builtin_function_decls): Add new
2383 option to the call to set_std.
2384 * options.c (gfc_init_options, gfc_handle_option): Handle the
2387 2007-03-15 Tobias Burnus <burnus@gcc.gnu.org>
2388 Paul Thomas <pault@gcc.gnu.org>
2391 * decl.c (gfc_match_import): If the parent of the current name-
2392 space is null, try looking for an imported symbol in the parent
2393 of the proc_name interface.
2394 * resolve.c (resolve_fl_variable): Do not check for blocking of
2395 host association by a same symbol, if the symbol is in an
2398 2007-03-15 Paul Thomas <pault@gcc.gnu.org>
2401 * decl.c (match_data_constant): Before going on to try to match
2402 a name, try to match a structure component.
2406 * resolve.c (resolve_actual_arglist): Do not reject a generic
2407 actual argument if it has a same name specific interface.
2410 * trans-array.c (parse_interface): Do not nullify allocatable
2411 components if the symbol has the saved attribute.
2413 2007-03-14 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2415 * trans-array.c (gfc_trans_auto_array_allocation): Replace
2416 fold(convert()) by fold_convert().
2417 (gfc_duplicate_allocatable): Likewise.
2418 * trans-intrinsic.c (gfc_conv_intrinsic_dot_product): Use
2419 build_int_cst instead of converting an integer_zero_node
2422 2007-03-14 Jakub Jelinek <jakub@redhat.com>
2424 * module.c (mio_typespec): Don't look at ts->cl if not BT_CHARACTER.
2426 2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
2431 * intrinsics.texi (CHDIR): Fix argument names, note
2432 that STATUS must be a default integer.
2433 (CTIME): Fix argument names, note that RESULT must
2434 be a default integer.
2435 (EXIT): Note that STATUS must be a default integer.
2437 2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
2440 * intrinsic.texi: General whitespace cleanup, remove
2441 comment about missing intrinsics.
2442 (menu): Add lines for new entries listed below.
2443 (ACOSH): Mention specific function DACOSH, correct
2444 description phrasing.
2445 (ASINH): Mention specific function DASINH, correct
2446 description phrasing.
2447 (ATANH): Mention specific function DATANH, correct
2448 description phrasing.
2449 (COS): Add index entry for CCOS.
2450 (CPU_TIME): Correct "REAL" to "REAL(*)".
2451 (EXP): Add index entry for CEXP.
2452 (INT): Correct argument name to "A".
2456 (MAX): Add index entries for specific variants.
2457 (MCLOCK): New entry.
2458 (MCLOCK8): New entry.
2459 (SECNDS): Adjust to a more standard form.
2460 (SECOND): New entry.
2461 (TIME): Add cross-reference to MCLOCK.
2462 (TIME8): Add cross-reference to MCLOCK8.
2464 2007-03-11 Paul Thomas <pault@gcc.gnu.org>
2467 * parse.c (parse_interface): Use the default types from the
2468 formal namespace if a function or its result do not have a type
2469 after parsing the specification statements.
2471 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
2473 * intrinsic.texi: (ICHAR) Improve internal I/O note.
2474 (ACHAR): Reference it.
2475 (CHAR): Reference it.
2476 (IACHAR): Reference it.
2478 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
2480 * intrinsic.texi: (LINK) Document function form.
2486 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
2488 * intrinsic.texi: minor typo fixes, removed prologue.
2489 (FSEEK): moved to correct place in alphabetical order.
2491 2007-03-08 Daniel Franke <franke.daniel@gmail.com>
2494 * check.c (gfc_check_alarm_sub): Added check for default integer
2495 kind of status argument.
2496 * iresolve.c (gfc_resolve_alarm_sub): Removed conversion of
2498 * intrinsic.texi (ALARM): Extended documentation.
2500 2007-03-08 Daniel Franke <franke.daniel@gmail.com>
2502 * intrinsic.texi (GERROR, ISATTY, TTYNAM): New.
2503 (ABORT, FLUSH, FNUM, IRAND, MALLOC, SIGNAL, SRAND): Fixed typo.
2504 * intrinsic.c (add_subroutines): Adjusted dummy argument names
2505 of GERROR and TTYNAM.
2507 2007-07-08 Tobias Burnus <burnus@net-b.de>
2509 * module.c (gfc_match_use): Support renaming of operators
2511 * gfortran.texi (Fortran 2003 Status): Document support of
2512 renaming of operators.
2514 2007-07-08 Tobias Burnus <burnus@net-b.de>
2517 * module.c (read_module): Always import module name as symbol.
2518 (gfc_match_use): Disallow module name in the only clause of
2521 2007-03-08 Paul Thomas <pault@gcc.gnu.org>
2524 * expr.c (find_array_section): Correct arithmetic for section
2527 2007-03-07 Brooks Moses <brooks.moses@codesourcery.com>
2529 * iresolve.c (gfc_resolve_ishftc): Correct s_kind value.
2531 2007-03-06 Daniel Franke <franke.daniel@gmail.com>
2533 PR documentation/30950
2534 * intrinsic.texi (AND, CPU_TIME): Fix dummy argument names.
2535 (FREE): Fix call syntax.
2537 2007-03-06 Brooks Moses <brooks.moses@codesourcery.com>
2539 * intrinsic.texi: Limit column widths to a total of .85.
2541 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
2543 * gfortran.texi (GFortran and G77): Rewrite completely.
2545 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
2547 * match.c (gfc_match_name): Expanded comment.
2549 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
2551 * gfortran.texi (Old-style kind specifications): Document
2552 special handling of old-style kind specifiers for COMPLEX.
2553 * decl.c (gfc_match_old_kind_spec): Document kind/bytesize
2554 assumptions for COMPLEX in comment.
2556 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
2559 * gfortranspec.c (lang_specific_driver): Update program
2560 name and copyright date.
2562 2007-03-03 Paul Thomas <pault@gcc.gnu.org>
2565 * check.c (dim_rank_check): The shape of subsections of
2566 assumed-size arrays is known.
2568 2007-03-02 Paul Thomas <pault@gcc.gnu.org>
2569 Tobias Burnus <burnus@net-b.de>
2572 * decl.c (gfc_match_entry): Remove erroneous entry result check.
2574 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
2576 * Make-lang.in: Add install-pdf target as copied from
2577 automake v1.10 rules.
2579 2007-03-01 Tobias Burnus <burnus@net-b.de>
2582 * trans-intrinsic.c (gfc_conv_intrinsic_size): Compare pointers.
2584 2007-02-28 Tobias Burnus <burnus@net-b.de>
2585 Paul Thomas <pault@gcc.gnu.org>
2589 * resolve.c (resolve_actual_arglist): Allow by-value
2590 arguments and non-default-kind for %VAL().
2591 * trans-expr.c (conv_arglist_function): Allow
2592 non-default-kind for %VAL().
2594 2007-02-28 Tobias Burnus <burnus@net-b.de>
2597 * primary.c (next_string_char): Correct reading a character
2598 after the delimiter.
2599 (match_string_constant): Print warning message only once.
2601 2007-02-27 Richard Guenther <rguenther@suse.de>
2603 * trans-array.c (structure_alloc_comps): Use correct type
2604 for null pointer constant.
2606 2007-02-26 Brooks Moses <brooks.moses@codesourcery.com>
2608 * gfortran.texi: Standardize title page, remove version number
2609 from copyright page.
2611 2007-02-26 Thomas Koenig <Thomas.Koenig@online.de>
2612 Paul Thomas <pault@gcc.gnu.org>
2615 * trans-intrinsic.c (gfc_conv_intrinsic_size):
2616 If dim is an optional argument, check for its
2617 presence and call size0 or size1, respectively.
2619 2007-02-23 Paul Thomas <pault@gcc.gnu.org>
2622 * resolve.c (has_default_initializer): New function.
2623 (resolve_fl_variable): Call has_default_initializer to determine if
2624 the derived type has a default initializer to its ultimate
2628 2007-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2630 * options.c (set_default_std_flags): New function to consolidate
2632 (gfc_init_options): Use new function.
2633 (gfc_handle_option): Use new function.
2635 2007-02-22 Brooks Moses <brooks.moses@codesourcery.com>
2637 * gfortran.texi (Old-style kind specifications): Document
2638 special handling of old-style kind specifiers for COMPLEX.
2639 * decl.c (gfc_match_old_kind_spec): Documented kind/bytesize
2640 assumptions in comment.
2642 2007-02-21 Bernhard Fischer <aldot@gcc.gnu.org>
2644 * parse.c (next_free): Gooble spaces after OpenMP sentinel.
2646 2007-02-20 Thomas Koenig <Thomas.Koenig@online.de>
2649 * match.c (gfc_match_iterator): Remove conflict between
2650 loop variable and pointer.
2652 2007-02-20 Tobias Burnus <burnus@net-b.de>
2655 * symbol.c (gfc_add_volatile): Allow to set VOLATILE
2656 attribute for host-associated variables.
2657 * gfortran.h (symbol_attribute): Save namespace
2658 where VOLATILE has been set.
2659 * trans-decl.c (gfc_finish_var_decl): Move variable
2660 declaration to the top.
2662 2007-02-20 Tobias Burnus <burnus@net-b.de>
2665 * resolve.c (resolve_symbol): Add character dummy VALUE check.
2667 2007-02-19 Thomas Koenig <Thomas.Koenig@online.de>
2670 * fortran/iresolve.c (gfc_resolve_maxloc): Remove coercion of
2671 argument to default integer.
2672 (gfc_resolve_minloc): Likewise.
2674 2007-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2677 * options.c (gfc_init_options): Relax warning level for obsolescent.
2678 * match.c (match_arithmetic_if): Change to obsolescent from deleted.
2679 (gfc_match_if): Same.
2681 2007-02-18 Roger Sayle <roger@eyesopen.com>
2683 * trans-array.c (gfc_build_constant_array_constructor): When the
2684 shape of the constructor is known, use that to construct the
2686 (gfc_trans_constant_array_constructor): Initialize the "info"
2687 information for all of the dimensions of the array constructor.
2688 (constant_array_constructor_loop_size): New function.
2689 (gfc_trans_array_constructor): Use it to determine whether a
2690 loop is suitable for "constant array constructor" optimization.
2692 * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Use fold_build2
2693 instead of build2, to avoid conditions like "(a != b) != 0".
2695 2007-02-18 Roger Sayle <roger@eyesopen.com>
2696 Paul Thomas <pault@gcc.gnu.org>
2699 * match.c (match_forall_iterator): Use gfc_match_expr instead
2700 of gfc_match_variable to match the iterator variable. Return
2701 MATCH_NO if not a variable. Remove the reset of the symbol's
2704 2007-02-16 Tobias Burnus <burnus@net-b.de>
2707 * trans-decl.c (gfc_generate_function_code): Do not initialize
2708 pointers to derived components.
2710 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
2711 Brooks Moses <brooks.moses@codesourcery.com>
2712 Lee Millward <lee.millward@codesourcery.com>
2714 * trans-expr.c (gfc_conv_power_op): Use build_call_expr.
2715 (gfc_conv_string_tmp): Likewise.
2716 (gfc_conv_concat_op): Likewise.
2717 (gfc_build_compare_string): Likewise.
2718 (gfc_conv_function_call): Use build_call_list instead of build3.
2720 * trans-array.c (gfc_trans_allocate_array_storage): Use
2722 (gfc_grow_array): Likewise.
2723 (gfc_trans_array_ctor_element): Likewise.
2724 (gfc_trans_array_constructor_value): Likewise.
2725 (gfc_array_allocate): Likewise.
2726 (gfc_array_deallocate): Likewise.
2727 (gfc_trans_auto_array_allocation): Likewise.
2728 (gfc_trans_dummy_array_bias): Likewise.
2729 (gfc_conv_array_parameter): Likewise.
2730 (gfc_trans_dealloc_allocated): Likewise.
2731 (gfc_duplicate_allocatable): Likewise.
2733 * trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr.
2734 (gfc_trans_omp_flush): Likewise.
2736 * trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr.
2737 (gfc_trans_pause): Likewise.
2738 (gfc_trans_stop): Likewise.
2739 (gfc_trans_character_select): Likewise.
2740 (gfc_do_allocate): Likewise.
2741 (gfc_trans_assign_need_temp): Likewise.
2742 (gfc_trans_pointer_assign_need_temp): Likewise.
2743 (gfc_trans_forall_1): Likewise.
2744 (gfc_trans_where_2): Likewise.
2745 (gfc_trans_allocate): Likewise.
2746 (gfc_trans_deallocate): Likewise.
2748 * trans.c (gfc_trans_runtime_check): Use build_call_expr.
2750 * trans-io.c (gfc_trans_open): Use build_call_expr.
2751 (gfc_trans_close): Likewise.
2752 (build_filepos): Likewise.
2753 (gfc_trans_inquire): Likewise.
2754 (NML_FIRST_ARG): Delete.
2755 (NML_ADD_ARG): Delete.
2756 (transfer_namelist_element): Use build_call_expr.
2757 (build_dt): Likewise.
2758 (gfc_trans_dt_end): Likewise.
2759 (transfer_expr): Likewise.
2760 (transfer_array-desc): Likewise.
2762 * trans-decl.c (gfc_generate_function_code): Use build_call_expr.
2763 (gfc_generate_constructors): Likewise.
2765 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr.
2766 (gfc_conv_intrinsic_fdate): Likewise.
2767 (gfc_conv_intrinsic_ttynam): Likewise.
2768 (gfc_conv_intrinsic_array_transfer): Likewise.
2769 (gfc_conv_associated): Likewise.
2770 (gfc_conv_intrinsic_si_kind): Likewise.
2771 (gfc_conv_intrinsic_trim): Likewise.
2772 (gfc_conv_intrinsic_repeat: Likewise.
2773 (gfc_conv_intrinsic_iargc): Likewise.
2775 2007-02-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2778 * scanner.c (gfc_next_char_literal): Add check for end of file after
2779 call to advance_line.
2781 2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>
2784 * primary.c (match_logical_constant): Return MATCH_ERROR on invalid
2787 2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>
2789 * misc.c (gfc_typename): Fix potential buffer overflow.
2791 2007-02-13 Paul Thomas <pault@gcc.gnu.org>
2794 * module.c (read_module): Set pointer_info to referenced if the
2795 symbol has no namespace.
2797 2007-02-12 Nick Clifton <nickc@redhat.com>
2799 * lang.opt: Add Warning attribute to warning options.
2801 2007-02-11 Daniel Franke <franke.daniel@gmail.com>
2803 * intrinsic.texi (HOSTNM): Fix typographical error in syntax.
2804 (SLEEP): Added section and documentation.
2806 2007-02-11 Tobias Schlüter <tobi@gcc.gnu.org>
2809 * decl.c (add_init_expr_to_sym): Remove ENUM specific code.
2810 (variable_decl): Likewise. Rewrap comment.
2811 (match_attr_spec): Remove ENUM specific code.
2812 (gfc_match_enum): Fix typo in error message.
2813 (enumerator_decl): New function.
2814 (gfc_match_enumerator_def): Use enumerator_decl instead of
2815 variable_decl. Adapt code accordingly.
2817 2007-02-11 Paul Thomas <pault@gcc.gnu.org>
2820 * module.c (find_symtree_for_symbol): New function to return
2821 a symtree that is not a "unique symtree" given a symbol.
2822 (read_module): Do not automatically set pointer_info to
2823 referenced because this inhibits the generation of a unique
2824 symtree. Recycle the existing symtree if possible by calling
2825 find_symtree_for_symbol.
2828 * decl.c (add_init_expr_to_sym): Make new charlen for an array
2829 constructor initializer.
2831 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
2833 * f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address
2834 and __emutls_register_common.
2835 * openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls.
2836 * trans-common.c (build_common_decl): Don't check have_tls.
2837 * trans-decl.c (gfc_finish_var_decl): Likewise.
2838 * types.def (BT_WORD, BT_FN_PTR_PTR): New.
2839 (BT_FN_VOID_PTR_WORD_WORD_PTR): New.
2841 2007-02-09 Tobias Burnus <burnus@net-b.de>
2844 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc,
2845 gfc_conv_intrinsic_minmaxval): Use HUGE-1 for most negative integer.
2847 2007-02-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2850 * trans-array.c (gfc_trans_create_temp_array): Remove use of the
2851 function argument. Always generate code for negative extent.
2853 * trans-array.h (gfc_trans_create_temp_array): Change prototype.
2854 * trans-expr.c (gfc_conv_function_call): Remove use of last argument
2855 of gfc_trans_create_temp_array.
2856 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Likewise.
2857 * trans-stmt.c (gfc_conv_elemental_dependencies): Likewise.
2859 2007-02-08 Roger Sayle <roger@eyesopen.com>
2861 * trans-stmt.c (gfc_trans_forall_1): Optimize the cases where the
2862 mask expression is a compile-time constant (".true." or ".false.").
2864 2007-02-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2867 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Evaluate
2868 arguments only once. Generate check that NCOPIES argument is not
2871 2007-02-04 Steven G. Kargl <kargl@gcc.gnu.org>
2874 * fortran/invoke.texi: Update documentation.
2875 * fortran/options.c (gfc_post_options): Deal with tabs with -std=f2003
2878 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
2880 * trans-array.c: Fix a comment typo.
2882 2007-02-03 Paul Thomas <pault@gcc.gnu.org>
2885 * array.c (match_array_element_spec): If the length of an array is
2886 negative, adjust the upper limit to make it zero length.
2889 * resolve.c (pure_function, resolve_function): Initialize name to
2890 null to clear up build warnings.
2891 (resolve_fl_variable): Look at components explicitly to check for
2892 default initializer, rather than using gfc_default_initializer.
2894 2007-02-02 Steven G. Kargl <kargl@gcc.gnu.org>
2897 * resolve.c (resolve_generic_f): Check for non-NULL sym.
2899 2007-02-02 Roger Sayle <roger@eyesopen.com>
2901 * trans.c (gfc_build_array_ref): Use STRIP_TYPE_NOPS to eliminate
2902 NON_LVALUE_EXPR nodes and useless type conversions.
2904 2007-02-02 Paul Thomas <pault@gcc.gnu.org>
2908 * trans-expr.c (gfc_conv_aliased_arg): Remove static attribute
2909 from function and make sure that substring lengths are
2911 (is_aliased_array): Remove static attribute.
2912 * trans.c : Add prototypes for gfc_conv_aliased_arg and
2914 * trans-io.c (set_internal_unit): Add the post block to the
2915 arguments of the function. Use is_aliased_array to check if
2916 temporary is needed; if so call gfc_conv_aliased_arg.
2917 (build_dt): Pass the post block to set_internal_unit and
2918 add to the block after all io activiy is done.
2920 2007-02-01 Roger Sayle <roger@eyesopen.com>
2922 * trans-array.c (gfc_conv_expr_descriptor): We don't need to use
2923 a temporary array to pass a constant non-character array constructor.
2924 Generalize the descriptor generation code to handle scalarizer
2925 "info" without an array reference.
2927 2007-02-01 Roger Sayle <roger@eyesopen.com>
2929 * dependency.c (gfc_check_dependency) <EXPR_ARRAY>: Implement
2930 dependency checking for array constructors.
2932 2007-02-01 Roger Sayle <roger@eyesopen.com>
2934 * trans-stmt.c (compute_overall_iter_number): Document function
2935 arguments. Generalize "unconditional forall nest with constant
2936 bounds" optimization to eliminate unconditional inner loops with
2939 2007-01-31 Tobias Burnus <burnus@net-b.de>
2942 * interface.c (compare_actual_formal): Check conformance between
2943 actual and VOLATILE dummy arguments.
2944 * symbol.c (gfc_add_volatile): Allow setting of VOLATILE
2945 multiple times in different scopes.
2946 * decl.c (gfc_match_volatile): Search symbol in host association.
2948 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
2950 * simplify.c, trans-array.c: Fix comment typos.
2952 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2954 * invoke.texi (Code Gen Options): Fix abbreviation typo.
2955 * intrinsic.texi (ACCESS, LSHIFT, RSHIFT): Fix typos.
2957 2007-01-30 Steve Ellcey <sje@cup.hp.com>
2960 * trans-types.c (gfc_get_function_type): Do not add void_type_node
2962 * trans-decl.c (create_function_arglist): Change assert.
2964 2007-01-29 Paul Thomas <pault@gcc.gnu.org>
2967 * module.c (read_module): If a symbol is excluded by an ONLY
2968 clause, check to see if there is a symtree already loaded. If
2969 so, attach the symtree to the pointer_info.
2971 2007-01-28 Thomas Koenig <Thomas.Koenig@online.de>
2974 * gfortran.h: Remove gfc_simplify_init_1.
2975 * arith.h: Remove third argument from gfc_compare_string.
2976 * arith.c (gfc_compare_expression): Remove third argument
2977 from call to gfc_compare_string.
2978 (gfc_compare_string): Remove third argument xcoll_table.
2979 Remove use of xcoll_table.
2980 * misc.c (gfc_init_1): Remove call to gfc_simplify_init_1.
2981 * simplify.c (ascii_table): Remove.
2982 (xascii_table): Likewise.
2983 (gfc_simplify_achar): ICE if extract_int fails. Remove use of
2984 ascii_table. Warn if -Wsurprising and value < 0 or > 127.
2985 (gfc_simplify_char): ICE if extract_int fails. Error if
2986 value < 0 or value > 255.
2987 (gfc_simplify_iachar): Remove use of xascii_table.
2988 Char values outside of 0..255 are an ICE.
2989 (gfc_simplify_lge): Remove use of xascii_table.
2990 (gfc_simplify_lgt): Likewise.
2991 (gfc_simplify_lle): Likewise.
2992 (gfc_simplify_llt): Likewise.
2993 (invert_table): Remove.
2994 (gfc_simplify_init_1): Remove.
2996 2007-01-27 Roger Sayle <roger@eyesopen.com>
2998 * trans-stmt.c (forall_info): Replace the next_nest and outer
2999 fields that previously implemented a doubly-linked list with a
3000 single prev_nest field (singly-linked list).
3001 (gfc_trans_nested_forall_loop): The nested_forall_info argument
3002 now denotes the innermost FORALL in the loop nest.
3003 (compute_overall_iter_number): Use prev_nest instead of next_nest.
3004 (gfc_trans_forall_1): Link/cons the new "info" to the head of the
3005 nested_forall_info linked list. Free the current "info" when done.
3007 2007-01-27 Paul Thomas <pault@gcc.gnu.org>
3010 * trans-expr.c (gfc_conv_operator_assign): New function.
3011 * trans.h : Add prototype for gfc_conv_operator_assign.
3012 * trans-stmt.c (gfc_trans_where_assign): Add a gfc_symbol for
3013 a potential operator assignment subroutine. If it is non-NULL
3014 call gfc_conv_operator_assign instead of the first assignment.
3015 ( gfc_trans_where_2): In the case of an operator assignment,
3016 extract the argument expressions from the code for the
3017 subroutine call and pass the symbol to gfc_trans_where_assign.
3018 resolve.c (resolve_where, gfc_resolve_where_code_in_forall,
3019 gfc_resolve_forall_body): Resolve the subroutine call for
3020 operator assignments.
3022 2007-01-26 Steven Bosscher <stevenb.gcc@gmail.com>
3023 Steven G. Kargl <kargl@gcc.gnu.org>
3026 * fortran/io.c (next_char): Deal with backslash escaped characters.
3027 Issue warnings in non -std=gnu cases.
3028 * fortran/primary.c (next_string_char): Issue warnings in non
3030 2007-01-26 Tobias Burnus <burnus@net-b.de>
3032 * lang-specs.h: Add support for .f03 and .F03 extensions.
3033 * gfortran.texi: Document .f03 extension.
3034 * options.c (form_from_filename): Recognize .f03.
3036 2007-01-25 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3039 * lang.opt (Wall): Remove RejectNegative.
3040 * options.c (gfc_handle_option): Wall can be disabled.
3041 (set_Wall): Add a parameter for disabling Wall.
3043 2007-01-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3046 * scanner.c (load_line): Remove check fot ctrl-z and don't gobble.
3048 2007-01-23 Paul Thomas <pault@gcc.gnu.org>
3051 * match.c (gfc_match_namelist): Add check for assumed size character
3052 in namelist and provide error if found.
3054 2007-01-21 Brooks Moses <brooks.moses@codesourcery.com>
3056 * intrinsic.texi (ACHAR): Added cross-references.
3057 (CHAR): Put cross-references in alphabetical order.
3058 (IACHAR): Added cross-references.
3059 (ICHAR): Added cross-references.
3061 2007-01-20 Brooks Moses <brooks.moses@codesourcery.com>
3063 * intrinsic.texi: Edited all "Syntax" examples to a consistent form.
3064 (MAXVAL): Corrected description of result characteristics.
3066 (UMASK): Added documentation.
3068 2007-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
3070 * openmp.c, matchexp.c, module.c, scanner.c, resolve.c, st.c,
3071 parse.c, primary.c, options.c, misc.c, simplify.c: Next installment
3072 in the massive whitespace patch.
3074 2007-01-20 Roger Sayle <roger@eyesopen.com>
3076 * module.c (mio_array_ref): The dimen_type fields of an array ref
3077 are an enumerated type and can't be read/written directly with a
3078 call to mio_integer. Instead loop over and cast each element.
3080 2007-01-20 Roger Sayle <roger@eyesopen.com>
3082 * dependency.c (gfc_full_array_ref_p): Check that ref->next is NULL,
3083 i.e. that the ARRAY_REF doesn't mention components.
3084 * trans-array.c (gfc_constant_array_constructor_p): Export external
3085 function renamed from constant_array_constructor_p.
3086 (gfc_build_constant_array_constructor): Export.
3087 (gfc_trans_array_constructor): Update call to the renamed function
3088 constant_array_constructor_p.
3089 * trans-array.h (gfc_constant_array_constructor_p): Prototype here.
3090 (gfc_build_constant_array_constructor): Likewise.
3091 * trans-expr.c (gfc_build_memcpy_call): New helper function split
3092 out from gfc_trans_array_copy.
3093 (gfc_trans_array_copy): Use gfc_build_memcpy_call.
3094 (gfc_trans_array_constructor_copy): New function to optimize
3095 assigning an entire array from a constant array constructor.
3096 (gfc_trans_assignment): Call gfc_trans_array_constructor_copy
3099 2007-01-20 Roger Sayle <roger@eyesopen.com>
3101 * trans-intrinsic.c (gfc_conv_intrinsic_sign): New branchless
3102 implementation for the SIGN intrinsic with integral operands.
3103 (gfc_conv_intrinsic_minmax): Fix whitespace.
3105 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3107 * gfortran.h (gfc_options_t): Add flag_allow_leading_underscore.
3108 * lang.opt: Add -fallow-leading-underscore.
3109 * match.c (gfc_match_name): Allow leading underscore in symbol
3110 name if -fallow-leading-underscore is used.
3111 * symbol.c (gfc_get_default_type): Add special case for symbol
3112 names beginning with an underscore.
3113 * trans-decl.c (gfc_get_extern_function_decl,
3114 gfc_build_intrinsic_function_decls): Add _gfortran prefix to
3115 library symbols selected_int_kind, selected_real_kind and
3117 * options.c (gfc_init_options, gfc_handle_option): Handle the
3118 new -fallow-leading-underscore option.
3120 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3123 * options.c (gfc_handle_module_path_options): Path used in -J
3124 option is now added to the module search path.
3126 2007-01-20 Richard Guenther <rguenther@suse.de>
3129 * f95-lang.c (gfc_init_builtin_functions): Provide cbrt and
3130 cexpi builtins if we have TARGET_C99_FUNCTIONS. Provide
3131 sincos builtins if the target has sincos.
3133 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
3135 * intrinsic.texi (MATMUL): Corrected a typo.
3136 (MAX): Separated @var arguments.
3137 (MIN): Separated @var arguments.
3139 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
3141 * intrinsic.texi: general whitespace cleanup.
3142 (menu): Added TIME8, removed UNMASK.
3143 (AINT): Clarified argument requirement.
3144 (ANINT): Clarified argument requirement.
3145 (CEILING): Clarified argument requirement.
3146 (CHAR): Clarified argument requirement.
3147 (CMPLX): Clarified argument requirement.
3148 (DCMPLX): Clarified argument requirement.
3149 (FGET): Line rewrapping.
3150 (FLOOR): Clarified argument requirement.
3151 (GMTIME): Added documentation.
3152 (IAND): Added cross-reference.
3153 (IBCLR): Added cross-reference.
3154 (IBSET): Added cross-reference.
3155 (IEOR): Added cross-reference.
3156 (INT): Collapsed examples, clarified argument requirement.
3157 (IOR): Added cross-references.
3158 (LEN_TRIM): Corrected result kind.
3159 (LINK): Added cross-reference.
3160 (LLT): Removed "documentation pending".
3161 (LOGICAL): Added documentation.
3162 (LSHIFT): Added documentation.
3163 (LTIME): Added documentation.
3164 (MATMUL): Added documentation.
3165 (MAX): Added documentation.
3166 (MAXLOC): Added documentation.
3167 (MAXVAL): Added documentation.
3168 (MERGE): Added documentation.
3169 (MIN): Added documentation.
3170 (MINLOC): Added documentation.
3171 (MINVAL): Added documentation.
3172 (MVBITS): Moved to correct place, added documentation.
3173 (NOT): Added documentation.
3174 (PERROR): Added documentation.
3175 (RAN): Moved to correct place, added documentation.
3176 (REAL): Clarified argument requirement.
3177 (RENAME): Added documentation.
3178 (RSHIFT): Clarified argument requirement.
3179 (SIGN): Corrected table specification.
3180 (SYMLNK): Added documentation.
3181 (SYSTEM): Added documentation.
3182 (TIME): Added documentation.
3183 (TIME8): Added section and documentation.
3184 (UNMASK): Removed erroneous section.
3186 2007-01-18 H.J. Lu <hongjiu.lu@intel.com>
3188 * trans-stmt.c (compute_overall_iter_number): Fix a typo.
3190 2007-01-18 Roger Sayle <roger@eyesopen.com>
3192 * trans-expr.c (copyable_array_p): Consider user derived types without
3193 allocatable components to be copyable.
3195 2007-01-18 Roger Sayle <roger@eyesopen.com>
3197 * trans-stmt.c (compute_overall_iter_number): Enhance to precompute
3198 the number of interations in unconditional FORALL nests with constant
3201 2007-01-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3202 Tobias Burnus <burnus@net-b.de>
3205 * gfortran.h (gfc_option_t): Add flag_dump_core.
3206 * lang.opt: Add -fdump-core option.
3207 * invoke.texi: Document the new options.
3208 * trans-decl.c (gfc_build_builtin_function_decls): Add new
3209 options to the call to set_std.
3210 * options.c (gfc_init_options, gfc_handle_option): Set the
3213 2007-01-17 Paul Thomas <pault@gcc.gnu.org>
3216 * module.c (load_generic_interfaces): Make the marking of the
3217 symbol as ambiguous conditional on the module names being
3219 (write_generic): Ensure that the generic interface has a
3220 non-NULL module field.
3222 2007-01-16 Roger Sayle <roger@eyesopen.com>
3225 * trans-stmt.c (forall_info): Remove pmask field.
3226 (gfc_trans_forall_loop): Remove NVAR argument, instead assume that
3227 NVAR covers all the interation variables in the current forall_info.
3228 Add an extra OUTER parameter, which specified the loop header in
3229 which to place mask index initializations.
3230 (gfc_trans_nested_forall_loop): Remove NEST_FLAG argument.
3231 Change the semantics of MASK_FLAG to only control the mask in the
3233 (compute_overall_iter_number): Optimize the trivial case of a
3234 top-level loop having a constant number of iterations. Update
3235 call to gfc_trans_nested_forall_loop. Calculate the number of
3236 times the inner loop will be executed, not to size of the
3238 (allocate_temp_for_forall_nest_1): Reuse SIZE as BYTESIZE when
3239 sizeof(type) == 1. Tidy up.
3240 (gfc_trans_assign_need_temp): Remove NEST_FLAG argument from calls
3241 to gfc_trans_nested_forall_loop.
3242 (gfc_trans_pointer_assign_need_temp): Likewise.
3243 (gfc_trans_forall_1): Remove unused BYTESIZE, TMPVAR, SIZEVAR and
3244 LENVAR local variables. Split mask allocation into a separate
3245 hunk/pass from mask population. Use allocate_temp_for_forall_nest
3246 to allocate the FORALL mask with the correct size. Update calls
3247 to gfc_trans_nested_forall_loop.
3248 (gfc_evaluate_where_mask): Update call to
3249 gfc_trans_nested_forall_loop.
3250 (gfc_trans_where_2): Likewise.
3252 2007-01-15 Paul Thomas <pault@gcc.gnu.org>
3255 * trans-stmt.c (gfc_trans_call): If it does not have one, get
3256 a backend_decl for an alternate return.
3259 * resolve.c (pure_function): Statement functions are pure. Note
3260 that this will have to recurse to comply fully with F95.
3263 * resolve.c (resolve_function): Only a reference to the final
3264 dimension of an assumed size array is an error in an inquiry
3268 * resolve.c (resolve_function): Make sure that the function
3269 expression has a type.
3271 2007-01-14 Paul Thomas <pault@gcc.gnu.org>
3274 * trans-decl.c (gfc_sym_mangled_function_id): Module, external
3275 symbols must not have the module name prepended.
3277 2007-01-11 Thomas Koenig <Thomas.Koenig@online.de>
3280 * iresolve.c (gfc_resolve_maxloc): If the rank
3281 of the return array is nonzero and we process an
3282 integer array smaller than default kind, coerce
3283 the array to default integer.
3284 * iresolve.c (gfc_resolve_minloc): Likewise.
3286 2007-01-11 Brooks Moses <brooks.moses@codesourcery.com>
3288 * simplify.c: Update copyright to 2007.
3291 2007-01-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3294 * scanner.c (gfc_release_include_path): Free gfc_option.module_dir
3297 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
3299 * simplify.c (gfc_simplify_ibclr): Fix POS comparison.
3300 (gfc_simplify_ibset): Same.
3302 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
3306 * simplify.c (convert_mpz_to_unsigned): New function.
3307 (convert_mpz_to_signed): New function, largely based on
3309 (twos_complement): Removed.
3310 (gfc_simplify_ibclr): Add conversions to and from an
3311 unsigned representation before bit-twiddling.
3312 (gfc_simplify_ibset): Same.
3313 (gfc_simplify_ishftc): Add checks for overly large
3314 constant arguments, only check the third argument if
3315 it's present, carry over high bits into the result as
3316 appropriate, and perform the final conversion back to
3317 a signed representation using the correct sign bit.
3318 (gfc_simplify_not): Removed unnecessary masking.
3320 2007-01-09 Paul Thomas <pault@gcc.gnu.org>
3323 * resolve.c (resolve_code): Use the code->expr character length
3324 directly to set length of llen.
3326 2007-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3329 * lang.opt: Add Wcharacter_truncation option.
3330 * options.c (gfc_init_options): Initialize
3331 gfc_option.warn_character_truncation to zero.
3332 (gfc_handle_option): Add case for OPT_Wcharacter_truncation.
3334 2007-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
3336 * interface.c, intrinsic.c, gfortranspec.c, io.c, f95-lang.c,
3337 iresolve.c, match.c: Update Copyright years. Whitespace.
3339 2007-01-08 Richard Guenther <rguenther@suse.de>
3341 * trans-io.c (transfer_array_desc): Use build_int_cst instead
3344 2007-01-08 Roger Sayle <roger@eyesopen.com>
3346 * trans-array.c (constant_array_constructor_p): New function to
3347 determine whether an array constructor consists only of constant
3348 elements, and if so return it's size.
3349 (gfc_build_constant_array_constructor): Construct a statically
3350 initialized gfortran array for a given EXPR_ARRAY.
3351 (gfc_trans_constant_array_constructor): Efficiently scalarize
3352 a constant array constructor.
3353 (gfc_trans_array_constructor): Tidy up use of CONST_STRING.
3354 Special case scalarization of constant array constructors, all of
3355 whose elements are specified, using constant_array_constructor_p
3356 and gfc_trans_constant_array_constructor.
3357 (gfc_conv_scalarized_array_ref): Check whetger info->offset is zero
3358 before adding it to index, to avoid creating a NON_LVALUE_EXPR.
3360 2007-01-08 Kazu Hirata <kazu@codesourcery.com>
3362 gfortran.texi: Fix typos.
3364 2007-01-07 Steven G. Kargl <kargl@gcc.gnu.org>
3366 * decl.c, dump-parse-tree.c, error.c, data.c, expr.c, dependency.c,
3367 convert.c: Update Copyright dates. Fix whitespace.
3369 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
3371 * data.c (gfc_assign_data_value): Fix whitespace.
3373 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
3375 * trans-array.c (gfc_trans_create_temp_array, gfc_array_init_size):
3376 Commentary typo fix.
3378 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
3381 * match.c (gfc_match_name): Print diagnostics for invalid
3384 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
3386 * array.c: Fix whitespace in comment table.
3388 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
3390 * array.c, bbt.c, check.c: Update copyright years. Whitespace.
3392 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
3394 * arith.c: Update copyright years. Whitespace.
3396 2007-01-05 Roger Sayle <roger@eyesopen.com>
3398 * trans-expr.c (gfc_trans_assignment_1): New subroutine to scalarize
3399 array assignments split out from gfc_trans_assignment.
3400 (gfc_trans_array_copy): New function to implement array to array
3401 copies via calls to __builtin_memcpy.
3402 (copyable_array_p): New helper function to identify an array of
3403 simple/POD types, that may be copied/assigned using memcpy.
3404 (gfc_trans_assignment): Use gfc_trans_array_copy to handle simple
3405 whole array assignments considered suitable by copyable_array_p.
3406 Invoke gfc_trans_assignment_1 to perform the fallback scalarization.
3408 2007-01-05 Roger Sayle <roger@eyesopen.com>
3410 * trans-array.c (gfc_trans_array_constructor_value): Make the
3411 static const "data" array as TREE_READONLY.
3412 * trans-stmt.c (gfc_trans_character_select): Likewise.
3414 2007-01-05 Roger Sayle <roger@eyesopen.com>
3416 * trans-array.c (gfc_conv_loop_setup): Test whether the loop
3417 stride is one, to avoid fold_build2 introducing a useless
3418 NON_LVALUE_EXPR node.
3420 2007-01-05 Tobias Burnus <burnus@net-b.de>
3422 * symbol.c (check_conflict): Fix error message.
3424 2007-01-05 Paul Thomas <pault@gcc.gnu.org>
3427 * decl.c (gfc_in_match_data, gfc_set_in_match_data): New
3428 functions to signal that a DATA statement is being matched.
3429 (gfc_match_data): Call gfc_set_in_match_data on entry and on
3431 * gfortran.h : Add prototypes for above.
3432 * expr.c (check_init_expr): Avoid check on parameter or
3433 variable if gfc_in_match_data is true.
3434 (gfc_match_init_expr): Do not call error on non-reduction of
3435 expression if gfc_in_match_data is true.
3439 * decl.c (gfc_set_constant_character_len): Add boolean arg to
3440 flag array constructor resolution. Warn if string is being
3441 truncated. Standard dependent error if string is padded. Set
3442 new arg to false for all three calls to
3443 gfc_set_constant_character_len.
3444 * match.h : Add boolean arg to prototype for
3445 gfc_set_constant_character_len.
3446 * gfortran.h : Add warn_character_truncation to gfc_options.
3447 * options.c (set_Wall): Set warn_character_truncation if -Wall
3449 * resolve.c (resolve_code): Warn if rhs string in character
3450 assignment has to be truncated.
3451 * array.c (gfc_resolve_character_array_constructor): Set new
3452 argument to true for call to gfc_set_constant_character_len.
3454 2007-01-05 Tobias Burnus <burnus@net-b.de>
3457 * interface.c (compare_parameter_intent): New function.
3458 (check_intents): Support pointer intents.
3459 * symbol.c (check_conflict): Support pointer intents,
3460 better conflict_std message.
3461 * expr.c (gfc_check_assign,gfc_check_pointer_assign):
3462 Support pointer intents.
3463 * resolve.c (resolve_deallocate_expr,resolve_allocate_expr):
3464 Support pointer intents.
3466 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3469 * check.c (gfc_check_kill_sub): Add checks for non-scalar
3472 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
3474 * intrinsic.texi: Minor cleanup, reflowing overlong
3475 paragraphs, and correcting whitespace.
3477 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
3479 * intrinsic.texi (LBOUND): Add documentation.
3480 (LGE): Add documentation.
3481 (LGT): Add documentation.
3482 (LINK): Add documentation.
3483 (LLE): Add documentation.
3484 (LLT): Add documentation.
3485 (LNBLNK): Add documentation.
3486 (UBOUND): Add documentation.
3487 (UNLINK): Add documentation.
3489 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
3491 * intrinsic.texi (IAND): Clarify argument specifications.
3492 (IBCLR): Add documentation.
3493 (IBITS): Add documentation.
3494 (IBSET): Add documentation.
3495 (IEOR): Add documentation.
3496 (IERRNO): Add documentation.
3497 (INDEX): Add documentation.
3498 (IOR): Add documentation.
3499 (ISHFT): Add documentation.
3500 (ISHFTC): Add documentation.
3501 (KILL): Add documentation.
3502 (LEN_TRIM): Add documentation.
3504 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
3507 * interface.c (compare_actual_formal): check for
3508 alternate returns when iterating over non-present
3511 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
3513 * invoke.texi: Update manpage copyright to include 2007.
3515 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
3517 * gfortran.texi: Update copyright to include 2007.
3518 * intrinsic.texi: Update copyright to include 2007.
3519 * invoke.texi: Update copyright to include 2007.
3521 2007-01-02 Tobias Burnus <burnus@net-b.de>
3522 Jakub Jelinek <jakub@redhat.com>
3525 * scanner.c (open_included_file): Revert patch.
3526 (gfc_open_included_file): Support absolute pathnames.
3527 (gfc_open_intrinsic_module): Support absolute pathnames.
3529 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3531 * gfortran.texi (GNU Fortran and GCC): Rewrite
3533 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3535 * gfortran.texi (Introduction): Lower "Part I:
3536 Introduction" to a chapter, renumber Parts II and III to
3538 * intrinsic.texi (Introduction): Rename to "Introduction
3539 to Intrinsics" to avoid conflict with the new chapter.
3541 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3543 * intrinsic.texi (Introduction): Rewrite first paragraph.
3545 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3547 * invoke.texi (OpenMP): Added index entry.
3548 * gfortran.texi (title page): Removed erroneous '*'.
3550 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3552 * gfortran.texi (GFORTRAN_DEFAULT_RECL): Added units
3554 (Extensions): Miscellaneous minor rewriting and copyediting.
3555 (BOZ-literal constants): Renamed from Hexadecimal constants.
3556 (Hollerith constants support): Added explanation and
3557 suggestions for standard-conforming modern equivalents.
3559 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3561 * intrinsic.texi: Improvements to index entries; change
3562 @findex entries to @cindex entries.
3563 * invoke.texi: Standardize and improve index entries.
3564 * gfortran.texi: Fix @code in one index entry.
3566 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3568 * invoke.texi: Change @code-type macros to appropriate
3569 variants (@command, @option, etc.)
3570 * gfortran.texi: Same.
3572 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3574 * intrinsic.texi: Various minor cleanups.
3576 2007-01-02 Steven G. Kargl <kargls@comcast.net>
3578 * trans-intrinsic.c (gfc_conv_intrinsic_ibits): Fix call to
3581 2007-01-02 Tobias Burnus <burnus@net-b.de>
3584 * scanner.c (open_included_file): Support full-path filenames.
3586 2007-01-02 Paul Thomas <pault@gcc.gnu.org>
3589 * interface.c (check_sym_interfaces): Remove call to
3590 resolve_global_procedure.
3591 gfortran.h : Remove prototype for resolve_global_procedure.
3592 resolve.c (resolve_global_procedure): Add static attribute
3593 to function declaration.
3595 2007-01-01 Steven G. Kargl <kargls@comcast.net>
3597 * ChangeLog: Copy to ...
3598 * ChangeLog-2006: here.