1 2007-10-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4 * decl.c (match_char_kind): New function.
5 (match_char_spec): Use match_char_kind.
7 2007-10-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
10 * scanner.c (gfc_advance_line): Call debug_hooks->end_source_file
11 and debug_hooks->start_source_file when appropriate, and set
13 (gfc_define_undef_line): New function.
14 (load_file): Don't error out on #define and #undef lines.
15 * parse.c (next_statement): Call gfc_define_undef_line.
16 (gfc_parse_file): Call debug_hooks->start_source_file and
17 debug_hooks->end_source_file for the main source file if
19 * gfortran.h (gfc_linebuf): Add dbg_emitted field.
20 (gfc_define_undef_line): New prototype.
22 2007-10-04 Tobias Schlüter <tobi@gcc.gnu.org>
25 * resolve.c (resolve_operator): Always copy the type for
26 expressions in parentheses.
28 2007-10-04 Paul Thomas <pault@gcc.gnu.org>
32 * interface.c (check_interface1): Revert patch of 10-02.
34 2007-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
37 * trans-decl.c (build_function_decl): Set "externally_visible"
38 attribute on the MAIN program decl.
40 2007-10-03 Tobias Schlüter <tobi@gcc.gnu.org>
43 * resolve.c (has_default_initializer): Move to top. Make bool.
44 (resolve_common_blocks): Simplify logic. Add case for derived
46 (resolve_fl_variable_derived): Split out from ...
47 (resolve_fl_variable): ... here, while adapting to new h_d_i
50 2007-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
53 * options.c (gfc_post_options): Issue an error when
54 -fwhole-program is used.
56 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
59 * interface.c (check_interface1): Specific procedures are
60 always ambiguous if they have the same name.
62 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
65 * primary.c (gfc_match_rvalue): Make all expressions with array
66 references to structure parameters into variable expressions.
68 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
71 * trans-decl.c (init_intent_out_dt): New function.
72 (gfc_trans_deferred_vars): Remove the code for default
73 initialization of INTENT(OUT) derived types and put it
74 in the new function. Call it earlier than before, so
75 that array offsets and lower bounds are available.
77 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
80 * decl.c (get_proc_name): Return rc if rc is non-zero; ie. if
81 the name is a reference to an ambiguous symbol.
83 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
88 * decl.c : Declare gfc_function_kind_locs and
89 gfc_function_type_locus.
90 (gfc_match_kind_spec): Add second argument kind_expr_only.
91 Store locus before trying to match the expression. If the
92 current state corresponds to a function declaration and there
93 is no match to the expression, read to the parenthesis, return
94 kind = -1, dump the expression and return.
95 (gfc_match_type_spec): Renamed from match_type_spec and all
96 references changed. If an interface or an external function,
97 store the locus, set kind = -1 and return. Otherwise, if kind
98 is already = -1, use gfc_find_symbol to try to find a use
99 associated or imported type.
100 match.h : Prototype for gfc_match_type_spec.
101 * parse.c (match_deferred_characteristics): New function.
102 (parse_spec): If in a function, statement is USE or IMPORT
103 or DERIVED_DECL and the function kind=-1, call
104 match_deferred_characteristics. If kind=-1 at the end of the
105 specification expressions, this is an error.
106 * parse.h : Declare external gfc_function_kind_locs and
107 gfc_function_type_locus.
109 2007-09-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
111 * module.c (mio_expr): Avoid -Wcast-qual warning.
113 2007-09-27 Tobias Schlüter <tobi@gcc.gnu.org>
115 * arith.c (reduce_binary_aa): Fix capitalization.
116 * check.c (gfc_check_dot_product): Likewise.
117 (gfc_check_matmul): Likewise.
118 * expr.c (gfc_check_conformance): Likewise.
119 (gfc_check_assign): Likewise.
120 (gfc_default_initializer): Simplify logic.
121 * trans.c (gfc_msg_bounds): Make const.
122 (gfc_msg_fault): Likewise.
123 (gfc_msg_wrong_return): Likewise.
124 * trans.h: Add const to corresponding extern declarations.
126 2007-09-27 Paul Thomas <pault@gcc.gnu.org>
129 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Allow for the
130 possibility of the optional KIND argument by making arg
131 an array, counting the number of arguments and using arg[0].
133 2007-09-26 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
136 * invoke.texi: Add note to -ffpe-trap option. Fix typos.
138 2007-09-23 Tobias Schlüter <tobi@gcc.gnu.org>
141 * io.c (check_format_string): Move NULL and constant checks into
143 (check_io_constraints): Call gfc_simplify_expr() before calling
144 check_format_string(). Remove NULL and constant checks.
146 2007-09-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
149 * scanner.c, parse.c, gfortran.h: Revert revision 128671.
151 2007-09-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
154 * scanner.c (preprocessor_line): Call linemap_add when exiting
156 (gfc_new_file): Adjust debug code for USE_MAPPED_LOCATION.
158 2007-09-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
161 * trans-types.c (gfc_get_desc_dim_type): Mark artificial
162 variables with TREE_NO_WARNING.
163 (gfc_get_array_descriptor_base): Likewise.
165 2007-09-22 Paul Thomas <pault@gcc.gnu.org>
169 * trans-decl.c (gfc_create_module_variable): Output
170 derived type parameters.
171 * arith.c (gfc_parentheses): Return the argument if
172 it is a constant expression.
173 * primary.c (gfc_match_rvalue): Remove the clearing of
174 the module name and the use_assoc attribute for derived
175 type parameter expressions.
177 2007-09-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
180 * scanner.c (gfc_advance_line): Call debug_hooks->start_source_file
181 and debug_hooks->end_source_file when entering and exiting
183 (gfc_define_undef_line): New function.
184 (load_file): Ignore #define and #undef preprocessor lines
185 while reading source files.
186 * parse.c (next_statement): Handle #define and #undef
188 (gfc_parse_file): Call debug_hooks->start_source_file and
189 debug_hooks->end_source_file for the main source file if
190 requested by the debug format.
191 * gfortran.h (gfc_define_undef_line): Add prototype.
193 2007-09-22 Tobias Burnus <burnus@net-b.de>
196 * scanner.c (skip_free_comments): Warn if !$OMP& is used
197 if no OpenMP directive is to be continued.
199 2007-09-21 Paul Thomas <pault@gcc.gnu.org>
201 *trans-expr.c (gfc_trans_pointer_assignment): Convert array
202 descriptor for subref pointer assignements, rather than using
203 the loop info version.
205 2007-09-21 Tobias Burnus <burnus@net-b.de>
208 * simplify.c (gfc_simplify_transfer): Warn if source size
209 is smaller than result size.
211 2007-09-20 Asher Langton <langton2@llnl.gov>
214 * gfortran.h : Add init_local_* enums and init_flag_* flags to
216 * lang.opt: Add -finit-local-zero, -finit-real, -finit-integer,
217 -finit-character, and -finit-logical flags.
218 * invoke.texi: Document new options.
219 * resolve.c (build_init_assign): New function.
220 (apply_init_assign): Move part of function into build_init_assign.
221 (build_default_init_expr): Build local initializer (-finit-*).
222 (apply_default_init_local): Apply local initializer (-finit-*).
223 (resolve_fl_variable): Try to add local initializer (-finit-*).
224 * options.c (gfc_init_options, gfc_handle_option,
225 gfc_post_options): Handle -finit-local-zero, -finit-real,
226 -finit-integer, -finit-character, and -finit-logical flags.
228 2007-09-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
231 * gfortran.h (symbol_attribute): Add zero_comp field.
232 * symbol.c (gfc_use_derived): Handle case of emtpy derived types.
233 * decl.c (gfc_match_data_decl): Likewise.
234 (gfc_match_derived_decl): Likewise.
235 * module.c (ab_attribute, attr_bits): Add AB_ZERO_COMP member.
236 (mio_symbol_attribute): Write and read AB_ZERO_COMP.
237 * resolve.c (resolve_symbol): Handle case of emtpy derived types.
238 * parse.c (parse_derived): Likewise.
240 2007-09-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
243 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
244 reduce_binary_aa): Call ourselves recursively if an element of
245 the constructor is itself a constant array.
247 2007-09-20 Tobias Schlüter <tobi@gcc.gnu.org>
249 * io.c (resolve_tag_format): New function using code split out
250 and simplified from ...
251 (resolve_tag): ... this function. Simplify logic. Unify
252 IOSTAT, IOLENGTH and SIZE handling.
254 2007-09-20 Christopher D. Rickett <crickett@lanl.gov>
257 * resolve.c (gfc_iso_c_func_interface): Use information from
258 subcomponent if applicable.
260 2007-09-20 Tobias Burnus <burnus@net-b.de>
263 * intrinsic.text: Add documentation of the intrinsic modules.
264 * gfortran.texi: Link to intrinsic-modules section and to
267 2007-09-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
270 * trans-array.c (gfc_conv_ss_startstride): Only perform bounds
271 checking for optional args when they are present.
273 2007-09-18 Tobias Burnus <burnus@net-b.de>
276 * resolve.c (resolve_elemental_actual): Check for conformance
277 of intent out/inout dummies.
279 2007-09-17 Tobias Burnus <burnus@net-b.de>
282 * resolve.c (resolve_symbol): Reject public variable of
283 private derived-types for Fortran 95.
285 2007-09-17 Tobias Burnus <burnus@net-b.de>
287 * resolve.c (resolve_fl_procedure): Allow private dummies
290 2007-09-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
292 * trans-types.c (gfc_get_desc_dim_type): Do not to try
294 (gfc_get_array_descriptor_base): Likewise.
295 (gfc_get_mixed_entry_union): Likewise
296 (gfc_get_derived_type): Set decl location for fields and
299 2007-09-16 Paul Thomas <pault@gcc.gnu.org>
305 * trans.h : Add extra argument to gfc_build_array_ref. Rename
306 gfc_conv_aliased_arg to gfc_conv_subref_array_arg. Move
307 prototype of is_aliased_array to gfortran.h and rename it
308 gfc_is_subref_array. Add field span to lang_decl, add a new
309 decl lang specific flag accessed by GFC_DECL_SUBREF_ARRAY_P
310 and a new type flag GFC_DECL_SUBREF_ARRAY_P.
311 * trans.c (gfc_build_array_ref): Add the new argument, decl.
312 If this is a subreference array pointer, use the lang_decl
313 field 'span' to calculate the offset in bytes and use pointer
314 arithmetic to address the element.
315 * trans-array.c (gfc_conv_scalarized_array_ref,
316 gfc_conv_array_ref): Add the backend declaration as the third
317 field, if it is likely to be a subreference array pointer.
318 (gfc_conv_descriptor_dimension, gfc_trans_array_ctor_element,
319 gfc_trans_array_constructor_element, structure_alloc_comps,
320 gfc_conv_array_index_offset): For all other references to
321 gfc_build_array_ref, set the third argument to NULL.
322 (gfc_get_dataptr_offset): New function.
323 (gfc_conv_expr_descriptor): If the rhs of a pointer assignment
324 is a subreference array, then calculate the offset to the
325 subreference of the first element and set the descriptor data
326 pointer to this, using gfc_get_dataptr_offset.
327 trans-expr.c (gfc_get_expr_charlen): Use the expression for the
328 character length for a character subreference.
329 (gfc_conv_substring, gfc_conv_subref_array_arg): Add NULL for
330 third argument in call to gfc_build_array_ref.
331 (gfc_conv_aliased_arg): Rename to gfc_conv_subref_array_arg.
332 (is_aliased_array): Remove.
333 (gfc_conv_function_call): Change reference to is_aliased_array
334 to gfc_is_subref_array and reference to gfc_conv_aliased_arg to
335 gfc_conv_subref_array_arg.
336 (gfc_trans_pointer_assignment): Add the array element length to
337 the lang_decl 'span' field.
338 * gfortran.h : Add subref_array_pointer to symbol_attribute and
339 add the prototype for gfc_is_subref_array.
340 * trans-stmt.c : Add NULL for third argument in all references
341 to gfc_build_array_ref.
342 * expr.c (gfc_is_subref_array): Renamed is_aliased_array.
343 If this is a subreference array pointer, return true.
344 (gfc_check_pointer_assign): If the rhs is a subreference array,
345 set the lhs subreference_array_pointer attribute.
346 * trans-decl.c (gfc_get_symbol_decl): Allocate the lang_decl
347 field if the symbol is a subreference array pointer and set an
348 initial value of zero for the 'span' field.
349 * trans-io.c (set_internal_unit): Refer to is_subref_array and
350 gfc_conv_subref_array_arg.
351 (nml_get_addr_expr): Add NULL third argument to
353 (gfc_trans_transfer): Use the scalarizer for a subreference
356 2007-09-13 Thomas Koenig <tkoenig@gcc.gnu.org>
358 * iresolve.c (resolve_mask_arg): If a mask is an array
359 expression, convert it to kind=1.
361 2007-09-13 Tobias Burnus <burnus@net-b.de>
364 * expr.c (gfc_check_conformance): Print ranks in the error message.
365 * resolve.c (resolve_elemental_actual): Check also conformance of
366 the actual arguments for elemental functions.
368 2007-09-13 Tobias Burnus <burnus@net-b.de>
370 * symbol.c (gfc_add_elemental,gfc_add_pure,gfc_add_recursive):
371 Allow prefixes only to be specified once.
373 2007-09-13 Tobias Burnus <burnus@net-b.de>
376 * symbol.c (check_conflict): Add conflict of ELEMENTAL with Bind(C).
378 2007-09-12 Tobias Burnus <burnus@net-b.de>
381 * check.c (scalar_check): Move up in the file.
382 (kind_check): Call scalar_check.
383 (dim_check): If optional, do not call nonoptional_check; use
385 (gfc_check_all_any,gfc_check_count,gfc_check_cshift,gfc_check_eoshift,
386 gfc_check_lbound,gfc_check_minloc_maxloc,check_reduction,
387 gfc_check_spread,gfc_check_ubound): Use true/false instead of 0/1
388 for dim_check; honor changed meaning of optional.
389 (gfc_check_int): Replace checks by kind_check.
390 (gfc_check_size): Replace checks by dim_check.
392 2007-09-12 Tobias Burnus <burnus@net-b.de>
396 * symbol.c (check_conflict): Add conflict between INTRINSIC and ENTRY
397 and between BIND(C) and PARAMETER.
399 2007-09-12 Tobias Burnus <burnus@net-b.de>
401 * trans-expr.c (gfc_conv_initializer): Fix expr == NULL check.
403 2007-09-12 Jan Hubicka <jh@suse.cz>
405 * f95-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
407 2007-09-12 Christopher D. Rickett <crickett@lanl.gov>
410 * trans-expr.c (gfc_conv_initializer): Remove unnecessary test for
411 intmod_sym_id and use derived symbol to set new kind of C_NULL_PTR
412 and C_NULL_FUNPTR expressions.
414 2007-09-11 Christopher D. Rickett <crickett@lanl.gov>
417 * trans-expr.c (gfc_trans_structure_assign): Convert component
418 C_NULL_PTR and C_NULL_FUNPTR component initializers to (void *).
419 * trans-types.c (gfc_get_derived_type): Create a backend_decl for
420 the c_address field of C_PTR and C_FUNPTR and ensure initializer
421 is of proper type/kind for (void *).
423 2007-09-11 Jan Hubicka <jh@suse.cz>
425 * f95-lang.c (gfc_expand_function): Kill.
426 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
428 2007-09-08 Tobias Burnus <burnus@net-b.de>
431 * gfortran.texi: Document when CPP is called.
433 * intrinsic.texi (IOR): Fix typos.
435 2007-09-10 Paul Thomas <pault@gcc.gnu.org>
438 * trans-expr.c (copyable_array_p): Add tests that expression
439 is a variable, that it has no subreferences and that it is a
441 (gfc_trans_assignment): Change conditions to suit modifications
444 2007-09-06 Tom Tromey <tromey@redhat.com>
446 * scanner.c (get_file): Update.
448 (gfc_next_char_literal): Use gfc_linebuf_linenum.
449 * f95-lang.c (gfc_init): Update.
450 * gfortran.h (gfc_linebuf_linenum): New macro.
452 2007-09-05 Sandra Loosemore <sandra@codesourcery.com>
454 * trans-decl.c (build_entry_thunks): Use set_cfun.
455 (gfc_generate_function_code): Likewise.
457 2007-09-05 Paul Thomas <pault@gcc.gnu.org>
460 * primary.c (gfc_match_rvalue): Make expressions that refer
461 to derived type parameters that have array references into
462 variable expressions. Remove references to use association
466 * decl.c (add_init_expr_to_sym): Provide assumed character
467 length parameters with the length of the initialization
468 expression, if a constant, or that of the first element of
471 2007-09-04 Janus Weil <jaydub66@gmail.com>
472 Paul Thomas <pault@gcc.gnu.org>
474 * decl.c (match_procedure_decl,match_procedure_in_interface,
475 gfc_match_procedure): Handle PROCEDURE statements.
476 * gfortran.h (struct gfc_symbol): New member "gfc_symbol *interface".
477 (enum gfc_statement): New element "ST_PROCEDURE".
478 (strcut symbol_attribute): New member "unsigned procedure".
479 * interface.c (check_interface0): Extended error checking.
480 * match.h: Add gfc_match_procedure prototype.
481 * parse.c (decode_statement,next_statement,gfc_ascii_statement,
482 parse_derived,parse_interface): Implement PROCEDURE statements.
483 * resolve.c (resolve_symbol): Ditto.
484 * symbol.c (check_conflict): Ditto.
485 (gfc_add_proc): New function for setting the procedure attribute.
486 (copy_formal_args): New function for copying formal argument lists.
488 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
490 * Make-lang.in (gfortranspec.o): Remove SHLIB_MULTILIB.
492 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
494 * gfortranspec.c (lang_specific_driver): Use CONST_CAST2.
495 * options.c (gfc_post_options): Supply a TYPE for CONST_CAST.
496 * parse.c (parse_omp_structured_block): Likewise,
497 * st.c (gfc_free_statement): Likewise,
499 2007-09-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
502 * libgfortran.h: New file.
503 * iso-fortran-env.def: Use macros in the new header instead of
504 hardcoded integer constants.
505 * Make-lang.in (F95_PARSER_OBJS, GFORTRAN_TRANS_DEPS): Add
506 fortran/libgfortran.h.
507 * gfortran.h (GFC_STD_*, GFC_FPE_*, options_convert,
508 ioerror_codes): Remove.
509 * trans.c (ERROR_ALLOCATION): Remove.
510 (gfc_call_malloc, gfc_allocate_with_status,
511 gfc_allocate_array_with_status): Use LIBERROR_ALLOCATION.
512 * trans-types.h (GFC_DTYPE_*): Remove.
513 * trans-decl.c (gfc_generate_function_code): Use
514 GFC_CONVERT_NATIVE instead of CONVERT_NATIVE.
515 * trans-io.c (set_parameter_value, set_parameter_ref): Use
516 LIBERROR_* macros instead of IOERROR_ macros.
517 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use
518 LIBERROR_END and LIBERROR_EOR instead of hardcoded constants.
519 * options.c (gfc_init_options): Use GFC_CONVERT_NATIVE instead of
521 (gfc_handle_option): Use GFC_CONVERT_* macros instead of CONVERT_*.
523 2007-09-02 Steven G. Kargl <kargl@gcc.gnu.org>
525 * invoke.texi: Fix the -frange-checking option entry.
527 2007-09-02 Roger Sayle <roger@eyesopen.com>
529 * decl.c (match_string_p): New helper function to explicitly match
530 a string of characters.
531 (match_attr_spec): Remove no longer needed DECL_COLON from decl_types.
532 Delete decls array and peek_char. Rewrite decl attribute parser to
533 avoid calling gfc_match_strings.
534 * match.c (gfc_match_strings): Delete unused function.
535 * match.h (gfc_match_strings): Delete prototype.
537 2007-09-02 Tobias Schlüuter <tobi@gcc.gnu.org>
539 * dump-parse-tree.c (show_char_const): New function.
540 (gfc_show_expr): Use it.
541 * expr.c (find_substring_ref): Rework to not keep characters
542 dangling beyond end of string.
544 2007-09-02 H.J. Lu <hongjiu.lu@intel.com>
547 * array.c (expand_iterator): Initialize frame.prev.
549 2007-08-31 Tobias Burnus <burnus@net-b.de>
552 * io.c (match_io): Also diagnose extra comma for READ.
554 2007-08-31 Joseph Myers <joseph@codesourcery.com>
556 * intrinsic.texi (LGAMMA): Remove empty @cindex line.
558 2007-08-31 Paul Thomas <pault@gcc.gnu.org>
564 * gfortran.h : Add prototype for gfc_resolve_substring_charlen.
565 * resolve.c (gfc_resolve_substring_charlen): New function.
566 (resolve_ref): Call gfc_resolve_substring_charlen.
567 (gfc_resolve_character_operator): New function.
568 (gfc_resolve_expr): Call the new functions in cases where the
569 character length is missing.
570 * iresolve.c (cshift, eoshift, merge, pack, reshape, spread,
571 transpose, unpack): Call gfc_resolve_substring_charlen for
572 source expressions that are character and have a reference.
573 * trans.h (gfc_trans_init_string_length) Change name to
574 gfc_conv_string_length; modify references in trans-expr.c,
575 trans-array.c and trans-decl.c.
576 * trans-expr.c (gfc_trans_string_length): Handle case of no
578 (gfc_conv_aliased_arg): Remove code for treating substrings
579 and replace with call to gfc_trans_string_length.
580 * trans-array.c (gfc_conv_expr_descriptor): Remove code for
581 treating strings and call gfc_trans_string_length instead.
583 2007-08-30 Tobias Burnus <burnus@net-b.de>
586 * interface.c (check_interface0): Improve error for external procs.
587 (check_sym_interfaces): Fix checking of module procedures.
589 2007-08-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
592 * iresolve.c (gfc_resolve_getarg): Handle non-default integer
594 * check.c (gfc_check_getarg): New function
595 * intrinsic.h: Add prototype for gfc_check_getarg.
596 * intrinsic.c (add_subroutines): Add reference to gfc_check_getarg.
597 * intrinsic.texi (GETARG): Adjust documentation.
599 2007-08-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
600 Tobias Burnus <burnus@gcc.gnu.org>
603 * intrinsic.c (add_functions): Add IS_IOSTAT_END and
604 IS_IOSTAT_EOR intrinsics.
605 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_IOSTAT_END and
606 GFC_ISYM_IS_IOSTAT_EOR.
607 * trans-intrinsic.c (gfc_conv_has_intvalue): New function.
608 (gfc_conv_intrinsic_function): Call gfc_conv_has_intvalue for
609 GFC_ISYM_IS_IOSTAT_END and GFC_ISYM_IS_IOSTAT_EOR.
610 * intrinsic.texi: Add IS_IOSTAT_END and IS_IOSTAT_EOR.
612 2007-08-28 Christopher D. Rickett <crickett@lanl.gov>
615 * decl.c (build_sym): Pass number of identifiers on line to
617 (set_binding_label): Verify that only one identifier given if
618 NAME= specified, even if the given binding label has zero length.
619 (gfc_match_bind_c): Remove declaration for has_name_equals because
620 it hides the static global one that is needed.
622 2007-08-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
624 * trans-array.c (gfc_grow_array): Use gfc_call_realloc.
625 (gfc_array_allocate): Use gfc_allocate_with_status and
626 gfc_allocate_array_with_status.
627 (gfc_array_deallocate): Use gfc_deallocate_with_status.
628 (gfc_trans_dealloc_allocated): Use gfc_deallocate_with_status.
629 * trans-stmt.c (gfc_trans_allocate): Use gfc_allocate_with_status.
630 (gfc_trans_deallocate): Use gfc_deallocate_with_status.
631 * trans.c (gfc_allocate_with_status, gfc_allocate_array_with_status,
632 gfc_deallocate_with_status, gfc_call_realloc): New functions.
633 * trans.h (gfc_allocate_with_status, gfc_allocate_array_with_status,
634 gfc_deallocate_with_status, gfc_call_realloc): New prototypes.
635 (gfor_fndecl_internal_realloc, gfor_fndecl_allocate,
636 gfor_fndecl_allocate_array, gfor_fndecl_deallocate): Remove.
637 * f95-lang.c (gfc_init_builtin_functions): Create decl for
639 * trans-decl.c (gfor_fndecl_internal_realloc,
640 gfor_fndecl_allocate, gfor_fndecl_allocate_array,
641 gfor_fndecl_deallocate): Remove function decls.
642 (gfc_build_builtin_function_decls): Likewise.
644 2007-08-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
647 Revert previous patch.
649 2007-08-28 Jakub Jelinek <jakub@redhat.com>
652 * Make-lang.in (fortran/trans-types.o): Depend on $(FLAGS_H).
653 * trans-types.c: Include flags.h.
654 (gfc_get_nodesc_array_type): Add TYPE_DECL TYPE_NAME with
655 correct bounds and dimensions for packed arrays.
657 2007-08-27 Tobias Burnus <burnus@net-b.de>
659 * simplify.c (gfc_simplify_lgamma): Fix mpfr_lgamma call.
661 2007-08-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
664 * trans-io.c (create_dummy_iostat): New function to create a unique
665 dummy variable expression to use with IOSTAT.
666 (gfc_trans_inquire): Use the new function to pass unit number error info
667 to run-time library if a regular IOSTAT variable was not given.
669 2007-08-26 H.J. Lu <hongjiu.lu@intel.com>
671 * gfortran.h (gfc_isym_id): Add GFC_ISYM_GAMMA and
674 2007-08-26 Asher Langton <langton2@llnl.gov>
675 Tobias Burnus <burnus@net-b.de>
677 * gfortran.h (gfc_option_t): Add flag_recursive.
678 * lang.opt: Add -frecursive option and update -fopenmp.
679 * invoke.texi (-frecursive): Document new option.
680 (-fopenmp,-fno-automatic,-fmax-stack-var-size): Update.
681 * options.c (gfc_init_options, gfc_post_options,
682 gfc_handle_option): Add -frecursive and modify -fopenmp.
683 (gfc_post_options): Add warning for conflicting flags.
685 2007-08-26 Tobias Burnus <burnus@net-b.de>
688 * module.c (mio_symbol_ref,mio_interface_rest): Return pointer_info.
689 (load_operator_interfaces): Support multible loading of an operator.
691 2007-08-26 Tobias Burnus <burnus@net-b.de>
694 * match.c (gfc_match_common): Remove SEQUENCE diagnostics.
695 * resolve.c (resolve_common_blocks): Add SEQUENCE diagnostics;
696 fix walking through the tree.
698 2007-08-26 Tobias Burnus <burnus@net-b.de>
701 * intrinsic.h (gfc_simplify_gamma,gfc_simplify_lgamma,
702 gfc_resolve_gamma,gfc_resolve_lgamma): New function declations.
703 * mathbuiltins.def: Define GAMMA and LGAMMA.
704 * intrinsic.c (add_functions): Add GAMMA, DGAMMA, LGAMMA, ALGAMA
706 * simplify.c (gfc_simplify_gamma,gfc_simplify_lgamma): New functions.
707 * iresolve.c (gfc_resolve_gamma,gfc_resolve_lgamma): New functions.
708 * intrinsic.texi: Add documentation for GAMMA and LGAMMA.
710 2007-08-26 Tobias Burnus <burnus@net-b.de>
713 * parse.c (parse_derived): Support empty derived type
714 definitions for Fortran 2003.
716 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
718 * trans-openmp.c (gfc_omp_privatize_by_reference): Constify.
719 * trans.h (gfc_omp_privatize_by_reference): Likewise.
721 2007-08-24 Tobias Burnus <burnus@net-b.de>
724 * intrinsic.c (gfc_intrinsic_func_interface): Fix initialization
727 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org>
730 * iresolve.c: Don't convert array masks.
732 2007-08-24 Tobias Burnus <burnus@net-b.de>
735 * trans-array.c (gfc_conv_expr_descriptor): Copy bounds for
736 whole-array pointer assignments.
738 2007-08-23 Jakub Jelinek <jakub@redhat.com>
740 * decl.c (variable_decl): Don't share charlen structs if
742 * trans-decl.c (create_function_arglist): Assert
743 f->sym->ts.cl->backend_decl is NULL instead of unsharing
746 2007-08-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
749 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Remove
750 runtime error checking.
752 2007-08-22 Roger Sayle <roger@eyesopen.com>
753 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
755 * match.c (intrinsic_operators): Delete.
756 (gfc_match_intrinsic_op): Rewrite matcher to avoid calling
759 2007-08-22 Christopher D. Rickett <crickett@lanl.gov>
762 * resolve.c (gfc_iso_c_sub_interface): Remove setting of type and
763 kind for optional SHAPE parameter of C_F_POINTER.
765 2007-08-22 Janus Weil <jaydub66@gmail.com>
767 * decl.c (match_attr_spec): Pass on errors from gfc_match_bind_c.
768 (gfc_match_bind_c): Bugfix in check for NAME= with abstract interfaces.
769 (gfc_match_mopdproc): Bugfix to reject module procedures in
772 2007-08-22 Kai Tietz <kai.tietz@onevision.com>
774 * f95-lang.c: (gfc_init_decl_processing): Choose sizetype by using
777 2007-08-21 Paul Brook <paul@codesourcery.com>
778 Nathan Sidwell <nathan@codesourcery.com>
779 Mark Mitchell <mark@codesourcery.com>
780 Joseph Myers <joseph@codesourcery.com>
782 * gfortranspec.c (lang_specific_driver): Use pkgversion_string.
783 * Make-lang.in (gfortran.pod): Define BUGURL.
784 * invoke.texi: Use BUGURL for bug-reporting instructions.
786 2007-08-19 Roger Sayle <roger@eyesopen.com>
788 * match.c (intrinsic_operators): Make static.
789 (gfc_op2string): New function for converting a gfc_intrinsic_op to
790 to a "const char*", replacing the macro of the same name.
791 * gfortran.h (intrinsic_operators): Delete prototype.
792 (gfc_op2string): Replace macro with function prototype.
794 2007-08-18 Tobias Burnus <burnus@net-b.de>
796 * gfortran.h (gfc_is_intrinsic_typename): Add declaration.
797 * symbol.c (gfc_is_intrinsic_typename): New function.
798 * parse.c (decode_statement): Check for space in ABSTRACT INTERFACE.
799 (parse_interface): Use gfc_is_intrinsic_typename.
800 * decl.c (gfc_match_derived_decl): Ditto.
801 * module.c (gfc_match_use): Use gcc_unreachable() for
802 INTERFACE_ABSTRACT in switch().
804 2007-08-18 Roger Sayle <roger@eyesopen.com>
806 * primary.c (match_logical_constant_string): New function to match
807 a ".true." or a ".false.".
808 (match_logical_constant): Use it instead of gfc_match_strings.
810 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
811 Janus Weil <jaydub66@gmail.com>
813 * interface.c (gfc_match_interface,gfc_match_abstract_interface,
814 gfc_match_end_interface,gfc_add_interface): Add abstract interface.
815 * dump-parse-tree.c (gfc_show_attr): Ditto.
816 * gfortran.h (interface_type,symbol_attribute): Ditto.
817 * module.c (gfc_match_use,ab_attribute,attr_bits,
818 mio_symbol_attribute): Ditto.
819 * resolve.c (resolve_function): Ditto.
821 * parse.c (decode_statement): Ditto.
822 (parse_interface): Ditto, check for C1203 (name of abstract interface
823 cannot be the same as an intrinsic type).
824 * decl.c (gfc_match_bind_c): Check for NAME= with abstract interfaces.
825 (access_attr_decl): Handle Abstract interfaces.
827 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
830 * expr.c (gfc_check_pointer_assign): If the rhs is the
831 initialization expression for the rhs, there is no error.
833 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
836 * trans-array.c (get_array_ctor_strlen): Set the character
837 length of a zero length array to zero.
839 2007-08-16 Tobias Burnus <burnus@net-b.de>
842 * module.c (gfc_match_use): Mark user operators as such.
843 (find_use_name_n): Distinguish between operators and other symbols.
844 (find_use_name,number_use_names,mio_namelist,
845 load_operator_interfaces,load_generic_interfaces,read_module,
846 write_generic): Update find_use_name_n calls.
848 2007-08-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
851 * trans.c (gfc_create_var_np): Do not emit warnings for
854 2007-08-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
857 * decl.c (gfc_get_type_attr_spec): Fix whitespace.
858 (gfc_match_derived_decl): Fix logic.
860 2007-08-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
863 * trans-intrinsic.c (build_fixbound_expr): Convert to result type
866 2007-08-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
869 * trans-expr.c (gfc_conv_substring_expr): Only call
870 gfc_conv_substring if expr->ref is not NULL.
871 * expr.c (gfc_is_constant_expr): If e->ref is NULL, the substring
872 expression might be a constant.
873 (gfc_simplify_expr): Handle missing start and end, as well as
876 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
879 * match.c (gfc_match_call): Do not create a new symtree in the
880 case where the existing symbol is external and not referenced.
882 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
885 * decl.c (variable_decl): Check for an imported symbol
886 by looking for its symtree and testing for the imported
888 (gfc_match_import): Remove change of symbol's namespace
889 and set the attribute imported instead.
890 * symbol.c (gfc_get_sym_tree): It is not an error if a
892 * gfortran.h : Add the 'imported' to symbol_attribute.
894 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
897 * trans-array.c (gfc_conv_array_transpose): Set the offset
898 of the destination to zero if the loop is zero based.
900 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
903 * intrinsic.c (add_functions): Add optional KIND argument to ACHAR.
904 * iresolve.c (gfc_resolve_achar): Handle the KIND argument.
905 * check.c (gfc_check_achar): Check for the optional KIND argument.
906 * simplify.c (gfc_simplify_achar): Use KIND argument.
907 * intrinsic.h (gfc_check_achar, gfc_simplify_achar,
908 gfc_resolve_achar): Adjust prototypes.
910 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
914 * trans-expr.c (gfc_conv_function_call): When no formal argument
915 list is available, we still substitute missing optional arguments.
916 * check.c (gfc_check_random_seed): Correct the check on the
917 number of arguments to RANDOM_SEED.
918 * intrinsic.c (add_subroutines): Add a resolution function to
920 * iresolve.c (gfc_resolve_random_seed): New function.
921 * intrinsic.h (gfc_resolve_random_seed): New prototype.
923 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
926 * error.c (error_uinteger): New function.
927 (error_integer): Call error_uinteger.
928 (error_print): Handle %u, %lu, %li and %ld format specifiers.
929 * interface.c (compare_actual_formal): Use the new %lu specifier.
931 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
934 * lang.opt (-fmodule-private): New option.
935 * gfortran.h (gfc_option_t): Add flag_module_private member.
936 * invoke.texi (-fmodule-private): Document the new option.
937 * module.c (gfc_check_access): Allow the -fmodule-private option
938 to modify the default behaviour.
939 * options.c (gfc_init_options): Initialize flag_module_private.
940 (gfc_handle_option): Handle -fmodule-private.
942 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
945 * intrinsic.c (add_functions): Add KIND arguments to COUNT,
946 IACHAR, ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND
948 * iresolve.c (gfc_resolve_count): Add kind argument.
949 (gfc_resolve_iachar): New function.
950 (gfc_resolve_ichar): Add kind argument.
951 (gfc_resolve_index_func): Likewise.
952 (gfc_resolve_lbound): Likewise.
953 (gfc_resolve_len): Likewise.
954 (gfc_resolve_len_trim): Likewise.
955 (gfc_resolve_scan): Likewise.
956 (gfc_resolve_size): New function.
957 (gfc_resolve_ubound): Add kind argument.
958 (gfc_resolve_verify): Likewise.
959 * trans-decl.c (gfc_get_extern_function_decl): Allow specific
960 intrinsics to have 4 arguments.
961 * check.c (gfc_check_count): Add kind argument.
962 (gfc_check_ichar_iachar): Likewise.
963 (gfc_check_index): Likewise.
964 (gfc_check_lbound): Likewise.
965 (gfc_check_len_lentrim): New function.
966 (gfc_check_scan): Add kind argument.
967 (gfc_check_size): Likewise.
968 (gfc_check_ubound): Likewise.
969 (gfc_check_verify): Likewise.
970 * intrinsic.texi: Update documentation for COUNT, IACHAR, ICHAR,
971 INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND and VERIFY.
972 * simplify.c (get_kind): Whitespace fix.
973 (int_expr_with_kind): New function.
974 (gfc_simplify_iachar): Add kind argument.
975 (gfc_simplify_iachar): Likewise.
976 (gfc_simplify_ichar): Likewise.
977 (gfc_simplify_index): Likewise.
978 (simplify_bound_dim): Likewise.
979 (simplify_bound): Likewise.
980 (gfc_simplify_lbound): Likewise.
981 (gfc_simplify_len): Likewise.
982 (gfc_simplify_len_trim): Likewise.
983 (gfc_simplify_scan): Likewise.
984 (gfc_simplify_shape): Pass NULL as kind argument to gfc_simplify_size.
985 (gfc_simplify_size): Add kind argument.
986 (gfc_simplify_ubound): Likewise.
987 (gfc_simplify_verify): Likewise.
988 * intrinsic.h: Update prototypes and add new ones.
989 * trans-intrinsic.c (gfc_conv_intrinsic_index): Rename into
990 gfc_conv_intrinsic_index_scan_verify.
991 (gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove.
992 (gfc_conv_intrinsic_function): Call
993 gfc_conv_intrinsic_index_scan_verify to translate the INDEX,
994 SCAN and VERIFY intrinsics.
996 2007-08-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
999 * invoke.texi (-fbacktrace): Document the new behaviour.
1001 2007-08-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1004 * trans-array.c (gfc_conv_expr_descriptor): Use
1005 gfc_conv_const_charlen to generate backend_decl of right type.
1006 * trans-expr.c (gfc_conv_expr_op): Use correct return type.
1007 (gfc_build_compare_string): Use int type instead of default
1008 integer kind for single character comparison.
1009 (gfc_conv_aliased_arg): Give backend_decl the right type.
1010 * trans-decl.c (gfc_build_intrinsic_function_decls): Make
1011 compare_string return an int.
1013 2007-08-11 Ian Lance Taylor <iant@google.com>
1015 * f95-lang.c (gfc_get_alias_set): Change return type to
1018 2007-08-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1021 * trans.c (gfc_trans_runtime_check): Reorder arguments and
1022 add extra variable arguments. Hand them to the library function.
1023 * trans.h (gfc_trans_runtime_check): Update prototype.
1024 * trans-array.c (gfc_trans_array_bound_check): Issue more
1025 detailled error messages.
1026 (gfc_conv_array_ref): Likewise.
1027 (gfc_conv_ss_startstride): Likewise.
1028 (gfc_trans_dummy_array_bias): Reorder arguments to
1029 gfc_trans_runtime_check.
1030 * trans-expr.c (gfc_conv_substring): Issue more detailled
1032 (gfc_conv_function_call): Reorder arguments to gfc_trans_runtime_check.
1033 * trans-stmt.c (gfc_trans_goto): Likewise.
1034 * trans-io.c (set_string): Reorder arguments to
1035 gfc_trans_runtime_check and issue a more detailled error message.
1036 * trans-decl.c (gfc_build_builtin_function_decls): Make
1037 runtime_error and runtime_error_at handle a variable number of
1039 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Reorder arguments
1040 to gfc_trans_runtime_check.
1041 (gfc_conv_intrinsic_minmax): Likewise.
1042 (gfc_conv_intrinsic_repeat): Issue more detailled error messages.
1044 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1046 * gfortranspec.c (lang_specific_driver): Use CONST_CAST.
1047 * options.c (gfc_post_options): Likewise.
1048 * parse.c (parse_omp_structured_block): Likewise.
1049 * st.c (gfc_free_statement): Likewise.
1051 2007-08-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1054 * trans-decl.c (gfc_build_builtin_function_decls): Change
1055 prototype for associated.
1056 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert the
1057 result of __builtin_isnan into a boolean.
1058 (gfc_conv_intrinsic_strcmp): Cleanup.
1059 (gfc_conv_associated): Convert the result of the associated
1060 function into a boolean.
1062 2007-08-09 Tobias Burnus <burnus@net-b.de>
1065 * io.c (format_token): Add FMT_ERROR.
1066 (next_char_not_space): Print error/warning when
1067 '\t' are used in format specifications.
1068 (format_lex): Propagate error.
1069 (check_format): Ditto.
1071 2007-08-09 Tobias Burnus <burnus@net-b.de>
1074 * arith.c (arith_error): Point in the error message
1075 to -fno-range-check.
1077 2007-08-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1080 * intrinsic.texi (SIZEOF): Add mention to C_SIZE_T.
1082 2007-08-06 Christopher D. Rickett <crickett@lanl.gov>
1085 * trans-expr.c (gfc_conv_scalar_char_value): Convert the tree and
1086 actual arg expressions for scalar characters passed by-value to
1088 (gfc_conv_function_call): Call gfc_conv_scalar_char_value.
1089 * trans.h: Add prototype for gfc_conv_scalar_char_value.
1090 * trans-decl.c (generate_local_decl): Convert by-value character
1091 dummy args of bind(c) procedures using
1092 gfc_conv_scalar_char_value.
1094 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1097 * iresolve.c (gfc_resolve_alarm_sub): Suffix the subroutine name
1098 with the kind of the STATUS argument.
1100 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1103 * intrinsic.c (add_functions): Fix name of argument to CHDIR.
1105 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1108 * iresolve.c (gfc_resolve_exit): Convert argument to default
1111 2007-08-06 Daniel Franke <franke.daniel@gmail.com>
1113 * resolve.c (derived_pointer): Removed, replaced callers by access
1114 to appropiate attribute bit.
1115 (derived_inaccessable): Shortcut recursion depth.
1116 (resolve_fl_namelist): Fixed checks for private components in namelists.
1118 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1121 * trans.h (gfor_fndecl_string_minmax): New prototype.
1122 * trans-decl.c (gfor_fndecl_string_minmax): New variable.
1123 (gfc_build_intrinsic_function_decls): Create gfor_fndecl_string_minmax.
1124 * check.c (gfc_check_min_max): Allow for character arguments.
1125 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): New function.
1126 (gfc_conv_intrinsic_function): Add special case for MIN and MAX
1127 intrinsics with character arguments.
1128 * simplify.c (simplify_min_max): Add simplification for character
1131 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1134 * invoke.texi: Adjust documentation for option -fsyntax-only.
1136 2007-08-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1137 Tobias Burnus <burnus@gcc.gnu.org>
1140 * intrinsic.h (gfc_check_isnan): Add prototype.
1141 * gfortran.h (gfc_isym_id): Add GFC_ISYM_ISNAN.
1142 * intrinsic.c (add_functions): Add ISNAN intrinsic.
1143 * check.c (gfc_check_isnan): New function.
1144 * trans-intrinsic.c (gfc_conv_intrinsic_isnan): New function.
1145 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_isnan
1147 * intrinsic.texi: Document ISNAN.
1149 2007-08-04 Paul Thomas <pault@gcc.gnu.org>
1152 * symbol.c (get_unique_symtree): Moved from module.c.
1153 * module.c (get_unique_symtree): Moved to symbol.c.
1154 * decl.c (get_proc_name): Transfer the typespec from the local
1155 symbol to the module symbol, in the case that an entry is also
1156 a module procedure. Ensure the local symbol is cleaned up by
1157 pointing to it with a unique symtree.
1159 * dump_parse_tree (gfc_show_code_node): Add EXEC_ASSIGN_CALL.
1161 2008-08-04 Steven G. Kargl <kargl@gcc.gnu.org>
1164 * iresolve.c (gfc_resolve_rrspacing): Convert argument(s) to
1166 (gfc_resolve_scale): Ditto.
1167 (gfc_resolve_set_exponent): Ditto.
1168 (gfc_resolve_spacing): Ditto.
1171 * trans-intrinsic.c (gfc_conv_intrinsic_si_kind,
1172 gfc_conv_intrinsic_sr_kind): Convert the argument(s) to the
1173 expected KIND, and fold the result to the expected KIND.
1175 2007-08-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1178 * f95-lang.c (gfc_init_builtin_functions): Defin builtins for
1179 lround{f,,l} and llround{f,,l}.
1180 * trans-intrinsic.c (build_fix_expr): Generate calls to the
1181 {l,}round{f,,l} functions.
1183 2007-08-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1186 * intrinsic.c (resolve_mask_arg): New function.
1187 (gfc_resolve_maxloc): Use resolve_mask_arg for mask resolution.
1188 (gfc_resolve_maxval): Likewise.
1189 (gfc_resolve_minloc): Likewise.
1190 (gfc_resolve_minval): Likewise.
1191 (gfc_resolve_pack): Likewise.
1192 (gfc_resolve_product): Likewise.
1193 (gfc_resolve_sum): Likewise.
1194 (gfc_resolve_unpack): Likewise.
1196 2007-08-01 Tobias Burnus <burnus@net-b.de>
1199 * match.c (gfc_match_allocate): Better check that STAT is
1202 * check.c (gfc_check_allocated): Reorder checks to improve
1205 2007-08-01 Nick Clifton <nickc@redhat.com>
1207 * arith.c: Change copyright header to refer to version 3 of the
1208 GNU General Public License and to point readers at the COPYING3
1209 file and the FSF's license web page.
1210 * openmp.c, interface.c, intrinsic.c, trans-array.c, trans-expr.c,
1211 symbol.c, iso-fortran-env.def, intrinsic.h, decl.c, trans-array.h,
1212 matchexp.c, dump-parse-tree.c, trans-common.c, array.c,
1213 Make-lang.in, trans-openmp.c, gfortran.h, error.c,
1214 iso-c-binding.def, lang.opt, data.c, trans-const.c, trans-stmt.c,
1215 expr.c, trans-const.h, trans-stmt.h, module.c, trans.c, scanner.c,
1216 trans-types.c, trans.h, gfortranspec.c, trans-types.h,
1217 lang-specs.h, io.c, bbt.c, resolve.c, f95-lang.c, st.c,
1218 iresolve.c, match.c, trans-decl.c, trans-io.c, target-memory.c,
1219 match.h, target-memory.h, parse.c, arith.h, check.c, dependency.c,
1220 parse.h, types.def, convert.c, dependency.h, primary.c,
1221 trans-intrinsic.c, options.c, misc.c, simplify.c: Likewise.
1223 2007-08-01 Daniel Franke <franke.daniel@gmail.com>
1225 * trans-decl.c (generate_local_decl): Emit warning on unused parameter
1226 on "-Wall -Wextra" or "-Wunused-parameter" but not on "-Wall", changed
1227 messages that start with lower case to upper case.
1228 * invoke.texi (-Wparameter-unused): Document differences between gcc
1229 and gfortran regarding this option.
1231 2007-08-01 Daniel Franke <franke.daniel@gmail.com>
1234 * expr.c (check_specification_function): Skip check if no symtree
1237 2007-08-01 Paul Thomas <pault@gcc.gnu.org>
1240 * resolve.c (resolve_entries): Entries declared to be module
1241 procedures must point to the function namespace.
1243 2007-07-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1246 * trans-stmt.c (gfc_trans_return): Convert to correct type.
1248 2007-07-31 Steven G. Kargl <kargl@gcc.gnu.org>
1251 * trans-intrinsic.c (gfc_conv_intrinsic_exponent): Convert to correct
1254 2007-07-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1256 * invoke.texi: Document -fsign-zero flag.
1258 2007-07-29 Paul Thomas <pault@gcc.gnu.org>
1261 * trans-expr.c (gfc_conv_expr_reference): Add block for case of
1262 scalar pointer functions so that NULL result is correctly
1266 * trans-array.c (gfc_trans_array_constructor): On detecting a
1267 multi-dimensional parameter array, set the loop limits.
1269 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
1272 * resolve.c (resolve_fl_parameter): Check for constant shape arrays,
1273 adjusted error message.
1275 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
1277 * invoke.texi: Removed -w from option summary.
1279 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
1282 * intrinsic.texi (IRAND, RAND, RANDOM_NUMBER): Document algorithm
1283 used for random number generator.
1285 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
1287 * gfortran.h, interface.c, resolve.c, symbol.c: Fix comment
1289 * intrinsic.texi, invoke.texi: Fix typos.
1291 2007-07-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1294 * resolve.c (generic_sym): Check for a same symbol and if so, return to
1295 avoid infinite recursion.
1297 2007-07-28 Daniel Franke <franke.daniel@gmail.com>
1302 * gfortran.h (symbol_attribute): Added bits for pointer_comp,
1304 * parse.c (parse_derived): Set pointer_comp/private_comp bits if
1305 the derived type ultimately contains pointer components or private
1307 * module.c (ab_attribute): New values AB_POINTER_COMP, AB_PRIVATE_COMP.
1308 (attr_bits): Added names for new ab_attributes.
1309 (mio_symbol_attribute): Save/restore new attribute bits in modules.
1310 * match.c (gfc_match_namelist): Removed check for namelist objects
1312 * resolve.c (resolve_fl_namelist): Added check for pointer or
1313 private components in nested types. Added check for namelist objects
1316 2007-07-28 Paul Thomas <pault@gcc.gnu.org>
1319 * trans-expr.c (gfc_trans_scalar_assign): Revert to fixed order
1320 for lse and rse pre expressions, for derived types with
1321 allocatable components. Instead, assign the lhs to a temporary
1322 and deallocate after the assignment.
1324 2007-07-28 Janne Blomqvist <jb@gcc.gnu.org>
1327 * trans-stmt.c (gfc_trans_character_select): Replace occurrences
1328 of gfc_c_int_type_node with integer_type_node.
1329 * trans-decl.c (gfc_build_intrinsic_function_decls): Likewise.
1330 (gfc_build_builtin_function_decls): Likewise.
1331 (gfc_generate_function_code): Likewise.
1332 * trans-io.c (gfc_build_io_library_fndecls): Likewise.
1334 2007-07-27 Janne Blomqvist <jb@gcc.gnu.org>
1336 * trans-decl.c (gfc_build_builtin_function_decls): Use existing
1337 gfc_array_index_type rather than creating another typenode for
1338 gfc_index_integer_kind.
1340 2007-07-27 Janne Blomqvist <jb@gcc.gnu.org>
1342 * trans-io.c (gfc_build_io_library_fndecls): Change to use
1343 gfc_array_index_type for array descriptor triplets instead of
1346 2007-07-26 Steven G. Kargl <kargl@gcc.gnu.org>
1349 * resolve.c (resolve_operator): Add INTRINSIC_EQ_OS comparison.
1351 2007-07-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1352 Daniel Franke <franke.daniel@gmail.com>
1355 * primary.c (match_variable): Do not call gfc_add_flavor if symbol has
1356 attribute of ACCESS_PUBLIC or ACCESS_PRIVATE already marked.
1358 2007-07-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1361 * trans-stmt.c (gfc_trans_character_select): Replace the
1362 mechanism with labels by a SWITCH_EXPR.
1363 * trans-decl.c (gfc_build_builtin_function_decls): Change
1364 return type for select_string.
1366 2007-07-27 Paul Thomas <pault@gcc.gnu.org>
1369 * trans-decl.c (gfc_trans_deferred_vars): Set intent(out)
1370 derived types as referenced, if they have the the default
1373 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1375 * gfortran.h (generate_isocbinding_symbol): Constify.
1376 * symbol.c (gen_special_c_interop_ptr, gen_cptr_param,
1377 generate_isocbinding_symbol): Likewise.
1379 2007-07-24 Paul Thomas <pault@gcc.gnu.org>
1383 * trans-expr.c (gfc_conv_function_call): Remove the default
1384 initialization of intent(out) derived types.
1385 * symbol.c (gfc_lval_expr_from_sym): New function.
1386 * matchexp.c (gfc_get_parentheses): Return argument, if it is
1387 character and posseses a ref.
1388 * gfortran.h : Add prototype for gfc_lval_expr_from_sym.
1389 * resolve.c (has_default_initializer): Move higher up in file.
1390 (resolve_code): On detecting an interface assignment, check
1391 if the rhs and the lhs are the same symbol. If this is so,
1392 enclose the rhs in parenetheses to generate a temporary and
1393 prevent any possible aliasing.
1394 (apply_default_init): Remove code making the lval and call
1395 gfc_lval_expr_from_sym instead.
1396 (resolve_operator): Give a parentheses expression a type-
1397 spec if it has no type.
1398 * trans-decl.c (gfc_trans_deferred_vars): Apply the a default
1399 initializer, if any, to an intent(out) derived type, using
1400 gfc_lval_expr_from_sym and gfc_trans_assignment. Check if
1401 the dummy is present.
1403 2007-07-24 Daniel Franke <franke.daniel@gmail.com>
1406 * expr.c (check_init_expr): Simplify matched functions.
1408 2007-07-24 Daniel Franke <franke.daniel@gmail.com>
1411 * intrinsic.c (add_sym): Do not exclude any symbols, even if not part
1412 of the selected standard.
1413 (make generic): Likewise.
1414 (make alias): Likewise, set standard the alias belongs to.
1415 (add_subroutines): Call make_noreturn unconditionally.
1416 (check_intrinsic_standard): Change return value to try.
1417 (gfc_intrinsic_func_interface): Check return value of above function.
1418 (gfc_intrinsic_sub_interface): Likewise.
1420 2007-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1423 * trans-decl.c (generate_function_code): Add argument
1424 for flag_bounds_check to the array for set_options.
1425 * invoke.texi (-fbounds-check): Document new libarary run-time
1428 2007-07-23 Daniel Franke <franke.daniel@gmail.com>
1432 * expr.c (check_transformational): Reject valid transformational
1433 intrinsics to avoid ICE.
1434 (check_inquiry): Report error for assumed character lengths for
1435 all supported standards.
1436 (check_init_expr): Whitespace fix.
1438 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
1442 * decl.c (verify_bind_c_sym): Use the result symbol for functions
1443 with a result clause. Warn if implicitly typed. Verify the type
1444 and rank of the SHAPE argument, if given.
1445 * resolve.c (gfc_iso_c_sub_interface): Use gfc_procedure_use to
1446 check the actual args against the formal, sorting them if
1448 * symbol.c (gen_shape_param): Initialize type of SHAPE param to
1451 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
1454 * trans-decl.c (generate_local_decl): Convert the TREE_TYPE for by
1455 value character dummy args of BIND(C) procedures.
1456 * trans-expr.c (gfc_conv_variable): Do not build address
1457 expression for BT_CHARACTER dummy args.
1459 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
1460 Tobias Burnus <burnus@net-b.de>
1463 * trans-expr.c (gfc_conv_function_call): Handle c_funloc.
1464 * trans-types.c: Add pfunc_type_node.
1465 (gfc_init_types,gfc_typenode_for_spec): Use it.
1466 * resolve.c (gfc_iso_c_func_interface): Fix whitespace and
1467 improve error message.
1469 2007-07-22 Daniel Franke <franke.daniel@gmail.com>
1472 * parse.c (gfc_fixup_sibling_symbols): No replacement of symbols if
1473 the current is a namelist.
1475 2007-07-22 Daniel Franke <franke.daniel@gmail.com>
1481 * gfortran.h (gfc_intrinsic_sym): Changed members elemental, pure,
1482 generic, specific, actual_ok, noreturn into bits of a bitfield,
1483 added bits for inquiry, transformational, conversion.
1484 * check.c (non_init_transformational): Removed, removed all callers.
1485 * intrinsic.c (enum class): New.
1486 (add_sym*): Replaced argument elemetal by enum class. Changed all
1488 (add_functions): Assign appropriate classes to intrinsic functions.
1489 (add_subroutines): Assign appropriate classes to intrinsic subroutines.
1490 (add_conv): Set conversion attribute.
1491 (gfc_init_expr_extensions): Removed, removed all callers.
1492 (gfc_intrinsic_func_interface): Reimplemented check for non-standard
1493 initializatione expressions.
1494 * expr.c (check_specification_function): New.
1495 (gfc_is_constant_expr): Added check for specification functions.
1496 (check_init_expr_arguments): New.
1497 (check_inquiry): Changed return value to MATCH, added checks for
1498 inquiry functions defined by F2003.
1499 (check_transformational): New.
1501 (check_elemental): New.
1502 (check_conversion): New.
1503 (check_init_expr): Call new check functions, add more specific error
1506 2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
1509 * resolve.c (set_name_and_label): Set kind number for character
1510 version of c_f_pointer.
1511 (gfc_iso_c_sub_interface): Set the kind of the SHAPE formal arg to
1512 that of the actual SHAPE arg.
1513 * symbol.c (gen_shape_param): Initialize kind for SHAPE arg.
1515 2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
1518 * symbol.c (generate_isocbinding_symbol): Remove unnecessary
1522 * resolve.c (gfc_iso_c_func_interface): Reject assumed-shape and
1523 deferred-shape arrays as args to C_LOC. Fix bug in testing
1524 character args to C_LOC.
1526 2007-07-21 Lee Millward <lee.millward@gmail.com>
1529 * trans-intrinsic.c (gfc_conv_intrinsic_int): Evaluate all
1530 arguments passed, not just the first one. Adjust code to
1531 refer to "args[0]" instead of "arg" as a result.
1533 2007-07-19 Christopher D. Rickett <crickett@lanl.gov>
1536 * trans-expr.c (gfc_conv_function_call): Inline C_LOC.
1538 2007-07-18 Christopher D. Rickett <crickett@lanl.gov>
1541 * symbol.c (generate_isocbinding_symbol): Fix bug where
1542 ISOCBINDING_FUNPTR was generated for C_LOC instead of the needed
1545 2007-07-17 Janus Weil <jaydub66@gmail.com>
1548 * resolve.c (resolve_fl_namelist): Check for namelist private
1549 components in contained subprograms.
1551 2007-07-17 Paul Thomas <pault@gcc.gnu.org>
1555 * trans-expr.c (gfc_trans_subcomponent_assign): Ensure that
1556 renormalization unity base is done independently of existing
1558 (gfc_trans_scalar_assign): If rhs is not a variable, put
1559 lse->pre after rse->pre to ensure that de-allocation of lhs
1560 occurs after evaluation of rhs.
1562 2007-07-16 Lee Millward <lee.millward@gmail.com>
1567 * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
1568 to operate on a stack allocated array for the intrinsic arguments
1569 instead of creating a TREE_LIST. Add two new parameters for the
1570 array and the number of elements. Update all callers to allocate
1571 an array of the correct length to pass in. Update comment.
1572 (gfc_intrinsic_argument_list_length): New function.
1573 (gfc_conv_intrinsic_conversion): Call it.
1574 (gfc_conv_intrinsic_mnimax): Likewise.
1575 (gfc_conv_intrinsic_merge): Likewise.
1576 (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
1578 (gfc_conv_intrinsic_cmplx): Likewise.
1579 (gfc_conv_intrinsic_ctime): Likewise.
1580 (gfc_covn_intrinsic_fdate): Likewise.
1581 (gfc_conv_intrinsic_ttynam): Likewise.
1582 (gfc_conv_intrinsic_ishftc): Likewise.
1583 (gfc_conv_intrinsic_index): Likewise.
1584 (gfc_conv_intrinsic_scan): Likewise.
1585 (gfc_conv_intrinsic_verify): Likewise.
1586 (gfc_conv_intrinsic_trim): Likewise.
1587 (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
1588 (gfc_conv_intrinsic_exponent): Likewise.
1589 (gfc_conv_intrinsic_bound): Likewise.
1590 (gfc_conv_intrinsic_abs): Likewise.
1591 (gfc_conv_intrinsic_mod): Likewise.
1592 (gfc_conv_intrinsic_sign): Likewise.
1593 (gfc_conv_intrinsic_len): Likewise.
1594 (gfc_conv_intrinsic_adjust): Likewise.
1595 (gfc_conv_intrinsic_si_kind): Likewise.
1597 2007-07-16 Janne Blomqvist <jb@gcc.gnu.org>
1600 * trans-decl.c (gfc_build_builtin_function_decls): Remove
1601 DECL_IS_MALLOC attribute from internal_realloc, thus reverting
1602 part of my 2007-07-03 patch.
1604 2007-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1605 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1608 * gfortran.h (gfc_option_t): Add flag_sign_zero field.
1609 * lang.opt (-fsign-zero): New option.
1610 * trans.h: Rename gfor_fndecl_set_std into gfor_fndecl_set_options.
1611 * trans-decl.c (gfc_build_builtin_function_decls): Build the function
1612 declaration to pass an array containing the options to be used by the
1613 runtime library. (gfc_generate_function_code): Build an array that
1614 contains option values to be passed to the runtime library and the call
1616 * options.c (gfc_init_options): Initialize the flag_sign_zero field.
1617 (gfc_handle_option): Handle the -fsign-zero option.
1619 2007-07-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1622 * trans-array.c (gfc_conv_array_ref): Only evaluate index once.
1624 2007-07-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1627 * iresolve.c (gfc_resolve_mvbits): Convert FROMPOS, LEN and TOPOS
1630 2007-07-14 Thomas Koenig <tkoenig@gcc.gnu.org>
1633 * iresolve.c(gfc_resolve_pack): A scalar mask has
1634 to be kind=4, an array mask with kind<4 is converted
1635 to gfc_default_logical_kind automatically.
1636 (gfc_resolve_unpack): Convert mask to gfc_default_lotical_kind
1639 2007-07-14 Paul Thomas <pault@gcc.gnu.org>
1642 * parse.c (parse_spec): Emit error on unexpected statement
1645 2007-07-13 Daniel Franke <franke.daniel@gmail.com>
1647 * invoke.texi: Unified upper- and lower-case in menus.
1648 (-w, -W): Removed, documented by gcc.
1649 * intrinsic.texi: Unified Class-section entries, added
1650 subroutine/function warning where appropiate.
1652 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
1655 * decl.c (gfc_match_suffix): Removed surplus general error that hides
1656 a more specific message.
1657 * resolve.c (resolve_fl_variable): Reject illegal initializiers only
1658 if not already done.
1659 (resolve_fl_procedure): Added check for initializers of functions.
1661 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
1664 * invoke.texi (-static-libgfortran): Document new option.
1666 2007-07-12 Paul Thomas <pault@gcc.gnu.org>
1670 * module.c (write_generic): Restore patch of 2007-07-10 and use
1671 symbol name if there are no use names.
1673 2007-07-12 Christopher D. Rickett <crickett@lanl.gov>
1676 * decl.c (verify_c_interop_param): Require character string dummy
1677 args to BIND(C) procedures to have length 1.
1678 * resolve.c (resolve_fl_procedure): Modify parameter checking for
1682 * resolve.c (gfc_iso_c_func_interface): Verify that a valid
1683 expression is given as an argument to C_LOC and C_ASSOCIATED.
1684 * trans-io.c (transfer_expr): Add argument for code block. Add
1685 standards check to determine if an error message should be
1686 reported for printing C_PTR or C_FUNPTR.
1687 (transfer_array_component): Update arguments to transfer_expr.
1688 (gfc_trans_transfer): Ditto.
1690 * symbol.c (gen_cptr_param): Fix whitespace.
1692 2007-07-12 Jakub Jelinek <jakub@redhat.com>
1695 * trans.h (GFC_POINTER_TYPE_P): Define.
1696 * trans-types.c (gfc_sym_type): Set it for types on attr->sym.pointer.
1697 * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
1698 if GFC_POINTER_TYPE_P is set on the type.
1700 2007-07-12 Richard Guenther <rguenther@suse.de>
1702 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Convert
1703 arguments to gfc_charlen_type_node.
1704 * trans-io.c (gfc_convert_array_to_string): Convert type
1705 size to gfc_array_index_type.
1707 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
1711 * module.c: Reverted Paul's patch from 2007-07-10.
1713 2007-07-11 Richard Guenther <rguenther@suse.de>
1715 * trans-array.c (gfc_conv_array_parameter): Use correct
1716 types for comparison.
1717 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
1718 correct types for POINTER_PLUS_EXPR.
1719 * trans-stmt.c (gfc_trans_forall_loop): Use correct type
1720 for integer one constant.
1722 2007-07-10 Paul Thomas <pault@gcc.gnu.org>
1725 * resolve.c (is_external_proc): New function. Adds test that
1726 the symbol is not an intrinsic procedure.
1727 * (resolve_function, resolve_call): Replace logical statements
1728 with call to is_external_proc.
1731 * simplify.c (gfc_simplify_transfer): If mold has rank, the
1735 * module.c (write_generic): Write the local name of the
1738 2007-07-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1741 * trans-array.c (gfc_trans_array_constructor): Mark offset field
1742 with TREE_NO_WARNING.
1743 * trans-decl.c (gfc_build_qualified_array): Mark lbound, ubound,
1744 stride and size variables with TREE_NO_WARNING.
1746 2007-07-09 Steven G. Kargl <kargl@gcc.gnu.org>
1748 * trans-decl.c (set_tree_decl_type_code): Remove function.
1749 (generate_local_decl): Remove reference to set_tree_decl_type_code.
1751 2007-07-09 Daniel Franke <franke.daniel@gmail.com>
1754 * trans-decl.c (generate_local_decl) Emit a warning if an unused
1757 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
1760 * module.c (gfc_match_use): Do not set an non-existant
1761 intrinsic operator if a user-defined operator is found.
1763 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
1767 * trans-decl.c (generate_local_decl): Adjusted warning on unused
1768 dummy arguments, tell middle-end not to emit additional warnings.
1770 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
1771 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1774 * gfortran.h (gfc_intrinsic_op): Added INTRINSIC_EQ_OS,
1775 INTRINSIC_NE_OS, INTRINSIC_GT_OS, INTRINSIC_GE_OS,
1776 INTRINSIC_LT_OS and INTRINSIC_LE_OS.
1777 * arith.c (eval_intrinsic, eval_type_intrinsic0): Likewise.
1778 * arith.h (gfc_eq, gfc_ne, gfc_gt, gfc_ge, gfc_lt, gfc_le):
1779 Added gfc_intrinsic_op as third argument type.
1780 * dump-parse-tree.c (gfc_show_expr): Account for new enum values.
1781 * expr.c (simplify_intrinsic_op, check_intrinsic_op): Likewise.
1782 * interface.c (check_operator_interface): Likewise.
1783 (gfc_check_interfaces): Added cross-checks for FORTRAN 77 and
1784 Fortran 90 style operators using new enum values.
1785 (gfc_extend_expr): Likewise.
1786 (gfc_add_interface): Likewise.
1787 * match.c (intrinsic_operators): Distinguish FORTRAN 77 style
1788 operators from Fortran 90 style operators using new enum values.
1789 * matchexp.c (match_level_4): Account for new enum values.
1790 * module.c (mio_expr): Likewise.
1791 * resolve.c (resolve_operator): Deal with new enum values, fix
1792 inconsistent error messages.
1793 * trans-expr.c (gfc_conv_expr_op): Account for new enum values.
1795 2007-07-08 Tobias Burnus <burnus@net-b.de>
1798 * interface.c (get_expr_storage_size): Properly obtain lower bound.
1799 (compare_actual_formal): Add space before parenthesis.
1801 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
1804 * resolve.c (resolve_fl_procedure): Added check for PRIVATE types
1805 in PUBLIC interfaces.
1807 2007-07-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1810 * decl.c (match_attr_spec): Don't return MATCH_ERROR if comma found and
1811 gfc_match_bind_c does not return MATCH_YES.
1813 2007-07-07 Kazu Hirata <kazu@codesourcery.com>
1815 * decl.c, gfortran.h, interface.c, module.c, resolve.c,
1816 trans-array.c, trans-decl.c: Fix comment typos. Follow
1817 spelling conventions.
1818 * intrinsic.texi: Fix typos. Follow spelling conventions.
1820 2007-05-06 Daniel Franke <franke.daniel@gmail.com>
1823 * symbol.c (save_status): New.
1824 * gfortran.h (save_status): Added external declaration.
1825 (check_conflict): Check for conflicting explicite SAVE statements
1827 (gen_special_c_interop_ptr): Use SAVE_EXPLICIT constant.
1828 * module.c (ab_attribute, attr_bits): Removed enumerator value
1829 AB_SAVE for save attribute.
1830 (mio_symbol_attribute): Import/export the full SAVE status,
1831 removed usage of AB_SAVE.
1832 * dump-parse-tree.c (gfc_show_attr): Dump full SAVE status.
1833 * decl.c (add_init_expr_to_sym): Set SAVE_IMPLICIT only if not
1836 2007-07-05 Daniel Franke <franke.daniel@gmail.com>
1837 Tobias Burnus <burnus@net-b.de>
1840 * gfortran.h (symbol_attribute): Change save attribute into an enum.
1841 * decl.c (add_init_expr_to_sym): Set it to SAVE_IMPLICIT.
1842 * symbol.c (gfc_add_save): Check for SAVE_EXPLICIT.
1843 * resolve.c (resolve_fl_variable): Check for SAVE_EXPLICIT.
1844 (resolve_symbol): Allow OMP threadprivate with
1845 initialization SAVEd and save_all variable.
1846 * trans-decl.c (gfc_finish_var_decl): Remove obsolete sym->value check.
1848 2007-07-05 Paul Thomas <pault@gcc.gnu.org>
1851 * match.c (gfc_match_call): Check, in all cases, that a symbol
1852 is neither generic nor a subroutine before trying to add it as
1856 * match.c (gfc_match_do): Reset the implied_index attribute.
1858 2007-07-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1861 * trans-intrinsic.c (trans-intrinsic.c): Handle optional
1862 arguments correctly for MIN and MAX intrinsics.
1864 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1867 * io.c (check_format): Always call gfc_error for errors.
1868 (check_format_string): Change type of this function to try and
1869 return the result of check_format.
1870 (check_io_constraints): Return MATCH_ERROR if check_format_string
1873 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1876 * decl.c (get_proc_name): Include attr->mod_proc in check for error.
1878 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1881 * gfortran.h: Change type of gfc_assign_data_value from void to try.
1882 * data.c (gfc_assign_data_value): Return FAILURE if error found.
1883 * resolve.c (check_data_variable): If gfc_assign_data_value returns
1884 failure, break out of loop and return failure.
1886 2007-07-03 Christopher D. Rickett <crickett@lanl.gov>
1889 * symbol.c (gen_cptr_param): Generate C_PTR and C_FUNPTR if necessary.
1890 (build_formal_args): Pass intrinsic module symbol id to
1893 2007-07-03 Tobias Burnus <burnus@net-b.de>
1896 * resolve.c (resolve_common_blocks): New check function.
1897 (resolve_types): Use it.
1899 2007-07-03 Tobias Burnus <burnus@net-b.de>
1902 * interface.c (get_sym_storage_size): New function.
1903 (get_sym_storage_size): New function.
1904 (compare_actual_formal): Enhance sequence association
1905 support and improve checking.
1907 2007-07-03 Janne Blomqvist <jb@gcc.gnu.org>
1909 * trans-decl.c (gfc_build_builtin_function_decls): Mark
1910 internal_realloc as a malloc function.
1912 2007-07-03 Tobias Burnus <burnus@net-b.de>
1915 * resolve.c (resolve_operator): Check for NULL as operand.
1917 2007-07-02 Tobias Burnus <burnus@net-b.de>
1919 * gfortran.texi (Fortran 2003): Add ISO Bind C.
1920 * intrinsic.texi (C_ASSOCIATED,C_F_POINTER,C_F_PROCPOINTER,
1921 C_FUNLOC,C_LOC): Document new ISO Bind C intrinsics.
1923 2007-07-01 Christopher D. Rickett <crickett@lanl.gov>
1925 * interface.c (gfc_compare_derived_types): Special case for comparing
1926 derived types across namespaces.
1927 (gfc_compare_types): Deal with BT_VOID.
1928 (compare_parameter): Use BT_VOID to accept ISO C Binding pointers.
1929 * trans-expr.c (gfc_conv_function_call): Remove setting parm_kind
1931 (gfc_conv_initializer): Deal with ISO C Binding NULL_PTR and
1933 (gfc_conv_expr): Convert expressions for ISO C Binding derived types.
1934 * symbol.c (gfc_set_default_type): BIND(C) variables should not be
1935 Implicitly declared.
1936 (check_conflict): Add BIND(C) and check for conflicts.
1937 (gfc_add_explicit_interface): Whitespace.
1938 (gfc_add_is_bind_c): New function.
1939 (gfc_copy_attr): Use it.
1940 (gfc_new_symbol): Initialize ISO C Binding objects.
1941 (get_iso_c_binding_dt): New function.
1942 (verify_bind_c_derived_type): Ditto.
1943 (gen_special_c_interop_ptr): Ditto.
1944 (add_formal_arg): Ditto.
1945 (gen_cptr_param): Ditto.
1946 (gen_fptr_param): Ditto.
1947 (gen_shape_param): Ditto.
1948 (add_proc_interface): Ditto.
1949 (build_formal_args): Ditto.
1950 (generate_isocbinding_symbol): Ditto.
1951 (get_iso_c_sym): Ditto.
1952 * decl.c (num_idents_on_line, has_name_equals): New variables.
1953 (verify_c_interop_param): New function.
1954 (build_sym): Finish binding labels and deal with COMMON blocks.
1955 (add_init_expr_to_sym): Check if the initialized expression is
1956 an iso_c_binding named constants
1957 (variable_decl): Set ISO C Binding type_spec components.
1958 (gfc_match_kind_spec): Check match for C interoperable kind.
1959 (match_char_spec): Fix comment. Chnage gfc_match_small_int
1960 to gfc_match_small_int_expr. Check for C interoperable kind.
1961 (match_type_spec): Clear the current binding label.
1962 (match_attr_spec): Add DECL_IS_BIND_C. If BIND(C) is found, use it
1964 (set_binding_label): New function.
1965 (set_com_block_bind_c): Ditto.
1966 (verify_c_interop): Ditto.
1967 (verify_com_block_vars_c_interop): Ditto.
1968 (verify_bind_c_sym): Ditto.
1969 (set_verify_bind_c_sym): Ditto.
1970 (set_verify_bind_c_com_block): Ditto.
1971 (get_bind_c_idents): Ditto.
1972 (gfc_match_bind_c_stmt): Ditto.
1973 (gfc_match_data_decl): Use num_idents_on_line.
1974 (match_result): Deal with right paren in BIND(C).
1975 (gfc_match_suffix): New function.
1976 (gfc_match_function_decl): Use it. Code is re-arranged to deal with
1977 ISO C Binding result clauses.
1978 (gfc_match_subroutine): Deal with BIND(C).
1979 (gfc_match_bind_c): New function.
1980 (gfc_get_type_attr_spec): New function. Code is re-arranged in and
1981 taken from gfc_match_derived_decl.
1982 (gfc_match_derived_decl): Add check for BIND(C).
1983 * trans-common.c: Forward declare gfc_get_common.
1984 (gfc_sym_mangled_common_id): Change arg from 'const char *name' to
1985 'gfc_common_head *com'. Check for ISO C Binding of the common block.
1986 (build_common_decl): 'com->name' to 'com in SET_DECL_ASSEMBLER_NAME.
1987 * gfortran.h: Add GFC_MAX_BINDING_LABEL_LEN
1989 (sym_flavor): Add FL_VOID.
1990 (iso_fortran_env_symbol, iso_c_binding_symbol, intmod_id): New enum
1991 (CInteropKind_t): New struct.
1992 (c_interop_kinds_table): Use it. Declare an array of structs.
1993 (symbol_attribute): Add is_bind_c, is_c_interop, and is_iso_c
1995 (gfc_typespec): Add is_c_interop; is_iso_c, and f90_type members.
1996 (gfc_symbol): Add from_intmod, intmod_sym_id, binding_label, and
1997 common_block members.
1998 (gfc_common_head): Add binding_label and is_bind_c members.
1999 (gfc_gsymbol): Add sym_name, mod_name, and binding_label members.
2000 Add prototypes for get_c_kind, gfc_validate_c_kind,
2001 gfc_check_any_c_kind, gfc_add_is_bind_c, gfc_add_value,
2002 verify_c_interop, verify_c_interop_param, verify_bind_c_sym,
2003 verify_bind_c_derived_type, verify_com_block_vars_c_interop,
2004 generate_isocbinding_symbol, get_iso_c_sym, gfc_iso_c_sub_interface
2005 * iso-c-binding.def: New file. This file contains the definitions
2006 of the types provided by the Fortran 2003 ISO_C_BINDING intrinsic
2008 * trans-const.c (gfc_conv_constant_to_tree): Deal with C_NULL_PTR
2009 or C_NULL_FUNPTR expressions.
2010 * expr.c (gfc_copy_expr): Add BT_VOID case. For BT_CHARACTER, the
2011 ISO C Binding requires a minimum string length of 1 for '\0'.
2012 * module.c (intmod_sym): New struct.
2013 (pointer_info): Add binding_label member.
2014 (write_atom): Set len to 0 for NULL pointers. Check for NULL p and *p.
2015 (ab_attribute): Add AB_IS_BIND_C, AB_IS_C_INTEROP and AB_IS_ISO_C.
2016 (attr_bits): Add "IS_BIND_C", "IS_C_INTEROP", and "IS_ISO_C".
2017 (mio_symbol_attribute): Deal with ISO C Binding attributes.
2018 (bt_types): Add "VOID".
2019 (mio_typespec): Deal with ISO C Binding components.
2020 (mio_namespace_ref): Add intmod variable.
2021 (mio_symbol): Check for symbols from an intrinsic module.
2022 (load_commons): Check for BIND(C) common block.
2023 (read_module): Read binding_label and use it.
2024 (write_common): Add label. Write BIND(C) info.
2025 (write_blank_common): Blank commons are not BIND(C). Explicitly
2027 (write_symbol): Deal with binding_label.
2028 (sort_iso_c_rename_list): New function.
2029 (import_iso_c_binding_module): Ditto.
2030 (create_int_parameter): Add to args.
2031 (use_iso_fortran_env_module): Adjust to deal with iso_c_binding
2033 * trans-types.c (c_interop_kinds_table): new array of structs.
2034 (gfc_validate_c_kind): New function.
2035 (gfc_check_any_c_kind): Ditto.
2036 (get_real_kind_from_node): Ditto.
2037 (get_int_kind_from_node): Ditto.
2038 (get_int_kind_from_width): Ditto.
2039 (get_int_kind_from_minimal_width): Ditto.
2040 (init_c_interop_kinds): Ditto.
2041 (gfc_init_kinds): call init_c_interop_kinds.
2042 (gfc_typenode_for_spec): Adjust for BT_VOID and ISO C Binding pointers.
2043 Adjust handling of BT_DERIVED.
2044 (gfc_sym_type): Whitespace.
2045 (gfc_get_derived_type): Account for iso_c_binding derived types
2046 * resolve.c (is_scalar_expr_ptr): New function.
2047 (gfc_iso_c_func_interface): Ditto.
2048 (resolve_function): Use gfc_iso_c_func_interface.
2049 (set_name_and_label): New function.
2050 (gfc_iso_c_sub_interface): Ditto.
2051 (resolve_specific_s0): Use gfc_iso_c_sub_interface.
2052 (resolve_bind_c_comms): New function.
2053 (resolve_bind_c_derived_types): Ditto.
2054 (gfc_verify_binding_labels): Ditto.
2055 (resolve_fl_procedure): Check for ISO C interoperability.
2056 (resolve_symbol): Check C interoperability.
2057 (resolve_types): Walk the namespace. Check COMMON blocks.
2058 * trans-decl.c (gfc_sym_mangled_identifier): Prevent the mangling
2059 of identifiers that have an assigned binding label.
2060 (gfc_sym_mangled_function_id): Use the binding label rather than
2062 (gfc_finish_var_decl): Put variables that are BIND(C) into a common
2063 segment of the object file, because this is what C would do.
2064 (gfc_create_module_variable): Conver to proper types
2065 (set_tree_decl_type_code): New function.
2066 (generate_local_decl): Check dummy variables and derived types for
2067 ISO C Binding attributes.
2068 * match.c (gfc_match_small_int_expr): New function.
2069 (gfc_match_name_C): Ditto.
2070 (match_common_name): Deal with ISO C Binding in COMMON blocks
2071 * trans-io.c (transfer_expr): Deal with C_NULL_PTR or C_NULL_FUNPTR
2073 * match.h: Add prototypes for gfc_match_small_int_expr,
2074 gfc_match_name_C, match_common_name, set_com_block_bind_c,
2075 set_binding_label, set_verify_bind_c_sym,
2076 set_verify_bind_c_com_block, get_bind_c_idents,
2077 gfc_match_bind_c_stmt, gfc_match_suffix, gfc_match_bind_c,
2078 gfc_get_type_attr_spec
2079 * parse.c (decode_statement): Use gfc_match_bind_c_stmt
2080 (parse_derived): Init *derived_sym = NULL, and gfc_current_block
2081 later for valiadation.
2082 * primary.c (got_delim): Set ISO C Binding components of ts.
2083 (match_logical_constant): Ditto.
2084 (match_complex_constant): Ditto.
2085 (match_complex_constant): Ditto.
2086 (gfc_match_rvalue): Check for existence of at least one arg for
2087 C_LOC, C_FUNLOC, and C_ASSOCIATED.
2088 * misc.c (gfc_clear_ts): Clear ISO C Bindoing components in ts.
2089 (get_c_kind): New function.
2091 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
2094 * trans-expr.c (gfc_conv_power_op): Use builtin_powi for
2096 * f95-lang.c (gfc_init_builtin_functions): Add builtin_powi to the
2099 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
2101 * trans.h: Remove decls for 64-bit allocation functions.
2102 * trans-array.c (gfc_grow_array): Always pick the standard realloc
2104 (gfc_array_allocate): Likewise.
2105 * trans-decl.c: Remove trees for 64-bit allocation functions.
2106 (gfc_build_builtin_function_decls): Don't build fndecls for 64-bit
2107 allocations functions, use index_int_type for normal allocation
2110 2007-06-30 Daniel Franke <franke.daniel@gmail.com>
2113 * intrinsic.c (add_functions): Additional function types.
2114 (gfc_convert_type_warn): Remove intrinsic-flag from
2115 conversion functions.
2116 * resolve.c (resolve_symbol): Added type checks to
2117 explicitly defined intrinsics.
2119 2007-06-30 Tobias Burnus <burnus@net-b.de>
2122 * io.c (check_format): Allow zero to precede the
2125 2007-06-30 Paul Thomas <pault@gcc.gnu.org>
2128 * simplify.c (gfc_simplify_repeat): Add handling of character
2129 literal for first argument.
2131 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
2133 * resolve.c (resolve_operator): Added check whether a user
2134 defined operator is available.
2136 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
2138 * openmp.c (resolve_omp_clauses): Adjust error message to
2139 better reflect the actual requirement.
2141 2007-06-29 Tobias Burnus <burnus@net-b.de>
2144 * io.c (format_lex): Fix FMT_ZERO.
2145 (check_format,check_format_string,gfc_match_format,
2146 check_io_constraints) Additional checking for READ.
2148 2007-06-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2151 * lang.opt (static-libgfortran): New option.
2152 * gfortranspec.c (ADD_ARG_LIBGFORTRAN): New macro.
2153 (Option): Add OPTION_static and OPTION_static_libgfortran.
2154 (lookup_option): Handle the new -static-libgfortran option.
2155 (lang_specific_driver): Check whether -static is passed.
2156 Handle the new -static-libgfortran option.
2157 * options.c (gfc_handle_option): If -static-libgfortran is
2158 passed and isn't supported on this configuration, error out.
2160 2007-06-27 Daniel Franke <franke.daniel@gmail.com>
2163 * openmp.c (resolve_omp_clauses): Emit error on allocatable
2164 components in COPYIN, COPYPRIVATE, FIRSTPRIVATE and LASTPRIVATE
2167 2007-06-25 Paul Thomas <pault@gcc.gnu.org>
2170 * resolve.c (check_host_association): Return if the old symbol
2171 is use associated. Introduce retval to reduce the number of
2172 evaluations of the first-order return value.
2175 * match.c (gfc_match_call): If a host associated symbol is not
2176 a subroutine, build a new symtree/symbol in the current name
2179 2007-06-24 Tobias Burnus <burnus@net-de>
2182 * interface.c (gfc_compare_derived_types): Add access check.
2183 * symbol.c (gfc_find_component): Ditto.
2184 (gfc_set_component_attr,gfc_get_component_attr) Copy access state.
2185 * dump-parse-tree.c (gfc_show_components): Dump access state.
2186 * gfortran.h (struct gfc_component): Add gfc_access.
2187 * module.c (mio_component): Add access state.
2188 * (gfc_match_structure_constructor): Check for private access state.
2190 2007-06-24 Paul Thomas <pault@gcc.gnu.org>
2194 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Calculate
2195 the offset between the loop counter and the position as
2196 defined. Add the offset within the loop so that the mask acts
2197 correctly. Do not advance the location on the basis that it
2200 2007-06-22 Daniel Franke <franke.daniel@gmail.com>
2203 * symbol.c (gfc_copy_attr): Emit errors for duplicate
2204 EXTERNAL/INTRINSIC statements.
2206 2007-06-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2209 * expr.c (gfc_check_assign): If the rvalue expression type is NULL_EXPR,
2210 check to see if the lvalue has attribute pointer and data.
2212 2007-06-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2215 * resolve.c (gfc_resolve_iterator_expr): Add check for REAL using
2216 gfc_notify_standard. (gfc_resolve_iterator): Remove check.
2217 (resolve_branch): Change "Obsolete" to "Deleted feature".
2218 * io.c (resolve_tag): Ditto.
2219 * match.c (gfc_match_pause, gfc_match_assign, gfc_match_goto): Ditto.
2221 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2224 * match.c (gfc_match_common): If the symbol value expression type is
2225 NULL_EXPR, don't error if previously initialized.
2227 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2230 * decl.c (get_proc_name) Check symbol for generic interface
2233 2007-06-20 Andrew Pinski <andrew_pinski@playstation.sony.com>
2234 Richard Guenther <rguenther@suse.de>
2237 * trans.c (gfc_build_addr_expr): Use the correct types.
2239 2007-06-19 Paul Thomas <pault@gcc.gnu.org>
2243 * resolve.c (resolve_code): Use gfc_impure_variable as a
2244 condition for rejecting derived types with pointers, in pure
2246 (gfc_impure_variable): Add test for dummy arguments of pure
2247 procedures; any for functions and INTENT_IN for subroutines.
2250 * data.c (gfc_assign_data_value): Change the ICE on an array
2251 reference initializer not being an array into an error and
2252 clear init to prevent a repetition of the error.
2254 2007-06-17 Janne Blomqvist <jb@gcc.gnu.org>
2256 * gfortran.texi: Add documentation for GFORTRAN_UNBUFFERED_n
2257 environment variables. Fix documentation for
2258 GFORTRAN_UNBUFFERED_ALL environment variable.
2260 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
2262 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
2263 POINTER_PLUS_EXPR instead of PLUS_EXPR for pointer addition.
2264 * trans-expr.c (gfc_trans_string_copy): Create
2265 POINTER_PLUS_EXPR instead of a PLUS_EXPR
2268 2007-06-14 Paul Thomas <pault@gcc.gnu.org>
2271 * trans-common.c (build_common_decl): If resizing of common
2272 decl is needed, update the TREE_TYPE.
2274 2007-06-13 Tobias Burnus <burnus@net-b.de>
2277 * interface.c (has_vector_section): New.
2278 (compare_actual_formal): Check for array sections with vector subscript.
2280 2007-06-12 Dirk Mueller <dmueller@suse.de>
2282 * trans-stmt.c (gfc_trans_call): fix gcc_assert to
2283 a comparison, not an assignment.
2285 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
2287 * trans-common.c (create_common): Initialize 'field_init'.
2289 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
2293 * trans-common.c (get_init_field): New function.
2294 (create_common): Call get_init_field for overlapping
2295 initializers in equivalence blocks.
2296 * resolve.c (resolve_equivalence_derived, resolve_equivalence):
2297 Remove constraints on initializers in equivalence blocks.
2298 * target-memory.c (expr_to_char, gfc_merge_initializers):
2300 (encode_derived): Add the bit offset to the byte offset to get
2301 the total offset to the field.
2302 * target-memory.h : Add prototype for gfc_merge_initializers.
2304 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
2306 * trans-types.c (gfc_signed_type): Remove.
2307 * trans-types.h (gfc_signed_type): Remove.
2308 * f95-lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
2310 2007-06-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2312 * trans-intrinsic.c: Revert Lee's 2007-06-04 patch.
2314 2007-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
2315 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2318 * match.c (gfc_match_special_char): New function. Match special char.
2320 * match.h: Add prototype.
2321 * io.c (next_char): Use it.
2322 * primary.c (next_string_char): Ditto.
2324 2007-06-06 Steven G. Kargl <kargl@gcc.gnu.org>
2326 * decl.c: Miscellaneous whitespace fixes.
2328 * gfortran.h: Likewise.
2329 * interface.c : Likewise.
2331 * match.c: Likewise.
2332 * match.h: Likewise.
2333 * module.c: Likewise.
2334 * parse.c: Likewise.
2335 * resolve.c: Likewise.
2336 * symbol.c: Likewise.
2337 * trans-array.c: Likewise.
2338 * trans-common.c: Likewise.
2339 * trans-decl.c: Likewise.
2340 * trans-intrinsic.c: Likewise.
2341 * trans-io.c: Likewise.
2342 * trans-stmt.c: Likewise.
2343 * trans-types.c: Likewise.
2345 2007-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2348 * parse.c (decode_statement): Don't call gfc_undo_symbols on MATCH_ERROR
2349 for ST_FUNCTION since it is called in reject_statement.
2350 (parse_contained): If error, loop back after reject_statement and try
2351 again. Free the namespace if an error occured.
2353 2007-06-04 Lee Millward <lee.millward@codesourcery.com>
2355 * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
2356 to operate on a stack allocated array for the intrinsic arguments
2357 instead of creating a TREE_LIST. Add two new parameters for the
2358 array and the number of elements. Update all callers to allocate
2359 an array of the correct length to pass in. Update comment.
2360 (gfc_intrinsic_argument_list_length): New function.
2361 (gfc_conv_intrinsic_mnimax): Call it.
2362 (gfc_conv_intrinsic_merge): Likewise.
2363 (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
2365 (gfc_conv_intrinsic_cmplx): Likewise.
2366 (gfc_conv_intrinsic_ctime): Likewise.
2367 (gfc_covn_intrinsic_fdate): Likewise.
2368 (gfc_conv_intrinsic_ttynam): Likewise.
2369 (gfc_conv_intrinsic_ishftc): Likewise.
2370 (gfc_conv_intrinsic_index): Likewise.
2371 (gfc_conv_intrinsic_scan): Likewise.
2372 (gfc_conv_intrinsic_verify): Likewise.
2373 (gfc_conv_intrinsic_trim): Likewise.
2374 (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
2375 (gfc_conv_intrinsic_exponent): Likewise.
2376 (gfc_conv_intrinsic_bound): Likewise.
2377 (gfc_conv_intrinsic_abs): Likewise.
2378 (gfc_conv_intrinsic_mod): Likewise.
2379 (gfc_conv_intrinsic_sign): Likewise.
2380 (gfc_conv_intrinsic_len): Likewise.
2381 (gfc_conv_intrinsic_adjust): Likewise.
2382 (gfc_conv_intrinsic_si_kind): Likewise.
2384 2007-06-04 Steve Ellcey <sje@cup.hp.com>
2386 * trans-array.c (gfc_conv_array_parameter): Initialize tmp.
2388 2007-05-31 Richard Guenther <rguenther@suse.de>
2390 * trans-expr.c (gfc_conv_expr_op): Use zero constant
2391 that matches the lse type.
2392 (gfc_trans_string_copy): Use sizetype zero constant.
2393 * intrinsic.c (add_functions): The sizeof intrinsic has
2395 * trans-types.c (gfc_get_dtype): Convert size to index
2396 type before shifting.
2397 * trans-array.c (gfc_trans_array_constructor_value): Use
2398 index type for offset computation.
2399 * trans-intrinsic.c (gfc_conv_associated): Use correct type
2402 2007-05-31 Paul Thomas <pault@gcc.gnu.org>
2405 * trans-array.c (gfc_trans_array_constructor): Treat the case
2406 where the ss expression charlen is missing.
2408 22007-05-31 Paul Thomas <pault@gcc.gnu.org>
2411 * module.c (mio_symtree_ref): If an equivalence group member
2412 is not used, give it a hidden symbol and set the pointer_info.
2413 (load_equiv): Only free the equivalence if none of the members
2416 2007-05-29 Daniel Franke <franke.daniel@gmail.com>
2418 * gfortran.h: Renamed 'enum gfc_generic_isym_id' to 'enum gfc_isym_id',
2419 added missing GFC_ISYM_* enumerators, ordered alphabetically.
2420 (struct gfc_intrinsic_sym): Renamed 'generic_id' to 'id'.
2421 (gfc_find_subroutine): New prototype.
2422 * intrinsic.c (add_sym, add_sym_*): Added argument 'id' and changed all callers.
2423 (find_subroutine): Renamed to 'gfc_find_subroutine', removed static.
2424 * dependency.c: Changed usage of isym->generic_id to isym->id.
2425 * openmp.c: Likewise.
2426 * resolve.c: Likewise.
2427 * trans-array.c: Likewise.
2428 * trans-expr.c: Likewise.
2429 * trans-intrinsic.c: Likewise.
2430 * trans-openmp.c: Likewise.
2432 2007-05-28 Tobias Schlüter <tobi@gcc.gnu.org>
2434 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIZEOF.
2435 * intrinsic.c (add_functions): Add stuff for SIZEOF intrinsic.
2436 * intrinsic.h (gfc_check_sizeof): Add prototype of ...
2437 * check.c (gfc_check_sizeof): .. new function.
2438 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): New function.
2439 (gfc_conv_intrinsic_strcmp): Whitespace fix.
2440 (gfc_conv_intrinsic_array_transfer): Remove double initialization,
2441 use fold_build. where appropriate.
2442 (gfc_conv_intrinsic_function): Add case for SIZEOF.
2443 * intrinsic.texi: Add documentation for SIZEOF.
2445 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
2447 * trans-array.c (gfc_conv_expr_descriptor): Edit comment.
2449 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
2452 * target-memory.c (gfc_target_expr_size): Add handling
2453 for size of BT_HOLLERITH variables.
2454 * check.c (gfc_check_transfer): Reject BT_HOLLERITH
2455 variables in MOLD argument of TRANSFER.
2457 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
2459 * gfortran.h (gfc_expr): Remove from_H, add "representation"
2461 * primary.c (match_hollerith_constant): Store the representation
2462 of the Hollerith in representation, not in value.character.
2463 * arith.c: Add dependency on target-memory.h.
2464 (eval_intrinsic): Remove check for from_H.
2465 (hollerith2representation): New function.
2466 (gfc_hollerith2int): Determine value of the new constant.
2467 (gfc_hollerith2real): Likewise.
2468 (gfc_hollerith2complex): Likewise.
2469 (gfc_hollerith2logical): Likewise.
2470 (gfc_hollerith2character): Point both representation.string and
2471 value.character.string at the value string.
2472 * data.c (create_character_initializer): For BT_HOLLERITH
2473 rvalues, get the value from the representation rather than
2475 * expr.c (free_expr0): Update handling of BT_HOLLERITH values
2476 and values with representation.string.
2477 (gfc_copy_expr): Likewise.
2478 * intrinsic.c (do_simplify): Remove special treatement of
2479 variables resulting from Hollerith constants.
2480 * dump-parse-trees.c (gfc_show_expr): Update handling of
2482 * trans-const.c (gfc_conv_constant_to_tree): Replace from_H
2483 check with check for representation.string; get Hollerith
2484 representation from representation.string, not value.character.
2485 * trans-expr.c (is_zero_initializer_p): Replace from_H check
2486 with check for representation.string.
2487 * trans-stmt.c (gfc_trans_integer_select): Use
2488 gfc_conv_mpz_to_tree for case values, so as to avoid picking up
2489 the memory representation if the case is given by a transfer
2491 * target-memory.c (gfc_target_encode_expr): Use the known memory
2492 representation rather than the value, if it exists.
2493 (gfc_target_interpret_expr): Store the memory representation of
2494 the interpreted expression as well as its value.
2495 (interpret_integer): Move to gfc_interpret_integer, make
2497 (interpret_float): Move to gfc_interpret_float, make non-static.
2498 (interpret_complex): Move to gfc_interpret_complex, make
2500 (interpret_logical): Move to gfc_interpret_logical, make
2502 (interpret_character): Move to gfc_interpret_character, make
2504 (interpret_derived): Move to gfc_interpret_derived, make
2506 * target-memory.h: Add prototypes for newly-exported
2507 gfc_interpret_* functions.
2509 2007-05-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2512 * parse.c (next_statement): Warn for truncated lines if source is free
2515 2007-05-27 Paul Thomas <pault@gcc.gnu.org>
2516 Tobias Burnus <burnus@net-b.de>
2519 * symbol.c (gfc_check_function_type): Copy dimensions of
2521 * resolve.c (resolve_contained_fntype): Improve symbol output in
2524 2007-05-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2527 * io.c (check_format): Add warning for H specifier in format.
2529 2007-05-26 Tobias Burnus <burnus@net-b.de>
2531 * gfortran.texi: Document the GFORTRAN_ERROR_DUMPCORE and
2532 GFORTRAN_ERROR_BACKTRACE environment variables.
2534 2007-05-26 Paul Thomas <pault@gcc.gnu.org>
2537 * trans.h : Add no_function_call bitfield to gfc_se structure.
2538 Add stmtblock_t argument to prototype of get_array_ctor_strlen.
2539 * trans-array.c (get_array_ctor_all_strlen): New function.
2540 (get_array_ctor_strlen): Add new stmtblock_t argument and call
2541 new function for character elements that are not constants,
2542 arrays or variables.
2543 (gfc_conv_array_parameter): Call get_array_ctor_strlen to get
2545 * trans-intrinsic (gfc_conv_intrinsic_len): Add new argument
2546 to call of get_array_ctor_strlen.
2548 2007-05-25 Kazu Hirata <kazu@codesourcery.com>
2550 * intrinsic.texi: Fix typos.
2552 2007-05-25 Paul Thomas <pault@gcc.gnu.org>
2555 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Change
2556 order in logic under EXPR_FUNCTION to handle functions with
2559 2007-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2562 * array.c (spec_dimen_size): Test for correct BT_INTEGER type.
2564 2007-05-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2567 * trans-expr.c (gfc_trans_zero_assign): Convert the result of
2568 TYPE_SIZE_UNIT into a signed type.
2569 (gfc_trans_array_copy): Likewise.
2570 (gfc_trans_array_constructor_copy): Likewise.
2571 * trans-array.c (gfc_trans_create_temp_array): Likewise.
2572 (gfc_grow_array): Likewise.
2573 (gfc_array_init_size): Likewise.
2574 (gfc_duplicate_allocatable): Likewise.
2575 * trans-stmt.c (allocate_temp_for_forall_nest_1): Likewise.
2577 2007-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2580 * resolve.c (resolve_function): Don't call resolve_global_procedure if
2581 there is no name. Delete duplicated statement in ELSE clause.
2583 2007-05-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2586 * trans-array.c (gfc_trans_array_bound_check): Take extra argument to
2587 indicate whether we should check the upper bound in that dimension.
2588 (gfc_conv_array_index_offset): Check only the lower bound of the
2589 last dimension for assumed-size arrays.
2590 (gfc_conv_array_ref): Likewise.
2591 (gfc_conv_ss_startstride): Likewise.
2593 2007-05-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2594 Daniel Franke <franke.daniel@gmail.com>
2597 * resolve.c (resolve_actual_arglist): Resolve actual argument after
2598 being identified as variable.
2600 2007-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2603 * trans-stmt.c (gfc_trans_do): Fix the value of loop variable
2606 2007-05-21 H.J. Lu <hongjiu.lu@intel.com>
2608 * trans-stmt.c (gfc_trans_do): Fix a typo in comment.
2610 2007-05-21 Paul Thomas <pault@gcc.gnu.org>
2614 * trans-array.c (gfc_conv_expr_descriptor): Obtain the stored
2615 offset for non-descriptor, source arrays and correct for stride
2616 not equal to one before writing to field of output descriptor.
2618 2007-05-20 Daniel Franke <franke.daniel@gmail.com>
2621 * check.c (check_rest): Improved argument conformance check and
2622 fixed error message generation.
2624 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2627 * Make-lang.in: Remove use of -Wno-error for expr.o, resolve.o,
2628 simplify.o and trans-common.o.
2630 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2633 * trans-array.c (gfc_trans_auto_array_allocation): Avoid
2634 multiplication of mismatched types.
2636 2007-05-18 Daniel Franke <franke.daniel@gmail.com>
2639 * symbol.c (gfc_add_flavor): Add the NAME to error message if
2642 2007-05-15 Daniel Franke <franke.daniel@gmail.com>
2647 * intrinsic.c (check_specific): Check elemental intrinsics for
2649 (add_functions): Fixed dummy argument names of BESJN and BESYN.
2650 Fixed elemental status of MCLOCK and MCLOCK8.
2651 * check.c (check_rest): Added check for array conformance.
2652 (gfc_check_merge): Removed check for array conformance.
2653 (gfc_check_besn): Removed check for scalarity.
2654 * intrinsic.texi (CSHIFT, EOSHIFT): Fixed typos.
2655 (BESJN, BESYN): Clarified documentation.
2657 2007-05-17 Tobias Burnus <burnus@net-b.de>
2659 * gfortran.texi (GFORTRAN_CONVERT_UNIT): Improve documentation.
2661 2007-05-16 Brooks Moses <brooks.moses@codesourcery.com>
2668 * target-memory.c: New file.
2669 * target-memory.h: New file.
2670 * simplify.c: Add #include "target-memory.h".
2671 (gfc_simplify_transfer): Implement constant-
2672 folding for TRANSFER intrinsic.
2673 * Make-lang.in: Add dependencies on new target-memory.* files.
2675 2007-05-15 Paul Brook <paul@codesourcery.com>
2677 * trans-types.c (gfc_type_for_size): Handle signed TImode.
2679 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2682 * trans.h (gfor_fndecl_internal_malloc, gfor_fndecl_internal_malloc64,
2683 gfor_fndecl_internal_free): Remove prototypes.
2684 (gfor_fndecl_os_error, gfc_call_free, gfc_call_malloc): Add prototypes.
2685 * trans.c (gfc_call_malloc, gfc_call_free): New functions.
2686 * f95-lang.c (gfc_init_builtin_functions): Add __builtin_free
2687 and __builtin_malloc builtins.
2688 * trans-decl.c (gfor_fndecl_internal_malloc,
2689 gfor_fndecl_internal_malloc64, gfor_fndecl_internal_free): Remove.
2690 (gfor_fndecl_os_error): Add.
2691 (gfc_build_builtin_function_decls): Don't create internal_malloc,
2692 internal_malloc64 and internal_free library function declaration.
2693 Create os_error library call function declaration.
2694 * trans-array.c (gfc_trans_allocate_array_storage,
2695 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2696 gfc_conv_array_parameter, gfc_duplicate_allocatable): Use
2697 gfc_call_malloc and gfc_call_free instead of building calls to
2698 internal_malloc and internal_free.
2699 * trans-expr.c (gfc_conv_string_tmp): Likewise.
2700 * trans-stmt.c (gfc_do_allocate, gfc_trans_assign_need_temp,
2701 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
2702 gfc_trans_where_2: Likewise.
2703 * trans-intrinsic.c (gfc_conv_intrinsic_ctime,
2704 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
2705 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_trim): Likewise.
2707 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2710 * trans-expr.c (gfc_conv_substring): Evaluate substring bounds
2713 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
2715 * f95-lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
2716 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use unsigned_type_for
2717 instead of gfc_unsigned_type.
2718 * trans-stmt.c (gfc_trans_do): Use unsigned_type_for instead of
2720 * trans-types.c (gfc_unsigned_type): Remove.
2721 * trans-types.h (gfc_unsigned_type): Remove.
2723 2007-05-12 Paul Thomas <pault@gcc.gnu.org>
2726 * resolve.c (check_host_association): New function that detects
2727 incorrect host association and corrects it.
2728 (gfc_resolve_expr): Call the new function for variables and
2730 * match.h : Remove prototype for gfc_match_rvalue.
2731 * gfortran.h : Add prototype for gfc_match_rvalue.
2733 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
2736 * trans-expr.c (gfc_conv_function_call): Reduce indirection for
2737 direct assignments of recursive array valued functions.
2738 * primary.c (gfc_match_rvalue): Correct error for recursive
2739 function calls such that directly recursive calls of scalar
2740 function without an explicit result are disallowed.
2742 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
2745 * resolve.c (resolve_fl_namelist): It is not an error if the
2746 namelist element is the result variable of the enclosing
2747 function. Search for the symbol in current and all parent
2748 namespaces for a potential conflict.
2749 * symbol.c (check_conflict): Remove the conflict between
2750 'in_namelist' and 'FL_PROCEDURE' because the symbol info
2751 is not available to exclude function result variables.
2752 * trans-io.c (nml_get_addr_expr): Use the fake result decl
2753 if the symbol is an implicit result variable.
2755 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
2758 * decl.c (get_proc_name): If an entry has already been declared
2759 as a module procedure, pick up the symbol and the symtree and
2760 use them for the entry.
2762 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
2765 * resolve.c (resolve_symbol): Remove the flagging mechanism from the
2766 formal namespace resolution and instead check that the formal
2767 namespace is not the current namespace.
2769 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
2772 * trans-array.c (gfc_conv_array_parameter): Convert full array
2773 references to the result of the procedure enclusing the call.
2775 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
2779 * decl.c (add_init_expr_to_sym): Expand a scalar initializer
2780 for a parameter array into an array expression with the right
2782 * array.c (spec_dimen_size): Remove static attribute.
2783 * gfortran.h : Prototype for spec_dimen_size.
2785 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2788 * trans-stmt.c (gfc_trans_do): Handle large loop counts.
2790 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2793 * simplify.c (gfc_simplify_new_line): NEW_LINE can be simplified
2794 even for non constant arguments.
2796 2007-05-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2797 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2800 * gfortran.h: Add runtime error codes from libgfortran.h. Define
2802 * trans.c (gfc_trans_runtime_check): Update the format of runtime error
2803 messages to match library runtime errors. Use call to new library
2804 function runtime_error_at().
2805 * trans.h: Add prototype for new function gfc_trans_io_runtime_check.
2806 Add declaration for library functions runtime_error_at and
2808 * trans_io.c (gfc_trans_io_runtime_check): New function.
2809 (set_parameter_value): Add error checking for UNIT numbers.
2810 (set_parameter_ref): Initialize the users variable to zero.
2811 (gfc_trans_open): Move setting of unit number to after setting of common
2812 flags so that runtime error trapping can be detected.
2813 (gfc_trans_close): Likewise. (build_filepos): Likewise.
2814 (gfc_trans_inquire): Likewise. (build_dt): Likewise.
2815 * trans-decl.c: Add declarations for runtime_error_at and
2816 generate_error. (gfc_build_builtin_function_decls): Build function
2817 declarations for runtime_error_at and generate_error.
2819 2007-05-06 Paul Thomas <pault@gcc.gnu.org>
2822 * resolve.c (resolve_fl_procedure): Resolve constant character
2825 2007-05-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2828 * decl.c (match_char_spec): Add check for invalid character lengths.
2830 2007-05-04 Brooks Moses <brooks.moses@codesourcery.com>
2832 * intrinsic.texi (CMPLX): Document result kind.
2833 (COMPLEX): Add documentation.
2835 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
2838 * intrinsic.c (add_functions): Replaced calls to gfc_check_g77_math1
2839 by gfc_check_fn_r to avoid checks for scalarity.
2840 * check.c (gfc_check_besn): Removed check for scalarity.
2841 (gfc_check_g77_math1): Removed.
2842 * intrinsic.h (gfc_check_g77_math1): Removed.
2844 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
2846 * check.c (gfc_check_fseek_sub): Fixed typo.
2848 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
2851 * intrinsic.c (add_subroutines): Added FSEEK.
2852 * intrinsic.h (gfc_resolve_fseek_sub, gfc_check_fseek_sub): New.
2853 * iresolve.c (gfc_resolve_fseek_sub): New.
2854 * check.c (gfc_check_fseek_sub): New.
2855 * intrinsic.texi (FSEEK): Updated.
2857 2007-05-04 Tobias Burnus <burnus@net-b.de>
2860 * expr.c (gfc_check_pointer_assign): Check for NULL pointer.
2862 2007-05-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2865 * simplify.c (gfc_simplify_len): Only simplify integer lengths.
2867 2007-05-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2870 * simplify.c (gfc_simplify_repeat): Don't put function call with
2871 side effect in a gcc_assert().
2873 2007-05-04 Tobias Burnus <burnus@net-b.de>
2876 * interface.c (compare_actual_formal): Check character length.
2878 2007-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
2881 * dependency.c (gfc_full_array_ref_p): If the reference is
2882 to a single element, check that the array has a single
2883 element and that the correct element is referenced.
2885 2007-05-01 Daniel Franke <franke.daniel@gmail.com>
2887 * intrinsic.c (add_functions): Fixed ELEMENTAL specifications.
2888 (add_subroutines): Replaced magic numbers in function calls by
2889 ELEMENTAL and NOT_ELEMENTAL respectively.
2890 * intrinsic.texi (MVBITS): Changed class to elemental subroutine.
2891 (RANDOM_NUMBER): Changed class to subroutine.
2892 (HUGE, TINY): Changed class to inquiry function.
2894 2007-04-30 Brooks Moses <brooks.moses@codesourcery.com>
2896 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_get_double_int.
2897 (gfc_conv_tree_to_mpz): New function.
2898 (gfc_conv_mpfr_to_tree): Use real_from_mpfr.
2899 (gfc_conv_tree_to_mpfr): New function.
2900 * trans-const.h: (gfc_conv_tree_to_mpz): New prototype.
2901 (gfc_conv_tree_to_mpfr): New prototype.
2903 2007-04-30 Daniel Franke <franke.daniel@gmail.com>
2905 * intrinsic.texi (IERRNO): Changed class to non-elemental function.
2906 (LOG10): Removed COMPLEX as accepted argument type.
2907 (NEW_LINE): Changed class from elemental to inquiry function.
2908 (SIGN): Removed requirement of scalar arguments.
2909 (SNGL): Changed class to elemental function.
2911 2007-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2914 * simplify.c (simplify_bound_dim): New function.
2915 (simplify_bound): Use the above. Perform simplification of LBOUND
2916 and UBOUND when DIM argument is not present.
2918 2007-04-29 Daniel Franke <franke.daniel@gmail.com>
2920 * gfortran.texi: Cleaned up keyword index.
2921 * invoke.texi: Likewise.
2922 * intrinsic.texi: Likewise.
2924 2007-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2927 * scanner.c (load_file): Discard the byte order mark if one is
2928 found on the first non-preprocessor line of a file.
2930 2007-04-29 Paul Thomas <pault@gcc.gnu.org>
2933 * trans-array.c (gfc_conv_resolve_dependencies): Create a temp
2934 whenever a dependency is found.
2936 2007-04-28 Tobias Schlüter <tobi@gcc.gnu.org>
2938 * options.c (gfc_handle_option): Ensure requested free form line
2939 length is not too small.
2941 2007-04-27 Brooks Moses <brooks.moses@codesourcery.com>
2943 * intrinsic.texi (Transfer): Improve documentation.
2945 2007-04-27 Brooks Moses <brooks.moses@codesourcery.com>
2947 * gfortran.texi (Option Index): Add @samp as needed.
2949 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
2951 * gfortran.texi: Added node and menu entry for an option index.
2952 * invoke.texi: Moved command line option related entries of the concept
2953 index to the option index.
2955 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
2957 * intrinsic.texi (AND, FPUT, FPUTC, MODULO, OR, SET_EXPONENT,
2958 XOR): Fixed examples.
2960 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
2962 * intrinsic.texi (PRODUCT, RESHAPE, SPACING, SPREAD, SUM,
2963 SYSTEM_CLOCK, TRANSFER, UNPACK): New.
2964 (DATE_AND_TIME, CPU_TIME, RRSPACING): Added cross references.
2966 2007-04-26 Daniel Franke <franke.daniel@gmail.com>
2968 * intrinsic.texi (NULL, PACK, PRESENT, REPEAT, SCAN, SHAPE,
2969 SIZE, TRANSPOSE, TRIM, VERIFY): New.
2970 (ADJUSTL, ADJUSTR, INDEX): Added cross references.
2971 (INT, INT2, INT8, LONG): Enabled section header.
2973 2007-04-25 Janne Blomqvist <jb@gcc.gnu.org>
2975 * module.c (module_char): Replace fgetc() with
2977 (write_char): Replace fputc() with putc().
2978 * scanner.c (load_line): Replace fgetc() with getc().
2979 (gfc_read_orig_filename): Likewise.
2981 2007-04-25 Tobias Burnus <burnus@net-b.de>
2984 * error.c (error_print): Fix %% support.
2985 * intrinsic.c (sort_actual): Improve error message.
2986 * resolve.c (resolve_actual_arglist): Allow %VAL for
2987 interfaces defined in the module declaration part.
2989 2007-04-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2992 * intrinsic.texi (GETLOG): Update documentation to reflect
2995 2007-04-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2998 * module.c (write_char): Add character to the MD5 buffer.
2999 (read_md5_from_module_file): New function.
3000 (gfc_dump_module): Compute MD5 for new module file. Call
3001 read_md5_from_module_file. Only overwrite old module file
3002 if the new MD5 is different.
3004 2007-04-23 Paul Thomas <pault@gcc.gnu.org>
3007 * resolve.c (resolve_symbol): Allow resolution of formal
3008 namespaces nested within formal namespaces coming from modules.
3011 * trans-expr.c (gfc_trans_assignment): Make the call to
3012 gfc_trans_zero_assign conditional on the lhs array ref being
3015 2007-04-23 Tobias Burnus <burnus@net-b.de>
3017 * primary.c (match_integer_constant): Mention -fno-range-check
3018 in the error message.
3020 2007-04-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3023 * scanner.c (load_line): Remove check for comment after ampersand and
3024 adjust tracking of ampersand.
3026 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
3028 * f95-lang.c (lang_tree_node): Use GENERIC_NEXT
3029 instead of checking GIMPLE_STMT_P in chain_next.
3031 2007-04-17 Tobias Schlüter <tobi@gcc.gnu.org>
3033 * trans-types.h (gfc_packed): New enum.
3034 (gfc_get_nodesc_array_type): Change prototype to use new enum.
3035 * trans-types.c (gfc_get_nodesc_array): Use gfc_packed for
3036 argument packed. Adapt all references to values accordingly.
3037 (gfc_sym_type): Use enum values in call to gfc_get_nodesc_array.
3038 (gfc_get_derived_type): Likewise.
3039 * trans-array.c (gfc_build_constant_array_constructor): Likewise.
3040 * trans-expr.c (gfc_get_interface_mapping_charlen): Changed packed
3041 argument to type gfc_packed.
3042 (gfc_add_interface_mapping): Use enum values in call to
3043 gfc_get_interface_mapping.
3044 * trans-decl.c (gfc_build_dummy_array_decl): Adapt to use enum
3045 values when determining packing.
3047 * trans-decl.c (gfc_finish_decl): Remove unused second argument
3048 'init'. Simplify code accordingly. Remove calls to
3049 gfc_fatal_error in favor of gcc_assert.
3050 (create_function_arglist): Remove second argument from calls to
3052 (gfc_trans_dummy_character): Likewise.
3054 * arith.h: Update copyright years.
3055 * dependency.h: Likewise.
3056 * gfortran.h: Likewise.
3057 * lang-specs.h: Likewise.
3058 * parse.h: Likewise.
3059 * symbol.c: Likewise.
3060 * trans.h: Likewise.
3061 * trans.c: Likewise.
3062 * trans-array.c: Likewise.
3063 * trans-common.c: Likewise.
3064 * trans-const.h: Likewise.
3065 * trans-const.c: Likewise.
3066 * trans-decl.c: Likewise.
3067 * trans-expr.c: Likewise.
3068 * trans-io.c: Likewise.
3069 * trans-openmp.c: Likewise.
3070 * trans-types.h: Likewise.
3071 * types.def: Likewise.
3073 2007-04-17 Tobias Schlüter <tobi@gcc.gnu.org>
3076 * decl.c (gfc_sym_mangled_identifier): Use capital letters in name
3078 (gfc_sym_mangled_function_id): Likewise.
3080 2007-04-15 Paul Thomas <pault@gcc.gnu.org>
3083 * primary.c (check_for_implicit_index): New function to check
3084 that a host associated variable is not an undeclared implied
3086 (gfc_match_rvalue, match_variable): Use it and reset the
3087 implied_index attribute.
3088 * gfortran.h : Add the implied_index field to symbol_attribute.
3089 * match.c (gfc_match_iterator): Mark the iterator variable
3090 with the new attribute.
3091 * decl.c (build_sym): Reset the new attribute.
3093 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
3095 * gfc-internals.texi: Fix typos.
3096 * simplify.c: Fix a comment typo.
3098 2007-04-14 Bernhard Fischer <aldot@gcc.gnu.org>
3100 * primary.c: Commentary typo fix; Add question about redundant (?)
3103 2007-04-14 Paul Thomas <pault@gcc.gnu.org>
3107 * expr.c (scalarize_intrinsic_call): New function to
3108 scalarize elemental intrinsic functions in initialization
3110 (check_init_expr): Detect elemental intrinsic functions
3111 in initalization expressions and call previous.
3113 2007-04-13 Tobias Burnus <burnus@net-b.de>
3116 * primary.c (match_variable): External functions
3119 2007-04-13 Paul Thomas <pault@gcc.gnu.org>
3122 * trans-types.c (copy_dt_decls_ifequal): Do not get pointer
3123 derived type components.
3125 2007-04-13 Tobias Schlüter <tobi@gcc.gnu.org>
3128 * resolve.c: Include obstack.h and bitmap.h. New variable
3130 (code_stack): Add tail and reachable_labels fields.
3131 (reachable_labels): New function.
3132 (resolve_branch): Rework to use new fields in code_stack.
3133 (resolve_code): Call reachable_labels.
3134 (resolve_codes): Allocate and free labels_obstack.
3136 2007-04-12 Tobias Schlüter <tobi@gcc.gnu.org>
3139 * decl.c (match_char_spec): Move check for negative CHARACTER
3141 * resolve.c (resolve_charlen): ... here.
3142 (resolve_types): Resolve CHARACTER lengths earlier.
3144 2007-04-12 Daniel Franke <franke.daniel@gmail.com>
3147 * intrinsic.texi (RANDOM_SEED, RANDOM_NUMBER): New.
3149 2007-04-12 Tobias Schlüter <tobi@gcc.gnu.org>
3152 * primary.c (gfc_variable_attr): Don't copy string length if it
3154 * resolve.c (resolve_code): Clarify error message.
3157 * decl.c (gfc_match_end): Also check for construct name in END
3158 FORALL and END WERE statements.
3159 * match.c (match_case_eos): Use uppercase for statement name in
3161 (match_elsewhere): Construct name may appear iff construct has a
3164 * trans-types.c: Update copyright years. Reformat long comment
3165 explaining array descriptor format. Remove obsolete mention of
3168 * arith.c (gfc_arith_uplus): Rename to ...
3169 (gfc_arith_identity): ... this.
3170 (gfc_parentheses): New function.
3171 (gfc_uplus): Adapt to renamed function.
3172 * arith.h (gfc_parentheses): Add prototype.
3173 * expr.c (gfc_copy_expr): Deal with INTRINSIC_PARENTHESES.
3174 (simplifiy_intrinsic_op): Treat INTRINSIC_UPLUS separately from
3175 INTRINSIC_PARENTHESES.
3177 2007-04-12 Tobias Burnus <burnus@net-b.de>
3180 * decl.c (match_attr_spec): Allow PRIVATE/PUBLIC
3181 attribute in type definitions.
3182 (gfc_match_private): Allow PRIVATE statement only
3183 in specification part of modules.
3184 (gfc_match_public): Ditto for PUBLIC.
3185 (gfc_match_derived_decl): Allow PRIVATE/PUBLIC attribute only in
3186 specificification part of modules.
3188 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
3191 * intrinsic.c (add_functions): Add ref. to gfc_resolve_achar.
3192 * intrinsic.h : Add prototype for gfc_resolve_achar.
3193 * iresolve.c (gfc_resolve_achar): New function.
3195 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
3198 * resolve.c (resolve_fl_variable): Set flag to 2 for automatic
3199 arrays. Make condition for automatic array error explicit.
3200 If a dummy, no error on an INTENT(OUT) derived type.
3202 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
3205 * expr.c (find_array_element): Correct arithmetic for rank > 1.
3207 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
3210 * check.c (numeric_check): If an expresson has not got a type,
3211 see if it is a symbol for which a default type applies.
3213 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
3216 * trans-decl.c (gfc_get_symbol_decl): Allow unreferenced use
3219 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
3222 * symbol.c (gfc_check_function_type): New function.
3223 * gfortran.h : Add prototype for previous.
3224 * parse.c (parse_progunit): Call it after parsing specification
3227 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
3230 * trans-expr.c (gfc_conv_function_call): Give a dummy
3231 procedure the correct type if it has alternate returns.
3233 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
3236 * decl.c (gfc_match_modproc): Go up to the top of the namespace
3237 tree to find the module namespace for gfc_get_symbol.
3239 2007-04-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3242 * fortran/gfortran.h (gfc_charlen_int_kind): New prototype.
3243 * fortran/trans-types.c (gfc_charlen_int_kind): New variable.
3244 (gfc_init_types): Define gfc_charlen_int_kind.
3245 * fortran/trans.h (gfor_fndecl_string_repeat): Remove prototype.
3246 * fortran/trans-decl.c (gfor_fndecl_string_repeat): Delete.
3247 (gfc_build_intrinsic_function_decls): Don't set
3248 gfor_fndecl_string_repeat.
3249 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_repeat): Rewrite
3250 so that we don't have to call a library function.
3251 * fortran/simplify.c (gfc_simplify_repeat): Perform the necessary
3252 checks on the NCOPIES argument, and work with arbitrary size
3255 2007-03-31 Tobias Burnus <burnus@net-b.de>
3257 * intrinsic.c (add_functions): Fix name of dummy argument
3258 for new_line and exit intrinsic.
3260 2007-03-31 Paul Thomas <pault@gcc.gnu.org>
3263 * gfortran.texi: Add a section for the %VAL, %REF and %LOC
3266 2007-03-30 Rafael Avila de Espindola <espindola@google.com>
3268 * trans-types.c (gfc_signed_or_unsigned_type): Remove.
3269 (gfc_unsigned_type): Use get_signed_or_unsigned_type instead of
3270 gfc_signed_or_unsigned_type.
3271 (gfc_signed_type): Ditto.
3272 * trans-types.h (gfc_signed_or_unsigned_type): Remove.
3273 * f95-lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
3275 2007-03-30 Tobias Schlüter <tobi@gcc.gnu.org>
3277 * symbol.c (gfc_find_gsymbol): Simplify, don't unconditionally
3278 descend into all branches.
3280 2007-03-29 Tobias Schlüter <tobi@gcc.gnu.org>
3282 * intrinsic.c (conv_name): Let gfc_get_string handle the format.
3283 (find_conv): Compare pointers instead of calling strcmp.
3284 (find_sym): Likewise, but ensure that the compared pointer is in
3285 the global string table.
3287 2007-03-28 Tobias Schlüter <tobi@gcc.gnu.org>
3289 * gfc-internals.texi: Fix output filename. Merge type index into
3290 concept index. Start documentation of gfc_code structure.
3292 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
3294 * gfc-internals.texi: New file,
3295 * Make-lang.in: Add rules to convert it to dvi, pdf, and info.
3297 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
3299 * error.c (show_locus): Remove always-false test.
3301 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
3303 * lang.opt: Minor edits to descriptions.
3305 2007-03-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3308 * fortran/interface.c (check_operator_interface): Implement
3309 the standard checks on user operators extending intrinsic operators.
3310 * fortran/resolve.c (resolve_operator): If the ranks of operators
3311 don't match, don't error out but try the user-defined ones first.
3313 2007-03-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3316 * expr.c (check_dimension): Fix logic of comparisons.
3318 2007-03-24 Paul Thomas <pault@gcc.gnu.org>
3321 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Return
3322 int result that is non-zero if the expression is the function
3323 result. Only the characteristics of the result expression
3324 can be used in a procedure interface, so simplify LEN in situ
3325 using its character length.
3329 * trans-expr.c (gfc_conv_function_call): Do not use
3330 gfc_conv_expr_reference for actual pointer function with formal
3331 target because a temporary is created that does not transfer
3332 the reference correctly. Do not indirect formal pointer
3333 functions since it is the function reference that is needed.
3335 2007-03-24 Brooks Moses <brooks.moses@codesourcery.com>
3337 * gfortran.h: Edit comments on GFC_STD_*.
3339 2007-03-23 Brooks Moses <brooks.moses@codesourcery.com>
3341 * invoke.texi: Misc. small typo fixes.
3342 (-Wcharacter-truncation): Add.
3343 (-Wnonstd-intrinsics): Correct spelling.
3345 (-fintrinsic-modules-path): Add.
3347 2007-03-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3350 * arith.c (complex_pow): Rewrite to handle large power.
3351 (gfc_arith_power): Handle large power in the real and integer
3354 2007-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3357 * trans-const.c (gfc_conv_mpz_to_tree): Allow integer constants
3358 larger than twice the width of a HOST_WIDE_INT.
3360 2006-03-22 Paul Thomas <pault@gcc.gnu.org>
3363 * trans-intrinsic.c (gfc_size_in_bytes): Remove function.
3364 (gfc_conv_intrinsic_array_transfer): Remove calls to previous.
3365 Explicitly extract TREE_TYPEs for source and mold. Use these
3366 to calculate length of source and mold, except for characters,
3367 where the se string_length is used. For mold, the TREE_TYPE is
3368 recalculated using gfc_get_character_type_len so that the
3369 result is correctly cast for character literals and substrings.
3370 Do not use gfc_typenode_for_spec for the final cast.
3372 2007-03-22 Tobias Schlüter <tobi@gcc.gnu.org>
3375 * decl.c (gfc_match_derived_decl): Reliably reject
3376 'doubleprecision' and 'doublecomplex' as type names.
3378 2007-03-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3381 * trans-expr.c (gfc_trans_init_string_length): Length should
3383 (gfc_conv_function_call): Likewise.
3385 2007-03-18 Paul Thomas <pault@gcc.gnu.org>
3389 * symbo.c : Add gfc_derived_types.
3390 (gfc_free_dt_list): Free derived type list gfc_derived_types.
3391 (gfc_free_namespace): Remove call to gfc_free_dt_list.
3392 (gfc_symbol_done_2): Call gfc_free_dt_list.
3393 * gfortran.h : Declare gfc_derived_types to be external. Remove
3394 derived types field from gfc_namespace.
3395 * resolve.c (resolve_fl_derived): Refer to gfc_derived types
3396 rather than namespace derived_types.
3397 (resolve_fntype): Remove special treatment for module
3398 derived type functions.
3399 * trans-types.c (gfc_get_derived_type): Remove search for like
3400 derived types. Finish by copying back end declaration to like
3401 derived types in the derived type list gfc_derived_types.
3403 2007-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3406 * trans-expr.c (gfc_conv_powi): Make n argument unsigned hwi.
3407 (gfc_conv_cst_int_power): Handle integer exponent with care,
3408 since it might be too large for us.
3410 2007-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3413 * invoke.texi: Fix typo.
3415 2007-03-16 Tobias Burnus <burnus@net-b.de>
3417 * trans-decl.c (gfc_generate_function_code): Use all arguments of
3420 2007-03-15 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3422 * gfortran.h (gfc_option_t): Add flag_backtrace field.
3423 * lang.opt: Add -fbacktrace option.
3424 * invoke.texi: Document the new option.
3425 * trans-decl.c (gfc_build_builtin_function_decls): Add new
3426 option to the call to set_std.
3427 * options.c (gfc_init_options, gfc_handle_option): Handle the
3430 2007-03-15 Tobias Burnus <burnus@gcc.gnu.org>
3431 Paul Thomas <pault@gcc.gnu.org>
3434 * decl.c (gfc_match_import): If the parent of the current name-
3435 space is null, try looking for an imported symbol in the parent
3436 of the proc_name interface.
3437 * resolve.c (resolve_fl_variable): Do not check for blocking of
3438 host association by a same symbol, if the symbol is in an
3441 2007-03-15 Paul Thomas <pault@gcc.gnu.org>
3444 * decl.c (match_data_constant): Before going on to try to match
3445 a name, try to match a structure component.
3449 * resolve.c (resolve_actual_arglist): Do not reject a generic
3450 actual argument if it has a same name specific interface.
3453 * trans-array.c (parse_interface): Do not nullify allocatable
3454 components if the symbol has the saved attribute.
3456 2007-03-14 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3458 * trans-array.c (gfc_trans_auto_array_allocation): Replace
3459 fold(convert()) by fold_convert().
3460 (gfc_duplicate_allocatable): Likewise.
3461 * trans-intrinsic.c (gfc_conv_intrinsic_dot_product): Use
3462 build_int_cst instead of converting an integer_zero_node
3465 2007-03-14 Jakub Jelinek <jakub@redhat.com>
3467 * module.c (mio_typespec): Don't look at ts->cl if not BT_CHARACTER.
3469 2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
3474 * intrinsics.texi (CHDIR): Fix argument names, note
3475 that STATUS must be a default integer.
3476 (CTIME): Fix argument names, note that RESULT must
3477 be a default integer.
3478 (EXIT): Note that STATUS must be a default integer.
3480 2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
3483 * intrinsic.texi: General whitespace cleanup, remove
3484 comment about missing intrinsics.
3485 (menu): Add lines for new entries listed below.
3486 (ACOSH): Mention specific function DACOSH, correct
3487 description phrasing.
3488 (ASINH): Mention specific function DASINH, correct
3489 description phrasing.
3490 (ATANH): Mention specific function DATANH, correct
3491 description phrasing.
3492 (COS): Add index entry for CCOS.
3493 (CPU_TIME): Correct "REAL" to "REAL(*)".
3494 (EXP): Add index entry for CEXP.
3495 (INT): Correct argument name to "A".
3499 (MAX): Add index entries for specific variants.
3500 (MCLOCK): New entry.
3501 (MCLOCK8): New entry.
3502 (SECNDS): Adjust to a more standard form.
3503 (SECOND): New entry.
3504 (TIME): Add cross-reference to MCLOCK.
3505 (TIME8): Add cross-reference to MCLOCK8.
3507 2007-03-11 Paul Thomas <pault@gcc.gnu.org>
3510 * parse.c (parse_interface): Use the default types from the
3511 formal namespace if a function or its result do not have a type
3512 after parsing the specification statements.
3514 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
3516 * intrinsic.texi: (ICHAR) Improve internal I/O note.
3517 (ACHAR): Reference it.
3518 (CHAR): Reference it.
3519 (IACHAR): Reference it.
3521 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
3523 * intrinsic.texi: (LINK) Document function form.
3529 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
3531 * intrinsic.texi: minor typo fixes, removed prologue.
3532 (FSEEK): moved to correct place in alphabetical order.
3534 2007-03-08 Daniel Franke <franke.daniel@gmail.com>
3537 * check.c (gfc_check_alarm_sub): Added check for default integer
3538 kind of status argument.
3539 * iresolve.c (gfc_resolve_alarm_sub): Removed conversion of
3541 * intrinsic.texi (ALARM): Extended documentation.
3543 2007-03-08 Daniel Franke <franke.daniel@gmail.com>
3545 * intrinsic.texi (GERROR, ISATTY, TTYNAM): New.
3546 (ABORT, FLUSH, FNUM, IRAND, MALLOC, SIGNAL, SRAND): Fixed typo.
3547 * intrinsic.c (add_subroutines): Adjusted dummy argument names
3548 of GERROR and TTYNAM.
3550 2007-07-08 Tobias Burnus <burnus@net-b.de>
3552 * module.c (gfc_match_use): Support renaming of operators
3554 * gfortran.texi (Fortran 2003 Status): Document support of
3555 renaming of operators.
3557 2007-07-08 Tobias Burnus <burnus@net-b.de>
3560 * module.c (read_module): Always import module name as symbol.
3561 (gfc_match_use): Disallow module name in the only clause of
3564 2007-03-08 Paul Thomas <pault@gcc.gnu.org>
3567 * expr.c (find_array_section): Correct arithmetic for section
3570 2007-03-07 Brooks Moses <brooks.moses@codesourcery.com>
3572 * iresolve.c (gfc_resolve_ishftc): Correct s_kind value.
3574 2007-03-06 Daniel Franke <franke.daniel@gmail.com>
3576 PR documentation/30950
3577 * intrinsic.texi (AND, CPU_TIME): Fix dummy argument names.
3578 (FREE): Fix call syntax.
3580 2007-03-06 Brooks Moses <brooks.moses@codesourcery.com>
3582 * intrinsic.texi: Limit column widths to a total of .85.
3584 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
3586 * gfortran.texi (GFortran and G77): Rewrite completely.
3588 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
3590 * match.c (gfc_match_name): Expanded comment.
3592 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
3594 * gfortran.texi (Old-style kind specifications): Document
3595 special handling of old-style kind specifiers for COMPLEX.
3596 * decl.c (gfc_match_old_kind_spec): Document kind/bytesize
3597 assumptions for COMPLEX in comment.
3599 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
3602 * gfortranspec.c (lang_specific_driver): Update program
3603 name and copyright date.
3605 2007-03-03 Paul Thomas <pault@gcc.gnu.org>
3608 * check.c (dim_rank_check): The shape of subsections of
3609 assumed-size arrays is known.
3611 2007-03-02 Paul Thomas <pault@gcc.gnu.org>
3612 Tobias Burnus <burnus@net-b.de>
3615 * decl.c (gfc_match_entry): Remove erroneous entry result check.
3617 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
3619 * Make-lang.in: Add install-pdf target as copied from
3620 automake v1.10 rules.
3622 2007-03-01 Tobias Burnus <burnus@net-b.de>
3625 * trans-intrinsic.c (gfc_conv_intrinsic_size): Compare pointers.
3627 2007-02-28 Tobias Burnus <burnus@net-b.de>
3628 Paul Thomas <pault@gcc.gnu.org>
3632 * resolve.c (resolve_actual_arglist): Allow by-value
3633 arguments and non-default-kind for %VAL().
3634 * trans-expr.c (conv_arglist_function): Allow
3635 non-default-kind for %VAL().
3637 2007-02-28 Tobias Burnus <burnus@net-b.de>
3640 * primary.c (next_string_char): Correct reading a character
3641 after the delimiter.
3642 (match_string_constant): Print warning message only once.
3644 2007-02-27 Richard Guenther <rguenther@suse.de>
3646 * trans-array.c (structure_alloc_comps): Use correct type
3647 for null pointer constant.
3649 2007-02-26 Brooks Moses <brooks.moses@codesourcery.com>
3651 * gfortran.texi: Standardize title page, remove version number
3652 from copyright page.
3654 2007-02-26 Thomas Koenig <Thomas.Koenig@online.de>
3655 Paul Thomas <pault@gcc.gnu.org>
3658 * trans-intrinsic.c (gfc_conv_intrinsic_size):
3659 If dim is an optional argument, check for its
3660 presence and call size0 or size1, respectively.
3662 2007-02-23 Paul Thomas <pault@gcc.gnu.org>
3665 * resolve.c (has_default_initializer): New function.
3666 (resolve_fl_variable): Call has_default_initializer to determine if
3667 the derived type has a default initializer to its ultimate
3671 2007-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3673 * options.c (set_default_std_flags): New function to consolidate
3675 (gfc_init_options): Use new function.
3676 (gfc_handle_option): Use new function.
3678 2007-02-22 Brooks Moses <brooks.moses@codesourcery.com>
3680 * gfortran.texi (Old-style kind specifications): Document
3681 special handling of old-style kind specifiers for COMPLEX.
3682 * decl.c (gfc_match_old_kind_spec): Documented kind/bytesize
3683 assumptions in comment.
3685 2007-02-21 Bernhard Fischer <aldot@gcc.gnu.org>
3687 * parse.c (next_free): Gooble spaces after OpenMP sentinel.
3689 2007-02-20 Thomas Koenig <Thomas.Koenig@online.de>
3692 * match.c (gfc_match_iterator): Remove conflict between
3693 loop variable and pointer.
3695 2007-02-20 Tobias Burnus <burnus@net-b.de>
3698 * symbol.c (gfc_add_volatile): Allow to set VOLATILE
3699 attribute for host-associated variables.
3700 * gfortran.h (symbol_attribute): Save namespace
3701 where VOLATILE has been set.
3702 * trans-decl.c (gfc_finish_var_decl): Move variable
3703 declaration to the top.
3705 2007-02-20 Tobias Burnus <burnus@net-b.de>
3708 * resolve.c (resolve_symbol): Add character dummy VALUE check.
3710 2007-02-19 Thomas Koenig <Thomas.Koenig@online.de>
3713 * fortran/iresolve.c (gfc_resolve_maxloc): Remove coercion of
3714 argument to default integer.
3715 (gfc_resolve_minloc): Likewise.
3717 2007-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3720 * options.c (gfc_init_options): Relax warning level for obsolescent.
3721 * match.c (match_arithmetic_if): Change to obsolescent from deleted.
3722 (gfc_match_if): Same.
3724 2007-02-18 Roger Sayle <roger@eyesopen.com>
3726 * trans-array.c (gfc_build_constant_array_constructor): When the
3727 shape of the constructor is known, use that to construct the
3729 (gfc_trans_constant_array_constructor): Initialize the "info"
3730 information for all of the dimensions of the array constructor.
3731 (constant_array_constructor_loop_size): New function.
3732 (gfc_trans_array_constructor): Use it to determine whether a
3733 loop is suitable for "constant array constructor" optimization.
3735 * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Use fold_build2
3736 instead of build2, to avoid conditions like "(a != b) != 0".
3738 2007-02-18 Roger Sayle <roger@eyesopen.com>
3739 Paul Thomas <pault@gcc.gnu.org>
3742 * match.c (match_forall_iterator): Use gfc_match_expr instead
3743 of gfc_match_variable to match the iterator variable. Return
3744 MATCH_NO if not a variable. Remove the reset of the symbol's
3747 2007-02-16 Tobias Burnus <burnus@net-b.de>
3750 * trans-decl.c (gfc_generate_function_code): Do not initialize
3751 pointers to derived components.
3753 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
3754 Brooks Moses <brooks.moses@codesourcery.com>
3755 Lee Millward <lee.millward@codesourcery.com>
3757 * trans-expr.c (gfc_conv_power_op): Use build_call_expr.
3758 (gfc_conv_string_tmp): Likewise.
3759 (gfc_conv_concat_op): Likewise.
3760 (gfc_build_compare_string): Likewise.
3761 (gfc_conv_function_call): Use build_call_list instead of build3.
3763 * trans-array.c (gfc_trans_allocate_array_storage): Use
3765 (gfc_grow_array): Likewise.
3766 (gfc_trans_array_ctor_element): Likewise.
3767 (gfc_trans_array_constructor_value): Likewise.
3768 (gfc_array_allocate): Likewise.
3769 (gfc_array_deallocate): Likewise.
3770 (gfc_trans_auto_array_allocation): Likewise.
3771 (gfc_trans_dummy_array_bias): Likewise.
3772 (gfc_conv_array_parameter): Likewise.
3773 (gfc_trans_dealloc_allocated): Likewise.
3774 (gfc_duplicate_allocatable): Likewise.
3776 * trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr.
3777 (gfc_trans_omp_flush): Likewise.
3779 * trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr.
3780 (gfc_trans_pause): Likewise.
3781 (gfc_trans_stop): Likewise.
3782 (gfc_trans_character_select): Likewise.
3783 (gfc_do_allocate): Likewise.
3784 (gfc_trans_assign_need_temp): Likewise.
3785 (gfc_trans_pointer_assign_need_temp): Likewise.
3786 (gfc_trans_forall_1): Likewise.
3787 (gfc_trans_where_2): Likewise.
3788 (gfc_trans_allocate): Likewise.
3789 (gfc_trans_deallocate): Likewise.
3791 * trans.c (gfc_trans_runtime_check): Use build_call_expr.
3793 * trans-io.c (gfc_trans_open): Use build_call_expr.
3794 (gfc_trans_close): Likewise.
3795 (build_filepos): Likewise.
3796 (gfc_trans_inquire): Likewise.
3797 (NML_FIRST_ARG): Delete.
3798 (NML_ADD_ARG): Delete.
3799 (transfer_namelist_element): Use build_call_expr.
3800 (build_dt): Likewise.
3801 (gfc_trans_dt_end): Likewise.
3802 (transfer_expr): Likewise.
3803 (transfer_array-desc): Likewise.
3805 * trans-decl.c (gfc_generate_function_code): Use build_call_expr.
3806 (gfc_generate_constructors): Likewise.
3808 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr.
3809 (gfc_conv_intrinsic_fdate): Likewise.
3810 (gfc_conv_intrinsic_ttynam): Likewise.
3811 (gfc_conv_intrinsic_array_transfer): Likewise.
3812 (gfc_conv_associated): Likewise.
3813 (gfc_conv_intrinsic_si_kind): Likewise.
3814 (gfc_conv_intrinsic_trim): Likewise.
3815 (gfc_conv_intrinsic_repeat: Likewise.
3816 (gfc_conv_intrinsic_iargc): Likewise.
3818 2007-02-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3821 * scanner.c (gfc_next_char_literal): Add check for end of file after
3822 call to advance_line.
3824 2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>
3827 * primary.c (match_logical_constant): Return MATCH_ERROR on invalid
3830 2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>
3832 * misc.c (gfc_typename): Fix potential buffer overflow.
3834 2007-02-13 Paul Thomas <pault@gcc.gnu.org>
3837 * module.c (read_module): Set pointer_info to referenced if the
3838 symbol has no namespace.
3840 2007-02-12 Nick Clifton <nickc@redhat.com>
3842 * lang.opt: Add Warning attribute to warning options.
3844 2007-02-11 Daniel Franke <franke.daniel@gmail.com>
3846 * intrinsic.texi (HOSTNM): Fix typographical error in syntax.
3847 (SLEEP): Added section and documentation.
3849 2007-02-11 Tobias Schlüter <tobi@gcc.gnu.org>
3852 * decl.c (add_init_expr_to_sym): Remove ENUM specific code.
3853 (variable_decl): Likewise. Rewrap comment.
3854 (match_attr_spec): Remove ENUM specific code.
3855 (gfc_match_enum): Fix typo in error message.
3856 (enumerator_decl): New function.
3857 (gfc_match_enumerator_def): Use enumerator_decl instead of
3858 variable_decl. Adapt code accordingly.
3860 2007-02-11 Paul Thomas <pault@gcc.gnu.org>
3863 * module.c (find_symtree_for_symbol): New function to return
3864 a symtree that is not a "unique symtree" given a symbol.
3865 (read_module): Do not automatically set pointer_info to
3866 referenced because this inhibits the generation of a unique
3867 symtree. Recycle the existing symtree if possible by calling
3868 find_symtree_for_symbol.
3871 * decl.c (add_init_expr_to_sym): Make new charlen for an array
3872 constructor initializer.
3874 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
3876 * f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address
3877 and __emutls_register_common.
3878 * openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls.
3879 * trans-common.c (build_common_decl): Don't check have_tls.
3880 * trans-decl.c (gfc_finish_var_decl): Likewise.
3881 * types.def (BT_WORD, BT_FN_PTR_PTR): New.
3882 (BT_FN_VOID_PTR_WORD_WORD_PTR): New.
3884 2007-02-09 Tobias Burnus <burnus@net-b.de>
3887 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc,
3888 gfc_conv_intrinsic_minmaxval): Use HUGE-1 for most negative integer.
3890 2007-02-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3893 * trans-array.c (gfc_trans_create_temp_array): Remove use of the
3894 function argument. Always generate code for negative extent.
3896 * trans-array.h (gfc_trans_create_temp_array): Change prototype.
3897 * trans-expr.c (gfc_conv_function_call): Remove use of last argument
3898 of gfc_trans_create_temp_array.
3899 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Likewise.
3900 * trans-stmt.c (gfc_conv_elemental_dependencies): Likewise.
3902 2007-02-08 Roger Sayle <roger@eyesopen.com>
3904 * trans-stmt.c (gfc_trans_forall_1): Optimize the cases where the
3905 mask expression is a compile-time constant (".true." or ".false.").
3907 2007-02-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3910 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Evaluate
3911 arguments only once. Generate check that NCOPIES argument is not
3914 2007-02-04 Steven G. Kargl <kargl@gcc.gnu.org>
3917 * fortran/invoke.texi: Update documentation.
3918 * fortran/options.c (gfc_post_options): Deal with tabs with -std=f2003
3921 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
3923 * trans-array.c: Fix a comment typo.
3925 2007-02-03 Paul Thomas <pault@gcc.gnu.org>
3928 * array.c (match_array_element_spec): If the length of an array is
3929 negative, adjust the upper limit to make it zero length.
3932 * resolve.c (pure_function, resolve_function): Initialize name to
3933 null to clear up build warnings.
3934 (resolve_fl_variable): Look at components explicitly to check for
3935 default initializer, rather than using gfc_default_initializer.
3937 2007-02-02 Steven G. Kargl <kargl@gcc.gnu.org>
3940 * resolve.c (resolve_generic_f): Check for non-NULL sym.
3942 2007-02-02 Roger Sayle <roger@eyesopen.com>
3944 * trans.c (gfc_build_array_ref): Use STRIP_TYPE_NOPS to eliminate
3945 NON_LVALUE_EXPR nodes and useless type conversions.
3947 2007-02-02 Paul Thomas <pault@gcc.gnu.org>
3951 * trans-expr.c (gfc_conv_aliased_arg): Remove static attribute
3952 from function and make sure that substring lengths are
3954 (is_aliased_array): Remove static attribute.
3955 * trans.c : Add prototypes for gfc_conv_aliased_arg and
3957 * trans-io.c (set_internal_unit): Add the post block to the
3958 arguments of the function. Use is_aliased_array to check if
3959 temporary is needed; if so call gfc_conv_aliased_arg.
3960 (build_dt): Pass the post block to set_internal_unit and
3961 add to the block after all io activiy is done.
3963 2007-02-01 Roger Sayle <roger@eyesopen.com>
3965 * trans-array.c (gfc_conv_expr_descriptor): We don't need to use
3966 a temporary array to pass a constant non-character array constructor.
3967 Generalize the descriptor generation code to handle scalarizer
3968 "info" without an array reference.
3970 2007-02-01 Roger Sayle <roger@eyesopen.com>
3972 * dependency.c (gfc_check_dependency) <EXPR_ARRAY>: Implement
3973 dependency checking for array constructors.
3975 2007-02-01 Roger Sayle <roger@eyesopen.com>
3977 * trans-stmt.c (compute_overall_iter_number): Document function
3978 arguments. Generalize "unconditional forall nest with constant
3979 bounds" optimization to eliminate unconditional inner loops with
3982 2007-01-31 Tobias Burnus <burnus@net-b.de>
3985 * interface.c (compare_actual_formal): Check conformance between
3986 actual and VOLATILE dummy arguments.
3987 * symbol.c (gfc_add_volatile): Allow setting of VOLATILE
3988 multiple times in different scopes.
3989 * decl.c (gfc_match_volatile): Search symbol in host association.
3991 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
3993 * simplify.c, trans-array.c: Fix comment typos.
3995 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3997 * invoke.texi (Code Gen Options): Fix abbreviation typo.
3998 * intrinsic.texi (ACCESS, LSHIFT, RSHIFT): Fix typos.
4000 2007-01-30 Steve Ellcey <sje@cup.hp.com>
4003 * trans-types.c (gfc_get_function_type): Do not add void_type_node
4005 * trans-decl.c (create_function_arglist): Change assert.
4007 2007-01-29 Paul Thomas <pault@gcc.gnu.org>
4010 * module.c (read_module): If a symbol is excluded by an ONLY
4011 clause, check to see if there is a symtree already loaded. If
4012 so, attach the symtree to the pointer_info.
4014 2007-01-28 Thomas Koenig <Thomas.Koenig@online.de>
4017 * gfortran.h: Remove gfc_simplify_init_1.
4018 * arith.h: Remove third argument from gfc_compare_string.
4019 * arith.c (gfc_compare_expression): Remove third argument
4020 from call to gfc_compare_string.
4021 (gfc_compare_string): Remove third argument xcoll_table.
4022 Remove use of xcoll_table.
4023 * misc.c (gfc_init_1): Remove call to gfc_simplify_init_1.
4024 * simplify.c (ascii_table): Remove.
4025 (xascii_table): Likewise.
4026 (gfc_simplify_achar): ICE if extract_int fails. Remove use of
4027 ascii_table. Warn if -Wsurprising and value < 0 or > 127.
4028 (gfc_simplify_char): ICE if extract_int fails. Error if
4029 value < 0 or value > 255.
4030 (gfc_simplify_iachar): Remove use of xascii_table.
4031 Char values outside of 0..255 are an ICE.
4032 (gfc_simplify_lge): Remove use of xascii_table.
4033 (gfc_simplify_lgt): Likewise.
4034 (gfc_simplify_lle): Likewise.
4035 (gfc_simplify_llt): Likewise.
4036 (invert_table): Remove.
4037 (gfc_simplify_init_1): Remove.
4039 2007-01-27 Roger Sayle <roger@eyesopen.com>
4041 * trans-stmt.c (forall_info): Replace the next_nest and outer
4042 fields that previously implemented a doubly-linked list with a
4043 single prev_nest field (singly-linked list).
4044 (gfc_trans_nested_forall_loop): The nested_forall_info argument
4045 now denotes the innermost FORALL in the loop nest.
4046 (compute_overall_iter_number): Use prev_nest instead of next_nest.
4047 (gfc_trans_forall_1): Link/cons the new "info" to the head of the
4048 nested_forall_info linked list. Free the current "info" when done.
4050 2007-01-27 Paul Thomas <pault@gcc.gnu.org>
4053 * trans-expr.c (gfc_conv_operator_assign): New function.
4054 * trans.h : Add prototype for gfc_conv_operator_assign.
4055 * trans-stmt.c (gfc_trans_where_assign): Add a gfc_symbol for
4056 a potential operator assignment subroutine. If it is non-NULL
4057 call gfc_conv_operator_assign instead of the first assignment.
4058 ( gfc_trans_where_2): In the case of an operator assignment,
4059 extract the argument expressions from the code for the
4060 subroutine call and pass the symbol to gfc_trans_where_assign.
4061 resolve.c (resolve_where, gfc_resolve_where_code_in_forall,
4062 gfc_resolve_forall_body): Resolve the subroutine call for
4063 operator assignments.
4065 2007-01-26 Steven Bosscher <stevenb.gcc@gmail.com>
4066 Steven G. Kargl <kargl@gcc.gnu.org>
4069 * fortran/io.c (next_char): Deal with backslash escaped characters.
4070 Issue warnings in non -std=gnu cases.
4071 * fortran/primary.c (next_string_char): Issue warnings in non
4073 2007-01-26 Tobias Burnus <burnus@net-b.de>
4075 * lang-specs.h: Add support for .f03 and .F03 extensions.
4076 * gfortran.texi: Document .f03 extension.
4077 * options.c (form_from_filename): Recognize .f03.
4079 2007-01-25 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4082 * lang.opt (Wall): Remove RejectNegative.
4083 * options.c (gfc_handle_option): Wall can be disabled.
4084 (set_Wall): Add a parameter for disabling Wall.
4086 2007-01-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4089 * scanner.c (load_line): Remove check fot ctrl-z and don't gobble.
4091 2007-01-23 Paul Thomas <pault@gcc.gnu.org>
4094 * match.c (gfc_match_namelist): Add check for assumed size character
4095 in namelist and provide error if found.
4097 2007-01-21 Brooks Moses <brooks.moses@codesourcery.com>
4099 * intrinsic.texi (ACHAR): Added cross-references.
4100 (CHAR): Put cross-references in alphabetical order.
4101 (IACHAR): Added cross-references.
4102 (ICHAR): Added cross-references.
4104 2007-01-20 Brooks Moses <brooks.moses@codesourcery.com>
4106 * intrinsic.texi: Edited all "Syntax" examples to a consistent form.
4107 (MAXVAL): Corrected description of result characteristics.
4109 (UMASK): Added documentation.
4111 2007-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
4113 * openmp.c, matchexp.c, module.c, scanner.c, resolve.c, st.c,
4114 parse.c, primary.c, options.c, misc.c, simplify.c: Next installment
4115 in the massive whitespace patch.
4117 2007-01-20 Roger Sayle <roger@eyesopen.com>
4119 * module.c (mio_array_ref): The dimen_type fields of an array ref
4120 are an enumerated type and can't be read/written directly with a
4121 call to mio_integer. Instead loop over and cast each element.
4123 2007-01-20 Roger Sayle <roger@eyesopen.com>
4125 * dependency.c (gfc_full_array_ref_p): Check that ref->next is NULL,
4126 i.e. that the ARRAY_REF doesn't mention components.
4127 * trans-array.c (gfc_constant_array_constructor_p): Export external
4128 function renamed from constant_array_constructor_p.
4129 (gfc_build_constant_array_constructor): Export.
4130 (gfc_trans_array_constructor): Update call to the renamed function
4131 constant_array_constructor_p.
4132 * trans-array.h (gfc_constant_array_constructor_p): Prototype here.
4133 (gfc_build_constant_array_constructor): Likewise.
4134 * trans-expr.c (gfc_build_memcpy_call): New helper function split
4135 out from gfc_trans_array_copy.
4136 (gfc_trans_array_copy): Use gfc_build_memcpy_call.
4137 (gfc_trans_array_constructor_copy): New function to optimize
4138 assigning an entire array from a constant array constructor.
4139 (gfc_trans_assignment): Call gfc_trans_array_constructor_copy
4142 2007-01-20 Roger Sayle <roger@eyesopen.com>
4144 * trans-intrinsic.c (gfc_conv_intrinsic_sign): New branchless
4145 implementation for the SIGN intrinsic with integral operands.
4146 (gfc_conv_intrinsic_minmax): Fix whitespace.
4148 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4150 * gfortran.h (gfc_options_t): Add flag_allow_leading_underscore.
4151 * lang.opt: Add -fallow-leading-underscore.
4152 * match.c (gfc_match_name): Allow leading underscore in symbol
4153 name if -fallow-leading-underscore is used.
4154 * symbol.c (gfc_get_default_type): Add special case for symbol
4155 names beginning with an underscore.
4156 * trans-decl.c (gfc_get_extern_function_decl,
4157 gfc_build_intrinsic_function_decls): Add _gfortran prefix to
4158 library symbols selected_int_kind, selected_real_kind and
4160 * options.c (gfc_init_options, gfc_handle_option): Handle the
4161 new -fallow-leading-underscore option.
4163 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4166 * options.c (gfc_handle_module_path_options): Path used in -J
4167 option is now added to the module search path.
4169 2007-01-20 Richard Guenther <rguenther@suse.de>
4172 * f95-lang.c (gfc_init_builtin_functions): Provide cbrt and
4173 cexpi builtins if we have TARGET_C99_FUNCTIONS. Provide
4174 sincos builtins if the target has sincos.
4176 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
4178 * intrinsic.texi (MATMUL): Corrected a typo.
4179 (MAX): Separated @var arguments.
4180 (MIN): Separated @var arguments.
4182 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
4184 * intrinsic.texi: general whitespace cleanup.
4185 (menu): Added TIME8, removed UNMASK.
4186 (AINT): Clarified argument requirement.
4187 (ANINT): Clarified argument requirement.
4188 (CEILING): Clarified argument requirement.
4189 (CHAR): Clarified argument requirement.
4190 (CMPLX): Clarified argument requirement.
4191 (DCMPLX): Clarified argument requirement.
4192 (FGET): Line rewrapping.
4193 (FLOOR): Clarified argument requirement.
4194 (GMTIME): Added documentation.
4195 (IAND): Added cross-reference.
4196 (IBCLR): Added cross-reference.
4197 (IBSET): Added cross-reference.
4198 (IEOR): Added cross-reference.
4199 (INT): Collapsed examples, clarified argument requirement.
4200 (IOR): Added cross-references.
4201 (LEN_TRIM): Corrected result kind.
4202 (LINK): Added cross-reference.
4203 (LLT): Removed "documentation pending".
4204 (LOGICAL): Added documentation.
4205 (LSHIFT): Added documentation.
4206 (LTIME): Added documentation.
4207 (MATMUL): Added documentation.
4208 (MAX): Added documentation.
4209 (MAXLOC): Added documentation.
4210 (MAXVAL): Added documentation.
4211 (MERGE): Added documentation.
4212 (MIN): Added documentation.
4213 (MINLOC): Added documentation.
4214 (MINVAL): Added documentation.
4215 (MVBITS): Moved to correct place, added documentation.
4216 (NOT): Added documentation.
4217 (PERROR): Added documentation.
4218 (RAN): Moved to correct place, added documentation.
4219 (REAL): Clarified argument requirement.
4220 (RENAME): Added documentation.
4221 (RSHIFT): Clarified argument requirement.
4222 (SIGN): Corrected table specification.
4223 (SYMLNK): Added documentation.
4224 (SYSTEM): Added documentation.
4225 (TIME): Added documentation.
4226 (TIME8): Added section and documentation.
4227 (UNMASK): Removed erroneous section.
4229 2007-01-18 H.J. Lu <hongjiu.lu@intel.com>
4231 * trans-stmt.c (compute_overall_iter_number): Fix a typo.
4233 2007-01-18 Roger Sayle <roger@eyesopen.com>
4235 * trans-expr.c (copyable_array_p): Consider user derived types without
4236 allocatable components to be copyable.
4238 2007-01-18 Roger Sayle <roger@eyesopen.com>
4240 * trans-stmt.c (compute_overall_iter_number): Enhance to precompute
4241 the number of interations in unconditional FORALL nests with constant
4244 2007-01-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4245 Tobias Burnus <burnus@net-b.de>
4248 * gfortran.h (gfc_option_t): Add flag_dump_core.
4249 * lang.opt: Add -fdump-core option.
4250 * invoke.texi: Document the new options.
4251 * trans-decl.c (gfc_build_builtin_function_decls): Add new
4252 options to the call to set_std.
4253 * options.c (gfc_init_options, gfc_handle_option): Set the
4256 2007-01-17 Paul Thomas <pault@gcc.gnu.org>
4259 * module.c (load_generic_interfaces): Make the marking of the
4260 symbol as ambiguous conditional on the module names being
4262 (write_generic): Ensure that the generic interface has a
4263 non-NULL module field.
4265 2007-01-16 Roger Sayle <roger@eyesopen.com>
4268 * trans-stmt.c (forall_info): Remove pmask field.
4269 (gfc_trans_forall_loop): Remove NVAR argument, instead assume that
4270 NVAR covers all the interation variables in the current forall_info.
4271 Add an extra OUTER parameter, which specified the loop header in
4272 which to place mask index initializations.
4273 (gfc_trans_nested_forall_loop): Remove NEST_FLAG argument.
4274 Change the semantics of MASK_FLAG to only control the mask in the
4276 (compute_overall_iter_number): Optimize the trivial case of a
4277 top-level loop having a constant number of iterations. Update
4278 call to gfc_trans_nested_forall_loop. Calculate the number of
4279 times the inner loop will be executed, not to size of the
4281 (allocate_temp_for_forall_nest_1): Reuse SIZE as BYTESIZE when
4282 sizeof(type) == 1. Tidy up.
4283 (gfc_trans_assign_need_temp): Remove NEST_FLAG argument from calls
4284 to gfc_trans_nested_forall_loop.
4285 (gfc_trans_pointer_assign_need_temp): Likewise.
4286 (gfc_trans_forall_1): Remove unused BYTESIZE, TMPVAR, SIZEVAR and
4287 LENVAR local variables. Split mask allocation into a separate
4288 hunk/pass from mask population. Use allocate_temp_for_forall_nest
4289 to allocate the FORALL mask with the correct size. Update calls
4290 to gfc_trans_nested_forall_loop.
4291 (gfc_evaluate_where_mask): Update call to
4292 gfc_trans_nested_forall_loop.
4293 (gfc_trans_where_2): Likewise.
4295 2007-01-15 Paul Thomas <pault@gcc.gnu.org>
4298 * trans-stmt.c (gfc_trans_call): If it does not have one, get
4299 a backend_decl for an alternate return.
4302 * resolve.c (pure_function): Statement functions are pure. Note
4303 that this will have to recurse to comply fully with F95.
4306 * resolve.c (resolve_function): Only a reference to the final
4307 dimension of an assumed size array is an error in an inquiry
4311 * resolve.c (resolve_function): Make sure that the function
4312 expression has a type.
4314 2007-01-14 Paul Thomas <pault@gcc.gnu.org>
4317 * trans-decl.c (gfc_sym_mangled_function_id): Module, external
4318 symbols must not have the module name prepended.
4320 2007-01-11 Thomas Koenig <Thomas.Koenig@online.de>
4323 * iresolve.c (gfc_resolve_maxloc): If the rank
4324 of the return array is nonzero and we process an
4325 integer array smaller than default kind, coerce
4326 the array to default integer.
4327 * iresolve.c (gfc_resolve_minloc): Likewise.
4329 2007-01-11 Brooks Moses <brooks.moses@codesourcery.com>
4331 * simplify.c: Update copyright to 2007.
4334 2007-01-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4337 * scanner.c (gfc_release_include_path): Free gfc_option.module_dir
4340 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
4342 * simplify.c (gfc_simplify_ibclr): Fix POS comparison.
4343 (gfc_simplify_ibset): Same.
4345 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
4349 * simplify.c (convert_mpz_to_unsigned): New function.
4350 (convert_mpz_to_signed): New function, largely based on
4352 (twos_complement): Removed.
4353 (gfc_simplify_ibclr): Add conversions to and from an
4354 unsigned representation before bit-twiddling.
4355 (gfc_simplify_ibset): Same.
4356 (gfc_simplify_ishftc): Add checks for overly large
4357 constant arguments, only check the third argument if
4358 it's present, carry over high bits into the result as
4359 appropriate, and perform the final conversion back to
4360 a signed representation using the correct sign bit.
4361 (gfc_simplify_not): Removed unnecessary masking.
4363 2007-01-09 Paul Thomas <pault@gcc.gnu.org>
4366 * resolve.c (resolve_code): Use the code->expr character length
4367 directly to set length of llen.
4369 2007-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4372 * lang.opt: Add Wcharacter_truncation option.
4373 * options.c (gfc_init_options): Initialize
4374 gfc_option.warn_character_truncation to zero.
4375 (gfc_handle_option): Add case for OPT_Wcharacter_truncation.
4377 2007-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
4379 * interface.c, intrinsic.c, gfortranspec.c, io.c, f95-lang.c,
4380 iresolve.c, match.c: Update Copyright years. Whitespace.
4382 2007-01-08 Richard Guenther <rguenther@suse.de>
4384 * trans-io.c (transfer_array_desc): Use build_int_cst instead
4387 2007-01-08 Roger Sayle <roger@eyesopen.com>
4389 * trans-array.c (constant_array_constructor_p): New function to
4390 determine whether an array constructor consists only of constant
4391 elements, and if so return it's size.
4392 (gfc_build_constant_array_constructor): Construct a statically
4393 initialized gfortran array for a given EXPR_ARRAY.
4394 (gfc_trans_constant_array_constructor): Efficiently scalarize
4395 a constant array constructor.
4396 (gfc_trans_array_constructor): Tidy up use of CONST_STRING.
4397 Special case scalarization of constant array constructors, all of
4398 whose elements are specified, using constant_array_constructor_p
4399 and gfc_trans_constant_array_constructor.
4400 (gfc_conv_scalarized_array_ref): Check whetger info->offset is zero
4401 before adding it to index, to avoid creating a NON_LVALUE_EXPR.
4403 2007-01-08 Kazu Hirata <kazu@codesourcery.com>
4405 gfortran.texi: Fix typos.
4407 2007-01-07 Steven G. Kargl <kargl@gcc.gnu.org>
4409 * decl.c, dump-parse-tree.c, error.c, data.c, expr.c, dependency.c,
4410 convert.c: Update Copyright dates. Fix whitespace.
4412 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
4414 * data.c (gfc_assign_data_value): Fix whitespace.
4416 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
4418 * trans-array.c (gfc_trans_create_temp_array, gfc_array_init_size):
4419 Commentary typo fix.
4421 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
4424 * match.c (gfc_match_name): Print diagnostics for invalid
4427 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
4429 * array.c: Fix whitespace in comment table.
4431 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
4433 * array.c, bbt.c, check.c: Update copyright years. Whitespace.
4435 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
4437 * arith.c: Update copyright years. Whitespace.
4439 2007-01-05 Roger Sayle <roger@eyesopen.com>
4441 * trans-expr.c (gfc_trans_assignment_1): New subroutine to scalarize
4442 array assignments split out from gfc_trans_assignment.
4443 (gfc_trans_array_copy): New function to implement array to array
4444 copies via calls to __builtin_memcpy.
4445 (copyable_array_p): New helper function to identify an array of
4446 simple/POD types, that may be copied/assigned using memcpy.
4447 (gfc_trans_assignment): Use gfc_trans_array_copy to handle simple
4448 whole array assignments considered suitable by copyable_array_p.
4449 Invoke gfc_trans_assignment_1 to perform the fallback scalarization.
4451 2007-01-05 Roger Sayle <roger@eyesopen.com>
4453 * trans-array.c (gfc_trans_array_constructor_value): Make the
4454 static const "data" array as TREE_READONLY.
4455 * trans-stmt.c (gfc_trans_character_select): Likewise.
4457 2007-01-05 Roger Sayle <roger@eyesopen.com>
4459 * trans-array.c (gfc_conv_loop_setup): Test whether the loop
4460 stride is one, to avoid fold_build2 introducing a useless
4461 NON_LVALUE_EXPR node.
4463 2007-01-05 Tobias Burnus <burnus@net-b.de>
4465 * symbol.c (check_conflict): Fix error message.
4467 2007-01-05 Paul Thomas <pault@gcc.gnu.org>
4470 * decl.c (gfc_in_match_data, gfc_set_in_match_data): New
4471 functions to signal that a DATA statement is being matched.
4472 (gfc_match_data): Call gfc_set_in_match_data on entry and on
4474 * gfortran.h : Add prototypes for above.
4475 * expr.c (check_init_expr): Avoid check on parameter or
4476 variable if gfc_in_match_data is true.
4477 (gfc_match_init_expr): Do not call error on non-reduction of
4478 expression if gfc_in_match_data is true.
4482 * decl.c (gfc_set_constant_character_len): Add boolean arg to
4483 flag array constructor resolution. Warn if string is being
4484 truncated. Standard dependent error if string is padded. Set
4485 new arg to false for all three calls to
4486 gfc_set_constant_character_len.
4487 * match.h : Add boolean arg to prototype for
4488 gfc_set_constant_character_len.
4489 * gfortran.h : Add warn_character_truncation to gfc_options.
4490 * options.c (set_Wall): Set warn_character_truncation if -Wall
4492 * resolve.c (resolve_code): Warn if rhs string in character
4493 assignment has to be truncated.
4494 * array.c (gfc_resolve_character_array_constructor): Set new
4495 argument to true for call to gfc_set_constant_character_len.
4497 2007-01-05 Tobias Burnus <burnus@net-b.de>
4500 * interface.c (compare_parameter_intent): New function.
4501 (check_intents): Support pointer intents.
4502 * symbol.c (check_conflict): Support pointer intents,
4503 better conflict_std message.
4504 * expr.c (gfc_check_assign,gfc_check_pointer_assign):
4505 Support pointer intents.
4506 * resolve.c (resolve_deallocate_expr,resolve_allocate_expr):
4507 Support pointer intents.
4509 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4512 * check.c (gfc_check_kill_sub): Add checks for non-scalar
4515 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
4517 * intrinsic.texi: Minor cleanup, reflowing overlong
4518 paragraphs, and correcting whitespace.
4520 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
4522 * intrinsic.texi (LBOUND): Add documentation.
4523 (LGE): Add documentation.
4524 (LGT): Add documentation.
4525 (LINK): Add documentation.
4526 (LLE): Add documentation.
4527 (LLT): Add documentation.
4528 (LNBLNK): Add documentation.
4529 (UBOUND): Add documentation.
4530 (UNLINK): Add documentation.
4532 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
4534 * intrinsic.texi (IAND): Clarify argument specifications.
4535 (IBCLR): Add documentation.
4536 (IBITS): Add documentation.
4537 (IBSET): Add documentation.
4538 (IEOR): Add documentation.
4539 (IERRNO): Add documentation.
4540 (INDEX): Add documentation.
4541 (IOR): Add documentation.
4542 (ISHFT): Add documentation.
4543 (ISHFTC): Add documentation.
4544 (KILL): Add documentation.
4545 (LEN_TRIM): Add documentation.
4547 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
4550 * interface.c (compare_actual_formal): check for
4551 alternate returns when iterating over non-present
4554 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
4556 * invoke.texi: Update manpage copyright to include 2007.
4558 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
4560 * gfortran.texi: Update copyright to include 2007.
4561 * intrinsic.texi: Update copyright to include 2007.
4562 * invoke.texi: Update copyright to include 2007.
4564 2007-01-02 Tobias Burnus <burnus@net-b.de>
4565 Jakub Jelinek <jakub@redhat.com>
4568 * scanner.c (open_included_file): Revert patch.
4569 (gfc_open_included_file): Support absolute pathnames.
4570 (gfc_open_intrinsic_module): Support absolute pathnames.
4572 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4574 * gfortran.texi (GNU Fortran and GCC): Rewrite
4576 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4578 * gfortran.texi (Introduction): Lower "Part I:
4579 Introduction" to a chapter, renumber Parts II and III to
4581 * intrinsic.texi (Introduction): Rename to "Introduction
4582 to Intrinsics" to avoid conflict with the new chapter.
4584 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4586 * intrinsic.texi (Introduction): Rewrite first paragraph.
4588 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4590 * invoke.texi (OpenMP): Added index entry.
4591 * gfortran.texi (title page): Removed erroneous '*'.
4593 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4595 * gfortran.texi (GFORTRAN_DEFAULT_RECL): Added units
4597 (Extensions): Miscellaneous minor rewriting and copyediting.
4598 (BOZ-literal constants): Renamed from Hexadecimal constants.
4599 (Hollerith constants support): Added explanation and
4600 suggestions for standard-conforming modern equivalents.
4602 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4604 * intrinsic.texi: Improvements to index entries; change
4605 @findex entries to @cindex entries.
4606 * invoke.texi: Standardize and improve index entries.
4607 * gfortran.texi: Fix @code in one index entry.
4609 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4611 * invoke.texi: Change @code-type macros to appropriate
4612 variants (@command, @option, etc.)
4613 * gfortran.texi: Same.
4615 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4617 * intrinsic.texi: Various minor cleanups.
4619 2007-01-02 Steven G. Kargl <kargls@comcast.net>
4621 * trans-intrinsic.c (gfc_conv_intrinsic_ibits): Fix call to
4624 2007-01-02 Tobias Burnus <burnus@net-b.de>
4627 * scanner.c (open_included_file): Support full-path filenames.
4629 2007-01-02 Paul Thomas <pault@gcc.gnu.org>
4632 * interface.c (check_sym_interfaces): Remove call to
4633 resolve_global_procedure.
4634 gfortran.h : Remove prototype for resolve_global_procedure.
4635 resolve.c (resolve_global_procedure): Add static attribute
4636 to function declaration.
4638 2007-01-01 Steven G. Kargl <kargls@comcast.net>
4640 * ChangeLog: Copy to ...
4641 * ChangeLog-2006: here.