1 2007-10-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4 * trans-intrinsic.c (gfc_conv_intrinsic_isnan): Strip NOP_EXPR
5 from the result of build_call_expr.
7 2007-10-29 Paul Thomas <pault@gcc.gnu.org>
13 * trans-array.c (gfc_conv_loop_setup): Send a complete type to
14 gfc_trans_create_temp_array if the temporary is character.
15 * trans-stmt.c (gfc_trans_assign_need_temp): Do likewise for
16 allocate_temp_for_forall_nest.
17 (forall_replace): New function.
18 (forall_replace_symtree): New function.
19 (forall_restore): New function.
20 (forall_restore_symtree): New function.
21 (forall_make_variable_temp): New function.
22 (check_forall_dependencies): New function.
23 (cleanup_forall_symtrees): New function.
24 gfc_trans_forall_1): Add and initialize pre and post blocks.
25 Call check_forall_dependencies to check for all dependencies
26 and either trigger second forall block to copy temporary or
27 copy lval, outside the forall construct and replace all
28 dependent references. After assignment clean-up and coalesce
29 the blocks at the end of the function.
30 * gfortran.h : Add prototypes for gfc_traverse_expr and
32 expr.c (gfc_traverse_expr): New function to traverse expression
33 and visit all subexpressions, under control of a logical flag,
34 a symbol and an integer pointer. The slave function is caller
35 defined and is only called on EXPR_VARIABLE.
36 (expr_set_symbols_referenced): Called by above to set symbols
38 (gfc_expr_set_symbols_referenced): Rework of this function to
39 use two new functions above.
40 * resolve.c (find_forall_index): Rework with gfc_traverse_expr,
42 (forall_index): New function used by previous.
43 * dependency.c (gfc_check_dependency): Use gfc_dep_resolver for
44 all references, not just REF_ARRAY.
45 (gfc_dep_resolver): Correct the logic for substrings so that
46 overlapping arrays are handled correctly.
48 2007-10-28 Tobias Schlüter <tobi@gcc.gnu.org>
51 * module.c (write_symbol): Fix whitespace.
52 (write_symbol0): Walk symtree from left-to-right instead
54 (write_symbol1): Similarly change walk of pointer info tree.
55 (write_module): Insert linebreak.
56 * symbol.c (gfc_traverse_symtree): Change to left-to-right order.
57 (traverse_ns): Likewise.
59 2007-10-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
62 * decl.c (char_len_param_value): Add check for conflicting attributes of
65 2007-10-27 Tobias Burnus <burnus@net-b.de>
68 * lang-specs.h: Support .ftn and .FTN extension, use CPP for .FOR.
69 * options.c (form_from_filename): Support .ftn extension.
70 * gfortran.texi: Document support of .for and .ftn file extension.
72 2007-10-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
75 * intrinsic.h: Add prototypes for four new functions, gfc_check_datan2,
76 gfc_check_dprod, gfc_check_fn_d, and gfc_check_x_yd.
77 * intrinsic.c (add_functions): Add double precision checks for dabs,
78 dacos, dacosh, dasin, dasinh, datan, datanh, datan2, dbesj0, dbesj1,
79 dbesy0, dbesy1, dcos, dcosh, ddim, derf, derfc, dexp, dgamma,
80 dlgama, dlog, dlog10, dmod, dsign, dsin, dsinh, dsqrt, dtan, and dtanh.
82 * check.c (gfc_check_datan2): New function to check for double precision
83 argumants. (gfc_check_dprod, gfc_check_fn_d, and gfc_check_x_yd): Ditto.
85 2007-10-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
87 * invoke.texi: Fix typo in -fmax-errors=.
89 2007-10-26 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
92 * gfortran.texi: Document that there is no logical/integer
93 conversion performed during I/O operations.
95 2007-10-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
98 * resolve.c (resolve_actual_arglist): Fix error message text.
100 2007-10-22 Steven G. Kargl <kargl@gcc.gnu.org>
103 * gfortran.h (gfc_data_value): Change repeat from unsigned int
105 * decl.c(top_val_list): Remove msg variable. Use mpz_t for
107 * resolve.c (values): Change left from unsigned int to mpz_t.
108 (next_data_value): Change for mpz_t.
109 (check_data_variable): Change ??? to FIXME in a comment. Use
111 (resolve_data ): Use "mpz_t left".
113 2007-10-21 Paul Thomas <pault@gcc.gnu.org>
116 * resolve.c (resolve_ordinary_assign): New function that takes
117 the code to resolve an assignment from resolve_code. In
118 addition, it makes a temporary of any vector index, on the
119 lhs, using gfc_get_parentheses.
120 (resolve_code): On EXEC_ASSIGN call the new function.
122 2007-10-20 Tobias Burnus <burnus@net-b.de>
125 * resolve.c (resolve_variable): Check that symbol is in the same
126 namespace as the entry function.
128 2007-10-20 Paul Thomas <pault@gcc.gnu.org>
129 FX Coudert <fxcoudert@gcc.gnu.org>
132 * trans-array.c (gfc_conv_expr_descriptor): For all except
133 indirect references, use gfc_trans_scalar_assign instead of
135 * iresolve.c (check_charlen_present): Separate creation of cl
136 if necessary and add code to treat an EXPR_ARRAY.
137 (gfc_resolve_char_achar): New function.
138 (gfc_resolve_achar, gfc_resolve_char): Call it.
139 (gfc_resolve_transfer): If the MOLD expression does not have a
140 character length expression, get it from a constant length.
142 2007-10-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
145 * simplify.c (gfc_simplify_transfer): Only warn for short transfer when
146 -Wsurprising is given.
147 * invoke.texi: Document revised behavior.
149 2007-10-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
152 * gfortran.texi: Document GFORTRAN_UNBUFFERED_PRECONNECTED
153 environment variable. Delete mention of environment variable
154 GFORTRAN_UNBUFFERED_n.
156 2007-10-18 Paul Thomas <pault@gcc.gnu.org>
159 * resolve.c (check_host_association): Check singly contained
160 namespaces and start search for symbol in current namespace.
162 2007-10-18 Paul Thomas <pault@gcc.gnu.org>
163 Dominique d'Humieres <dominiq@lps.ens.fr>
166 * simplify.c (gfc_simplify_transfer): Return null if the source
167 expression is EXPR_FUNCTION.
169 2007-10-17 Christopher D. Rickett <crickett@lanl.gov>
172 * symbol.c (gen_special_c_interop_ptr): Remove code to create
173 constructor for c_null_ptr and c_null_funptr with value of 0.
174 * expr.c (check_init_expr): Prevent check on constructors for
175 iso_c_binding derived types.
176 * resolve.c (resolve_structure_cons): Verify that the user isn't
177 trying to invoke a structure constructor for one of the
178 iso_c_binding derived types.
180 2007-10-15 Christopher D. Rickett <crickett@lanl.gov>
183 * trans-expr.c (gfc_conv_function_call): Generate code to inline
185 * symbol.c (get_iso_c_sym): Preserve from_intmod and intmod_sym_id
186 attributes in the resolved symbol.
187 * resolve.c (gfc_iso_c_sub_interface): Remove dead code.
189 2007-10-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
192 * trans-io.c (create_dummy_iostat): New function to create a unique
193 dummy variable expression to use with IOSTAT.
194 (gfc_trans_inquire): Use the new function to pass unit number error info
195 to run-time library if a regular IOSTAT variable was not given.
197 2007-10-14 Tobias Burnus <burnus@net-b.de>
200 * trans-array.c (gfc_conv_ss_startstride): Fix dimension check.
201 (gfc_trans_array_bound_check, gfc_conv_array_ref,
202 gfc_conv_ss_startstride): Simplify error message.
203 * resolve.c (check_dimension): Fix dimension-type switch;
204 improve error message.
206 2007-10-13 Tobias Schlüter <tobi@gcc.gnu.org>
207 Paul Thomas <pault@gcc.gnu.org>
211 * trans-array.c (get_array_ctor_var_strlen): Check upper bound for
212 constness instead of lower bound.
213 (get_array_ctor_strlen): Add bounds-checking code.
215 2007-10-12 Paul Thomas <pault@gcc.gnu.org>
218 * resolve.c (resolve_actual_arglist): If the actual argument is
219 ambiguous, then there is an error.
221 2007-10-12 Paul Thomas <pault@gcc.gnu.org>
224 * expr.c (gfc_specification_expr): If a function is not
225 external, intrinsic or pure is an error. Set the symbol pure
226 to prevent repeat errors.
228 2007-10-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
231 * expr.c (find_array_section): Check for constructor constantness.
233 2007-10-08 Tobias Schlüter <tobi@gcc.gnu.org>
236 * resolve.c (gfc_resolve_expr): Fix indentation.
237 (resolve_fl_variable_derived): Rename argument.
238 (resolve_fl_variable): Fix case in message. Clarify logic.
239 Correctly simplify array bounds.
241 2007-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
244 * mathbuiltins.def (GAMMA): Change function name to
245 "tgamma" instad of "gamma".
247 2007-10-07 Tobias Schlüter <tobi@gcc.gnu.org>
250 * expr.c (check_inquiry): Typo fix in error message.
251 (check_init_expr): Same * 3.
252 (check_restricted): Verify that no dummy arguments appear in
253 restricted expressions in ELEMENTAL procedures.
254 * resolve.c (resolve_fl_variable): Exchange order of checks to
257 2007-10-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
260 * simplify.c (range_check): Return gfc_bad_expr if incoming expression
263 2007-10-06 Tobias Schlüter <tobi@gcc.gnu.org>
265 * simplify.c (gfc_simplify_size): Fix typo.
267 2007-10-06 Tobias Schlüter <tobi@gcc.gnu.org>
270 * resolve.c (gfc_find_forall_index): Move towards top,
272 (find_forall_index): ... this. Add check for NULL expr.
273 (resolve_forall_iterators): Verify additional constraint.
274 (resolve_forall): Remove checks obsoleted by new code in
275 resolve_forall_iterators.
277 2007-10-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
279 * gfortran.h (gfc_get_data_variable, gfc_get_data_value,
280 gfc_get_data): Move to decl.c.
281 (global_used): Rename into gfc_global_used.
282 (gfc_formalize_init_value, gfc_get_section_index,
283 gfc_assign_data_value, gfc_assign_data_value_range,
284 gfc_advance_section): Move to data.h.
285 (gfc_set_in_match_data): Remove.
286 * decl.c (gfc_get_data_variable, gfc_get_data_value,
287 gfc_get_data): Move here.
288 (gfc_set_in_match_data): Rename into set_in_match_data.
289 (gfc_match_data): Likewise.
290 (add_global_entry): Rename global_used into gfc_global_used.
291 * data.c: Include data.h.
292 * trans.h (gfc_todo_error): Remove.
293 * trans-array.c (gfc_trans_array_constructor,
294 gfc_conv_ss_startstride, gfc_conv_loop_setup): Change
295 gfc_todo_error into assertions.
296 * resolve.c (resolve_global_procedure): Rename global_used into
298 * parse.c (gfc_global_used, parse_module, add_global_procedure,
299 add_global_program): Likewise.
300 * trans-intrinsic.c (gfc_walk_intrinsic_function): Rename
301 global_used into gfc_global_used.
302 * Make-lang.in: Add dependencies on fortran/data.h.
305 2007-10-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
308 * decl.c (match_char_kind): New function.
309 (match_char_spec): Use match_char_kind.
311 2007-10-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
314 * scanner.c (gfc_advance_line): Call debug_hooks->end_source_file
315 and debug_hooks->start_source_file when appropriate, and set
317 (gfc_define_undef_line): New function.
318 (load_file): Don't error out on #define and #undef lines.
319 * parse.c (next_statement): Call gfc_define_undef_line.
320 (gfc_parse_file): Call debug_hooks->start_source_file and
321 debug_hooks->end_source_file for the main source file if
323 * gfortran.h (gfc_linebuf): Add dbg_emitted field.
324 (gfc_define_undef_line): New prototype.
326 2007-10-04 Tobias Schlüter <tobi@gcc.gnu.org>
329 * resolve.c (resolve_operator): Always copy the type for
330 expressions in parentheses.
332 2007-10-04 Paul Thomas <pault@gcc.gnu.org>
336 * interface.c (check_interface1): Revert patch of 10-02.
338 2007-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
341 * trans-decl.c (build_function_decl): Set "externally_visible"
342 attribute on the MAIN program decl.
344 2007-10-03 Tobias Schlüter <tobi@gcc.gnu.org>
347 * resolve.c (has_default_initializer): Move to top. Make bool.
348 (resolve_common_blocks): Simplify logic. Add case for derived
350 (resolve_fl_variable_derived): Split out from ...
351 (resolve_fl_variable): ... here, while adapting to new h_d_i
354 2007-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
357 * options.c (gfc_post_options): Issue an error when
358 -fwhole-program is used.
360 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
363 * interface.c (check_interface1): Specific procedures are
364 always ambiguous if they have the same name.
366 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
369 * primary.c (gfc_match_rvalue): Make all expressions with array
370 references to structure parameters into variable expressions.
372 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
375 * trans-decl.c (init_intent_out_dt): New function.
376 (gfc_trans_deferred_vars): Remove the code for default
377 initialization of INTENT(OUT) derived types and put it
378 in the new function. Call it earlier than before, so
379 that array offsets and lower bounds are available.
381 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
384 * decl.c (get_proc_name): Return rc if rc is non-zero; ie. if
385 the name is a reference to an ambiguous symbol.
387 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
392 * decl.c : Declare gfc_function_kind_locs and
393 gfc_function_type_locus.
394 (gfc_match_kind_spec): Add second argument kind_expr_only.
395 Store locus before trying to match the expression. If the
396 current state corresponds to a function declaration and there
397 is no match to the expression, read to the parenthesis, return
398 kind = -1, dump the expression and return.
399 (gfc_match_type_spec): Renamed from match_type_spec and all
400 references changed. If an interface or an external function,
401 store the locus, set kind = -1 and return. Otherwise, if kind
402 is already = -1, use gfc_find_symbol to try to find a use
403 associated or imported type.
404 match.h : Prototype for gfc_match_type_spec.
405 * parse.c (match_deferred_characteristics): New function.
406 (parse_spec): If in a function, statement is USE or IMPORT
407 or DERIVED_DECL and the function kind=-1, call
408 match_deferred_characteristics. If kind=-1 at the end of the
409 specification expressions, this is an error.
410 * parse.h : Declare external gfc_function_kind_locs and
411 gfc_function_type_locus.
413 2007-09-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
415 * module.c (mio_expr): Avoid -Wcast-qual warning.
417 2007-09-27 Tobias Schlüter <tobi@gcc.gnu.org>
419 * arith.c (reduce_binary_aa): Fix capitalization.
420 * check.c (gfc_check_dot_product): Likewise.
421 (gfc_check_matmul): Likewise.
422 * expr.c (gfc_check_conformance): Likewise.
423 (gfc_check_assign): Likewise.
424 (gfc_default_initializer): Simplify logic.
425 * trans.c (gfc_msg_bounds): Make const.
426 (gfc_msg_fault): Likewise.
427 (gfc_msg_wrong_return): Likewise.
428 * trans.h: Add const to corresponding extern declarations.
430 2007-09-27 Paul Thomas <pault@gcc.gnu.org>
433 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Allow for the
434 possibility of the optional KIND argument by making arg
435 an array, counting the number of arguments and using arg[0].
437 2007-09-26 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
440 * invoke.texi: Add note to -ffpe-trap option. Fix typos.
442 2007-09-23 Tobias Schlüter <tobi@gcc.gnu.org>
445 * io.c (check_format_string): Move NULL and constant checks into
447 (check_io_constraints): Call gfc_simplify_expr() before calling
448 check_format_string(). Remove NULL and constant checks.
450 2007-09-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
453 * scanner.c, parse.c, gfortran.h: Revert revision 128671.
455 2007-09-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
458 * scanner.c (preprocessor_line): Call linemap_add when exiting
460 (gfc_new_file): Adjust debug code for USE_MAPPED_LOCATION.
462 2007-09-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
465 * trans-types.c (gfc_get_desc_dim_type): Mark artificial
466 variables with TREE_NO_WARNING.
467 (gfc_get_array_descriptor_base): Likewise.
469 2007-09-22 Paul Thomas <pault@gcc.gnu.org>
473 * trans-decl.c (gfc_create_module_variable): Output
474 derived type parameters.
475 * arith.c (gfc_parentheses): Return the argument if
476 it is a constant expression.
477 * primary.c (gfc_match_rvalue): Remove the clearing of
478 the module name and the use_assoc attribute for derived
479 type parameter expressions.
481 2007-09-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
484 * scanner.c (gfc_advance_line): Call debug_hooks->start_source_file
485 and debug_hooks->end_source_file when entering and exiting
487 (gfc_define_undef_line): New function.
488 (load_file): Ignore #define and #undef preprocessor lines
489 while reading source files.
490 * parse.c (next_statement): Handle #define and #undef
492 (gfc_parse_file): Call debug_hooks->start_source_file and
493 debug_hooks->end_source_file for the main source file if
494 requested by the debug format.
495 * gfortran.h (gfc_define_undef_line): Add prototype.
497 2007-09-22 Tobias Burnus <burnus@net-b.de>
500 * scanner.c (skip_free_comments): Warn if !$OMP& is used
501 if no OpenMP directive is to be continued.
503 2007-09-21 Paul Thomas <pault@gcc.gnu.org>
505 *trans-expr.c (gfc_trans_pointer_assignment): Convert array
506 descriptor for subref pointer assignements, rather than using
507 the loop info version.
509 2007-09-21 Tobias Burnus <burnus@net-b.de>
512 * simplify.c (gfc_simplify_transfer): Warn if source size
513 is smaller than result size.
515 2007-09-20 Asher Langton <langton2@llnl.gov>
518 * gfortran.h : Add init_local_* enums and init_flag_* flags to
520 * lang.opt: Add -finit-local-zero, -finit-real, -finit-integer,
521 -finit-character, and -finit-logical flags.
522 * invoke.texi: Document new options.
523 * resolve.c (build_init_assign): New function.
524 (apply_init_assign): Move part of function into build_init_assign.
525 (build_default_init_expr): Build local initializer (-finit-*).
526 (apply_default_init_local): Apply local initializer (-finit-*).
527 (resolve_fl_variable): Try to add local initializer (-finit-*).
528 * options.c (gfc_init_options, gfc_handle_option,
529 gfc_post_options): Handle -finit-local-zero, -finit-real,
530 -finit-integer, -finit-character, and -finit-logical flags.
532 2007-09-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
535 * gfortran.h (symbol_attribute): Add zero_comp field.
536 * symbol.c (gfc_use_derived): Handle case of emtpy derived types.
537 * decl.c (gfc_match_data_decl): Likewise.
538 (gfc_match_derived_decl): Likewise.
539 * module.c (ab_attribute, attr_bits): Add AB_ZERO_COMP member.
540 (mio_symbol_attribute): Write and read AB_ZERO_COMP.
541 * resolve.c (resolve_symbol): Handle case of emtpy derived types.
542 * parse.c (parse_derived): Likewise.
544 2007-09-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
547 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
548 reduce_binary_aa): Call ourselves recursively if an element of
549 the constructor is itself a constant array.
551 2007-09-20 Tobias Schlüter <tobi@gcc.gnu.org>
553 * io.c (resolve_tag_format): New function using code split out
554 and simplified from ...
555 (resolve_tag): ... this function. Simplify logic. Unify
556 IOSTAT, IOLENGTH and SIZE handling.
558 2007-09-20 Christopher D. Rickett <crickett@lanl.gov>
561 * resolve.c (gfc_iso_c_func_interface): Use information from
562 subcomponent if applicable.
564 2007-09-20 Tobias Burnus <burnus@net-b.de>
567 * intrinsic.text: Add documentation of the intrinsic modules.
568 * gfortran.texi: Link to intrinsic-modules section and to
571 2007-09-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
574 * trans-array.c (gfc_conv_ss_startstride): Only perform bounds
575 checking for optional args when they are present.
577 2007-09-18 Tobias Burnus <burnus@net-b.de>
580 * resolve.c (resolve_elemental_actual): Check for conformance
581 of intent out/inout dummies.
583 2007-09-17 Tobias Burnus <burnus@net-b.de>
586 * resolve.c (resolve_symbol): Reject public variable of
587 private derived-types for Fortran 95.
589 2007-09-17 Tobias Burnus <burnus@net-b.de>
591 * resolve.c (resolve_fl_procedure): Allow private dummies
594 2007-09-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
596 * trans-types.c (gfc_get_desc_dim_type): Do not to try
598 (gfc_get_array_descriptor_base): Likewise.
599 (gfc_get_mixed_entry_union): Likewise
600 (gfc_get_derived_type): Set decl location for fields and
603 2007-09-16 Paul Thomas <pault@gcc.gnu.org>
609 * trans.h : Add extra argument to gfc_build_array_ref. Rename
610 gfc_conv_aliased_arg to gfc_conv_subref_array_arg. Move
611 prototype of is_aliased_array to gfortran.h and rename it
612 gfc_is_subref_array. Add field span to lang_decl, add a new
613 decl lang specific flag accessed by GFC_DECL_SUBREF_ARRAY_P
614 and a new type flag GFC_DECL_SUBREF_ARRAY_P.
615 * trans.c (gfc_build_array_ref): Add the new argument, decl.
616 If this is a subreference array pointer, use the lang_decl
617 field 'span' to calculate the offset in bytes and use pointer
618 arithmetic to address the element.
619 * trans-array.c (gfc_conv_scalarized_array_ref,
620 gfc_conv_array_ref): Add the backend declaration as the third
621 field, if it is likely to be a subreference array pointer.
622 (gfc_conv_descriptor_dimension, gfc_trans_array_ctor_element,
623 gfc_trans_array_constructor_element, structure_alloc_comps,
624 gfc_conv_array_index_offset): For all other references to
625 gfc_build_array_ref, set the third argument to NULL.
626 (gfc_get_dataptr_offset): New function.
627 (gfc_conv_expr_descriptor): If the rhs of a pointer assignment
628 is a subreference array, then calculate the offset to the
629 subreference of the first element and set the descriptor data
630 pointer to this, using gfc_get_dataptr_offset.
631 trans-expr.c (gfc_get_expr_charlen): Use the expression for the
632 character length for a character subreference.
633 (gfc_conv_substring, gfc_conv_subref_array_arg): Add NULL for
634 third argument in call to gfc_build_array_ref.
635 (gfc_conv_aliased_arg): Rename to gfc_conv_subref_array_arg.
636 (is_aliased_array): Remove.
637 (gfc_conv_function_call): Change reference to is_aliased_array
638 to gfc_is_subref_array and reference to gfc_conv_aliased_arg to
639 gfc_conv_subref_array_arg.
640 (gfc_trans_pointer_assignment): Add the array element length to
641 the lang_decl 'span' field.
642 * gfortran.h : Add subref_array_pointer to symbol_attribute and
643 add the prototype for gfc_is_subref_array.
644 * trans-stmt.c : Add NULL for third argument in all references
645 to gfc_build_array_ref.
646 * expr.c (gfc_is_subref_array): Renamed is_aliased_array.
647 If this is a subreference array pointer, return true.
648 (gfc_check_pointer_assign): If the rhs is a subreference array,
649 set the lhs subreference_array_pointer attribute.
650 * trans-decl.c (gfc_get_symbol_decl): Allocate the lang_decl
651 field if the symbol is a subreference array pointer and set an
652 initial value of zero for the 'span' field.
653 * trans-io.c (set_internal_unit): Refer to is_subref_array and
654 gfc_conv_subref_array_arg.
655 (nml_get_addr_expr): Add NULL third argument to
657 (gfc_trans_transfer): Use the scalarizer for a subreference
660 2007-09-13 Thomas Koenig <tkoenig@gcc.gnu.org>
662 * iresolve.c (resolve_mask_arg): If a mask is an array
663 expression, convert it to kind=1.
665 2007-09-13 Tobias Burnus <burnus@net-b.de>
668 * expr.c (gfc_check_conformance): Print ranks in the error message.
669 * resolve.c (resolve_elemental_actual): Check also conformance of
670 the actual arguments for elemental functions.
672 2007-09-13 Tobias Burnus <burnus@net-b.de>
674 * symbol.c (gfc_add_elemental,gfc_add_pure,gfc_add_recursive):
675 Allow prefixes only to be specified once.
677 2007-09-13 Tobias Burnus <burnus@net-b.de>
680 * symbol.c (check_conflict): Add conflict of ELEMENTAL with Bind(C).
682 2007-09-12 Tobias Burnus <burnus@net-b.de>
685 * check.c (scalar_check): Move up in the file.
686 (kind_check): Call scalar_check.
687 (dim_check): If optional, do not call nonoptional_check; use
689 (gfc_check_all_any,gfc_check_count,gfc_check_cshift,gfc_check_eoshift,
690 gfc_check_lbound,gfc_check_minloc_maxloc,check_reduction,
691 gfc_check_spread,gfc_check_ubound): Use true/false instead of 0/1
692 for dim_check; honor changed meaning of optional.
693 (gfc_check_int): Replace checks by kind_check.
694 (gfc_check_size): Replace checks by dim_check.
696 2007-09-12 Tobias Burnus <burnus@net-b.de>
700 * symbol.c (check_conflict): Add conflict between INTRINSIC and ENTRY
701 and between BIND(C) and PARAMETER.
703 2007-09-12 Tobias Burnus <burnus@net-b.de>
705 * trans-expr.c (gfc_conv_initializer): Fix expr == NULL check.
707 2007-09-12 Jan Hubicka <jh@suse.cz>
709 * f95-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
711 2007-09-12 Christopher D. Rickett <crickett@lanl.gov>
714 * trans-expr.c (gfc_conv_initializer): Remove unnecessary test for
715 intmod_sym_id and use derived symbol to set new kind of C_NULL_PTR
716 and C_NULL_FUNPTR expressions.
718 2007-09-11 Christopher D. Rickett <crickett@lanl.gov>
721 * trans-expr.c (gfc_trans_structure_assign): Convert component
722 C_NULL_PTR and C_NULL_FUNPTR component initializers to (void *).
723 * trans-types.c (gfc_get_derived_type): Create a backend_decl for
724 the c_address field of C_PTR and C_FUNPTR and ensure initializer
725 is of proper type/kind for (void *).
727 2007-09-11 Jan Hubicka <jh@suse.cz>
729 * f95-lang.c (gfc_expand_function): Kill.
730 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
732 2007-09-08 Tobias Burnus <burnus@net-b.de>
735 * gfortran.texi: Document when CPP is called.
737 * intrinsic.texi (IOR): Fix typos.
739 2007-09-10 Paul Thomas <pault@gcc.gnu.org>
742 * trans-expr.c (copyable_array_p): Add tests that expression
743 is a variable, that it has no subreferences and that it is a
745 (gfc_trans_assignment): Change conditions to suit modifications
748 2007-09-06 Tom Tromey <tromey@redhat.com>
750 * scanner.c (get_file): Update.
752 (gfc_next_char_literal): Use gfc_linebuf_linenum.
753 * f95-lang.c (gfc_init): Update.
754 * gfortran.h (gfc_linebuf_linenum): New macro.
756 2007-09-05 Sandra Loosemore <sandra@codesourcery.com>
758 * trans-decl.c (build_entry_thunks): Use set_cfun.
759 (gfc_generate_function_code): Likewise.
761 2007-09-05 Paul Thomas <pault@gcc.gnu.org>
764 * primary.c (gfc_match_rvalue): Make expressions that refer
765 to derived type parameters that have array references into
766 variable expressions. Remove references to use association
770 * decl.c (add_init_expr_to_sym): Provide assumed character
771 length parameters with the length of the initialization
772 expression, if a constant, or that of the first element of
775 2007-09-04 Janus Weil <jaydub66@gmail.com>
776 Paul Thomas <pault@gcc.gnu.org>
778 * decl.c (match_procedure_decl,match_procedure_in_interface,
779 gfc_match_procedure): Handle PROCEDURE statements.
780 * gfortran.h (struct gfc_symbol): New member "gfc_symbol *interface".
781 (enum gfc_statement): New element "ST_PROCEDURE".
782 (strcut symbol_attribute): New member "unsigned procedure".
783 * interface.c (check_interface0): Extended error checking.
784 * match.h: Add gfc_match_procedure prototype.
785 * parse.c (decode_statement,next_statement,gfc_ascii_statement,
786 parse_derived,parse_interface): Implement PROCEDURE statements.
787 * resolve.c (resolve_symbol): Ditto.
788 * symbol.c (check_conflict): Ditto.
789 (gfc_add_proc): New function for setting the procedure attribute.
790 (copy_formal_args): New function for copying formal argument lists.
792 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
794 * Make-lang.in (gfortranspec.o): Remove SHLIB_MULTILIB.
796 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
798 * gfortranspec.c (lang_specific_driver): Use CONST_CAST2.
799 * options.c (gfc_post_options): Supply a TYPE for CONST_CAST.
800 * parse.c (parse_omp_structured_block): Likewise,
801 * st.c (gfc_free_statement): Likewise,
803 2007-09-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
806 * libgfortran.h: New file.
807 * iso-fortran-env.def: Use macros in the new header instead of
808 hardcoded integer constants.
809 * Make-lang.in (F95_PARSER_OBJS, GFORTRAN_TRANS_DEPS): Add
810 fortran/libgfortran.h.
811 * gfortran.h (GFC_STD_*, GFC_FPE_*, options_convert,
812 ioerror_codes): Remove.
813 * trans.c (ERROR_ALLOCATION): Remove.
814 (gfc_call_malloc, gfc_allocate_with_status,
815 gfc_allocate_array_with_status): Use LIBERROR_ALLOCATION.
816 * trans-types.h (GFC_DTYPE_*): Remove.
817 * trans-decl.c (gfc_generate_function_code): Use
818 GFC_CONVERT_NATIVE instead of CONVERT_NATIVE.
819 * trans-io.c (set_parameter_value, set_parameter_ref): Use
820 LIBERROR_* macros instead of IOERROR_ macros.
821 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use
822 LIBERROR_END and LIBERROR_EOR instead of hardcoded constants.
823 * options.c (gfc_init_options): Use GFC_CONVERT_NATIVE instead of
825 (gfc_handle_option): Use GFC_CONVERT_* macros instead of CONVERT_*.
827 2007-09-02 Steven G. Kargl <kargl@gcc.gnu.org>
829 * invoke.texi: Fix the -frange-checking option entry.
831 2007-09-02 Roger Sayle <roger@eyesopen.com>
833 * decl.c (match_string_p): New helper function to explicitly match
834 a string of characters.
835 (match_attr_spec): Remove no longer needed DECL_COLON from decl_types.
836 Delete decls array and peek_char. Rewrite decl attribute parser to
837 avoid calling gfc_match_strings.
838 * match.c (gfc_match_strings): Delete unused function.
839 * match.h (gfc_match_strings): Delete prototype.
841 2007-09-02 Tobias Schlüuter <tobi@gcc.gnu.org>
843 * dump-parse-tree.c (show_char_const): New function.
844 (gfc_show_expr): Use it.
845 * expr.c (find_substring_ref): Rework to not keep characters
846 dangling beyond end of string.
848 2007-09-02 H.J. Lu <hongjiu.lu@intel.com>
851 * array.c (expand_iterator): Initialize frame.prev.
853 2007-08-31 Tobias Burnus <burnus@net-b.de>
856 * io.c (match_io): Also diagnose extra comma for READ.
858 2007-08-31 Joseph Myers <joseph@codesourcery.com>
860 * intrinsic.texi (LGAMMA): Remove empty @cindex line.
862 2007-08-31 Paul Thomas <pault@gcc.gnu.org>
868 * gfortran.h : Add prototype for gfc_resolve_substring_charlen.
869 * resolve.c (gfc_resolve_substring_charlen): New function.
870 (resolve_ref): Call gfc_resolve_substring_charlen.
871 (gfc_resolve_character_operator): New function.
872 (gfc_resolve_expr): Call the new functions in cases where the
873 character length is missing.
874 * iresolve.c (cshift, eoshift, merge, pack, reshape, spread,
875 transpose, unpack): Call gfc_resolve_substring_charlen for
876 source expressions that are character and have a reference.
877 * trans.h (gfc_trans_init_string_length) Change name to
878 gfc_conv_string_length; modify references in trans-expr.c,
879 trans-array.c and trans-decl.c.
880 * trans-expr.c (gfc_trans_string_length): Handle case of no
882 (gfc_conv_aliased_arg): Remove code for treating substrings
883 and replace with call to gfc_trans_string_length.
884 * trans-array.c (gfc_conv_expr_descriptor): Remove code for
885 treating strings and call gfc_trans_string_length instead.
887 2007-08-30 Tobias Burnus <burnus@net-b.de>
890 * interface.c (check_interface0): Improve error for external procs.
891 (check_sym_interfaces): Fix checking of module procedures.
893 2007-08-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
896 * iresolve.c (gfc_resolve_getarg): Handle non-default integer
898 * check.c (gfc_check_getarg): New function
899 * intrinsic.h: Add prototype for gfc_check_getarg.
900 * intrinsic.c (add_subroutines): Add reference to gfc_check_getarg.
901 * intrinsic.texi (GETARG): Adjust documentation.
903 2007-08-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
904 Tobias Burnus <burnus@gcc.gnu.org>
907 * intrinsic.c (add_functions): Add IS_IOSTAT_END and
908 IS_IOSTAT_EOR intrinsics.
909 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_IOSTAT_END and
910 GFC_ISYM_IS_IOSTAT_EOR.
911 * trans-intrinsic.c (gfc_conv_has_intvalue): New function.
912 (gfc_conv_intrinsic_function): Call gfc_conv_has_intvalue for
913 GFC_ISYM_IS_IOSTAT_END and GFC_ISYM_IS_IOSTAT_EOR.
914 * intrinsic.texi: Add IS_IOSTAT_END and IS_IOSTAT_EOR.
916 2007-08-28 Christopher D. Rickett <crickett@lanl.gov>
919 * decl.c (build_sym): Pass number of identifiers on line to
921 (set_binding_label): Verify that only one identifier given if
922 NAME= specified, even if the given binding label has zero length.
923 (gfc_match_bind_c): Remove declaration for has_name_equals because
924 it hides the static global one that is needed.
926 2007-08-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
928 * trans-array.c (gfc_grow_array): Use gfc_call_realloc.
929 (gfc_array_allocate): Use gfc_allocate_with_status and
930 gfc_allocate_array_with_status.
931 (gfc_array_deallocate): Use gfc_deallocate_with_status.
932 (gfc_trans_dealloc_allocated): Use gfc_deallocate_with_status.
933 * trans-stmt.c (gfc_trans_allocate): Use gfc_allocate_with_status.
934 (gfc_trans_deallocate): Use gfc_deallocate_with_status.
935 * trans.c (gfc_allocate_with_status, gfc_allocate_array_with_status,
936 gfc_deallocate_with_status, gfc_call_realloc): New functions.
937 * trans.h (gfc_allocate_with_status, gfc_allocate_array_with_status,
938 gfc_deallocate_with_status, gfc_call_realloc): New prototypes.
939 (gfor_fndecl_internal_realloc, gfor_fndecl_allocate,
940 gfor_fndecl_allocate_array, gfor_fndecl_deallocate): Remove.
941 * f95-lang.c (gfc_init_builtin_functions): Create decl for
943 * trans-decl.c (gfor_fndecl_internal_realloc,
944 gfor_fndecl_allocate, gfor_fndecl_allocate_array,
945 gfor_fndecl_deallocate): Remove function decls.
946 (gfc_build_builtin_function_decls): Likewise.
948 2007-08-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
951 Revert previous patch.
953 2007-08-28 Jakub Jelinek <jakub@redhat.com>
956 * Make-lang.in (fortran/trans-types.o): Depend on $(FLAGS_H).
957 * trans-types.c: Include flags.h.
958 (gfc_get_nodesc_array_type): Add TYPE_DECL TYPE_NAME with
959 correct bounds and dimensions for packed arrays.
961 2007-08-27 Tobias Burnus <burnus@net-b.de>
963 * simplify.c (gfc_simplify_lgamma): Fix mpfr_lgamma call.
965 2007-08-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
968 * trans-io.c (create_dummy_iostat): New function to create a unique
969 dummy variable expression to use with IOSTAT.
970 (gfc_trans_inquire): Use the new function to pass unit number error info
971 to run-time library if a regular IOSTAT variable was not given.
973 2007-08-26 H.J. Lu <hongjiu.lu@intel.com>
975 * gfortran.h (gfc_isym_id): Add GFC_ISYM_GAMMA and
978 2007-08-26 Asher Langton <langton2@llnl.gov>
979 Tobias Burnus <burnus@net-b.de>
981 * gfortran.h (gfc_option_t): Add flag_recursive.
982 * lang.opt: Add -frecursive option and update -fopenmp.
983 * invoke.texi (-frecursive): Document new option.
984 (-fopenmp,-fno-automatic,-fmax-stack-var-size): Update.
985 * options.c (gfc_init_options, gfc_post_options,
986 gfc_handle_option): Add -frecursive and modify -fopenmp.
987 (gfc_post_options): Add warning for conflicting flags.
989 2007-08-26 Tobias Burnus <burnus@net-b.de>
992 * module.c (mio_symbol_ref,mio_interface_rest): Return pointer_info.
993 (load_operator_interfaces): Support multible loading of an operator.
995 2007-08-26 Tobias Burnus <burnus@net-b.de>
998 * match.c (gfc_match_common): Remove SEQUENCE diagnostics.
999 * resolve.c (resolve_common_blocks): Add SEQUENCE diagnostics;
1000 fix walking through the tree.
1002 2007-08-26 Tobias Burnus <burnus@net-b.de>
1005 * intrinsic.h (gfc_simplify_gamma,gfc_simplify_lgamma,
1006 gfc_resolve_gamma,gfc_resolve_lgamma): New function declations.
1007 * mathbuiltins.def: Define GAMMA and LGAMMA.
1008 * intrinsic.c (add_functions): Add GAMMA, DGAMMA, LGAMMA, ALGAMA
1010 * simplify.c (gfc_simplify_gamma,gfc_simplify_lgamma): New functions.
1011 * iresolve.c (gfc_resolve_gamma,gfc_resolve_lgamma): New functions.
1012 * intrinsic.texi: Add documentation for GAMMA and LGAMMA.
1014 2007-08-26 Tobias Burnus <burnus@net-b.de>
1017 * parse.c (parse_derived): Support empty derived type
1018 definitions for Fortran 2003.
1020 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1022 * trans-openmp.c (gfc_omp_privatize_by_reference): Constify.
1023 * trans.h (gfc_omp_privatize_by_reference): Likewise.
1025 2007-08-24 Tobias Burnus <burnus@net-b.de>
1028 * intrinsic.c (gfc_intrinsic_func_interface): Fix initialization
1031 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1034 * iresolve.c: Don't convert array masks.
1036 2007-08-24 Tobias Burnus <burnus@net-b.de>
1039 * trans-array.c (gfc_conv_expr_descriptor): Copy bounds for
1040 whole-array pointer assignments.
1042 2007-08-23 Jakub Jelinek <jakub@redhat.com>
1044 * decl.c (variable_decl): Don't share charlen structs if
1046 * trans-decl.c (create_function_arglist): Assert
1047 f->sym->ts.cl->backend_decl is NULL instead of unsharing
1048 charlen struct here.
1050 2007-08-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1053 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Remove
1054 runtime error checking.
1056 2007-08-22 Roger Sayle <roger@eyesopen.com>
1057 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1059 * match.c (intrinsic_operators): Delete.
1060 (gfc_match_intrinsic_op): Rewrite matcher to avoid calling
1063 2007-08-22 Christopher D. Rickett <crickett@lanl.gov>
1066 * resolve.c (gfc_iso_c_sub_interface): Remove setting of type and
1067 kind for optional SHAPE parameter of C_F_POINTER.
1069 2007-08-22 Janus Weil <jaydub66@gmail.com>
1071 * decl.c (match_attr_spec): Pass on errors from gfc_match_bind_c.
1072 (gfc_match_bind_c): Bugfix in check for NAME= with abstract interfaces.
1073 (gfc_match_mopdproc): Bugfix to reject module procedures in
1074 abstract interfaces.
1076 2007-08-22 Kai Tietz <kai.tietz@onevision.com>
1078 * f95-lang.c: (gfc_init_decl_processing): Choose sizetype by using
1081 2007-08-21 Paul Brook <paul@codesourcery.com>
1082 Nathan Sidwell <nathan@codesourcery.com>
1083 Mark Mitchell <mark@codesourcery.com>
1084 Joseph Myers <joseph@codesourcery.com>
1086 * gfortranspec.c (lang_specific_driver): Use pkgversion_string.
1087 * Make-lang.in (gfortran.pod): Define BUGURL.
1088 * invoke.texi: Use BUGURL for bug-reporting instructions.
1090 2007-08-19 Roger Sayle <roger@eyesopen.com>
1092 * match.c (intrinsic_operators): Make static.
1093 (gfc_op2string): New function for converting a gfc_intrinsic_op to
1094 to a "const char*", replacing the macro of the same name.
1095 * gfortran.h (intrinsic_operators): Delete prototype.
1096 (gfc_op2string): Replace macro with function prototype.
1098 2007-08-18 Tobias Burnus <burnus@net-b.de>
1100 * gfortran.h (gfc_is_intrinsic_typename): Add declaration.
1101 * symbol.c (gfc_is_intrinsic_typename): New function.
1102 * parse.c (decode_statement): Check for space in ABSTRACT INTERFACE.
1103 (parse_interface): Use gfc_is_intrinsic_typename.
1104 * decl.c (gfc_match_derived_decl): Ditto.
1105 * module.c (gfc_match_use): Use gcc_unreachable() for
1106 INTERFACE_ABSTRACT in switch().
1108 2007-08-18 Roger Sayle <roger@eyesopen.com>
1110 * primary.c (match_logical_constant_string): New function to match
1111 a ".true." or a ".false.".
1112 (match_logical_constant): Use it instead of gfc_match_strings.
1114 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
1115 Janus Weil <jaydub66@gmail.com>
1117 * interface.c (gfc_match_interface,gfc_match_abstract_interface,
1118 gfc_match_end_interface,gfc_add_interface): Add abstract interface.
1119 * dump-parse-tree.c (gfc_show_attr): Ditto.
1120 * gfortran.h (interface_type,symbol_attribute): Ditto.
1121 * module.c (gfc_match_use,ab_attribute,attr_bits,
1122 mio_symbol_attribute): Ditto.
1123 * resolve.c (resolve_function): Ditto.
1125 * parse.c (decode_statement): Ditto.
1126 (parse_interface): Ditto, check for C1203 (name of abstract interface
1127 cannot be the same as an intrinsic type).
1128 * decl.c (gfc_match_bind_c): Check for NAME= with abstract interfaces.
1129 (access_attr_decl): Handle Abstract interfaces.
1131 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
1134 * expr.c (gfc_check_pointer_assign): If the rhs is the
1135 initialization expression for the rhs, there is no error.
1137 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
1140 * trans-array.c (get_array_ctor_strlen): Set the character
1141 length of a zero length array to zero.
1143 2007-08-16 Tobias Burnus <burnus@net-b.de>
1146 * module.c (gfc_match_use): Mark user operators as such.
1147 (find_use_name_n): Distinguish between operators and other symbols.
1148 (find_use_name,number_use_names,mio_namelist,
1149 load_operator_interfaces,load_generic_interfaces,read_module,
1150 write_generic): Update find_use_name_n calls.
1152 2007-08-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1155 * trans.c (gfc_create_var_np): Do not emit warnings for
1156 anonymous variables.
1158 2007-08-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1161 * decl.c (gfc_get_type_attr_spec): Fix whitespace.
1162 (gfc_match_derived_decl): Fix logic.
1164 2007-08-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1167 * trans-intrinsic.c (build_fixbound_expr): Convert to result type
1170 2007-08-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1173 * trans-expr.c (gfc_conv_substring_expr): Only call
1174 gfc_conv_substring if expr->ref is not NULL.
1175 * expr.c (gfc_is_constant_expr): If e->ref is NULL, the substring
1176 expression might be a constant.
1177 (gfc_simplify_expr): Handle missing start and end, as well as
1180 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
1183 * match.c (gfc_match_call): Do not create a new symtree in the
1184 case where the existing symbol is external and not referenced.
1186 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
1189 * decl.c (variable_decl): Check for an imported symbol
1190 by looking for its symtree and testing for the imported
1192 (gfc_match_import): Remove change of symbol's namespace
1193 and set the attribute imported instead.
1194 * symbol.c (gfc_get_sym_tree): It is not an error if a
1196 * gfortran.h : Add the 'imported' to symbol_attribute.
1198 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
1201 * trans-array.c (gfc_conv_array_transpose): Set the offset
1202 of the destination to zero if the loop is zero based.
1204 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1207 * intrinsic.c (add_functions): Add optional KIND argument to ACHAR.
1208 * iresolve.c (gfc_resolve_achar): Handle the KIND argument.
1209 * check.c (gfc_check_achar): Check for the optional KIND argument.
1210 * simplify.c (gfc_simplify_achar): Use KIND argument.
1211 * intrinsic.h (gfc_check_achar, gfc_simplify_achar,
1212 gfc_resolve_achar): Adjust prototypes.
1214 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1218 * trans-expr.c (gfc_conv_function_call): When no formal argument
1219 list is available, we still substitute missing optional arguments.
1220 * check.c (gfc_check_random_seed): Correct the check on the
1221 number of arguments to RANDOM_SEED.
1222 * intrinsic.c (add_subroutines): Add a resolution function to
1224 * iresolve.c (gfc_resolve_random_seed): New function.
1225 * intrinsic.h (gfc_resolve_random_seed): New prototype.
1227 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1230 * error.c (error_uinteger): New function.
1231 (error_integer): Call error_uinteger.
1232 (error_print): Handle %u, %lu, %li and %ld format specifiers.
1233 * interface.c (compare_actual_formal): Use the new %lu specifier.
1235 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1238 * lang.opt (-fmodule-private): New option.
1239 * gfortran.h (gfc_option_t): Add flag_module_private member.
1240 * invoke.texi (-fmodule-private): Document the new option.
1241 * module.c (gfc_check_access): Allow the -fmodule-private option
1242 to modify the default behaviour.
1243 * options.c (gfc_init_options): Initialize flag_module_private.
1244 (gfc_handle_option): Handle -fmodule-private.
1246 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1249 * intrinsic.c (add_functions): Add KIND arguments to COUNT,
1250 IACHAR, ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND
1252 * iresolve.c (gfc_resolve_count): Add kind argument.
1253 (gfc_resolve_iachar): New function.
1254 (gfc_resolve_ichar): Add kind argument.
1255 (gfc_resolve_index_func): Likewise.
1256 (gfc_resolve_lbound): Likewise.
1257 (gfc_resolve_len): Likewise.
1258 (gfc_resolve_len_trim): Likewise.
1259 (gfc_resolve_scan): Likewise.
1260 (gfc_resolve_size): New function.
1261 (gfc_resolve_ubound): Add kind argument.
1262 (gfc_resolve_verify): Likewise.
1263 * trans-decl.c (gfc_get_extern_function_decl): Allow specific
1264 intrinsics to have 4 arguments.
1265 * check.c (gfc_check_count): Add kind argument.
1266 (gfc_check_ichar_iachar): Likewise.
1267 (gfc_check_index): Likewise.
1268 (gfc_check_lbound): Likewise.
1269 (gfc_check_len_lentrim): New function.
1270 (gfc_check_scan): Add kind argument.
1271 (gfc_check_size): Likewise.
1272 (gfc_check_ubound): Likewise.
1273 (gfc_check_verify): Likewise.
1274 * intrinsic.texi: Update documentation for COUNT, IACHAR, ICHAR,
1275 INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND and VERIFY.
1276 * simplify.c (get_kind): Whitespace fix.
1277 (int_expr_with_kind): New function.
1278 (gfc_simplify_iachar): Add kind argument.
1279 (gfc_simplify_iachar): Likewise.
1280 (gfc_simplify_ichar): Likewise.
1281 (gfc_simplify_index): Likewise.
1282 (simplify_bound_dim): Likewise.
1283 (simplify_bound): Likewise.
1284 (gfc_simplify_lbound): Likewise.
1285 (gfc_simplify_len): Likewise.
1286 (gfc_simplify_len_trim): Likewise.
1287 (gfc_simplify_scan): Likewise.
1288 (gfc_simplify_shape): Pass NULL as kind argument to gfc_simplify_size.
1289 (gfc_simplify_size): Add kind argument.
1290 (gfc_simplify_ubound): Likewise.
1291 (gfc_simplify_verify): Likewise.
1292 * intrinsic.h: Update prototypes and add new ones.
1293 * trans-intrinsic.c (gfc_conv_intrinsic_index): Rename into
1294 gfc_conv_intrinsic_index_scan_verify.
1295 (gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove.
1296 (gfc_conv_intrinsic_function): Call
1297 gfc_conv_intrinsic_index_scan_verify to translate the INDEX,
1298 SCAN and VERIFY intrinsics.
1300 2007-08-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1303 * invoke.texi (-fbacktrace): Document the new behaviour.
1305 2007-08-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1308 * trans-array.c (gfc_conv_expr_descriptor): Use
1309 gfc_conv_const_charlen to generate backend_decl of right type.
1310 * trans-expr.c (gfc_conv_expr_op): Use correct return type.
1311 (gfc_build_compare_string): Use int type instead of default
1312 integer kind for single character comparison.
1313 (gfc_conv_aliased_arg): Give backend_decl the right type.
1314 * trans-decl.c (gfc_build_intrinsic_function_decls): Make
1315 compare_string return an int.
1317 2007-08-11 Ian Lance Taylor <iant@google.com>
1319 * f95-lang.c (gfc_get_alias_set): Change return type to
1322 2007-08-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1325 * trans.c (gfc_trans_runtime_check): Reorder arguments and
1326 add extra variable arguments. Hand them to the library function.
1327 * trans.h (gfc_trans_runtime_check): Update prototype.
1328 * trans-array.c (gfc_trans_array_bound_check): Issue more
1329 detailled error messages.
1330 (gfc_conv_array_ref): Likewise.
1331 (gfc_conv_ss_startstride): Likewise.
1332 (gfc_trans_dummy_array_bias): Reorder arguments to
1333 gfc_trans_runtime_check.
1334 * trans-expr.c (gfc_conv_substring): Issue more detailled
1336 (gfc_conv_function_call): Reorder arguments to gfc_trans_runtime_check.
1337 * trans-stmt.c (gfc_trans_goto): Likewise.
1338 * trans-io.c (set_string): Reorder arguments to
1339 gfc_trans_runtime_check and issue a more detailled error message.
1340 * trans-decl.c (gfc_build_builtin_function_decls): Make
1341 runtime_error and runtime_error_at handle a variable number of
1343 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Reorder arguments
1344 to gfc_trans_runtime_check.
1345 (gfc_conv_intrinsic_minmax): Likewise.
1346 (gfc_conv_intrinsic_repeat): Issue more detailled error messages.
1348 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1350 * gfortranspec.c (lang_specific_driver): Use CONST_CAST.
1351 * options.c (gfc_post_options): Likewise.
1352 * parse.c (parse_omp_structured_block): Likewise.
1353 * st.c (gfc_free_statement): Likewise.
1355 2007-08-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1358 * trans-decl.c (gfc_build_builtin_function_decls): Change
1359 prototype for associated.
1360 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert the
1361 result of __builtin_isnan into a boolean.
1362 (gfc_conv_intrinsic_strcmp): Cleanup.
1363 (gfc_conv_associated): Convert the result of the associated
1364 function into a boolean.
1366 2007-08-09 Tobias Burnus <burnus@net-b.de>
1369 * io.c (format_token): Add FMT_ERROR.
1370 (next_char_not_space): Print error/warning when
1371 '\t' are used in format specifications.
1372 (format_lex): Propagate error.
1373 (check_format): Ditto.
1375 2007-08-09 Tobias Burnus <burnus@net-b.de>
1378 * arith.c (arith_error): Point in the error message
1379 to -fno-range-check.
1381 2007-08-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1384 * intrinsic.texi (SIZEOF): Add mention to C_SIZE_T.
1386 2007-08-06 Christopher D. Rickett <crickett@lanl.gov>
1389 * trans-expr.c (gfc_conv_scalar_char_value): Convert the tree and
1390 actual arg expressions for scalar characters passed by-value to
1392 (gfc_conv_function_call): Call gfc_conv_scalar_char_value.
1393 * trans.h: Add prototype for gfc_conv_scalar_char_value.
1394 * trans-decl.c (generate_local_decl): Convert by-value character
1395 dummy args of bind(c) procedures using
1396 gfc_conv_scalar_char_value.
1398 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1401 * iresolve.c (gfc_resolve_alarm_sub): Suffix the subroutine name
1402 with the kind of the STATUS argument.
1404 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1407 * intrinsic.c (add_functions): Fix name of argument to CHDIR.
1409 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1412 * iresolve.c (gfc_resolve_exit): Convert argument to default
1415 2007-08-06 Daniel Franke <franke.daniel@gmail.com>
1417 * resolve.c (derived_pointer): Removed, replaced callers by access
1418 to appropiate attribute bit.
1419 (derived_inaccessable): Shortcut recursion depth.
1420 (resolve_fl_namelist): Fixed checks for private components in namelists.
1422 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1425 * trans.h (gfor_fndecl_string_minmax): New prototype.
1426 * trans-decl.c (gfor_fndecl_string_minmax): New variable.
1427 (gfc_build_intrinsic_function_decls): Create gfor_fndecl_string_minmax.
1428 * check.c (gfc_check_min_max): Allow for character arguments.
1429 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): New function.
1430 (gfc_conv_intrinsic_function): Add special case for MIN and MAX
1431 intrinsics with character arguments.
1432 * simplify.c (simplify_min_max): Add simplification for character
1435 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1438 * invoke.texi: Adjust documentation for option -fsyntax-only.
1440 2007-08-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1441 Tobias Burnus <burnus@gcc.gnu.org>
1444 * intrinsic.h (gfc_check_isnan): Add prototype.
1445 * gfortran.h (gfc_isym_id): Add GFC_ISYM_ISNAN.
1446 * intrinsic.c (add_functions): Add ISNAN intrinsic.
1447 * check.c (gfc_check_isnan): New function.
1448 * trans-intrinsic.c (gfc_conv_intrinsic_isnan): New function.
1449 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_isnan
1451 * intrinsic.texi: Document ISNAN.
1453 2007-08-04 Paul Thomas <pault@gcc.gnu.org>
1456 * symbol.c (get_unique_symtree): Moved from module.c.
1457 * module.c (get_unique_symtree): Moved to symbol.c.
1458 * decl.c (get_proc_name): Transfer the typespec from the local
1459 symbol to the module symbol, in the case that an entry is also
1460 a module procedure. Ensure the local symbol is cleaned up by
1461 pointing to it with a unique symtree.
1463 * dump_parse_tree (gfc_show_code_node): Add EXEC_ASSIGN_CALL.
1465 2008-08-04 Steven G. Kargl <kargl@gcc.gnu.org>
1468 * iresolve.c (gfc_resolve_rrspacing): Convert argument(s) to
1470 (gfc_resolve_scale): Ditto.
1471 (gfc_resolve_set_exponent): Ditto.
1472 (gfc_resolve_spacing): Ditto.
1475 * trans-intrinsic.c (gfc_conv_intrinsic_si_kind,
1476 gfc_conv_intrinsic_sr_kind): Convert the argument(s) to the
1477 expected KIND, and fold the result to the expected KIND.
1479 2007-08-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1482 * f95-lang.c (gfc_init_builtin_functions): Defin builtins for
1483 lround{f,,l} and llround{f,,l}.
1484 * trans-intrinsic.c (build_fix_expr): Generate calls to the
1485 {l,}round{f,,l} functions.
1487 2007-08-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1490 * intrinsic.c (resolve_mask_arg): New function.
1491 (gfc_resolve_maxloc): Use resolve_mask_arg for mask resolution.
1492 (gfc_resolve_maxval): Likewise.
1493 (gfc_resolve_minloc): Likewise.
1494 (gfc_resolve_minval): Likewise.
1495 (gfc_resolve_pack): Likewise.
1496 (gfc_resolve_product): Likewise.
1497 (gfc_resolve_sum): Likewise.
1498 (gfc_resolve_unpack): Likewise.
1500 2007-08-01 Tobias Burnus <burnus@net-b.de>
1503 * match.c (gfc_match_allocate): Better check that STAT is
1506 * check.c (gfc_check_allocated): Reorder checks to improve
1509 2007-08-01 Nick Clifton <nickc@redhat.com>
1511 * arith.c: Change copyright header to refer to version 3 of the
1512 GNU General Public License and to point readers at the COPYING3
1513 file and the FSF's license web page.
1514 * openmp.c, interface.c, intrinsic.c, trans-array.c, trans-expr.c,
1515 symbol.c, iso-fortran-env.def, intrinsic.h, decl.c, trans-array.h,
1516 matchexp.c, dump-parse-tree.c, trans-common.c, array.c,
1517 Make-lang.in, trans-openmp.c, gfortran.h, error.c,
1518 iso-c-binding.def, lang.opt, data.c, trans-const.c, trans-stmt.c,
1519 expr.c, trans-const.h, trans-stmt.h, module.c, trans.c, scanner.c,
1520 trans-types.c, trans.h, gfortranspec.c, trans-types.h,
1521 lang-specs.h, io.c, bbt.c, resolve.c, f95-lang.c, st.c,
1522 iresolve.c, match.c, trans-decl.c, trans-io.c, target-memory.c,
1523 match.h, target-memory.h, parse.c, arith.h, check.c, dependency.c,
1524 parse.h, types.def, convert.c, dependency.h, primary.c,
1525 trans-intrinsic.c, options.c, misc.c, simplify.c: Likewise.
1527 2007-08-01 Daniel Franke <franke.daniel@gmail.com>
1529 * trans-decl.c (generate_local_decl): Emit warning on unused parameter
1530 on "-Wall -Wextra" or "-Wunused-parameter" but not on "-Wall", changed
1531 messages that start with lower case to upper case.
1532 * invoke.texi (-Wparameter-unused): Document differences between gcc
1533 and gfortran regarding this option.
1535 2007-08-01 Daniel Franke <franke.daniel@gmail.com>
1538 * expr.c (check_specification_function): Skip check if no symtree
1541 2007-08-01 Paul Thomas <pault@gcc.gnu.org>
1544 * resolve.c (resolve_entries): Entries declared to be module
1545 procedures must point to the function namespace.
1547 2007-07-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1550 * trans-stmt.c (gfc_trans_return): Convert to correct type.
1552 2007-07-31 Steven G. Kargl <kargl@gcc.gnu.org>
1555 * trans-intrinsic.c (gfc_conv_intrinsic_exponent): Convert to correct
1558 2007-07-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1560 * invoke.texi: Document -fsign-zero flag.
1562 2007-07-29 Paul Thomas <pault@gcc.gnu.org>
1565 * trans-expr.c (gfc_conv_expr_reference): Add block for case of
1566 scalar pointer functions so that NULL result is correctly
1570 * trans-array.c (gfc_trans_array_constructor): On detecting a
1571 multi-dimensional parameter array, set the loop limits.
1573 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
1576 * resolve.c (resolve_fl_parameter): Check for constant shape arrays,
1577 adjusted error message.
1579 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
1581 * invoke.texi: Removed -w from option summary.
1583 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
1586 * intrinsic.texi (IRAND, RAND, RANDOM_NUMBER): Document algorithm
1587 used for random number generator.
1589 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
1591 * gfortran.h, interface.c, resolve.c, symbol.c: Fix comment
1593 * intrinsic.texi, invoke.texi: Fix typos.
1595 2007-07-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1598 * resolve.c (generic_sym): Check for a same symbol and if so, return to
1599 avoid infinite recursion.
1601 2007-07-28 Daniel Franke <franke.daniel@gmail.com>
1606 * gfortran.h (symbol_attribute): Added bits for pointer_comp,
1608 * parse.c (parse_derived): Set pointer_comp/private_comp bits if
1609 the derived type ultimately contains pointer components or private
1611 * module.c (ab_attribute): New values AB_POINTER_COMP, AB_PRIVATE_COMP.
1612 (attr_bits): Added names for new ab_attributes.
1613 (mio_symbol_attribute): Save/restore new attribute bits in modules.
1614 * match.c (gfc_match_namelist): Removed check for namelist objects
1616 * resolve.c (resolve_fl_namelist): Added check for pointer or
1617 private components in nested types. Added check for namelist objects
1620 2007-07-28 Paul Thomas <pault@gcc.gnu.org>
1623 * trans-expr.c (gfc_trans_scalar_assign): Revert to fixed order
1624 for lse and rse pre expressions, for derived types with
1625 allocatable components. Instead, assign the lhs to a temporary
1626 and deallocate after the assignment.
1628 2007-07-28 Janne Blomqvist <jb@gcc.gnu.org>
1631 * trans-stmt.c (gfc_trans_character_select): Replace occurrences
1632 of gfc_c_int_type_node with integer_type_node.
1633 * trans-decl.c (gfc_build_intrinsic_function_decls): Likewise.
1634 (gfc_build_builtin_function_decls): Likewise.
1635 (gfc_generate_function_code): Likewise.
1636 * trans-io.c (gfc_build_io_library_fndecls): Likewise.
1638 2007-07-27 Janne Blomqvist <jb@gcc.gnu.org>
1640 * trans-decl.c (gfc_build_builtin_function_decls): Use existing
1641 gfc_array_index_type rather than creating another typenode for
1642 gfc_index_integer_kind.
1644 2007-07-27 Janne Blomqvist <jb@gcc.gnu.org>
1646 * trans-io.c (gfc_build_io_library_fndecls): Change to use
1647 gfc_array_index_type for array descriptor triplets instead of
1650 2007-07-26 Steven G. Kargl <kargl@gcc.gnu.org>
1653 * resolve.c (resolve_operator): Add INTRINSIC_EQ_OS comparison.
1655 2007-07-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1656 Daniel Franke <franke.daniel@gmail.com>
1659 * primary.c (match_variable): Do not call gfc_add_flavor if symbol has
1660 attribute of ACCESS_PUBLIC or ACCESS_PRIVATE already marked.
1662 2007-07-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1665 * trans-stmt.c (gfc_trans_character_select): Replace the
1666 mechanism with labels by a SWITCH_EXPR.
1667 * trans-decl.c (gfc_build_builtin_function_decls): Change
1668 return type for select_string.
1670 2007-07-27 Paul Thomas <pault@gcc.gnu.org>
1673 * trans-decl.c (gfc_trans_deferred_vars): Set intent(out)
1674 derived types as referenced, if they have the the default
1677 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1679 * gfortran.h (generate_isocbinding_symbol): Constify.
1680 * symbol.c (gen_special_c_interop_ptr, gen_cptr_param,
1681 generate_isocbinding_symbol): Likewise.
1683 2007-07-24 Paul Thomas <pault@gcc.gnu.org>
1687 * trans-expr.c (gfc_conv_function_call): Remove the default
1688 initialization of intent(out) derived types.
1689 * symbol.c (gfc_lval_expr_from_sym): New function.
1690 * matchexp.c (gfc_get_parentheses): Return argument, if it is
1691 character and posseses a ref.
1692 * gfortran.h : Add prototype for gfc_lval_expr_from_sym.
1693 * resolve.c (has_default_initializer): Move higher up in file.
1694 (resolve_code): On detecting an interface assignment, check
1695 if the rhs and the lhs are the same symbol. If this is so,
1696 enclose the rhs in parenetheses to generate a temporary and
1697 prevent any possible aliasing.
1698 (apply_default_init): Remove code making the lval and call
1699 gfc_lval_expr_from_sym instead.
1700 (resolve_operator): Give a parentheses expression a type-
1701 spec if it has no type.
1702 * trans-decl.c (gfc_trans_deferred_vars): Apply the a default
1703 initializer, if any, to an intent(out) derived type, using
1704 gfc_lval_expr_from_sym and gfc_trans_assignment. Check if
1705 the dummy is present.
1707 2007-07-24 Daniel Franke <franke.daniel@gmail.com>
1710 * expr.c (check_init_expr): Simplify matched functions.
1712 2007-07-24 Daniel Franke <franke.daniel@gmail.com>
1715 * intrinsic.c (add_sym): Do not exclude any symbols, even if not part
1716 of the selected standard.
1717 (make generic): Likewise.
1718 (make alias): Likewise, set standard the alias belongs to.
1719 (add_subroutines): Call make_noreturn unconditionally.
1720 (check_intrinsic_standard): Change return value to try.
1721 (gfc_intrinsic_func_interface): Check return value of above function.
1722 (gfc_intrinsic_sub_interface): Likewise.
1724 2007-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1727 * trans-decl.c (generate_function_code): Add argument
1728 for flag_bounds_check to the array for set_options.
1729 * invoke.texi (-fbounds-check): Document new libarary run-time
1732 2007-07-23 Daniel Franke <franke.daniel@gmail.com>
1736 * expr.c (check_transformational): Reject valid transformational
1737 intrinsics to avoid ICE.
1738 (check_inquiry): Report error for assumed character lengths for
1739 all supported standards.
1740 (check_init_expr): Whitespace fix.
1742 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
1746 * decl.c (verify_bind_c_sym): Use the result symbol for functions
1747 with a result clause. Warn if implicitly typed. Verify the type
1748 and rank of the SHAPE argument, if given.
1749 * resolve.c (gfc_iso_c_sub_interface): Use gfc_procedure_use to
1750 check the actual args against the formal, sorting them if
1752 * symbol.c (gen_shape_param): Initialize type of SHAPE param to
1755 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
1758 * trans-decl.c (generate_local_decl): Convert the TREE_TYPE for by
1759 value character dummy args of BIND(C) procedures.
1760 * trans-expr.c (gfc_conv_variable): Do not build address
1761 expression for BT_CHARACTER dummy args.
1763 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
1764 Tobias Burnus <burnus@net-b.de>
1767 * trans-expr.c (gfc_conv_function_call): Handle c_funloc.
1768 * trans-types.c: Add pfunc_type_node.
1769 (gfc_init_types,gfc_typenode_for_spec): Use it.
1770 * resolve.c (gfc_iso_c_func_interface): Fix whitespace and
1771 improve error message.
1773 2007-07-22 Daniel Franke <franke.daniel@gmail.com>
1776 * parse.c (gfc_fixup_sibling_symbols): No replacement of symbols if
1777 the current is a namelist.
1779 2007-07-22 Daniel Franke <franke.daniel@gmail.com>
1785 * gfortran.h (gfc_intrinsic_sym): Changed members elemental, pure,
1786 generic, specific, actual_ok, noreturn into bits of a bitfield,
1787 added bits for inquiry, transformational, conversion.
1788 * check.c (non_init_transformational): Removed, removed all callers.
1789 * intrinsic.c (enum class): New.
1790 (add_sym*): Replaced argument elemetal by enum class. Changed all
1792 (add_functions): Assign appropriate classes to intrinsic functions.
1793 (add_subroutines): Assign appropriate classes to intrinsic subroutines.
1794 (add_conv): Set conversion attribute.
1795 (gfc_init_expr_extensions): Removed, removed all callers.
1796 (gfc_intrinsic_func_interface): Reimplemented check for non-standard
1797 initializatione expressions.
1798 * expr.c (check_specification_function): New.
1799 (gfc_is_constant_expr): Added check for specification functions.
1800 (check_init_expr_arguments): New.
1801 (check_inquiry): Changed return value to MATCH, added checks for
1802 inquiry functions defined by F2003.
1803 (check_transformational): New.
1805 (check_elemental): New.
1806 (check_conversion): New.
1807 (check_init_expr): Call new check functions, add more specific error
1810 2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
1813 * resolve.c (set_name_and_label): Set kind number for character
1814 version of c_f_pointer.
1815 (gfc_iso_c_sub_interface): Set the kind of the SHAPE formal arg to
1816 that of the actual SHAPE arg.
1817 * symbol.c (gen_shape_param): Initialize kind for SHAPE arg.
1819 2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
1822 * symbol.c (generate_isocbinding_symbol): Remove unnecessary
1826 * resolve.c (gfc_iso_c_func_interface): Reject assumed-shape and
1827 deferred-shape arrays as args to C_LOC. Fix bug in testing
1828 character args to C_LOC.
1830 2007-07-21 Lee Millward <lee.millward@gmail.com>
1833 * trans-intrinsic.c (gfc_conv_intrinsic_int): Evaluate all
1834 arguments passed, not just the first one. Adjust code to
1835 refer to "args[0]" instead of "arg" as a result.
1837 2007-07-19 Christopher D. Rickett <crickett@lanl.gov>
1840 * trans-expr.c (gfc_conv_function_call): Inline C_LOC.
1842 2007-07-18 Christopher D. Rickett <crickett@lanl.gov>
1845 * symbol.c (generate_isocbinding_symbol): Fix bug where
1846 ISOCBINDING_FUNPTR was generated for C_LOC instead of the needed
1849 2007-07-17 Janus Weil <jaydub66@gmail.com>
1852 * resolve.c (resolve_fl_namelist): Check for namelist private
1853 components in contained subprograms.
1855 2007-07-17 Paul Thomas <pault@gcc.gnu.org>
1859 * trans-expr.c (gfc_trans_subcomponent_assign): Ensure that
1860 renormalization unity base is done independently of existing
1862 (gfc_trans_scalar_assign): If rhs is not a variable, put
1863 lse->pre after rse->pre to ensure that de-allocation of lhs
1864 occurs after evaluation of rhs.
1866 2007-07-16 Lee Millward <lee.millward@gmail.com>
1871 * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
1872 to operate on a stack allocated array for the intrinsic arguments
1873 instead of creating a TREE_LIST. Add two new parameters for the
1874 array and the number of elements. Update all callers to allocate
1875 an array of the correct length to pass in. Update comment.
1876 (gfc_intrinsic_argument_list_length): New function.
1877 (gfc_conv_intrinsic_conversion): Call it.
1878 (gfc_conv_intrinsic_mnimax): Likewise.
1879 (gfc_conv_intrinsic_merge): Likewise.
1880 (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
1882 (gfc_conv_intrinsic_cmplx): Likewise.
1883 (gfc_conv_intrinsic_ctime): Likewise.
1884 (gfc_covn_intrinsic_fdate): Likewise.
1885 (gfc_conv_intrinsic_ttynam): Likewise.
1886 (gfc_conv_intrinsic_ishftc): Likewise.
1887 (gfc_conv_intrinsic_index): Likewise.
1888 (gfc_conv_intrinsic_scan): Likewise.
1889 (gfc_conv_intrinsic_verify): Likewise.
1890 (gfc_conv_intrinsic_trim): Likewise.
1891 (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
1892 (gfc_conv_intrinsic_exponent): Likewise.
1893 (gfc_conv_intrinsic_bound): Likewise.
1894 (gfc_conv_intrinsic_abs): Likewise.
1895 (gfc_conv_intrinsic_mod): Likewise.
1896 (gfc_conv_intrinsic_sign): Likewise.
1897 (gfc_conv_intrinsic_len): Likewise.
1898 (gfc_conv_intrinsic_adjust): Likewise.
1899 (gfc_conv_intrinsic_si_kind): Likewise.
1901 2007-07-16 Janne Blomqvist <jb@gcc.gnu.org>
1904 * trans-decl.c (gfc_build_builtin_function_decls): Remove
1905 DECL_IS_MALLOC attribute from internal_realloc, thus reverting
1906 part of my 2007-07-03 patch.
1908 2007-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1909 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1912 * gfortran.h (gfc_option_t): Add flag_sign_zero field.
1913 * lang.opt (-fsign-zero): New option.
1914 * trans.h: Rename gfor_fndecl_set_std into gfor_fndecl_set_options.
1915 * trans-decl.c (gfc_build_builtin_function_decls): Build the function
1916 declaration to pass an array containing the options to be used by the
1917 runtime library. (gfc_generate_function_code): Build an array that
1918 contains option values to be passed to the runtime library and the call
1920 * options.c (gfc_init_options): Initialize the flag_sign_zero field.
1921 (gfc_handle_option): Handle the -fsign-zero option.
1923 2007-07-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1926 * trans-array.c (gfc_conv_array_ref): Only evaluate index once.
1928 2007-07-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1931 * iresolve.c (gfc_resolve_mvbits): Convert FROMPOS, LEN and TOPOS
1934 2007-07-14 Thomas Koenig <tkoenig@gcc.gnu.org>
1937 * iresolve.c(gfc_resolve_pack): A scalar mask has
1938 to be kind=4, an array mask with kind<4 is converted
1939 to gfc_default_logical_kind automatically.
1940 (gfc_resolve_unpack): Convert mask to gfc_default_lotical_kind
1943 2007-07-14 Paul Thomas <pault@gcc.gnu.org>
1946 * parse.c (parse_spec): Emit error on unexpected statement
1949 2007-07-13 Daniel Franke <franke.daniel@gmail.com>
1951 * invoke.texi: Unified upper- and lower-case in menus.
1952 (-w, -W): Removed, documented by gcc.
1953 * intrinsic.texi: Unified Class-section entries, added
1954 subroutine/function warning where appropiate.
1956 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
1959 * decl.c (gfc_match_suffix): Removed surplus general error that hides
1960 a more specific message.
1961 * resolve.c (resolve_fl_variable): Reject illegal initializiers only
1962 if not already done.
1963 (resolve_fl_procedure): Added check for initializers of functions.
1965 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
1968 * invoke.texi (-static-libgfortran): Document new option.
1970 2007-07-12 Paul Thomas <pault@gcc.gnu.org>
1974 * module.c (write_generic): Restore patch of 2007-07-10 and use
1975 symbol name if there are no use names.
1977 2007-07-12 Christopher D. Rickett <crickett@lanl.gov>
1980 * decl.c (verify_c_interop_param): Require character string dummy
1981 args to BIND(C) procedures to have length 1.
1982 * resolve.c (resolve_fl_procedure): Modify parameter checking for
1986 * resolve.c (gfc_iso_c_func_interface): Verify that a valid
1987 expression is given as an argument to C_LOC and C_ASSOCIATED.
1988 * trans-io.c (transfer_expr): Add argument for code block. Add
1989 standards check to determine if an error message should be
1990 reported for printing C_PTR or C_FUNPTR.
1991 (transfer_array_component): Update arguments to transfer_expr.
1992 (gfc_trans_transfer): Ditto.
1994 * symbol.c (gen_cptr_param): Fix whitespace.
1996 2007-07-12 Jakub Jelinek <jakub@redhat.com>
1999 * trans.h (GFC_POINTER_TYPE_P): Define.
2000 * trans-types.c (gfc_sym_type): Set it for types on attr->sym.pointer.
2001 * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
2002 if GFC_POINTER_TYPE_P is set on the type.
2004 2007-07-12 Richard Guenther <rguenther@suse.de>
2006 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Convert
2007 arguments to gfc_charlen_type_node.
2008 * trans-io.c (gfc_convert_array_to_string): Convert type
2009 size to gfc_array_index_type.
2011 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
2015 * module.c: Reverted Paul's patch from 2007-07-10.
2017 2007-07-11 Richard Guenther <rguenther@suse.de>
2019 * trans-array.c (gfc_conv_array_parameter): Use correct
2020 types for comparison.
2021 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
2022 correct types for POINTER_PLUS_EXPR.
2023 * trans-stmt.c (gfc_trans_forall_loop): Use correct type
2024 for integer one constant.
2026 2007-07-10 Paul Thomas <pault@gcc.gnu.org>
2029 * resolve.c (is_external_proc): New function. Adds test that
2030 the symbol is not an intrinsic procedure.
2031 * (resolve_function, resolve_call): Replace logical statements
2032 with call to is_external_proc.
2035 * simplify.c (gfc_simplify_transfer): If mold has rank, the
2039 * module.c (write_generic): Write the local name of the
2042 2007-07-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2045 * trans-array.c (gfc_trans_array_constructor): Mark offset field
2046 with TREE_NO_WARNING.
2047 * trans-decl.c (gfc_build_qualified_array): Mark lbound, ubound,
2048 stride and size variables with TREE_NO_WARNING.
2050 2007-07-09 Steven G. Kargl <kargl@gcc.gnu.org>
2052 * trans-decl.c (set_tree_decl_type_code): Remove function.
2053 (generate_local_decl): Remove reference to set_tree_decl_type_code.
2055 2007-07-09 Daniel Franke <franke.daniel@gmail.com>
2058 * trans-decl.c (generate_local_decl) Emit a warning if an unused
2061 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
2064 * module.c (gfc_match_use): Do not set an non-existant
2065 intrinsic operator if a user-defined operator is found.
2067 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
2071 * trans-decl.c (generate_local_decl): Adjusted warning on unused
2072 dummy arguments, tell middle-end not to emit additional warnings.
2074 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
2075 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2078 * gfortran.h (gfc_intrinsic_op): Added INTRINSIC_EQ_OS,
2079 INTRINSIC_NE_OS, INTRINSIC_GT_OS, INTRINSIC_GE_OS,
2080 INTRINSIC_LT_OS and INTRINSIC_LE_OS.
2081 * arith.c (eval_intrinsic, eval_type_intrinsic0): Likewise.
2082 * arith.h (gfc_eq, gfc_ne, gfc_gt, gfc_ge, gfc_lt, gfc_le):
2083 Added gfc_intrinsic_op as third argument type.
2084 * dump-parse-tree.c (gfc_show_expr): Account for new enum values.
2085 * expr.c (simplify_intrinsic_op, check_intrinsic_op): Likewise.
2086 * interface.c (check_operator_interface): Likewise.
2087 (gfc_check_interfaces): Added cross-checks for FORTRAN 77 and
2088 Fortran 90 style operators using new enum values.
2089 (gfc_extend_expr): Likewise.
2090 (gfc_add_interface): Likewise.
2091 * match.c (intrinsic_operators): Distinguish FORTRAN 77 style
2092 operators from Fortran 90 style operators using new enum values.
2093 * matchexp.c (match_level_4): Account for new enum values.
2094 * module.c (mio_expr): Likewise.
2095 * resolve.c (resolve_operator): Deal with new enum values, fix
2096 inconsistent error messages.
2097 * trans-expr.c (gfc_conv_expr_op): Account for new enum values.
2099 2007-07-08 Tobias Burnus <burnus@net-b.de>
2102 * interface.c (get_expr_storage_size): Properly obtain lower bound.
2103 (compare_actual_formal): Add space before parenthesis.
2105 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
2108 * resolve.c (resolve_fl_procedure): Added check for PRIVATE types
2109 in PUBLIC interfaces.
2111 2007-07-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2114 * decl.c (match_attr_spec): Don't return MATCH_ERROR if comma found and
2115 gfc_match_bind_c does not return MATCH_YES.
2117 2007-07-07 Kazu Hirata <kazu@codesourcery.com>
2119 * decl.c, gfortran.h, interface.c, module.c, resolve.c,
2120 trans-array.c, trans-decl.c: Fix comment typos. Follow
2121 spelling conventions.
2122 * intrinsic.texi: Fix typos. Follow spelling conventions.
2124 2007-05-06 Daniel Franke <franke.daniel@gmail.com>
2127 * symbol.c (save_status): New.
2128 * gfortran.h (save_status): Added external declaration.
2129 (check_conflict): Check for conflicting explicite SAVE statements
2131 (gen_special_c_interop_ptr): Use SAVE_EXPLICIT constant.
2132 * module.c (ab_attribute, attr_bits): Removed enumerator value
2133 AB_SAVE for save attribute.
2134 (mio_symbol_attribute): Import/export the full SAVE status,
2135 removed usage of AB_SAVE.
2136 * dump-parse-tree.c (gfc_show_attr): Dump full SAVE status.
2137 * decl.c (add_init_expr_to_sym): Set SAVE_IMPLICIT only if not
2140 2007-07-05 Daniel Franke <franke.daniel@gmail.com>
2141 Tobias Burnus <burnus@net-b.de>
2144 * gfortran.h (symbol_attribute): Change save attribute into an enum.
2145 * decl.c (add_init_expr_to_sym): Set it to SAVE_IMPLICIT.
2146 * symbol.c (gfc_add_save): Check for SAVE_EXPLICIT.
2147 * resolve.c (resolve_fl_variable): Check for SAVE_EXPLICIT.
2148 (resolve_symbol): Allow OMP threadprivate with
2149 initialization SAVEd and save_all variable.
2150 * trans-decl.c (gfc_finish_var_decl): Remove obsolete sym->value check.
2152 2007-07-05 Paul Thomas <pault@gcc.gnu.org>
2155 * match.c (gfc_match_call): Check, in all cases, that a symbol
2156 is neither generic nor a subroutine before trying to add it as
2160 * match.c (gfc_match_do): Reset the implied_index attribute.
2162 2007-07-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2165 * trans-intrinsic.c (trans-intrinsic.c): Handle optional
2166 arguments correctly for MIN and MAX intrinsics.
2168 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2171 * io.c (check_format): Always call gfc_error for errors.
2172 (check_format_string): Change type of this function to try and
2173 return the result of check_format.
2174 (check_io_constraints): Return MATCH_ERROR if check_format_string
2177 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2180 * decl.c (get_proc_name): Include attr->mod_proc in check for error.
2182 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2185 * gfortran.h: Change type of gfc_assign_data_value from void to try.
2186 * data.c (gfc_assign_data_value): Return FAILURE if error found.
2187 * resolve.c (check_data_variable): If gfc_assign_data_value returns
2188 failure, break out of loop and return failure.
2190 2007-07-03 Christopher D. Rickett <crickett@lanl.gov>
2193 * symbol.c (gen_cptr_param): Generate C_PTR and C_FUNPTR if necessary.
2194 (build_formal_args): Pass intrinsic module symbol id to
2197 2007-07-03 Tobias Burnus <burnus@net-b.de>
2200 * resolve.c (resolve_common_blocks): New check function.
2201 (resolve_types): Use it.
2203 2007-07-03 Tobias Burnus <burnus@net-b.de>
2206 * interface.c (get_sym_storage_size): New function.
2207 (get_sym_storage_size): New function.
2208 (compare_actual_formal): Enhance sequence association
2209 support and improve checking.
2211 2007-07-03 Janne Blomqvist <jb@gcc.gnu.org>
2213 * trans-decl.c (gfc_build_builtin_function_decls): Mark
2214 internal_realloc as a malloc function.
2216 2007-07-03 Tobias Burnus <burnus@net-b.de>
2219 * resolve.c (resolve_operator): Check for NULL as operand.
2221 2007-07-02 Tobias Burnus <burnus@net-b.de>
2223 * gfortran.texi (Fortran 2003): Add ISO Bind C.
2224 * intrinsic.texi (C_ASSOCIATED,C_F_POINTER,C_F_PROCPOINTER,
2225 C_FUNLOC,C_LOC): Document new ISO Bind C intrinsics.
2227 2007-07-01 Christopher D. Rickett <crickett@lanl.gov>
2229 * interface.c (gfc_compare_derived_types): Special case for comparing
2230 derived types across namespaces.
2231 (gfc_compare_types): Deal with BT_VOID.
2232 (compare_parameter): Use BT_VOID to accept ISO C Binding pointers.
2233 * trans-expr.c (gfc_conv_function_call): Remove setting parm_kind
2235 (gfc_conv_initializer): Deal with ISO C Binding NULL_PTR and
2237 (gfc_conv_expr): Convert expressions for ISO C Binding derived types.
2238 * symbol.c (gfc_set_default_type): BIND(C) variables should not be
2239 Implicitly declared.
2240 (check_conflict): Add BIND(C) and check for conflicts.
2241 (gfc_add_explicit_interface): Whitespace.
2242 (gfc_add_is_bind_c): New function.
2243 (gfc_copy_attr): Use it.
2244 (gfc_new_symbol): Initialize ISO C Binding objects.
2245 (get_iso_c_binding_dt): New function.
2246 (verify_bind_c_derived_type): Ditto.
2247 (gen_special_c_interop_ptr): Ditto.
2248 (add_formal_arg): Ditto.
2249 (gen_cptr_param): Ditto.
2250 (gen_fptr_param): Ditto.
2251 (gen_shape_param): Ditto.
2252 (add_proc_interface): Ditto.
2253 (build_formal_args): Ditto.
2254 (generate_isocbinding_symbol): Ditto.
2255 (get_iso_c_sym): Ditto.
2256 * decl.c (num_idents_on_line, has_name_equals): New variables.
2257 (verify_c_interop_param): New function.
2258 (build_sym): Finish binding labels and deal with COMMON blocks.
2259 (add_init_expr_to_sym): Check if the initialized expression is
2260 an iso_c_binding named constants
2261 (variable_decl): Set ISO C Binding type_spec components.
2262 (gfc_match_kind_spec): Check match for C interoperable kind.
2263 (match_char_spec): Fix comment. Chnage gfc_match_small_int
2264 to gfc_match_small_int_expr. Check for C interoperable kind.
2265 (match_type_spec): Clear the current binding label.
2266 (match_attr_spec): Add DECL_IS_BIND_C. If BIND(C) is found, use it
2268 (set_binding_label): New function.
2269 (set_com_block_bind_c): Ditto.
2270 (verify_c_interop): Ditto.
2271 (verify_com_block_vars_c_interop): Ditto.
2272 (verify_bind_c_sym): Ditto.
2273 (set_verify_bind_c_sym): Ditto.
2274 (set_verify_bind_c_com_block): Ditto.
2275 (get_bind_c_idents): Ditto.
2276 (gfc_match_bind_c_stmt): Ditto.
2277 (gfc_match_data_decl): Use num_idents_on_line.
2278 (match_result): Deal with right paren in BIND(C).
2279 (gfc_match_suffix): New function.
2280 (gfc_match_function_decl): Use it. Code is re-arranged to deal with
2281 ISO C Binding result clauses.
2282 (gfc_match_subroutine): Deal with BIND(C).
2283 (gfc_match_bind_c): New function.
2284 (gfc_get_type_attr_spec): New function. Code is re-arranged in and
2285 taken from gfc_match_derived_decl.
2286 (gfc_match_derived_decl): Add check for BIND(C).
2287 * trans-common.c: Forward declare gfc_get_common.
2288 (gfc_sym_mangled_common_id): Change arg from 'const char *name' to
2289 'gfc_common_head *com'. Check for ISO C Binding of the common block.
2290 (build_common_decl): 'com->name' to 'com in SET_DECL_ASSEMBLER_NAME.
2291 * gfortran.h: Add GFC_MAX_BINDING_LABEL_LEN
2293 (sym_flavor): Add FL_VOID.
2294 (iso_fortran_env_symbol, iso_c_binding_symbol, intmod_id): New enum
2295 (CInteropKind_t): New struct.
2296 (c_interop_kinds_table): Use it. Declare an array of structs.
2297 (symbol_attribute): Add is_bind_c, is_c_interop, and is_iso_c
2299 (gfc_typespec): Add is_c_interop; is_iso_c, and f90_type members.
2300 (gfc_symbol): Add from_intmod, intmod_sym_id, binding_label, and
2301 common_block members.
2302 (gfc_common_head): Add binding_label and is_bind_c members.
2303 (gfc_gsymbol): Add sym_name, mod_name, and binding_label members.
2304 Add prototypes for get_c_kind, gfc_validate_c_kind,
2305 gfc_check_any_c_kind, gfc_add_is_bind_c, gfc_add_value,
2306 verify_c_interop, verify_c_interop_param, verify_bind_c_sym,
2307 verify_bind_c_derived_type, verify_com_block_vars_c_interop,
2308 generate_isocbinding_symbol, get_iso_c_sym, gfc_iso_c_sub_interface
2309 * iso-c-binding.def: New file. This file contains the definitions
2310 of the types provided by the Fortran 2003 ISO_C_BINDING intrinsic
2312 * trans-const.c (gfc_conv_constant_to_tree): Deal with C_NULL_PTR
2313 or C_NULL_FUNPTR expressions.
2314 * expr.c (gfc_copy_expr): Add BT_VOID case. For BT_CHARACTER, the
2315 ISO C Binding requires a minimum string length of 1 for '\0'.
2316 * module.c (intmod_sym): New struct.
2317 (pointer_info): Add binding_label member.
2318 (write_atom): Set len to 0 for NULL pointers. Check for NULL p and *p.
2319 (ab_attribute): Add AB_IS_BIND_C, AB_IS_C_INTEROP and AB_IS_ISO_C.
2320 (attr_bits): Add "IS_BIND_C", "IS_C_INTEROP", and "IS_ISO_C".
2321 (mio_symbol_attribute): Deal with ISO C Binding attributes.
2322 (bt_types): Add "VOID".
2323 (mio_typespec): Deal with ISO C Binding components.
2324 (mio_namespace_ref): Add intmod variable.
2325 (mio_symbol): Check for symbols from an intrinsic module.
2326 (load_commons): Check for BIND(C) common block.
2327 (read_module): Read binding_label and use it.
2328 (write_common): Add label. Write BIND(C) info.
2329 (write_blank_common): Blank commons are not BIND(C). Explicitly
2331 (write_symbol): Deal with binding_label.
2332 (sort_iso_c_rename_list): New function.
2333 (import_iso_c_binding_module): Ditto.
2334 (create_int_parameter): Add to args.
2335 (use_iso_fortran_env_module): Adjust to deal with iso_c_binding
2337 * trans-types.c (c_interop_kinds_table): new array of structs.
2338 (gfc_validate_c_kind): New function.
2339 (gfc_check_any_c_kind): Ditto.
2340 (get_real_kind_from_node): Ditto.
2341 (get_int_kind_from_node): Ditto.
2342 (get_int_kind_from_width): Ditto.
2343 (get_int_kind_from_minimal_width): Ditto.
2344 (init_c_interop_kinds): Ditto.
2345 (gfc_init_kinds): call init_c_interop_kinds.
2346 (gfc_typenode_for_spec): Adjust for BT_VOID and ISO C Binding pointers.
2347 Adjust handling of BT_DERIVED.
2348 (gfc_sym_type): Whitespace.
2349 (gfc_get_derived_type): Account for iso_c_binding derived types
2350 * resolve.c (is_scalar_expr_ptr): New function.
2351 (gfc_iso_c_func_interface): Ditto.
2352 (resolve_function): Use gfc_iso_c_func_interface.
2353 (set_name_and_label): New function.
2354 (gfc_iso_c_sub_interface): Ditto.
2355 (resolve_specific_s0): Use gfc_iso_c_sub_interface.
2356 (resolve_bind_c_comms): New function.
2357 (resolve_bind_c_derived_types): Ditto.
2358 (gfc_verify_binding_labels): Ditto.
2359 (resolve_fl_procedure): Check for ISO C interoperability.
2360 (resolve_symbol): Check C interoperability.
2361 (resolve_types): Walk the namespace. Check COMMON blocks.
2362 * trans-decl.c (gfc_sym_mangled_identifier): Prevent the mangling
2363 of identifiers that have an assigned binding label.
2364 (gfc_sym_mangled_function_id): Use the binding label rather than
2366 (gfc_finish_var_decl): Put variables that are BIND(C) into a common
2367 segment of the object file, because this is what C would do.
2368 (gfc_create_module_variable): Conver to proper types
2369 (set_tree_decl_type_code): New function.
2370 (generate_local_decl): Check dummy variables and derived types for
2371 ISO C Binding attributes.
2372 * match.c (gfc_match_small_int_expr): New function.
2373 (gfc_match_name_C): Ditto.
2374 (match_common_name): Deal with ISO C Binding in COMMON blocks
2375 * trans-io.c (transfer_expr): Deal with C_NULL_PTR or C_NULL_FUNPTR
2377 * match.h: Add prototypes for gfc_match_small_int_expr,
2378 gfc_match_name_C, match_common_name, set_com_block_bind_c,
2379 set_binding_label, set_verify_bind_c_sym,
2380 set_verify_bind_c_com_block, get_bind_c_idents,
2381 gfc_match_bind_c_stmt, gfc_match_suffix, gfc_match_bind_c,
2382 gfc_get_type_attr_spec
2383 * parse.c (decode_statement): Use gfc_match_bind_c_stmt
2384 (parse_derived): Init *derived_sym = NULL, and gfc_current_block
2385 later for valiadation.
2386 * primary.c (got_delim): Set ISO C Binding components of ts.
2387 (match_logical_constant): Ditto.
2388 (match_complex_constant): Ditto.
2389 (match_complex_constant): Ditto.
2390 (gfc_match_rvalue): Check for existence of at least one arg for
2391 C_LOC, C_FUNLOC, and C_ASSOCIATED.
2392 * misc.c (gfc_clear_ts): Clear ISO C Bindoing components in ts.
2393 (get_c_kind): New function.
2395 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
2398 * trans-expr.c (gfc_conv_power_op): Use builtin_powi for
2400 * f95-lang.c (gfc_init_builtin_functions): Add builtin_powi to the
2403 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
2405 * trans.h: Remove decls for 64-bit allocation functions.
2406 * trans-array.c (gfc_grow_array): Always pick the standard realloc
2408 (gfc_array_allocate): Likewise.
2409 * trans-decl.c: Remove trees for 64-bit allocation functions.
2410 (gfc_build_builtin_function_decls): Don't build fndecls for 64-bit
2411 allocations functions, use index_int_type for normal allocation
2414 2007-06-30 Daniel Franke <franke.daniel@gmail.com>
2417 * intrinsic.c (add_functions): Additional function types.
2418 (gfc_convert_type_warn): Remove intrinsic-flag from
2419 conversion functions.
2420 * resolve.c (resolve_symbol): Added type checks to
2421 explicitly defined intrinsics.
2423 2007-06-30 Tobias Burnus <burnus@net-b.de>
2426 * io.c (check_format): Allow zero to precede the
2429 2007-06-30 Paul Thomas <pault@gcc.gnu.org>
2432 * simplify.c (gfc_simplify_repeat): Add handling of character
2433 literal for first argument.
2435 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
2437 * resolve.c (resolve_operator): Added check whether a user
2438 defined operator is available.
2440 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
2442 * openmp.c (resolve_omp_clauses): Adjust error message to
2443 better reflect the actual requirement.
2445 2007-06-29 Tobias Burnus <burnus@net-b.de>
2448 * io.c (format_lex): Fix FMT_ZERO.
2449 (check_format,check_format_string,gfc_match_format,
2450 check_io_constraints) Additional checking for READ.
2452 2007-06-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2455 * lang.opt (static-libgfortran): New option.
2456 * gfortranspec.c (ADD_ARG_LIBGFORTRAN): New macro.
2457 (Option): Add OPTION_static and OPTION_static_libgfortran.
2458 (lookup_option): Handle the new -static-libgfortran option.
2459 (lang_specific_driver): Check whether -static is passed.
2460 Handle the new -static-libgfortran option.
2461 * options.c (gfc_handle_option): If -static-libgfortran is
2462 passed and isn't supported on this configuration, error out.
2464 2007-06-27 Daniel Franke <franke.daniel@gmail.com>
2467 * openmp.c (resolve_omp_clauses): Emit error on allocatable
2468 components in COPYIN, COPYPRIVATE, FIRSTPRIVATE and LASTPRIVATE
2471 2007-06-25 Paul Thomas <pault@gcc.gnu.org>
2474 * resolve.c (check_host_association): Return if the old symbol
2475 is use associated. Introduce retval to reduce the number of
2476 evaluations of the first-order return value.
2479 * match.c (gfc_match_call): If a host associated symbol is not
2480 a subroutine, build a new symtree/symbol in the current name
2483 2007-06-24 Tobias Burnus <burnus@net-de>
2486 * interface.c (gfc_compare_derived_types): Add access check.
2487 * symbol.c (gfc_find_component): Ditto.
2488 (gfc_set_component_attr,gfc_get_component_attr) Copy access state.
2489 * dump-parse-tree.c (gfc_show_components): Dump access state.
2490 * gfortran.h (struct gfc_component): Add gfc_access.
2491 * module.c (mio_component): Add access state.
2492 * (gfc_match_structure_constructor): Check for private access state.
2494 2007-06-24 Paul Thomas <pault@gcc.gnu.org>
2498 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Calculate
2499 the offset between the loop counter and the position as
2500 defined. Add the offset within the loop so that the mask acts
2501 correctly. Do not advance the location on the basis that it
2504 2007-06-22 Daniel Franke <franke.daniel@gmail.com>
2507 * symbol.c (gfc_copy_attr): Emit errors for duplicate
2508 EXTERNAL/INTRINSIC statements.
2510 2007-06-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2513 * expr.c (gfc_check_assign): If the rvalue expression type is NULL_EXPR,
2514 check to see if the lvalue has attribute pointer and data.
2516 2007-06-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2519 * resolve.c (gfc_resolve_iterator_expr): Add check for REAL using
2520 gfc_notify_standard. (gfc_resolve_iterator): Remove check.
2521 (resolve_branch): Change "Obsolete" to "Deleted feature".
2522 * io.c (resolve_tag): Ditto.
2523 * match.c (gfc_match_pause, gfc_match_assign, gfc_match_goto): Ditto.
2525 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2528 * match.c (gfc_match_common): If the symbol value expression type is
2529 NULL_EXPR, don't error if previously initialized.
2531 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2534 * decl.c (get_proc_name) Check symbol for generic interface
2537 2007-06-20 Andrew Pinski <andrew_pinski@playstation.sony.com>
2538 Richard Guenther <rguenther@suse.de>
2541 * trans.c (gfc_build_addr_expr): Use the correct types.
2543 2007-06-19 Paul Thomas <pault@gcc.gnu.org>
2547 * resolve.c (resolve_code): Use gfc_impure_variable as a
2548 condition for rejecting derived types with pointers, in pure
2550 (gfc_impure_variable): Add test for dummy arguments of pure
2551 procedures; any for functions and INTENT_IN for subroutines.
2554 * data.c (gfc_assign_data_value): Change the ICE on an array
2555 reference initializer not being an array into an error and
2556 clear init to prevent a repetition of the error.
2558 2007-06-17 Janne Blomqvist <jb@gcc.gnu.org>
2560 * gfortran.texi: Add documentation for GFORTRAN_UNBUFFERED_n
2561 environment variables. Fix documentation for
2562 GFORTRAN_UNBUFFERED_ALL environment variable.
2564 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
2566 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
2567 POINTER_PLUS_EXPR instead of PLUS_EXPR for pointer addition.
2568 * trans-expr.c (gfc_trans_string_copy): Create
2569 POINTER_PLUS_EXPR instead of a PLUS_EXPR
2572 2007-06-14 Paul Thomas <pault@gcc.gnu.org>
2575 * trans-common.c (build_common_decl): If resizing of common
2576 decl is needed, update the TREE_TYPE.
2578 2007-06-13 Tobias Burnus <burnus@net-b.de>
2581 * interface.c (has_vector_section): New.
2582 (compare_actual_formal): Check for array sections with vector subscript.
2584 2007-06-12 Dirk Mueller <dmueller@suse.de>
2586 * trans-stmt.c (gfc_trans_call): fix gcc_assert to
2587 a comparison, not an assignment.
2589 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
2591 * trans-common.c (create_common): Initialize 'field_init'.
2593 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
2597 * trans-common.c (get_init_field): New function.
2598 (create_common): Call get_init_field for overlapping
2599 initializers in equivalence blocks.
2600 * resolve.c (resolve_equivalence_derived, resolve_equivalence):
2601 Remove constraints on initializers in equivalence blocks.
2602 * target-memory.c (expr_to_char, gfc_merge_initializers):
2604 (encode_derived): Add the bit offset to the byte offset to get
2605 the total offset to the field.
2606 * target-memory.h : Add prototype for gfc_merge_initializers.
2608 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
2610 * trans-types.c (gfc_signed_type): Remove.
2611 * trans-types.h (gfc_signed_type): Remove.
2612 * f95-lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
2614 2007-06-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2616 * trans-intrinsic.c: Revert Lee's 2007-06-04 patch.
2618 2007-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
2619 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2622 * match.c (gfc_match_special_char): New function. Match special char.
2624 * match.h: Add prototype.
2625 * io.c (next_char): Use it.
2626 * primary.c (next_string_char): Ditto.
2628 2007-06-06 Steven G. Kargl <kargl@gcc.gnu.org>
2630 * decl.c: Miscellaneous whitespace fixes.
2632 * gfortran.h: Likewise.
2633 * interface.c : Likewise.
2635 * match.c: Likewise.
2636 * match.h: Likewise.
2637 * module.c: Likewise.
2638 * parse.c: Likewise.
2639 * resolve.c: Likewise.
2640 * symbol.c: Likewise.
2641 * trans-array.c: Likewise.
2642 * trans-common.c: Likewise.
2643 * trans-decl.c: Likewise.
2644 * trans-intrinsic.c: Likewise.
2645 * trans-io.c: Likewise.
2646 * trans-stmt.c: Likewise.
2647 * trans-types.c: Likewise.
2649 2007-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2652 * parse.c (decode_statement): Don't call gfc_undo_symbols on MATCH_ERROR
2653 for ST_FUNCTION since it is called in reject_statement.
2654 (parse_contained): If error, loop back after reject_statement and try
2655 again. Free the namespace if an error occured.
2657 2007-06-04 Lee Millward <lee.millward@codesourcery.com>
2659 * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
2660 to operate on a stack allocated array for the intrinsic arguments
2661 instead of creating a TREE_LIST. Add two new parameters for the
2662 array and the number of elements. Update all callers to allocate
2663 an array of the correct length to pass in. Update comment.
2664 (gfc_intrinsic_argument_list_length): New function.
2665 (gfc_conv_intrinsic_mnimax): Call it.
2666 (gfc_conv_intrinsic_merge): Likewise.
2667 (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
2669 (gfc_conv_intrinsic_cmplx): Likewise.
2670 (gfc_conv_intrinsic_ctime): Likewise.
2671 (gfc_covn_intrinsic_fdate): Likewise.
2672 (gfc_conv_intrinsic_ttynam): Likewise.
2673 (gfc_conv_intrinsic_ishftc): Likewise.
2674 (gfc_conv_intrinsic_index): Likewise.
2675 (gfc_conv_intrinsic_scan): Likewise.
2676 (gfc_conv_intrinsic_verify): Likewise.
2677 (gfc_conv_intrinsic_trim): Likewise.
2678 (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
2679 (gfc_conv_intrinsic_exponent): Likewise.
2680 (gfc_conv_intrinsic_bound): Likewise.
2681 (gfc_conv_intrinsic_abs): Likewise.
2682 (gfc_conv_intrinsic_mod): Likewise.
2683 (gfc_conv_intrinsic_sign): Likewise.
2684 (gfc_conv_intrinsic_len): Likewise.
2685 (gfc_conv_intrinsic_adjust): Likewise.
2686 (gfc_conv_intrinsic_si_kind): Likewise.
2688 2007-06-04 Steve Ellcey <sje@cup.hp.com>
2690 * trans-array.c (gfc_conv_array_parameter): Initialize tmp.
2692 2007-05-31 Richard Guenther <rguenther@suse.de>
2694 * trans-expr.c (gfc_conv_expr_op): Use zero constant
2695 that matches the lse type.
2696 (gfc_trans_string_copy): Use sizetype zero constant.
2697 * intrinsic.c (add_functions): The sizeof intrinsic has
2699 * trans-types.c (gfc_get_dtype): Convert size to index
2700 type before shifting.
2701 * trans-array.c (gfc_trans_array_constructor_value): Use
2702 index type for offset computation.
2703 * trans-intrinsic.c (gfc_conv_associated): Use correct type
2706 2007-05-31 Paul Thomas <pault@gcc.gnu.org>
2709 * trans-array.c (gfc_trans_array_constructor): Treat the case
2710 where the ss expression charlen is missing.
2712 22007-05-31 Paul Thomas <pault@gcc.gnu.org>
2715 * module.c (mio_symtree_ref): If an equivalence group member
2716 is not used, give it a hidden symbol and set the pointer_info.
2717 (load_equiv): Only free the equivalence if none of the members
2720 2007-05-29 Daniel Franke <franke.daniel@gmail.com>
2722 * gfortran.h: Renamed 'enum gfc_generic_isym_id' to 'enum gfc_isym_id',
2723 added missing GFC_ISYM_* enumerators, ordered alphabetically.
2724 (struct gfc_intrinsic_sym): Renamed 'generic_id' to 'id'.
2725 (gfc_find_subroutine): New prototype.
2726 * intrinsic.c (add_sym, add_sym_*): Added argument 'id' and changed all callers.
2727 (find_subroutine): Renamed to 'gfc_find_subroutine', removed static.
2728 * dependency.c: Changed usage of isym->generic_id to isym->id.
2729 * openmp.c: Likewise.
2730 * resolve.c: Likewise.
2731 * trans-array.c: Likewise.
2732 * trans-expr.c: Likewise.
2733 * trans-intrinsic.c: Likewise.
2734 * trans-openmp.c: Likewise.
2736 2007-05-28 Tobias Schlüter <tobi@gcc.gnu.org>
2738 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIZEOF.
2739 * intrinsic.c (add_functions): Add stuff for SIZEOF intrinsic.
2740 * intrinsic.h (gfc_check_sizeof): Add prototype of ...
2741 * check.c (gfc_check_sizeof): .. new function.
2742 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): New function.
2743 (gfc_conv_intrinsic_strcmp): Whitespace fix.
2744 (gfc_conv_intrinsic_array_transfer): Remove double initialization,
2745 use fold_build. where appropriate.
2746 (gfc_conv_intrinsic_function): Add case for SIZEOF.
2747 * intrinsic.texi: Add documentation for SIZEOF.
2749 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
2751 * trans-array.c (gfc_conv_expr_descriptor): Edit comment.
2753 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
2756 * target-memory.c (gfc_target_expr_size): Add handling
2757 for size of BT_HOLLERITH variables.
2758 * check.c (gfc_check_transfer): Reject BT_HOLLERITH
2759 variables in MOLD argument of TRANSFER.
2761 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
2763 * gfortran.h (gfc_expr): Remove from_H, add "representation"
2765 * primary.c (match_hollerith_constant): Store the representation
2766 of the Hollerith in representation, not in value.character.
2767 * arith.c: Add dependency on target-memory.h.
2768 (eval_intrinsic): Remove check for from_H.
2769 (hollerith2representation): New function.
2770 (gfc_hollerith2int): Determine value of the new constant.
2771 (gfc_hollerith2real): Likewise.
2772 (gfc_hollerith2complex): Likewise.
2773 (gfc_hollerith2logical): Likewise.
2774 (gfc_hollerith2character): Point both representation.string and
2775 value.character.string at the value string.
2776 * data.c (create_character_initializer): For BT_HOLLERITH
2777 rvalues, get the value from the representation rather than
2779 * expr.c (free_expr0): Update handling of BT_HOLLERITH values
2780 and values with representation.string.
2781 (gfc_copy_expr): Likewise.
2782 * intrinsic.c (do_simplify): Remove special treatement of
2783 variables resulting from Hollerith constants.
2784 * dump-parse-trees.c (gfc_show_expr): Update handling of
2786 * trans-const.c (gfc_conv_constant_to_tree): Replace from_H
2787 check with check for representation.string; get Hollerith
2788 representation from representation.string, not value.character.
2789 * trans-expr.c (is_zero_initializer_p): Replace from_H check
2790 with check for representation.string.
2791 * trans-stmt.c (gfc_trans_integer_select): Use
2792 gfc_conv_mpz_to_tree for case values, so as to avoid picking up
2793 the memory representation if the case is given by a transfer
2795 * target-memory.c (gfc_target_encode_expr): Use the known memory
2796 representation rather than the value, if it exists.
2797 (gfc_target_interpret_expr): Store the memory representation of
2798 the interpreted expression as well as its value.
2799 (interpret_integer): Move to gfc_interpret_integer, make
2801 (interpret_float): Move to gfc_interpret_float, make non-static.
2802 (interpret_complex): Move to gfc_interpret_complex, make
2804 (interpret_logical): Move to gfc_interpret_logical, make
2806 (interpret_character): Move to gfc_interpret_character, make
2808 (interpret_derived): Move to gfc_interpret_derived, make
2810 * target-memory.h: Add prototypes for newly-exported
2811 gfc_interpret_* functions.
2813 2007-05-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2816 * parse.c (next_statement): Warn for truncated lines if source is free
2819 2007-05-27 Paul Thomas <pault@gcc.gnu.org>
2820 Tobias Burnus <burnus@net-b.de>
2823 * symbol.c (gfc_check_function_type): Copy dimensions of
2825 * resolve.c (resolve_contained_fntype): Improve symbol output in
2828 2007-05-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2831 * io.c (check_format): Add warning for H specifier in format.
2833 2007-05-26 Tobias Burnus <burnus@net-b.de>
2835 * gfortran.texi: Document the GFORTRAN_ERROR_DUMPCORE and
2836 GFORTRAN_ERROR_BACKTRACE environment variables.
2838 2007-05-26 Paul Thomas <pault@gcc.gnu.org>
2841 * trans.h : Add no_function_call bitfield to gfc_se structure.
2842 Add stmtblock_t argument to prototype of get_array_ctor_strlen.
2843 * trans-array.c (get_array_ctor_all_strlen): New function.
2844 (get_array_ctor_strlen): Add new stmtblock_t argument and call
2845 new function for character elements that are not constants,
2846 arrays or variables.
2847 (gfc_conv_array_parameter): Call get_array_ctor_strlen to get
2849 * trans-intrinsic (gfc_conv_intrinsic_len): Add new argument
2850 to call of get_array_ctor_strlen.
2852 2007-05-25 Kazu Hirata <kazu@codesourcery.com>
2854 * intrinsic.texi: Fix typos.
2856 2007-05-25 Paul Thomas <pault@gcc.gnu.org>
2859 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Change
2860 order in logic under EXPR_FUNCTION to handle functions with
2863 2007-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2866 * array.c (spec_dimen_size): Test for correct BT_INTEGER type.
2868 2007-05-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2871 * trans-expr.c (gfc_trans_zero_assign): Convert the result of
2872 TYPE_SIZE_UNIT into a signed type.
2873 (gfc_trans_array_copy): Likewise.
2874 (gfc_trans_array_constructor_copy): Likewise.
2875 * trans-array.c (gfc_trans_create_temp_array): Likewise.
2876 (gfc_grow_array): Likewise.
2877 (gfc_array_init_size): Likewise.
2878 (gfc_duplicate_allocatable): Likewise.
2879 * trans-stmt.c (allocate_temp_for_forall_nest_1): Likewise.
2881 2007-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2884 * resolve.c (resolve_function): Don't call resolve_global_procedure if
2885 there is no name. Delete duplicated statement in ELSE clause.
2887 2007-05-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2890 * trans-array.c (gfc_trans_array_bound_check): Take extra argument to
2891 indicate whether we should check the upper bound in that dimension.
2892 (gfc_conv_array_index_offset): Check only the lower bound of the
2893 last dimension for assumed-size arrays.
2894 (gfc_conv_array_ref): Likewise.
2895 (gfc_conv_ss_startstride): Likewise.
2897 2007-05-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2898 Daniel Franke <franke.daniel@gmail.com>
2901 * resolve.c (resolve_actual_arglist): Resolve actual argument after
2902 being identified as variable.
2904 2007-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2907 * trans-stmt.c (gfc_trans_do): Fix the value of loop variable
2910 2007-05-21 H.J. Lu <hongjiu.lu@intel.com>
2912 * trans-stmt.c (gfc_trans_do): Fix a typo in comment.
2914 2007-05-21 Paul Thomas <pault@gcc.gnu.org>
2918 * trans-array.c (gfc_conv_expr_descriptor): Obtain the stored
2919 offset for non-descriptor, source arrays and correct for stride
2920 not equal to one before writing to field of output descriptor.
2922 2007-05-20 Daniel Franke <franke.daniel@gmail.com>
2925 * check.c (check_rest): Improved argument conformance check and
2926 fixed error message generation.
2928 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2931 * Make-lang.in: Remove use of -Wno-error for expr.o, resolve.o,
2932 simplify.o and trans-common.o.
2934 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2937 * trans-array.c (gfc_trans_auto_array_allocation): Avoid
2938 multiplication of mismatched types.
2940 2007-05-18 Daniel Franke <franke.daniel@gmail.com>
2943 * symbol.c (gfc_add_flavor): Add the NAME to error message if
2946 2007-05-15 Daniel Franke <franke.daniel@gmail.com>
2951 * intrinsic.c (check_specific): Check elemental intrinsics for
2953 (add_functions): Fixed dummy argument names of BESJN and BESYN.
2954 Fixed elemental status of MCLOCK and MCLOCK8.
2955 * check.c (check_rest): Added check for array conformance.
2956 (gfc_check_merge): Removed check for array conformance.
2957 (gfc_check_besn): Removed check for scalarity.
2958 * intrinsic.texi (CSHIFT, EOSHIFT): Fixed typos.
2959 (BESJN, BESYN): Clarified documentation.
2961 2007-05-17 Tobias Burnus <burnus@net-b.de>
2963 * gfortran.texi (GFORTRAN_CONVERT_UNIT): Improve documentation.
2965 2007-05-16 Brooks Moses <brooks.moses@codesourcery.com>
2972 * target-memory.c: New file.
2973 * target-memory.h: New file.
2974 * simplify.c: Add #include "target-memory.h".
2975 (gfc_simplify_transfer): Implement constant-
2976 folding for TRANSFER intrinsic.
2977 * Make-lang.in: Add dependencies on new target-memory.* files.
2979 2007-05-15 Paul Brook <paul@codesourcery.com>
2981 * trans-types.c (gfc_type_for_size): Handle signed TImode.
2983 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2986 * trans.h (gfor_fndecl_internal_malloc, gfor_fndecl_internal_malloc64,
2987 gfor_fndecl_internal_free): Remove prototypes.
2988 (gfor_fndecl_os_error, gfc_call_free, gfc_call_malloc): Add prototypes.
2989 * trans.c (gfc_call_malloc, gfc_call_free): New functions.
2990 * f95-lang.c (gfc_init_builtin_functions): Add __builtin_free
2991 and __builtin_malloc builtins.
2992 * trans-decl.c (gfor_fndecl_internal_malloc,
2993 gfor_fndecl_internal_malloc64, gfor_fndecl_internal_free): Remove.
2994 (gfor_fndecl_os_error): Add.
2995 (gfc_build_builtin_function_decls): Don't create internal_malloc,
2996 internal_malloc64 and internal_free library function declaration.
2997 Create os_error library call function declaration.
2998 * trans-array.c (gfc_trans_allocate_array_storage,
2999 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
3000 gfc_conv_array_parameter, gfc_duplicate_allocatable): Use
3001 gfc_call_malloc and gfc_call_free instead of building calls to
3002 internal_malloc and internal_free.
3003 * trans-expr.c (gfc_conv_string_tmp): Likewise.
3004 * trans-stmt.c (gfc_do_allocate, gfc_trans_assign_need_temp,
3005 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
3006 gfc_trans_where_2: Likewise.
3007 * trans-intrinsic.c (gfc_conv_intrinsic_ctime,
3008 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
3009 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_trim): Likewise.
3011 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3014 * trans-expr.c (gfc_conv_substring): Evaluate substring bounds
3017 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
3019 * f95-lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
3020 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use unsigned_type_for
3021 instead of gfc_unsigned_type.
3022 * trans-stmt.c (gfc_trans_do): Use unsigned_type_for instead of
3024 * trans-types.c (gfc_unsigned_type): Remove.
3025 * trans-types.h (gfc_unsigned_type): Remove.
3027 2007-05-12 Paul Thomas <pault@gcc.gnu.org>
3030 * resolve.c (check_host_association): New function that detects
3031 incorrect host association and corrects it.
3032 (gfc_resolve_expr): Call the new function for variables and
3034 * match.h : Remove prototype for gfc_match_rvalue.
3035 * gfortran.h : Add prototype for gfc_match_rvalue.
3037 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
3040 * trans-expr.c (gfc_conv_function_call): Reduce indirection for
3041 direct assignments of recursive array valued functions.
3042 * primary.c (gfc_match_rvalue): Correct error for recursive
3043 function calls such that directly recursive calls of scalar
3044 function without an explicit result are disallowed.
3046 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
3049 * resolve.c (resolve_fl_namelist): It is not an error if the
3050 namelist element is the result variable of the enclosing
3051 function. Search for the symbol in current and all parent
3052 namespaces for a potential conflict.
3053 * symbol.c (check_conflict): Remove the conflict between
3054 'in_namelist' and 'FL_PROCEDURE' because the symbol info
3055 is not available to exclude function result variables.
3056 * trans-io.c (nml_get_addr_expr): Use the fake result decl
3057 if the symbol is an implicit result variable.
3059 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
3062 * decl.c (get_proc_name): If an entry has already been declared
3063 as a module procedure, pick up the symbol and the symtree and
3064 use them for the entry.
3066 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
3069 * resolve.c (resolve_symbol): Remove the flagging mechanism from the
3070 formal namespace resolution and instead check that the formal
3071 namespace is not the current namespace.
3073 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
3076 * trans-array.c (gfc_conv_array_parameter): Convert full array
3077 references to the result of the procedure enclusing the call.
3079 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
3083 * decl.c (add_init_expr_to_sym): Expand a scalar initializer
3084 for a parameter array into an array expression with the right
3086 * array.c (spec_dimen_size): Remove static attribute.
3087 * gfortran.h : Prototype for spec_dimen_size.
3089 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3092 * trans-stmt.c (gfc_trans_do): Handle large loop counts.
3094 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3097 * simplify.c (gfc_simplify_new_line): NEW_LINE can be simplified
3098 even for non constant arguments.
3100 2007-05-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3101 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3104 * gfortran.h: Add runtime error codes from libgfortran.h. Define
3106 * trans.c (gfc_trans_runtime_check): Update the format of runtime error
3107 messages to match library runtime errors. Use call to new library
3108 function runtime_error_at().
3109 * trans.h: Add prototype for new function gfc_trans_io_runtime_check.
3110 Add declaration for library functions runtime_error_at and
3112 * trans_io.c (gfc_trans_io_runtime_check): New function.
3113 (set_parameter_value): Add error checking for UNIT numbers.
3114 (set_parameter_ref): Initialize the users variable to zero.
3115 (gfc_trans_open): Move setting of unit number to after setting of common
3116 flags so that runtime error trapping can be detected.
3117 (gfc_trans_close): Likewise. (build_filepos): Likewise.
3118 (gfc_trans_inquire): Likewise. (build_dt): Likewise.
3119 * trans-decl.c: Add declarations for runtime_error_at and
3120 generate_error. (gfc_build_builtin_function_decls): Build function
3121 declarations for runtime_error_at and generate_error.
3123 2007-05-06 Paul Thomas <pault@gcc.gnu.org>
3126 * resolve.c (resolve_fl_procedure): Resolve constant character
3129 2007-05-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3132 * decl.c (match_char_spec): Add check for invalid character lengths.
3134 2007-05-04 Brooks Moses <brooks.moses@codesourcery.com>
3136 * intrinsic.texi (CMPLX): Document result kind.
3137 (COMPLEX): Add documentation.
3139 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
3142 * intrinsic.c (add_functions): Replaced calls to gfc_check_g77_math1
3143 by gfc_check_fn_r to avoid checks for scalarity.
3144 * check.c (gfc_check_besn): Removed check for scalarity.
3145 (gfc_check_g77_math1): Removed.
3146 * intrinsic.h (gfc_check_g77_math1): Removed.
3148 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
3150 * check.c (gfc_check_fseek_sub): Fixed typo.
3152 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
3155 * intrinsic.c (add_subroutines): Added FSEEK.
3156 * intrinsic.h (gfc_resolve_fseek_sub, gfc_check_fseek_sub): New.
3157 * iresolve.c (gfc_resolve_fseek_sub): New.
3158 * check.c (gfc_check_fseek_sub): New.
3159 * intrinsic.texi (FSEEK): Updated.
3161 2007-05-04 Tobias Burnus <burnus@net-b.de>
3164 * expr.c (gfc_check_pointer_assign): Check for NULL pointer.
3166 2007-05-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3169 * simplify.c (gfc_simplify_len): Only simplify integer lengths.
3171 2007-05-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3174 * simplify.c (gfc_simplify_repeat): Don't put function call with
3175 side effect in a gcc_assert().
3177 2007-05-04 Tobias Burnus <burnus@net-b.de>
3180 * interface.c (compare_actual_formal): Check character length.
3182 2007-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
3185 * dependency.c (gfc_full_array_ref_p): If the reference is
3186 to a single element, check that the array has a single
3187 element and that the correct element is referenced.
3189 2007-05-01 Daniel Franke <franke.daniel@gmail.com>
3191 * intrinsic.c (add_functions): Fixed ELEMENTAL specifications.
3192 (add_subroutines): Replaced magic numbers in function calls by
3193 ELEMENTAL and NOT_ELEMENTAL respectively.
3194 * intrinsic.texi (MVBITS): Changed class to elemental subroutine.
3195 (RANDOM_NUMBER): Changed class to subroutine.
3196 (HUGE, TINY): Changed class to inquiry function.
3198 2007-04-30 Brooks Moses <brooks.moses@codesourcery.com>
3200 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_get_double_int.
3201 (gfc_conv_tree_to_mpz): New function.
3202 (gfc_conv_mpfr_to_tree): Use real_from_mpfr.
3203 (gfc_conv_tree_to_mpfr): New function.
3204 * trans-const.h: (gfc_conv_tree_to_mpz): New prototype.
3205 (gfc_conv_tree_to_mpfr): New prototype.
3207 2007-04-30 Daniel Franke <franke.daniel@gmail.com>
3209 * intrinsic.texi (IERRNO): Changed class to non-elemental function.
3210 (LOG10): Removed COMPLEX as accepted argument type.
3211 (NEW_LINE): Changed class from elemental to inquiry function.
3212 (SIGN): Removed requirement of scalar arguments.
3213 (SNGL): Changed class to elemental function.
3215 2007-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3218 * simplify.c (simplify_bound_dim): New function.
3219 (simplify_bound): Use the above. Perform simplification of LBOUND
3220 and UBOUND when DIM argument is not present.
3222 2007-04-29 Daniel Franke <franke.daniel@gmail.com>
3224 * gfortran.texi: Cleaned up keyword index.
3225 * invoke.texi: Likewise.
3226 * intrinsic.texi: Likewise.
3228 2007-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3231 * scanner.c (load_file): Discard the byte order mark if one is
3232 found on the first non-preprocessor line of a file.
3234 2007-04-29 Paul Thomas <pault@gcc.gnu.org>
3237 * trans-array.c (gfc_conv_resolve_dependencies): Create a temp
3238 whenever a dependency is found.
3240 2007-04-28 Tobias Schlüter <tobi@gcc.gnu.org>
3242 * options.c (gfc_handle_option): Ensure requested free form line
3243 length is not too small.
3245 2007-04-27 Brooks Moses <brooks.moses@codesourcery.com>
3247 * intrinsic.texi (Transfer): Improve documentation.
3249 2007-04-27 Brooks Moses <brooks.moses@codesourcery.com>
3251 * gfortran.texi (Option Index): Add @samp as needed.
3253 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
3255 * gfortran.texi: Added node and menu entry for an option index.
3256 * invoke.texi: Moved command line option related entries of the concept
3257 index to the option index.
3259 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
3261 * intrinsic.texi (AND, FPUT, FPUTC, MODULO, OR, SET_EXPONENT,
3262 XOR): Fixed examples.
3264 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
3266 * intrinsic.texi (PRODUCT, RESHAPE, SPACING, SPREAD, SUM,
3267 SYSTEM_CLOCK, TRANSFER, UNPACK): New.
3268 (DATE_AND_TIME, CPU_TIME, RRSPACING): Added cross references.
3270 2007-04-26 Daniel Franke <franke.daniel@gmail.com>
3272 * intrinsic.texi (NULL, PACK, PRESENT, REPEAT, SCAN, SHAPE,
3273 SIZE, TRANSPOSE, TRIM, VERIFY): New.
3274 (ADJUSTL, ADJUSTR, INDEX): Added cross references.
3275 (INT, INT2, INT8, LONG): Enabled section header.
3277 2007-04-25 Janne Blomqvist <jb@gcc.gnu.org>
3279 * module.c (module_char): Replace fgetc() with
3281 (write_char): Replace fputc() with putc().
3282 * scanner.c (load_line): Replace fgetc() with getc().
3283 (gfc_read_orig_filename): Likewise.
3285 2007-04-25 Tobias Burnus <burnus@net-b.de>
3288 * error.c (error_print): Fix %% support.
3289 * intrinsic.c (sort_actual): Improve error message.
3290 * resolve.c (resolve_actual_arglist): Allow %VAL for
3291 interfaces defined in the module declaration part.
3293 2007-04-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3296 * intrinsic.texi (GETLOG): Update documentation to reflect
3299 2007-04-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3302 * module.c (write_char): Add character to the MD5 buffer.
3303 (read_md5_from_module_file): New function.
3304 (gfc_dump_module): Compute MD5 for new module file. Call
3305 read_md5_from_module_file. Only overwrite old module file
3306 if the new MD5 is different.
3308 2007-04-23 Paul Thomas <pault@gcc.gnu.org>
3311 * resolve.c (resolve_symbol): Allow resolution of formal
3312 namespaces nested within formal namespaces coming from modules.
3315 * trans-expr.c (gfc_trans_assignment): Make the call to
3316 gfc_trans_zero_assign conditional on the lhs array ref being
3319 2007-04-23 Tobias Burnus <burnus@net-b.de>
3321 * primary.c (match_integer_constant): Mention -fno-range-check
3322 in the error message.
3324 2007-04-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3327 * scanner.c (load_line): Remove check for comment after ampersand and
3328 adjust tracking of ampersand.
3330 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
3332 * f95-lang.c (lang_tree_node): Use GENERIC_NEXT
3333 instead of checking GIMPLE_STMT_P in chain_next.
3335 2007-04-17 Tobias Schlüter <tobi@gcc.gnu.org>
3337 * trans-types.h (gfc_packed): New enum.
3338 (gfc_get_nodesc_array_type): Change prototype to use new enum.
3339 * trans-types.c (gfc_get_nodesc_array): Use gfc_packed for
3340 argument packed. Adapt all references to values accordingly.
3341 (gfc_sym_type): Use enum values in call to gfc_get_nodesc_array.
3342 (gfc_get_derived_type): Likewise.
3343 * trans-array.c (gfc_build_constant_array_constructor): Likewise.
3344 * trans-expr.c (gfc_get_interface_mapping_charlen): Changed packed
3345 argument to type gfc_packed.
3346 (gfc_add_interface_mapping): Use enum values in call to
3347 gfc_get_interface_mapping.
3348 * trans-decl.c (gfc_build_dummy_array_decl): Adapt to use enum
3349 values when determining packing.
3351 * trans-decl.c (gfc_finish_decl): Remove unused second argument
3352 'init'. Simplify code accordingly. Remove calls to
3353 gfc_fatal_error in favor of gcc_assert.
3354 (create_function_arglist): Remove second argument from calls to
3356 (gfc_trans_dummy_character): Likewise.
3358 * arith.h: Update copyright years.
3359 * dependency.h: Likewise.
3360 * gfortran.h: Likewise.
3361 * lang-specs.h: Likewise.
3362 * parse.h: Likewise.
3363 * symbol.c: Likewise.
3364 * trans.h: Likewise.
3365 * trans.c: Likewise.
3366 * trans-array.c: Likewise.
3367 * trans-common.c: Likewise.
3368 * trans-const.h: Likewise.
3369 * trans-const.c: Likewise.
3370 * trans-decl.c: Likewise.
3371 * trans-expr.c: Likewise.
3372 * trans-io.c: Likewise.
3373 * trans-openmp.c: Likewise.
3374 * trans-types.h: Likewise.
3375 * types.def: Likewise.
3377 2007-04-17 Tobias Schlüter <tobi@gcc.gnu.org>
3380 * decl.c (gfc_sym_mangled_identifier): Use capital letters in name
3382 (gfc_sym_mangled_function_id): Likewise.
3384 2007-04-15 Paul Thomas <pault@gcc.gnu.org>
3387 * primary.c (check_for_implicit_index): New function to check
3388 that a host associated variable is not an undeclared implied
3390 (gfc_match_rvalue, match_variable): Use it and reset the
3391 implied_index attribute.
3392 * gfortran.h : Add the implied_index field to symbol_attribute.
3393 * match.c (gfc_match_iterator): Mark the iterator variable
3394 with the new attribute.
3395 * decl.c (build_sym): Reset the new attribute.
3397 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
3399 * gfc-internals.texi: Fix typos.
3400 * simplify.c: Fix a comment typo.
3402 2007-04-14 Bernhard Fischer <aldot@gcc.gnu.org>
3404 * primary.c: Commentary typo fix; Add question about redundant (?)
3407 2007-04-14 Paul Thomas <pault@gcc.gnu.org>
3411 * expr.c (scalarize_intrinsic_call): New function to
3412 scalarize elemental intrinsic functions in initialization
3414 (check_init_expr): Detect elemental intrinsic functions
3415 in initalization expressions and call previous.
3417 2007-04-13 Tobias Burnus <burnus@net-b.de>
3420 * primary.c (match_variable): External functions
3423 2007-04-13 Paul Thomas <pault@gcc.gnu.org>
3426 * trans-types.c (copy_dt_decls_ifequal): Do not get pointer
3427 derived type components.
3429 2007-04-13 Tobias Schlüter <tobi@gcc.gnu.org>
3432 * resolve.c: Include obstack.h and bitmap.h. New variable
3434 (code_stack): Add tail and reachable_labels fields.
3435 (reachable_labels): New function.
3436 (resolve_branch): Rework to use new fields in code_stack.
3437 (resolve_code): Call reachable_labels.
3438 (resolve_codes): Allocate and free labels_obstack.
3440 2007-04-12 Tobias Schlüter <tobi@gcc.gnu.org>
3443 * decl.c (match_char_spec): Move check for negative CHARACTER
3445 * resolve.c (resolve_charlen): ... here.
3446 (resolve_types): Resolve CHARACTER lengths earlier.
3448 2007-04-12 Daniel Franke <franke.daniel@gmail.com>
3451 * intrinsic.texi (RANDOM_SEED, RANDOM_NUMBER): New.
3453 2007-04-12 Tobias Schlüter <tobi@gcc.gnu.org>
3456 * primary.c (gfc_variable_attr): Don't copy string length if it
3458 * resolve.c (resolve_code): Clarify error message.
3461 * decl.c (gfc_match_end): Also check for construct name in END
3462 FORALL and END WERE statements.
3463 * match.c (match_case_eos): Use uppercase for statement name in
3465 (match_elsewhere): Construct name may appear iff construct has a
3468 * trans-types.c: Update copyright years. Reformat long comment
3469 explaining array descriptor format. Remove obsolete mention of
3472 * arith.c (gfc_arith_uplus): Rename to ...
3473 (gfc_arith_identity): ... this.
3474 (gfc_parentheses): New function.
3475 (gfc_uplus): Adapt to renamed function.
3476 * arith.h (gfc_parentheses): Add prototype.
3477 * expr.c (gfc_copy_expr): Deal with INTRINSIC_PARENTHESES.
3478 (simplifiy_intrinsic_op): Treat INTRINSIC_UPLUS separately from
3479 INTRINSIC_PARENTHESES.
3481 2007-04-12 Tobias Burnus <burnus@net-b.de>
3484 * decl.c (match_attr_spec): Allow PRIVATE/PUBLIC
3485 attribute in type definitions.
3486 (gfc_match_private): Allow PRIVATE statement only
3487 in specification part of modules.
3488 (gfc_match_public): Ditto for PUBLIC.
3489 (gfc_match_derived_decl): Allow PRIVATE/PUBLIC attribute only in
3490 specificification part of modules.
3492 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
3495 * intrinsic.c (add_functions): Add ref. to gfc_resolve_achar.
3496 * intrinsic.h : Add prototype for gfc_resolve_achar.
3497 * iresolve.c (gfc_resolve_achar): New function.
3499 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
3502 * resolve.c (resolve_fl_variable): Set flag to 2 for automatic
3503 arrays. Make condition for automatic array error explicit.
3504 If a dummy, no error on an INTENT(OUT) derived type.
3506 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
3509 * expr.c (find_array_element): Correct arithmetic for rank > 1.
3511 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
3514 * check.c (numeric_check): If an expresson has not got a type,
3515 see if it is a symbol for which a default type applies.
3517 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
3520 * trans-decl.c (gfc_get_symbol_decl): Allow unreferenced use
3523 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
3526 * symbol.c (gfc_check_function_type): New function.
3527 * gfortran.h : Add prototype for previous.
3528 * parse.c (parse_progunit): Call it after parsing specification
3531 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
3534 * trans-expr.c (gfc_conv_function_call): Give a dummy
3535 procedure the correct type if it has alternate returns.
3537 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
3540 * decl.c (gfc_match_modproc): Go up to the top of the namespace
3541 tree to find the module namespace for gfc_get_symbol.
3543 2007-04-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3546 * fortran/gfortran.h (gfc_charlen_int_kind): New prototype.
3547 * fortran/trans-types.c (gfc_charlen_int_kind): New variable.
3548 (gfc_init_types): Define gfc_charlen_int_kind.
3549 * fortran/trans.h (gfor_fndecl_string_repeat): Remove prototype.
3550 * fortran/trans-decl.c (gfor_fndecl_string_repeat): Delete.
3551 (gfc_build_intrinsic_function_decls): Don't set
3552 gfor_fndecl_string_repeat.
3553 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_repeat): Rewrite
3554 so that we don't have to call a library function.
3555 * fortran/simplify.c (gfc_simplify_repeat): Perform the necessary
3556 checks on the NCOPIES argument, and work with arbitrary size
3559 2007-03-31 Tobias Burnus <burnus@net-b.de>
3561 * intrinsic.c (add_functions): Fix name of dummy argument
3562 for new_line and exit intrinsic.
3564 2007-03-31 Paul Thomas <pault@gcc.gnu.org>
3567 * gfortran.texi: Add a section for the %VAL, %REF and %LOC
3570 2007-03-30 Rafael Avila de Espindola <espindola@google.com>
3572 * trans-types.c (gfc_signed_or_unsigned_type): Remove.
3573 (gfc_unsigned_type): Use get_signed_or_unsigned_type instead of
3574 gfc_signed_or_unsigned_type.
3575 (gfc_signed_type): Ditto.
3576 * trans-types.h (gfc_signed_or_unsigned_type): Remove.
3577 * f95-lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
3579 2007-03-30 Tobias Schlüter <tobi@gcc.gnu.org>
3581 * symbol.c (gfc_find_gsymbol): Simplify, don't unconditionally
3582 descend into all branches.
3584 2007-03-29 Tobias Schlüter <tobi@gcc.gnu.org>
3586 * intrinsic.c (conv_name): Let gfc_get_string handle the format.
3587 (find_conv): Compare pointers instead of calling strcmp.
3588 (find_sym): Likewise, but ensure that the compared pointer is in
3589 the global string table.
3591 2007-03-28 Tobias Schlüter <tobi@gcc.gnu.org>
3593 * gfc-internals.texi: Fix output filename. Merge type index into
3594 concept index. Start documentation of gfc_code structure.
3596 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
3598 * gfc-internals.texi: New file,
3599 * Make-lang.in: Add rules to convert it to dvi, pdf, and info.
3601 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
3603 * error.c (show_locus): Remove always-false test.
3605 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
3607 * lang.opt: Minor edits to descriptions.
3609 2007-03-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3612 * fortran/interface.c (check_operator_interface): Implement
3613 the standard checks on user operators extending intrinsic operators.
3614 * fortran/resolve.c (resolve_operator): If the ranks of operators
3615 don't match, don't error out but try the user-defined ones first.
3617 2007-03-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3620 * expr.c (check_dimension): Fix logic of comparisons.
3622 2007-03-24 Paul Thomas <pault@gcc.gnu.org>
3625 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Return
3626 int result that is non-zero if the expression is the function
3627 result. Only the characteristics of the result expression
3628 can be used in a procedure interface, so simplify LEN in situ
3629 using its character length.
3633 * trans-expr.c (gfc_conv_function_call): Do not use
3634 gfc_conv_expr_reference for actual pointer function with formal
3635 target because a temporary is created that does not transfer
3636 the reference correctly. Do not indirect formal pointer
3637 functions since it is the function reference that is needed.
3639 2007-03-24 Brooks Moses <brooks.moses@codesourcery.com>
3641 * gfortran.h: Edit comments on GFC_STD_*.
3643 2007-03-23 Brooks Moses <brooks.moses@codesourcery.com>
3645 * invoke.texi: Misc. small typo fixes.
3646 (-Wcharacter-truncation): Add.
3647 (-Wnonstd-intrinsics): Correct spelling.
3649 (-fintrinsic-modules-path): Add.
3651 2007-03-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3654 * arith.c (complex_pow): Rewrite to handle large power.
3655 (gfc_arith_power): Handle large power in the real and integer
3658 2007-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3661 * trans-const.c (gfc_conv_mpz_to_tree): Allow integer constants
3662 larger than twice the width of a HOST_WIDE_INT.
3664 2006-03-22 Paul Thomas <pault@gcc.gnu.org>
3667 * trans-intrinsic.c (gfc_size_in_bytes): Remove function.
3668 (gfc_conv_intrinsic_array_transfer): Remove calls to previous.
3669 Explicitly extract TREE_TYPEs for source and mold. Use these
3670 to calculate length of source and mold, except for characters,
3671 where the se string_length is used. For mold, the TREE_TYPE is
3672 recalculated using gfc_get_character_type_len so that the
3673 result is correctly cast for character literals and substrings.
3674 Do not use gfc_typenode_for_spec for the final cast.
3676 2007-03-22 Tobias Schlüter <tobi@gcc.gnu.org>
3679 * decl.c (gfc_match_derived_decl): Reliably reject
3680 'doubleprecision' and 'doublecomplex' as type names.
3682 2007-03-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3685 * trans-expr.c (gfc_trans_init_string_length): Length should
3687 (gfc_conv_function_call): Likewise.
3689 2007-03-18 Paul Thomas <pault@gcc.gnu.org>
3693 * symbo.c : Add gfc_derived_types.
3694 (gfc_free_dt_list): Free derived type list gfc_derived_types.
3695 (gfc_free_namespace): Remove call to gfc_free_dt_list.
3696 (gfc_symbol_done_2): Call gfc_free_dt_list.
3697 * gfortran.h : Declare gfc_derived_types to be external. Remove
3698 derived types field from gfc_namespace.
3699 * resolve.c (resolve_fl_derived): Refer to gfc_derived types
3700 rather than namespace derived_types.
3701 (resolve_fntype): Remove special treatment for module
3702 derived type functions.
3703 * trans-types.c (gfc_get_derived_type): Remove search for like
3704 derived types. Finish by copying back end declaration to like
3705 derived types in the derived type list gfc_derived_types.
3707 2007-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3710 * trans-expr.c (gfc_conv_powi): Make n argument unsigned hwi.
3711 (gfc_conv_cst_int_power): Handle integer exponent with care,
3712 since it might be too large for us.
3714 2007-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3717 * invoke.texi: Fix typo.
3719 2007-03-16 Tobias Burnus <burnus@net-b.de>
3721 * trans-decl.c (gfc_generate_function_code): Use all arguments of
3724 2007-03-15 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3726 * gfortran.h (gfc_option_t): Add flag_backtrace field.
3727 * lang.opt: Add -fbacktrace option.
3728 * invoke.texi: Document the new option.
3729 * trans-decl.c (gfc_build_builtin_function_decls): Add new
3730 option to the call to set_std.
3731 * options.c (gfc_init_options, gfc_handle_option): Handle the
3734 2007-03-15 Tobias Burnus <burnus@gcc.gnu.org>
3735 Paul Thomas <pault@gcc.gnu.org>
3738 * decl.c (gfc_match_import): If the parent of the current name-
3739 space is null, try looking for an imported symbol in the parent
3740 of the proc_name interface.
3741 * resolve.c (resolve_fl_variable): Do not check for blocking of
3742 host association by a same symbol, if the symbol is in an
3745 2007-03-15 Paul Thomas <pault@gcc.gnu.org>
3748 * decl.c (match_data_constant): Before going on to try to match
3749 a name, try to match a structure component.
3753 * resolve.c (resolve_actual_arglist): Do not reject a generic
3754 actual argument if it has a same name specific interface.
3757 * trans-array.c (parse_interface): Do not nullify allocatable
3758 components if the symbol has the saved attribute.
3760 2007-03-14 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3762 * trans-array.c (gfc_trans_auto_array_allocation): Replace
3763 fold(convert()) by fold_convert().
3764 (gfc_duplicate_allocatable): Likewise.
3765 * trans-intrinsic.c (gfc_conv_intrinsic_dot_product): Use
3766 build_int_cst instead of converting an integer_zero_node
3769 2007-03-14 Jakub Jelinek <jakub@redhat.com>
3771 * module.c (mio_typespec): Don't look at ts->cl if not BT_CHARACTER.
3773 2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
3778 * intrinsics.texi (CHDIR): Fix argument names, note
3779 that STATUS must be a default integer.
3780 (CTIME): Fix argument names, note that RESULT must
3781 be a default integer.
3782 (EXIT): Note that STATUS must be a default integer.
3784 2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
3787 * intrinsic.texi: General whitespace cleanup, remove
3788 comment about missing intrinsics.
3789 (menu): Add lines for new entries listed below.
3790 (ACOSH): Mention specific function DACOSH, correct
3791 description phrasing.
3792 (ASINH): Mention specific function DASINH, correct
3793 description phrasing.
3794 (ATANH): Mention specific function DATANH, correct
3795 description phrasing.
3796 (COS): Add index entry for CCOS.
3797 (CPU_TIME): Correct "REAL" to "REAL(*)".
3798 (EXP): Add index entry for CEXP.
3799 (INT): Correct argument name to "A".
3803 (MAX): Add index entries for specific variants.
3804 (MCLOCK): New entry.
3805 (MCLOCK8): New entry.
3806 (SECNDS): Adjust to a more standard form.
3807 (SECOND): New entry.
3808 (TIME): Add cross-reference to MCLOCK.
3809 (TIME8): Add cross-reference to MCLOCK8.
3811 2007-03-11 Paul Thomas <pault@gcc.gnu.org>
3814 * parse.c (parse_interface): Use the default types from the
3815 formal namespace if a function or its result do not have a type
3816 after parsing the specification statements.
3818 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
3820 * intrinsic.texi: (ICHAR) Improve internal I/O note.
3821 (ACHAR): Reference it.
3822 (CHAR): Reference it.
3823 (IACHAR): Reference it.
3825 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
3827 * intrinsic.texi: (LINK) Document function form.
3833 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
3835 * intrinsic.texi: minor typo fixes, removed prologue.
3836 (FSEEK): moved to correct place in alphabetical order.
3838 2007-03-08 Daniel Franke <franke.daniel@gmail.com>
3841 * check.c (gfc_check_alarm_sub): Added check for default integer
3842 kind of status argument.
3843 * iresolve.c (gfc_resolve_alarm_sub): Removed conversion of
3845 * intrinsic.texi (ALARM): Extended documentation.
3847 2007-03-08 Daniel Franke <franke.daniel@gmail.com>
3849 * intrinsic.texi (GERROR, ISATTY, TTYNAM): New.
3850 (ABORT, FLUSH, FNUM, IRAND, MALLOC, SIGNAL, SRAND): Fixed typo.
3851 * intrinsic.c (add_subroutines): Adjusted dummy argument names
3852 of GERROR and TTYNAM.
3854 2007-07-08 Tobias Burnus <burnus@net-b.de>
3856 * module.c (gfc_match_use): Support renaming of operators
3858 * gfortran.texi (Fortran 2003 Status): Document support of
3859 renaming of operators.
3861 2007-07-08 Tobias Burnus <burnus@net-b.de>
3864 * module.c (read_module): Always import module name as symbol.
3865 (gfc_match_use): Disallow module name in the only clause of
3868 2007-03-08 Paul Thomas <pault@gcc.gnu.org>
3871 * expr.c (find_array_section): Correct arithmetic for section
3874 2007-03-07 Brooks Moses <brooks.moses@codesourcery.com>
3876 * iresolve.c (gfc_resolve_ishftc): Correct s_kind value.
3878 2007-03-06 Daniel Franke <franke.daniel@gmail.com>
3880 PR documentation/30950
3881 * intrinsic.texi (AND, CPU_TIME): Fix dummy argument names.
3882 (FREE): Fix call syntax.
3884 2007-03-06 Brooks Moses <brooks.moses@codesourcery.com>
3886 * intrinsic.texi: Limit column widths to a total of .85.
3888 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
3890 * gfortran.texi (GFortran and G77): Rewrite completely.
3892 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
3894 * match.c (gfc_match_name): Expanded comment.
3896 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
3898 * gfortran.texi (Old-style kind specifications): Document
3899 special handling of old-style kind specifiers for COMPLEX.
3900 * decl.c (gfc_match_old_kind_spec): Document kind/bytesize
3901 assumptions for COMPLEX in comment.
3903 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
3906 * gfortranspec.c (lang_specific_driver): Update program
3907 name and copyright date.
3909 2007-03-03 Paul Thomas <pault@gcc.gnu.org>
3912 * check.c (dim_rank_check): The shape of subsections of
3913 assumed-size arrays is known.
3915 2007-03-02 Paul Thomas <pault@gcc.gnu.org>
3916 Tobias Burnus <burnus@net-b.de>
3919 * decl.c (gfc_match_entry): Remove erroneous entry result check.
3921 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
3923 * Make-lang.in: Add install-pdf target as copied from
3924 automake v1.10 rules.
3926 2007-03-01 Tobias Burnus <burnus@net-b.de>
3929 * trans-intrinsic.c (gfc_conv_intrinsic_size): Compare pointers.
3931 2007-02-28 Tobias Burnus <burnus@net-b.de>
3932 Paul Thomas <pault@gcc.gnu.org>
3936 * resolve.c (resolve_actual_arglist): Allow by-value
3937 arguments and non-default-kind for %VAL().
3938 * trans-expr.c (conv_arglist_function): Allow
3939 non-default-kind for %VAL().
3941 2007-02-28 Tobias Burnus <burnus@net-b.de>
3944 * primary.c (next_string_char): Correct reading a character
3945 after the delimiter.
3946 (match_string_constant): Print warning message only once.
3948 2007-02-27 Richard Guenther <rguenther@suse.de>
3950 * trans-array.c (structure_alloc_comps): Use correct type
3951 for null pointer constant.
3953 2007-02-26 Brooks Moses <brooks.moses@codesourcery.com>
3955 * gfortran.texi: Standardize title page, remove version number
3956 from copyright page.
3958 2007-02-26 Thomas Koenig <Thomas.Koenig@online.de>
3959 Paul Thomas <pault@gcc.gnu.org>
3962 * trans-intrinsic.c (gfc_conv_intrinsic_size):
3963 If dim is an optional argument, check for its
3964 presence and call size0 or size1, respectively.
3966 2007-02-23 Paul Thomas <pault@gcc.gnu.org>
3969 * resolve.c (has_default_initializer): New function.
3970 (resolve_fl_variable): Call has_default_initializer to determine if
3971 the derived type has a default initializer to its ultimate
3975 2007-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3977 * options.c (set_default_std_flags): New function to consolidate
3979 (gfc_init_options): Use new function.
3980 (gfc_handle_option): Use new function.
3982 2007-02-22 Brooks Moses <brooks.moses@codesourcery.com>
3984 * gfortran.texi (Old-style kind specifications): Document
3985 special handling of old-style kind specifiers for COMPLEX.
3986 * decl.c (gfc_match_old_kind_spec): Documented kind/bytesize
3987 assumptions in comment.
3989 2007-02-21 Bernhard Fischer <aldot@gcc.gnu.org>
3991 * parse.c (next_free): Gooble spaces after OpenMP sentinel.
3993 2007-02-20 Thomas Koenig <Thomas.Koenig@online.de>
3996 * match.c (gfc_match_iterator): Remove conflict between
3997 loop variable and pointer.
3999 2007-02-20 Tobias Burnus <burnus@net-b.de>
4002 * symbol.c (gfc_add_volatile): Allow to set VOLATILE
4003 attribute for host-associated variables.
4004 * gfortran.h (symbol_attribute): Save namespace
4005 where VOLATILE has been set.
4006 * trans-decl.c (gfc_finish_var_decl): Move variable
4007 declaration to the top.
4009 2007-02-20 Tobias Burnus <burnus@net-b.de>
4012 * resolve.c (resolve_symbol): Add character dummy VALUE check.
4014 2007-02-19 Thomas Koenig <Thomas.Koenig@online.de>
4017 * fortran/iresolve.c (gfc_resolve_maxloc): Remove coercion of
4018 argument to default integer.
4019 (gfc_resolve_minloc): Likewise.
4021 2007-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4024 * options.c (gfc_init_options): Relax warning level for obsolescent.
4025 * match.c (match_arithmetic_if): Change to obsolescent from deleted.
4026 (gfc_match_if): Same.
4028 2007-02-18 Roger Sayle <roger@eyesopen.com>
4030 * trans-array.c (gfc_build_constant_array_constructor): When the
4031 shape of the constructor is known, use that to construct the
4033 (gfc_trans_constant_array_constructor): Initialize the "info"
4034 information for all of the dimensions of the array constructor.
4035 (constant_array_constructor_loop_size): New function.
4036 (gfc_trans_array_constructor): Use it to determine whether a
4037 loop is suitable for "constant array constructor" optimization.
4039 * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Use fold_build2
4040 instead of build2, to avoid conditions like "(a != b) != 0".
4042 2007-02-18 Roger Sayle <roger@eyesopen.com>
4043 Paul Thomas <pault@gcc.gnu.org>
4046 * match.c (match_forall_iterator): Use gfc_match_expr instead
4047 of gfc_match_variable to match the iterator variable. Return
4048 MATCH_NO if not a variable. Remove the reset of the symbol's
4051 2007-02-16 Tobias Burnus <burnus@net-b.de>
4054 * trans-decl.c (gfc_generate_function_code): Do not initialize
4055 pointers to derived components.
4057 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
4058 Brooks Moses <brooks.moses@codesourcery.com>
4059 Lee Millward <lee.millward@codesourcery.com>
4061 * trans-expr.c (gfc_conv_power_op): Use build_call_expr.
4062 (gfc_conv_string_tmp): Likewise.
4063 (gfc_conv_concat_op): Likewise.
4064 (gfc_build_compare_string): Likewise.
4065 (gfc_conv_function_call): Use build_call_list instead of build3.
4067 * trans-array.c (gfc_trans_allocate_array_storage): Use
4069 (gfc_grow_array): Likewise.
4070 (gfc_trans_array_ctor_element): Likewise.
4071 (gfc_trans_array_constructor_value): Likewise.
4072 (gfc_array_allocate): Likewise.
4073 (gfc_array_deallocate): Likewise.
4074 (gfc_trans_auto_array_allocation): Likewise.
4075 (gfc_trans_dummy_array_bias): Likewise.
4076 (gfc_conv_array_parameter): Likewise.
4077 (gfc_trans_dealloc_allocated): Likewise.
4078 (gfc_duplicate_allocatable): Likewise.
4080 * trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr.
4081 (gfc_trans_omp_flush): Likewise.
4083 * trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr.
4084 (gfc_trans_pause): Likewise.
4085 (gfc_trans_stop): Likewise.
4086 (gfc_trans_character_select): Likewise.
4087 (gfc_do_allocate): Likewise.
4088 (gfc_trans_assign_need_temp): Likewise.
4089 (gfc_trans_pointer_assign_need_temp): Likewise.
4090 (gfc_trans_forall_1): Likewise.
4091 (gfc_trans_where_2): Likewise.
4092 (gfc_trans_allocate): Likewise.
4093 (gfc_trans_deallocate): Likewise.
4095 * trans.c (gfc_trans_runtime_check): Use build_call_expr.
4097 * trans-io.c (gfc_trans_open): Use build_call_expr.
4098 (gfc_trans_close): Likewise.
4099 (build_filepos): Likewise.
4100 (gfc_trans_inquire): Likewise.
4101 (NML_FIRST_ARG): Delete.
4102 (NML_ADD_ARG): Delete.
4103 (transfer_namelist_element): Use build_call_expr.
4104 (build_dt): Likewise.
4105 (gfc_trans_dt_end): Likewise.
4106 (transfer_expr): Likewise.
4107 (transfer_array-desc): Likewise.
4109 * trans-decl.c (gfc_generate_function_code): Use build_call_expr.
4110 (gfc_generate_constructors): Likewise.
4112 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr.
4113 (gfc_conv_intrinsic_fdate): Likewise.
4114 (gfc_conv_intrinsic_ttynam): Likewise.
4115 (gfc_conv_intrinsic_array_transfer): Likewise.
4116 (gfc_conv_associated): Likewise.
4117 (gfc_conv_intrinsic_si_kind): Likewise.
4118 (gfc_conv_intrinsic_trim): Likewise.
4119 (gfc_conv_intrinsic_repeat: Likewise.
4120 (gfc_conv_intrinsic_iargc): Likewise.
4122 2007-02-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4125 * scanner.c (gfc_next_char_literal): Add check for end of file after
4126 call to advance_line.
4128 2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>
4131 * primary.c (match_logical_constant): Return MATCH_ERROR on invalid
4134 2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>
4136 * misc.c (gfc_typename): Fix potential buffer overflow.
4138 2007-02-13 Paul Thomas <pault@gcc.gnu.org>
4141 * module.c (read_module): Set pointer_info to referenced if the
4142 symbol has no namespace.
4144 2007-02-12 Nick Clifton <nickc@redhat.com>
4146 * lang.opt: Add Warning attribute to warning options.
4148 2007-02-11 Daniel Franke <franke.daniel@gmail.com>
4150 * intrinsic.texi (HOSTNM): Fix typographical error in syntax.
4151 (SLEEP): Added section and documentation.
4153 2007-02-11 Tobias Schlüter <tobi@gcc.gnu.org>
4156 * decl.c (add_init_expr_to_sym): Remove ENUM specific code.
4157 (variable_decl): Likewise. Rewrap comment.
4158 (match_attr_spec): Remove ENUM specific code.
4159 (gfc_match_enum): Fix typo in error message.
4160 (enumerator_decl): New function.
4161 (gfc_match_enumerator_def): Use enumerator_decl instead of
4162 variable_decl. Adapt code accordingly.
4164 2007-02-11 Paul Thomas <pault@gcc.gnu.org>
4167 * module.c (find_symtree_for_symbol): New function to return
4168 a symtree that is not a "unique symtree" given a symbol.
4169 (read_module): Do not automatically set pointer_info to
4170 referenced because this inhibits the generation of a unique
4171 symtree. Recycle the existing symtree if possible by calling
4172 find_symtree_for_symbol.
4175 * decl.c (add_init_expr_to_sym): Make new charlen for an array
4176 constructor initializer.
4178 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
4180 * f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address
4181 and __emutls_register_common.
4182 * openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls.
4183 * trans-common.c (build_common_decl): Don't check have_tls.
4184 * trans-decl.c (gfc_finish_var_decl): Likewise.
4185 * types.def (BT_WORD, BT_FN_PTR_PTR): New.
4186 (BT_FN_VOID_PTR_WORD_WORD_PTR): New.
4188 2007-02-09 Tobias Burnus <burnus@net-b.de>
4191 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc,
4192 gfc_conv_intrinsic_minmaxval): Use HUGE-1 for most negative integer.
4194 2007-02-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4197 * trans-array.c (gfc_trans_create_temp_array): Remove use of the
4198 function argument. Always generate code for negative extent.
4200 * trans-array.h (gfc_trans_create_temp_array): Change prototype.
4201 * trans-expr.c (gfc_conv_function_call): Remove use of last argument
4202 of gfc_trans_create_temp_array.
4203 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Likewise.
4204 * trans-stmt.c (gfc_conv_elemental_dependencies): Likewise.
4206 2007-02-08 Roger Sayle <roger@eyesopen.com>
4208 * trans-stmt.c (gfc_trans_forall_1): Optimize the cases where the
4209 mask expression is a compile-time constant (".true." or ".false.").
4211 2007-02-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4214 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Evaluate
4215 arguments only once. Generate check that NCOPIES argument is not
4218 2007-02-04 Steven G. Kargl <kargl@gcc.gnu.org>
4221 * fortran/invoke.texi: Update documentation.
4222 * fortran/options.c (gfc_post_options): Deal with tabs with -std=f2003
4225 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
4227 * trans-array.c: Fix a comment typo.
4229 2007-02-03 Paul Thomas <pault@gcc.gnu.org>
4232 * array.c (match_array_element_spec): If the length of an array is
4233 negative, adjust the upper limit to make it zero length.
4236 * resolve.c (pure_function, resolve_function): Initialize name to
4237 null to clear up build warnings.
4238 (resolve_fl_variable): Look at components explicitly to check for
4239 default initializer, rather than using gfc_default_initializer.
4241 2007-02-02 Steven G. Kargl <kargl@gcc.gnu.org>
4244 * resolve.c (resolve_generic_f): Check for non-NULL sym.
4246 2007-02-02 Roger Sayle <roger@eyesopen.com>
4248 * trans.c (gfc_build_array_ref): Use STRIP_TYPE_NOPS to eliminate
4249 NON_LVALUE_EXPR nodes and useless type conversions.
4251 2007-02-02 Paul Thomas <pault@gcc.gnu.org>
4255 * trans-expr.c (gfc_conv_aliased_arg): Remove static attribute
4256 from function and make sure that substring lengths are
4258 (is_aliased_array): Remove static attribute.
4259 * trans.c : Add prototypes for gfc_conv_aliased_arg and
4261 * trans-io.c (set_internal_unit): Add the post block to the
4262 arguments of the function. Use is_aliased_array to check if
4263 temporary is needed; if so call gfc_conv_aliased_arg.
4264 (build_dt): Pass the post block to set_internal_unit and
4265 add to the block after all io activiy is done.
4267 2007-02-01 Roger Sayle <roger@eyesopen.com>
4269 * trans-array.c (gfc_conv_expr_descriptor): We don't need to use
4270 a temporary array to pass a constant non-character array constructor.
4271 Generalize the descriptor generation code to handle scalarizer
4272 "info" without an array reference.
4274 2007-02-01 Roger Sayle <roger@eyesopen.com>
4276 * dependency.c (gfc_check_dependency) <EXPR_ARRAY>: Implement
4277 dependency checking for array constructors.
4279 2007-02-01 Roger Sayle <roger@eyesopen.com>
4281 * trans-stmt.c (compute_overall_iter_number): Document function
4282 arguments. Generalize "unconditional forall nest with constant
4283 bounds" optimization to eliminate unconditional inner loops with
4286 2007-01-31 Tobias Burnus <burnus@net-b.de>
4289 * interface.c (compare_actual_formal): Check conformance between
4290 actual and VOLATILE dummy arguments.
4291 * symbol.c (gfc_add_volatile): Allow setting of VOLATILE
4292 multiple times in different scopes.
4293 * decl.c (gfc_match_volatile): Search symbol in host association.
4295 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
4297 * simplify.c, trans-array.c: Fix comment typos.
4299 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4301 * invoke.texi (Code Gen Options): Fix abbreviation typo.
4302 * intrinsic.texi (ACCESS, LSHIFT, RSHIFT): Fix typos.
4304 2007-01-30 Steve Ellcey <sje@cup.hp.com>
4307 * trans-types.c (gfc_get_function_type): Do not add void_type_node
4309 * trans-decl.c (create_function_arglist): Change assert.
4311 2007-01-29 Paul Thomas <pault@gcc.gnu.org>
4314 * module.c (read_module): If a symbol is excluded by an ONLY
4315 clause, check to see if there is a symtree already loaded. If
4316 so, attach the symtree to the pointer_info.
4318 2007-01-28 Thomas Koenig <Thomas.Koenig@online.de>
4321 * gfortran.h: Remove gfc_simplify_init_1.
4322 * arith.h: Remove third argument from gfc_compare_string.
4323 * arith.c (gfc_compare_expression): Remove third argument
4324 from call to gfc_compare_string.
4325 (gfc_compare_string): Remove third argument xcoll_table.
4326 Remove use of xcoll_table.
4327 * misc.c (gfc_init_1): Remove call to gfc_simplify_init_1.
4328 * simplify.c (ascii_table): Remove.
4329 (xascii_table): Likewise.
4330 (gfc_simplify_achar): ICE if extract_int fails. Remove use of
4331 ascii_table. Warn if -Wsurprising and value < 0 or > 127.
4332 (gfc_simplify_char): ICE if extract_int fails. Error if
4333 value < 0 or value > 255.
4334 (gfc_simplify_iachar): Remove use of xascii_table.
4335 Char values outside of 0..255 are an ICE.
4336 (gfc_simplify_lge): Remove use of xascii_table.
4337 (gfc_simplify_lgt): Likewise.
4338 (gfc_simplify_lle): Likewise.
4339 (gfc_simplify_llt): Likewise.
4340 (invert_table): Remove.
4341 (gfc_simplify_init_1): Remove.
4343 2007-01-27 Roger Sayle <roger@eyesopen.com>
4345 * trans-stmt.c (forall_info): Replace the next_nest and outer
4346 fields that previously implemented a doubly-linked list with a
4347 single prev_nest field (singly-linked list).
4348 (gfc_trans_nested_forall_loop): The nested_forall_info argument
4349 now denotes the innermost FORALL in the loop nest.
4350 (compute_overall_iter_number): Use prev_nest instead of next_nest.
4351 (gfc_trans_forall_1): Link/cons the new "info" to the head of the
4352 nested_forall_info linked list. Free the current "info" when done.
4354 2007-01-27 Paul Thomas <pault@gcc.gnu.org>
4357 * trans-expr.c (gfc_conv_operator_assign): New function.
4358 * trans.h : Add prototype for gfc_conv_operator_assign.
4359 * trans-stmt.c (gfc_trans_where_assign): Add a gfc_symbol for
4360 a potential operator assignment subroutine. If it is non-NULL
4361 call gfc_conv_operator_assign instead of the first assignment.
4362 ( gfc_trans_where_2): In the case of an operator assignment,
4363 extract the argument expressions from the code for the
4364 subroutine call and pass the symbol to gfc_trans_where_assign.
4365 resolve.c (resolve_where, gfc_resolve_where_code_in_forall,
4366 gfc_resolve_forall_body): Resolve the subroutine call for
4367 operator assignments.
4369 2007-01-26 Steven Bosscher <stevenb.gcc@gmail.com>
4370 Steven G. Kargl <kargl@gcc.gnu.org>
4373 * fortran/io.c (next_char): Deal with backslash escaped characters.
4374 Issue warnings in non -std=gnu cases.
4375 * fortran/primary.c (next_string_char): Issue warnings in non
4377 2007-01-26 Tobias Burnus <burnus@net-b.de>
4379 * lang-specs.h: Add support for .f03 and .F03 extensions.
4380 * gfortran.texi: Document .f03 extension.
4381 * options.c (form_from_filename): Recognize .f03.
4383 2007-01-25 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4386 * lang.opt (Wall): Remove RejectNegative.
4387 * options.c (gfc_handle_option): Wall can be disabled.
4388 (set_Wall): Add a parameter for disabling Wall.
4390 2007-01-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4393 * scanner.c (load_line): Remove check fot ctrl-z and don't gobble.
4395 2007-01-23 Paul Thomas <pault@gcc.gnu.org>
4398 * match.c (gfc_match_namelist): Add check for assumed size character
4399 in namelist and provide error if found.
4401 2007-01-21 Brooks Moses <brooks.moses@codesourcery.com>
4403 * intrinsic.texi (ACHAR): Added cross-references.
4404 (CHAR): Put cross-references in alphabetical order.
4405 (IACHAR): Added cross-references.
4406 (ICHAR): Added cross-references.
4408 2007-01-20 Brooks Moses <brooks.moses@codesourcery.com>
4410 * intrinsic.texi: Edited all "Syntax" examples to a consistent form.
4411 (MAXVAL): Corrected description of result characteristics.
4413 (UMASK): Added documentation.
4415 2007-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
4417 * openmp.c, matchexp.c, module.c, scanner.c, resolve.c, st.c,
4418 parse.c, primary.c, options.c, misc.c, simplify.c: Next installment
4419 in the massive whitespace patch.
4421 2007-01-20 Roger Sayle <roger@eyesopen.com>
4423 * module.c (mio_array_ref): The dimen_type fields of an array ref
4424 are an enumerated type and can't be read/written directly with a
4425 call to mio_integer. Instead loop over and cast each element.
4427 2007-01-20 Roger Sayle <roger@eyesopen.com>
4429 * dependency.c (gfc_full_array_ref_p): Check that ref->next is NULL,
4430 i.e. that the ARRAY_REF doesn't mention components.
4431 * trans-array.c (gfc_constant_array_constructor_p): Export external
4432 function renamed from constant_array_constructor_p.
4433 (gfc_build_constant_array_constructor): Export.
4434 (gfc_trans_array_constructor): Update call to the renamed function
4435 constant_array_constructor_p.
4436 * trans-array.h (gfc_constant_array_constructor_p): Prototype here.
4437 (gfc_build_constant_array_constructor): Likewise.
4438 * trans-expr.c (gfc_build_memcpy_call): New helper function split
4439 out from gfc_trans_array_copy.
4440 (gfc_trans_array_copy): Use gfc_build_memcpy_call.
4441 (gfc_trans_array_constructor_copy): New function to optimize
4442 assigning an entire array from a constant array constructor.
4443 (gfc_trans_assignment): Call gfc_trans_array_constructor_copy
4446 2007-01-20 Roger Sayle <roger@eyesopen.com>
4448 * trans-intrinsic.c (gfc_conv_intrinsic_sign): New branchless
4449 implementation for the SIGN intrinsic with integral operands.
4450 (gfc_conv_intrinsic_minmax): Fix whitespace.
4452 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4454 * gfortran.h (gfc_options_t): Add flag_allow_leading_underscore.
4455 * lang.opt: Add -fallow-leading-underscore.
4456 * match.c (gfc_match_name): Allow leading underscore in symbol
4457 name if -fallow-leading-underscore is used.
4458 * symbol.c (gfc_get_default_type): Add special case for symbol
4459 names beginning with an underscore.
4460 * trans-decl.c (gfc_get_extern_function_decl,
4461 gfc_build_intrinsic_function_decls): Add _gfortran prefix to
4462 library symbols selected_int_kind, selected_real_kind and
4464 * options.c (gfc_init_options, gfc_handle_option): Handle the
4465 new -fallow-leading-underscore option.
4467 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4470 * options.c (gfc_handle_module_path_options): Path used in -J
4471 option is now added to the module search path.
4473 2007-01-20 Richard Guenther <rguenther@suse.de>
4476 * f95-lang.c (gfc_init_builtin_functions): Provide cbrt and
4477 cexpi builtins if we have TARGET_C99_FUNCTIONS. Provide
4478 sincos builtins if the target has sincos.
4480 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
4482 * intrinsic.texi (MATMUL): Corrected a typo.
4483 (MAX): Separated @var arguments.
4484 (MIN): Separated @var arguments.
4486 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
4488 * intrinsic.texi: general whitespace cleanup.
4489 (menu): Added TIME8, removed UNMASK.
4490 (AINT): Clarified argument requirement.
4491 (ANINT): Clarified argument requirement.
4492 (CEILING): Clarified argument requirement.
4493 (CHAR): Clarified argument requirement.
4494 (CMPLX): Clarified argument requirement.
4495 (DCMPLX): Clarified argument requirement.
4496 (FGET): Line rewrapping.
4497 (FLOOR): Clarified argument requirement.
4498 (GMTIME): Added documentation.
4499 (IAND): Added cross-reference.
4500 (IBCLR): Added cross-reference.
4501 (IBSET): Added cross-reference.
4502 (IEOR): Added cross-reference.
4503 (INT): Collapsed examples, clarified argument requirement.
4504 (IOR): Added cross-references.
4505 (LEN_TRIM): Corrected result kind.
4506 (LINK): Added cross-reference.
4507 (LLT): Removed "documentation pending".
4508 (LOGICAL): Added documentation.
4509 (LSHIFT): Added documentation.
4510 (LTIME): Added documentation.
4511 (MATMUL): Added documentation.
4512 (MAX): Added documentation.
4513 (MAXLOC): Added documentation.
4514 (MAXVAL): Added documentation.
4515 (MERGE): Added documentation.
4516 (MIN): Added documentation.
4517 (MINLOC): Added documentation.
4518 (MINVAL): Added documentation.
4519 (MVBITS): Moved to correct place, added documentation.
4520 (NOT): Added documentation.
4521 (PERROR): Added documentation.
4522 (RAN): Moved to correct place, added documentation.
4523 (REAL): Clarified argument requirement.
4524 (RENAME): Added documentation.
4525 (RSHIFT): Clarified argument requirement.
4526 (SIGN): Corrected table specification.
4527 (SYMLNK): Added documentation.
4528 (SYSTEM): Added documentation.
4529 (TIME): Added documentation.
4530 (TIME8): Added section and documentation.
4531 (UNMASK): Removed erroneous section.
4533 2007-01-18 H.J. Lu <hongjiu.lu@intel.com>
4535 * trans-stmt.c (compute_overall_iter_number): Fix a typo.
4537 2007-01-18 Roger Sayle <roger@eyesopen.com>
4539 * trans-expr.c (copyable_array_p): Consider user derived types without
4540 allocatable components to be copyable.
4542 2007-01-18 Roger Sayle <roger@eyesopen.com>
4544 * trans-stmt.c (compute_overall_iter_number): Enhance to precompute
4545 the number of interations in unconditional FORALL nests with constant
4548 2007-01-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4549 Tobias Burnus <burnus@net-b.de>
4552 * gfortran.h (gfc_option_t): Add flag_dump_core.
4553 * lang.opt: Add -fdump-core option.
4554 * invoke.texi: Document the new options.
4555 * trans-decl.c (gfc_build_builtin_function_decls): Add new
4556 options to the call to set_std.
4557 * options.c (gfc_init_options, gfc_handle_option): Set the
4560 2007-01-17 Paul Thomas <pault@gcc.gnu.org>
4563 * module.c (load_generic_interfaces): Make the marking of the
4564 symbol as ambiguous conditional on the module names being
4566 (write_generic): Ensure that the generic interface has a
4567 non-NULL module field.
4569 2007-01-16 Roger Sayle <roger@eyesopen.com>
4572 * trans-stmt.c (forall_info): Remove pmask field.
4573 (gfc_trans_forall_loop): Remove NVAR argument, instead assume that
4574 NVAR covers all the interation variables in the current forall_info.
4575 Add an extra OUTER parameter, which specified the loop header in
4576 which to place mask index initializations.
4577 (gfc_trans_nested_forall_loop): Remove NEST_FLAG argument.
4578 Change the semantics of MASK_FLAG to only control the mask in the
4580 (compute_overall_iter_number): Optimize the trivial case of a
4581 top-level loop having a constant number of iterations. Update
4582 call to gfc_trans_nested_forall_loop. Calculate the number of
4583 times the inner loop will be executed, not to size of the
4585 (allocate_temp_for_forall_nest_1): Reuse SIZE as BYTESIZE when
4586 sizeof(type) == 1. Tidy up.
4587 (gfc_trans_assign_need_temp): Remove NEST_FLAG argument from calls
4588 to gfc_trans_nested_forall_loop.
4589 (gfc_trans_pointer_assign_need_temp): Likewise.
4590 (gfc_trans_forall_1): Remove unused BYTESIZE, TMPVAR, SIZEVAR and
4591 LENVAR local variables. Split mask allocation into a separate
4592 hunk/pass from mask population. Use allocate_temp_for_forall_nest
4593 to allocate the FORALL mask with the correct size. Update calls
4594 to gfc_trans_nested_forall_loop.
4595 (gfc_evaluate_where_mask): Update call to
4596 gfc_trans_nested_forall_loop.
4597 (gfc_trans_where_2): Likewise.
4599 2007-01-15 Paul Thomas <pault@gcc.gnu.org>
4602 * trans-stmt.c (gfc_trans_call): If it does not have one, get
4603 a backend_decl for an alternate return.
4606 * resolve.c (pure_function): Statement functions are pure. Note
4607 that this will have to recurse to comply fully with F95.
4610 * resolve.c (resolve_function): Only a reference to the final
4611 dimension of an assumed size array is an error in an inquiry
4615 * resolve.c (resolve_function): Make sure that the function
4616 expression has a type.
4618 2007-01-14 Paul Thomas <pault@gcc.gnu.org>
4621 * trans-decl.c (gfc_sym_mangled_function_id): Module, external
4622 symbols must not have the module name prepended.
4624 2007-01-11 Thomas Koenig <Thomas.Koenig@online.de>
4627 * iresolve.c (gfc_resolve_maxloc): If the rank
4628 of the return array is nonzero and we process an
4629 integer array smaller than default kind, coerce
4630 the array to default integer.
4631 * iresolve.c (gfc_resolve_minloc): Likewise.
4633 2007-01-11 Brooks Moses <brooks.moses@codesourcery.com>
4635 * simplify.c: Update copyright to 2007.
4638 2007-01-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4641 * scanner.c (gfc_release_include_path): Free gfc_option.module_dir
4644 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
4646 * simplify.c (gfc_simplify_ibclr): Fix POS comparison.
4647 (gfc_simplify_ibset): Same.
4649 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
4653 * simplify.c (convert_mpz_to_unsigned): New function.
4654 (convert_mpz_to_signed): New function, largely based on
4656 (twos_complement): Removed.
4657 (gfc_simplify_ibclr): Add conversions to and from an
4658 unsigned representation before bit-twiddling.
4659 (gfc_simplify_ibset): Same.
4660 (gfc_simplify_ishftc): Add checks for overly large
4661 constant arguments, only check the third argument if
4662 it's present, carry over high bits into the result as
4663 appropriate, and perform the final conversion back to
4664 a signed representation using the correct sign bit.
4665 (gfc_simplify_not): Removed unnecessary masking.
4667 2007-01-09 Paul Thomas <pault@gcc.gnu.org>
4670 * resolve.c (resolve_code): Use the code->expr character length
4671 directly to set length of llen.
4673 2007-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4676 * lang.opt: Add Wcharacter_truncation option.
4677 * options.c (gfc_init_options): Initialize
4678 gfc_option.warn_character_truncation to zero.
4679 (gfc_handle_option): Add case for OPT_Wcharacter_truncation.
4681 2007-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
4683 * interface.c, intrinsic.c, gfortranspec.c, io.c, f95-lang.c,
4684 iresolve.c, match.c: Update Copyright years. Whitespace.
4686 2007-01-08 Richard Guenther <rguenther@suse.de>
4688 * trans-io.c (transfer_array_desc): Use build_int_cst instead
4691 2007-01-08 Roger Sayle <roger@eyesopen.com>
4693 * trans-array.c (constant_array_constructor_p): New function to
4694 determine whether an array constructor consists only of constant
4695 elements, and if so return it's size.
4696 (gfc_build_constant_array_constructor): Construct a statically
4697 initialized gfortran array for a given EXPR_ARRAY.
4698 (gfc_trans_constant_array_constructor): Efficiently scalarize
4699 a constant array constructor.
4700 (gfc_trans_array_constructor): Tidy up use of CONST_STRING.
4701 Special case scalarization of constant array constructors, all of
4702 whose elements are specified, using constant_array_constructor_p
4703 and gfc_trans_constant_array_constructor.
4704 (gfc_conv_scalarized_array_ref): Check whetger info->offset is zero
4705 before adding it to index, to avoid creating a NON_LVALUE_EXPR.
4707 2007-01-08 Kazu Hirata <kazu@codesourcery.com>
4709 gfortran.texi: Fix typos.
4711 2007-01-07 Steven G. Kargl <kargl@gcc.gnu.org>
4713 * decl.c, dump-parse-tree.c, error.c, data.c, expr.c, dependency.c,
4714 convert.c: Update Copyright dates. Fix whitespace.
4716 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
4718 * data.c (gfc_assign_data_value): Fix whitespace.
4720 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
4722 * trans-array.c (gfc_trans_create_temp_array, gfc_array_init_size):
4723 Commentary typo fix.
4725 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
4728 * match.c (gfc_match_name): Print diagnostics for invalid
4731 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
4733 * array.c: Fix whitespace in comment table.
4735 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
4737 * array.c, bbt.c, check.c: Update copyright years. Whitespace.
4739 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
4741 * arith.c: Update copyright years. Whitespace.
4743 2007-01-05 Roger Sayle <roger@eyesopen.com>
4745 * trans-expr.c (gfc_trans_assignment_1): New subroutine to scalarize
4746 array assignments split out from gfc_trans_assignment.
4747 (gfc_trans_array_copy): New function to implement array to array
4748 copies via calls to __builtin_memcpy.
4749 (copyable_array_p): New helper function to identify an array of
4750 simple/POD types, that may be copied/assigned using memcpy.
4751 (gfc_trans_assignment): Use gfc_trans_array_copy to handle simple
4752 whole array assignments considered suitable by copyable_array_p.
4753 Invoke gfc_trans_assignment_1 to perform the fallback scalarization.
4755 2007-01-05 Roger Sayle <roger@eyesopen.com>
4757 * trans-array.c (gfc_trans_array_constructor_value): Make the
4758 static const "data" array as TREE_READONLY.
4759 * trans-stmt.c (gfc_trans_character_select): Likewise.
4761 2007-01-05 Roger Sayle <roger@eyesopen.com>
4763 * trans-array.c (gfc_conv_loop_setup): Test whether the loop
4764 stride is one, to avoid fold_build2 introducing a useless
4765 NON_LVALUE_EXPR node.
4767 2007-01-05 Tobias Burnus <burnus@net-b.de>
4769 * symbol.c (check_conflict): Fix error message.
4771 2007-01-05 Paul Thomas <pault@gcc.gnu.org>
4774 * decl.c (gfc_in_match_data, gfc_set_in_match_data): New
4775 functions to signal that a DATA statement is being matched.
4776 (gfc_match_data): Call gfc_set_in_match_data on entry and on
4778 * gfortran.h : Add prototypes for above.
4779 * expr.c (check_init_expr): Avoid check on parameter or
4780 variable if gfc_in_match_data is true.
4781 (gfc_match_init_expr): Do not call error on non-reduction of
4782 expression if gfc_in_match_data is true.
4786 * decl.c (gfc_set_constant_character_len): Add boolean arg to
4787 flag array constructor resolution. Warn if string is being
4788 truncated. Standard dependent error if string is padded. Set
4789 new arg to false for all three calls to
4790 gfc_set_constant_character_len.
4791 * match.h : Add boolean arg to prototype for
4792 gfc_set_constant_character_len.
4793 * gfortran.h : Add warn_character_truncation to gfc_options.
4794 * options.c (set_Wall): Set warn_character_truncation if -Wall
4796 * resolve.c (resolve_code): Warn if rhs string in character
4797 assignment has to be truncated.
4798 * array.c (gfc_resolve_character_array_constructor): Set new
4799 argument to true for call to gfc_set_constant_character_len.
4801 2007-01-05 Tobias Burnus <burnus@net-b.de>
4804 * interface.c (compare_parameter_intent): New function.
4805 (check_intents): Support pointer intents.
4806 * symbol.c (check_conflict): Support pointer intents,
4807 better conflict_std message.
4808 * expr.c (gfc_check_assign,gfc_check_pointer_assign):
4809 Support pointer intents.
4810 * resolve.c (resolve_deallocate_expr,resolve_allocate_expr):
4811 Support pointer intents.
4813 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4816 * check.c (gfc_check_kill_sub): Add checks for non-scalar
4819 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
4821 * intrinsic.texi: Minor cleanup, reflowing overlong
4822 paragraphs, and correcting whitespace.
4824 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
4826 * intrinsic.texi (LBOUND): Add documentation.
4827 (LGE): Add documentation.
4828 (LGT): Add documentation.
4829 (LINK): Add documentation.
4830 (LLE): Add documentation.
4831 (LLT): Add documentation.
4832 (LNBLNK): Add documentation.
4833 (UBOUND): Add documentation.
4834 (UNLINK): Add documentation.
4836 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
4838 * intrinsic.texi (IAND): Clarify argument specifications.
4839 (IBCLR): Add documentation.
4840 (IBITS): Add documentation.
4841 (IBSET): Add documentation.
4842 (IEOR): Add documentation.
4843 (IERRNO): Add documentation.
4844 (INDEX): Add documentation.
4845 (IOR): Add documentation.
4846 (ISHFT): Add documentation.
4847 (ISHFTC): Add documentation.
4848 (KILL): Add documentation.
4849 (LEN_TRIM): Add documentation.
4851 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
4854 * interface.c (compare_actual_formal): check for
4855 alternate returns when iterating over non-present
4858 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
4860 * invoke.texi: Update manpage copyright to include 2007.
4862 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
4864 * gfortran.texi: Update copyright to include 2007.
4865 * intrinsic.texi: Update copyright to include 2007.
4866 * invoke.texi: Update copyright to include 2007.
4868 2007-01-02 Tobias Burnus <burnus@net-b.de>
4869 Jakub Jelinek <jakub@redhat.com>
4872 * scanner.c (open_included_file): Revert patch.
4873 (gfc_open_included_file): Support absolute pathnames.
4874 (gfc_open_intrinsic_module): Support absolute pathnames.
4876 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4878 * gfortran.texi (GNU Fortran and GCC): Rewrite
4880 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4882 * gfortran.texi (Introduction): Lower "Part I:
4883 Introduction" to a chapter, renumber Parts II and III to
4885 * intrinsic.texi (Introduction): Rename to "Introduction
4886 to Intrinsics" to avoid conflict with the new chapter.
4888 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4890 * intrinsic.texi (Introduction): Rewrite first paragraph.
4892 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4894 * invoke.texi (OpenMP): Added index entry.
4895 * gfortran.texi (title page): Removed erroneous '*'.
4897 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4899 * gfortran.texi (GFORTRAN_DEFAULT_RECL): Added units
4901 (Extensions): Miscellaneous minor rewriting and copyediting.
4902 (BOZ-literal constants): Renamed from Hexadecimal constants.
4903 (Hollerith constants support): Added explanation and
4904 suggestions for standard-conforming modern equivalents.
4906 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4908 * intrinsic.texi: Improvements to index entries; change
4909 @findex entries to @cindex entries.
4910 * invoke.texi: Standardize and improve index entries.
4911 * gfortran.texi: Fix @code in one index entry.
4913 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4915 * invoke.texi: Change @code-type macros to appropriate
4916 variants (@command, @option, etc.)
4917 * gfortran.texi: Same.
4919 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4921 * intrinsic.texi: Various minor cleanups.
4923 2007-01-02 Steven G. Kargl <kargls@comcast.net>
4925 * trans-intrinsic.c (gfc_conv_intrinsic_ibits): Fix call to
4928 2007-01-02 Tobias Burnus <burnus@net-b.de>
4931 * scanner.c (open_included_file): Support full-path filenames.
4933 2007-01-02 Paul Thomas <pault@gcc.gnu.org>
4936 * interface.c (check_sym_interfaces): Remove call to
4937 resolve_global_procedure.
4938 gfortran.h : Remove prototype for resolve_global_procedure.
4939 resolve.c (resolve_global_procedure): Add static attribute
4940 to function declaration.
4942 2007-01-01 Steven G. Kargl <kargls@comcast.net>
4944 * ChangeLog: Copy to ...
4945 * ChangeLog-2006: here.