1 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
3 * invoke.texi: Removed -w from option summary.
5 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
8 * intrinsic.texi (IRAND, RAND, RANDOM_NUMBER): Document algorithm
9 used for random number generator.
11 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
13 * gfortran.h, interface.c, resolve.c, symbol.c: Fix comment
15 * intrinsic.texi, invoke.texi: Fix typos.
17 2007-07-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
20 * resolve.c (generic_sym): Check for a same symbol and if so, return to
21 avoid infinite recursion.
23 2007-07-28 Daniel Franke <franke.daniel@gmail.com>
28 * gfortran.h (symbol_attribute): Added bits for pointer_comp,
30 * parse.c (parse_derived): Set pointer_comp/private_comp bits if
31 the derived type ultimately contains pointer components or private
33 * module.c (ab_attribute): New values AB_POINTER_COMP, AB_PRIVATE_COMP.
34 (attr_bits): Added names for new ab_attributes.
35 (mio_symbol_attribute): Save/restore new attribute bits in modules.
36 * match.c (gfc_match_namelist): Removed check for namelist objects
38 * resolve.c (resolve_fl_namelist): Added check for pointer or
39 private components in nested types. Added check for namelist objects
42 2007-07-28 Paul Thomas <pault@gcc.gnu.org>
45 * trans-expr.c (gfc_trans_scalar_assign): Revert to fixed order
46 for lse and rse pre expressions, for derived types with
47 allocatable components. Instead, assign the lhs to a temporary
48 and deallocate after the assignment.
50 2007-07-28 Janne Blomqvist <jb@gcc.gnu.org>
53 * trans-stmt.c (gfc_trans_character_select): Replace occurrences
54 of gfc_c_int_type_node with integer_type_node.
55 * trans-decl.c (gfc_build_intrinsic_function_decls): Likewise.
56 (gfc_build_builtin_function_decls): Likewise.
57 (gfc_generate_function_code): Likewise.
58 * trans-io.c (gfc_build_io_library_fndecls): Likewise.
60 2007-07-27 Janne Blomqvist <jb@gcc.gnu.org>
62 * trans-decl.c (gfc_build_builtin_function_decls): Use existing
63 gfc_array_index_type rather than creating another typenode for
64 gfc_index_integer_kind.
66 2007-07-27 Janne Blomqvist <jb@gcc.gnu.org>
68 * trans-io.c (gfc_build_io_library_fndecls): Change to use
69 gfc_array_index_type for array descriptor triplets instead of
72 2007-07-26 Steven G. Kargl <kargl@gcc.gnu.org>
75 * resolve.c (resolve_operator): Add INTRINSIC_EQ_OS comparison.
77 2007-07-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
78 Daniel Franke <franke.daniel@gmail.com>
81 * primary.c (match_variable): Do not call gfc_add_flavor if symbol has
82 attribute of ACCESS_PUBLIC or ACCESS_PRIVATE already marked.
84 2007-07-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
87 * trans-stmt.c (gfc_trans_character_select): Replace the
88 mechanism with labels by a SWITCH_EXPR.
89 * trans-decl.c (gfc_build_builtin_function_decls): Change
90 return type for select_string.
92 2007-07-27 Paul Thomas <pault@gcc.gnu.org>
95 * trans-decl.c (gfc_trans_deferred_vars): Set intent(out)
96 derived types as referenced, if they have the the default
99 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
101 * gfortran.h (generate_isocbinding_symbol): Constify.
102 * symbol.c (gen_special_c_interop_ptr, gen_cptr_param,
103 generate_isocbinding_symbol): Likewise.
105 2007-07-24 Paul Thomas <pault@gcc.gnu.org>
109 * trans-expr.c (gfc_conv_function_call): Remove the default
110 initialization of intent(out) derived types.
111 * symbol.c (gfc_lval_expr_from_sym): New function.
112 * matchexp.c (gfc_get_parentheses): Return argument, if it is
113 character and posseses a ref.
114 * gfortran.h : Add prototype for gfc_lval_expr_from_sym.
115 * resolve.c (has_default_initializer): Move higher up in file.
116 (resolve_code): On detecting an interface assignment, check
117 if the rhs and the lhs are the same symbol. If this is so,
118 enclose the rhs in parenetheses to generate a temporary and
119 prevent any possible aliasing.
120 (apply_default_init): Remove code making the lval and call
121 gfc_lval_expr_from_sym instead.
122 (resolve_operator): Give a parentheses expression a type-
123 spec if it has no type.
124 * trans-decl.c (gfc_trans_deferred_vars): Apply the a default
125 initializer, if any, to an intent(out) derived type, using
126 gfc_lval_expr_from_sym and gfc_trans_assignment. Check if
127 the dummy is present.
129 2007-07-24 Daniel Franke <franke.daniel@gmail.com>
132 * expr.c (check_init_expr): Simplify matched functions.
134 2007-07-24 Daniel Franke <franke.daniel@gmail.com>
137 * intrinsic.c (add_sym): Do not exclude any symbols, even if not part
138 of the selected standard.
139 (make generic): Likewise.
140 (make alias): Likewise, set standard the alias belongs to.
141 (add_subroutines): Call make_noreturn unconditionally.
142 (check_intrinsic_standard): Change return value to try.
143 (gfc_intrinsic_func_interface): Check return value of above function.
144 (gfc_intrinsic_sub_interface): Likewise.
146 2007-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
149 * trans-decl.c (generate_function_code): Add argument
150 for flag_bounds_check to the array for set_options.
151 * invoke.texi (-fbounds-check): Document new libarary run-time
154 2007-07-23 Daniel Franke <franke.daniel@gmail.com>
158 * expr.c (check_transformational): Reject valid transformational
159 intrinsics to avoid ICE.
160 (check_inquiry): Report error for assumed character lengths for
161 all supported standards.
162 (check_init_expr): Whitespace fix.
164 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
168 * decl.c (verify_bind_c_sym): Use the result symbol for functions
169 with a result clause. Warn if implicitly typed. Verify the type
170 and rank of the SHAPE argument, if given.
171 * resolve.c (gfc_iso_c_sub_interface): Use gfc_procedure_use to
172 check the actual args against the formal, sorting them if
174 * symbol.c (gen_shape_param): Initialize type of SHAPE param to
177 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
180 * trans-decl.c (generate_local_decl): Convert the TREE_TYPE for by
181 value character dummy args of BIND(C) procedures.
182 * trans-expr.c (gfc_conv_variable): Do not build address
183 expression for BT_CHARACTER dummy args.
185 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
186 Tobias Burnus <burnus@net-b.de>
189 * trans-expr.c (gfc_conv_function_call): Handle c_funloc.
190 * trans-types.c: Add pfunc_type_node.
191 (gfc_init_types,gfc_typenode_for_spec): Use it.
192 * resolve.c (gfc_iso_c_func_interface): Fix whitespace and
193 improve error message.
195 2007-07-22 Daniel Franke <franke.daniel@gmail.com>
198 * parse.c (gfc_fixup_sibling_symbols): No replacement of symbols if
199 the current is a namelist.
201 2007-07-22 Daniel Franke <franke.daniel@gmail.com>
207 * gfortran.h (gfc_intrinsic_sym): Changed members elemental, pure,
208 generic, specific, actual_ok, noreturn into bits of a bitfield,
209 added bits for inquiry, transformational, conversion.
210 * check.c (non_init_transformational): Removed, removed all callers.
211 * intrinsic.c (enum class): New.
212 (add_sym*): Replaced argument elemetal by enum class. Changed all
214 (add_functions): Assign appropriate classes to intrinsic functions.
215 (add_subroutines): Assign appropriate classes to intrinsic subroutines.
216 (add_conv): Set conversion attribute.
217 (gfc_init_expr_extensions): Removed, removed all callers.
218 (gfc_intrinsic_func_interface): Reimplemented check for non-standard
219 initializatione expressions.
220 * expr.c (check_specification_function): New.
221 (gfc_is_constant_expr): Added check for specification functions.
222 (check_init_expr_arguments): New.
223 (check_inquiry): Changed return value to MATCH, added checks for
224 inquiry functions defined by F2003.
225 (check_transformational): New.
227 (check_elemental): New.
228 (check_conversion): New.
229 (check_init_expr): Call new check functions, add more specific error
232 2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
235 * resolve.c (set_name_and_label): Set kind number for character
236 version of c_f_pointer.
237 (gfc_iso_c_sub_interface): Set the kind of the SHAPE formal arg to
238 that of the actual SHAPE arg.
239 * symbol.c (gen_shape_param): Initialize kind for SHAPE arg.
241 2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
244 * symbol.c (generate_isocbinding_symbol): Remove unnecessary
248 * resolve.c (gfc_iso_c_func_interface): Reject assumed-shape and
249 deferred-shape arrays as args to C_LOC. Fix bug in testing
250 character args to C_LOC.
252 2007-07-21 Lee Millward <lee.millward@gmail.com>
255 * trans-intrinsic.c (gfc_conv_intrinsic_int): Evaluate all
256 arguments passed, not just the first one. Adjust code to
257 refer to "args[0]" instead of "arg" as a result.
259 2007-07-19 Christopher D. Rickett <crickett@lanl.gov>
262 * trans-expr.c (gfc_conv_function_call): Inline C_LOC.
264 2007-07-18 Christopher D. Rickett <crickett@lanl.gov>
267 * symbol.c (generate_isocbinding_symbol): Fix bug where
268 ISOCBINDING_FUNPTR was generated for C_LOC instead of the needed
271 2007-07-17 Janus Weil <jaydub66@gmail.com>
274 * resolve.c (resolve_fl_namelist): Check for namelist private
275 components in contained subprograms.
277 2007-07-17 Paul Thomas <pault@gcc.gnu.org>
281 * trans-expr.c (gfc_trans_subcomponent_assign): Ensure that
282 renormalization unity base is done independently of existing
284 (gfc_trans_scalar_assign): If rhs is not a variable, put
285 lse->pre after rse->pre to ensure that de-allocation of lhs
286 occurs after evaluation of rhs.
288 2007-07-16 Lee Millward <lee.millward@gmail.com>
293 * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
294 to operate on a stack allocated array for the intrinsic arguments
295 instead of creating a TREE_LIST. Add two new parameters for the
296 array and the number of elements. Update all callers to allocate
297 an array of the correct length to pass in. Update comment.
298 (gfc_intrinsic_argument_list_length): New function.
299 (gfc_conv_intrinsic_conversion): Call it.
300 (gfc_conv_intrinsic_mnimax): Likewise.
301 (gfc_conv_intrinsic_merge): Likewise.
302 (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
304 (gfc_conv_intrinsic_cmplx): Likewise.
305 (gfc_conv_intrinsic_ctime): Likewise.
306 (gfc_covn_intrinsic_fdate): Likewise.
307 (gfc_conv_intrinsic_ttynam): Likewise.
308 (gfc_conv_intrinsic_ishftc): Likewise.
309 (gfc_conv_intrinsic_index): Likewise.
310 (gfc_conv_intrinsic_scan): Likewise.
311 (gfc_conv_intrinsic_verify): Likewise.
312 (gfc_conv_intrinsic_trim): Likewise.
313 (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
314 (gfc_conv_intrinsic_exponent): Likewise.
315 (gfc_conv_intrinsic_bound): Likewise.
316 (gfc_conv_intrinsic_abs): Likewise.
317 (gfc_conv_intrinsic_mod): Likewise.
318 (gfc_conv_intrinsic_sign): Likewise.
319 (gfc_conv_intrinsic_len): Likewise.
320 (gfc_conv_intrinsic_adjust): Likewise.
321 (gfc_conv_intrinsic_si_kind): Likewise.
323 2007-07-16 Janne Blomqvist <jb@gcc.gnu.org>
326 * trans-decl.c (gfc_build_builtin_function_decls): Remove
327 DECL_IS_MALLOC attribute from internal_realloc, thus reverting
328 part of my 2007-07-03 patch.
330 2007-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
331 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
334 * gfortran.h (gfc_option_t): Add flag_sign_zero field.
335 * lang.opt (-fsign-zero): New option.
336 * trans.h: Rename gfor_fndecl_set_std into gfor_fndecl_set_options.
337 * trans-decl.c (gfc_build_builtin_function_decls): Build the function
338 declaration to pass an array containing the options to be used by the
339 runtime library. (gfc_generate_function_code): Build an array that
340 contains option values to be passed to the runtime library and the call
342 * options.c (gfc_init_options): Initialize the flag_sign_zero field.
343 (gfc_handle_option): Handle the -fsign-zero option.
345 2007-07-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
348 * trans-array.c (gfc_conv_array_ref): Only evaluate index once.
350 2007-07-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
353 * iresolve.c (gfc_resolve_mvbits): Convert FROMPOS, LEN and TOPOS
356 2007-07-14 Thomas Koenig <tkoenig@gcc.gnu.org>
359 * iresolve.c(gfc_resolve_pack): A scalar mask has
360 to be kind=4, an array mask with kind<4 is converted
361 to gfc_default_logical_kind automatically.
362 (gfc_resolve_unpack): Convert mask to gfc_default_lotical_kind
365 2007-07-14 Paul Thomas <pault@gcc.gnu.org>
368 * parse.c (parse_spec): Emit error on unexpected statement
371 2007-07-13 Daniel Franke <franke.daniel@gmail.com>
373 * invoke.texi: Unified upper- and lower-case in menus.
374 (-w, -W): Removed, documented by gcc.
375 * intrinsic.texi: Unified Class-section entries, added
376 subroutine/function warning where appropiate.
378 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
381 * decl.c (gfc_match_suffix): Removed surplus general error that hides
382 a more specific message.
383 * resolve.c (resolve_fl_variable): Reject illegal initializiers only
385 (resolve_fl_procedure): Added check for initializers of functions.
387 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
390 * invoke.texi (-static-libgfortran): Document new option.
392 2007-07-12 Paul Thomas <pault@gcc.gnu.org>
396 * module.c (write_generic): Restore patch of 2007-07-10 and use
397 symbol name if there are no use names.
399 2007-07-12 Christopher D. Rickett <crickett@lanl.gov>
402 * decl.c (verify_c_interop_param): Require character string dummy
403 args to BIND(C) procedures to have length 1.
404 * resolve.c (resolve_fl_procedure): Modify parameter checking for
408 * resolve.c (gfc_iso_c_func_interface): Verify that a valid
409 expression is given as an argument to C_LOC and C_ASSOCIATED.
410 * trans-io.c (transfer_expr): Add argument for code block. Add
411 standards check to determine if an error message should be
412 reported for printing C_PTR or C_FUNPTR.
413 (transfer_array_component): Update arguments to transfer_expr.
414 (gfc_trans_transfer): Ditto.
416 * symbol.c (gen_cptr_param): Fix whitespace.
418 2007-07-12 Jakub Jelinek <jakub@redhat.com>
421 * trans.h (GFC_POINTER_TYPE_P): Define.
422 * trans-types.c (gfc_sym_type): Set it for types on attr->sym.pointer.
423 * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
424 if GFC_POINTER_TYPE_P is set on the type.
426 2007-07-12 Richard Guenther <rguenther@suse.de>
428 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Convert
429 arguments to gfc_charlen_type_node.
430 * trans-io.c (gfc_convert_array_to_string): Convert type
431 size to gfc_array_index_type.
433 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
437 * module.c: Reverted Paul's patch from 2007-07-10.
439 2007-07-11 Richard Guenther <rguenther@suse.de>
441 * trans-array.c (gfc_conv_array_parameter): Use correct
442 types for comparison.
443 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
444 correct types for POINTER_PLUS_EXPR.
445 * trans-stmt.c (gfc_trans_forall_loop): Use correct type
446 for integer one constant.
448 2007-07-10 Paul Thomas <pault@gcc.gnu.org>
451 * resolve.c (is_external_proc): New function. Adds test that
452 the symbol is not an intrinsic procedure.
453 * (resolve_function, resolve_call): Replace logical statements
454 with call to is_external_proc.
457 * simplify.c (gfc_simplify_transfer): If mold has rank, the
461 * module.c (write_generic): Write the local name of the
464 2007-07-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
467 * trans-array.c (gfc_trans_array_constructor): Mark offset field
468 with TREE_NO_WARNING.
469 * trans-decl.c (gfc_build_qualified_array): Mark lbound, ubound,
470 stride and size variables with TREE_NO_WARNING.
472 2007-07-09 Steven G. Kargl <kargl@gcc.gnu.org>
474 * trans-decl.c (set_tree_decl_type_code): Remove function.
475 (generate_local_decl): Remove reference to set_tree_decl_type_code.
477 2007-07-09 Daniel Franke <franke.daniel@gmail.com>
480 * trans-decl.c (generate_local_decl) Emit a warning if an unused
483 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
486 * module.c (gfc_match_use): Do not set an non-existant
487 intrinsic operator if a user-defined operator is found.
489 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
493 * trans-decl.c (generate_local_decl): Adjusted warning on unused
494 dummy arguments, tell middle-end not to emit additional warnings.
496 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
497 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
500 * gfortran.h (gfc_intrinsic_op): Added INTRINSIC_EQ_OS,
501 INTRINSIC_NE_OS, INTRINSIC_GT_OS, INTRINSIC_GE_OS,
502 INTRINSIC_LT_OS and INTRINSIC_LE_OS.
503 * arith.c (eval_intrinsic, eval_type_intrinsic0): Likewise.
504 * arith.h (gfc_eq, gfc_ne, gfc_gt, gfc_ge, gfc_lt, gfc_le):
505 Added gfc_intrinsic_op as third argument type.
506 * dump-parse-tree.c (gfc_show_expr): Account for new enum values.
507 * expr.c (simplify_intrinsic_op, check_intrinsic_op): Likewise.
508 * interface.c (check_operator_interface): Likewise.
509 (gfc_check_interfaces): Added cross-checks for FORTRAN 77 and
510 Fortran 90 style operators using new enum values.
511 (gfc_extend_expr): Likewise.
512 (gfc_add_interface): Likewise.
513 * match.c (intrinsic_operators): Distinguish FORTRAN 77 style
514 operators from Fortran 90 style operators using new enum values.
515 * matchexp.c (match_level_4): Account for new enum values.
516 * module.c (mio_expr): Likewise.
517 * resolve.c (resolve_operator): Deal with new enum values, fix
518 inconsistent error messages.
519 * trans-expr.c (gfc_conv_expr_op): Account for new enum values.
521 2007-07-08 Tobias Burnus <burnus@net-b.de>
524 * interface.c (get_expr_storage_size): Properly obtain lower bound.
525 (compare_actual_formal): Add space before parenthesis.
527 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
530 * resolve.c (resolve_fl_procedure): Added check for PRIVATE types
531 in PUBLIC interfaces.
533 2007-07-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
536 * decl.c (match_attr_spec): Don't return MATCH_ERROR if comma found and
537 gfc_match_bind_c does not return MATCH_YES.
539 2007-07-07 Kazu Hirata <kazu@codesourcery.com>
541 * decl.c, gfortran.h, interface.c, module.c, resolve.c,
542 trans-array.c, trans-decl.c: Fix comment typos. Follow
543 spelling conventions.
544 * intrinsic.texi: Fix typos. Follow spelling conventions.
546 2007-05-06 Daniel Franke <franke.daniel@gmail.com>
549 * symbol.c (save_status): New.
550 * gfortran.h (save_status): Added external declaration.
551 (check_conflict): Check for conflicting explicite SAVE statements
553 (gen_special_c_interop_ptr): Use SAVE_EXPLICIT constant.
554 * module.c (ab_attribute, attr_bits): Removed enumerator value
555 AB_SAVE for save attribute.
556 (mio_symbol_attribute): Import/export the full SAVE status,
557 removed usage of AB_SAVE.
558 * dump-parse-tree.c (gfc_show_attr): Dump full SAVE status.
559 * decl.c (add_init_expr_to_sym): Set SAVE_IMPLICIT only if not
562 2007-07-05 Daniel Franke <franke.daniel@gmail.com>
563 Tobias Burnus <burnus@net-b.de>
566 * gfortran.h (symbol_attribute): Change save attribute into an enum.
567 * decl.c (add_init_expr_to_sym): Set it to SAVE_IMPLICIT.
568 * symbol.c (gfc_add_save): Check for SAVE_EXPLICIT.
569 * resolve.c (resolve_fl_variable): Check for SAVE_EXPLICIT.
570 (resolve_symbol): Allow OMP threadprivate with
571 initialization SAVEd and save_all variable.
572 * trans-decl.c (gfc_finish_var_decl): Remove obsolete sym->value check.
574 2007-07-05 Paul Thomas <pault@gcc.gnu.org>
577 * match.c (gfc_match_call): Check, in all cases, that a symbol
578 is neither generic nor a subroutine before trying to add it as
582 * match.c (gfc_match_do): Reset the implied_index attribute.
584 2007-07-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
587 * trans-intrinsic.c (trans-intrinsic.c): Handle optional
588 arguments correctly for MIN and MAX intrinsics.
590 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
593 * io.c (check_format): Always call gfc_error for errors.
594 (check_format_string): Change type of this function to try and
595 return the result of check_format.
596 (check_io_constraints): Return MATCH_ERROR if check_format_string
599 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
602 * decl.c (get_proc_name): Include attr->mod_proc in check for error.
604 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
607 * gfortran.h: Change type of gfc_assign_data_value from void to try.
608 * data.c (gfc_assign_data_value): Return FAILURE if error found.
609 * resolve.c (check_data_variable): If gfc_assign_data_value returns
610 failure, break out of loop and return failure.
612 2007-07-03 Christopher D. Rickett <crickett@lanl.gov>
615 * symbol.c (gen_cptr_param): Generate C_PTR and C_FUNPTR if necessary.
616 (build_formal_args): Pass intrinsic module symbol id to
619 2007-07-03 Tobias Burnus <burnus@net-b.de>
622 * resolve.c (resolve_common_blocks): New check function.
623 (resolve_types): Use it.
625 2007-07-03 Tobias Burnus <burnus@net-b.de>
628 * interface.c (get_sym_storage_size): New function.
629 (get_sym_storage_size): New function.
630 (compare_actual_formal): Enhance sequence association
631 support and improve checking.
633 2007-07-03 Janne Blomqvist <jb@gcc.gnu.org>
635 * trans-decl.c (gfc_build_builtin_function_decls): Mark
636 internal_realloc as a malloc function.
638 2007-07-03 Tobias Burnus <burnus@net-b.de>
641 * resolve.c (resolve_operator): Check for NULL as operand.
643 2007-07-02 Tobias Burnus <burnus@net-b.de>
645 * gfortran.texi (Fortran 2003): Add ISO Bind C.
646 * intrinsic.texi (C_ASSOCIATED,C_F_POINTER,C_F_PROCPOINTER,
647 C_FUNLOC,C_LOC): Document new ISO Bind C intrinsics.
649 2007-07-01 Christopher D. Rickett <crickett@lanl.gov>
651 * interface.c (gfc_compare_derived_types): Special case for comparing
652 derived types across namespaces.
653 (gfc_compare_types): Deal with BT_VOID.
654 (compare_parameter): Use BT_VOID to accept ISO C Binding pointers.
655 * trans-expr.c (gfc_conv_function_call): Remove setting parm_kind
657 (gfc_conv_initializer): Deal with ISO C Binding NULL_PTR and
659 (gfc_conv_expr): Convert expressions for ISO C Binding derived types.
660 * symbol.c (gfc_set_default_type): BIND(C) variables should not be
662 (check_conflict): Add BIND(C) and check for conflicts.
663 (gfc_add_explicit_interface): Whitespace.
664 (gfc_add_is_bind_c): New function.
665 (gfc_copy_attr): Use it.
666 (gfc_new_symbol): Initialize ISO C Binding objects.
667 (get_iso_c_binding_dt): New function.
668 (verify_bind_c_derived_type): Ditto.
669 (gen_special_c_interop_ptr): Ditto.
670 (add_formal_arg): Ditto.
671 (gen_cptr_param): Ditto.
672 (gen_fptr_param): Ditto.
673 (gen_shape_param): Ditto.
674 (add_proc_interface): Ditto.
675 (build_formal_args): Ditto.
676 (generate_isocbinding_symbol): Ditto.
677 (get_iso_c_sym): Ditto.
678 * decl.c (num_idents_on_line, has_name_equals): New variables.
679 (verify_c_interop_param): New function.
680 (build_sym): Finish binding labels and deal with COMMON blocks.
681 (add_init_expr_to_sym): Check if the initialized expression is
682 an iso_c_binding named constants
683 (variable_decl): Set ISO C Binding type_spec components.
684 (gfc_match_kind_spec): Check match for C interoperable kind.
685 (match_char_spec): Fix comment. Chnage gfc_match_small_int
686 to gfc_match_small_int_expr. Check for C interoperable kind.
687 (match_type_spec): Clear the current binding label.
688 (match_attr_spec): Add DECL_IS_BIND_C. If BIND(C) is found, use it
690 (set_binding_label): New function.
691 (set_com_block_bind_c): Ditto.
692 (verify_c_interop): Ditto.
693 (verify_com_block_vars_c_interop): Ditto.
694 (verify_bind_c_sym): Ditto.
695 (set_verify_bind_c_sym): Ditto.
696 (set_verify_bind_c_com_block): Ditto.
697 (get_bind_c_idents): Ditto.
698 (gfc_match_bind_c_stmt): Ditto.
699 (gfc_match_data_decl): Use num_idents_on_line.
700 (match_result): Deal with right paren in BIND(C).
701 (gfc_match_suffix): New function.
702 (gfc_match_function_decl): Use it. Code is re-arranged to deal with
703 ISO C Binding result clauses.
704 (gfc_match_subroutine): Deal with BIND(C).
705 (gfc_match_bind_c): New function.
706 (gfc_get_type_attr_spec): New function. Code is re-arranged in and
707 taken from gfc_match_derived_decl.
708 (gfc_match_derived_decl): Add check for BIND(C).
709 * trans-common.c: Forward declare gfc_get_common.
710 (gfc_sym_mangled_common_id): Change arg from 'const char *name' to
711 'gfc_common_head *com'. Check for ISO C Binding of the common block.
712 (build_common_decl): 'com->name' to 'com in SET_DECL_ASSEMBLER_NAME.
713 * gfortran.h: Add GFC_MAX_BINDING_LABEL_LEN
715 (sym_flavor): Add FL_VOID.
716 (iso_fortran_env_symbol, iso_c_binding_symbol, intmod_id): New enum
717 (CInteropKind_t): New struct.
718 (c_interop_kinds_table): Use it. Declare an array of structs.
719 (symbol_attribute): Add is_bind_c, is_c_interop, and is_iso_c
721 (gfc_typespec): Add is_c_interop; is_iso_c, and f90_type members.
722 (gfc_symbol): Add from_intmod, intmod_sym_id, binding_label, and
723 common_block members.
724 (gfc_common_head): Add binding_label and is_bind_c members.
725 (gfc_gsymbol): Add sym_name, mod_name, and binding_label members.
726 Add prototypes for get_c_kind, gfc_validate_c_kind,
727 gfc_check_any_c_kind, gfc_add_is_bind_c, gfc_add_value,
728 verify_c_interop, verify_c_interop_param, verify_bind_c_sym,
729 verify_bind_c_derived_type, verify_com_block_vars_c_interop,
730 generate_isocbinding_symbol, get_iso_c_sym, gfc_iso_c_sub_interface
731 * iso-c-binding.def: New file. This file contains the definitions
732 of the types provided by the Fortran 2003 ISO_C_BINDING intrinsic
734 * trans-const.c (gfc_conv_constant_to_tree): Deal with C_NULL_PTR
735 or C_NULL_FUNPTR expressions.
736 * expr.c (gfc_copy_expr): Add BT_VOID case. For BT_CHARACTER, the
737 ISO C Binding requires a minimum string length of 1 for '\0'.
738 * module.c (intmod_sym): New struct.
739 (pointer_info): Add binding_label member.
740 (write_atom): Set len to 0 for NULL pointers. Check for NULL p and *p.
741 (ab_attribute): Add AB_IS_BIND_C, AB_IS_C_INTEROP and AB_IS_ISO_C.
742 (attr_bits): Add "IS_BIND_C", "IS_C_INTEROP", and "IS_ISO_C".
743 (mio_symbol_attribute): Deal with ISO C Binding attributes.
744 (bt_types): Add "VOID".
745 (mio_typespec): Deal with ISO C Binding components.
746 (mio_namespace_ref): Add intmod variable.
747 (mio_symbol): Check for symbols from an intrinsic module.
748 (load_commons): Check for BIND(C) common block.
749 (read_module): Read binding_label and use it.
750 (write_common): Add label. Write BIND(C) info.
751 (write_blank_common): Blank commons are not BIND(C). Explicitly
753 (write_symbol): Deal with binding_label.
754 (sort_iso_c_rename_list): New function.
755 (import_iso_c_binding_module): Ditto.
756 (create_int_parameter): Add to args.
757 (use_iso_fortran_env_module): Adjust to deal with iso_c_binding
759 * trans-types.c (c_interop_kinds_table): new array of structs.
760 (gfc_validate_c_kind): New function.
761 (gfc_check_any_c_kind): Ditto.
762 (get_real_kind_from_node): Ditto.
763 (get_int_kind_from_node): Ditto.
764 (get_int_kind_from_width): Ditto.
765 (get_int_kind_from_minimal_width): Ditto.
766 (init_c_interop_kinds): Ditto.
767 (gfc_init_kinds): call init_c_interop_kinds.
768 (gfc_typenode_for_spec): Adjust for BT_VOID and ISO C Binding pointers.
769 Adjust handling of BT_DERIVED.
770 (gfc_sym_type): Whitespace.
771 (gfc_get_derived_type): Account for iso_c_binding derived types
772 * resolve.c (is_scalar_expr_ptr): New function.
773 (gfc_iso_c_func_interface): Ditto.
774 (resolve_function): Use gfc_iso_c_func_interface.
775 (set_name_and_label): New function.
776 (gfc_iso_c_sub_interface): Ditto.
777 (resolve_specific_s0): Use gfc_iso_c_sub_interface.
778 (resolve_bind_c_comms): New function.
779 (resolve_bind_c_derived_types): Ditto.
780 (gfc_verify_binding_labels): Ditto.
781 (resolve_fl_procedure): Check for ISO C interoperability.
782 (resolve_symbol): Check C interoperability.
783 (resolve_types): Walk the namespace. Check COMMON blocks.
784 * trans-decl.c (gfc_sym_mangled_identifier): Prevent the mangling
785 of identifiers that have an assigned binding label.
786 (gfc_sym_mangled_function_id): Use the binding label rather than
788 (gfc_finish_var_decl): Put variables that are BIND(C) into a common
789 segment of the object file, because this is what C would do.
790 (gfc_create_module_variable): Conver to proper types
791 (set_tree_decl_type_code): New function.
792 (generate_local_decl): Check dummy variables and derived types for
793 ISO C Binding attributes.
794 * match.c (gfc_match_small_int_expr): New function.
795 (gfc_match_name_C): Ditto.
796 (match_common_name): Deal with ISO C Binding in COMMON blocks
797 * trans-io.c (transfer_expr): Deal with C_NULL_PTR or C_NULL_FUNPTR
799 * match.h: Add prototypes for gfc_match_small_int_expr,
800 gfc_match_name_C, match_common_name, set_com_block_bind_c,
801 set_binding_label, set_verify_bind_c_sym,
802 set_verify_bind_c_com_block, get_bind_c_idents,
803 gfc_match_bind_c_stmt, gfc_match_suffix, gfc_match_bind_c,
804 gfc_get_type_attr_spec
805 * parse.c (decode_statement): Use gfc_match_bind_c_stmt
806 (parse_derived): Init *derived_sym = NULL, and gfc_current_block
807 later for valiadation.
808 * primary.c (got_delim): Set ISO C Binding components of ts.
809 (match_logical_constant): Ditto.
810 (match_complex_constant): Ditto.
811 (match_complex_constant): Ditto.
812 (gfc_match_rvalue): Check for existence of at least one arg for
813 C_LOC, C_FUNLOC, and C_ASSOCIATED.
814 * misc.c (gfc_clear_ts): Clear ISO C Bindoing components in ts.
815 (get_c_kind): New function.
817 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
820 * trans-expr.c (gfc_conv_power_op): Use builtin_powi for
822 * f95-lang.c (gfc_init_builtin_functions): Add builtin_powi to the
825 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
827 * trans.h: Remove decls for 64-bit allocation functions.
828 * trans-array.c (gfc_grow_array): Always pick the standard realloc
830 (gfc_array_allocate): Likewise.
831 * trans-decl.c: Remove trees for 64-bit allocation functions.
832 (gfc_build_builtin_function_decls): Don't build fndecls for 64-bit
833 allocations functions, use index_int_type for normal allocation
836 2007-06-30 Daniel Franke <franke.daniel@gmail.com>
839 * intrinsic.c (add_functions): Additional function types.
840 (gfc_convert_type_warn): Remove intrinsic-flag from
841 conversion functions.
842 * resolve.c (resolve_symbol): Added type checks to
843 explicitly defined intrinsics.
845 2007-06-30 Tobias Burnus <burnus@net-b.de>
848 * io.c (check_format): Allow zero to precede the
851 2007-06-30 Paul Thomas <pault@gcc.gnu.org>
854 * simplify.c (gfc_simplify_repeat): Add handling of character
855 literal for first argument.
857 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
859 * resolve.c (resolve_operator): Added check whether a user
860 defined operator is available.
862 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
864 * openmp.c (resolve_omp_clauses): Adjust error message to
865 better reflect the actual requirement.
867 2007-06-29 Tobias Burnus <burnus@net-b.de>
870 * io.c (format_lex): Fix FMT_ZERO.
871 (check_format,check_format_string,gfc_match_format,
872 check_io_constraints) Additional checking for READ.
874 2007-06-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
877 * lang.opt (static-libgfortran): New option.
878 * gfortranspec.c (ADD_ARG_LIBGFORTRAN): New macro.
879 (Option): Add OPTION_static and OPTION_static_libgfortran.
880 (lookup_option): Handle the new -static-libgfortran option.
881 (lang_specific_driver): Check whether -static is passed.
882 Handle the new -static-libgfortran option.
883 * options.c (gfc_handle_option): If -static-libgfortran is
884 passed and isn't supported on this configuration, error out.
886 2007-06-27 Daniel Franke <franke.daniel@gmail.com>
889 * openmp.c (resolve_omp_clauses): Emit error on allocatable
890 components in COPYIN, COPYPRIVATE, FIRSTPRIVATE and LASTPRIVATE
893 2007-06-25 Paul Thomas <pault@gcc.gnu.org>
896 * resolve.c (check_host_association): Return if the old symbol
897 is use associated. Introduce retval to reduce the number of
898 evaluations of the first-order return value.
901 * match.c (gfc_match_call): If a host associated symbol is not
902 a subroutine, build a new symtree/symbol in the current name
905 2007-06-24 Tobias Burnus <burnus@net-de>
908 * interface.c (gfc_compare_derived_types): Add access check.
909 * symbol.c (gfc_find_component): Ditto.
910 (gfc_set_component_attr,gfc_get_component_attr) Copy access state.
911 * dump-parse-tree.c (gfc_show_components): Dump access state.
912 * gfortran.h (struct gfc_component): Add gfc_access.
913 * module.c (mio_component): Add access state.
914 * (gfc_match_structure_constructor): Check for private access state.
916 2007-06-24 Paul Thomas <pault@gcc.gnu.org>
920 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Calculate
921 the offset between the loop counter and the position as
922 defined. Add the offset within the loop so that the mask acts
923 correctly. Do not advance the location on the basis that it
926 2007-06-22 Daniel Franke <franke.daniel@gmail.com>
929 * symbol.c (gfc_copy_attr): Emit errors for duplicate
930 EXTERNAL/INTRINSIC statements.
932 2007-06-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
935 * expr.c (gfc_check_assign): If the rvalue expression type is NULL_EXPR,
936 check to see if the lvalue has attribute pointer and data.
938 2007-06-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
941 * resolve.c (gfc_resolve_iterator_expr): Add check for REAL using
942 gfc_notify_standard. (gfc_resolve_iterator): Remove check.
943 (resolve_branch): Change "Obsolete" to "Deleted feature".
944 * io.c (resolve_tag): Ditto.
945 * match.c (gfc_match_pause, gfc_match_assign, gfc_match_goto): Ditto.
947 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
950 * match.c (gfc_match_common): If the symbol value expression type is
951 NULL_EXPR, don't error if previously initialized.
953 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
956 * decl.c (get_proc_name) Check symbol for generic interface
959 2007-06-20 Andrew Pinski <andrew_pinski@playstation.sony.com>
960 Richard Guenther <rguenther@suse.de>
963 * trans.c (gfc_build_addr_expr): Use the correct types.
965 2007-06-19 Paul Thomas <pault@gcc.gnu.org>
969 * resolve.c (resolve_code): Use gfc_impure_variable as a
970 condition for rejecting derived types with pointers, in pure
972 (gfc_impure_variable): Add test for dummy arguments of pure
973 procedures; any for functions and INTENT_IN for subroutines.
976 * data.c (gfc_assign_data_value): Change the ICE on an array
977 reference initializer not being an array into an error and
978 clear init to prevent a repetition of the error.
980 2007-06-17 Janne Blomqvist <jb@gcc.gnu.org>
982 * gfortran.texi: Add documentation for GFORTRAN_UNBUFFERED_n
983 environment variables. Fix documentation for
984 GFORTRAN_UNBUFFERED_ALL environment variable.
986 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
988 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
989 POINTER_PLUS_EXPR instead of PLUS_EXPR for pointer addition.
990 * trans-expr.c (gfc_trans_string_copy): Create
991 POINTER_PLUS_EXPR instead of a PLUS_EXPR
994 2007-06-14 Paul Thomas <pault@gcc.gnu.org>
997 * trans-common.c (build_common_decl): If resizing of common
998 decl is needed, update the TREE_TYPE.
1000 2007-06-13 Tobias Burnus <burnus@net-b.de>
1003 * interface.c (has_vector_section): New.
1004 (compare_actual_formal): Check for array sections with vector subscript.
1006 2007-06-12 Dirk Mueller <dmueller@suse.de>
1008 * trans-stmt.c (gfc_trans_call): fix gcc_assert to
1009 a comparison, not an assignment.
1011 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
1013 * trans-common.c (create_common): Initialize 'field_init'.
1015 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
1019 * trans-common.c (get_init_field): New function.
1020 (create_common): Call get_init_field for overlapping
1021 initializers in equivalence blocks.
1022 * resolve.c (resolve_equivalence_derived, resolve_equivalence):
1023 Remove constraints on initializers in equivalence blocks.
1024 * target-memory.c (expr_to_char, gfc_merge_initializers):
1026 (encode_derived): Add the bit offset to the byte offset to get
1027 the total offset to the field.
1028 * target-memory.h : Add prototype for gfc_merge_initializers.
1030 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
1032 * trans-types.c (gfc_signed_type): Remove.
1033 * trans-types.h (gfc_signed_type): Remove.
1034 * f95-lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
1036 2007-06-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1038 * trans-intrinsic.c: Revert Lee's 2007-06-04 patch.
1040 2007-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
1041 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1044 * match.c (gfc_match_special_char): New function. Match special char.
1046 * match.h: Add prototype.
1047 * io.c (next_char): Use it.
1048 * primary.c (next_string_char): Ditto.
1050 2007-06-06 Steven G. Kargl <kargl@gcc.gnu.org>
1052 * decl.c: Miscellaneous whitespace fixes.
1054 * gfortran.h: Likewise.
1055 * interface.c : Likewise.
1057 * match.c: Likewise.
1058 * match.h: Likewise.
1059 * module.c: Likewise.
1060 * parse.c: Likewise.
1061 * resolve.c: Likewise.
1062 * symbol.c: Likewise.
1063 * trans-array.c: Likewise.
1064 * trans-common.c: Likewise.
1065 * trans-decl.c: Likewise.
1066 * trans-intrinsic.c: Likewise.
1067 * trans-io.c: Likewise.
1068 * trans-stmt.c: Likewise.
1069 * trans-types.c: Likewise.
1071 2007-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1074 * parse.c (decode_statement): Don't call gfc_undo_symbols on MATCH_ERROR
1075 for ST_FUNCTION since it is called in reject_statement.
1076 (parse_contained): If error, loop back after reject_statement and try
1077 again. Free the namespace if an error occured.
1079 2007-06-04 Lee Millward <lee.millward@codesourcery.com>
1081 * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
1082 to operate on a stack allocated array for the intrinsic arguments
1083 instead of creating a TREE_LIST. Add two new parameters for the
1084 array and the number of elements. Update all callers to allocate
1085 an array of the correct length to pass in. Update comment.
1086 (gfc_intrinsic_argument_list_length): New function.
1087 (gfc_conv_intrinsic_mnimax): Call it.
1088 (gfc_conv_intrinsic_merge): Likewise.
1089 (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
1091 (gfc_conv_intrinsic_cmplx): Likewise.
1092 (gfc_conv_intrinsic_ctime): Likewise.
1093 (gfc_covn_intrinsic_fdate): Likewise.
1094 (gfc_conv_intrinsic_ttynam): Likewise.
1095 (gfc_conv_intrinsic_ishftc): Likewise.
1096 (gfc_conv_intrinsic_index): Likewise.
1097 (gfc_conv_intrinsic_scan): Likewise.
1098 (gfc_conv_intrinsic_verify): Likewise.
1099 (gfc_conv_intrinsic_trim): Likewise.
1100 (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
1101 (gfc_conv_intrinsic_exponent): Likewise.
1102 (gfc_conv_intrinsic_bound): Likewise.
1103 (gfc_conv_intrinsic_abs): Likewise.
1104 (gfc_conv_intrinsic_mod): Likewise.
1105 (gfc_conv_intrinsic_sign): Likewise.
1106 (gfc_conv_intrinsic_len): Likewise.
1107 (gfc_conv_intrinsic_adjust): Likewise.
1108 (gfc_conv_intrinsic_si_kind): Likewise.
1110 2007-06-04 Steve Ellcey <sje@cup.hp.com>
1112 * trans-array.c (gfc_conv_array_parameter): Initialize tmp.
1114 2007-05-31 Richard Guenther <rguenther@suse.de>
1116 * trans-expr.c (gfc_conv_expr_op): Use zero constant
1117 that matches the lse type.
1118 (gfc_trans_string_copy): Use sizetype zero constant.
1119 * intrinsic.c (add_functions): The sizeof intrinsic has
1121 * trans-types.c (gfc_get_dtype): Convert size to index
1122 type before shifting.
1123 * trans-array.c (gfc_trans_array_constructor_value): Use
1124 index type for offset computation.
1125 * trans-intrinsic.c (gfc_conv_associated): Use correct type
1128 2007-05-31 Paul Thomas <pault@gcc.gnu.org>
1131 * trans-array.c (gfc_trans_array_constructor): Treat the case
1132 where the ss expression charlen is missing.
1134 22007-05-31 Paul Thomas <pault@gcc.gnu.org>
1137 * module.c (mio_symtree_ref): If an equivalence group member
1138 is not used, give it a hidden symbol and set the pointer_info.
1139 (load_equiv): Only free the equivalence if none of the members
1142 2007-05-29 Daniel Franke <franke.daniel@gmail.com>
1144 * gfortran.h: Renamed 'enum gfc_generic_isym_id' to 'enum gfc_isym_id',
1145 added missing GFC_ISYM_* enumerators, ordered alphabetically.
1146 (struct gfc_intrinsic_sym): Renamed 'generic_id' to 'id'.
1147 (gfc_find_subroutine): New prototype.
1148 * intrinsic.c (add_sym, add_sym_*): Added argument 'id' and changed all callers.
1149 (find_subroutine): Renamed to 'gfc_find_subroutine', removed static.
1150 * dependency.c: Changed usage of isym->generic_id to isym->id.
1151 * openmp.c: Likewise.
1152 * resolve.c: Likewise.
1153 * trans-array.c: Likewise.
1154 * trans-expr.c: Likewise.
1155 * trans-intrinsic.c: Likewise.
1156 * trans-openmp.c: Likewise.
1158 2007-05-28 Tobias Schlüter <tobi@gcc.gnu.org>
1160 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIZEOF.
1161 * intrinsic.c (add_functions): Add stuff for SIZEOF intrinsic.
1162 * intrinsic.h (gfc_check_sizeof): Add prototype of ...
1163 * check.c (gfc_check_sizeof): .. new function.
1164 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): New function.
1165 (gfc_conv_intrinsic_strcmp): Whitespace fix.
1166 (gfc_conv_intrinsic_array_transfer): Remove double initialization,
1167 use fold_build. where appropriate.
1168 (gfc_conv_intrinsic_function): Add case for SIZEOF.
1169 * intrinsic.texi: Add documentation for SIZEOF.
1171 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
1173 * trans-array.c (gfc_conv_expr_descriptor): Edit comment.
1175 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
1178 * target-memory.c (gfc_target_expr_size): Add handling
1179 for size of BT_HOLLERITH variables.
1180 * check.c (gfc_check_transfer): Reject BT_HOLLERITH
1181 variables in MOLD argument of TRANSFER.
1183 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
1185 * gfortran.h (gfc_expr): Remove from_H, add "representation"
1187 * primary.c (match_hollerith_constant): Store the representation
1188 of the Hollerith in representation, not in value.character.
1189 * arith.c: Add dependency on target-memory.h.
1190 (eval_intrinsic): Remove check for from_H.
1191 (hollerith2representation): New function.
1192 (gfc_hollerith2int): Determine value of the new constant.
1193 (gfc_hollerith2real): Likewise.
1194 (gfc_hollerith2complex): Likewise.
1195 (gfc_hollerith2logical): Likewise.
1196 (gfc_hollerith2character): Point both representation.string and
1197 value.character.string at the value string.
1198 * data.c (create_character_initializer): For BT_HOLLERITH
1199 rvalues, get the value from the representation rather than
1201 * expr.c (free_expr0): Update handling of BT_HOLLERITH values
1202 and values with representation.string.
1203 (gfc_copy_expr): Likewise.
1204 * intrinsic.c (do_simplify): Remove special treatement of
1205 variables resulting from Hollerith constants.
1206 * dump-parse-trees.c (gfc_show_expr): Update handling of
1208 * trans-const.c (gfc_conv_constant_to_tree): Replace from_H
1209 check with check for representation.string; get Hollerith
1210 representation from representation.string, not value.character.
1211 * trans-expr.c (is_zero_initializer_p): Replace from_H check
1212 with check for representation.string.
1213 * trans-stmt.c (gfc_trans_integer_select): Use
1214 gfc_conv_mpz_to_tree for case values, so as to avoid picking up
1215 the memory representation if the case is given by a transfer
1217 * target-memory.c (gfc_target_encode_expr): Use the known memory
1218 representation rather than the value, if it exists.
1219 (gfc_target_interpret_expr): Store the memory representation of
1220 the interpreted expression as well as its value.
1221 (interpret_integer): Move to gfc_interpret_integer, make
1223 (interpret_float): Move to gfc_interpret_float, make non-static.
1224 (interpret_complex): Move to gfc_interpret_complex, make
1226 (interpret_logical): Move to gfc_interpret_logical, make
1228 (interpret_character): Move to gfc_interpret_character, make
1230 (interpret_derived): Move to gfc_interpret_derived, make
1232 * target-memory.h: Add prototypes for newly-exported
1233 gfc_interpret_* functions.
1235 2007-05-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1238 * parse.c (next_statement): Warn for truncated lines if source is free
1241 2007-05-27 Paul Thomas <pault@gcc.gnu.org>
1242 Tobias Burnus <burnus@net-b.de>
1245 * symbol.c (gfc_check_function_type): Copy dimensions of
1247 * resolve.c (resolve_contained_fntype): Improve symbol output in
1250 2007-05-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1253 * io.c (check_format): Add warning for H specifier in format.
1255 2007-05-26 Tobias Burnus <burnus@net-b.de>
1257 * gfortran.texi: Document the GFORTRAN_ERROR_DUMPCORE and
1258 GFORTRAN_ERROR_BACKTRACE environment variables.
1260 2007-05-26 Paul Thomas <pault@gcc.gnu.org>
1263 * trans.h : Add no_function_call bitfield to gfc_se structure.
1264 Add stmtblock_t argument to prototype of get_array_ctor_strlen.
1265 * trans-array.c (get_array_ctor_all_strlen): New function.
1266 (get_array_ctor_strlen): Add new stmtblock_t argument and call
1267 new function for character elements that are not constants,
1268 arrays or variables.
1269 (gfc_conv_array_parameter): Call get_array_ctor_strlen to get
1271 * trans-intrinsic (gfc_conv_intrinsic_len): Add new argument
1272 to call of get_array_ctor_strlen.
1274 2007-05-25 Kazu Hirata <kazu@codesourcery.com>
1276 * intrinsic.texi: Fix typos.
1278 2007-05-25 Paul Thomas <pault@gcc.gnu.org>
1281 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Change
1282 order in logic under EXPR_FUNCTION to handle functions with
1285 2007-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1288 * array.c (spec_dimen_size): Test for correct BT_INTEGER type.
1290 2007-05-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1293 * trans-expr.c (gfc_trans_zero_assign): Convert the result of
1294 TYPE_SIZE_UNIT into a signed type.
1295 (gfc_trans_array_copy): Likewise.
1296 (gfc_trans_array_constructor_copy): Likewise.
1297 * trans-array.c (gfc_trans_create_temp_array): Likewise.
1298 (gfc_grow_array): Likewise.
1299 (gfc_array_init_size): Likewise.
1300 (gfc_duplicate_allocatable): Likewise.
1301 * trans-stmt.c (allocate_temp_for_forall_nest_1): Likewise.
1303 2007-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1306 * resolve.c (resolve_function): Don't call resolve_global_procedure if
1307 there is no name. Delete duplicated statement in ELSE clause.
1309 2007-05-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1312 * trans-array.c (gfc_trans_array_bound_check): Take extra argument to
1313 indicate whether we should check the upper bound in that dimension.
1314 (gfc_conv_array_index_offset): Check only the lower bound of the
1315 last dimension for assumed-size arrays.
1316 (gfc_conv_array_ref): Likewise.
1317 (gfc_conv_ss_startstride): Likewise.
1319 2007-05-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1320 Daniel Franke <franke.daniel@gmail.com>
1323 * resolve.c (resolve_actual_arglist): Resolve actual argument after
1324 being identified as variable.
1326 2007-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1329 * trans-stmt.c (gfc_trans_do): Fix the value of loop variable
1332 2007-05-21 H.J. Lu <hongjiu.lu@intel.com>
1334 * trans-stmt.c (gfc_trans_do): Fix a typo in comment.
1336 2007-05-21 Paul Thomas <pault@gcc.gnu.org>
1340 * trans-array.c (gfc_conv_expr_descriptor): Obtain the stored
1341 offset for non-descriptor, source arrays and correct for stride
1342 not equal to one before writing to field of output descriptor.
1344 2007-05-20 Daniel Franke <franke.daniel@gmail.com>
1347 * check.c (check_rest): Improved argument conformance check and
1348 fixed error message generation.
1350 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1353 * Make-lang.in: Remove use of -Wno-error for expr.o, resolve.o,
1354 simplify.o and trans-common.o.
1356 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1359 * trans-array.c (gfc_trans_auto_array_allocation): Avoid
1360 multiplication of mismatched types.
1362 2007-05-18 Daniel Franke <franke.daniel@gmail.com>
1365 * symbol.c (gfc_add_flavor): Add the NAME to error message if
1368 2007-05-15 Daniel Franke <franke.daniel@gmail.com>
1373 * intrinsic.c (check_specific): Check elemental intrinsics for
1375 (add_functions): Fixed dummy argument names of BESJN and BESYN.
1376 Fixed elemental status of MCLOCK and MCLOCK8.
1377 * check.c (check_rest): Added check for array conformance.
1378 (gfc_check_merge): Removed check for array conformance.
1379 (gfc_check_besn): Removed check for scalarity.
1380 * intrinsic.texi (CSHIFT, EOSHIFT): Fixed typos.
1381 (BESJN, BESYN): Clarified documentation.
1383 2007-05-17 Tobias Burnus <burnus@net-b.de>
1385 * gfortran.texi (GFORTRAN_CONVERT_UNIT): Improve documentation.
1387 2007-05-16 Brooks Moses <brooks.moses@codesourcery.com>
1394 * target-memory.c: New file.
1395 * target-memory.h: New file.
1396 * simplify.c: Add #include "target-memory.h".
1397 (gfc_simplify_transfer): Implement constant-
1398 folding for TRANSFER intrinsic.
1399 * Make-lang.in: Add dependencies on new target-memory.* files.
1401 2007-05-15 Paul Brook <paul@codesourcery.com>
1403 * trans-types.c (gfc_type_for_size): Handle signed TImode.
1405 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1408 * trans.h (gfor_fndecl_internal_malloc, gfor_fndecl_internal_malloc64,
1409 gfor_fndecl_internal_free): Remove prototypes.
1410 (gfor_fndecl_os_error, gfc_call_free, gfc_call_malloc): Add prototypes.
1411 * trans.c (gfc_call_malloc, gfc_call_free): New functions.
1412 * f95-lang.c (gfc_init_builtin_functions): Add __builtin_free
1413 and __builtin_malloc builtins.
1414 * trans-decl.c (gfor_fndecl_internal_malloc,
1415 gfor_fndecl_internal_malloc64, gfor_fndecl_internal_free): Remove.
1416 (gfor_fndecl_os_error): Add.
1417 (gfc_build_builtin_function_decls): Don't create internal_malloc,
1418 internal_malloc64 and internal_free library function declaration.
1419 Create os_error library call function declaration.
1420 * trans-array.c (gfc_trans_allocate_array_storage,
1421 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1422 gfc_conv_array_parameter, gfc_duplicate_allocatable): Use
1423 gfc_call_malloc and gfc_call_free instead of building calls to
1424 internal_malloc and internal_free.
1425 * trans-expr.c (gfc_conv_string_tmp): Likewise.
1426 * trans-stmt.c (gfc_do_allocate, gfc_trans_assign_need_temp,
1427 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
1428 gfc_trans_where_2: Likewise.
1429 * trans-intrinsic.c (gfc_conv_intrinsic_ctime,
1430 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
1431 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_trim): Likewise.
1433 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1436 * trans-expr.c (gfc_conv_substring): Evaluate substring bounds
1439 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
1441 * f95-lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1442 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use unsigned_type_for
1443 instead of gfc_unsigned_type.
1444 * trans-stmt.c (gfc_trans_do): Use unsigned_type_for instead of
1446 * trans-types.c (gfc_unsigned_type): Remove.
1447 * trans-types.h (gfc_unsigned_type): Remove.
1449 2007-05-12 Paul Thomas <pault@gcc.gnu.org>
1452 * resolve.c (check_host_association): New function that detects
1453 incorrect host association and corrects it.
1454 (gfc_resolve_expr): Call the new function for variables and
1456 * match.h : Remove prototype for gfc_match_rvalue.
1457 * gfortran.h : Add prototype for gfc_match_rvalue.
1459 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
1462 * trans-expr.c (gfc_conv_function_call): Reduce indirection for
1463 direct assignments of recursive array valued functions.
1464 * primary.c (gfc_match_rvalue): Correct error for recursive
1465 function calls such that directly recursive calls of scalar
1466 function without an explicit result are disallowed.
1468 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
1471 * resolve.c (resolve_fl_namelist): It is not an error if the
1472 namelist element is the result variable of the enclosing
1473 function. Search for the symbol in current and all parent
1474 namespaces for a potential conflict.
1475 * symbol.c (check_conflict): Remove the conflict between
1476 'in_namelist' and 'FL_PROCEDURE' because the symbol info
1477 is not available to exclude function result variables.
1478 * trans-io.c (nml_get_addr_expr): Use the fake result decl
1479 if the symbol is an implicit result variable.
1481 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
1484 * decl.c (get_proc_name): If an entry has already been declared
1485 as a module procedure, pick up the symbol and the symtree and
1486 use them for the entry.
1488 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
1491 * resolve.c (resolve_symbol): Remove the flagging mechanism from the
1492 formal namespace resolution and instead check that the formal
1493 namespace is not the current namespace.
1495 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
1498 * trans-array.c (gfc_conv_array_parameter): Convert full array
1499 references to the result of the procedure enclusing the call.
1501 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
1505 * decl.c (add_init_expr_to_sym): Expand a scalar initializer
1506 for a parameter array into an array expression with the right
1508 * array.c (spec_dimen_size): Remove static attribute.
1509 * gfortran.h : Prototype for spec_dimen_size.
1511 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1514 * trans-stmt.c (gfc_trans_do): Handle large loop counts.
1516 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1519 * simplify.c (gfc_simplify_new_line): NEW_LINE can be simplified
1520 even for non constant arguments.
1522 2007-05-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1523 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1526 * gfortran.h: Add runtime error codes from libgfortran.h. Define
1528 * trans.c (gfc_trans_runtime_check): Update the format of runtime error
1529 messages to match library runtime errors. Use call to new library
1530 function runtime_error_at().
1531 * trans.h: Add prototype for new function gfc_trans_io_runtime_check.
1532 Add declaration for library functions runtime_error_at and
1534 * trans_io.c (gfc_trans_io_runtime_check): New function.
1535 (set_parameter_value): Add error checking for UNIT numbers.
1536 (set_parameter_ref): Initialize the users variable to zero.
1537 (gfc_trans_open): Move setting of unit number to after setting of common
1538 flags so that runtime error trapping can be detected.
1539 (gfc_trans_close): Likewise. (build_filepos): Likewise.
1540 (gfc_trans_inquire): Likewise. (build_dt): Likewise.
1541 * trans-decl.c: Add declarations for runtime_error_at and
1542 generate_error. (gfc_build_builtin_function_decls): Build function
1543 declarations for runtime_error_at and generate_error.
1545 2007-05-06 Paul Thomas <pault@gcc.gnu.org>
1548 * resolve.c (resolve_fl_procedure): Resolve constant character
1551 2007-05-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1554 * decl.c (match_char_spec): Add check for invalid character lengths.
1556 2007-05-04 Brooks Moses <brooks.moses@codesourcery.com>
1558 * intrinsic.texi (CMPLX): Document result kind.
1559 (COMPLEX): Add documentation.
1561 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
1564 * intrinsic.c (add_functions): Replaced calls to gfc_check_g77_math1
1565 by gfc_check_fn_r to avoid checks for scalarity.
1566 * check.c (gfc_check_besn): Removed check for scalarity.
1567 (gfc_check_g77_math1): Removed.
1568 * intrinsic.h (gfc_check_g77_math1): Removed.
1570 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
1572 * check.c (gfc_check_fseek_sub): Fixed typo.
1574 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
1577 * intrinsic.c (add_subroutines): Added FSEEK.
1578 * intrinsic.h (gfc_resolve_fseek_sub, gfc_check_fseek_sub): New.
1579 * iresolve.c (gfc_resolve_fseek_sub): New.
1580 * check.c (gfc_check_fseek_sub): New.
1581 * intrinsic.texi (FSEEK): Updated.
1583 2007-05-04 Tobias Burnus <burnus@net-b.de>
1586 * expr.c (gfc_check_pointer_assign): Check for NULL pointer.
1588 2007-05-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1591 * simplify.c (gfc_simplify_len): Only simplify integer lengths.
1593 2007-05-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1596 * simplify.c (gfc_simplify_repeat): Don't put function call with
1597 side effect in a gcc_assert().
1599 2007-05-04 Tobias Burnus <burnus@net-b.de>
1602 * interface.c (compare_actual_formal): Check character length.
1604 2007-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1607 * dependency.c (gfc_full_array_ref_p): If the reference is
1608 to a single element, check that the array has a single
1609 element and that the correct element is referenced.
1611 2007-05-01 Daniel Franke <franke.daniel@gmail.com>
1613 * intrinsic.c (add_functions): Fixed ELEMENTAL specifications.
1614 (add_subroutines): Replaced magic numbers in function calls by
1615 ELEMENTAL and NOT_ELEMENTAL respectively.
1616 * intrinsic.texi (MVBITS): Changed class to elemental subroutine.
1617 (RANDOM_NUMBER): Changed class to subroutine.
1618 (HUGE, TINY): Changed class to inquiry function.
1620 2007-04-30 Brooks Moses <brooks.moses@codesourcery.com>
1622 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_get_double_int.
1623 (gfc_conv_tree_to_mpz): New function.
1624 (gfc_conv_mpfr_to_tree): Use real_from_mpfr.
1625 (gfc_conv_tree_to_mpfr): New function.
1626 * trans-const.h: (gfc_conv_tree_to_mpz): New prototype.
1627 (gfc_conv_tree_to_mpfr): New prototype.
1629 2007-04-30 Daniel Franke <franke.daniel@gmail.com>
1631 * intrinsic.texi (IERRNO): Changed class to non-elemental function.
1632 (LOG10): Removed COMPLEX as accepted argument type.
1633 (NEW_LINE): Changed class from elemental to inquiry function.
1634 (SIGN): Removed requirement of scalar arguments.
1635 (SNGL): Changed class to elemental function.
1637 2007-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1640 * simplify.c (simplify_bound_dim): New function.
1641 (simplify_bound): Use the above. Perform simplification of LBOUND
1642 and UBOUND when DIM argument is not present.
1644 2007-04-29 Daniel Franke <franke.daniel@gmail.com>
1646 * gfortran.texi: Cleaned up keyword index.
1647 * invoke.texi: Likewise.
1648 * intrinsic.texi: Likewise.
1650 2007-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1653 * scanner.c (load_file): Discard the byte order mark if one is
1654 found on the first non-preprocessor line of a file.
1656 2007-04-29 Paul Thomas <pault@gcc.gnu.org>
1659 * trans-array.c (gfc_conv_resolve_dependencies): Create a temp
1660 whenever a dependency is found.
1662 2007-04-28 Tobias Schlüter <tobi@gcc.gnu.org>
1664 * options.c (gfc_handle_option): Ensure requested free form line
1665 length is not too small.
1667 2007-04-27 Brooks Moses <brooks.moses@codesourcery.com>
1669 * intrinsic.texi (Transfer): Improve documentation.
1671 2007-04-27 Brooks Moses <brooks.moses@codesourcery.com>
1673 * gfortran.texi (Option Index): Add @samp as needed.
1675 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
1677 * gfortran.texi: Added node and menu entry for an option index.
1678 * invoke.texi: Moved command line option related entries of the concept
1679 index to the option index.
1681 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
1683 * intrinsic.texi (AND, FPUT, FPUTC, MODULO, OR, SET_EXPONENT,
1684 XOR): Fixed examples.
1686 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
1688 * intrinsic.texi (PRODUCT, RESHAPE, SPACING, SPREAD, SUM,
1689 SYSTEM_CLOCK, TRANSFER, UNPACK): New.
1690 (DATE_AND_TIME, CPU_TIME, RRSPACING): Added cross references.
1692 2007-04-26 Daniel Franke <franke.daniel@gmail.com>
1694 * intrinsic.texi (NULL, PACK, PRESENT, REPEAT, SCAN, SHAPE,
1695 SIZE, TRANSPOSE, TRIM, VERIFY): New.
1696 (ADJUSTL, ADJUSTR, INDEX): Added cross references.
1697 (INT, INT2, INT8, LONG): Enabled section header.
1699 2007-04-25 Janne Blomqvist <jb@gcc.gnu.org>
1701 * module.c (module_char): Replace fgetc() with
1703 (write_char): Replace fputc() with putc().
1704 * scanner.c (load_line): Replace fgetc() with getc().
1705 (gfc_read_orig_filename): Likewise.
1707 2007-04-25 Tobias Burnus <burnus@net-b.de>
1710 * error.c (error_print): Fix %% support.
1711 * intrinsic.c (sort_actual): Improve error message.
1712 * resolve.c (resolve_actual_arglist): Allow %VAL for
1713 interfaces defined in the module declaration part.
1715 2007-04-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1718 * intrinsic.texi (GETLOG): Update documentation to reflect
1721 2007-04-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1724 * module.c (write_char): Add character to the MD5 buffer.
1725 (read_md5_from_module_file): New function.
1726 (gfc_dump_module): Compute MD5 for new module file. Call
1727 read_md5_from_module_file. Only overwrite old module file
1728 if the new MD5 is different.
1730 2007-04-23 Paul Thomas <pault@gcc.gnu.org>
1733 * resolve.c (resolve_symbol): Allow resolution of formal
1734 namespaces nested within formal namespaces coming from modules.
1737 * trans-expr.c (gfc_trans_assignment): Make the call to
1738 gfc_trans_zero_assign conditional on the lhs array ref being
1741 2007-04-23 Tobias Burnus <burnus@net-b.de>
1743 * primary.c (match_integer_constant): Mention -fno-range-check
1744 in the error message.
1746 2007-04-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1749 * scanner.c (load_line): Remove check for comment after ampersand and
1750 adjust tracking of ampersand.
1752 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
1754 * f95-lang.c (lang_tree_node): Use GENERIC_NEXT
1755 instead of checking GIMPLE_STMT_P in chain_next.
1757 2007-04-17 Tobias Schlüter <tobi@gcc.gnu.org>
1759 * trans-types.h (gfc_packed): New enum.
1760 (gfc_get_nodesc_array_type): Change prototype to use new enum.
1761 * trans-types.c (gfc_get_nodesc_array): Use gfc_packed for
1762 argument packed. Adapt all references to values accordingly.
1763 (gfc_sym_type): Use enum values in call to gfc_get_nodesc_array.
1764 (gfc_get_derived_type): Likewise.
1765 * trans-array.c (gfc_build_constant_array_constructor): Likewise.
1766 * trans-expr.c (gfc_get_interface_mapping_charlen): Changed packed
1767 argument to type gfc_packed.
1768 (gfc_add_interface_mapping): Use enum values in call to
1769 gfc_get_interface_mapping.
1770 * trans-decl.c (gfc_build_dummy_array_decl): Adapt to use enum
1771 values when determining packing.
1773 * trans-decl.c (gfc_finish_decl): Remove unused second argument
1774 'init'. Simplify code accordingly. Remove calls to
1775 gfc_fatal_error in favor of gcc_assert.
1776 (create_function_arglist): Remove second argument from calls to
1778 (gfc_trans_dummy_character): Likewise.
1780 * arith.h: Update copyright years.
1781 * dependency.h: Likewise.
1782 * gfortran.h: Likewise.
1783 * lang-specs.h: Likewise.
1784 * parse.h: Likewise.
1785 * symbol.c: Likewise.
1786 * trans.h: Likewise.
1787 * trans.c: Likewise.
1788 * trans-array.c: Likewise.
1789 * trans-common.c: Likewise.
1790 * trans-const.h: Likewise.
1791 * trans-const.c: Likewise.
1792 * trans-decl.c: Likewise.
1793 * trans-expr.c: Likewise.
1794 * trans-io.c: Likewise.
1795 * trans-openmp.c: Likewise.
1796 * trans-types.h: Likewise.
1797 * types.def: Likewise.
1799 2007-04-17 Tobias Schlüter <tobi@gcc.gnu.org>
1802 * decl.c (gfc_sym_mangled_identifier): Use capital letters in name
1804 (gfc_sym_mangled_function_id): Likewise.
1806 2007-04-15 Paul Thomas <pault@gcc.gnu.org>
1809 * primary.c (check_for_implicit_index): New function to check
1810 that a host associated variable is not an undeclared implied
1812 (gfc_match_rvalue, match_variable): Use it and reset the
1813 implied_index attribute.
1814 * gfortran.h : Add the implied_index field to symbol_attribute.
1815 * match.c (gfc_match_iterator): Mark the iterator variable
1816 with the new attribute.
1817 * decl.c (build_sym): Reset the new attribute.
1819 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
1821 * gfc-internals.texi: Fix typos.
1822 * simplify.c: Fix a comment typo.
1824 2007-04-14 Bernhard Fischer <aldot@gcc.gnu.org>
1826 * primary.c: Commentary typo fix; Add question about redundant (?)
1829 2007-04-14 Paul Thomas <pault@gcc.gnu.org>
1833 * expr.c (scalarize_intrinsic_call): New function to
1834 scalarize elemental intrinsic functions in initialization
1836 (check_init_expr): Detect elemental intrinsic functions
1837 in initalization expressions and call previous.
1839 2007-04-13 Tobias Burnus <burnus@net-b.de>
1842 * primary.c (match_variable): External functions
1845 2007-04-13 Paul Thomas <pault@gcc.gnu.org>
1848 * trans-types.c (copy_dt_decls_ifequal): Do not get pointer
1849 derived type components.
1851 2007-04-13 Tobias Schlüter <tobi@gcc.gnu.org>
1854 * resolve.c: Include obstack.h and bitmap.h. New variable
1856 (code_stack): Add tail and reachable_labels fields.
1857 (reachable_labels): New function.
1858 (resolve_branch): Rework to use new fields in code_stack.
1859 (resolve_code): Call reachable_labels.
1860 (resolve_codes): Allocate and free labels_obstack.
1862 2007-04-12 Tobias Schlüter <tobi@gcc.gnu.org>
1865 * decl.c (match_char_spec): Move check for negative CHARACTER
1867 * resolve.c (resolve_charlen): ... here.
1868 (resolve_types): Resolve CHARACTER lengths earlier.
1870 2007-04-12 Daniel Franke <franke.daniel@gmail.com>
1873 * intrinsic.texi (RANDOM_SEED, RANDOM_NUMBER): New.
1875 2007-04-12 Tobias Schlüter <tobi@gcc.gnu.org>
1878 * primary.c (gfc_variable_attr): Don't copy string length if it
1880 * resolve.c (resolve_code): Clarify error message.
1883 * decl.c (gfc_match_end): Also check for construct name in END
1884 FORALL and END WERE statements.
1885 * match.c (match_case_eos): Use uppercase for statement name in
1887 (match_elsewhere): Construct name may appear iff construct has a
1890 * trans-types.c: Update copyright years. Reformat long comment
1891 explaining array descriptor format. Remove obsolete mention of
1894 * arith.c (gfc_arith_uplus): Rename to ...
1895 (gfc_arith_identity): ... this.
1896 (gfc_parentheses): New function.
1897 (gfc_uplus): Adapt to renamed function.
1898 * arith.h (gfc_parentheses): Add prototype.
1899 * expr.c (gfc_copy_expr): Deal with INTRINSIC_PARENTHESES.
1900 (simplifiy_intrinsic_op): Treat INTRINSIC_UPLUS separately from
1901 INTRINSIC_PARENTHESES.
1903 2007-04-12 Tobias Burnus <burnus@net-b.de>
1906 * decl.c (match_attr_spec): Allow PRIVATE/PUBLIC
1907 attribute in type definitions.
1908 (gfc_match_private): Allow PRIVATE statement only
1909 in specification part of modules.
1910 (gfc_match_public): Ditto for PUBLIC.
1911 (gfc_match_derived_decl): Allow PRIVATE/PUBLIC attribute only in
1912 specificification part of modules.
1914 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
1917 * intrinsic.c (add_functions): Add ref. to gfc_resolve_achar.
1918 * intrinsic.h : Add prototype for gfc_resolve_achar.
1919 * iresolve.c (gfc_resolve_achar): New function.
1921 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
1924 * resolve.c (resolve_fl_variable): Set flag to 2 for automatic
1925 arrays. Make condition for automatic array error explicit.
1926 If a dummy, no error on an INTENT(OUT) derived type.
1928 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
1931 * expr.c (find_array_element): Correct arithmetic for rank > 1.
1933 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
1936 * check.c (numeric_check): If an expresson has not got a type,
1937 see if it is a symbol for which a default type applies.
1939 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
1942 * trans-decl.c (gfc_get_symbol_decl): Allow unreferenced use
1945 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
1948 * symbol.c (gfc_check_function_type): New function.
1949 * gfortran.h : Add prototype for previous.
1950 * parse.c (parse_progunit): Call it after parsing specification
1953 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
1956 * trans-expr.c (gfc_conv_function_call): Give a dummy
1957 procedure the correct type if it has alternate returns.
1959 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
1962 * decl.c (gfc_match_modproc): Go up to the top of the namespace
1963 tree to find the module namespace for gfc_get_symbol.
1965 2007-04-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1968 * fortran/gfortran.h (gfc_charlen_int_kind): New prototype.
1969 * fortran/trans-types.c (gfc_charlen_int_kind): New variable.
1970 (gfc_init_types): Define gfc_charlen_int_kind.
1971 * fortran/trans.h (gfor_fndecl_string_repeat): Remove prototype.
1972 * fortran/trans-decl.c (gfor_fndecl_string_repeat): Delete.
1973 (gfc_build_intrinsic_function_decls): Don't set
1974 gfor_fndecl_string_repeat.
1975 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_repeat): Rewrite
1976 so that we don't have to call a library function.
1977 * fortran/simplify.c (gfc_simplify_repeat): Perform the necessary
1978 checks on the NCOPIES argument, and work with arbitrary size
1981 2007-03-31 Tobias Burnus <burnus@net-b.de>
1983 * intrinsic.c (add_functions): Fix name of dummy argument
1984 for new_line and exit intrinsic.
1986 2007-03-31 Paul Thomas <pault@gcc.gnu.org>
1989 * gfortran.texi: Add a section for the %VAL, %REF and %LOC
1992 2007-03-30 Rafael Avila de Espindola <espindola@google.com>
1994 * trans-types.c (gfc_signed_or_unsigned_type): Remove.
1995 (gfc_unsigned_type): Use get_signed_or_unsigned_type instead of
1996 gfc_signed_or_unsigned_type.
1997 (gfc_signed_type): Ditto.
1998 * trans-types.h (gfc_signed_or_unsigned_type): Remove.
1999 * f95-lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
2001 2007-03-30 Tobias Schlüter <tobi@gcc.gnu.org>
2003 * symbol.c (gfc_find_gsymbol): Simplify, don't unconditionally
2004 descend into all branches.
2006 2007-03-29 Tobias Schlüter <tobi@gcc.gnu.org>
2008 * intrinsic.c (conv_name): Let gfc_get_string handle the format.
2009 (find_conv): Compare pointers instead of calling strcmp.
2010 (find_sym): Likewise, but ensure that the compared pointer is in
2011 the global string table.
2013 2007-03-28 Tobias Schlüter <tobi@gcc.gnu.org>
2015 * gfc-internals.texi: Fix output filename. Merge type index into
2016 concept index. Start documentation of gfc_code structure.
2018 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
2020 * gfc-internals.texi: New file,
2021 * Make-lang.in: Add rules to convert it to dvi, pdf, and info.
2023 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
2025 * error.c (show_locus): Remove always-false test.
2027 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
2029 * lang.opt: Minor edits to descriptions.
2031 2007-03-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2034 * fortran/interface.c (check_operator_interface): Implement
2035 the standard checks on user operators extending intrinsic operators.
2036 * fortran/resolve.c (resolve_operator): If the ranks of operators
2037 don't match, don't error out but try the user-defined ones first.
2039 2007-03-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2042 * expr.c (check_dimension): Fix logic of comparisons.
2044 2007-03-24 Paul Thomas <pault@gcc.gnu.org>
2047 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Return
2048 int result that is non-zero if the expression is the function
2049 result. Only the characteristics of the result expression
2050 can be used in a procedure interface, so simplify LEN in situ
2051 using its character length.
2055 * trans-expr.c (gfc_conv_function_call): Do not use
2056 gfc_conv_expr_reference for actual pointer function with formal
2057 target because a temporary is created that does not transfer
2058 the reference correctly. Do not indirect formal pointer
2059 functions since it is the function reference that is needed.
2061 2007-03-24 Brooks Moses <brooks.moses@codesourcery.com>
2063 * gfortran.h: Edit comments on GFC_STD_*.
2065 2007-03-23 Brooks Moses <brooks.moses@codesourcery.com>
2067 * invoke.texi: Misc. small typo fixes.
2068 (-Wcharacter-truncation): Add.
2069 (-Wnonstd-intrinsics): Correct spelling.
2071 (-fintrinsic-modules-path): Add.
2073 2007-03-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2076 * arith.c (complex_pow): Rewrite to handle large power.
2077 (gfc_arith_power): Handle large power in the real and integer
2080 2007-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2083 * trans-const.c (gfc_conv_mpz_to_tree): Allow integer constants
2084 larger than twice the width of a HOST_WIDE_INT.
2086 2006-03-22 Paul Thomas <pault@gcc.gnu.org>
2089 * trans-intrinsic.c (gfc_size_in_bytes): Remove function.
2090 (gfc_conv_intrinsic_array_transfer): Remove calls to previous.
2091 Explicitly extract TREE_TYPEs for source and mold. Use these
2092 to calculate length of source and mold, except for characters,
2093 where the se string_length is used. For mold, the TREE_TYPE is
2094 recalculated using gfc_get_character_type_len so that the
2095 result is correctly cast for character literals and substrings.
2096 Do not use gfc_typenode_for_spec for the final cast.
2098 2007-03-22 Tobias Schlüter <tobi@gcc.gnu.org>
2101 * decl.c (gfc_match_derived_decl): Reliably reject
2102 'doubleprecision' and 'doublecomplex' as type names.
2104 2007-03-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2107 * trans-expr.c (gfc_trans_init_string_length): Length should
2109 (gfc_conv_function_call): Likewise.
2111 2007-03-18 Paul Thomas <pault@gcc.gnu.org>
2115 * symbo.c : Add gfc_derived_types.
2116 (gfc_free_dt_list): Free derived type list gfc_derived_types.
2117 (gfc_free_namespace): Remove call to gfc_free_dt_list.
2118 (gfc_symbol_done_2): Call gfc_free_dt_list.
2119 * gfortran.h : Declare gfc_derived_types to be external. Remove
2120 derived types field from gfc_namespace.
2121 * resolve.c (resolve_fl_derived): Refer to gfc_derived types
2122 rather than namespace derived_types.
2123 (resolve_fntype): Remove special treatment for module
2124 derived type functions.
2125 * trans-types.c (gfc_get_derived_type): Remove search for like
2126 derived types. Finish by copying back end declaration to like
2127 derived types in the derived type list gfc_derived_types.
2129 2007-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2132 * trans-expr.c (gfc_conv_powi): Make n argument unsigned hwi.
2133 (gfc_conv_cst_int_power): Handle integer exponent with care,
2134 since it might be too large for us.
2136 2007-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2139 * invoke.texi: Fix typo.
2141 2007-03-16 Tobias Burnus <burnus@net-b.de>
2143 * trans-decl.c (gfc_generate_function_code): Use all arguments of
2146 2007-03-15 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2148 * gfortran.h (gfc_option_t): Add flag_backtrace field.
2149 * lang.opt: Add -fbacktrace option.
2150 * invoke.texi: Document the new option.
2151 * trans-decl.c (gfc_build_builtin_function_decls): Add new
2152 option to the call to set_std.
2153 * options.c (gfc_init_options, gfc_handle_option): Handle the
2156 2007-03-15 Tobias Burnus <burnus@gcc.gnu.org>
2157 Paul Thomas <pault@gcc.gnu.org>
2160 * decl.c (gfc_match_import): If the parent of the current name-
2161 space is null, try looking for an imported symbol in the parent
2162 of the proc_name interface.
2163 * resolve.c (resolve_fl_variable): Do not check for blocking of
2164 host association by a same symbol, if the symbol is in an
2167 2007-03-15 Paul Thomas <pault@gcc.gnu.org>
2170 * decl.c (match_data_constant): Before going on to try to match
2171 a name, try to match a structure component.
2175 * resolve.c (resolve_actual_arglist): Do not reject a generic
2176 actual argument if it has a same name specific interface.
2179 * trans-array.c (parse_interface): Do not nullify allocatable
2180 components if the symbol has the saved attribute.
2182 2007-03-14 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2184 * trans-array.c (gfc_trans_auto_array_allocation): Replace
2185 fold(convert()) by fold_convert().
2186 (gfc_duplicate_allocatable): Likewise.
2187 * trans-intrinsic.c (gfc_conv_intrinsic_dot_product): Use
2188 build_int_cst instead of converting an integer_zero_node
2191 2007-03-14 Jakub Jelinek <jakub@redhat.com>
2193 * module.c (mio_typespec): Don't look at ts->cl if not BT_CHARACTER.
2195 2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
2200 * intrinsics.texi (CHDIR): Fix argument names, note
2201 that STATUS must be a default integer.
2202 (CTIME): Fix argument names, note that RESULT must
2203 be a default integer.
2204 (EXIT): Note that STATUS must be a default integer.
2206 2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
2209 * intrinsic.texi: General whitespace cleanup, remove
2210 comment about missing intrinsics.
2211 (menu): Add lines for new entries listed below.
2212 (ACOSH): Mention specific function DACOSH, correct
2213 description phrasing.
2214 (ASINH): Mention specific function DASINH, correct
2215 description phrasing.
2216 (ATANH): Mention specific function DATANH, correct
2217 description phrasing.
2218 (COS): Add index entry for CCOS.
2219 (CPU_TIME): Correct "REAL" to "REAL(*)".
2220 (EXP): Add index entry for CEXP.
2221 (INT): Correct argument name to "A".
2225 (MAX): Add index entries for specific variants.
2226 (MCLOCK): New entry.
2227 (MCLOCK8): New entry.
2228 (SECNDS): Adjust to a more standard form.
2229 (SECOND): New entry.
2230 (TIME): Add cross-reference to MCLOCK.
2231 (TIME8): Add cross-reference to MCLOCK8.
2233 2007-03-11 Paul Thomas <pault@gcc.gnu.org>
2236 * parse.c (parse_interface): Use the default types from the
2237 formal namespace if a function or its result do not have a type
2238 after parsing the specification statements.
2240 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
2242 * intrinsic.texi: (ICHAR) Improve internal I/O note.
2243 (ACHAR): Reference it.
2244 (CHAR): Reference it.
2245 (IACHAR): Reference it.
2247 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
2249 * intrinsic.texi: (LINK) Document function form.
2255 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
2257 * intrinsic.texi: minor typo fixes, removed prologue.
2258 (FSEEK): moved to correct place in alphabetical order.
2260 2007-03-08 Daniel Franke <franke.daniel@gmail.com>
2263 * check.c (gfc_check_alarm_sub): Added check for default integer
2264 kind of status argument.
2265 * iresolve.c (gfc_resolve_alarm_sub): Removed conversion of
2267 * intrinsic.texi (ALARM): Extended documentation.
2269 2007-03-08 Daniel Franke <franke.daniel@gmail.com>
2271 * intrinsic.texi (GERROR, ISATTY, TTYNAM): New.
2272 (ABORT, FLUSH, FNUM, IRAND, MALLOC, SIGNAL, SRAND): Fixed typo.
2273 * intrinsic.c (add_subroutines): Adjusted dummy argument names
2274 of GERROR and TTYNAM.
2276 2007-07-08 Tobias Burnus <burnus@net-b.de>
2278 * module.c (gfc_match_use): Support renaming of operators
2280 * gfortran.texi (Fortran 2003 Status): Document support of
2281 renaming of operators.
2283 2007-07-08 Tobias Burnus <burnus@net-b.de>
2286 * module.c (read_module): Always import module name as symbol.
2287 (gfc_match_use): Disallow module name in the only clause of
2290 2007-03-08 Paul Thomas <pault@gcc.gnu.org>
2293 * expr.c (find_array_section): Correct arithmetic for section
2296 2007-03-07 Brooks Moses <brooks.moses@codesourcery.com>
2298 * iresolve.c (gfc_resolve_ishftc): Correct s_kind value.
2300 2007-03-06 Daniel Franke <franke.daniel@gmail.com>
2302 PR documentation/30950
2303 * intrinsic.texi (AND, CPU_TIME): Fix dummy argument names.
2304 (FREE): Fix call syntax.
2306 2007-03-06 Brooks Moses <brooks.moses@codesourcery.com>
2308 * intrinsic.texi: Limit column widths to a total of .85.
2310 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
2312 * gfortran.texi (GFortran and G77): Rewrite completely.
2314 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
2316 * match.c (gfc_match_name): Expanded comment.
2318 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
2320 * gfortran.texi (Old-style kind specifications): Document
2321 special handling of old-style kind specifiers for COMPLEX.
2322 * decl.c (gfc_match_old_kind_spec): Document kind/bytesize
2323 assumptions for COMPLEX in comment.
2325 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
2328 * gfortranspec.c (lang_specific_driver): Update program
2329 name and copyright date.
2331 2007-03-03 Paul Thomas <pault@gcc.gnu.org>
2334 * check.c (dim_rank_check): The shape of subsections of
2335 assumed-size arrays is known.
2337 2007-03-02 Paul Thomas <pault@gcc.gnu.org>
2338 Tobias Burnus <burnus@net-b.de>
2341 * decl.c (gfc_match_entry): Remove erroneous entry result check.
2343 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
2345 * Make-lang.in: Add install-pdf target as copied from
2346 automake v1.10 rules.
2348 2007-03-01 Tobias Burnus <burnus@net-b.de>
2351 * trans-intrinsic.c (gfc_conv_intrinsic_size): Compare pointers.
2353 2007-02-28 Tobias Burnus <burnus@net-b.de>
2354 Paul Thomas <pault@gcc.gnu.org>
2358 * resolve.c (resolve_actual_arglist): Allow by-value
2359 arguments and non-default-kind for %VAL().
2360 * trans-expr.c (conv_arglist_function): Allow
2361 non-default-kind for %VAL().
2363 2007-02-28 Tobias Burnus <burnus@net-b.de>
2366 * primary.c (next_string_char): Correct reading a character
2367 after the delimiter.
2368 (match_string_constant): Print warning message only once.
2370 2007-02-27 Richard Guenther <rguenther@suse.de>
2372 * trans-array.c (structure_alloc_comps): Use correct type
2373 for null pointer constant.
2375 2007-02-26 Brooks Moses <brooks.moses@codesourcery.com>
2377 * gfortran.texi: Standardize title page, remove version number
2378 from copyright page.
2380 2007-02-26 Thomas Koenig <Thomas.Koenig@online.de>
2381 Paul Thomas <pault@gcc.gnu.org>
2384 * trans-intrinsic.c (gfc_conv_intrinsic_size):
2385 If dim is an optional argument, check for its
2386 presence and call size0 or size1, respectively.
2388 2007-02-23 Paul Thomas <pault@gcc.gnu.org>
2391 * resolve.c (has_default_initializer): New function.
2392 (resolve_fl_variable): Call has_default_initializer to determine if
2393 the derived type has a default initializer to its ultimate
2397 2007-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2399 * options.c (set_default_std_flags): New function to consolidate
2401 (gfc_init_options): Use new function.
2402 (gfc_handle_option): Use new function.
2404 2007-02-22 Brooks Moses <brooks.moses@codesourcery.com>
2406 * gfortran.texi (Old-style kind specifications): Document
2407 special handling of old-style kind specifiers for COMPLEX.
2408 * decl.c (gfc_match_old_kind_spec): Documented kind/bytesize
2409 assumptions in comment.
2411 2007-02-21 Bernhard Fischer <aldot@gcc.gnu.org>
2413 * parse.c (next_free): Gooble spaces after OpenMP sentinel.
2415 2007-02-20 Thomas Koenig <Thomas.Koenig@online.de>
2418 * match.c (gfc_match_iterator): Remove conflict between
2419 loop variable and pointer.
2421 2007-02-20 Tobias Burnus <burnus@net-b.de>
2424 * symbol.c (gfc_add_volatile): Allow to set VOLATILE
2425 attribute for host-associated variables.
2426 * gfortran.h (symbol_attribute): Save namespace
2427 where VOLATILE has been set.
2428 * trans-decl.c (gfc_finish_var_decl): Move variable
2429 declaration to the top.
2431 2007-02-20 Tobias Burnus <burnus@net-b.de>
2434 * resolve.c (resolve_symbol): Add character dummy VALUE check.
2436 2007-02-19 Thomas Koenig <Thomas.Koenig@online.de>
2439 * fortran/iresolve.c (gfc_resolve_maxloc): Remove coercion of
2440 argument to default integer.
2441 (gfc_resolve_minloc): Likewise.
2443 2007-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2446 * options.c (gfc_init_options): Relax warning level for obsolescent.
2447 * match.c (match_arithmetic_if): Change to obsolescent from deleted.
2448 (gfc_match_if): Same.
2450 2007-02-18 Roger Sayle <roger@eyesopen.com>
2452 * trans-array.c (gfc_build_constant_array_constructor): When the
2453 shape of the constructor is known, use that to construct the
2455 (gfc_trans_constant_array_constructor): Initialize the "info"
2456 information for all of the dimensions of the array constructor.
2457 (constant_array_constructor_loop_size): New function.
2458 (gfc_trans_array_constructor): Use it to determine whether a
2459 loop is suitable for "constant array constructor" optimization.
2461 * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Use fold_build2
2462 instead of build2, to avoid conditions like "(a != b) != 0".
2464 2007-02-18 Roger Sayle <roger@eyesopen.com>
2465 Paul Thomas <pault@gcc.gnu.org>
2468 * match.c (match_forall_iterator): Use gfc_match_expr instead
2469 of gfc_match_variable to match the iterator variable. Return
2470 MATCH_NO if not a variable. Remove the reset of the symbol's
2473 2007-02-16 Tobias Burnus <burnus@net-b.de>
2476 * trans-decl.c (gfc_generate_function_code): Do not initialize
2477 pointers to derived components.
2479 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
2480 Brooks Moses <brooks.moses@codesourcery.com>
2481 Lee Millward <lee.millward@codesourcery.com>
2483 * trans-expr.c (gfc_conv_power_op): Use build_call_expr.
2484 (gfc_conv_string_tmp): Likewise.
2485 (gfc_conv_concat_op): Likewise.
2486 (gfc_build_compare_string): Likewise.
2487 (gfc_conv_function_call): Use build_call_list instead of build3.
2489 * trans-array.c (gfc_trans_allocate_array_storage): Use
2491 (gfc_grow_array): Likewise.
2492 (gfc_trans_array_ctor_element): Likewise.
2493 (gfc_trans_array_constructor_value): Likewise.
2494 (gfc_array_allocate): Likewise.
2495 (gfc_array_deallocate): Likewise.
2496 (gfc_trans_auto_array_allocation): Likewise.
2497 (gfc_trans_dummy_array_bias): Likewise.
2498 (gfc_conv_array_parameter): Likewise.
2499 (gfc_trans_dealloc_allocated): Likewise.
2500 (gfc_duplicate_allocatable): Likewise.
2502 * trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr.
2503 (gfc_trans_omp_flush): Likewise.
2505 * trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr.
2506 (gfc_trans_pause): Likewise.
2507 (gfc_trans_stop): Likewise.
2508 (gfc_trans_character_select): Likewise.
2509 (gfc_do_allocate): Likewise.
2510 (gfc_trans_assign_need_temp): Likewise.
2511 (gfc_trans_pointer_assign_need_temp): Likewise.
2512 (gfc_trans_forall_1): Likewise.
2513 (gfc_trans_where_2): Likewise.
2514 (gfc_trans_allocate): Likewise.
2515 (gfc_trans_deallocate): Likewise.
2517 * trans.c (gfc_trans_runtime_check): Use build_call_expr.
2519 * trans-io.c (gfc_trans_open): Use build_call_expr.
2520 (gfc_trans_close): Likewise.
2521 (build_filepos): Likewise.
2522 (gfc_trans_inquire): Likewise.
2523 (NML_FIRST_ARG): Delete.
2524 (NML_ADD_ARG): Delete.
2525 (transfer_namelist_element): Use build_call_expr.
2526 (build_dt): Likewise.
2527 (gfc_trans_dt_end): Likewise.
2528 (transfer_expr): Likewise.
2529 (transfer_array-desc): Likewise.
2531 * trans-decl.c (gfc_generate_function_code): Use build_call_expr.
2532 (gfc_generate_constructors): Likewise.
2534 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr.
2535 (gfc_conv_intrinsic_fdate): Likewise.
2536 (gfc_conv_intrinsic_ttynam): Likewise.
2537 (gfc_conv_intrinsic_array_transfer): Likewise.
2538 (gfc_conv_associated): Likewise.
2539 (gfc_conv_intrinsic_si_kind): Likewise.
2540 (gfc_conv_intrinsic_trim): Likewise.
2541 (gfc_conv_intrinsic_repeat: Likewise.
2542 (gfc_conv_intrinsic_iargc): Likewise.
2544 2007-02-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2547 * scanner.c (gfc_next_char_literal): Add check for end of file after
2548 call to advance_line.
2550 2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>
2553 * primary.c (match_logical_constant): Return MATCH_ERROR on invalid
2556 2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>
2558 * misc.c (gfc_typename): Fix potential buffer overflow.
2560 2007-02-13 Paul Thomas <pault@gcc.gnu.org>
2563 * module.c (read_module): Set pointer_info to referenced if the
2564 symbol has no namespace.
2566 2007-02-12 Nick Clifton <nickc@redhat.com>
2568 * lang.opt: Add Warning attribute to warning options.
2570 2007-02-11 Daniel Franke <franke.daniel@gmail.com>
2572 * intrinsic.texi (HOSTNM): Fix typographical error in syntax.
2573 (SLEEP): Added section and documentation.
2575 2007-02-11 Tobias Schlüter <tobi@gcc.gnu.org>
2578 * decl.c (add_init_expr_to_sym): Remove ENUM specific code.
2579 (variable_decl): Likewise. Rewrap comment.
2580 (match_attr_spec): Remove ENUM specific code.
2581 (gfc_match_enum): Fix typo in error message.
2582 (enumerator_decl): New function.
2583 (gfc_match_enumerator_def): Use enumerator_decl instead of
2584 variable_decl. Adapt code accordingly.
2586 2007-02-11 Paul Thomas <pault@gcc.gnu.org>
2589 * module.c (find_symtree_for_symbol): New function to return
2590 a symtree that is not a "unique symtree" given a symbol.
2591 (read_module): Do not automatically set pointer_info to
2592 referenced because this inhibits the generation of a unique
2593 symtree. Recycle the existing symtree if possible by calling
2594 find_symtree_for_symbol.
2597 * decl.c (add_init_expr_to_sym): Make new charlen for an array
2598 constructor initializer.
2600 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
2602 * f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address
2603 and __emutls_register_common.
2604 * openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls.
2605 * trans-common.c (build_common_decl): Don't check have_tls.
2606 * trans-decl.c (gfc_finish_var_decl): Likewise.
2607 * types.def (BT_WORD, BT_FN_PTR_PTR): New.
2608 (BT_FN_VOID_PTR_WORD_WORD_PTR): New.
2610 2007-02-09 Tobias Burnus <burnus@net-b.de>
2613 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc,
2614 gfc_conv_intrinsic_minmaxval): Use HUGE-1 for most negative integer.
2616 2007-02-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2619 * trans-array.c (gfc_trans_create_temp_array): Remove use of the
2620 function argument. Always generate code for negative extent.
2622 * trans-array.h (gfc_trans_create_temp_array): Change prototype.
2623 * trans-expr.c (gfc_conv_function_call): Remove use of last argument
2624 of gfc_trans_create_temp_array.
2625 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Likewise.
2626 * trans-stmt.c (gfc_conv_elemental_dependencies): Likewise.
2628 2007-02-08 Roger Sayle <roger@eyesopen.com>
2630 * trans-stmt.c (gfc_trans_forall_1): Optimize the cases where the
2631 mask expression is a compile-time constant (".true." or ".false.").
2633 2007-02-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2636 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Evaluate
2637 arguments only once. Generate check that NCOPIES argument is not
2640 2007-02-04 Steven G. Kargl <kargl@gcc.gnu.org>
2643 * fortran/invoke.texi: Update documentation.
2644 * fortran/options.c (gfc_post_options): Deal with tabs with -std=f2003
2647 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
2649 * trans-array.c: Fix a comment typo.
2651 2007-02-03 Paul Thomas <pault@gcc.gnu.org>
2654 * array.c (match_array_element_spec): If the length of an array is
2655 negative, adjust the upper limit to make it zero length.
2658 * resolve.c (pure_function, resolve_function): Initialize name to
2659 null to clear up build warnings.
2660 (resolve_fl_variable): Look at components explicitly to check for
2661 default initializer, rather than using gfc_default_initializer.
2663 2007-02-02 Steven G. Kargl <kargl@gcc.gnu.org>
2666 * resolve.c (resolve_generic_f): Check for non-NULL sym.
2668 2007-02-02 Roger Sayle <roger@eyesopen.com>
2670 * trans.c (gfc_build_array_ref): Use STRIP_TYPE_NOPS to eliminate
2671 NON_LVALUE_EXPR nodes and useless type conversions.
2673 2007-02-02 Paul Thomas <pault@gcc.gnu.org>
2677 * trans-expr.c (gfc_conv_aliased_arg): Remove static attribute
2678 from function and make sure that substring lengths are
2680 (is_aliased_array): Remove static attribute.
2681 * trans.c : Add prototypes for gfc_conv_aliased_arg and
2683 * trans-io.c (set_internal_unit): Add the post block to the
2684 arguments of the function. Use is_aliased_array to check if
2685 temporary is needed; if so call gfc_conv_aliased_arg.
2686 (build_dt): Pass the post block to set_internal_unit and
2687 add to the block after all io activiy is done.
2689 2007-02-01 Roger Sayle <roger@eyesopen.com>
2691 * trans-array.c (gfc_conv_expr_descriptor): We don't need to use
2692 a temporary array to pass a constant non-character array constructor.
2693 Generalize the descriptor generation code to handle scalarizer
2694 "info" without an array reference.
2696 2007-02-01 Roger Sayle <roger@eyesopen.com>
2698 * dependency.c (gfc_check_dependency) <EXPR_ARRAY>: Implement
2699 dependency checking for array constructors.
2701 2007-02-01 Roger Sayle <roger@eyesopen.com>
2703 * trans-stmt.c (compute_overall_iter_number): Document function
2704 arguments. Generalize "unconditional forall nest with constant
2705 bounds" optimization to eliminate unconditional inner loops with
2708 2007-01-31 Tobias Burnus <burnus@net-b.de>
2711 * interface.c (compare_actual_formal): Check conformance between
2712 actual and VOLATILE dummy arguments.
2713 * symbol.c (gfc_add_volatile): Allow setting of VOLATILE
2714 multiple times in different scopes.
2715 * decl.c (gfc_match_volatile): Search symbol in host association.
2717 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
2719 * simplify.c, trans-array.c: Fix comment typos.
2721 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2723 * invoke.texi (Code Gen Options): Fix abbreviation typo.
2724 * intrinsic.texi (ACCESS, LSHIFT, RSHIFT): Fix typos.
2726 2007-01-30 Steve Ellcey <sje@cup.hp.com>
2729 * trans-types.c (gfc_get_function_type): Do not add void_type_node
2731 * trans-decl.c (create_function_arglist): Change assert.
2733 2007-01-29 Paul Thomas <pault@gcc.gnu.org>
2736 * module.c (read_module): If a symbol is excluded by an ONLY
2737 clause, check to see if there is a symtree already loaded. If
2738 so, attach the symtree to the pointer_info.
2740 2007-01-28 Thomas Koenig <Thomas.Koenig@online.de>
2743 * gfortran.h: Remove gfc_simplify_init_1.
2744 * arith.h: Remove third argument from gfc_compare_string.
2745 * arith.c (gfc_compare_expression): Remove third argument
2746 from call to gfc_compare_string.
2747 (gfc_compare_string): Remove third argument xcoll_table.
2748 Remove use of xcoll_table.
2749 * misc.c (gfc_init_1): Remove call to gfc_simplify_init_1.
2750 * simplify.c (ascii_table): Remove.
2751 (xascii_table): Likewise.
2752 (gfc_simplify_achar): ICE if extract_int fails. Remove use of
2753 ascii_table. Warn if -Wsurprising and value < 0 or > 127.
2754 (gfc_simplify_char): ICE if extract_int fails. Error if
2755 value < 0 or value > 255.
2756 (gfc_simplify_iachar): Remove use of xascii_table.
2757 Char values outside of 0..255 are an ICE.
2758 (gfc_simplify_lge): Remove use of xascii_table.
2759 (gfc_simplify_lgt): Likewise.
2760 (gfc_simplify_lle): Likewise.
2761 (gfc_simplify_llt): Likewise.
2762 (invert_table): Remove.
2763 (gfc_simplify_init_1): Remove.
2765 2007-01-27 Roger Sayle <roger@eyesopen.com>
2767 * trans-stmt.c (forall_info): Replace the next_nest and outer
2768 fields that previously implemented a doubly-linked list with a
2769 single prev_nest field (singly-linked list).
2770 (gfc_trans_nested_forall_loop): The nested_forall_info argument
2771 now denotes the innermost FORALL in the loop nest.
2772 (compute_overall_iter_number): Use prev_nest instead of next_nest.
2773 (gfc_trans_forall_1): Link/cons the new "info" to the head of the
2774 nested_forall_info linked list. Free the current "info" when done.
2776 2007-01-27 Paul Thomas <pault@gcc.gnu.org>
2779 * trans-expr.c (gfc_conv_operator_assign): New function.
2780 * trans.h : Add prototype for gfc_conv_operator_assign.
2781 * trans-stmt.c (gfc_trans_where_assign): Add a gfc_symbol for
2782 a potential operator assignment subroutine. If it is non-NULL
2783 call gfc_conv_operator_assign instead of the first assignment.
2784 ( gfc_trans_where_2): In the case of an operator assignment,
2785 extract the argument expressions from the code for the
2786 subroutine call and pass the symbol to gfc_trans_where_assign.
2787 resolve.c (resolve_where, gfc_resolve_where_code_in_forall,
2788 gfc_resolve_forall_body): Resolve the subroutine call for
2789 operator assignments.
2791 2007-01-26 Steven Bosscher <stevenb.gcc@gmail.com>
2792 Steven G. Kargl <kargl@gcc.gnu.org>
2795 * fortran/io.c (next_char): Deal with backslash escaped characters.
2796 Issue warnings in non -std=gnu cases.
2797 * fortran/primary.c (next_string_char): Issue warnings in non
2799 2007-01-26 Tobias Burnus <burnus@net-b.de>
2801 * lang-specs.h: Add support for .f03 and .F03 extensions.
2802 * gfortran.texi: Document .f03 extension.
2803 * options.c (form_from_filename): Recognize .f03.
2805 2007-01-25 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2808 * lang.opt (Wall): Remove RejectNegative.
2809 * options.c (gfc_handle_option): Wall can be disabled.
2810 (set_Wall): Add a parameter for disabling Wall.
2812 2007-01-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2815 * scanner.c (load_line): Remove check fot ctrl-z and don't gobble.
2817 2007-01-23 Paul Thomas <pault@gcc.gnu.org>
2820 * match.c (gfc_match_namelist): Add check for assumed size character
2821 in namelist and provide error if found.
2823 2007-01-21 Brooks Moses <brooks.moses@codesourcery.com>
2825 * intrinsic.texi (ACHAR): Added cross-references.
2826 (CHAR): Put cross-references in alphabetical order.
2827 (IACHAR): Added cross-references.
2828 (ICHAR): Added cross-references.
2830 2007-01-20 Brooks Moses <brooks.moses@codesourcery.com>
2832 * intrinsic.texi: Edited all "Syntax" examples to a consistent form.
2833 (MAXVAL): Corrected description of result characteristics.
2835 (UMASK): Added documentation.
2837 2007-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
2839 * openmp.c, matchexp.c, module.c, scanner.c, resolve.c, st.c,
2840 parse.c, primary.c, options.c, misc.c, simplify.c: Next installment
2841 in the massive whitespace patch.
2843 2007-01-20 Roger Sayle <roger@eyesopen.com>
2845 * module.c (mio_array_ref): The dimen_type fields of an array ref
2846 are an enumerated type and can't be read/written directly with a
2847 call to mio_integer. Instead loop over and cast each element.
2849 2007-01-20 Roger Sayle <roger@eyesopen.com>
2851 * dependency.c (gfc_full_array_ref_p): Check that ref->next is NULL,
2852 i.e. that the ARRAY_REF doesn't mention components.
2853 * trans-array.c (gfc_constant_array_constructor_p): Export external
2854 function renamed from constant_array_constructor_p.
2855 (gfc_build_constant_array_constructor): Export.
2856 (gfc_trans_array_constructor): Update call to the renamed function
2857 constant_array_constructor_p.
2858 * trans-array.h (gfc_constant_array_constructor_p): Prototype here.
2859 (gfc_build_constant_array_constructor): Likewise.
2860 * trans-expr.c (gfc_build_memcpy_call): New helper function split
2861 out from gfc_trans_array_copy.
2862 (gfc_trans_array_copy): Use gfc_build_memcpy_call.
2863 (gfc_trans_array_constructor_copy): New function to optimize
2864 assigning an entire array from a constant array constructor.
2865 (gfc_trans_assignment): Call gfc_trans_array_constructor_copy
2868 2007-01-20 Roger Sayle <roger@eyesopen.com>
2870 * trans-intrinsic.c (gfc_conv_intrinsic_sign): New branchless
2871 implementation for the SIGN intrinsic with integral operands.
2872 (gfc_conv_intrinsic_minmax): Fix whitespace.
2874 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2876 * gfortran.h (gfc_options_t): Add flag_allow_leading_underscore.
2877 * lang.opt: Add -fallow-leading-underscore.
2878 * match.c (gfc_match_name): Allow leading underscore in symbol
2879 name if -fallow-leading-underscore is used.
2880 * symbol.c (gfc_get_default_type): Add special case for symbol
2881 names beginning with an underscore.
2882 * trans-decl.c (gfc_get_extern_function_decl,
2883 gfc_build_intrinsic_function_decls): Add _gfortran prefix to
2884 library symbols selected_int_kind, selected_real_kind and
2886 * options.c (gfc_init_options, gfc_handle_option): Handle the
2887 new -fallow-leading-underscore option.
2889 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2892 * options.c (gfc_handle_module_path_options): Path used in -J
2893 option is now added to the module search path.
2895 2007-01-20 Richard Guenther <rguenther@suse.de>
2898 * f95-lang.c (gfc_init_builtin_functions): Provide cbrt and
2899 cexpi builtins if we have TARGET_C99_FUNCTIONS. Provide
2900 sincos builtins if the target has sincos.
2902 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
2904 * intrinsic.texi (MATMUL): Corrected a typo.
2905 (MAX): Separated @var arguments.
2906 (MIN): Separated @var arguments.
2908 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
2910 * intrinsic.texi: general whitespace cleanup.
2911 (menu): Added TIME8, removed UNMASK.
2912 (AINT): Clarified argument requirement.
2913 (ANINT): Clarified argument requirement.
2914 (CEILING): Clarified argument requirement.
2915 (CHAR): Clarified argument requirement.
2916 (CMPLX): Clarified argument requirement.
2917 (DCMPLX): Clarified argument requirement.
2918 (FGET): Line rewrapping.
2919 (FLOOR): Clarified argument requirement.
2920 (GMTIME): Added documentation.
2921 (IAND): Added cross-reference.
2922 (IBCLR): Added cross-reference.
2923 (IBSET): Added cross-reference.
2924 (IEOR): Added cross-reference.
2925 (INT): Collapsed examples, clarified argument requirement.
2926 (IOR): Added cross-references.
2927 (LEN_TRIM): Corrected result kind.
2928 (LINK): Added cross-reference.
2929 (LLT): Removed "documentation pending".
2930 (LOGICAL): Added documentation.
2931 (LSHIFT): Added documentation.
2932 (LTIME): Added documentation.
2933 (MATMUL): Added documentation.
2934 (MAX): Added documentation.
2935 (MAXLOC): Added documentation.
2936 (MAXVAL): Added documentation.
2937 (MERGE): Added documentation.
2938 (MIN): Added documentation.
2939 (MINLOC): Added documentation.
2940 (MINVAL): Added documentation.
2941 (MVBITS): Moved to correct place, added documentation.
2942 (NOT): Added documentation.
2943 (PERROR): Added documentation.
2944 (RAN): Moved to correct place, added documentation.
2945 (REAL): Clarified argument requirement.
2946 (RENAME): Added documentation.
2947 (RSHIFT): Clarified argument requirement.
2948 (SIGN): Corrected table specification.
2949 (SYMLNK): Added documentation.
2950 (SYSTEM): Added documentation.
2951 (TIME): Added documentation.
2952 (TIME8): Added section and documentation.
2953 (UNMASK): Removed erroneous section.
2955 2007-01-18 H.J. Lu <hongjiu.lu@intel.com>
2957 * trans-stmt.c (compute_overall_iter_number): Fix a typo.
2959 2007-01-18 Roger Sayle <roger@eyesopen.com>
2961 * trans-expr.c (copyable_array_p): Consider user derived types without
2962 allocatable components to be copyable.
2964 2007-01-18 Roger Sayle <roger@eyesopen.com>
2966 * trans-stmt.c (compute_overall_iter_number): Enhance to precompute
2967 the number of interations in unconditional FORALL nests with constant
2970 2007-01-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2971 Tobias Burnus <burnus@net-b.de>
2974 * gfortran.h (gfc_option_t): Add flag_dump_core.
2975 * lang.opt: Add -fdump-core option.
2976 * invoke.texi: Document the new options.
2977 * trans-decl.c (gfc_build_builtin_function_decls): Add new
2978 options to the call to set_std.
2979 * options.c (gfc_init_options, gfc_handle_option): Set the
2982 2007-01-17 Paul Thomas <pault@gcc.gnu.org>
2985 * module.c (load_generic_interfaces): Make the marking of the
2986 symbol as ambiguous conditional on the module names being
2988 (write_generic): Ensure that the generic interface has a
2989 non-NULL module field.
2991 2007-01-16 Roger Sayle <roger@eyesopen.com>
2994 * trans-stmt.c (forall_info): Remove pmask field.
2995 (gfc_trans_forall_loop): Remove NVAR argument, instead assume that
2996 NVAR covers all the interation variables in the current forall_info.
2997 Add an extra OUTER parameter, which specified the loop header in
2998 which to place mask index initializations.
2999 (gfc_trans_nested_forall_loop): Remove NEST_FLAG argument.
3000 Change the semantics of MASK_FLAG to only control the mask in the
3002 (compute_overall_iter_number): Optimize the trivial case of a
3003 top-level loop having a constant number of iterations. Update
3004 call to gfc_trans_nested_forall_loop. Calculate the number of
3005 times the inner loop will be executed, not to size of the
3007 (allocate_temp_for_forall_nest_1): Reuse SIZE as BYTESIZE when
3008 sizeof(type) == 1. Tidy up.
3009 (gfc_trans_assign_need_temp): Remove NEST_FLAG argument from calls
3010 to gfc_trans_nested_forall_loop.
3011 (gfc_trans_pointer_assign_need_temp): Likewise.
3012 (gfc_trans_forall_1): Remove unused BYTESIZE, TMPVAR, SIZEVAR and
3013 LENVAR local variables. Split mask allocation into a separate
3014 hunk/pass from mask population. Use allocate_temp_for_forall_nest
3015 to allocate the FORALL mask with the correct size. Update calls
3016 to gfc_trans_nested_forall_loop.
3017 (gfc_evaluate_where_mask): Update call to
3018 gfc_trans_nested_forall_loop.
3019 (gfc_trans_where_2): Likewise.
3021 2007-01-15 Paul Thomas <pault@gcc.gnu.org>
3024 * trans-stmt.c (gfc_trans_call): If it does not have one, get
3025 a backend_decl for an alternate return.
3028 * resolve.c (pure_function): Statement functions are pure. Note
3029 that this will have to recurse to comply fully with F95.
3032 * resolve.c (resolve_function): Only a reference to the final
3033 dimension of an assumed size array is an error in an inquiry
3037 * resolve.c (resolve_function): Make sure that the function
3038 expression has a type.
3040 2007-01-14 Paul Thomas <pault@gcc.gnu.org>
3043 * trans-decl.c (gfc_sym_mangled_function_id): Module, external
3044 symbols must not have the module name prepended.
3046 2007-01-11 Thomas Koenig <Thomas.Koenig@online.de>
3049 * iresolve.c (gfc_resolve_maxloc): If the rank
3050 of the return array is nonzero and we process an
3051 integer array smaller than default kind, coerce
3052 the array to default integer.
3053 * iresolve.c (gfc_resolve_minloc): Likewise.
3055 2007-01-11 Brooks Moses <brooks.moses@codesourcery.com>
3057 * simplify.c: Update copyright to 2007.
3060 2007-01-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3063 * scanner.c (gfc_release_include_path): Free gfc_option.module_dir
3066 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
3068 * simplify.c (gfc_simplify_ibclr): Fix POS comparison.
3069 (gfc_simplify_ibset): Same.
3071 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
3075 * simplify.c (convert_mpz_to_unsigned): New function.
3076 (convert_mpz_to_signed): New function, largely based on
3078 (twos_complement): Removed.
3079 (gfc_simplify_ibclr): Add conversions to and from an
3080 unsigned representation before bit-twiddling.
3081 (gfc_simplify_ibset): Same.
3082 (gfc_simplify_ishftc): Add checks for overly large
3083 constant arguments, only check the third argument if
3084 it's present, carry over high bits into the result as
3085 appropriate, and perform the final conversion back to
3086 a signed representation using the correct sign bit.
3087 (gfc_simplify_not): Removed unnecessary masking.
3089 2007-01-09 Paul Thomas <pault@gcc.gnu.org>
3092 * resolve.c (resolve_code): Use the code->expr character length
3093 directly to set length of llen.
3095 2007-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3098 * lang.opt: Add Wcharacter_truncation option.
3099 * options.c (gfc_init_options): Initialize
3100 gfc_option.warn_character_truncation to zero.
3101 (gfc_handle_option): Add case for OPT_Wcharacter_truncation.
3103 2007-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
3105 * interface.c, intrinsic.c, gfortranspec.c, io.c, f95-lang.c,
3106 iresolve.c, match.c: Update Copyright years. Whitespace.
3108 2007-01-08 Richard Guenther <rguenther@suse.de>
3110 * trans-io.c (transfer_array_desc): Use build_int_cst instead
3113 2007-01-08 Roger Sayle <roger@eyesopen.com>
3115 * trans-array.c (constant_array_constructor_p): New function to
3116 determine whether an array constructor consists only of constant
3117 elements, and if so return it's size.
3118 (gfc_build_constant_array_constructor): Construct a statically
3119 initialized gfortran array for a given EXPR_ARRAY.
3120 (gfc_trans_constant_array_constructor): Efficiently scalarize
3121 a constant array constructor.
3122 (gfc_trans_array_constructor): Tidy up use of CONST_STRING.
3123 Special case scalarization of constant array constructors, all of
3124 whose elements are specified, using constant_array_constructor_p
3125 and gfc_trans_constant_array_constructor.
3126 (gfc_conv_scalarized_array_ref): Check whetger info->offset is zero
3127 before adding it to index, to avoid creating a NON_LVALUE_EXPR.
3129 2007-01-08 Kazu Hirata <kazu@codesourcery.com>
3131 gfortran.texi: Fix typos.
3133 2007-01-07 Steven G. Kargl <kargl@gcc.gnu.org>
3135 * decl.c, dump-parse-tree.c, error.c, data.c, expr.c, dependency.c,
3136 convert.c: Update Copyright dates. Fix whitespace.
3138 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
3140 * data.c (gfc_assign_data_value): Fix whitespace.
3142 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
3144 * trans-array.c (gfc_trans_create_temp_array, gfc_array_init_size):
3145 Commentary typo fix.
3147 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
3150 * match.c (gfc_match_name): Print diagnostics for invalid
3153 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
3155 * array.c: Fix whitespace in comment table.
3157 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
3159 * array.c, bbt.c, check.c: Update copyright years. Whitespace.
3161 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
3163 * arith.c: Update copyright years. Whitespace.
3165 2007-01-05 Roger Sayle <roger@eyesopen.com>
3167 * trans-expr.c (gfc_trans_assignment_1): New subroutine to scalarize
3168 array assignments split out from gfc_trans_assignment.
3169 (gfc_trans_array_copy): New function to implement array to array
3170 copies via calls to __builtin_memcpy.
3171 (copyable_array_p): New helper function to identify an array of
3172 simple/POD types, that may be copied/assigned using memcpy.
3173 (gfc_trans_assignment): Use gfc_trans_array_copy to handle simple
3174 whole array assignments considered suitable by copyable_array_p.
3175 Invoke gfc_trans_assignment_1 to perform the fallback scalarization.
3177 2007-01-05 Roger Sayle <roger@eyesopen.com>
3179 * trans-array.c (gfc_trans_array_constructor_value): Make the
3180 static const "data" array as TREE_READONLY.
3181 * trans-stmt.c (gfc_trans_character_select): Likewise.
3183 2007-01-05 Roger Sayle <roger@eyesopen.com>
3185 * trans-array.c (gfc_conv_loop_setup): Test whether the loop
3186 stride is one, to avoid fold_build2 introducing a useless
3187 NON_LVALUE_EXPR node.
3189 2007-01-05 Tobias Burnus <burnus@net-b.de>
3191 * symbol.c (check_conflict): Fix error message.
3193 2007-01-05 Paul Thomas <pault@gcc.gnu.org>
3196 * decl.c (gfc_in_match_data, gfc_set_in_match_data): New
3197 functions to signal that a DATA statement is being matched.
3198 (gfc_match_data): Call gfc_set_in_match_data on entry and on
3200 * gfortran.h : Add prototypes for above.
3201 * expr.c (check_init_expr): Avoid check on parameter or
3202 variable if gfc_in_match_data is true.
3203 (gfc_match_init_expr): Do not call error on non-reduction of
3204 expression if gfc_in_match_data is true.
3208 * decl.c (gfc_set_constant_character_len): Add boolean arg to
3209 flag array constructor resolution. Warn if string is being
3210 truncated. Standard dependent error if string is padded. Set
3211 new arg to false for all three calls to
3212 gfc_set_constant_character_len.
3213 * match.h : Add boolean arg to prototype for
3214 gfc_set_constant_character_len.
3215 * gfortran.h : Add warn_character_truncation to gfc_options.
3216 * options.c (set_Wall): Set warn_character_truncation if -Wall
3218 * resolve.c (resolve_code): Warn if rhs string in character
3219 assignment has to be truncated.
3220 * array.c (gfc_resolve_character_array_constructor): Set new
3221 argument to true for call to gfc_set_constant_character_len.
3223 2007-01-05 Tobias Burnus <burnus@net-b.de>
3226 * interface.c (compare_parameter_intent): New function.
3227 (check_intents): Support pointer intents.
3228 * symbol.c (check_conflict): Support pointer intents,
3229 better conflict_std message.
3230 * expr.c (gfc_check_assign,gfc_check_pointer_assign):
3231 Support pointer intents.
3232 * resolve.c (resolve_deallocate_expr,resolve_allocate_expr):
3233 Support pointer intents.
3235 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3238 * check.c (gfc_check_kill_sub): Add checks for non-scalar
3241 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
3243 * intrinsic.texi: Minor cleanup, reflowing overlong
3244 paragraphs, and correcting whitespace.
3246 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
3248 * intrinsic.texi (LBOUND): Add documentation.
3249 (LGE): Add documentation.
3250 (LGT): Add documentation.
3251 (LINK): Add documentation.
3252 (LLE): Add documentation.
3253 (LLT): Add documentation.
3254 (LNBLNK): Add documentation.
3255 (UBOUND): Add documentation.
3256 (UNLINK): Add documentation.
3258 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
3260 * intrinsic.texi (IAND): Clarify argument specifications.
3261 (IBCLR): Add documentation.
3262 (IBITS): Add documentation.
3263 (IBSET): Add documentation.
3264 (IEOR): Add documentation.
3265 (IERRNO): Add documentation.
3266 (INDEX): Add documentation.
3267 (IOR): Add documentation.
3268 (ISHFT): Add documentation.
3269 (ISHFTC): Add documentation.
3270 (KILL): Add documentation.
3271 (LEN_TRIM): Add documentation.
3273 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
3276 * interface.c (compare_actual_formal): check for
3277 alternate returns when iterating over non-present
3280 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
3282 * invoke.texi: Update manpage copyright to include 2007.
3284 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
3286 * gfortran.texi: Update copyright to include 2007.
3287 * intrinsic.texi: Update copyright to include 2007.
3288 * invoke.texi: Update copyright to include 2007.
3290 2007-01-02 Tobias Burnus <burnus@net-b.de>
3291 Jakub Jelinek <jakub@redhat.com>
3294 * scanner.c (open_included_file): Revert patch.
3295 (gfc_open_included_file): Support absolute pathnames.
3296 (gfc_open_intrinsic_module): Support absolute pathnames.
3298 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3300 * gfortran.texi (GNU Fortran and GCC): Rewrite
3302 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3304 * gfortran.texi (Introduction): Lower "Part I:
3305 Introduction" to a chapter, renumber Parts II and III to
3307 * intrinsic.texi (Introduction): Rename to "Introduction
3308 to Intrinsics" to avoid conflict with the new chapter.
3310 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3312 * intrinsic.texi (Introduction): Rewrite first paragraph.
3314 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3316 * invoke.texi (OpenMP): Added index entry.
3317 * gfortran.texi (title page): Removed erroneous '*'.
3319 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3321 * gfortran.texi (GFORTRAN_DEFAULT_RECL): Added units
3323 (Extensions): Miscellaneous minor rewriting and copyediting.
3324 (BOZ-literal constants): Renamed from Hexadecimal constants.
3325 (Hollerith constants support): Added explanation and
3326 suggestions for standard-conforming modern equivalents.
3328 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3330 * intrinsic.texi: Improvements to index entries; change
3331 @findex entries to @cindex entries.
3332 * invoke.texi: Standardize and improve index entries.
3333 * gfortran.texi: Fix @code in one index entry.
3335 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3337 * invoke.texi: Change @code-type macros to appropriate
3338 variants (@command, @option, etc.)
3339 * gfortran.texi: Same.
3341 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3343 * intrinsic.texi: Various minor cleanups.
3345 2007-01-02 Steven G. Kargl <kargls@comcast.net>
3347 * trans-intrinsic.c (gfc_conv_intrinsic_ibits): Fix call to
3350 2007-01-02 Tobias Burnus <burnus@net-b.de>
3353 * scanner.c (open_included_file): Support full-path filenames.
3355 2007-01-02 Paul Thomas <pault@gcc.gnu.org>
3358 * interface.c (check_sym_interfaces): Remove call to
3359 resolve_global_procedure.
3360 gfortran.h : Remove prototype for resolve_global_procedure.
3361 resolve.c (resolve_global_procedure): Add static attribute
3362 to function declaration.
3364 2007-01-01 Steven G. Kargl <kargls@comcast.net>
3366 * ChangeLog: Copy to ...
3367 * ChangeLog-2006: here.