1 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
4 * primary.c (gfc_match_rvalue): Make all expressions with array
5 references to structure parameters into variable expressions.
7 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
10 * trans-decl.c (init_intent_out_dt): New function.
11 (gfc_trans_deferred_vars): Remove the code for default
12 initialization of INTENT(OUT) derived types and put it
13 in the new function. Call it earlier than before, so
14 that array offsets and lower bounds are available.
16 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
19 * decl.c (get_proc_name): Return rc if rc is non-zero; ie. if
20 the name is a reference to an ambiguous symbol.
22 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
27 * decl.c : Declare gfc_function_kind_locs and
28 gfc_function_type_locus.
29 (gfc_match_kind_spec): Add second argument kind_expr_only.
30 Store locus before trying to match the expression. If the
31 current state corresponds to a function declaration and there
32 is no match to the expression, read to the parenthesis, return
33 kind = -1, dump the expression and return.
34 (gfc_match_type_spec): Renamed from match_type_spec and all
35 references changed. If an interface or an external function,
36 store the locus, set kind = -1 and return. Otherwise, if kind
37 is already = -1, use gfc_find_symbol to try to find a use
38 associated or imported type.
39 match.h : Prototype for gfc_match_type_spec.
40 * parse.c (match_deferred_characteristics): New function.
41 (parse_spec): If in a function, statement is USE or IMPORT
42 or DERIVED_DECL and the function kind=-1, call
43 match_deferred_characteristics. If kind=-1 at the end of the
44 specification expressions, this is an error.
45 * parse.h : Declare external gfc_function_kind_locs and
46 gfc_function_type_locus.
48 2007-09-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
50 * module.c (mio_expr): Avoid -Wcast-qual warning.
52 2007-09-27 Tobias Schlüter <tobi@gcc.gnu.org>
54 * arith.c (reduce_binary_aa): Fix capitalization.
55 * check.c (gfc_check_dot_product): Likewise.
56 (gfc_check_matmul): Likewise.
57 * expr.c (gfc_check_conformance): Likewise.
58 (gfc_check_assign): Likewise.
59 (gfc_default_initializer): Simplify logic.
60 * trans.c (gfc_msg_bounds): Make const.
61 (gfc_msg_fault): Likewise.
62 (gfc_msg_wrong_return): Likewise.
63 * trans.h: Add const to corresponding extern declarations.
65 2007-09-27 Paul Thomas <pault@gcc.gnu.org>
68 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Allow for the
69 possibility of the optional KIND argument by making arg
70 an array, counting the number of arguments and using arg[0].
72 2007-09-26 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
75 * invoke.texi: Add note to -ffpe-trap option. Fix typos.
77 2007-09-23 Tobias Schlüter <tobi@gcc.gnu.org>
80 * io.c (check_format_string): Move NULL and constant checks into
82 (check_io_constraints): Call gfc_simplify_expr() before calling
83 check_format_string(). Remove NULL and constant checks.
85 2007-09-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
88 * scanner.c, parse.c, gfortran.h: Revert revision 128671.
90 2007-09-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
93 * scanner.c (preprocessor_line): Call linemap_add when exiting
95 (gfc_new_file): Adjust debug code for USE_MAPPED_LOCATION.
97 2007-09-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
100 * trans-types.c (gfc_get_desc_dim_type): Mark artificial
101 variables with TREE_NO_WARNING.
102 (gfc_get_array_descriptor_base): Likewise.
104 2007-09-22 Paul Thomas <pault@gcc.gnu.org>
108 * trans-decl.c (gfc_create_module_variable): Output
109 derived type parameters.
110 * arith.c (gfc_parentheses): Return the argument if
111 it is a constant expression.
112 * primary.c (gfc_match_rvalue): Remove the clearing of
113 the module name and the use_assoc attribute for derived
114 type parameter expressions.
116 2007-09-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
119 * scanner.c (gfc_advance_line): Call debug_hooks->start_source_file
120 and debug_hooks->end_source_file when entering and exiting
122 (gfc_define_undef_line): New function.
123 (load_file): Ignore #define and #undef preprocessor lines
124 while reading source files.
125 * parse.c (next_statement): Handle #define and #undef
127 (gfc_parse_file): Call debug_hooks->start_source_file and
128 debug_hooks->end_source_file for the main source file if
129 requested by the debug format.
130 * gfortran.h (gfc_define_undef_line): Add prototype.
132 2007-09-22 Tobias Burnus <burnus@net-b.de>
135 * scanner.c (skip_free_comments): Warn if !$OMP& is used
136 if no OpenMP directive is to be continued.
138 2007-09-21 Paul Thomas <pault@gcc.gnu.org>
140 *trans-expr.c (gfc_trans_pointer_assignment): Convert array
141 descriptor for subref pointer assignements, rather than using
142 the loop info version.
144 2007-09-21 Tobias Burnus <burnus@net-b.de>
147 * simplify.c (gfc_simplify_transfer): Warn if source size
148 is smaller than result size.
150 2007-09-20 Asher Langton <langton2@llnl.gov>
153 * gfortran.h : Add init_local_* enums and init_flag_* flags to
155 * lang.opt: Add -finit-local-zero, -finit-real, -finit-integer,
156 -finit-character, and -finit-logical flags.
157 * invoke.texi: Document new options.
158 * resolve.c (build_init_assign): New function.
159 (apply_init_assign): Move part of function into build_init_assign.
160 (build_default_init_expr): Build local initializer (-finit-*).
161 (apply_default_init_local): Apply local initializer (-finit-*).
162 (resolve_fl_variable): Try to add local initializer (-finit-*).
163 * options.c (gfc_init_options, gfc_handle_option,
164 gfc_post_options): Handle -finit-local-zero, -finit-real,
165 -finit-integer, -finit-character, and -finit-logical flags.
167 2007-09-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
170 * gfortran.h (symbol_attribute): Add zero_comp field.
171 * symbol.c (gfc_use_derived): Handle case of emtpy derived types.
172 * decl.c (gfc_match_data_decl): Likewise.
173 (gfc_match_derived_decl): Likewise.
174 * module.c (ab_attribute, attr_bits): Add AB_ZERO_COMP member.
175 (mio_symbol_attribute): Write and read AB_ZERO_COMP.
176 * resolve.c (resolve_symbol): Handle case of emtpy derived types.
177 * parse.c (parse_derived): Likewise.
179 2007-09-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
182 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
183 reduce_binary_aa): Call ourselves recursively if an element of
184 the constructor is itself a constant array.
186 2007-09-20 Tobias Schlüter <tobi@gcc.gnu.org>
188 * io.c (resolve_tag_format): New function using code split out
189 and simplified from ...
190 (resolve_tag): ... this function. Simplify logic. Unify
191 IOSTAT, IOLENGTH and SIZE handling.
193 2007-09-20 Christopher D. Rickett <crickett@lanl.gov>
196 * resolve.c (gfc_iso_c_func_interface): Use information from
197 subcomponent if applicable.
199 2007-09-20 Tobias Burnus <burnus@net-b.de>
202 * intrinsic.text: Add documentation of the intrinsic modules.
203 * gfortran.texi: Link to intrinsic-modules section and to
206 2007-09-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
209 * trans-array.c (gfc_conv_ss_startstride): Only perform bounds
210 checking for optional args when they are present.
212 2007-09-18 Tobias Burnus <burnus@net-b.de>
215 * resolve.c (resolve_elemental_actual): Check for conformance
216 of intent out/inout dummies.
218 2007-09-17 Tobias Burnus <burnus@net-b.de>
221 * resolve.c (resolve_symbol): Reject public variable of
222 private derived-types for Fortran 95.
224 2007-09-17 Tobias Burnus <burnus@net-b.de>
226 * resolve.c (resolve_fl_procedure): Allow private dummies
229 2007-09-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
231 * trans-types.c (gfc_get_desc_dim_type): Do not to try
233 (gfc_get_array_descriptor_base): Likewise.
234 (gfc_get_mixed_entry_union): Likewise
235 (gfc_get_derived_type): Set decl location for fields and
238 2007-09-16 Paul Thomas <pault@gcc.gnu.org>
244 * trans.h : Add extra argument to gfc_build_array_ref. Rename
245 gfc_conv_aliased_arg to gfc_conv_subref_array_arg. Move
246 prototype of is_aliased_array to gfortran.h and rename it
247 gfc_is_subref_array. Add field span to lang_decl, add a new
248 decl lang specific flag accessed by GFC_DECL_SUBREF_ARRAY_P
249 and a new type flag GFC_DECL_SUBREF_ARRAY_P.
250 * trans.c (gfc_build_array_ref): Add the new argument, decl.
251 If this is a subreference array pointer, use the lang_decl
252 field 'span' to calculate the offset in bytes and use pointer
253 arithmetic to address the element.
254 * trans-array.c (gfc_conv_scalarized_array_ref,
255 gfc_conv_array_ref): Add the backend declaration as the third
256 field, if it is likely to be a subreference array pointer.
257 (gfc_conv_descriptor_dimension, gfc_trans_array_ctor_element,
258 gfc_trans_array_constructor_element, structure_alloc_comps,
259 gfc_conv_array_index_offset): For all other references to
260 gfc_build_array_ref, set the third argument to NULL.
261 (gfc_get_dataptr_offset): New function.
262 (gfc_conv_expr_descriptor): If the rhs of a pointer assignment
263 is a subreference array, then calculate the offset to the
264 subreference of the first element and set the descriptor data
265 pointer to this, using gfc_get_dataptr_offset.
266 trans-expr.c (gfc_get_expr_charlen): Use the expression for the
267 character length for a character subreference.
268 (gfc_conv_substring, gfc_conv_subref_array_arg): Add NULL for
269 third argument in call to gfc_build_array_ref.
270 (gfc_conv_aliased_arg): Rename to gfc_conv_subref_array_arg.
271 (is_aliased_array): Remove.
272 (gfc_conv_function_call): Change reference to is_aliased_array
273 to gfc_is_subref_array and reference to gfc_conv_aliased_arg to
274 gfc_conv_subref_array_arg.
275 (gfc_trans_pointer_assignment): Add the array element length to
276 the lang_decl 'span' field.
277 * gfortran.h : Add subref_array_pointer to symbol_attribute and
278 add the prototype for gfc_is_subref_array.
279 * trans-stmt.c : Add NULL for third argument in all references
280 to gfc_build_array_ref.
281 * expr.c (gfc_is_subref_array): Renamed is_aliased_array.
282 If this is a subreference array pointer, return true.
283 (gfc_check_pointer_assign): If the rhs is a subreference array,
284 set the lhs subreference_array_pointer attribute.
285 * trans-decl.c (gfc_get_symbol_decl): Allocate the lang_decl
286 field if the symbol is a subreference array pointer and set an
287 initial value of zero for the 'span' field.
288 * trans-io.c (set_internal_unit): Refer to is_subref_array and
289 gfc_conv_subref_array_arg.
290 (nml_get_addr_expr): Add NULL third argument to
292 (gfc_trans_transfer): Use the scalarizer for a subreference
295 2007-09-13 Thomas Koenig <tkoenig@gcc.gnu.org>
297 * iresolve.c (resolve_mask_arg): If a mask is an array
298 expression, convert it to kind=1.
300 2007-09-13 Tobias Burnus <burnus@net-b.de>
303 * expr.c (gfc_check_conformance): Print ranks in the error message.
304 * resolve.c (resolve_elemental_actual): Check also conformance of
305 the actual arguments for elemental functions.
307 2007-09-13 Tobias Burnus <burnus@net-b.de>
309 * symbol.c (gfc_add_elemental,gfc_add_pure,gfc_add_recursive):
310 Allow prefixes only to be specified once.
312 2007-09-13 Tobias Burnus <burnus@net-b.de>
315 * symbol.c (check_conflict): Add conflict of ELEMENTAL with Bind(C).
317 2007-09-12 Tobias Burnus <burnus@net-b.de>
320 * check.c (scalar_check): Move up in the file.
321 (kind_check): Call scalar_check.
322 (dim_check): If optional, do not call nonoptional_check; use
324 (gfc_check_all_any,gfc_check_count,gfc_check_cshift,gfc_check_eoshift,
325 gfc_check_lbound,gfc_check_minloc_maxloc,check_reduction,
326 gfc_check_spread,gfc_check_ubound): Use true/false instead of 0/1
327 for dim_check; honor changed meaning of optional.
328 (gfc_check_int): Replace checks by kind_check.
329 (gfc_check_size): Replace checks by dim_check.
331 2007-09-12 Tobias Burnus <burnus@net-b.de>
335 * symbol.c (check_conflict): Add conflict between INTRINSIC and ENTRY
336 and between BIND(C) and PARAMETER.
338 2007-09-12 Tobias Burnus <burnus@net-b.de>
340 * trans-expr.c (gfc_conv_initializer): Fix expr == NULL check.
342 2007-09-12 Jan Hubicka <jh@suse.cz>
344 * f95-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
346 2007-09-12 Christopher D. Rickett <crickett@lanl.gov>
349 * trans-expr.c (gfc_conv_initializer): Remove unnecessary test for
350 intmod_sym_id and use derived symbol to set new kind of C_NULL_PTR
351 and C_NULL_FUNPTR expressions.
353 2007-09-11 Christopher D. Rickett <crickett@lanl.gov>
356 * trans-expr.c (gfc_trans_structure_assign): Convert component
357 C_NULL_PTR and C_NULL_FUNPTR component initializers to (void *).
358 * trans-types.c (gfc_get_derived_type): Create a backend_decl for
359 the c_address field of C_PTR and C_FUNPTR and ensure initializer
360 is of proper type/kind for (void *).
362 2007-09-11 Jan Hubicka <jh@suse.cz>
364 * f95-lang.c (gfc_expand_function): Kill.
365 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
367 2007-09-08 Tobias Burnus <burnus@net-b.de>
370 * gfortran.texi: Document when CPP is called.
372 * intrinsic.texi (IOR): Fix typos.
374 2007-09-10 Paul Thomas <pault@gcc.gnu.org>
377 * trans-expr.c (copyable_array_p): Add tests that expression
378 is a variable, that it has no subreferences and that it is a
380 (gfc_trans_assignment): Change conditions to suit modifications
383 2007-09-06 Tom Tromey <tromey@redhat.com>
385 * scanner.c (get_file): Update.
387 (gfc_next_char_literal): Use gfc_linebuf_linenum.
388 * f95-lang.c (gfc_init): Update.
389 * gfortran.h (gfc_linebuf_linenum): New macro.
391 2007-09-05 Sandra Loosemore <sandra@codesourcery.com>
393 * trans-decl.c (build_entry_thunks): Use set_cfun.
394 (gfc_generate_function_code): Likewise.
396 2007-09-05 Paul Thomas <pault@gcc.gnu.org>
399 * primary.c (gfc_match_rvalue): Make expressions that refer
400 to derived type parameters that have array references into
401 variable expressions. Remove references to use association
405 * decl.c (add_init_expr_to_sym): Provide assumed character
406 length parameters with the length of the initialization
407 expression, if a constant, or that of the first element of
410 2007-09-04 Janus Weil <jaydub66@gmail.com>
411 Paul Thomas <pault@gcc.gnu.org>
413 * decl.c (match_procedure_decl,match_procedure_in_interface,
414 gfc_match_procedure): Handle PROCEDURE statements.
415 * gfortran.h (struct gfc_symbol): New member "gfc_symbol *interface".
416 (enum gfc_statement): New element "ST_PROCEDURE".
417 (strcut symbol_attribute): New member "unsigned procedure".
418 * interface.c (check_interface0): Extended error checking.
419 * match.h: Add gfc_match_procedure prototype.
420 * parse.c (decode_statement,next_statement,gfc_ascii_statement,
421 parse_derived,parse_interface): Implement PROCEDURE statements.
422 * resolve.c (resolve_symbol): Ditto.
423 * symbol.c (check_conflict): Ditto.
424 (gfc_add_proc): New function for setting the procedure attribute.
425 (copy_formal_args): New function for copying formal argument lists.
427 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
429 * Make-lang.in (gfortranspec.o): Remove SHLIB_MULTILIB.
431 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
433 * gfortranspec.c (lang_specific_driver): Use CONST_CAST2.
434 * options.c (gfc_post_options): Supply a TYPE for CONST_CAST.
435 * parse.c (parse_omp_structured_block): Likewise,
436 * st.c (gfc_free_statement): Likewise,
438 2007-09-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
441 * libgfortran.h: New file.
442 * iso-fortran-env.def: Use macros in the new header instead of
443 hardcoded integer constants.
444 * Make-lang.in (F95_PARSER_OBJS, GFORTRAN_TRANS_DEPS): Add
445 fortran/libgfortran.h.
446 * gfortran.h (GFC_STD_*, GFC_FPE_*, options_convert,
447 ioerror_codes): Remove.
448 * trans.c (ERROR_ALLOCATION): Remove.
449 (gfc_call_malloc, gfc_allocate_with_status,
450 gfc_allocate_array_with_status): Use LIBERROR_ALLOCATION.
451 * trans-types.h (GFC_DTYPE_*): Remove.
452 * trans-decl.c (gfc_generate_function_code): Use
453 GFC_CONVERT_NATIVE instead of CONVERT_NATIVE.
454 * trans-io.c (set_parameter_value, set_parameter_ref): Use
455 LIBERROR_* macros instead of IOERROR_ macros.
456 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use
457 LIBERROR_END and LIBERROR_EOR instead of hardcoded constants.
458 * options.c (gfc_init_options): Use GFC_CONVERT_NATIVE instead of
460 (gfc_handle_option): Use GFC_CONVERT_* macros instead of CONVERT_*.
462 2007-09-02 Steven G. Kargl <kargl@gcc.gnu.org>
464 * invoke.texi: Fix the -frange-checking option entry.
466 2007-09-02 Roger Sayle <roger@eyesopen.com>
468 * decl.c (match_string_p): New helper function to explicitly match
469 a string of characters.
470 (match_attr_spec): Remove no longer needed DECL_COLON from decl_types.
471 Delete decls array and peek_char. Rewrite decl attribute parser to
472 avoid calling gfc_match_strings.
473 * match.c (gfc_match_strings): Delete unused function.
474 * match.h (gfc_match_strings): Delete prototype.
476 2007-09-02 Tobias Schlüuter <tobi@gcc.gnu.org>
478 * dump-parse-tree.c (show_char_const): New function.
479 (gfc_show_expr): Use it.
480 * expr.c (find_substring_ref): Rework to not keep characters
481 dangling beyond end of string.
483 2007-09-02 H.J. Lu <hongjiu.lu@intel.com>
486 * array.c (expand_iterator): Initialize frame.prev.
488 2007-08-31 Tobias Burnus <burnus@net-b.de>
491 * io.c (match_io): Also diagnose extra comma for READ.
493 2007-08-31 Joseph Myers <joseph@codesourcery.com>
495 * intrinsic.texi (LGAMMA): Remove empty @cindex line.
497 2007-08-31 Paul Thomas <pault@gcc.gnu.org>
503 * gfortran.h : Add prototype for gfc_resolve_substring_charlen.
504 * resolve.c (gfc_resolve_substring_charlen): New function.
505 (resolve_ref): Call gfc_resolve_substring_charlen.
506 (gfc_resolve_character_operator): New function.
507 (gfc_resolve_expr): Call the new functions in cases where the
508 character length is missing.
509 * iresolve.c (cshift, eoshift, merge, pack, reshape, spread,
510 transpose, unpack): Call gfc_resolve_substring_charlen for
511 source expressions that are character and have a reference.
512 * trans.h (gfc_trans_init_string_length) Change name to
513 gfc_conv_string_length; modify references in trans-expr.c,
514 trans-array.c and trans-decl.c.
515 * trans-expr.c (gfc_trans_string_length): Handle case of no
517 (gfc_conv_aliased_arg): Remove code for treating substrings
518 and replace with call to gfc_trans_string_length.
519 * trans-array.c (gfc_conv_expr_descriptor): Remove code for
520 treating strings and call gfc_trans_string_length instead.
522 2007-08-30 Tobias Burnus <burnus@net-b.de>
525 * interface.c (check_interface0): Improve error for external procs.
526 (check_sym_interfaces): Fix checking of module procedures.
528 2007-08-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
531 * iresolve.c (gfc_resolve_getarg): Handle non-default integer
533 * check.c (gfc_check_getarg): New function
534 * intrinsic.h: Add prototype for gfc_check_getarg.
535 * intrinsic.c (add_subroutines): Add reference to gfc_check_getarg.
536 * intrinsic.texi (GETARG): Adjust documentation.
538 2007-08-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
539 Tobias Burnus <burnus@gcc.gnu.org>
542 * intrinsic.c (add_functions): Add IS_IOSTAT_END and
543 IS_IOSTAT_EOR intrinsics.
544 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_IOSTAT_END and
545 GFC_ISYM_IS_IOSTAT_EOR.
546 * trans-intrinsic.c (gfc_conv_has_intvalue): New function.
547 (gfc_conv_intrinsic_function): Call gfc_conv_has_intvalue for
548 GFC_ISYM_IS_IOSTAT_END and GFC_ISYM_IS_IOSTAT_EOR.
549 * intrinsic.texi: Add IS_IOSTAT_END and IS_IOSTAT_EOR.
551 2007-08-28 Christopher D. Rickett <crickett@lanl.gov>
554 * decl.c (build_sym): Pass number of identifiers on line to
556 (set_binding_label): Verify that only one identifier given if
557 NAME= specified, even if the given binding label has zero length.
558 (gfc_match_bind_c): Remove declaration for has_name_equals because
559 it hides the static global one that is needed.
561 2007-08-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
563 * trans-array.c (gfc_grow_array): Use gfc_call_realloc.
564 (gfc_array_allocate): Use gfc_allocate_with_status and
565 gfc_allocate_array_with_status.
566 (gfc_array_deallocate): Use gfc_deallocate_with_status.
567 (gfc_trans_dealloc_allocated): Use gfc_deallocate_with_status.
568 * trans-stmt.c (gfc_trans_allocate): Use gfc_allocate_with_status.
569 (gfc_trans_deallocate): Use gfc_deallocate_with_status.
570 * trans.c (gfc_allocate_with_status, gfc_allocate_array_with_status,
571 gfc_deallocate_with_status, gfc_call_realloc): New functions.
572 * trans.h (gfc_allocate_with_status, gfc_allocate_array_with_status,
573 gfc_deallocate_with_status, gfc_call_realloc): New prototypes.
574 (gfor_fndecl_internal_realloc, gfor_fndecl_allocate,
575 gfor_fndecl_allocate_array, gfor_fndecl_deallocate): Remove.
576 * f95-lang.c (gfc_init_builtin_functions): Create decl for
578 * trans-decl.c (gfor_fndecl_internal_realloc,
579 gfor_fndecl_allocate, gfor_fndecl_allocate_array,
580 gfor_fndecl_deallocate): Remove function decls.
581 (gfc_build_builtin_function_decls): Likewise.
583 2007-08-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
586 Revert previous patch.
588 2007-08-28 Jakub Jelinek <jakub@redhat.com>
591 * Make-lang.in (fortran/trans-types.o): Depend on $(FLAGS_H).
592 * trans-types.c: Include flags.h.
593 (gfc_get_nodesc_array_type): Add TYPE_DECL TYPE_NAME with
594 correct bounds and dimensions for packed arrays.
596 2007-08-27 Tobias Burnus <burnus@net-b.de>
598 * simplify.c (gfc_simplify_lgamma): Fix mpfr_lgamma call.
600 2007-08-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
603 * trans-io.c (create_dummy_iostat): New function to create a unique
604 dummy variable expression to use with IOSTAT.
605 (gfc_trans_inquire): Use the new function to pass unit number error info
606 to run-time library if a regular IOSTAT variable was not given.
608 2007-08-26 H.J. Lu <hongjiu.lu@intel.com>
610 * gfortran.h (gfc_isym_id): Add GFC_ISYM_GAMMA and
613 2007-08-26 Asher Langton <langton2@llnl.gov>
614 Tobias Burnus <burnus@net-b.de>
616 * gfortran.h (gfc_option_t): Add flag_recursive.
617 * lang.opt: Add -frecursive option and update -fopenmp.
618 * invoke.texi (-frecursive): Document new option.
619 (-fopenmp,-fno-automatic,-fmax-stack-var-size): Update.
620 * options.c (gfc_init_options, gfc_post_options,
621 gfc_handle_option): Add -frecursive and modify -fopenmp.
622 (gfc_post_options): Add warning for conflicting flags.
624 2007-08-26 Tobias Burnus <burnus@net-b.de>
627 * module.c (mio_symbol_ref,mio_interface_rest): Return pointer_info.
628 (load_operator_interfaces): Support multible loading of an operator.
630 2007-08-26 Tobias Burnus <burnus@net-b.de>
633 * match.c (gfc_match_common): Remove SEQUENCE diagnostics.
634 * resolve.c (resolve_common_blocks): Add SEQUENCE diagnostics;
635 fix walking through the tree.
637 2007-08-26 Tobias Burnus <burnus@net-b.de>
640 * intrinsic.h (gfc_simplify_gamma,gfc_simplify_lgamma,
641 gfc_resolve_gamma,gfc_resolve_lgamma): New function declations.
642 * mathbuiltins.def: Define GAMMA and LGAMMA.
643 * intrinsic.c (add_functions): Add GAMMA, DGAMMA, LGAMMA, ALGAMA
645 * simplify.c (gfc_simplify_gamma,gfc_simplify_lgamma): New functions.
646 * iresolve.c (gfc_resolve_gamma,gfc_resolve_lgamma): New functions.
647 * intrinsic.texi: Add documentation for GAMMA and LGAMMA.
649 2007-08-26 Tobias Burnus <burnus@net-b.de>
652 * parse.c (parse_derived): Support empty derived type
653 definitions for Fortran 2003.
655 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
657 * trans-openmp.c (gfc_omp_privatize_by_reference): Constify.
658 * trans.h (gfc_omp_privatize_by_reference): Likewise.
660 2007-08-24 Tobias Burnus <burnus@net-b.de>
663 * intrinsic.c (gfc_intrinsic_func_interface): Fix initialization
666 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org>
669 * iresolve.c: Don't convert array masks.
671 2007-08-24 Tobias Burnus <burnus@net-b.de>
674 * trans-array.c (gfc_conv_expr_descriptor): Copy bounds for
675 whole-array pointer assignments.
677 2007-08-23 Jakub Jelinek <jakub@redhat.com>
679 * decl.c (variable_decl): Don't share charlen structs if
681 * trans-decl.c (create_function_arglist): Assert
682 f->sym->ts.cl->backend_decl is NULL instead of unsharing
685 2007-08-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
688 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Remove
689 runtime error checking.
691 2007-08-22 Roger Sayle <roger@eyesopen.com>
692 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
694 * match.c (intrinsic_operators): Delete.
695 (gfc_match_intrinsic_op): Rewrite matcher to avoid calling
698 2007-08-22 Christopher D. Rickett <crickett@lanl.gov>
701 * resolve.c (gfc_iso_c_sub_interface): Remove setting of type and
702 kind for optional SHAPE parameter of C_F_POINTER.
704 2007-08-22 Janus Weil <jaydub66@gmail.com>
706 * decl.c (match_attr_spec): Pass on errors from gfc_match_bind_c.
707 (gfc_match_bind_c): Bugfix in check for NAME= with abstract interfaces.
708 (gfc_match_mopdproc): Bugfix to reject module procedures in
711 2007-08-22 Kai Tietz <kai.tietz@onevision.com>
713 * f95-lang.c: (gfc_init_decl_processing): Choose sizetype by using
716 2007-08-21 Paul Brook <paul@codesourcery.com>
717 Nathan Sidwell <nathan@codesourcery.com>
718 Mark Mitchell <mark@codesourcery.com>
719 Joseph Myers <joseph@codesourcery.com>
721 * gfortranspec.c (lang_specific_driver): Use pkgversion_string.
722 * Make-lang.in (gfortran.pod): Define BUGURL.
723 * invoke.texi: Use BUGURL for bug-reporting instructions.
725 2007-08-19 Roger Sayle <roger@eyesopen.com>
727 * match.c (intrinsic_operators): Make static.
728 (gfc_op2string): New function for converting a gfc_intrinsic_op to
729 to a "const char*", replacing the macro of the same name.
730 * gfortran.h (intrinsic_operators): Delete prototype.
731 (gfc_op2string): Replace macro with function prototype.
733 2007-08-18 Tobias Burnus <burnus@net-b.de>
735 * gfortran.h (gfc_is_intrinsic_typename): Add declaration.
736 * symbol.c (gfc_is_intrinsic_typename): New function.
737 * parse.c (decode_statement): Check for space in ABSTRACT INTERFACE.
738 (parse_interface): Use gfc_is_intrinsic_typename.
739 * decl.c (gfc_match_derived_decl): Ditto.
740 * module.c (gfc_match_use): Use gcc_unreachable() for
741 INTERFACE_ABSTRACT in switch().
743 2007-08-18 Roger Sayle <roger@eyesopen.com>
745 * primary.c (match_logical_constant_string): New function to match
746 a ".true." or a ".false.".
747 (match_logical_constant): Use it instead of gfc_match_strings.
749 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
750 Janus Weil <jaydub66@gmail.com>
752 * interface.c (gfc_match_interface,gfc_match_abstract_interface,
753 gfc_match_end_interface,gfc_add_interface): Add abstract interface.
754 * dump-parse-tree.c (gfc_show_attr): Ditto.
755 * gfortran.h (interface_type,symbol_attribute): Ditto.
756 * module.c (gfc_match_use,ab_attribute,attr_bits,
757 mio_symbol_attribute): Ditto.
758 * resolve.c (resolve_function): Ditto.
760 * parse.c (decode_statement): Ditto.
761 (parse_interface): Ditto, check for C1203 (name of abstract interface
762 cannot be the same as an intrinsic type).
763 * decl.c (gfc_match_bind_c): Check for NAME= with abstract interfaces.
764 (access_attr_decl): Handle Abstract interfaces.
766 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
769 * expr.c (gfc_check_pointer_assign): If the rhs is the
770 initialization expression for the rhs, there is no error.
772 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
775 * trans-array.c (get_array_ctor_strlen): Set the character
776 length of a zero length array to zero.
778 2007-08-16 Tobias Burnus <burnus@net-b.de>
781 * module.c (gfc_match_use): Mark user operators as such.
782 (find_use_name_n): Distinguish between operators and other symbols.
783 (find_use_name,number_use_names,mio_namelist,
784 load_operator_interfaces,load_generic_interfaces,read_module,
785 write_generic): Update find_use_name_n calls.
787 2007-08-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
790 * trans.c (gfc_create_var_np): Do not emit warnings for
793 2007-08-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
796 * decl.c (gfc_get_type_attr_spec): Fix whitespace.
797 (gfc_match_derived_decl): Fix logic.
799 2007-08-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
802 * trans-intrinsic.c (build_fixbound_expr): Convert to result type
805 2007-08-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
808 * trans-expr.c (gfc_conv_substring_expr): Only call
809 gfc_conv_substring if expr->ref is not NULL.
810 * expr.c (gfc_is_constant_expr): If e->ref is NULL, the substring
811 expression might be a constant.
812 (gfc_simplify_expr): Handle missing start and end, as well as
815 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
818 * match.c (gfc_match_call): Do not create a new symtree in the
819 case where the existing symbol is external and not referenced.
821 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
824 * decl.c (variable_decl): Check for an imported symbol
825 by looking for its symtree and testing for the imported
827 (gfc_match_import): Remove change of symbol's namespace
828 and set the attribute imported instead.
829 * symbol.c (gfc_get_sym_tree): It is not an error if a
831 * gfortran.h : Add the 'imported' to symbol_attribute.
833 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
836 * trans-array.c (gfc_conv_array_transpose): Set the offset
837 of the destination to zero if the loop is zero based.
839 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
842 * intrinsic.c (add_functions): Add optional KIND argument to ACHAR.
843 * iresolve.c (gfc_resolve_achar): Handle the KIND argument.
844 * check.c (gfc_check_achar): Check for the optional KIND argument.
845 * simplify.c (gfc_simplify_achar): Use KIND argument.
846 * intrinsic.h (gfc_check_achar, gfc_simplify_achar,
847 gfc_resolve_achar): Adjust prototypes.
849 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
853 * trans-expr.c (gfc_conv_function_call): When no formal argument
854 list is available, we still substitute missing optional arguments.
855 * check.c (gfc_check_random_seed): Correct the check on the
856 number of arguments to RANDOM_SEED.
857 * intrinsic.c (add_subroutines): Add a resolution function to
859 * iresolve.c (gfc_resolve_random_seed): New function.
860 * intrinsic.h (gfc_resolve_random_seed): New prototype.
862 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
865 * error.c (error_uinteger): New function.
866 (error_integer): Call error_uinteger.
867 (error_print): Handle %u, %lu, %li and %ld format specifiers.
868 * interface.c (compare_actual_formal): Use the new %lu specifier.
870 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
873 * lang.opt (-fmodule-private): New option.
874 * gfortran.h (gfc_option_t): Add flag_module_private member.
875 * invoke.texi (-fmodule-private): Document the new option.
876 * module.c (gfc_check_access): Allow the -fmodule-private option
877 to modify the default behaviour.
878 * options.c (gfc_init_options): Initialize flag_module_private.
879 (gfc_handle_option): Handle -fmodule-private.
881 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
884 * intrinsic.c (add_functions): Add KIND arguments to COUNT,
885 IACHAR, ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND
887 * iresolve.c (gfc_resolve_count): Add kind argument.
888 (gfc_resolve_iachar): New function.
889 (gfc_resolve_ichar): Add kind argument.
890 (gfc_resolve_index_func): Likewise.
891 (gfc_resolve_lbound): Likewise.
892 (gfc_resolve_len): Likewise.
893 (gfc_resolve_len_trim): Likewise.
894 (gfc_resolve_scan): Likewise.
895 (gfc_resolve_size): New function.
896 (gfc_resolve_ubound): Add kind argument.
897 (gfc_resolve_verify): Likewise.
898 * trans-decl.c (gfc_get_extern_function_decl): Allow specific
899 intrinsics to have 4 arguments.
900 * check.c (gfc_check_count): Add kind argument.
901 (gfc_check_ichar_iachar): Likewise.
902 (gfc_check_index): Likewise.
903 (gfc_check_lbound): Likewise.
904 (gfc_check_len_lentrim): New function.
905 (gfc_check_scan): Add kind argument.
906 (gfc_check_size): Likewise.
907 (gfc_check_ubound): Likewise.
908 (gfc_check_verify): Likewise.
909 * intrinsic.texi: Update documentation for COUNT, IACHAR, ICHAR,
910 INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND and VERIFY.
911 * simplify.c (get_kind): Whitespace fix.
912 (int_expr_with_kind): New function.
913 (gfc_simplify_iachar): Add kind argument.
914 (gfc_simplify_iachar): Likewise.
915 (gfc_simplify_ichar): Likewise.
916 (gfc_simplify_index): Likewise.
917 (simplify_bound_dim): Likewise.
918 (simplify_bound): Likewise.
919 (gfc_simplify_lbound): Likewise.
920 (gfc_simplify_len): Likewise.
921 (gfc_simplify_len_trim): Likewise.
922 (gfc_simplify_scan): Likewise.
923 (gfc_simplify_shape): Pass NULL as kind argument to gfc_simplify_size.
924 (gfc_simplify_size): Add kind argument.
925 (gfc_simplify_ubound): Likewise.
926 (gfc_simplify_verify): Likewise.
927 * intrinsic.h: Update prototypes and add new ones.
928 * trans-intrinsic.c (gfc_conv_intrinsic_index): Rename into
929 gfc_conv_intrinsic_index_scan_verify.
930 (gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove.
931 (gfc_conv_intrinsic_function): Call
932 gfc_conv_intrinsic_index_scan_verify to translate the INDEX,
933 SCAN and VERIFY intrinsics.
935 2007-08-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
938 * invoke.texi (-fbacktrace): Document the new behaviour.
940 2007-08-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
943 * trans-array.c (gfc_conv_expr_descriptor): Use
944 gfc_conv_const_charlen to generate backend_decl of right type.
945 * trans-expr.c (gfc_conv_expr_op): Use correct return type.
946 (gfc_build_compare_string): Use int type instead of default
947 integer kind for single character comparison.
948 (gfc_conv_aliased_arg): Give backend_decl the right type.
949 * trans-decl.c (gfc_build_intrinsic_function_decls): Make
950 compare_string return an int.
952 2007-08-11 Ian Lance Taylor <iant@google.com>
954 * f95-lang.c (gfc_get_alias_set): Change return type to
957 2007-08-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
960 * trans.c (gfc_trans_runtime_check): Reorder arguments and
961 add extra variable arguments. Hand them to the library function.
962 * trans.h (gfc_trans_runtime_check): Update prototype.
963 * trans-array.c (gfc_trans_array_bound_check): Issue more
964 detailled error messages.
965 (gfc_conv_array_ref): Likewise.
966 (gfc_conv_ss_startstride): Likewise.
967 (gfc_trans_dummy_array_bias): Reorder arguments to
968 gfc_trans_runtime_check.
969 * trans-expr.c (gfc_conv_substring): Issue more detailled
971 (gfc_conv_function_call): Reorder arguments to gfc_trans_runtime_check.
972 * trans-stmt.c (gfc_trans_goto): Likewise.
973 * trans-io.c (set_string): Reorder arguments to
974 gfc_trans_runtime_check and issue a more detailled error message.
975 * trans-decl.c (gfc_build_builtin_function_decls): Make
976 runtime_error and runtime_error_at handle a variable number of
978 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Reorder arguments
979 to gfc_trans_runtime_check.
980 (gfc_conv_intrinsic_minmax): Likewise.
981 (gfc_conv_intrinsic_repeat): Issue more detailled error messages.
983 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
985 * gfortranspec.c (lang_specific_driver): Use CONST_CAST.
986 * options.c (gfc_post_options): Likewise.
987 * parse.c (parse_omp_structured_block): Likewise.
988 * st.c (gfc_free_statement): Likewise.
990 2007-08-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
993 * trans-decl.c (gfc_build_builtin_function_decls): Change
994 prototype for associated.
995 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert the
996 result of __builtin_isnan into a boolean.
997 (gfc_conv_intrinsic_strcmp): Cleanup.
998 (gfc_conv_associated): Convert the result of the associated
999 function into a boolean.
1001 2007-08-09 Tobias Burnus <burnus@net-b.de>
1004 * io.c (format_token): Add FMT_ERROR.
1005 (next_char_not_space): Print error/warning when
1006 '\t' are used in format specifications.
1007 (format_lex): Propagate error.
1008 (check_format): Ditto.
1010 2007-08-09 Tobias Burnus <burnus@net-b.de>
1013 * arith.c (arith_error): Point in the error message
1014 to -fno-range-check.
1016 2007-08-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1019 * intrinsic.texi (SIZEOF): Add mention to C_SIZE_T.
1021 2007-08-06 Christopher D. Rickett <crickett@lanl.gov>
1024 * trans-expr.c (gfc_conv_scalar_char_value): Convert the tree and
1025 actual arg expressions for scalar characters passed by-value to
1027 (gfc_conv_function_call): Call gfc_conv_scalar_char_value.
1028 * trans.h: Add prototype for gfc_conv_scalar_char_value.
1029 * trans-decl.c (generate_local_decl): Convert by-value character
1030 dummy args of bind(c) procedures using
1031 gfc_conv_scalar_char_value.
1033 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1036 * iresolve.c (gfc_resolve_alarm_sub): Suffix the subroutine name
1037 with the kind of the STATUS argument.
1039 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1042 * intrinsic.c (add_functions): Fix name of argument to CHDIR.
1044 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1047 * iresolve.c (gfc_resolve_exit): Convert argument to default
1050 2007-08-06 Daniel Franke <franke.daniel@gmail.com>
1052 * resolve.c (derived_pointer): Removed, replaced callers by access
1053 to appropiate attribute bit.
1054 (derived_inaccessable): Shortcut recursion depth.
1055 (resolve_fl_namelist): Fixed checks for private components in namelists.
1057 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1060 * trans.h (gfor_fndecl_string_minmax): New prototype.
1061 * trans-decl.c (gfor_fndecl_string_minmax): New variable.
1062 (gfc_build_intrinsic_function_decls): Create gfor_fndecl_string_minmax.
1063 * check.c (gfc_check_min_max): Allow for character arguments.
1064 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): New function.
1065 (gfc_conv_intrinsic_function): Add special case for MIN and MAX
1066 intrinsics with character arguments.
1067 * simplify.c (simplify_min_max): Add simplification for character
1070 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1073 * invoke.texi: Adjust documentation for option -fsyntax-only.
1075 2007-08-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1076 Tobias Burnus <burnus@gcc.gnu.org>
1079 * intrinsic.h (gfc_check_isnan): Add prototype.
1080 * gfortran.h (gfc_isym_id): Add GFC_ISYM_ISNAN.
1081 * intrinsic.c (add_functions): Add ISNAN intrinsic.
1082 * check.c (gfc_check_isnan): New function.
1083 * trans-intrinsic.c (gfc_conv_intrinsic_isnan): New function.
1084 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_isnan
1086 * intrinsic.texi: Document ISNAN.
1088 2007-08-04 Paul Thomas <pault@gcc.gnu.org>
1091 * symbol.c (get_unique_symtree): Moved from module.c.
1092 * module.c (get_unique_symtree): Moved to symbol.c.
1093 * decl.c (get_proc_name): Transfer the typespec from the local
1094 symbol to the module symbol, in the case that an entry is also
1095 a module procedure. Ensure the local symbol is cleaned up by
1096 pointing to it with a unique symtree.
1098 * dump_parse_tree (gfc_show_code_node): Add EXEC_ASSIGN_CALL.
1100 2008-08-04 Steven G. Kargl <kargl@gcc.gnu.org>
1103 * iresolve.c (gfc_resolve_rrspacing): Convert argument(s) to
1105 (gfc_resolve_scale): Ditto.
1106 (gfc_resolve_set_exponent): Ditto.
1107 (gfc_resolve_spacing): Ditto.
1110 * trans-intrinsic.c (gfc_conv_intrinsic_si_kind,
1111 gfc_conv_intrinsic_sr_kind): Convert the argument(s) to the
1112 expected KIND, and fold the result to the expected KIND.
1114 2007-08-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1117 * f95-lang.c (gfc_init_builtin_functions): Defin builtins for
1118 lround{f,,l} and llround{f,,l}.
1119 * trans-intrinsic.c (build_fix_expr): Generate calls to the
1120 {l,}round{f,,l} functions.
1122 2007-08-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1125 * intrinsic.c (resolve_mask_arg): New function.
1126 (gfc_resolve_maxloc): Use resolve_mask_arg for mask resolution.
1127 (gfc_resolve_maxval): Likewise.
1128 (gfc_resolve_minloc): Likewise.
1129 (gfc_resolve_minval): Likewise.
1130 (gfc_resolve_pack): Likewise.
1131 (gfc_resolve_product): Likewise.
1132 (gfc_resolve_sum): Likewise.
1133 (gfc_resolve_unpack): Likewise.
1135 2007-08-01 Tobias Burnus <burnus@net-b.de>
1138 * match.c (gfc_match_allocate): Better check that STAT is
1141 * check.c (gfc_check_allocated): Reorder checks to improve
1144 2007-08-01 Nick Clifton <nickc@redhat.com>
1146 * arith.c: Change copyright header to refer to version 3 of the
1147 GNU General Public License and to point readers at the COPYING3
1148 file and the FSF's license web page.
1149 * openmp.c, interface.c, intrinsic.c, trans-array.c, trans-expr.c,
1150 symbol.c, iso-fortran-env.def, intrinsic.h, decl.c, trans-array.h,
1151 matchexp.c, dump-parse-tree.c, trans-common.c, array.c,
1152 Make-lang.in, trans-openmp.c, gfortran.h, error.c,
1153 iso-c-binding.def, lang.opt, data.c, trans-const.c, trans-stmt.c,
1154 expr.c, trans-const.h, trans-stmt.h, module.c, trans.c, scanner.c,
1155 trans-types.c, trans.h, gfortranspec.c, trans-types.h,
1156 lang-specs.h, io.c, bbt.c, resolve.c, f95-lang.c, st.c,
1157 iresolve.c, match.c, trans-decl.c, trans-io.c, target-memory.c,
1158 match.h, target-memory.h, parse.c, arith.h, check.c, dependency.c,
1159 parse.h, types.def, convert.c, dependency.h, primary.c,
1160 trans-intrinsic.c, options.c, misc.c, simplify.c: Likewise.
1162 2007-08-01 Daniel Franke <franke.daniel@gmail.com>
1164 * trans-decl.c (generate_local_decl): Emit warning on unused parameter
1165 on "-Wall -Wextra" or "-Wunused-parameter" but not on "-Wall", changed
1166 messages that start with lower case to upper case.
1167 * invoke.texi (-Wparameter-unused): Document differences between gcc
1168 and gfortran regarding this option.
1170 2007-08-01 Daniel Franke <franke.daniel@gmail.com>
1173 * expr.c (check_specification_function): Skip check if no symtree
1176 2007-08-01 Paul Thomas <pault@gcc.gnu.org>
1179 * resolve.c (resolve_entries): Entries declared to be module
1180 procedures must point to the function namespace.
1182 2007-07-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1185 * trans-stmt.c (gfc_trans_return): Convert to correct type.
1187 2007-07-31 Steven G. Kargl <kargl@gcc.gnu.org>
1190 * trans-intrinsic.c (gfc_conv_intrinsic_exponent): Convert to correct
1193 2007-07-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1195 * invoke.texi: Document -fsign-zero flag.
1197 2007-07-29 Paul Thomas <pault@gcc.gnu.org>
1200 * trans-expr.c (gfc_conv_expr_reference): Add block for case of
1201 scalar pointer functions so that NULL result is correctly
1205 * trans-array.c (gfc_trans_array_constructor): On detecting a
1206 multi-dimensional parameter array, set the loop limits.
1208 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
1211 * resolve.c (resolve_fl_parameter): Check for constant shape arrays,
1212 adjusted error message.
1214 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
1216 * invoke.texi: Removed -w from option summary.
1218 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
1221 * intrinsic.texi (IRAND, RAND, RANDOM_NUMBER): Document algorithm
1222 used for random number generator.
1224 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
1226 * gfortran.h, interface.c, resolve.c, symbol.c: Fix comment
1228 * intrinsic.texi, invoke.texi: Fix typos.
1230 2007-07-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1233 * resolve.c (generic_sym): Check for a same symbol and if so, return to
1234 avoid infinite recursion.
1236 2007-07-28 Daniel Franke <franke.daniel@gmail.com>
1241 * gfortran.h (symbol_attribute): Added bits for pointer_comp,
1243 * parse.c (parse_derived): Set pointer_comp/private_comp bits if
1244 the derived type ultimately contains pointer components or private
1246 * module.c (ab_attribute): New values AB_POINTER_COMP, AB_PRIVATE_COMP.
1247 (attr_bits): Added names for new ab_attributes.
1248 (mio_symbol_attribute): Save/restore new attribute bits in modules.
1249 * match.c (gfc_match_namelist): Removed check for namelist objects
1251 * resolve.c (resolve_fl_namelist): Added check for pointer or
1252 private components in nested types. Added check for namelist objects
1255 2007-07-28 Paul Thomas <pault@gcc.gnu.org>
1258 * trans-expr.c (gfc_trans_scalar_assign): Revert to fixed order
1259 for lse and rse pre expressions, for derived types with
1260 allocatable components. Instead, assign the lhs to a temporary
1261 and deallocate after the assignment.
1263 2007-07-28 Janne Blomqvist <jb@gcc.gnu.org>
1266 * trans-stmt.c (gfc_trans_character_select): Replace occurrences
1267 of gfc_c_int_type_node with integer_type_node.
1268 * trans-decl.c (gfc_build_intrinsic_function_decls): Likewise.
1269 (gfc_build_builtin_function_decls): Likewise.
1270 (gfc_generate_function_code): Likewise.
1271 * trans-io.c (gfc_build_io_library_fndecls): Likewise.
1273 2007-07-27 Janne Blomqvist <jb@gcc.gnu.org>
1275 * trans-decl.c (gfc_build_builtin_function_decls): Use existing
1276 gfc_array_index_type rather than creating another typenode for
1277 gfc_index_integer_kind.
1279 2007-07-27 Janne Blomqvist <jb@gcc.gnu.org>
1281 * trans-io.c (gfc_build_io_library_fndecls): Change to use
1282 gfc_array_index_type for array descriptor triplets instead of
1285 2007-07-26 Steven G. Kargl <kargl@gcc.gnu.org>
1288 * resolve.c (resolve_operator): Add INTRINSIC_EQ_OS comparison.
1290 2007-07-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1291 Daniel Franke <franke.daniel@gmail.com>
1294 * primary.c (match_variable): Do not call gfc_add_flavor if symbol has
1295 attribute of ACCESS_PUBLIC or ACCESS_PRIVATE already marked.
1297 2007-07-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1300 * trans-stmt.c (gfc_trans_character_select): Replace the
1301 mechanism with labels by a SWITCH_EXPR.
1302 * trans-decl.c (gfc_build_builtin_function_decls): Change
1303 return type for select_string.
1305 2007-07-27 Paul Thomas <pault@gcc.gnu.org>
1308 * trans-decl.c (gfc_trans_deferred_vars): Set intent(out)
1309 derived types as referenced, if they have the the default
1312 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1314 * gfortran.h (generate_isocbinding_symbol): Constify.
1315 * symbol.c (gen_special_c_interop_ptr, gen_cptr_param,
1316 generate_isocbinding_symbol): Likewise.
1318 2007-07-24 Paul Thomas <pault@gcc.gnu.org>
1322 * trans-expr.c (gfc_conv_function_call): Remove the default
1323 initialization of intent(out) derived types.
1324 * symbol.c (gfc_lval_expr_from_sym): New function.
1325 * matchexp.c (gfc_get_parentheses): Return argument, if it is
1326 character and posseses a ref.
1327 * gfortran.h : Add prototype for gfc_lval_expr_from_sym.
1328 * resolve.c (has_default_initializer): Move higher up in file.
1329 (resolve_code): On detecting an interface assignment, check
1330 if the rhs and the lhs are the same symbol. If this is so,
1331 enclose the rhs in parenetheses to generate a temporary and
1332 prevent any possible aliasing.
1333 (apply_default_init): Remove code making the lval and call
1334 gfc_lval_expr_from_sym instead.
1335 (resolve_operator): Give a parentheses expression a type-
1336 spec if it has no type.
1337 * trans-decl.c (gfc_trans_deferred_vars): Apply the a default
1338 initializer, if any, to an intent(out) derived type, using
1339 gfc_lval_expr_from_sym and gfc_trans_assignment. Check if
1340 the dummy is present.
1342 2007-07-24 Daniel Franke <franke.daniel@gmail.com>
1345 * expr.c (check_init_expr): Simplify matched functions.
1347 2007-07-24 Daniel Franke <franke.daniel@gmail.com>
1350 * intrinsic.c (add_sym): Do not exclude any symbols, even if not part
1351 of the selected standard.
1352 (make generic): Likewise.
1353 (make alias): Likewise, set standard the alias belongs to.
1354 (add_subroutines): Call make_noreturn unconditionally.
1355 (check_intrinsic_standard): Change return value to try.
1356 (gfc_intrinsic_func_interface): Check return value of above function.
1357 (gfc_intrinsic_sub_interface): Likewise.
1359 2007-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1362 * trans-decl.c (generate_function_code): Add argument
1363 for flag_bounds_check to the array for set_options.
1364 * invoke.texi (-fbounds-check): Document new libarary run-time
1367 2007-07-23 Daniel Franke <franke.daniel@gmail.com>
1371 * expr.c (check_transformational): Reject valid transformational
1372 intrinsics to avoid ICE.
1373 (check_inquiry): Report error for assumed character lengths for
1374 all supported standards.
1375 (check_init_expr): Whitespace fix.
1377 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
1381 * decl.c (verify_bind_c_sym): Use the result symbol for functions
1382 with a result clause. Warn if implicitly typed. Verify the type
1383 and rank of the SHAPE argument, if given.
1384 * resolve.c (gfc_iso_c_sub_interface): Use gfc_procedure_use to
1385 check the actual args against the formal, sorting them if
1387 * symbol.c (gen_shape_param): Initialize type of SHAPE param to
1390 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
1393 * trans-decl.c (generate_local_decl): Convert the TREE_TYPE for by
1394 value character dummy args of BIND(C) procedures.
1395 * trans-expr.c (gfc_conv_variable): Do not build address
1396 expression for BT_CHARACTER dummy args.
1398 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
1399 Tobias Burnus <burnus@net-b.de>
1402 * trans-expr.c (gfc_conv_function_call): Handle c_funloc.
1403 * trans-types.c: Add pfunc_type_node.
1404 (gfc_init_types,gfc_typenode_for_spec): Use it.
1405 * resolve.c (gfc_iso_c_func_interface): Fix whitespace and
1406 improve error message.
1408 2007-07-22 Daniel Franke <franke.daniel@gmail.com>
1411 * parse.c (gfc_fixup_sibling_symbols): No replacement of symbols if
1412 the current is a namelist.
1414 2007-07-22 Daniel Franke <franke.daniel@gmail.com>
1420 * gfortran.h (gfc_intrinsic_sym): Changed members elemental, pure,
1421 generic, specific, actual_ok, noreturn into bits of a bitfield,
1422 added bits for inquiry, transformational, conversion.
1423 * check.c (non_init_transformational): Removed, removed all callers.
1424 * intrinsic.c (enum class): New.
1425 (add_sym*): Replaced argument elemetal by enum class. Changed all
1427 (add_functions): Assign appropriate classes to intrinsic functions.
1428 (add_subroutines): Assign appropriate classes to intrinsic subroutines.
1429 (add_conv): Set conversion attribute.
1430 (gfc_init_expr_extensions): Removed, removed all callers.
1431 (gfc_intrinsic_func_interface): Reimplemented check for non-standard
1432 initializatione expressions.
1433 * expr.c (check_specification_function): New.
1434 (gfc_is_constant_expr): Added check for specification functions.
1435 (check_init_expr_arguments): New.
1436 (check_inquiry): Changed return value to MATCH, added checks for
1437 inquiry functions defined by F2003.
1438 (check_transformational): New.
1440 (check_elemental): New.
1441 (check_conversion): New.
1442 (check_init_expr): Call new check functions, add more specific error
1445 2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
1448 * resolve.c (set_name_and_label): Set kind number for character
1449 version of c_f_pointer.
1450 (gfc_iso_c_sub_interface): Set the kind of the SHAPE formal arg to
1451 that of the actual SHAPE arg.
1452 * symbol.c (gen_shape_param): Initialize kind for SHAPE arg.
1454 2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
1457 * symbol.c (generate_isocbinding_symbol): Remove unnecessary
1461 * resolve.c (gfc_iso_c_func_interface): Reject assumed-shape and
1462 deferred-shape arrays as args to C_LOC. Fix bug in testing
1463 character args to C_LOC.
1465 2007-07-21 Lee Millward <lee.millward@gmail.com>
1468 * trans-intrinsic.c (gfc_conv_intrinsic_int): Evaluate all
1469 arguments passed, not just the first one. Adjust code to
1470 refer to "args[0]" instead of "arg" as a result.
1472 2007-07-19 Christopher D. Rickett <crickett@lanl.gov>
1475 * trans-expr.c (gfc_conv_function_call): Inline C_LOC.
1477 2007-07-18 Christopher D. Rickett <crickett@lanl.gov>
1480 * symbol.c (generate_isocbinding_symbol): Fix bug where
1481 ISOCBINDING_FUNPTR was generated for C_LOC instead of the needed
1484 2007-07-17 Janus Weil <jaydub66@gmail.com>
1487 * resolve.c (resolve_fl_namelist): Check for namelist private
1488 components in contained subprograms.
1490 2007-07-17 Paul Thomas <pault@gcc.gnu.org>
1494 * trans-expr.c (gfc_trans_subcomponent_assign): Ensure that
1495 renormalization unity base is done independently of existing
1497 (gfc_trans_scalar_assign): If rhs is not a variable, put
1498 lse->pre after rse->pre to ensure that de-allocation of lhs
1499 occurs after evaluation of rhs.
1501 2007-07-16 Lee Millward <lee.millward@gmail.com>
1506 * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
1507 to operate on a stack allocated array for the intrinsic arguments
1508 instead of creating a TREE_LIST. Add two new parameters for the
1509 array and the number of elements. Update all callers to allocate
1510 an array of the correct length to pass in. Update comment.
1511 (gfc_intrinsic_argument_list_length): New function.
1512 (gfc_conv_intrinsic_conversion): Call it.
1513 (gfc_conv_intrinsic_mnimax): Likewise.
1514 (gfc_conv_intrinsic_merge): Likewise.
1515 (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
1517 (gfc_conv_intrinsic_cmplx): Likewise.
1518 (gfc_conv_intrinsic_ctime): Likewise.
1519 (gfc_covn_intrinsic_fdate): Likewise.
1520 (gfc_conv_intrinsic_ttynam): Likewise.
1521 (gfc_conv_intrinsic_ishftc): Likewise.
1522 (gfc_conv_intrinsic_index): Likewise.
1523 (gfc_conv_intrinsic_scan): Likewise.
1524 (gfc_conv_intrinsic_verify): Likewise.
1525 (gfc_conv_intrinsic_trim): Likewise.
1526 (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
1527 (gfc_conv_intrinsic_exponent): Likewise.
1528 (gfc_conv_intrinsic_bound): Likewise.
1529 (gfc_conv_intrinsic_abs): Likewise.
1530 (gfc_conv_intrinsic_mod): Likewise.
1531 (gfc_conv_intrinsic_sign): Likewise.
1532 (gfc_conv_intrinsic_len): Likewise.
1533 (gfc_conv_intrinsic_adjust): Likewise.
1534 (gfc_conv_intrinsic_si_kind): Likewise.
1536 2007-07-16 Janne Blomqvist <jb@gcc.gnu.org>
1539 * trans-decl.c (gfc_build_builtin_function_decls): Remove
1540 DECL_IS_MALLOC attribute from internal_realloc, thus reverting
1541 part of my 2007-07-03 patch.
1543 2007-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1544 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1547 * gfortran.h (gfc_option_t): Add flag_sign_zero field.
1548 * lang.opt (-fsign-zero): New option.
1549 * trans.h: Rename gfor_fndecl_set_std into gfor_fndecl_set_options.
1550 * trans-decl.c (gfc_build_builtin_function_decls): Build the function
1551 declaration to pass an array containing the options to be used by the
1552 runtime library. (gfc_generate_function_code): Build an array that
1553 contains option values to be passed to the runtime library and the call
1555 * options.c (gfc_init_options): Initialize the flag_sign_zero field.
1556 (gfc_handle_option): Handle the -fsign-zero option.
1558 2007-07-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1561 * trans-array.c (gfc_conv_array_ref): Only evaluate index once.
1563 2007-07-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1566 * iresolve.c (gfc_resolve_mvbits): Convert FROMPOS, LEN and TOPOS
1569 2007-07-14 Thomas Koenig <tkoenig@gcc.gnu.org>
1572 * iresolve.c(gfc_resolve_pack): A scalar mask has
1573 to be kind=4, an array mask with kind<4 is converted
1574 to gfc_default_logical_kind automatically.
1575 (gfc_resolve_unpack): Convert mask to gfc_default_lotical_kind
1578 2007-07-14 Paul Thomas <pault@gcc.gnu.org>
1581 * parse.c (parse_spec): Emit error on unexpected statement
1584 2007-07-13 Daniel Franke <franke.daniel@gmail.com>
1586 * invoke.texi: Unified upper- and lower-case in menus.
1587 (-w, -W): Removed, documented by gcc.
1588 * intrinsic.texi: Unified Class-section entries, added
1589 subroutine/function warning where appropiate.
1591 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
1594 * decl.c (gfc_match_suffix): Removed surplus general error that hides
1595 a more specific message.
1596 * resolve.c (resolve_fl_variable): Reject illegal initializiers only
1597 if not already done.
1598 (resolve_fl_procedure): Added check for initializers of functions.
1600 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
1603 * invoke.texi (-static-libgfortran): Document new option.
1605 2007-07-12 Paul Thomas <pault@gcc.gnu.org>
1609 * module.c (write_generic): Restore patch of 2007-07-10 and use
1610 symbol name if there are no use names.
1612 2007-07-12 Christopher D. Rickett <crickett@lanl.gov>
1615 * decl.c (verify_c_interop_param): Require character string dummy
1616 args to BIND(C) procedures to have length 1.
1617 * resolve.c (resolve_fl_procedure): Modify parameter checking for
1621 * resolve.c (gfc_iso_c_func_interface): Verify that a valid
1622 expression is given as an argument to C_LOC and C_ASSOCIATED.
1623 * trans-io.c (transfer_expr): Add argument for code block. Add
1624 standards check to determine if an error message should be
1625 reported for printing C_PTR or C_FUNPTR.
1626 (transfer_array_component): Update arguments to transfer_expr.
1627 (gfc_trans_transfer): Ditto.
1629 * symbol.c (gen_cptr_param): Fix whitespace.
1631 2007-07-12 Jakub Jelinek <jakub@redhat.com>
1634 * trans.h (GFC_POINTER_TYPE_P): Define.
1635 * trans-types.c (gfc_sym_type): Set it for types on attr->sym.pointer.
1636 * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
1637 if GFC_POINTER_TYPE_P is set on the type.
1639 2007-07-12 Richard Guenther <rguenther@suse.de>
1641 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Convert
1642 arguments to gfc_charlen_type_node.
1643 * trans-io.c (gfc_convert_array_to_string): Convert type
1644 size to gfc_array_index_type.
1646 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
1650 * module.c: Reverted Paul's patch from 2007-07-10.
1652 2007-07-11 Richard Guenther <rguenther@suse.de>
1654 * trans-array.c (gfc_conv_array_parameter): Use correct
1655 types for comparison.
1656 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
1657 correct types for POINTER_PLUS_EXPR.
1658 * trans-stmt.c (gfc_trans_forall_loop): Use correct type
1659 for integer one constant.
1661 2007-07-10 Paul Thomas <pault@gcc.gnu.org>
1664 * resolve.c (is_external_proc): New function. Adds test that
1665 the symbol is not an intrinsic procedure.
1666 * (resolve_function, resolve_call): Replace logical statements
1667 with call to is_external_proc.
1670 * simplify.c (gfc_simplify_transfer): If mold has rank, the
1674 * module.c (write_generic): Write the local name of the
1677 2007-07-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1680 * trans-array.c (gfc_trans_array_constructor): Mark offset field
1681 with TREE_NO_WARNING.
1682 * trans-decl.c (gfc_build_qualified_array): Mark lbound, ubound,
1683 stride and size variables with TREE_NO_WARNING.
1685 2007-07-09 Steven G. Kargl <kargl@gcc.gnu.org>
1687 * trans-decl.c (set_tree_decl_type_code): Remove function.
1688 (generate_local_decl): Remove reference to set_tree_decl_type_code.
1690 2007-07-09 Daniel Franke <franke.daniel@gmail.com>
1693 * trans-decl.c (generate_local_decl) Emit a warning if an unused
1696 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
1699 * module.c (gfc_match_use): Do not set an non-existant
1700 intrinsic operator if a user-defined operator is found.
1702 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
1706 * trans-decl.c (generate_local_decl): Adjusted warning on unused
1707 dummy arguments, tell middle-end not to emit additional warnings.
1709 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
1710 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1713 * gfortran.h (gfc_intrinsic_op): Added INTRINSIC_EQ_OS,
1714 INTRINSIC_NE_OS, INTRINSIC_GT_OS, INTRINSIC_GE_OS,
1715 INTRINSIC_LT_OS and INTRINSIC_LE_OS.
1716 * arith.c (eval_intrinsic, eval_type_intrinsic0): Likewise.
1717 * arith.h (gfc_eq, gfc_ne, gfc_gt, gfc_ge, gfc_lt, gfc_le):
1718 Added gfc_intrinsic_op as third argument type.
1719 * dump-parse-tree.c (gfc_show_expr): Account for new enum values.
1720 * expr.c (simplify_intrinsic_op, check_intrinsic_op): Likewise.
1721 * interface.c (check_operator_interface): Likewise.
1722 (gfc_check_interfaces): Added cross-checks for FORTRAN 77 and
1723 Fortran 90 style operators using new enum values.
1724 (gfc_extend_expr): Likewise.
1725 (gfc_add_interface): Likewise.
1726 * match.c (intrinsic_operators): Distinguish FORTRAN 77 style
1727 operators from Fortran 90 style operators using new enum values.
1728 * matchexp.c (match_level_4): Account for new enum values.
1729 * module.c (mio_expr): Likewise.
1730 * resolve.c (resolve_operator): Deal with new enum values, fix
1731 inconsistent error messages.
1732 * trans-expr.c (gfc_conv_expr_op): Account for new enum values.
1734 2007-07-08 Tobias Burnus <burnus@net-b.de>
1737 * interface.c (get_expr_storage_size): Properly obtain lower bound.
1738 (compare_actual_formal): Add space before parenthesis.
1740 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
1743 * resolve.c (resolve_fl_procedure): Added check for PRIVATE types
1744 in PUBLIC interfaces.
1746 2007-07-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1749 * decl.c (match_attr_spec): Don't return MATCH_ERROR if comma found and
1750 gfc_match_bind_c does not return MATCH_YES.
1752 2007-07-07 Kazu Hirata <kazu@codesourcery.com>
1754 * decl.c, gfortran.h, interface.c, module.c, resolve.c,
1755 trans-array.c, trans-decl.c: Fix comment typos. Follow
1756 spelling conventions.
1757 * intrinsic.texi: Fix typos. Follow spelling conventions.
1759 2007-05-06 Daniel Franke <franke.daniel@gmail.com>
1762 * symbol.c (save_status): New.
1763 * gfortran.h (save_status): Added external declaration.
1764 (check_conflict): Check for conflicting explicite SAVE statements
1766 (gen_special_c_interop_ptr): Use SAVE_EXPLICIT constant.
1767 * module.c (ab_attribute, attr_bits): Removed enumerator value
1768 AB_SAVE for save attribute.
1769 (mio_symbol_attribute): Import/export the full SAVE status,
1770 removed usage of AB_SAVE.
1771 * dump-parse-tree.c (gfc_show_attr): Dump full SAVE status.
1772 * decl.c (add_init_expr_to_sym): Set SAVE_IMPLICIT only if not
1775 2007-07-05 Daniel Franke <franke.daniel@gmail.com>
1776 Tobias Burnus <burnus@net-b.de>
1779 * gfortran.h (symbol_attribute): Change save attribute into an enum.
1780 * decl.c (add_init_expr_to_sym): Set it to SAVE_IMPLICIT.
1781 * symbol.c (gfc_add_save): Check for SAVE_EXPLICIT.
1782 * resolve.c (resolve_fl_variable): Check for SAVE_EXPLICIT.
1783 (resolve_symbol): Allow OMP threadprivate with
1784 initialization SAVEd and save_all variable.
1785 * trans-decl.c (gfc_finish_var_decl): Remove obsolete sym->value check.
1787 2007-07-05 Paul Thomas <pault@gcc.gnu.org>
1790 * match.c (gfc_match_call): Check, in all cases, that a symbol
1791 is neither generic nor a subroutine before trying to add it as
1795 * match.c (gfc_match_do): Reset the implied_index attribute.
1797 2007-07-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1800 * trans-intrinsic.c (trans-intrinsic.c): Handle optional
1801 arguments correctly for MIN and MAX intrinsics.
1803 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1806 * io.c (check_format): Always call gfc_error for errors.
1807 (check_format_string): Change type of this function to try and
1808 return the result of check_format.
1809 (check_io_constraints): Return MATCH_ERROR if check_format_string
1812 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1815 * decl.c (get_proc_name): Include attr->mod_proc in check for error.
1817 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1820 * gfortran.h: Change type of gfc_assign_data_value from void to try.
1821 * data.c (gfc_assign_data_value): Return FAILURE if error found.
1822 * resolve.c (check_data_variable): If gfc_assign_data_value returns
1823 failure, break out of loop and return failure.
1825 2007-07-03 Christopher D. Rickett <crickett@lanl.gov>
1828 * symbol.c (gen_cptr_param): Generate C_PTR and C_FUNPTR if necessary.
1829 (build_formal_args): Pass intrinsic module symbol id to
1832 2007-07-03 Tobias Burnus <burnus@net-b.de>
1835 * resolve.c (resolve_common_blocks): New check function.
1836 (resolve_types): Use it.
1838 2007-07-03 Tobias Burnus <burnus@net-b.de>
1841 * interface.c (get_sym_storage_size): New function.
1842 (get_sym_storage_size): New function.
1843 (compare_actual_formal): Enhance sequence association
1844 support and improve checking.
1846 2007-07-03 Janne Blomqvist <jb@gcc.gnu.org>
1848 * trans-decl.c (gfc_build_builtin_function_decls): Mark
1849 internal_realloc as a malloc function.
1851 2007-07-03 Tobias Burnus <burnus@net-b.de>
1854 * resolve.c (resolve_operator): Check for NULL as operand.
1856 2007-07-02 Tobias Burnus <burnus@net-b.de>
1858 * gfortran.texi (Fortran 2003): Add ISO Bind C.
1859 * intrinsic.texi (C_ASSOCIATED,C_F_POINTER,C_F_PROCPOINTER,
1860 C_FUNLOC,C_LOC): Document new ISO Bind C intrinsics.
1862 2007-07-01 Christopher D. Rickett <crickett@lanl.gov>
1864 * interface.c (gfc_compare_derived_types): Special case for comparing
1865 derived types across namespaces.
1866 (gfc_compare_types): Deal with BT_VOID.
1867 (compare_parameter): Use BT_VOID to accept ISO C Binding pointers.
1868 * trans-expr.c (gfc_conv_function_call): Remove setting parm_kind
1870 (gfc_conv_initializer): Deal with ISO C Binding NULL_PTR and
1872 (gfc_conv_expr): Convert expressions for ISO C Binding derived types.
1873 * symbol.c (gfc_set_default_type): BIND(C) variables should not be
1874 Implicitly declared.
1875 (check_conflict): Add BIND(C) and check for conflicts.
1876 (gfc_add_explicit_interface): Whitespace.
1877 (gfc_add_is_bind_c): New function.
1878 (gfc_copy_attr): Use it.
1879 (gfc_new_symbol): Initialize ISO C Binding objects.
1880 (get_iso_c_binding_dt): New function.
1881 (verify_bind_c_derived_type): Ditto.
1882 (gen_special_c_interop_ptr): Ditto.
1883 (add_formal_arg): Ditto.
1884 (gen_cptr_param): Ditto.
1885 (gen_fptr_param): Ditto.
1886 (gen_shape_param): Ditto.
1887 (add_proc_interface): Ditto.
1888 (build_formal_args): Ditto.
1889 (generate_isocbinding_symbol): Ditto.
1890 (get_iso_c_sym): Ditto.
1891 * decl.c (num_idents_on_line, has_name_equals): New variables.
1892 (verify_c_interop_param): New function.
1893 (build_sym): Finish binding labels and deal with COMMON blocks.
1894 (add_init_expr_to_sym): Check if the initialized expression is
1895 an iso_c_binding named constants
1896 (variable_decl): Set ISO C Binding type_spec components.
1897 (gfc_match_kind_spec): Check match for C interoperable kind.
1898 (match_char_spec): Fix comment. Chnage gfc_match_small_int
1899 to gfc_match_small_int_expr. Check for C interoperable kind.
1900 (match_type_spec): Clear the current binding label.
1901 (match_attr_spec): Add DECL_IS_BIND_C. If BIND(C) is found, use it
1903 (set_binding_label): New function.
1904 (set_com_block_bind_c): Ditto.
1905 (verify_c_interop): Ditto.
1906 (verify_com_block_vars_c_interop): Ditto.
1907 (verify_bind_c_sym): Ditto.
1908 (set_verify_bind_c_sym): Ditto.
1909 (set_verify_bind_c_com_block): Ditto.
1910 (get_bind_c_idents): Ditto.
1911 (gfc_match_bind_c_stmt): Ditto.
1912 (gfc_match_data_decl): Use num_idents_on_line.
1913 (match_result): Deal with right paren in BIND(C).
1914 (gfc_match_suffix): New function.
1915 (gfc_match_function_decl): Use it. Code is re-arranged to deal with
1916 ISO C Binding result clauses.
1917 (gfc_match_subroutine): Deal with BIND(C).
1918 (gfc_match_bind_c): New function.
1919 (gfc_get_type_attr_spec): New function. Code is re-arranged in and
1920 taken from gfc_match_derived_decl.
1921 (gfc_match_derived_decl): Add check for BIND(C).
1922 * trans-common.c: Forward declare gfc_get_common.
1923 (gfc_sym_mangled_common_id): Change arg from 'const char *name' to
1924 'gfc_common_head *com'. Check for ISO C Binding of the common block.
1925 (build_common_decl): 'com->name' to 'com in SET_DECL_ASSEMBLER_NAME.
1926 * gfortran.h: Add GFC_MAX_BINDING_LABEL_LEN
1928 (sym_flavor): Add FL_VOID.
1929 (iso_fortran_env_symbol, iso_c_binding_symbol, intmod_id): New enum
1930 (CInteropKind_t): New struct.
1931 (c_interop_kinds_table): Use it. Declare an array of structs.
1932 (symbol_attribute): Add is_bind_c, is_c_interop, and is_iso_c
1934 (gfc_typespec): Add is_c_interop; is_iso_c, and f90_type members.
1935 (gfc_symbol): Add from_intmod, intmod_sym_id, binding_label, and
1936 common_block members.
1937 (gfc_common_head): Add binding_label and is_bind_c members.
1938 (gfc_gsymbol): Add sym_name, mod_name, and binding_label members.
1939 Add prototypes for get_c_kind, gfc_validate_c_kind,
1940 gfc_check_any_c_kind, gfc_add_is_bind_c, gfc_add_value,
1941 verify_c_interop, verify_c_interop_param, verify_bind_c_sym,
1942 verify_bind_c_derived_type, verify_com_block_vars_c_interop,
1943 generate_isocbinding_symbol, get_iso_c_sym, gfc_iso_c_sub_interface
1944 * iso-c-binding.def: New file. This file contains the definitions
1945 of the types provided by the Fortran 2003 ISO_C_BINDING intrinsic
1947 * trans-const.c (gfc_conv_constant_to_tree): Deal with C_NULL_PTR
1948 or C_NULL_FUNPTR expressions.
1949 * expr.c (gfc_copy_expr): Add BT_VOID case. For BT_CHARACTER, the
1950 ISO C Binding requires a minimum string length of 1 for '\0'.
1951 * module.c (intmod_sym): New struct.
1952 (pointer_info): Add binding_label member.
1953 (write_atom): Set len to 0 for NULL pointers. Check for NULL p and *p.
1954 (ab_attribute): Add AB_IS_BIND_C, AB_IS_C_INTEROP and AB_IS_ISO_C.
1955 (attr_bits): Add "IS_BIND_C", "IS_C_INTEROP", and "IS_ISO_C".
1956 (mio_symbol_attribute): Deal with ISO C Binding attributes.
1957 (bt_types): Add "VOID".
1958 (mio_typespec): Deal with ISO C Binding components.
1959 (mio_namespace_ref): Add intmod variable.
1960 (mio_symbol): Check for symbols from an intrinsic module.
1961 (load_commons): Check for BIND(C) common block.
1962 (read_module): Read binding_label and use it.
1963 (write_common): Add label. Write BIND(C) info.
1964 (write_blank_common): Blank commons are not BIND(C). Explicitly
1966 (write_symbol): Deal with binding_label.
1967 (sort_iso_c_rename_list): New function.
1968 (import_iso_c_binding_module): Ditto.
1969 (create_int_parameter): Add to args.
1970 (use_iso_fortran_env_module): Adjust to deal with iso_c_binding
1972 * trans-types.c (c_interop_kinds_table): new array of structs.
1973 (gfc_validate_c_kind): New function.
1974 (gfc_check_any_c_kind): Ditto.
1975 (get_real_kind_from_node): Ditto.
1976 (get_int_kind_from_node): Ditto.
1977 (get_int_kind_from_width): Ditto.
1978 (get_int_kind_from_minimal_width): Ditto.
1979 (init_c_interop_kinds): Ditto.
1980 (gfc_init_kinds): call init_c_interop_kinds.
1981 (gfc_typenode_for_spec): Adjust for BT_VOID and ISO C Binding pointers.
1982 Adjust handling of BT_DERIVED.
1983 (gfc_sym_type): Whitespace.
1984 (gfc_get_derived_type): Account for iso_c_binding derived types
1985 * resolve.c (is_scalar_expr_ptr): New function.
1986 (gfc_iso_c_func_interface): Ditto.
1987 (resolve_function): Use gfc_iso_c_func_interface.
1988 (set_name_and_label): New function.
1989 (gfc_iso_c_sub_interface): Ditto.
1990 (resolve_specific_s0): Use gfc_iso_c_sub_interface.
1991 (resolve_bind_c_comms): New function.
1992 (resolve_bind_c_derived_types): Ditto.
1993 (gfc_verify_binding_labels): Ditto.
1994 (resolve_fl_procedure): Check for ISO C interoperability.
1995 (resolve_symbol): Check C interoperability.
1996 (resolve_types): Walk the namespace. Check COMMON blocks.
1997 * trans-decl.c (gfc_sym_mangled_identifier): Prevent the mangling
1998 of identifiers that have an assigned binding label.
1999 (gfc_sym_mangled_function_id): Use the binding label rather than
2001 (gfc_finish_var_decl): Put variables that are BIND(C) into a common
2002 segment of the object file, because this is what C would do.
2003 (gfc_create_module_variable): Conver to proper types
2004 (set_tree_decl_type_code): New function.
2005 (generate_local_decl): Check dummy variables and derived types for
2006 ISO C Binding attributes.
2007 * match.c (gfc_match_small_int_expr): New function.
2008 (gfc_match_name_C): Ditto.
2009 (match_common_name): Deal with ISO C Binding in COMMON blocks
2010 * trans-io.c (transfer_expr): Deal with C_NULL_PTR or C_NULL_FUNPTR
2012 * match.h: Add prototypes for gfc_match_small_int_expr,
2013 gfc_match_name_C, match_common_name, set_com_block_bind_c,
2014 set_binding_label, set_verify_bind_c_sym,
2015 set_verify_bind_c_com_block, get_bind_c_idents,
2016 gfc_match_bind_c_stmt, gfc_match_suffix, gfc_match_bind_c,
2017 gfc_get_type_attr_spec
2018 * parse.c (decode_statement): Use gfc_match_bind_c_stmt
2019 (parse_derived): Init *derived_sym = NULL, and gfc_current_block
2020 later for valiadation.
2021 * primary.c (got_delim): Set ISO C Binding components of ts.
2022 (match_logical_constant): Ditto.
2023 (match_complex_constant): Ditto.
2024 (match_complex_constant): Ditto.
2025 (gfc_match_rvalue): Check for existence of at least one arg for
2026 C_LOC, C_FUNLOC, and C_ASSOCIATED.
2027 * misc.c (gfc_clear_ts): Clear ISO C Bindoing components in ts.
2028 (get_c_kind): New function.
2030 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
2033 * trans-expr.c (gfc_conv_power_op): Use builtin_powi for
2035 * f95-lang.c (gfc_init_builtin_functions): Add builtin_powi to the
2038 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
2040 * trans.h: Remove decls for 64-bit allocation functions.
2041 * trans-array.c (gfc_grow_array): Always pick the standard realloc
2043 (gfc_array_allocate): Likewise.
2044 * trans-decl.c: Remove trees for 64-bit allocation functions.
2045 (gfc_build_builtin_function_decls): Don't build fndecls for 64-bit
2046 allocations functions, use index_int_type for normal allocation
2049 2007-06-30 Daniel Franke <franke.daniel@gmail.com>
2052 * intrinsic.c (add_functions): Additional function types.
2053 (gfc_convert_type_warn): Remove intrinsic-flag from
2054 conversion functions.
2055 * resolve.c (resolve_symbol): Added type checks to
2056 explicitly defined intrinsics.
2058 2007-06-30 Tobias Burnus <burnus@net-b.de>
2061 * io.c (check_format): Allow zero to precede the
2064 2007-06-30 Paul Thomas <pault@gcc.gnu.org>
2067 * simplify.c (gfc_simplify_repeat): Add handling of character
2068 literal for first argument.
2070 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
2072 * resolve.c (resolve_operator): Added check whether a user
2073 defined operator is available.
2075 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
2077 * openmp.c (resolve_omp_clauses): Adjust error message to
2078 better reflect the actual requirement.
2080 2007-06-29 Tobias Burnus <burnus@net-b.de>
2083 * io.c (format_lex): Fix FMT_ZERO.
2084 (check_format,check_format_string,gfc_match_format,
2085 check_io_constraints) Additional checking for READ.
2087 2007-06-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2090 * lang.opt (static-libgfortran): New option.
2091 * gfortranspec.c (ADD_ARG_LIBGFORTRAN): New macro.
2092 (Option): Add OPTION_static and OPTION_static_libgfortran.
2093 (lookup_option): Handle the new -static-libgfortran option.
2094 (lang_specific_driver): Check whether -static is passed.
2095 Handle the new -static-libgfortran option.
2096 * options.c (gfc_handle_option): If -static-libgfortran is
2097 passed and isn't supported on this configuration, error out.
2099 2007-06-27 Daniel Franke <franke.daniel@gmail.com>
2102 * openmp.c (resolve_omp_clauses): Emit error on allocatable
2103 components in COPYIN, COPYPRIVATE, FIRSTPRIVATE and LASTPRIVATE
2106 2007-06-25 Paul Thomas <pault@gcc.gnu.org>
2109 * resolve.c (check_host_association): Return if the old symbol
2110 is use associated. Introduce retval to reduce the number of
2111 evaluations of the first-order return value.
2114 * match.c (gfc_match_call): If a host associated symbol is not
2115 a subroutine, build a new symtree/symbol in the current name
2118 2007-06-24 Tobias Burnus <burnus@net-de>
2121 * interface.c (gfc_compare_derived_types): Add access check.
2122 * symbol.c (gfc_find_component): Ditto.
2123 (gfc_set_component_attr,gfc_get_component_attr) Copy access state.
2124 * dump-parse-tree.c (gfc_show_components): Dump access state.
2125 * gfortran.h (struct gfc_component): Add gfc_access.
2126 * module.c (mio_component): Add access state.
2127 * (gfc_match_structure_constructor): Check for private access state.
2129 2007-06-24 Paul Thomas <pault@gcc.gnu.org>
2133 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Calculate
2134 the offset between the loop counter and the position as
2135 defined. Add the offset within the loop so that the mask acts
2136 correctly. Do not advance the location on the basis that it
2139 2007-06-22 Daniel Franke <franke.daniel@gmail.com>
2142 * symbol.c (gfc_copy_attr): Emit errors for duplicate
2143 EXTERNAL/INTRINSIC statements.
2145 2007-06-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2148 * expr.c (gfc_check_assign): If the rvalue expression type is NULL_EXPR,
2149 check to see if the lvalue has attribute pointer and data.
2151 2007-06-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2154 * resolve.c (gfc_resolve_iterator_expr): Add check for REAL using
2155 gfc_notify_standard. (gfc_resolve_iterator): Remove check.
2156 (resolve_branch): Change "Obsolete" to "Deleted feature".
2157 * io.c (resolve_tag): Ditto.
2158 * match.c (gfc_match_pause, gfc_match_assign, gfc_match_goto): Ditto.
2160 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2163 * match.c (gfc_match_common): If the symbol value expression type is
2164 NULL_EXPR, don't error if previously initialized.
2166 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2169 * decl.c (get_proc_name) Check symbol for generic interface
2172 2007-06-20 Andrew Pinski <andrew_pinski@playstation.sony.com>
2173 Richard Guenther <rguenther@suse.de>
2176 * trans.c (gfc_build_addr_expr): Use the correct types.
2178 2007-06-19 Paul Thomas <pault@gcc.gnu.org>
2182 * resolve.c (resolve_code): Use gfc_impure_variable as a
2183 condition for rejecting derived types with pointers, in pure
2185 (gfc_impure_variable): Add test for dummy arguments of pure
2186 procedures; any for functions and INTENT_IN for subroutines.
2189 * data.c (gfc_assign_data_value): Change the ICE on an array
2190 reference initializer not being an array into an error and
2191 clear init to prevent a repetition of the error.
2193 2007-06-17 Janne Blomqvist <jb@gcc.gnu.org>
2195 * gfortran.texi: Add documentation for GFORTRAN_UNBUFFERED_n
2196 environment variables. Fix documentation for
2197 GFORTRAN_UNBUFFERED_ALL environment variable.
2199 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
2201 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
2202 POINTER_PLUS_EXPR instead of PLUS_EXPR for pointer addition.
2203 * trans-expr.c (gfc_trans_string_copy): Create
2204 POINTER_PLUS_EXPR instead of a PLUS_EXPR
2207 2007-06-14 Paul Thomas <pault@gcc.gnu.org>
2210 * trans-common.c (build_common_decl): If resizing of common
2211 decl is needed, update the TREE_TYPE.
2213 2007-06-13 Tobias Burnus <burnus@net-b.de>
2216 * interface.c (has_vector_section): New.
2217 (compare_actual_formal): Check for array sections with vector subscript.
2219 2007-06-12 Dirk Mueller <dmueller@suse.de>
2221 * trans-stmt.c (gfc_trans_call): fix gcc_assert to
2222 a comparison, not an assignment.
2224 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
2226 * trans-common.c (create_common): Initialize 'field_init'.
2228 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
2232 * trans-common.c (get_init_field): New function.
2233 (create_common): Call get_init_field for overlapping
2234 initializers in equivalence blocks.
2235 * resolve.c (resolve_equivalence_derived, resolve_equivalence):
2236 Remove constraints on initializers in equivalence blocks.
2237 * target-memory.c (expr_to_char, gfc_merge_initializers):
2239 (encode_derived): Add the bit offset to the byte offset to get
2240 the total offset to the field.
2241 * target-memory.h : Add prototype for gfc_merge_initializers.
2243 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
2245 * trans-types.c (gfc_signed_type): Remove.
2246 * trans-types.h (gfc_signed_type): Remove.
2247 * f95-lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
2249 2007-06-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2251 * trans-intrinsic.c: Revert Lee's 2007-06-04 patch.
2253 2007-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
2254 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2257 * match.c (gfc_match_special_char): New function. Match special char.
2259 * match.h: Add prototype.
2260 * io.c (next_char): Use it.
2261 * primary.c (next_string_char): Ditto.
2263 2007-06-06 Steven G. Kargl <kargl@gcc.gnu.org>
2265 * decl.c: Miscellaneous whitespace fixes.
2267 * gfortran.h: Likewise.
2268 * interface.c : Likewise.
2270 * match.c: Likewise.
2271 * match.h: Likewise.
2272 * module.c: Likewise.
2273 * parse.c: Likewise.
2274 * resolve.c: Likewise.
2275 * symbol.c: Likewise.
2276 * trans-array.c: Likewise.
2277 * trans-common.c: Likewise.
2278 * trans-decl.c: Likewise.
2279 * trans-intrinsic.c: Likewise.
2280 * trans-io.c: Likewise.
2281 * trans-stmt.c: Likewise.
2282 * trans-types.c: Likewise.
2284 2007-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2287 * parse.c (decode_statement): Don't call gfc_undo_symbols on MATCH_ERROR
2288 for ST_FUNCTION since it is called in reject_statement.
2289 (parse_contained): If error, loop back after reject_statement and try
2290 again. Free the namespace if an error occured.
2292 2007-06-04 Lee Millward <lee.millward@codesourcery.com>
2294 * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
2295 to operate on a stack allocated array for the intrinsic arguments
2296 instead of creating a TREE_LIST. Add two new parameters for the
2297 array and the number of elements. Update all callers to allocate
2298 an array of the correct length to pass in. Update comment.
2299 (gfc_intrinsic_argument_list_length): New function.
2300 (gfc_conv_intrinsic_mnimax): Call it.
2301 (gfc_conv_intrinsic_merge): Likewise.
2302 (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
2304 (gfc_conv_intrinsic_cmplx): Likewise.
2305 (gfc_conv_intrinsic_ctime): Likewise.
2306 (gfc_covn_intrinsic_fdate): Likewise.
2307 (gfc_conv_intrinsic_ttynam): Likewise.
2308 (gfc_conv_intrinsic_ishftc): Likewise.
2309 (gfc_conv_intrinsic_index): Likewise.
2310 (gfc_conv_intrinsic_scan): Likewise.
2311 (gfc_conv_intrinsic_verify): Likewise.
2312 (gfc_conv_intrinsic_trim): Likewise.
2313 (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
2314 (gfc_conv_intrinsic_exponent): Likewise.
2315 (gfc_conv_intrinsic_bound): Likewise.
2316 (gfc_conv_intrinsic_abs): Likewise.
2317 (gfc_conv_intrinsic_mod): Likewise.
2318 (gfc_conv_intrinsic_sign): Likewise.
2319 (gfc_conv_intrinsic_len): Likewise.
2320 (gfc_conv_intrinsic_adjust): Likewise.
2321 (gfc_conv_intrinsic_si_kind): Likewise.
2323 2007-06-04 Steve Ellcey <sje@cup.hp.com>
2325 * trans-array.c (gfc_conv_array_parameter): Initialize tmp.
2327 2007-05-31 Richard Guenther <rguenther@suse.de>
2329 * trans-expr.c (gfc_conv_expr_op): Use zero constant
2330 that matches the lse type.
2331 (gfc_trans_string_copy): Use sizetype zero constant.
2332 * intrinsic.c (add_functions): The sizeof intrinsic has
2334 * trans-types.c (gfc_get_dtype): Convert size to index
2335 type before shifting.
2336 * trans-array.c (gfc_trans_array_constructor_value): Use
2337 index type for offset computation.
2338 * trans-intrinsic.c (gfc_conv_associated): Use correct type
2341 2007-05-31 Paul Thomas <pault@gcc.gnu.org>
2344 * trans-array.c (gfc_trans_array_constructor): Treat the case
2345 where the ss expression charlen is missing.
2347 22007-05-31 Paul Thomas <pault@gcc.gnu.org>
2350 * module.c (mio_symtree_ref): If an equivalence group member
2351 is not used, give it a hidden symbol and set the pointer_info.
2352 (load_equiv): Only free the equivalence if none of the members
2355 2007-05-29 Daniel Franke <franke.daniel@gmail.com>
2357 * gfortran.h: Renamed 'enum gfc_generic_isym_id' to 'enum gfc_isym_id',
2358 added missing GFC_ISYM_* enumerators, ordered alphabetically.
2359 (struct gfc_intrinsic_sym): Renamed 'generic_id' to 'id'.
2360 (gfc_find_subroutine): New prototype.
2361 * intrinsic.c (add_sym, add_sym_*): Added argument 'id' and changed all callers.
2362 (find_subroutine): Renamed to 'gfc_find_subroutine', removed static.
2363 * dependency.c: Changed usage of isym->generic_id to isym->id.
2364 * openmp.c: Likewise.
2365 * resolve.c: Likewise.
2366 * trans-array.c: Likewise.
2367 * trans-expr.c: Likewise.
2368 * trans-intrinsic.c: Likewise.
2369 * trans-openmp.c: Likewise.
2371 2007-05-28 Tobias Schlüter <tobi@gcc.gnu.org>
2373 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIZEOF.
2374 * intrinsic.c (add_functions): Add stuff for SIZEOF intrinsic.
2375 * intrinsic.h (gfc_check_sizeof): Add prototype of ...
2376 * check.c (gfc_check_sizeof): .. new function.
2377 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): New function.
2378 (gfc_conv_intrinsic_strcmp): Whitespace fix.
2379 (gfc_conv_intrinsic_array_transfer): Remove double initialization,
2380 use fold_build. where appropriate.
2381 (gfc_conv_intrinsic_function): Add case for SIZEOF.
2382 * intrinsic.texi: Add documentation for SIZEOF.
2384 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
2386 * trans-array.c (gfc_conv_expr_descriptor): Edit comment.
2388 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
2391 * target-memory.c (gfc_target_expr_size): Add handling
2392 for size of BT_HOLLERITH variables.
2393 * check.c (gfc_check_transfer): Reject BT_HOLLERITH
2394 variables in MOLD argument of TRANSFER.
2396 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
2398 * gfortran.h (gfc_expr): Remove from_H, add "representation"
2400 * primary.c (match_hollerith_constant): Store the representation
2401 of the Hollerith in representation, not in value.character.
2402 * arith.c: Add dependency on target-memory.h.
2403 (eval_intrinsic): Remove check for from_H.
2404 (hollerith2representation): New function.
2405 (gfc_hollerith2int): Determine value of the new constant.
2406 (gfc_hollerith2real): Likewise.
2407 (gfc_hollerith2complex): Likewise.
2408 (gfc_hollerith2logical): Likewise.
2409 (gfc_hollerith2character): Point both representation.string and
2410 value.character.string at the value string.
2411 * data.c (create_character_initializer): For BT_HOLLERITH
2412 rvalues, get the value from the representation rather than
2414 * expr.c (free_expr0): Update handling of BT_HOLLERITH values
2415 and values with representation.string.
2416 (gfc_copy_expr): Likewise.
2417 * intrinsic.c (do_simplify): Remove special treatement of
2418 variables resulting from Hollerith constants.
2419 * dump-parse-trees.c (gfc_show_expr): Update handling of
2421 * trans-const.c (gfc_conv_constant_to_tree): Replace from_H
2422 check with check for representation.string; get Hollerith
2423 representation from representation.string, not value.character.
2424 * trans-expr.c (is_zero_initializer_p): Replace from_H check
2425 with check for representation.string.
2426 * trans-stmt.c (gfc_trans_integer_select): Use
2427 gfc_conv_mpz_to_tree for case values, so as to avoid picking up
2428 the memory representation if the case is given by a transfer
2430 * target-memory.c (gfc_target_encode_expr): Use the known memory
2431 representation rather than the value, if it exists.
2432 (gfc_target_interpret_expr): Store the memory representation of
2433 the interpreted expression as well as its value.
2434 (interpret_integer): Move to gfc_interpret_integer, make
2436 (interpret_float): Move to gfc_interpret_float, make non-static.
2437 (interpret_complex): Move to gfc_interpret_complex, make
2439 (interpret_logical): Move to gfc_interpret_logical, make
2441 (interpret_character): Move to gfc_interpret_character, make
2443 (interpret_derived): Move to gfc_interpret_derived, make
2445 * target-memory.h: Add prototypes for newly-exported
2446 gfc_interpret_* functions.
2448 2007-05-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2451 * parse.c (next_statement): Warn for truncated lines if source is free
2454 2007-05-27 Paul Thomas <pault@gcc.gnu.org>
2455 Tobias Burnus <burnus@net-b.de>
2458 * symbol.c (gfc_check_function_type): Copy dimensions of
2460 * resolve.c (resolve_contained_fntype): Improve symbol output in
2463 2007-05-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2466 * io.c (check_format): Add warning for H specifier in format.
2468 2007-05-26 Tobias Burnus <burnus@net-b.de>
2470 * gfortran.texi: Document the GFORTRAN_ERROR_DUMPCORE and
2471 GFORTRAN_ERROR_BACKTRACE environment variables.
2473 2007-05-26 Paul Thomas <pault@gcc.gnu.org>
2476 * trans.h : Add no_function_call bitfield to gfc_se structure.
2477 Add stmtblock_t argument to prototype of get_array_ctor_strlen.
2478 * trans-array.c (get_array_ctor_all_strlen): New function.
2479 (get_array_ctor_strlen): Add new stmtblock_t argument and call
2480 new function for character elements that are not constants,
2481 arrays or variables.
2482 (gfc_conv_array_parameter): Call get_array_ctor_strlen to get
2484 * trans-intrinsic (gfc_conv_intrinsic_len): Add new argument
2485 to call of get_array_ctor_strlen.
2487 2007-05-25 Kazu Hirata <kazu@codesourcery.com>
2489 * intrinsic.texi: Fix typos.
2491 2007-05-25 Paul Thomas <pault@gcc.gnu.org>
2494 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Change
2495 order in logic under EXPR_FUNCTION to handle functions with
2498 2007-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2501 * array.c (spec_dimen_size): Test for correct BT_INTEGER type.
2503 2007-05-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2506 * trans-expr.c (gfc_trans_zero_assign): Convert the result of
2507 TYPE_SIZE_UNIT into a signed type.
2508 (gfc_trans_array_copy): Likewise.
2509 (gfc_trans_array_constructor_copy): Likewise.
2510 * trans-array.c (gfc_trans_create_temp_array): Likewise.
2511 (gfc_grow_array): Likewise.
2512 (gfc_array_init_size): Likewise.
2513 (gfc_duplicate_allocatable): Likewise.
2514 * trans-stmt.c (allocate_temp_for_forall_nest_1): Likewise.
2516 2007-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2519 * resolve.c (resolve_function): Don't call resolve_global_procedure if
2520 there is no name. Delete duplicated statement in ELSE clause.
2522 2007-05-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2525 * trans-array.c (gfc_trans_array_bound_check): Take extra argument to
2526 indicate whether we should check the upper bound in that dimension.
2527 (gfc_conv_array_index_offset): Check only the lower bound of the
2528 last dimension for assumed-size arrays.
2529 (gfc_conv_array_ref): Likewise.
2530 (gfc_conv_ss_startstride): Likewise.
2532 2007-05-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2533 Daniel Franke <franke.daniel@gmail.com>
2536 * resolve.c (resolve_actual_arglist): Resolve actual argument after
2537 being identified as variable.
2539 2007-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2542 * trans-stmt.c (gfc_trans_do): Fix the value of loop variable
2545 2007-05-21 H.J. Lu <hongjiu.lu@intel.com>
2547 * trans-stmt.c (gfc_trans_do): Fix a typo in comment.
2549 2007-05-21 Paul Thomas <pault@gcc.gnu.org>
2553 * trans-array.c (gfc_conv_expr_descriptor): Obtain the stored
2554 offset for non-descriptor, source arrays and correct for stride
2555 not equal to one before writing to field of output descriptor.
2557 2007-05-20 Daniel Franke <franke.daniel@gmail.com>
2560 * check.c (check_rest): Improved argument conformance check and
2561 fixed error message generation.
2563 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2566 * Make-lang.in: Remove use of -Wno-error for expr.o, resolve.o,
2567 simplify.o and trans-common.o.
2569 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2572 * trans-array.c (gfc_trans_auto_array_allocation): Avoid
2573 multiplication of mismatched types.
2575 2007-05-18 Daniel Franke <franke.daniel@gmail.com>
2578 * symbol.c (gfc_add_flavor): Add the NAME to error message if
2581 2007-05-15 Daniel Franke <franke.daniel@gmail.com>
2586 * intrinsic.c (check_specific): Check elemental intrinsics for
2588 (add_functions): Fixed dummy argument names of BESJN and BESYN.
2589 Fixed elemental status of MCLOCK and MCLOCK8.
2590 * check.c (check_rest): Added check for array conformance.
2591 (gfc_check_merge): Removed check for array conformance.
2592 (gfc_check_besn): Removed check for scalarity.
2593 * intrinsic.texi (CSHIFT, EOSHIFT): Fixed typos.
2594 (BESJN, BESYN): Clarified documentation.
2596 2007-05-17 Tobias Burnus <burnus@net-b.de>
2598 * gfortran.texi (GFORTRAN_CONVERT_UNIT): Improve documentation.
2600 2007-05-16 Brooks Moses <brooks.moses@codesourcery.com>
2607 * target-memory.c: New file.
2608 * target-memory.h: New file.
2609 * simplify.c: Add #include "target-memory.h".
2610 (gfc_simplify_transfer): Implement constant-
2611 folding for TRANSFER intrinsic.
2612 * Make-lang.in: Add dependencies on new target-memory.* files.
2614 2007-05-15 Paul Brook <paul@codesourcery.com>
2616 * trans-types.c (gfc_type_for_size): Handle signed TImode.
2618 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2621 * trans.h (gfor_fndecl_internal_malloc, gfor_fndecl_internal_malloc64,
2622 gfor_fndecl_internal_free): Remove prototypes.
2623 (gfor_fndecl_os_error, gfc_call_free, gfc_call_malloc): Add prototypes.
2624 * trans.c (gfc_call_malloc, gfc_call_free): New functions.
2625 * f95-lang.c (gfc_init_builtin_functions): Add __builtin_free
2626 and __builtin_malloc builtins.
2627 * trans-decl.c (gfor_fndecl_internal_malloc,
2628 gfor_fndecl_internal_malloc64, gfor_fndecl_internal_free): Remove.
2629 (gfor_fndecl_os_error): Add.
2630 (gfc_build_builtin_function_decls): Don't create internal_malloc,
2631 internal_malloc64 and internal_free library function declaration.
2632 Create os_error library call function declaration.
2633 * trans-array.c (gfc_trans_allocate_array_storage,
2634 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2635 gfc_conv_array_parameter, gfc_duplicate_allocatable): Use
2636 gfc_call_malloc and gfc_call_free instead of building calls to
2637 internal_malloc and internal_free.
2638 * trans-expr.c (gfc_conv_string_tmp): Likewise.
2639 * trans-stmt.c (gfc_do_allocate, gfc_trans_assign_need_temp,
2640 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
2641 gfc_trans_where_2: Likewise.
2642 * trans-intrinsic.c (gfc_conv_intrinsic_ctime,
2643 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
2644 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_trim): Likewise.
2646 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2649 * trans-expr.c (gfc_conv_substring): Evaluate substring bounds
2652 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
2654 * f95-lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
2655 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use unsigned_type_for
2656 instead of gfc_unsigned_type.
2657 * trans-stmt.c (gfc_trans_do): Use unsigned_type_for instead of
2659 * trans-types.c (gfc_unsigned_type): Remove.
2660 * trans-types.h (gfc_unsigned_type): Remove.
2662 2007-05-12 Paul Thomas <pault@gcc.gnu.org>
2665 * resolve.c (check_host_association): New function that detects
2666 incorrect host association and corrects it.
2667 (gfc_resolve_expr): Call the new function for variables and
2669 * match.h : Remove prototype for gfc_match_rvalue.
2670 * gfortran.h : Add prototype for gfc_match_rvalue.
2672 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
2675 * trans-expr.c (gfc_conv_function_call): Reduce indirection for
2676 direct assignments of recursive array valued functions.
2677 * primary.c (gfc_match_rvalue): Correct error for recursive
2678 function calls such that directly recursive calls of scalar
2679 function without an explicit result are disallowed.
2681 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
2684 * resolve.c (resolve_fl_namelist): It is not an error if the
2685 namelist element is the result variable of the enclosing
2686 function. Search for the symbol in current and all parent
2687 namespaces for a potential conflict.
2688 * symbol.c (check_conflict): Remove the conflict between
2689 'in_namelist' and 'FL_PROCEDURE' because the symbol info
2690 is not available to exclude function result variables.
2691 * trans-io.c (nml_get_addr_expr): Use the fake result decl
2692 if the symbol is an implicit result variable.
2694 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
2697 * decl.c (get_proc_name): If an entry has already been declared
2698 as a module procedure, pick up the symbol and the symtree and
2699 use them for the entry.
2701 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
2704 * resolve.c (resolve_symbol): Remove the flagging mechanism from the
2705 formal namespace resolution and instead check that the formal
2706 namespace is not the current namespace.
2708 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
2711 * trans-array.c (gfc_conv_array_parameter): Convert full array
2712 references to the result of the procedure enclusing the call.
2714 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
2718 * decl.c (add_init_expr_to_sym): Expand a scalar initializer
2719 for a parameter array into an array expression with the right
2721 * array.c (spec_dimen_size): Remove static attribute.
2722 * gfortran.h : Prototype for spec_dimen_size.
2724 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2727 * trans-stmt.c (gfc_trans_do): Handle large loop counts.
2729 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2732 * simplify.c (gfc_simplify_new_line): NEW_LINE can be simplified
2733 even for non constant arguments.
2735 2007-05-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2736 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2739 * gfortran.h: Add runtime error codes from libgfortran.h. Define
2741 * trans.c (gfc_trans_runtime_check): Update the format of runtime error
2742 messages to match library runtime errors. Use call to new library
2743 function runtime_error_at().
2744 * trans.h: Add prototype for new function gfc_trans_io_runtime_check.
2745 Add declaration for library functions runtime_error_at and
2747 * trans_io.c (gfc_trans_io_runtime_check): New function.
2748 (set_parameter_value): Add error checking for UNIT numbers.
2749 (set_parameter_ref): Initialize the users variable to zero.
2750 (gfc_trans_open): Move setting of unit number to after setting of common
2751 flags so that runtime error trapping can be detected.
2752 (gfc_trans_close): Likewise. (build_filepos): Likewise.
2753 (gfc_trans_inquire): Likewise. (build_dt): Likewise.
2754 * trans-decl.c: Add declarations for runtime_error_at and
2755 generate_error. (gfc_build_builtin_function_decls): Build function
2756 declarations for runtime_error_at and generate_error.
2758 2007-05-06 Paul Thomas <pault@gcc.gnu.org>
2761 * resolve.c (resolve_fl_procedure): Resolve constant character
2764 2007-05-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2767 * decl.c (match_char_spec): Add check for invalid character lengths.
2769 2007-05-04 Brooks Moses <brooks.moses@codesourcery.com>
2771 * intrinsic.texi (CMPLX): Document result kind.
2772 (COMPLEX): Add documentation.
2774 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
2777 * intrinsic.c (add_functions): Replaced calls to gfc_check_g77_math1
2778 by gfc_check_fn_r to avoid checks for scalarity.
2779 * check.c (gfc_check_besn): Removed check for scalarity.
2780 (gfc_check_g77_math1): Removed.
2781 * intrinsic.h (gfc_check_g77_math1): Removed.
2783 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
2785 * check.c (gfc_check_fseek_sub): Fixed typo.
2787 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
2790 * intrinsic.c (add_subroutines): Added FSEEK.
2791 * intrinsic.h (gfc_resolve_fseek_sub, gfc_check_fseek_sub): New.
2792 * iresolve.c (gfc_resolve_fseek_sub): New.
2793 * check.c (gfc_check_fseek_sub): New.
2794 * intrinsic.texi (FSEEK): Updated.
2796 2007-05-04 Tobias Burnus <burnus@net-b.de>
2799 * expr.c (gfc_check_pointer_assign): Check for NULL pointer.
2801 2007-05-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2804 * simplify.c (gfc_simplify_len): Only simplify integer lengths.
2806 2007-05-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2809 * simplify.c (gfc_simplify_repeat): Don't put function call with
2810 side effect in a gcc_assert().
2812 2007-05-04 Tobias Burnus <burnus@net-b.de>
2815 * interface.c (compare_actual_formal): Check character length.
2817 2007-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
2820 * dependency.c (gfc_full_array_ref_p): If the reference is
2821 to a single element, check that the array has a single
2822 element and that the correct element is referenced.
2824 2007-05-01 Daniel Franke <franke.daniel@gmail.com>
2826 * intrinsic.c (add_functions): Fixed ELEMENTAL specifications.
2827 (add_subroutines): Replaced magic numbers in function calls by
2828 ELEMENTAL and NOT_ELEMENTAL respectively.
2829 * intrinsic.texi (MVBITS): Changed class to elemental subroutine.
2830 (RANDOM_NUMBER): Changed class to subroutine.
2831 (HUGE, TINY): Changed class to inquiry function.
2833 2007-04-30 Brooks Moses <brooks.moses@codesourcery.com>
2835 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_get_double_int.
2836 (gfc_conv_tree_to_mpz): New function.
2837 (gfc_conv_mpfr_to_tree): Use real_from_mpfr.
2838 (gfc_conv_tree_to_mpfr): New function.
2839 * trans-const.h: (gfc_conv_tree_to_mpz): New prototype.
2840 (gfc_conv_tree_to_mpfr): New prototype.
2842 2007-04-30 Daniel Franke <franke.daniel@gmail.com>
2844 * intrinsic.texi (IERRNO): Changed class to non-elemental function.
2845 (LOG10): Removed COMPLEX as accepted argument type.
2846 (NEW_LINE): Changed class from elemental to inquiry function.
2847 (SIGN): Removed requirement of scalar arguments.
2848 (SNGL): Changed class to elemental function.
2850 2007-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2853 * simplify.c (simplify_bound_dim): New function.
2854 (simplify_bound): Use the above. Perform simplification of LBOUND
2855 and UBOUND when DIM argument is not present.
2857 2007-04-29 Daniel Franke <franke.daniel@gmail.com>
2859 * gfortran.texi: Cleaned up keyword index.
2860 * invoke.texi: Likewise.
2861 * intrinsic.texi: Likewise.
2863 2007-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2866 * scanner.c (load_file): Discard the byte order mark if one is
2867 found on the first non-preprocessor line of a file.
2869 2007-04-29 Paul Thomas <pault@gcc.gnu.org>
2872 * trans-array.c (gfc_conv_resolve_dependencies): Create a temp
2873 whenever a dependency is found.
2875 2007-04-28 Tobias Schlüter <tobi@gcc.gnu.org>
2877 * options.c (gfc_handle_option): Ensure requested free form line
2878 length is not too small.
2880 2007-04-27 Brooks Moses <brooks.moses@codesourcery.com>
2882 * intrinsic.texi (Transfer): Improve documentation.
2884 2007-04-27 Brooks Moses <brooks.moses@codesourcery.com>
2886 * gfortran.texi (Option Index): Add @samp as needed.
2888 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
2890 * gfortran.texi: Added node and menu entry for an option index.
2891 * invoke.texi: Moved command line option related entries of the concept
2892 index to the option index.
2894 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
2896 * intrinsic.texi (AND, FPUT, FPUTC, MODULO, OR, SET_EXPONENT,
2897 XOR): Fixed examples.
2899 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
2901 * intrinsic.texi (PRODUCT, RESHAPE, SPACING, SPREAD, SUM,
2902 SYSTEM_CLOCK, TRANSFER, UNPACK): New.
2903 (DATE_AND_TIME, CPU_TIME, RRSPACING): Added cross references.
2905 2007-04-26 Daniel Franke <franke.daniel@gmail.com>
2907 * intrinsic.texi (NULL, PACK, PRESENT, REPEAT, SCAN, SHAPE,
2908 SIZE, TRANSPOSE, TRIM, VERIFY): New.
2909 (ADJUSTL, ADJUSTR, INDEX): Added cross references.
2910 (INT, INT2, INT8, LONG): Enabled section header.
2912 2007-04-25 Janne Blomqvist <jb@gcc.gnu.org>
2914 * module.c (module_char): Replace fgetc() with
2916 (write_char): Replace fputc() with putc().
2917 * scanner.c (load_line): Replace fgetc() with getc().
2918 (gfc_read_orig_filename): Likewise.
2920 2007-04-25 Tobias Burnus <burnus@net-b.de>
2923 * error.c (error_print): Fix %% support.
2924 * intrinsic.c (sort_actual): Improve error message.
2925 * resolve.c (resolve_actual_arglist): Allow %VAL for
2926 interfaces defined in the module declaration part.
2928 2007-04-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2931 * intrinsic.texi (GETLOG): Update documentation to reflect
2934 2007-04-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2937 * module.c (write_char): Add character to the MD5 buffer.
2938 (read_md5_from_module_file): New function.
2939 (gfc_dump_module): Compute MD5 for new module file. Call
2940 read_md5_from_module_file. Only overwrite old module file
2941 if the new MD5 is different.
2943 2007-04-23 Paul Thomas <pault@gcc.gnu.org>
2946 * resolve.c (resolve_symbol): Allow resolution of formal
2947 namespaces nested within formal namespaces coming from modules.
2950 * trans-expr.c (gfc_trans_assignment): Make the call to
2951 gfc_trans_zero_assign conditional on the lhs array ref being
2954 2007-04-23 Tobias Burnus <burnus@net-b.de>
2956 * primary.c (match_integer_constant): Mention -fno-range-check
2957 in the error message.
2959 2007-04-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2962 * scanner.c (load_line): Remove check for comment after ampersand and
2963 adjust tracking of ampersand.
2965 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
2967 * f95-lang.c (lang_tree_node): Use GENERIC_NEXT
2968 instead of checking GIMPLE_STMT_P in chain_next.
2970 2007-04-17 Tobias Schlüter <tobi@gcc.gnu.org>
2972 * trans-types.h (gfc_packed): New enum.
2973 (gfc_get_nodesc_array_type): Change prototype to use new enum.
2974 * trans-types.c (gfc_get_nodesc_array): Use gfc_packed for
2975 argument packed. Adapt all references to values accordingly.
2976 (gfc_sym_type): Use enum values in call to gfc_get_nodesc_array.
2977 (gfc_get_derived_type): Likewise.
2978 * trans-array.c (gfc_build_constant_array_constructor): Likewise.
2979 * trans-expr.c (gfc_get_interface_mapping_charlen): Changed packed
2980 argument to type gfc_packed.
2981 (gfc_add_interface_mapping): Use enum values in call to
2982 gfc_get_interface_mapping.
2983 * trans-decl.c (gfc_build_dummy_array_decl): Adapt to use enum
2984 values when determining packing.
2986 * trans-decl.c (gfc_finish_decl): Remove unused second argument
2987 'init'. Simplify code accordingly. Remove calls to
2988 gfc_fatal_error in favor of gcc_assert.
2989 (create_function_arglist): Remove second argument from calls to
2991 (gfc_trans_dummy_character): Likewise.
2993 * arith.h: Update copyright years.
2994 * dependency.h: Likewise.
2995 * gfortran.h: Likewise.
2996 * lang-specs.h: Likewise.
2997 * parse.h: Likewise.
2998 * symbol.c: Likewise.
2999 * trans.h: Likewise.
3000 * trans.c: Likewise.
3001 * trans-array.c: Likewise.
3002 * trans-common.c: Likewise.
3003 * trans-const.h: Likewise.
3004 * trans-const.c: Likewise.
3005 * trans-decl.c: Likewise.
3006 * trans-expr.c: Likewise.
3007 * trans-io.c: Likewise.
3008 * trans-openmp.c: Likewise.
3009 * trans-types.h: Likewise.
3010 * types.def: Likewise.
3012 2007-04-17 Tobias Schlüter <tobi@gcc.gnu.org>
3015 * decl.c (gfc_sym_mangled_identifier): Use capital letters in name
3017 (gfc_sym_mangled_function_id): Likewise.
3019 2007-04-15 Paul Thomas <pault@gcc.gnu.org>
3022 * primary.c (check_for_implicit_index): New function to check
3023 that a host associated variable is not an undeclared implied
3025 (gfc_match_rvalue, match_variable): Use it and reset the
3026 implied_index attribute.
3027 * gfortran.h : Add the implied_index field to symbol_attribute.
3028 * match.c (gfc_match_iterator): Mark the iterator variable
3029 with the new attribute.
3030 * decl.c (build_sym): Reset the new attribute.
3032 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
3034 * gfc-internals.texi: Fix typos.
3035 * simplify.c: Fix a comment typo.
3037 2007-04-14 Bernhard Fischer <aldot@gcc.gnu.org>
3039 * primary.c: Commentary typo fix; Add question about redundant (?)
3042 2007-04-14 Paul Thomas <pault@gcc.gnu.org>
3046 * expr.c (scalarize_intrinsic_call): New function to
3047 scalarize elemental intrinsic functions in initialization
3049 (check_init_expr): Detect elemental intrinsic functions
3050 in initalization expressions and call previous.
3052 2007-04-13 Tobias Burnus <burnus@net-b.de>
3055 * primary.c (match_variable): External functions
3058 2007-04-13 Paul Thomas <pault@gcc.gnu.org>
3061 * trans-types.c (copy_dt_decls_ifequal): Do not get pointer
3062 derived type components.
3064 2007-04-13 Tobias Schlüter <tobi@gcc.gnu.org>
3067 * resolve.c: Include obstack.h and bitmap.h. New variable
3069 (code_stack): Add tail and reachable_labels fields.
3070 (reachable_labels): New function.
3071 (resolve_branch): Rework to use new fields in code_stack.
3072 (resolve_code): Call reachable_labels.
3073 (resolve_codes): Allocate and free labels_obstack.
3075 2007-04-12 Tobias Schlüter <tobi@gcc.gnu.org>
3078 * decl.c (match_char_spec): Move check for negative CHARACTER
3080 * resolve.c (resolve_charlen): ... here.
3081 (resolve_types): Resolve CHARACTER lengths earlier.
3083 2007-04-12 Daniel Franke <franke.daniel@gmail.com>
3086 * intrinsic.texi (RANDOM_SEED, RANDOM_NUMBER): New.
3088 2007-04-12 Tobias Schlüter <tobi@gcc.gnu.org>
3091 * primary.c (gfc_variable_attr): Don't copy string length if it
3093 * resolve.c (resolve_code): Clarify error message.
3096 * decl.c (gfc_match_end): Also check for construct name in END
3097 FORALL and END WERE statements.
3098 * match.c (match_case_eos): Use uppercase for statement name in
3100 (match_elsewhere): Construct name may appear iff construct has a
3103 * trans-types.c: Update copyright years. Reformat long comment
3104 explaining array descriptor format. Remove obsolete mention of
3107 * arith.c (gfc_arith_uplus): Rename to ...
3108 (gfc_arith_identity): ... this.
3109 (gfc_parentheses): New function.
3110 (gfc_uplus): Adapt to renamed function.
3111 * arith.h (gfc_parentheses): Add prototype.
3112 * expr.c (gfc_copy_expr): Deal with INTRINSIC_PARENTHESES.
3113 (simplifiy_intrinsic_op): Treat INTRINSIC_UPLUS separately from
3114 INTRINSIC_PARENTHESES.
3116 2007-04-12 Tobias Burnus <burnus@net-b.de>
3119 * decl.c (match_attr_spec): Allow PRIVATE/PUBLIC
3120 attribute in type definitions.
3121 (gfc_match_private): Allow PRIVATE statement only
3122 in specification part of modules.
3123 (gfc_match_public): Ditto for PUBLIC.
3124 (gfc_match_derived_decl): Allow PRIVATE/PUBLIC attribute only in
3125 specificification part of modules.
3127 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
3130 * intrinsic.c (add_functions): Add ref. to gfc_resolve_achar.
3131 * intrinsic.h : Add prototype for gfc_resolve_achar.
3132 * iresolve.c (gfc_resolve_achar): New function.
3134 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
3137 * resolve.c (resolve_fl_variable): Set flag to 2 for automatic
3138 arrays. Make condition for automatic array error explicit.
3139 If a dummy, no error on an INTENT(OUT) derived type.
3141 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
3144 * expr.c (find_array_element): Correct arithmetic for rank > 1.
3146 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
3149 * check.c (numeric_check): If an expresson has not got a type,
3150 see if it is a symbol for which a default type applies.
3152 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
3155 * trans-decl.c (gfc_get_symbol_decl): Allow unreferenced use
3158 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
3161 * symbol.c (gfc_check_function_type): New function.
3162 * gfortran.h : Add prototype for previous.
3163 * parse.c (parse_progunit): Call it after parsing specification
3166 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
3169 * trans-expr.c (gfc_conv_function_call): Give a dummy
3170 procedure the correct type if it has alternate returns.
3172 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
3175 * decl.c (gfc_match_modproc): Go up to the top of the namespace
3176 tree to find the module namespace for gfc_get_symbol.
3178 2007-04-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3181 * fortran/gfortran.h (gfc_charlen_int_kind): New prototype.
3182 * fortran/trans-types.c (gfc_charlen_int_kind): New variable.
3183 (gfc_init_types): Define gfc_charlen_int_kind.
3184 * fortran/trans.h (gfor_fndecl_string_repeat): Remove prototype.
3185 * fortran/trans-decl.c (gfor_fndecl_string_repeat): Delete.
3186 (gfc_build_intrinsic_function_decls): Don't set
3187 gfor_fndecl_string_repeat.
3188 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_repeat): Rewrite
3189 so that we don't have to call a library function.
3190 * fortran/simplify.c (gfc_simplify_repeat): Perform the necessary
3191 checks on the NCOPIES argument, and work with arbitrary size
3194 2007-03-31 Tobias Burnus <burnus@net-b.de>
3196 * intrinsic.c (add_functions): Fix name of dummy argument
3197 for new_line and exit intrinsic.
3199 2007-03-31 Paul Thomas <pault@gcc.gnu.org>
3202 * gfortran.texi: Add a section for the %VAL, %REF and %LOC
3205 2007-03-30 Rafael Avila de Espindola <espindola@google.com>
3207 * trans-types.c (gfc_signed_or_unsigned_type): Remove.
3208 (gfc_unsigned_type): Use get_signed_or_unsigned_type instead of
3209 gfc_signed_or_unsigned_type.
3210 (gfc_signed_type): Ditto.
3211 * trans-types.h (gfc_signed_or_unsigned_type): Remove.
3212 * f95-lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
3214 2007-03-30 Tobias Schlüter <tobi@gcc.gnu.org>
3216 * symbol.c (gfc_find_gsymbol): Simplify, don't unconditionally
3217 descend into all branches.
3219 2007-03-29 Tobias Schlüter <tobi@gcc.gnu.org>
3221 * intrinsic.c (conv_name): Let gfc_get_string handle the format.
3222 (find_conv): Compare pointers instead of calling strcmp.
3223 (find_sym): Likewise, but ensure that the compared pointer is in
3224 the global string table.
3226 2007-03-28 Tobias Schlüter <tobi@gcc.gnu.org>
3228 * gfc-internals.texi: Fix output filename. Merge type index into
3229 concept index. Start documentation of gfc_code structure.
3231 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
3233 * gfc-internals.texi: New file,
3234 * Make-lang.in: Add rules to convert it to dvi, pdf, and info.
3236 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
3238 * error.c (show_locus): Remove always-false test.
3240 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
3242 * lang.opt: Minor edits to descriptions.
3244 2007-03-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3247 * fortran/interface.c (check_operator_interface): Implement
3248 the standard checks on user operators extending intrinsic operators.
3249 * fortran/resolve.c (resolve_operator): If the ranks of operators
3250 don't match, don't error out but try the user-defined ones first.
3252 2007-03-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3255 * expr.c (check_dimension): Fix logic of comparisons.
3257 2007-03-24 Paul Thomas <pault@gcc.gnu.org>
3260 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Return
3261 int result that is non-zero if the expression is the function
3262 result. Only the characteristics of the result expression
3263 can be used in a procedure interface, so simplify LEN in situ
3264 using its character length.
3268 * trans-expr.c (gfc_conv_function_call): Do not use
3269 gfc_conv_expr_reference for actual pointer function with formal
3270 target because a temporary is created that does not transfer
3271 the reference correctly. Do not indirect formal pointer
3272 functions since it is the function reference that is needed.
3274 2007-03-24 Brooks Moses <brooks.moses@codesourcery.com>
3276 * gfortran.h: Edit comments on GFC_STD_*.
3278 2007-03-23 Brooks Moses <brooks.moses@codesourcery.com>
3280 * invoke.texi: Misc. small typo fixes.
3281 (-Wcharacter-truncation): Add.
3282 (-Wnonstd-intrinsics): Correct spelling.
3284 (-fintrinsic-modules-path): Add.
3286 2007-03-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3289 * arith.c (complex_pow): Rewrite to handle large power.
3290 (gfc_arith_power): Handle large power in the real and integer
3293 2007-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3296 * trans-const.c (gfc_conv_mpz_to_tree): Allow integer constants
3297 larger than twice the width of a HOST_WIDE_INT.
3299 2006-03-22 Paul Thomas <pault@gcc.gnu.org>
3302 * trans-intrinsic.c (gfc_size_in_bytes): Remove function.
3303 (gfc_conv_intrinsic_array_transfer): Remove calls to previous.
3304 Explicitly extract TREE_TYPEs for source and mold. Use these
3305 to calculate length of source and mold, except for characters,
3306 where the se string_length is used. For mold, the TREE_TYPE is
3307 recalculated using gfc_get_character_type_len so that the
3308 result is correctly cast for character literals and substrings.
3309 Do not use gfc_typenode_for_spec for the final cast.
3311 2007-03-22 Tobias Schlüter <tobi@gcc.gnu.org>
3314 * decl.c (gfc_match_derived_decl): Reliably reject
3315 'doubleprecision' and 'doublecomplex' as type names.
3317 2007-03-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3320 * trans-expr.c (gfc_trans_init_string_length): Length should
3322 (gfc_conv_function_call): Likewise.
3324 2007-03-18 Paul Thomas <pault@gcc.gnu.org>
3328 * symbo.c : Add gfc_derived_types.
3329 (gfc_free_dt_list): Free derived type list gfc_derived_types.
3330 (gfc_free_namespace): Remove call to gfc_free_dt_list.
3331 (gfc_symbol_done_2): Call gfc_free_dt_list.
3332 * gfortran.h : Declare gfc_derived_types to be external. Remove
3333 derived types field from gfc_namespace.
3334 * resolve.c (resolve_fl_derived): Refer to gfc_derived types
3335 rather than namespace derived_types.
3336 (resolve_fntype): Remove special treatment for module
3337 derived type functions.
3338 * trans-types.c (gfc_get_derived_type): Remove search for like
3339 derived types. Finish by copying back end declaration to like
3340 derived types in the derived type list gfc_derived_types.
3342 2007-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3345 * trans-expr.c (gfc_conv_powi): Make n argument unsigned hwi.
3346 (gfc_conv_cst_int_power): Handle integer exponent with care,
3347 since it might be too large for us.
3349 2007-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3352 * invoke.texi: Fix typo.
3354 2007-03-16 Tobias Burnus <burnus@net-b.de>
3356 * trans-decl.c (gfc_generate_function_code): Use all arguments of
3359 2007-03-15 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3361 * gfortran.h (gfc_option_t): Add flag_backtrace field.
3362 * lang.opt: Add -fbacktrace option.
3363 * invoke.texi: Document the new option.
3364 * trans-decl.c (gfc_build_builtin_function_decls): Add new
3365 option to the call to set_std.
3366 * options.c (gfc_init_options, gfc_handle_option): Handle the
3369 2007-03-15 Tobias Burnus <burnus@gcc.gnu.org>
3370 Paul Thomas <pault@gcc.gnu.org>
3373 * decl.c (gfc_match_import): If the parent of the current name-
3374 space is null, try looking for an imported symbol in the parent
3375 of the proc_name interface.
3376 * resolve.c (resolve_fl_variable): Do not check for blocking of
3377 host association by a same symbol, if the symbol is in an
3380 2007-03-15 Paul Thomas <pault@gcc.gnu.org>
3383 * decl.c (match_data_constant): Before going on to try to match
3384 a name, try to match a structure component.
3388 * resolve.c (resolve_actual_arglist): Do not reject a generic
3389 actual argument if it has a same name specific interface.
3392 * trans-array.c (parse_interface): Do not nullify allocatable
3393 components if the symbol has the saved attribute.
3395 2007-03-14 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3397 * trans-array.c (gfc_trans_auto_array_allocation): Replace
3398 fold(convert()) by fold_convert().
3399 (gfc_duplicate_allocatable): Likewise.
3400 * trans-intrinsic.c (gfc_conv_intrinsic_dot_product): Use
3401 build_int_cst instead of converting an integer_zero_node
3404 2007-03-14 Jakub Jelinek <jakub@redhat.com>
3406 * module.c (mio_typespec): Don't look at ts->cl if not BT_CHARACTER.
3408 2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
3413 * intrinsics.texi (CHDIR): Fix argument names, note
3414 that STATUS must be a default integer.
3415 (CTIME): Fix argument names, note that RESULT must
3416 be a default integer.
3417 (EXIT): Note that STATUS must be a default integer.
3419 2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
3422 * intrinsic.texi: General whitespace cleanup, remove
3423 comment about missing intrinsics.
3424 (menu): Add lines for new entries listed below.
3425 (ACOSH): Mention specific function DACOSH, correct
3426 description phrasing.
3427 (ASINH): Mention specific function DASINH, correct
3428 description phrasing.
3429 (ATANH): Mention specific function DATANH, correct
3430 description phrasing.
3431 (COS): Add index entry for CCOS.
3432 (CPU_TIME): Correct "REAL" to "REAL(*)".
3433 (EXP): Add index entry for CEXP.
3434 (INT): Correct argument name to "A".
3438 (MAX): Add index entries for specific variants.
3439 (MCLOCK): New entry.
3440 (MCLOCK8): New entry.
3441 (SECNDS): Adjust to a more standard form.
3442 (SECOND): New entry.
3443 (TIME): Add cross-reference to MCLOCK.
3444 (TIME8): Add cross-reference to MCLOCK8.
3446 2007-03-11 Paul Thomas <pault@gcc.gnu.org>
3449 * parse.c (parse_interface): Use the default types from the
3450 formal namespace if a function or its result do not have a type
3451 after parsing the specification statements.
3453 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
3455 * intrinsic.texi: (ICHAR) Improve internal I/O note.
3456 (ACHAR): Reference it.
3457 (CHAR): Reference it.
3458 (IACHAR): Reference it.
3460 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
3462 * intrinsic.texi: (LINK) Document function form.
3468 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
3470 * intrinsic.texi: minor typo fixes, removed prologue.
3471 (FSEEK): moved to correct place in alphabetical order.
3473 2007-03-08 Daniel Franke <franke.daniel@gmail.com>
3476 * check.c (gfc_check_alarm_sub): Added check for default integer
3477 kind of status argument.
3478 * iresolve.c (gfc_resolve_alarm_sub): Removed conversion of
3480 * intrinsic.texi (ALARM): Extended documentation.
3482 2007-03-08 Daniel Franke <franke.daniel@gmail.com>
3484 * intrinsic.texi (GERROR, ISATTY, TTYNAM): New.
3485 (ABORT, FLUSH, FNUM, IRAND, MALLOC, SIGNAL, SRAND): Fixed typo.
3486 * intrinsic.c (add_subroutines): Adjusted dummy argument names
3487 of GERROR and TTYNAM.
3489 2007-07-08 Tobias Burnus <burnus@net-b.de>
3491 * module.c (gfc_match_use): Support renaming of operators
3493 * gfortran.texi (Fortran 2003 Status): Document support of
3494 renaming of operators.
3496 2007-07-08 Tobias Burnus <burnus@net-b.de>
3499 * module.c (read_module): Always import module name as symbol.
3500 (gfc_match_use): Disallow module name in the only clause of
3503 2007-03-08 Paul Thomas <pault@gcc.gnu.org>
3506 * expr.c (find_array_section): Correct arithmetic for section
3509 2007-03-07 Brooks Moses <brooks.moses@codesourcery.com>
3511 * iresolve.c (gfc_resolve_ishftc): Correct s_kind value.
3513 2007-03-06 Daniel Franke <franke.daniel@gmail.com>
3515 PR documentation/30950
3516 * intrinsic.texi (AND, CPU_TIME): Fix dummy argument names.
3517 (FREE): Fix call syntax.
3519 2007-03-06 Brooks Moses <brooks.moses@codesourcery.com>
3521 * intrinsic.texi: Limit column widths to a total of .85.
3523 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
3525 * gfortran.texi (GFortran and G77): Rewrite completely.
3527 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
3529 * match.c (gfc_match_name): Expanded comment.
3531 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
3533 * gfortran.texi (Old-style kind specifications): Document
3534 special handling of old-style kind specifiers for COMPLEX.
3535 * decl.c (gfc_match_old_kind_spec): Document kind/bytesize
3536 assumptions for COMPLEX in comment.
3538 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
3541 * gfortranspec.c (lang_specific_driver): Update program
3542 name and copyright date.
3544 2007-03-03 Paul Thomas <pault@gcc.gnu.org>
3547 * check.c (dim_rank_check): The shape of subsections of
3548 assumed-size arrays is known.
3550 2007-03-02 Paul Thomas <pault@gcc.gnu.org>
3551 Tobias Burnus <burnus@net-b.de>
3554 * decl.c (gfc_match_entry): Remove erroneous entry result check.
3556 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
3558 * Make-lang.in: Add install-pdf target as copied from
3559 automake v1.10 rules.
3561 2007-03-01 Tobias Burnus <burnus@net-b.de>
3564 * trans-intrinsic.c (gfc_conv_intrinsic_size): Compare pointers.
3566 2007-02-28 Tobias Burnus <burnus@net-b.de>
3567 Paul Thomas <pault@gcc.gnu.org>
3571 * resolve.c (resolve_actual_arglist): Allow by-value
3572 arguments and non-default-kind for %VAL().
3573 * trans-expr.c (conv_arglist_function): Allow
3574 non-default-kind for %VAL().
3576 2007-02-28 Tobias Burnus <burnus@net-b.de>
3579 * primary.c (next_string_char): Correct reading a character
3580 after the delimiter.
3581 (match_string_constant): Print warning message only once.
3583 2007-02-27 Richard Guenther <rguenther@suse.de>
3585 * trans-array.c (structure_alloc_comps): Use correct type
3586 for null pointer constant.
3588 2007-02-26 Brooks Moses <brooks.moses@codesourcery.com>
3590 * gfortran.texi: Standardize title page, remove version number
3591 from copyright page.
3593 2007-02-26 Thomas Koenig <Thomas.Koenig@online.de>
3594 Paul Thomas <pault@gcc.gnu.org>
3597 * trans-intrinsic.c (gfc_conv_intrinsic_size):
3598 If dim is an optional argument, check for its
3599 presence and call size0 or size1, respectively.
3601 2007-02-23 Paul Thomas <pault@gcc.gnu.org>
3604 * resolve.c (has_default_initializer): New function.
3605 (resolve_fl_variable): Call has_default_initializer to determine if
3606 the derived type has a default initializer to its ultimate
3610 2007-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3612 * options.c (set_default_std_flags): New function to consolidate
3614 (gfc_init_options): Use new function.
3615 (gfc_handle_option): Use new function.
3617 2007-02-22 Brooks Moses <brooks.moses@codesourcery.com>
3619 * gfortran.texi (Old-style kind specifications): Document
3620 special handling of old-style kind specifiers for COMPLEX.
3621 * decl.c (gfc_match_old_kind_spec): Documented kind/bytesize
3622 assumptions in comment.
3624 2007-02-21 Bernhard Fischer <aldot@gcc.gnu.org>
3626 * parse.c (next_free): Gooble spaces after OpenMP sentinel.
3628 2007-02-20 Thomas Koenig <Thomas.Koenig@online.de>
3631 * match.c (gfc_match_iterator): Remove conflict between
3632 loop variable and pointer.
3634 2007-02-20 Tobias Burnus <burnus@net-b.de>
3637 * symbol.c (gfc_add_volatile): Allow to set VOLATILE
3638 attribute for host-associated variables.
3639 * gfortran.h (symbol_attribute): Save namespace
3640 where VOLATILE has been set.
3641 * trans-decl.c (gfc_finish_var_decl): Move variable
3642 declaration to the top.
3644 2007-02-20 Tobias Burnus <burnus@net-b.de>
3647 * resolve.c (resolve_symbol): Add character dummy VALUE check.
3649 2007-02-19 Thomas Koenig <Thomas.Koenig@online.de>
3652 * fortran/iresolve.c (gfc_resolve_maxloc): Remove coercion of
3653 argument to default integer.
3654 (gfc_resolve_minloc): Likewise.
3656 2007-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3659 * options.c (gfc_init_options): Relax warning level for obsolescent.
3660 * match.c (match_arithmetic_if): Change to obsolescent from deleted.
3661 (gfc_match_if): Same.
3663 2007-02-18 Roger Sayle <roger@eyesopen.com>
3665 * trans-array.c (gfc_build_constant_array_constructor): When the
3666 shape of the constructor is known, use that to construct the
3668 (gfc_trans_constant_array_constructor): Initialize the "info"
3669 information for all of the dimensions of the array constructor.
3670 (constant_array_constructor_loop_size): New function.
3671 (gfc_trans_array_constructor): Use it to determine whether a
3672 loop is suitable for "constant array constructor" optimization.
3674 * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Use fold_build2
3675 instead of build2, to avoid conditions like "(a != b) != 0".
3677 2007-02-18 Roger Sayle <roger@eyesopen.com>
3678 Paul Thomas <pault@gcc.gnu.org>
3681 * match.c (match_forall_iterator): Use gfc_match_expr instead
3682 of gfc_match_variable to match the iterator variable. Return
3683 MATCH_NO if not a variable. Remove the reset of the symbol's
3686 2007-02-16 Tobias Burnus <burnus@net-b.de>
3689 * trans-decl.c (gfc_generate_function_code): Do not initialize
3690 pointers to derived components.
3692 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
3693 Brooks Moses <brooks.moses@codesourcery.com>
3694 Lee Millward <lee.millward@codesourcery.com>
3696 * trans-expr.c (gfc_conv_power_op): Use build_call_expr.
3697 (gfc_conv_string_tmp): Likewise.
3698 (gfc_conv_concat_op): Likewise.
3699 (gfc_build_compare_string): Likewise.
3700 (gfc_conv_function_call): Use build_call_list instead of build3.
3702 * trans-array.c (gfc_trans_allocate_array_storage): Use
3704 (gfc_grow_array): Likewise.
3705 (gfc_trans_array_ctor_element): Likewise.
3706 (gfc_trans_array_constructor_value): Likewise.
3707 (gfc_array_allocate): Likewise.
3708 (gfc_array_deallocate): Likewise.
3709 (gfc_trans_auto_array_allocation): Likewise.
3710 (gfc_trans_dummy_array_bias): Likewise.
3711 (gfc_conv_array_parameter): Likewise.
3712 (gfc_trans_dealloc_allocated): Likewise.
3713 (gfc_duplicate_allocatable): Likewise.
3715 * trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr.
3716 (gfc_trans_omp_flush): Likewise.
3718 * trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr.
3719 (gfc_trans_pause): Likewise.
3720 (gfc_trans_stop): Likewise.
3721 (gfc_trans_character_select): Likewise.
3722 (gfc_do_allocate): Likewise.
3723 (gfc_trans_assign_need_temp): Likewise.
3724 (gfc_trans_pointer_assign_need_temp): Likewise.
3725 (gfc_trans_forall_1): Likewise.
3726 (gfc_trans_where_2): Likewise.
3727 (gfc_trans_allocate): Likewise.
3728 (gfc_trans_deallocate): Likewise.
3730 * trans.c (gfc_trans_runtime_check): Use build_call_expr.
3732 * trans-io.c (gfc_trans_open): Use build_call_expr.
3733 (gfc_trans_close): Likewise.
3734 (build_filepos): Likewise.
3735 (gfc_trans_inquire): Likewise.
3736 (NML_FIRST_ARG): Delete.
3737 (NML_ADD_ARG): Delete.
3738 (transfer_namelist_element): Use build_call_expr.
3739 (build_dt): Likewise.
3740 (gfc_trans_dt_end): Likewise.
3741 (transfer_expr): Likewise.
3742 (transfer_array-desc): Likewise.
3744 * trans-decl.c (gfc_generate_function_code): Use build_call_expr.
3745 (gfc_generate_constructors): Likewise.
3747 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr.
3748 (gfc_conv_intrinsic_fdate): Likewise.
3749 (gfc_conv_intrinsic_ttynam): Likewise.
3750 (gfc_conv_intrinsic_array_transfer): Likewise.
3751 (gfc_conv_associated): Likewise.
3752 (gfc_conv_intrinsic_si_kind): Likewise.
3753 (gfc_conv_intrinsic_trim): Likewise.
3754 (gfc_conv_intrinsic_repeat: Likewise.
3755 (gfc_conv_intrinsic_iargc): Likewise.
3757 2007-02-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3760 * scanner.c (gfc_next_char_literal): Add check for end of file after
3761 call to advance_line.
3763 2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>
3766 * primary.c (match_logical_constant): Return MATCH_ERROR on invalid
3769 2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>
3771 * misc.c (gfc_typename): Fix potential buffer overflow.
3773 2007-02-13 Paul Thomas <pault@gcc.gnu.org>
3776 * module.c (read_module): Set pointer_info to referenced if the
3777 symbol has no namespace.
3779 2007-02-12 Nick Clifton <nickc@redhat.com>
3781 * lang.opt: Add Warning attribute to warning options.
3783 2007-02-11 Daniel Franke <franke.daniel@gmail.com>
3785 * intrinsic.texi (HOSTNM): Fix typographical error in syntax.
3786 (SLEEP): Added section and documentation.
3788 2007-02-11 Tobias Schlüter <tobi@gcc.gnu.org>
3791 * decl.c (add_init_expr_to_sym): Remove ENUM specific code.
3792 (variable_decl): Likewise. Rewrap comment.
3793 (match_attr_spec): Remove ENUM specific code.
3794 (gfc_match_enum): Fix typo in error message.
3795 (enumerator_decl): New function.
3796 (gfc_match_enumerator_def): Use enumerator_decl instead of
3797 variable_decl. Adapt code accordingly.
3799 2007-02-11 Paul Thomas <pault@gcc.gnu.org>
3802 * module.c (find_symtree_for_symbol): New function to return
3803 a symtree that is not a "unique symtree" given a symbol.
3804 (read_module): Do not automatically set pointer_info to
3805 referenced because this inhibits the generation of a unique
3806 symtree. Recycle the existing symtree if possible by calling
3807 find_symtree_for_symbol.
3810 * decl.c (add_init_expr_to_sym): Make new charlen for an array
3811 constructor initializer.
3813 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
3815 * f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address
3816 and __emutls_register_common.
3817 * openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls.
3818 * trans-common.c (build_common_decl): Don't check have_tls.
3819 * trans-decl.c (gfc_finish_var_decl): Likewise.
3820 * types.def (BT_WORD, BT_FN_PTR_PTR): New.
3821 (BT_FN_VOID_PTR_WORD_WORD_PTR): New.
3823 2007-02-09 Tobias Burnus <burnus@net-b.de>
3826 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc,
3827 gfc_conv_intrinsic_minmaxval): Use HUGE-1 for most negative integer.
3829 2007-02-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3832 * trans-array.c (gfc_trans_create_temp_array): Remove use of the
3833 function argument. Always generate code for negative extent.
3835 * trans-array.h (gfc_trans_create_temp_array): Change prototype.
3836 * trans-expr.c (gfc_conv_function_call): Remove use of last argument
3837 of gfc_trans_create_temp_array.
3838 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Likewise.
3839 * trans-stmt.c (gfc_conv_elemental_dependencies): Likewise.
3841 2007-02-08 Roger Sayle <roger@eyesopen.com>
3843 * trans-stmt.c (gfc_trans_forall_1): Optimize the cases where the
3844 mask expression is a compile-time constant (".true." or ".false.").
3846 2007-02-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3849 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Evaluate
3850 arguments only once. Generate check that NCOPIES argument is not
3853 2007-02-04 Steven G. Kargl <kargl@gcc.gnu.org>
3856 * fortran/invoke.texi: Update documentation.
3857 * fortran/options.c (gfc_post_options): Deal with tabs with -std=f2003
3860 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
3862 * trans-array.c: Fix a comment typo.
3864 2007-02-03 Paul Thomas <pault@gcc.gnu.org>
3867 * array.c (match_array_element_spec): If the length of an array is
3868 negative, adjust the upper limit to make it zero length.
3871 * resolve.c (pure_function, resolve_function): Initialize name to
3872 null to clear up build warnings.
3873 (resolve_fl_variable): Look at components explicitly to check for
3874 default initializer, rather than using gfc_default_initializer.
3876 2007-02-02 Steven G. Kargl <kargl@gcc.gnu.org>
3879 * resolve.c (resolve_generic_f): Check for non-NULL sym.
3881 2007-02-02 Roger Sayle <roger@eyesopen.com>
3883 * trans.c (gfc_build_array_ref): Use STRIP_TYPE_NOPS to eliminate
3884 NON_LVALUE_EXPR nodes and useless type conversions.
3886 2007-02-02 Paul Thomas <pault@gcc.gnu.org>
3890 * trans-expr.c (gfc_conv_aliased_arg): Remove static attribute
3891 from function and make sure that substring lengths are
3893 (is_aliased_array): Remove static attribute.
3894 * trans.c : Add prototypes for gfc_conv_aliased_arg and
3896 * trans-io.c (set_internal_unit): Add the post block to the
3897 arguments of the function. Use is_aliased_array to check if
3898 temporary is needed; if so call gfc_conv_aliased_arg.
3899 (build_dt): Pass the post block to set_internal_unit and
3900 add to the block after all io activiy is done.
3902 2007-02-01 Roger Sayle <roger@eyesopen.com>
3904 * trans-array.c (gfc_conv_expr_descriptor): We don't need to use
3905 a temporary array to pass a constant non-character array constructor.
3906 Generalize the descriptor generation code to handle scalarizer
3907 "info" without an array reference.
3909 2007-02-01 Roger Sayle <roger@eyesopen.com>
3911 * dependency.c (gfc_check_dependency) <EXPR_ARRAY>: Implement
3912 dependency checking for array constructors.
3914 2007-02-01 Roger Sayle <roger@eyesopen.com>
3916 * trans-stmt.c (compute_overall_iter_number): Document function
3917 arguments. Generalize "unconditional forall nest with constant
3918 bounds" optimization to eliminate unconditional inner loops with
3921 2007-01-31 Tobias Burnus <burnus@net-b.de>
3924 * interface.c (compare_actual_formal): Check conformance between
3925 actual and VOLATILE dummy arguments.
3926 * symbol.c (gfc_add_volatile): Allow setting of VOLATILE
3927 multiple times in different scopes.
3928 * decl.c (gfc_match_volatile): Search symbol in host association.
3930 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
3932 * simplify.c, trans-array.c: Fix comment typos.
3934 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3936 * invoke.texi (Code Gen Options): Fix abbreviation typo.
3937 * intrinsic.texi (ACCESS, LSHIFT, RSHIFT): Fix typos.
3939 2007-01-30 Steve Ellcey <sje@cup.hp.com>
3942 * trans-types.c (gfc_get_function_type): Do not add void_type_node
3944 * trans-decl.c (create_function_arglist): Change assert.
3946 2007-01-29 Paul Thomas <pault@gcc.gnu.org>
3949 * module.c (read_module): If a symbol is excluded by an ONLY
3950 clause, check to see if there is a symtree already loaded. If
3951 so, attach the symtree to the pointer_info.
3953 2007-01-28 Thomas Koenig <Thomas.Koenig@online.de>
3956 * gfortran.h: Remove gfc_simplify_init_1.
3957 * arith.h: Remove third argument from gfc_compare_string.
3958 * arith.c (gfc_compare_expression): Remove third argument
3959 from call to gfc_compare_string.
3960 (gfc_compare_string): Remove third argument xcoll_table.
3961 Remove use of xcoll_table.
3962 * misc.c (gfc_init_1): Remove call to gfc_simplify_init_1.
3963 * simplify.c (ascii_table): Remove.
3964 (xascii_table): Likewise.
3965 (gfc_simplify_achar): ICE if extract_int fails. Remove use of
3966 ascii_table. Warn if -Wsurprising and value < 0 or > 127.
3967 (gfc_simplify_char): ICE if extract_int fails. Error if
3968 value < 0 or value > 255.
3969 (gfc_simplify_iachar): Remove use of xascii_table.
3970 Char values outside of 0..255 are an ICE.
3971 (gfc_simplify_lge): Remove use of xascii_table.
3972 (gfc_simplify_lgt): Likewise.
3973 (gfc_simplify_lle): Likewise.
3974 (gfc_simplify_llt): Likewise.
3975 (invert_table): Remove.
3976 (gfc_simplify_init_1): Remove.
3978 2007-01-27 Roger Sayle <roger@eyesopen.com>
3980 * trans-stmt.c (forall_info): Replace the next_nest and outer
3981 fields that previously implemented a doubly-linked list with a
3982 single prev_nest field (singly-linked list).
3983 (gfc_trans_nested_forall_loop): The nested_forall_info argument
3984 now denotes the innermost FORALL in the loop nest.
3985 (compute_overall_iter_number): Use prev_nest instead of next_nest.
3986 (gfc_trans_forall_1): Link/cons the new "info" to the head of the
3987 nested_forall_info linked list. Free the current "info" when done.
3989 2007-01-27 Paul Thomas <pault@gcc.gnu.org>
3992 * trans-expr.c (gfc_conv_operator_assign): New function.
3993 * trans.h : Add prototype for gfc_conv_operator_assign.
3994 * trans-stmt.c (gfc_trans_where_assign): Add a gfc_symbol for
3995 a potential operator assignment subroutine. If it is non-NULL
3996 call gfc_conv_operator_assign instead of the first assignment.
3997 ( gfc_trans_where_2): In the case of an operator assignment,
3998 extract the argument expressions from the code for the
3999 subroutine call and pass the symbol to gfc_trans_where_assign.
4000 resolve.c (resolve_where, gfc_resolve_where_code_in_forall,
4001 gfc_resolve_forall_body): Resolve the subroutine call for
4002 operator assignments.
4004 2007-01-26 Steven Bosscher <stevenb.gcc@gmail.com>
4005 Steven G. Kargl <kargl@gcc.gnu.org>
4008 * fortran/io.c (next_char): Deal with backslash escaped characters.
4009 Issue warnings in non -std=gnu cases.
4010 * fortran/primary.c (next_string_char): Issue warnings in non
4012 2007-01-26 Tobias Burnus <burnus@net-b.de>
4014 * lang-specs.h: Add support for .f03 and .F03 extensions.
4015 * gfortran.texi: Document .f03 extension.
4016 * options.c (form_from_filename): Recognize .f03.
4018 2007-01-25 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4021 * lang.opt (Wall): Remove RejectNegative.
4022 * options.c (gfc_handle_option): Wall can be disabled.
4023 (set_Wall): Add a parameter for disabling Wall.
4025 2007-01-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4028 * scanner.c (load_line): Remove check fot ctrl-z and don't gobble.
4030 2007-01-23 Paul Thomas <pault@gcc.gnu.org>
4033 * match.c (gfc_match_namelist): Add check for assumed size character
4034 in namelist and provide error if found.
4036 2007-01-21 Brooks Moses <brooks.moses@codesourcery.com>
4038 * intrinsic.texi (ACHAR): Added cross-references.
4039 (CHAR): Put cross-references in alphabetical order.
4040 (IACHAR): Added cross-references.
4041 (ICHAR): Added cross-references.
4043 2007-01-20 Brooks Moses <brooks.moses@codesourcery.com>
4045 * intrinsic.texi: Edited all "Syntax" examples to a consistent form.
4046 (MAXVAL): Corrected description of result characteristics.
4048 (UMASK): Added documentation.
4050 2007-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
4052 * openmp.c, matchexp.c, module.c, scanner.c, resolve.c, st.c,
4053 parse.c, primary.c, options.c, misc.c, simplify.c: Next installment
4054 in the massive whitespace patch.
4056 2007-01-20 Roger Sayle <roger@eyesopen.com>
4058 * module.c (mio_array_ref): The dimen_type fields of an array ref
4059 are an enumerated type and can't be read/written directly with a
4060 call to mio_integer. Instead loop over and cast each element.
4062 2007-01-20 Roger Sayle <roger@eyesopen.com>
4064 * dependency.c (gfc_full_array_ref_p): Check that ref->next is NULL,
4065 i.e. that the ARRAY_REF doesn't mention components.
4066 * trans-array.c (gfc_constant_array_constructor_p): Export external
4067 function renamed from constant_array_constructor_p.
4068 (gfc_build_constant_array_constructor): Export.
4069 (gfc_trans_array_constructor): Update call to the renamed function
4070 constant_array_constructor_p.
4071 * trans-array.h (gfc_constant_array_constructor_p): Prototype here.
4072 (gfc_build_constant_array_constructor): Likewise.
4073 * trans-expr.c (gfc_build_memcpy_call): New helper function split
4074 out from gfc_trans_array_copy.
4075 (gfc_trans_array_copy): Use gfc_build_memcpy_call.
4076 (gfc_trans_array_constructor_copy): New function to optimize
4077 assigning an entire array from a constant array constructor.
4078 (gfc_trans_assignment): Call gfc_trans_array_constructor_copy
4081 2007-01-20 Roger Sayle <roger@eyesopen.com>
4083 * trans-intrinsic.c (gfc_conv_intrinsic_sign): New branchless
4084 implementation for the SIGN intrinsic with integral operands.
4085 (gfc_conv_intrinsic_minmax): Fix whitespace.
4087 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4089 * gfortran.h (gfc_options_t): Add flag_allow_leading_underscore.
4090 * lang.opt: Add -fallow-leading-underscore.
4091 * match.c (gfc_match_name): Allow leading underscore in symbol
4092 name if -fallow-leading-underscore is used.
4093 * symbol.c (gfc_get_default_type): Add special case for symbol
4094 names beginning with an underscore.
4095 * trans-decl.c (gfc_get_extern_function_decl,
4096 gfc_build_intrinsic_function_decls): Add _gfortran prefix to
4097 library symbols selected_int_kind, selected_real_kind and
4099 * options.c (gfc_init_options, gfc_handle_option): Handle the
4100 new -fallow-leading-underscore option.
4102 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4105 * options.c (gfc_handle_module_path_options): Path used in -J
4106 option is now added to the module search path.
4108 2007-01-20 Richard Guenther <rguenther@suse.de>
4111 * f95-lang.c (gfc_init_builtin_functions): Provide cbrt and
4112 cexpi builtins if we have TARGET_C99_FUNCTIONS. Provide
4113 sincos builtins if the target has sincos.
4115 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
4117 * intrinsic.texi (MATMUL): Corrected a typo.
4118 (MAX): Separated @var arguments.
4119 (MIN): Separated @var arguments.
4121 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
4123 * intrinsic.texi: general whitespace cleanup.
4124 (menu): Added TIME8, removed UNMASK.
4125 (AINT): Clarified argument requirement.
4126 (ANINT): Clarified argument requirement.
4127 (CEILING): Clarified argument requirement.
4128 (CHAR): Clarified argument requirement.
4129 (CMPLX): Clarified argument requirement.
4130 (DCMPLX): Clarified argument requirement.
4131 (FGET): Line rewrapping.
4132 (FLOOR): Clarified argument requirement.
4133 (GMTIME): Added documentation.
4134 (IAND): Added cross-reference.
4135 (IBCLR): Added cross-reference.
4136 (IBSET): Added cross-reference.
4137 (IEOR): Added cross-reference.
4138 (INT): Collapsed examples, clarified argument requirement.
4139 (IOR): Added cross-references.
4140 (LEN_TRIM): Corrected result kind.
4141 (LINK): Added cross-reference.
4142 (LLT): Removed "documentation pending".
4143 (LOGICAL): Added documentation.
4144 (LSHIFT): Added documentation.
4145 (LTIME): Added documentation.
4146 (MATMUL): Added documentation.
4147 (MAX): Added documentation.
4148 (MAXLOC): Added documentation.
4149 (MAXVAL): Added documentation.
4150 (MERGE): Added documentation.
4151 (MIN): Added documentation.
4152 (MINLOC): Added documentation.
4153 (MINVAL): Added documentation.
4154 (MVBITS): Moved to correct place, added documentation.
4155 (NOT): Added documentation.
4156 (PERROR): Added documentation.
4157 (RAN): Moved to correct place, added documentation.
4158 (REAL): Clarified argument requirement.
4159 (RENAME): Added documentation.
4160 (RSHIFT): Clarified argument requirement.
4161 (SIGN): Corrected table specification.
4162 (SYMLNK): Added documentation.
4163 (SYSTEM): Added documentation.
4164 (TIME): Added documentation.
4165 (TIME8): Added section and documentation.
4166 (UNMASK): Removed erroneous section.
4168 2007-01-18 H.J. Lu <hongjiu.lu@intel.com>
4170 * trans-stmt.c (compute_overall_iter_number): Fix a typo.
4172 2007-01-18 Roger Sayle <roger@eyesopen.com>
4174 * trans-expr.c (copyable_array_p): Consider user derived types without
4175 allocatable components to be copyable.
4177 2007-01-18 Roger Sayle <roger@eyesopen.com>
4179 * trans-stmt.c (compute_overall_iter_number): Enhance to precompute
4180 the number of interations in unconditional FORALL nests with constant
4183 2007-01-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4184 Tobias Burnus <burnus@net-b.de>
4187 * gfortran.h (gfc_option_t): Add flag_dump_core.
4188 * lang.opt: Add -fdump-core option.
4189 * invoke.texi: Document the new options.
4190 * trans-decl.c (gfc_build_builtin_function_decls): Add new
4191 options to the call to set_std.
4192 * options.c (gfc_init_options, gfc_handle_option): Set the
4195 2007-01-17 Paul Thomas <pault@gcc.gnu.org>
4198 * module.c (load_generic_interfaces): Make the marking of the
4199 symbol as ambiguous conditional on the module names being
4201 (write_generic): Ensure that the generic interface has a
4202 non-NULL module field.
4204 2007-01-16 Roger Sayle <roger@eyesopen.com>
4207 * trans-stmt.c (forall_info): Remove pmask field.
4208 (gfc_trans_forall_loop): Remove NVAR argument, instead assume that
4209 NVAR covers all the interation variables in the current forall_info.
4210 Add an extra OUTER parameter, which specified the loop header in
4211 which to place mask index initializations.
4212 (gfc_trans_nested_forall_loop): Remove NEST_FLAG argument.
4213 Change the semantics of MASK_FLAG to only control the mask in the
4215 (compute_overall_iter_number): Optimize the trivial case of a
4216 top-level loop having a constant number of iterations. Update
4217 call to gfc_trans_nested_forall_loop. Calculate the number of
4218 times the inner loop will be executed, not to size of the
4220 (allocate_temp_for_forall_nest_1): Reuse SIZE as BYTESIZE when
4221 sizeof(type) == 1. Tidy up.
4222 (gfc_trans_assign_need_temp): Remove NEST_FLAG argument from calls
4223 to gfc_trans_nested_forall_loop.
4224 (gfc_trans_pointer_assign_need_temp): Likewise.
4225 (gfc_trans_forall_1): Remove unused BYTESIZE, TMPVAR, SIZEVAR and
4226 LENVAR local variables. Split mask allocation into a separate
4227 hunk/pass from mask population. Use allocate_temp_for_forall_nest
4228 to allocate the FORALL mask with the correct size. Update calls
4229 to gfc_trans_nested_forall_loop.
4230 (gfc_evaluate_where_mask): Update call to
4231 gfc_trans_nested_forall_loop.
4232 (gfc_trans_where_2): Likewise.
4234 2007-01-15 Paul Thomas <pault@gcc.gnu.org>
4237 * trans-stmt.c (gfc_trans_call): If it does not have one, get
4238 a backend_decl for an alternate return.
4241 * resolve.c (pure_function): Statement functions are pure. Note
4242 that this will have to recurse to comply fully with F95.
4245 * resolve.c (resolve_function): Only a reference to the final
4246 dimension of an assumed size array is an error in an inquiry
4250 * resolve.c (resolve_function): Make sure that the function
4251 expression has a type.
4253 2007-01-14 Paul Thomas <pault@gcc.gnu.org>
4256 * trans-decl.c (gfc_sym_mangled_function_id): Module, external
4257 symbols must not have the module name prepended.
4259 2007-01-11 Thomas Koenig <Thomas.Koenig@online.de>
4262 * iresolve.c (gfc_resolve_maxloc): If the rank
4263 of the return array is nonzero and we process an
4264 integer array smaller than default kind, coerce
4265 the array to default integer.
4266 * iresolve.c (gfc_resolve_minloc): Likewise.
4268 2007-01-11 Brooks Moses <brooks.moses@codesourcery.com>
4270 * simplify.c: Update copyright to 2007.
4273 2007-01-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4276 * scanner.c (gfc_release_include_path): Free gfc_option.module_dir
4279 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
4281 * simplify.c (gfc_simplify_ibclr): Fix POS comparison.
4282 (gfc_simplify_ibset): Same.
4284 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
4288 * simplify.c (convert_mpz_to_unsigned): New function.
4289 (convert_mpz_to_signed): New function, largely based on
4291 (twos_complement): Removed.
4292 (gfc_simplify_ibclr): Add conversions to and from an
4293 unsigned representation before bit-twiddling.
4294 (gfc_simplify_ibset): Same.
4295 (gfc_simplify_ishftc): Add checks for overly large
4296 constant arguments, only check the third argument if
4297 it's present, carry over high bits into the result as
4298 appropriate, and perform the final conversion back to
4299 a signed representation using the correct sign bit.
4300 (gfc_simplify_not): Removed unnecessary masking.
4302 2007-01-09 Paul Thomas <pault@gcc.gnu.org>
4305 * resolve.c (resolve_code): Use the code->expr character length
4306 directly to set length of llen.
4308 2007-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4311 * lang.opt: Add Wcharacter_truncation option.
4312 * options.c (gfc_init_options): Initialize
4313 gfc_option.warn_character_truncation to zero.
4314 (gfc_handle_option): Add case for OPT_Wcharacter_truncation.
4316 2007-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
4318 * interface.c, intrinsic.c, gfortranspec.c, io.c, f95-lang.c,
4319 iresolve.c, match.c: Update Copyright years. Whitespace.
4321 2007-01-08 Richard Guenther <rguenther@suse.de>
4323 * trans-io.c (transfer_array_desc): Use build_int_cst instead
4326 2007-01-08 Roger Sayle <roger@eyesopen.com>
4328 * trans-array.c (constant_array_constructor_p): New function to
4329 determine whether an array constructor consists only of constant
4330 elements, and if so return it's size.
4331 (gfc_build_constant_array_constructor): Construct a statically
4332 initialized gfortran array for a given EXPR_ARRAY.
4333 (gfc_trans_constant_array_constructor): Efficiently scalarize
4334 a constant array constructor.
4335 (gfc_trans_array_constructor): Tidy up use of CONST_STRING.
4336 Special case scalarization of constant array constructors, all of
4337 whose elements are specified, using constant_array_constructor_p
4338 and gfc_trans_constant_array_constructor.
4339 (gfc_conv_scalarized_array_ref): Check whetger info->offset is zero
4340 before adding it to index, to avoid creating a NON_LVALUE_EXPR.
4342 2007-01-08 Kazu Hirata <kazu@codesourcery.com>
4344 gfortran.texi: Fix typos.
4346 2007-01-07 Steven G. Kargl <kargl@gcc.gnu.org>
4348 * decl.c, dump-parse-tree.c, error.c, data.c, expr.c, dependency.c,
4349 convert.c: Update Copyright dates. Fix whitespace.
4351 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
4353 * data.c (gfc_assign_data_value): Fix whitespace.
4355 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
4357 * trans-array.c (gfc_trans_create_temp_array, gfc_array_init_size):
4358 Commentary typo fix.
4360 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
4363 * match.c (gfc_match_name): Print diagnostics for invalid
4366 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
4368 * array.c: Fix whitespace in comment table.
4370 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
4372 * array.c, bbt.c, check.c: Update copyright years. Whitespace.
4374 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
4376 * arith.c: Update copyright years. Whitespace.
4378 2007-01-05 Roger Sayle <roger@eyesopen.com>
4380 * trans-expr.c (gfc_trans_assignment_1): New subroutine to scalarize
4381 array assignments split out from gfc_trans_assignment.
4382 (gfc_trans_array_copy): New function to implement array to array
4383 copies via calls to __builtin_memcpy.
4384 (copyable_array_p): New helper function to identify an array of
4385 simple/POD types, that may be copied/assigned using memcpy.
4386 (gfc_trans_assignment): Use gfc_trans_array_copy to handle simple
4387 whole array assignments considered suitable by copyable_array_p.
4388 Invoke gfc_trans_assignment_1 to perform the fallback scalarization.
4390 2007-01-05 Roger Sayle <roger@eyesopen.com>
4392 * trans-array.c (gfc_trans_array_constructor_value): Make the
4393 static const "data" array as TREE_READONLY.
4394 * trans-stmt.c (gfc_trans_character_select): Likewise.
4396 2007-01-05 Roger Sayle <roger@eyesopen.com>
4398 * trans-array.c (gfc_conv_loop_setup): Test whether the loop
4399 stride is one, to avoid fold_build2 introducing a useless
4400 NON_LVALUE_EXPR node.
4402 2007-01-05 Tobias Burnus <burnus@net-b.de>
4404 * symbol.c (check_conflict): Fix error message.
4406 2007-01-05 Paul Thomas <pault@gcc.gnu.org>
4409 * decl.c (gfc_in_match_data, gfc_set_in_match_data): New
4410 functions to signal that a DATA statement is being matched.
4411 (gfc_match_data): Call gfc_set_in_match_data on entry and on
4413 * gfortran.h : Add prototypes for above.
4414 * expr.c (check_init_expr): Avoid check on parameter or
4415 variable if gfc_in_match_data is true.
4416 (gfc_match_init_expr): Do not call error on non-reduction of
4417 expression if gfc_in_match_data is true.
4421 * decl.c (gfc_set_constant_character_len): Add boolean arg to
4422 flag array constructor resolution. Warn if string is being
4423 truncated. Standard dependent error if string is padded. Set
4424 new arg to false for all three calls to
4425 gfc_set_constant_character_len.
4426 * match.h : Add boolean arg to prototype for
4427 gfc_set_constant_character_len.
4428 * gfortran.h : Add warn_character_truncation to gfc_options.
4429 * options.c (set_Wall): Set warn_character_truncation if -Wall
4431 * resolve.c (resolve_code): Warn if rhs string in character
4432 assignment has to be truncated.
4433 * array.c (gfc_resolve_character_array_constructor): Set new
4434 argument to true for call to gfc_set_constant_character_len.
4436 2007-01-05 Tobias Burnus <burnus@net-b.de>
4439 * interface.c (compare_parameter_intent): New function.
4440 (check_intents): Support pointer intents.
4441 * symbol.c (check_conflict): Support pointer intents,
4442 better conflict_std message.
4443 * expr.c (gfc_check_assign,gfc_check_pointer_assign):
4444 Support pointer intents.
4445 * resolve.c (resolve_deallocate_expr,resolve_allocate_expr):
4446 Support pointer intents.
4448 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4451 * check.c (gfc_check_kill_sub): Add checks for non-scalar
4454 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
4456 * intrinsic.texi: Minor cleanup, reflowing overlong
4457 paragraphs, and correcting whitespace.
4459 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
4461 * intrinsic.texi (LBOUND): Add documentation.
4462 (LGE): Add documentation.
4463 (LGT): Add documentation.
4464 (LINK): Add documentation.
4465 (LLE): Add documentation.
4466 (LLT): Add documentation.
4467 (LNBLNK): Add documentation.
4468 (UBOUND): Add documentation.
4469 (UNLINK): Add documentation.
4471 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
4473 * intrinsic.texi (IAND): Clarify argument specifications.
4474 (IBCLR): Add documentation.
4475 (IBITS): Add documentation.
4476 (IBSET): Add documentation.
4477 (IEOR): Add documentation.
4478 (IERRNO): Add documentation.
4479 (INDEX): Add documentation.
4480 (IOR): Add documentation.
4481 (ISHFT): Add documentation.
4482 (ISHFTC): Add documentation.
4483 (KILL): Add documentation.
4484 (LEN_TRIM): Add documentation.
4486 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
4489 * interface.c (compare_actual_formal): check for
4490 alternate returns when iterating over non-present
4493 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
4495 * invoke.texi: Update manpage copyright to include 2007.
4497 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
4499 * gfortran.texi: Update copyright to include 2007.
4500 * intrinsic.texi: Update copyright to include 2007.
4501 * invoke.texi: Update copyright to include 2007.
4503 2007-01-02 Tobias Burnus <burnus@net-b.de>
4504 Jakub Jelinek <jakub@redhat.com>
4507 * scanner.c (open_included_file): Revert patch.
4508 (gfc_open_included_file): Support absolute pathnames.
4509 (gfc_open_intrinsic_module): Support absolute pathnames.
4511 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4513 * gfortran.texi (GNU Fortran and GCC): Rewrite
4515 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4517 * gfortran.texi (Introduction): Lower "Part I:
4518 Introduction" to a chapter, renumber Parts II and III to
4520 * intrinsic.texi (Introduction): Rename to "Introduction
4521 to Intrinsics" to avoid conflict with the new chapter.
4523 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4525 * intrinsic.texi (Introduction): Rewrite first paragraph.
4527 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4529 * invoke.texi (OpenMP): Added index entry.
4530 * gfortran.texi (title page): Removed erroneous '*'.
4532 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4534 * gfortran.texi (GFORTRAN_DEFAULT_RECL): Added units
4536 (Extensions): Miscellaneous minor rewriting and copyediting.
4537 (BOZ-literal constants): Renamed from Hexadecimal constants.
4538 (Hollerith constants support): Added explanation and
4539 suggestions for standard-conforming modern equivalents.
4541 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4543 * intrinsic.texi: Improvements to index entries; change
4544 @findex entries to @cindex entries.
4545 * invoke.texi: Standardize and improve index entries.
4546 * gfortran.texi: Fix @code in one index entry.
4548 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4550 * invoke.texi: Change @code-type macros to appropriate
4551 variants (@command, @option, etc.)
4552 * gfortran.texi: Same.
4554 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4556 * intrinsic.texi: Various minor cleanups.
4558 2007-01-02 Steven G. Kargl <kargls@comcast.net>
4560 * trans-intrinsic.c (gfc_conv_intrinsic_ibits): Fix call to
4563 2007-01-02 Tobias Burnus <burnus@net-b.de>
4566 * scanner.c (open_included_file): Support full-path filenames.
4568 2007-01-02 Paul Thomas <pault@gcc.gnu.org>
4571 * interface.c (check_sym_interfaces): Remove call to
4572 resolve_global_procedure.
4573 gfortran.h : Remove prototype for resolve_global_procedure.
4574 resolve.c (resolve_global_procedure): Add static attribute
4575 to function declaration.
4577 2007-01-01 Steven G. Kargl <kargls@comcast.net>
4579 * ChangeLog: Copy to ...
4580 * ChangeLog-2006: here.