1 2007-12-23 Tobias Burnus <burnus@net-b.de>
4 * resolve.c (resolve_entries): Add standard error for functions
5 returning characters with different length.
7 2007-12-23 Daniel Franke <franke.daniel@gmail.com>
10 * matchexp.c (match_ext_mult_operand): Print warning for unary
11 operators following arithmetic ones by default.
12 (match_ext_add_operand): Likewise.
14 2007-12-22 Daniel Franke <franke.daniel@gmail.com>
17 * simplify.c (gfc_simplify_repeat): Added safeguard for empty
20 2007-12-22 Thomas Koenig <tkoenig@gcc.gnu.org>
23 * check.c (gfc_check_cshift): Add check that shift is
26 2007-12-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
29 * iresolve.c (gfc_resolve_cshift): Take optional dim path
30 only if the argument is an optional itself.
31 * iresolve.c (gfc_resolve_eoshift): Same.
33 2007-12-21 Paul Thomas <pault@gcc.gnu.org>
36 * trans-decl.c (gfc_finish_var_decl): Do not mark derived types
37 with default initializers as TREE_STATIC unless they are in the
39 (gfc_get_symbol_decl): Pass derived types with a default
40 initializer to gfc_defer_symbol_init.
41 (init_default_dt): Apply default initializer to a derived type.
42 (init_intent_out_dt): Call init_default_dt.
43 (gfc_trans_deferred_vars): Ditto.
45 * module.c (read_module): Check sym->module is there before
46 using it in a string comparison.
49 2007-12-20 Tobias Burnus <burnus@net-b.de>
52 * gfortran.texi (BOZ): Document behavior for complex
54 * target-memory.h (gfc_convert_boz): Update prototype.
55 * target-memory.c (gfc_convert_boz): Add error check
56 and convert BOZ to smallest possible bit size.
57 * resolve.c (resolve_ordinary_assign): Check return value.
58 * expr.c (gfc_check_assign): Ditto.
59 * simplify.c (simplify_cmplx, gfc_simplify_dble,
60 gfc_simplify_float, gfc_simplify_real): Ditto.
62 2007-12-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
65 * match.h: New function declaration.
66 * match.c (gfc_match_parens): New function to look for mismatched
67 parenthesis. (gfc_match_if): Use new function to catch missing '('.
69 2007-12-19 Daniel Franke <franke.daniel@gmail.com>
72 * expr.c (check_init_expr): Check whether variables with flavor
73 FL_PARAMETER do have a value assigned. Added error messages where
75 * simplify.c (gfc_simplify_transfer): Added check if the MOLD
76 argument is a constant if working with initialization
79 2007-12-17 Tobias Burnus <burnus@net-b.de>
81 * intrinsic.c (add_functions): Undo change; mark float and
83 * intrinsic.texi (FLOAT, SNGL): Change standard to F77 and later.
84 * gfortran.texi (BOZ): Make note about FLOAT etc. clearer.
86 2007-12-16 Tobias Burnus <burnus@net-b.de>
89 * intrinsic.c (add_functions): Mark float and sngl as STD_GNU.
90 (gfc_intrinsic_func_interface): Reject REAL, DBLE and CMPLX
91 in initialization expressions for -std=f95.
93 2007-12-16 Thomas Koenig <tkoenig@gcc.gnu.org>
96 * resolve.c (compare_bound): If either of the types of
97 the arguments isn't INTEGER, return CMP_UNKNOWN.
99 2007-12-16 Tobias Burnus <burnus@net-b.de>
102 * trans-types.c (gfc_init_types): Change build_type_variant
103 to build_qualified_type.
104 (gfc_sym_type): Return gfc_character1_type_node for
105 character-returning bind(C) functions.
106 * trans-expr.c (gfc_conv_function_call): Do not set
107 se->string_length for character-returning bind(c) functions.
108 (gfc_trans_string_copy,gfc_trans_scalar_assign):
109 Support also single characters.
111 2007-12-16 Bernhard Fischer <aldot@gcc.gnu.org>
113 * errors.c (gfc_notify_std): As originally stated but improperly
114 changed, disregard warnings_are_errors for deciding which buffer
117 2007-12-16 Paul Thomas <pault@gcc.gnu.org>
122 * trans-array.c (gfc_trans_array_constructor_value): If the
123 iterator variable does not have a backend_decl, use a local
125 (get_elemental_fcn_charlen): New function to map the character
126 length of an elemental function onto its actual arglist.
127 (gfc_conv_expr_descriptor): Call the above so that the size of
128 the temporary can be evaluated.
129 * trans-expr.c : Include arith.h and change prototype of
130 gfc_apply_interface_mapping_to_expr to return void. Change all
131 references to gfc_apply_interface_mapping_to_expr accordingly.
132 (gfc_free_interface_mapping): Free the 'expr' field.
133 (gfc_add_interface_mapping): Add an argument for the actual
134 argument expression. This is copied to the 'expr' field of the
135 mapping. Only stabilize the backend_decl if the se is present.
136 Copy the character length expression and only add it's backend
137 declaration if se is present. Return without working on the
138 backend declaration for the new symbol if se is not present.
139 (gfc_map_intrinsic_function) : To simplify intrinsics 'len',
140 'size', 'ubound' and 'lbound' and then to map the result.
141 (gfc_map_fcn_formal_to_actual): Performs the formal to actual
142 mapping for the case of a function found in a specification
143 expression in the interface being mapped.
144 (gfc_apply_interface_mapping_to_ref): Remove seen_result and
145 all its references. Remove the inline simplification of LEN
146 and call gfc_map_intrinsic_function instead. Change the
147 order of mapping of the actual arguments and simplifying
148 intrinsic functions. Finally, if a function maps to an
149 actual argument, call gfc_map_fcn_formal_to_actual.
150 (gfc_conv_function_call): Add 'e' to the call to
151 gfc_add_interface_mapping.
152 * dump-parse-tree.c (gfc_show_symbol_n): New function for
154 * gfortran.h : Add prototype for gfc_show_symbol_n.
155 * trans.h : Add 'expr' field to gfc_add_interface_mapping.
156 Add 'expr' to prototype for gfc_show_symbol_n.
157 * resolve.c (resolve_generic_f0): Set specific function as
160 2007-12-14 Tobias Burnus <burnus@net-b.de>
163 * resolve.c (resolve_symbol): Do not emit public-variable-
164 of-private-derived-type error for non-module variables.
166 2007-12-14 Tobias Burnus <burnus@net-b.de>
169 * expr.c (gfc_check_assign): Add range checks for assignments of BOZs.
170 * resolve.c (resolve_ordinary_assign): Ditto.
171 * arith.c (gfc_range_check): Fix return value for complex numbers.
173 2007-12-14 Daniel Franke <franke.daniel@gmail.com>
176 * module.c (parse_atom): Fixed parsing of modules files whose
177 lines are terminated by CRLF.
179 2007-12-13 Anton Korobeynikov <asl@math.spbu.ru>
181 * trans-decl.c (gfc_build_builtin_function_decls): Correct decl
182 construction for select_string() and internal_unpack()
184 2007-12-13 Duncan Sands <baldrick@free.fr>
185 Anton Korobeynikov <asl@math.spbu.ru>
187 * trans-expr.c (gfc_conv_structure): Make sure record constructors
188 for static variables are marked constant.
190 2007-12-12 Tobias Burnus <burnus@net-b.de>
193 * decl.c (match_char_kind): Support use-associated/imported
195 (gfc_match_kind_spec): Support als BT_CHARACTER, when
196 re-scanning kind spec.
198 2007-12-11 Aldy Hernandez <aldyh@redhat.com>
200 * decl.c (add_global_entry): Make type unsigned.
202 2007-12-11 Bernhard Fischer <aldot@gcc.gnu.org>
204 * decl.c (match_prefix): Make seen_type a boolean.
205 (add_global_entry): Cache type distinction.
206 * trans-decl.c: Whitespace cleanup.
208 2007-12-10 Tobias Burnus <burnus@net-b.de>
211 * interface.c (get_expr_storage_size): Use signed integer when
212 obtaining the bounds.
214 2007-12-09 Jakub Jelinek <jakub@redhat.com>
217 * trans.h (struct array_descr_info): Forward declaration.
218 (gfc_get_array_descr_info): New prototype.
219 (enum gfc_array_kind): New type.
220 (struct lang_type): Add akind field.
221 (GFC_TYPE_ARRAY_AKIND): Define.
222 * trans-types.c: Include dwarf2out.h.
223 (gfc_build_array_type): Add akind argument. Adjust
224 gfc_get_array_type_bounds call.
225 (gfc_get_nodesc_array_type): Include proper debug info even for
227 (gfc_get_array_type_bounds): Add akind argument, set
228 GFC_TYPE_ARRAY_AKIND to it.
229 (gfc_sym_type, gfc_get_derived_type): Adjust gfc_build_array_type
231 (gfc_get_array_descr_info): New function.
232 * trans-array.c (gfc_trans_create_temp_array,
233 gfc_conv_expr_descriptor): Adjust gfc_get_array_type_bounds
235 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Likewise.
236 * trans-types.h (gfc_get_array_type_bounds): Adjust prototype.
237 * Make-lang.in (fortran/trans-types.o): Depend on dwarf2out.h.
238 * f95-lang.c (LANG_HOOKS_GET_ARRAY_DESCR_INFO): Define.
240 2007-12-09 Paul Thomas <pault@gcc.gnu.org>
243 * dump-parse-tree.c (gfc_show_expr_n): New function for
245 * gfortran.h : Add prototype for gfc_show_expr_n.
246 * expr.c (simplify_constructor): Copy the constructor
247 expression and try to simplify that. If success, replace the
248 original. Otherwise discard the copy, keep going through
249 the structure and return success.
252 * decl.c (build_struct): Pad out default initializers with
253 spaces to the component character length.
255 2007-12-08 Tobias Burnus <burnus@net-b.de>
261 * gfortran.texi (BOZ literal constants): Improve documentation
262 and adapt for BOZ changes.
263 * Make-lang.ini (resolve.o): Add target-memory.h dependency.
264 * gfortran.h (gfc_expr): Add is_boz flag.
265 * expr.c: Include target-memory.h.
266 (gfc_check_assign): Support transferring BOZ for real/cmlx.
267 * resolve.c: Include target-memory.h
268 (resolve_ordinary_assign): Support transferring BOZ for real/cmlx.
269 * target-memory.c (gfc_convert_boz): New function.
270 * target-memory.c (gfc_convert_boz): Add prototype.
271 * primary.c (match_boz_constant): Set is_boz, enable F95 error
272 also without -pedantic, and allow for Fortran 2003 BOZ.
273 (match_real_constant): Fix comment.
274 * simplify.c (simplify_cmplx,gfc_simplify_dble,gfc_simplify_float,
275 gfc_simplify_real): Support Fortran 2003 BOZ.
277 2007-12-08 Jakub Jelinek <jakub@redhat.com>
280 * gfortran.h (gfc_file): Remove sibling and down fields.
281 * scanner.c (file_changes, file_changes_cur, file_changes_count,
282 file_changes_allocated): New variables.
283 (add_file_change, report_file_change): New functions.
284 (change_file): Remove.
285 (gfc_start_source_files, gfc_end_source_files): Call
286 report_file_change instead of change_file.
287 (gfc_advance_line): Call report_file_change instead of change_file,
288 call it even if lb->file == lb->next->file.
289 (get_file): Revert last changes.
290 (preprocessor_line): Call add_file_change when entering or leaving
292 (load_file): Likewise. Set file_change[...].lb for all newly added
295 2007-12-06 Tobias Burnus <burnus@net-b.de>
298 * primary.c (match_boz_constant): Add gfc_notify_std diagnostics.
300 2007-12-06 Paul Thomas <pault@gcc.gnu.org>
303 * module.c (find_symbol): Do not return symtrees with unique
304 names, which shows that they are private.
306 2007-12-05 Jakub Jelinek <jakub@redhat.com>
309 * gfortran.h (gfc_file): Remove included_by field, add sibling and
311 (gfc_start_source_files, gfc_end_source_files): New prototypes.
312 * parse.c (gfc_parse_file): Call gfc_start_source_files and
313 gfc_end_source_files instead of calling the debugging hooks directly.
314 * error.c (show_locus): Use up field instead of included_by.
315 * scanner.c (change_file, gfc_start_source_files,
316 gfc_end_source_files): New functions.
317 (gfc_advance_line): Call change_file instead of calling debug hooks
319 (get_file): Set up rather than included_by. Initialize down and
321 (preprocessor_line, load_file): Don't set up field here.
323 2007-12-05 Tobias Burnus <burnus@net-b.de>
326 * arith.h (gfc_compare_expr): Add operator argument, needed
328 * arith.c (gfc_arith_init_1): Use mpfr_min instead of mpfr_cmp/set
330 (compare_real): New function, as mpfr_cmp but takes NaN into account.
331 (gfc_compare_expr): Use compare_real.
332 (compare_complex): Take NaN into account.
333 (gfc_arith_eq,gfc_arith_ne,gfc_arith_gt,gfc_arith_ge,gfc_arith_lt,
334 gfc_arith_le): Pass operator to gfc_compare_expr.
335 * resolve.c (compare_cases,resolve_select): Pass operator
337 * simplify.c (simplify_min_max): Take NaN into account.
339 2007-12-04 Tobias Burnus <burnus@net-b.de>
342 * module.c (mio_gmp_real): Properly write NaN and Infinity.
344 2007-12-02 Tobias Burnus <burnus@net-b.de>
347 * symbol.c (generate_isocbinding_symbol): Fix setting string length.
349 2007-11-30 Tobias Burnus <burnus@net-b.de>
352 * match.h: Add bool allow_binding_name to gfc_match_bind_c.
353 * decl.c (match_attr_spec,gfc_match_bind_c_stmt,gfc_match_entry):
355 (gfc_match_bind_c): Add allow_binding_name argument, reject
356 binding name for dummy arguments.
357 (gfc_match_suffix,gfc_match_subroutine): Make use of
360 2007-11-30 Tobias Burnus <burnus@net-b.de>
363 * symbol.c (generate_isocbinding_symbol): Set string length.
364 * dump-parse-tree.c (gfc_show_attr): Show BIND(C) attribute.
365 * misc.c (gfc_basic_typename): Handle BT_VOID.
367 2007-11-29 Steven G. Kargl <kargls@comcast.net>
370 * fortran/arith.c (gfc_check_real_range): Set intermediate values
371 to +-Inf and 0 when -fno-range-check is in effect.
372 * fortran/invoke.texi: Improve -fno-range-check description.
375 * fortran/invoke.texi: Document the C escaped characters activated
378 2007-11-29 Tobias Burnus <burnus@net-b.de>
381 * trans-decl.c (generate_dependency_declarations): Check
382 for NULL pointers before accessing the string length.
384 2007-11-29 Tobias Burnus <burnus@net-b.de>
387 * intrinsic.c (gfc_get_intrinsic_sub_symbol): Add comment.
388 (gfc_intrinsic_sub_interface): Copy elemental state if needed.
389 * iresolve.c (gfc_resolve_mvbits): Mark procedure as elemental.
391 2007-11-28 Jakub Jelinek <jakub@redhat.com>
393 * trans-expr.c (gfc_trans_string_copy): Convert both dest and
397 * trans-openmp.c (gfc_omp_privatize_by_reference): For REFERENCE_TYPE
398 pass by reference only PARM_DECLs or non-artificial decls.
400 2007-11-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
403 * decl.c (match_data_constant): Use gfc_match_init_expr to match the
404 array spec and set the initializer expression.
406 2007-11-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
409 * match.c (gfc_match_common): Add additional check for BLOCK DATA.
411 2007-11-27 Paul Thomas <pault@gcc.gnu.org>
414 *resolve.c (resolve_ordinary_assign): Use find_sym_in_expr to
415 test if a temporary should be written for a vector subscript
419 * restore.c (pure_stmt_function): Add prototype and new
420 function. Calls impure_stmt_fcn.
421 (pure_function): Call it.
422 (impure_stmt_fcn): New function.
424 * expr.c (gfc_traverse_expr): Call *func for all expression
425 types, not just variables. Add traversal of character lengths,
426 iterators and component character lengths and arrayspecs.
427 (expr_set_symbols_referenced): Return false if not a variable.
428 * trans-stmt.c (forall_replace, forall_restore): Ditto.
429 * resolve.c (forall_index): Ditto.
430 (sym_in_expr): New function.
431 (find_sym_in_expr): Rewrite to traverse expression calling
433 *trans-decl.c (expr_decls): New function.
434 (generate_expr_decls): Rewrite to traverse expression calling
436 *match.c (check_stmt_fcn): New function.
437 (recursive_stmt_fcn): Rewrite to traverse expression calling
440 2007-11-27 Paul Thomas <pault@gcc.gnu.org>
443 *interface.c (compare_actual_formal): Exclude assumed size
444 arrays from the possibility of scalar to array mapping.
445 * decl.c (get_proc_name): Fix whitespace problem.
448 * gfortran.h : Add 'use_rename' bit to symbol_attribute.
449 * module.c : Add 'renamed' field to pointer_info.u.rsym.
450 (load_generic_interfaces): Add 'renamed' that is set after the
451 number_use_names is called. This is used to set the attribute
452 use_rename, which, in its turn identifies those symbols that
453 have not been renamed.
454 (load_needed): If pointer_info.u.rsym->renamed is set, then
455 set the use_rename attribute of the symbol.
456 (read_module): Correct an erroneous use of use_flag. Use the
457 renamed flag and the use_rename attribute to determine which
458 symbols are not renamed.
460 2007-11-26 Steven G. Kargl <kargls@comcast.net>
463 * options.c: Change default behavior of backslash processing.
464 * invoke.texi: Update documentation.
466 2007-11-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
469 * decl.c (add_init_expr_to_sym): Remove error message.
470 * resolve.c (check_data_variable): Add new check for a data variable
471 that has an array spec, but no ref and issue an error.
472 * match.c (gfc_match_common): Remove error message.
474 2007-11-25 Tobias Burnus <burnus@net-b.de>
477 * trans-types.c (gfc_return_by_reference,
478 gfc_get_function_type): Do not return result of
479 character-returning bind(C) functions as argument.
480 * trans-expr.c (gfc_conv_function_call): Ditto.
482 2007-11-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
485 * gfortran.texi: Document default forms assumed for various file
488 2007-11-25 Paul Thomas <pault@gcc.gnu.org>
491 * decl.c (get_proc_name): If ENTRY statement occurs before type
492 specification, set the symbol untyped and ensure that it is in
493 the procedure namespace.
495 2007-11-24 Paul Thomas <pault@gcc.gnu.org>
498 * module.c (find_symtree_for_symbol): Move to new location.
499 (find_symbol): New function.
500 (load_generic_interfaces): Rework completely so that symtrees
501 have the local name and symbols have the use name. Renamed
502 generic interfaces exclude the use of the interface without an
503 ONLY clause (11.3.2).
504 (read_module): Implement 11.3.2 in the same way as for generic
507 2007-11-23 Christopher D. Rickett <crickett@lanl.gov>
509 * trans-common.c (build_common_decl): Fix the alignment for
510 BIND(C) common blocks.
512 2007-11-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
515 * iresolve.c (gfc_resolve_nearest): If sign variable kind does not match
516 kind of input variable, convert it to match.
519 * trans.h: Modify prototype for gfc_conv_missing_dummy.
520 * trans-expr.c (gfc_conv_missing_dummy): Modify to pass an integer kind
521 parameter in. Set the type of the dummy to the kind given.
522 (gfc_conv_function_call): Pass representation.length to
523 gfc_conv_missing_dummy.
524 * iresolve.c (gfc_resolve_cshift): Determine the correct kind to use and
525 if appropriate set representation.length to this kind value.
526 (gfc_resolve_eoshift): Likewise.
527 * check.c (gfc_check_cshift): Enable dim_check to allow DIM as an
528 optional argument. (gfc_check_eoshift): Likewise.
529 * trans_intrinsic.c (gfc_conv_intrinsic_function_args): Update call to
530 gfc_conv_missing_dummy.
532 2007-11-23 Tobias Burnus <burnus@net-b.de>
535 * module.c (load_needed): Ensure binding_label is not lost.
537 * decl.c (set_binding_label,gfc_match_bind_c): Replace
540 2007-11-23 Tobias Burnus <burnus@net-b.de>
541 Steven G. Kargl <kargl@gcc.gnu.org>
544 * simplify.c (gfc_simplify_nearest): Fix NEAREST for
547 2007-11-23 Aldy Hernandez <aldyh@redhat.com>
549 * trans-expr.c (gfc_trans_string_copy): Use "void *" when building a
552 2007-11-22 Tobias Burnus <burnus@net-b.de>
554 * primary.c (gfc_match_structure_constructor): Allow
555 constructor for types without components.
557 2007-11-22 Tobias Burnus <burnus@net-b.de>
560 * trans-expr.c (gfc_conv_function_call): Do not append
561 string length arguments when calling bind(c) procedures.
562 * trans-decl.c (create_function_arglist): Do not append
563 string length arguments when declaring bind(c) procedures.
565 2007-11-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
568 * resolve.c (resolve_structure_cons): Also check for zero rank.
570 2007-11-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
573 * trans-expr.c (gfc_conv_missing_dummy): Revert.
574 * iresolve.c (gfc_resolve_cshift): Revert.
575 (gfc_resolve_eoshift): Likewise.
576 * check.c (gfc_check_cshift): Revert.
577 (gfc_check_eoshift): Likewise.
579 2007-11-19 Tobias Burnus <burnus@net-b.de>
582 * decl.c (gfc_match_entry): Support BIND(C).
583 (gfc_match_subroutine): Fix comment typo.
585 2007-11-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
588 * trans-expr.c (gfc_conv_missing_dummy): Set the type of the dummy
589 argument to default integer if flagged to do so. Fix typo in comment.
590 * resolve.c (gfc_resolve_dim_arg): Whitespace cleanup.
591 * iresolve.c (gfc_resolve_cshift): Do not convert type, mark attribute
592 for converting the DIM type appropriately in trans-expr.c.
593 (gfc_resolve_eoshift): Likewise.
594 * check.c (dim_check): Remove pre-existing dead code.
595 (gfc_check_cshift): Enable dim_check to allow DIM as an optional.
596 (gfc_check_eoshift): Likewise.
597 * trans_intrinsic.c (gfc_conv_intrinsic_function_args): Fix whitespace.
599 2007-11-18 Paul Thomas <pault@gcc.gnu.org>
602 * trans-array.c (gfc_conv_expr_descriptor): Remove exception
603 for indirect references in the call to gfc_trans_scalar_assign.
604 * trans-expr.c (gfc_conv_string_parameter): Instead of asserting
605 that the expression is not an indirect reference, cast it to a
606 pointer type of the length given by se->string_length.
608 2007-11-18 Tobias Burnus <burnus@net-b.de>
611 * primary.c (match_variable): Reject non-result entry symbols.
612 * resolve.c (resolve_contained_fntype): Do not check entry master
615 2007-11-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
617 * trans-types.c (gfc_init_types): Use wider buffer.
619 2007-11-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
621 * trans-types.c (gfc_init_types): Use Fortran-90-style type
624 2007-11-17 Tobias Burnus <burnus@net-b.de>
627 * decl.c (gfc_match_suffix,gfc_match_subroutine): Disallow
628 bind(c) attribute for internal procedures.
630 2007-11-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
633 * interface.c (gfc_current_interface_head,
634 gfc_set_current_interface_head): New functions.
635 * decl.c (gfc_match_modproc): Move check for syntax error earlier.
636 On syntax error, restore previous state of the interface.
637 * gfortran.h (gfc_current_interface_head,
638 gfc_set_current_interface_head): New prototypes.
640 2007-11-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
643 * module.c (struct written_common, written_commons): New structure.
644 (compare_written_commons, free_written_common, write_common_0):
646 (write_common): Call recursive function write_common_0.
648 2007-11-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
651 * io.c (check_format_string): Only check character expressions.
652 (match_dt_format): Return MATCH_ERROR if that is what
653 gfc_match_st_label said.
655 2007-11-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
658 * expr.c (check_inquiry): Don't call gfc_error now.
660 2007-11-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
664 * scanner.c (start_source_file, end_source_file,
665 exit_remaining_files, gfc_advance_line): Revert rev. 130016.
667 2007-11-16 Paul Thomas <pault@gcc.gnu.org>
670 * trans-stmt.c (gfc_conv_elemental_dependencies): Add check for
671 INTENT_INOUT as well as INTENT_OUT.
672 (gfc_trans_call): Remove redundant gcc_asserts in dependency
675 2007-11-16 Paul Thomas <pault@gcc.gnu.org>
678 * trans-array.c (gfc_conv_array_parameter ): Allow allocatable
681 2007-11-15 Tobias Burnus <burnus@net-b.de>
684 * decl.c (match_procedure_decl): Pre-resolve interface.
685 * resolve.c (resolve_symbol): Reject interfaces later
686 declared in procedure statements.
688 2007-11-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
691 * decl.c (match_procedure_decl): Remove TODO and allow intrinsics in
692 PROCEDURE declarations. Set attr.untyped to allow the interface to be
693 resolved later where the symbol type will be set.
694 * interface.c (compare_intr_interfaces): Remove static from pointer
695 declarations. Add type and kind checks for dummy function arguments.
696 (compare_actual_formal_intr): New function to compare an actual
697 argument with an intrinsic function. (gfc_procedures_use): Add check for
698 interface that points to an intrinsic function, use the new function.
699 * resolve.c (resolve_specific_f0): Resolve the intrinsic interface.
700 (resolve_specific_s0): Ditto.
702 2007-11-13 Paul Thomas <pault@gcc.gnu.org>
705 * iresolve.c (gfc_resolve_transfer): Do not try to convert
706 to a constant MOLD expression, if it is an assumed size
709 2007-11-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
711 * trans-common.c: Remove prototype for gfc_get_common.
713 2007-11-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
716 * trans.c (gfc_call_realloc): Fix the logic and rename variables.
718 2007-11-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
721 * scanner.c (start_source_file, end_source_file,
722 exit_remaining_files): New functions.
723 (gfc_advance_line): Use the new functions.
725 2007-11-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
728 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use correct type.
730 2007-11-08 Tobias Burnus <burnus@net-b.de>
733 * interface.c (check_sym_interfaces): Disallow PROCEDURE-declared
734 procedures for MODULE PROCEDURE.
735 * decl.c (match_procedure_in_interface): Do not mark as procedure.
737 2007-11-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
740 * trans-array.c (gfc_conv_array_parameter): Evaluate
741 se->string_length instead of the expr->ts.cl->backend_decl.
743 2007-11-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
745 * gfortran.h: Shorten comment.
746 * trans-types.c (gfc_get_function_type): Allow argument to have
748 * trans-decl.c (gfc_sym_mangled_function_id): Mangle main program
750 (build_function_decl): Fix comment.
751 * parse.c (main_program_symbol): Give the main program its proper
752 name, if any. Set its flavor to FL_PROGRAM.
753 (gfc_parse_file): Likewise.
755 2007-11-02 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
757 * intrinsic.texi (ALLOCATED): Fix typo.
759 2007-10-31 Tobias Burnus <burnus@net-b.de>
762 * modules.c (intrinsics): Use only alphabetic names for
765 2007-10-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
768 * interface.c (compare_intr_interfaces): New function to check intrinsic
769 function arguments against formal arguments. (compare_interfaces): Fix
770 logic in comparison of function and subroutine attributes.
771 (compare_parameter): Use new function for intrinsic as argument.
772 * resolve.c (resolve_actual_arglist): Allow an intrinsic without
773 function attribute to be checked further. Set function attribute if
774 intrinsic symbol is found, return FAILURE if not.
776 2007-10-31 Paul Thomas <pault@gcc.gnu.org>
779 * decl.c (gfc_match_entry): Do not make ENTRY name
780 global for contained procedures.
781 * parse.c (gfc_fixup_sibling_symbols): Fix code for
782 determining whether a procedure is external.
784 2007-10-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
787 * trans-intrinsic.c (gfc_conv_intrinsic_isnan): Strip NOP_EXPR
788 from the result of build_call_expr.
790 2007-10-29 Paul Thomas <pault@gcc.gnu.org>
796 * trans-array.c (gfc_conv_loop_setup): Send a complete type to
797 gfc_trans_create_temp_array if the temporary is character.
798 * trans-stmt.c (gfc_trans_assign_need_temp): Do likewise for
799 allocate_temp_for_forall_nest.
800 (forall_replace): New function.
801 (forall_replace_symtree): New function.
802 (forall_restore): New function.
803 (forall_restore_symtree): New function.
804 (forall_make_variable_temp): New function.
805 (check_forall_dependencies): New function.
806 (cleanup_forall_symtrees): New function.
807 gfc_trans_forall_1): Add and initialize pre and post blocks.
808 Call check_forall_dependencies to check for all dependencies
809 and either trigger second forall block to copy temporary or
810 copy lval, outside the forall construct and replace all
811 dependent references. After assignment clean-up and coalesce
812 the blocks at the end of the function.
813 * gfortran.h : Add prototypes for gfc_traverse_expr and
815 expr.c (gfc_traverse_expr): New function to traverse expression
816 and visit all subexpressions, under control of a logical flag,
817 a symbol and an integer pointer. The slave function is caller
818 defined and is only called on EXPR_VARIABLE.
819 (expr_set_symbols_referenced): Called by above to set symbols
821 (gfc_expr_set_symbols_referenced): Rework of this function to
822 use two new functions above.
823 * resolve.c (find_forall_index): Rework with gfc_traverse_expr,
825 (forall_index): New function used by previous.
826 * dependency.c (gfc_check_dependency): Use gfc_dep_resolver for
827 all references, not just REF_ARRAY.
828 (gfc_dep_resolver): Correct the logic for substrings so that
829 overlapping arrays are handled correctly.
831 2007-10-28 Tobias Schlüter <tobi@gcc.gnu.org>
834 * module.c (write_symbol): Fix whitespace.
835 (write_symbol0): Walk symtree from left-to-right instead
837 (write_symbol1): Similarly change walk of pointer info tree.
838 (write_module): Insert linebreak.
839 * symbol.c (gfc_traverse_symtree): Change to left-to-right order.
840 (traverse_ns): Likewise.
842 2007-10-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
845 * decl.c (char_len_param_value): Add check for conflicting attributes of
848 2007-10-27 Tobias Burnus <burnus@net-b.de>
851 * lang-specs.h: Support .ftn and .FTN extension, use CPP for .FOR.
852 * options.c (form_from_filename): Support .ftn extension.
853 * gfortran.texi: Document support of .for and .ftn file extension.
855 2007-10-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
858 * intrinsic.h: Add prototypes for four new functions, gfc_check_datan2,
859 gfc_check_dprod, gfc_check_fn_d, and gfc_check_x_yd.
860 * intrinsic.c (add_functions): Add double precision checks for dabs,
861 dacos, dacosh, dasin, dasinh, datan, datanh, datan2, dbesj0, dbesj1,
862 dbesy0, dbesy1, dcos, dcosh, ddim, derf, derfc, dexp, dgamma,
863 dlgama, dlog, dlog10, dmod, dsign, dsin, dsinh, dsqrt, dtan, and dtanh.
864 Add real check dprod.
865 * check.c (gfc_check_datan2): New function to check for double precision
866 argumants. (gfc_check_dprod, gfc_check_fn_d, and gfc_check_x_yd): Ditto.
868 2007-10-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
870 * invoke.texi: Fix typo in -fmax-errors=.
872 2007-10-26 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
875 * gfortran.texi: Document that there is no logical/integer
876 conversion performed during I/O operations.
878 2007-10-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
881 * resolve.c (resolve_actual_arglist): Fix error message text.
883 2007-10-22 Steven G. Kargl <kargl@gcc.gnu.org>
886 * gfortran.h (gfc_data_value): Change repeat from unsigned int
888 * decl.c(top_val_list): Remove msg variable. Use mpz_t for
890 * resolve.c (values): Change left from unsigned int to mpz_t.
891 (next_data_value): Change for mpz_t.
892 (check_data_variable): Change ??? to FIXME in a comment. Use
894 (resolve_data ): Use "mpz_t left".
896 2007-10-21 Paul Thomas <pault@gcc.gnu.org>
899 * resolve.c (resolve_ordinary_assign): New function that takes
900 the code to resolve an assignment from resolve_code. In
901 addition, it makes a temporary of any vector index, on the
902 lhs, using gfc_get_parentheses.
903 (resolve_code): On EXEC_ASSIGN call the new function.
905 2007-10-20 Tobias Burnus <burnus@net-b.de>
908 * resolve.c (resolve_variable): Check that symbol is in the same
909 namespace as the entry function.
911 2007-10-20 Paul Thomas <pault@gcc.gnu.org>
912 FX Coudert <fxcoudert@gcc.gnu.org>
915 * trans-array.c (gfc_conv_expr_descriptor): For all except
916 indirect references, use gfc_trans_scalar_assign instead of
918 * iresolve.c (check_charlen_present): Separate creation of cl
919 if necessary and add code to treat an EXPR_ARRAY.
920 (gfc_resolve_char_achar): New function.
921 (gfc_resolve_achar, gfc_resolve_char): Call it.
922 (gfc_resolve_transfer): If the MOLD expression does not have a
923 character length expression, get it from a constant length.
925 2007-10-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
928 * simplify.c (gfc_simplify_transfer): Only warn for short transfer when
929 -Wsurprising is given.
930 * invoke.texi: Document revised behavior.
932 2007-10-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
935 * gfortran.texi: Document GFORTRAN_UNBUFFERED_PRECONNECTED
936 environment variable. Delete mention of environment variable
937 GFORTRAN_UNBUFFERED_n.
939 2007-10-18 Paul Thomas <pault@gcc.gnu.org>
942 * resolve.c (check_host_association): Check singly contained
943 namespaces and start search for symbol in current namespace.
945 2007-10-18 Paul Thomas <pault@gcc.gnu.org>
946 Dominique d'Humieres <dominiq@lps.ens.fr>
949 * simplify.c (gfc_simplify_transfer): Return null if the source
950 expression is EXPR_FUNCTION.
952 2007-10-17 Christopher D. Rickett <crickett@lanl.gov>
955 * symbol.c (gen_special_c_interop_ptr): Remove code to create
956 constructor for c_null_ptr and c_null_funptr with value of 0.
957 * expr.c (check_init_expr): Prevent check on constructors for
958 iso_c_binding derived types.
959 * resolve.c (resolve_structure_cons): Verify that the user isn't
960 trying to invoke a structure constructor for one of the
961 iso_c_binding derived types.
963 2007-10-15 Christopher D. Rickett <crickett@lanl.gov>
966 * trans-expr.c (gfc_conv_function_call): Generate code to inline
968 * symbol.c (get_iso_c_sym): Preserve from_intmod and intmod_sym_id
969 attributes in the resolved symbol.
970 * resolve.c (gfc_iso_c_sub_interface): Remove dead code.
972 2007-10-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
975 * trans-io.c (create_dummy_iostat): New function to create a unique
976 dummy variable expression to use with IOSTAT.
977 (gfc_trans_inquire): Use the new function to pass unit number error info
978 to run-time library if a regular IOSTAT variable was not given.
980 2007-10-14 Tobias Burnus <burnus@net-b.de>
983 * trans-array.c (gfc_conv_ss_startstride): Fix dimension check.
984 (gfc_trans_array_bound_check, gfc_conv_array_ref,
985 gfc_conv_ss_startstride): Simplify error message.
986 * resolve.c (check_dimension): Fix dimension-type switch;
987 improve error message.
989 2007-10-13 Tobias Schlüter <tobi@gcc.gnu.org>
990 Paul Thomas <pault@gcc.gnu.org>
994 * trans-array.c (get_array_ctor_var_strlen): Check upper bound for
995 constness instead of lower bound.
996 (get_array_ctor_strlen): Add bounds-checking code.
998 2007-10-12 Paul Thomas <pault@gcc.gnu.org>
1001 * resolve.c (resolve_actual_arglist): If the actual argument is
1002 ambiguous, then there is an error.
1004 2007-10-12 Paul Thomas <pault@gcc.gnu.org>
1007 * expr.c (gfc_specification_expr): If a function is not
1008 external, intrinsic or pure is an error. Set the symbol pure
1009 to prevent repeat errors.
1011 2007-10-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1014 * expr.c (find_array_section): Check for constructor constantness.
1016 2007-10-08 Tobias Schlüter <tobi@gcc.gnu.org>
1019 * resolve.c (gfc_resolve_expr): Fix indentation.
1020 (resolve_fl_variable_derived): Rename argument.
1021 (resolve_fl_variable): Fix case in message. Clarify logic.
1022 Correctly simplify array bounds.
1024 2007-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1027 * mathbuiltins.def (GAMMA): Change function name to
1028 "tgamma" instad of "gamma".
1030 2007-10-07 Tobias Schlüter <tobi@gcc.gnu.org>
1033 * expr.c (check_inquiry): Typo fix in error message.
1034 (check_init_expr): Same * 3.
1035 (check_restricted): Verify that no dummy arguments appear in
1036 restricted expressions in ELEMENTAL procedures.
1037 * resolve.c (resolve_fl_variable): Exchange order of checks to
1040 2007-10-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1043 * simplify.c (range_check): Return gfc_bad_expr if incoming expression
1046 2007-10-06 Tobias Schlüter <tobi@gcc.gnu.org>
1048 * simplify.c (gfc_simplify_size): Fix typo.
1050 2007-10-06 Tobias Schlüter <tobi@gcc.gnu.org>
1053 * resolve.c (gfc_find_forall_index): Move towards top,
1055 (find_forall_index): ... this. Add check for NULL expr.
1056 (resolve_forall_iterators): Verify additional constraint.
1057 (resolve_forall): Remove checks obsoleted by new code in
1058 resolve_forall_iterators.
1060 2007-10-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1062 * gfortran.h (gfc_get_data_variable, gfc_get_data_value,
1063 gfc_get_data): Move to decl.c.
1064 (global_used): Rename into gfc_global_used.
1065 (gfc_formalize_init_value, gfc_get_section_index,
1066 gfc_assign_data_value, gfc_assign_data_value_range,
1067 gfc_advance_section): Move to data.h.
1068 (gfc_set_in_match_data): Remove.
1069 * decl.c (gfc_get_data_variable, gfc_get_data_value,
1070 gfc_get_data): Move here.
1071 (gfc_set_in_match_data): Rename into set_in_match_data.
1072 (gfc_match_data): Likewise.
1073 (add_global_entry): Rename global_used into gfc_global_used.
1074 * data.c: Include data.h.
1075 * trans.h (gfc_todo_error): Remove.
1076 * trans-array.c (gfc_trans_array_constructor,
1077 gfc_conv_ss_startstride, gfc_conv_loop_setup): Change
1078 gfc_todo_error into assertions.
1079 * resolve.c (resolve_global_procedure): Rename global_used into
1081 * parse.c (gfc_global_used, parse_module, add_global_procedure,
1082 add_global_program): Likewise.
1083 * trans-intrinsic.c (gfc_walk_intrinsic_function): Rename
1084 global_used into gfc_global_used.
1085 * Make-lang.in: Add dependencies on fortran/data.h.
1088 2007-10-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1091 * decl.c (match_char_kind): New function.
1092 (match_char_spec): Use match_char_kind.
1094 2007-10-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1097 * scanner.c (gfc_advance_line): Call debug_hooks->end_source_file
1098 and debug_hooks->start_source_file when appropriate, and set
1100 (gfc_define_undef_line): New function.
1101 (load_file): Don't error out on #define and #undef lines.
1102 * parse.c (next_statement): Call gfc_define_undef_line.
1103 (gfc_parse_file): Call debug_hooks->start_source_file and
1104 debug_hooks->end_source_file for the main source file if
1106 * gfortran.h (gfc_linebuf): Add dbg_emitted field.
1107 (gfc_define_undef_line): New prototype.
1109 2007-10-04 Tobias Schlüter <tobi@gcc.gnu.org>
1112 * resolve.c (resolve_operator): Always copy the type for
1113 expressions in parentheses.
1115 2007-10-04 Paul Thomas <pault@gcc.gnu.org>
1119 * interface.c (check_interface1): Revert patch of 10-02.
1121 2007-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1124 * trans-decl.c (build_function_decl): Set "externally_visible"
1125 attribute on the MAIN program decl.
1127 2007-10-03 Tobias Schlüter <tobi@gcc.gnu.org>
1130 * resolve.c (has_default_initializer): Move to top. Make bool.
1131 (resolve_common_blocks): Simplify logic. Add case for derived
1132 type initialization.
1133 (resolve_fl_variable_derived): Split out from ...
1134 (resolve_fl_variable): ... here, while adapting to new h_d_i
1137 2007-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1140 * options.c (gfc_post_options): Issue an error when
1141 -fwhole-program is used.
1143 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
1146 * interface.c (check_interface1): Specific procedures are
1147 always ambiguous if they have the same name.
1149 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
1152 * primary.c (gfc_match_rvalue): Make all expressions with array
1153 references to structure parameters into variable expressions.
1155 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
1158 * trans-decl.c (init_intent_out_dt): New function.
1159 (gfc_trans_deferred_vars): Remove the code for default
1160 initialization of INTENT(OUT) derived types and put it
1161 in the new function. Call it earlier than before, so
1162 that array offsets and lower bounds are available.
1164 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
1167 * decl.c (get_proc_name): Return rc if rc is non-zero; ie. if
1168 the name is a reference to an ambiguous symbol.
1170 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
1175 * decl.c : Declare gfc_function_kind_locs and
1176 gfc_function_type_locus.
1177 (gfc_match_kind_spec): Add second argument kind_expr_only.
1178 Store locus before trying to match the expression. If the
1179 current state corresponds to a function declaration and there
1180 is no match to the expression, read to the parenthesis, return
1181 kind = -1, dump the expression and return.
1182 (gfc_match_type_spec): Renamed from match_type_spec and all
1183 references changed. If an interface or an external function,
1184 store the locus, set kind = -1 and return. Otherwise, if kind
1185 is already = -1, use gfc_find_symbol to try to find a use
1186 associated or imported type.
1187 match.h : Prototype for gfc_match_type_spec.
1188 * parse.c (match_deferred_characteristics): New function.
1189 (parse_spec): If in a function, statement is USE or IMPORT
1190 or DERIVED_DECL and the function kind=-1, call
1191 match_deferred_characteristics. If kind=-1 at the end of the
1192 specification expressions, this is an error.
1193 * parse.h : Declare external gfc_function_kind_locs and
1194 gfc_function_type_locus.
1196 2007-09-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1198 * module.c (mio_expr): Avoid -Wcast-qual warning.
1200 2007-09-27 Tobias Schlüter <tobi@gcc.gnu.org>
1202 * arith.c (reduce_binary_aa): Fix capitalization.
1203 * check.c (gfc_check_dot_product): Likewise.
1204 (gfc_check_matmul): Likewise.
1205 * expr.c (gfc_check_conformance): Likewise.
1206 (gfc_check_assign): Likewise.
1207 (gfc_default_initializer): Simplify logic.
1208 * trans.c (gfc_msg_bounds): Make const.
1209 (gfc_msg_fault): Likewise.
1210 (gfc_msg_wrong_return): Likewise.
1211 * trans.h: Add const to corresponding extern declarations.
1213 2007-09-27 Paul Thomas <pault@gcc.gnu.org>
1216 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Allow for the
1217 possibility of the optional KIND argument by making arg
1218 an array, counting the number of arguments and using arg[0].
1220 2007-09-26 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1223 * invoke.texi: Add note to -ffpe-trap option. Fix typos.
1225 2007-09-23 Tobias Schlüter <tobi@gcc.gnu.org>
1228 * io.c (check_format_string): Move NULL and constant checks into
1230 (check_io_constraints): Call gfc_simplify_expr() before calling
1231 check_format_string(). Remove NULL and constant checks.
1233 2007-09-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1236 * scanner.c, parse.c, gfortran.h: Revert revision 128671.
1238 2007-09-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1241 * scanner.c (preprocessor_line): Call linemap_add when exiting
1243 (gfc_new_file): Adjust debug code for USE_MAPPED_LOCATION.
1245 2007-09-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1248 * trans-types.c (gfc_get_desc_dim_type): Mark artificial
1249 variables with TREE_NO_WARNING.
1250 (gfc_get_array_descriptor_base): Likewise.
1252 2007-09-22 Paul Thomas <pault@gcc.gnu.org>
1256 * trans-decl.c (gfc_create_module_variable): Output
1257 derived type parameters.
1258 * arith.c (gfc_parentheses): Return the argument if
1259 it is a constant expression.
1260 * primary.c (gfc_match_rvalue): Remove the clearing of
1261 the module name and the use_assoc attribute for derived
1262 type parameter expressions.
1264 2007-09-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1267 * scanner.c (gfc_advance_line): Call debug_hooks->start_source_file
1268 and debug_hooks->end_source_file when entering and exiting
1270 (gfc_define_undef_line): New function.
1271 (load_file): Ignore #define and #undef preprocessor lines
1272 while reading source files.
1273 * parse.c (next_statement): Handle #define and #undef
1275 (gfc_parse_file): Call debug_hooks->start_source_file and
1276 debug_hooks->end_source_file for the main source file if
1277 requested by the debug format.
1278 * gfortran.h (gfc_define_undef_line): Add prototype.
1280 2007-09-22 Tobias Burnus <burnus@net-b.de>
1283 * scanner.c (skip_free_comments): Warn if !$OMP& is used
1284 if no OpenMP directive is to be continued.
1286 2007-09-21 Paul Thomas <pault@gcc.gnu.org>
1288 *trans-expr.c (gfc_trans_pointer_assignment): Convert array
1289 descriptor for subref pointer assignements, rather than using
1290 the loop info version.
1292 2007-09-21 Tobias Burnus <burnus@net-b.de>
1295 * simplify.c (gfc_simplify_transfer): Warn if source size
1296 is smaller than result size.
1298 2007-09-20 Asher Langton <langton2@llnl.gov>
1301 * gfortran.h : Add init_local_* enums and init_flag_* flags to
1303 * lang.opt: Add -finit-local-zero, -finit-real, -finit-integer,
1304 -finit-character, and -finit-logical flags.
1305 * invoke.texi: Document new options.
1306 * resolve.c (build_init_assign): New function.
1307 (apply_init_assign): Move part of function into build_init_assign.
1308 (build_default_init_expr): Build local initializer (-finit-*).
1309 (apply_default_init_local): Apply local initializer (-finit-*).
1310 (resolve_fl_variable): Try to add local initializer (-finit-*).
1311 * options.c (gfc_init_options, gfc_handle_option,
1312 gfc_post_options): Handle -finit-local-zero, -finit-real,
1313 -finit-integer, -finit-character, and -finit-logical flags.
1315 2007-09-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1318 * gfortran.h (symbol_attribute): Add zero_comp field.
1319 * symbol.c (gfc_use_derived): Handle case of emtpy derived types.
1320 * decl.c (gfc_match_data_decl): Likewise.
1321 (gfc_match_derived_decl): Likewise.
1322 * module.c (ab_attribute, attr_bits): Add AB_ZERO_COMP member.
1323 (mio_symbol_attribute): Write and read AB_ZERO_COMP.
1324 * resolve.c (resolve_symbol): Handle case of emtpy derived types.
1325 * parse.c (parse_derived): Likewise.
1327 2007-09-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1330 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
1331 reduce_binary_aa): Call ourselves recursively if an element of
1332 the constructor is itself a constant array.
1334 2007-09-20 Tobias Schlüter <tobi@gcc.gnu.org>
1336 * io.c (resolve_tag_format): New function using code split out
1337 and simplified from ...
1338 (resolve_tag): ... this function. Simplify logic. Unify
1339 IOSTAT, IOLENGTH and SIZE handling.
1341 2007-09-20 Christopher D. Rickett <crickett@lanl.gov>
1344 * resolve.c (gfc_iso_c_func_interface): Use information from
1345 subcomponent if applicable.
1347 2007-09-20 Tobias Burnus <burnus@net-b.de>
1350 * intrinsic.text: Add documentation of the intrinsic modules.
1351 * gfortran.texi: Link to intrinsic-modules section and to
1354 2007-09-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1357 * trans-array.c (gfc_conv_ss_startstride): Only perform bounds
1358 checking for optional args when they are present.
1360 2007-09-18 Tobias Burnus <burnus@net-b.de>
1363 * resolve.c (resolve_elemental_actual): Check for conformance
1364 of intent out/inout dummies.
1366 2007-09-17 Tobias Burnus <burnus@net-b.de>
1369 * resolve.c (resolve_symbol): Reject public variable of
1370 private derived-types for Fortran 95.
1372 2007-09-17 Tobias Burnus <burnus@net-b.de>
1374 * resolve.c (resolve_fl_procedure): Allow private dummies
1377 2007-09-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1379 * trans-types.c (gfc_get_desc_dim_type): Do not to try
1381 (gfc_get_array_descriptor_base): Likewise.
1382 (gfc_get_mixed_entry_union): Likewise
1383 (gfc_get_derived_type): Set decl location for fields and
1384 derived type itself.
1386 2007-09-16 Paul Thomas <pault@gcc.gnu.org>
1392 * trans.h : Add extra argument to gfc_build_array_ref. Rename
1393 gfc_conv_aliased_arg to gfc_conv_subref_array_arg. Move
1394 prototype of is_aliased_array to gfortran.h and rename it
1395 gfc_is_subref_array. Add field span to lang_decl, add a new
1396 decl lang specific flag accessed by GFC_DECL_SUBREF_ARRAY_P
1397 and a new type flag GFC_DECL_SUBREF_ARRAY_P.
1398 * trans.c (gfc_build_array_ref): Add the new argument, decl.
1399 If this is a subreference array pointer, use the lang_decl
1400 field 'span' to calculate the offset in bytes and use pointer
1401 arithmetic to address the element.
1402 * trans-array.c (gfc_conv_scalarized_array_ref,
1403 gfc_conv_array_ref): Add the backend declaration as the third
1404 field, if it is likely to be a subreference array pointer.
1405 (gfc_conv_descriptor_dimension, gfc_trans_array_ctor_element,
1406 gfc_trans_array_constructor_element, structure_alloc_comps,
1407 gfc_conv_array_index_offset): For all other references to
1408 gfc_build_array_ref, set the third argument to NULL.
1409 (gfc_get_dataptr_offset): New function.
1410 (gfc_conv_expr_descriptor): If the rhs of a pointer assignment
1411 is a subreference array, then calculate the offset to the
1412 subreference of the first element and set the descriptor data
1413 pointer to this, using gfc_get_dataptr_offset.
1414 trans-expr.c (gfc_get_expr_charlen): Use the expression for the
1415 character length for a character subreference.
1416 (gfc_conv_substring, gfc_conv_subref_array_arg): Add NULL for
1417 third argument in call to gfc_build_array_ref.
1418 (gfc_conv_aliased_arg): Rename to gfc_conv_subref_array_arg.
1419 (is_aliased_array): Remove.
1420 (gfc_conv_function_call): Change reference to is_aliased_array
1421 to gfc_is_subref_array and reference to gfc_conv_aliased_arg to
1422 gfc_conv_subref_array_arg.
1423 (gfc_trans_pointer_assignment): Add the array element length to
1424 the lang_decl 'span' field.
1425 * gfortran.h : Add subref_array_pointer to symbol_attribute and
1426 add the prototype for gfc_is_subref_array.
1427 * trans-stmt.c : Add NULL for third argument in all references
1428 to gfc_build_array_ref.
1429 * expr.c (gfc_is_subref_array): Renamed is_aliased_array.
1430 If this is a subreference array pointer, return true.
1431 (gfc_check_pointer_assign): If the rhs is a subreference array,
1432 set the lhs subreference_array_pointer attribute.
1433 * trans-decl.c (gfc_get_symbol_decl): Allocate the lang_decl
1434 field if the symbol is a subreference array pointer and set an
1435 initial value of zero for the 'span' field.
1436 * trans-io.c (set_internal_unit): Refer to is_subref_array and
1437 gfc_conv_subref_array_arg.
1438 (nml_get_addr_expr): Add NULL third argument to
1439 gfc_build_array_ref.
1440 (gfc_trans_transfer): Use the scalarizer for a subreference
1443 2007-09-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1445 * iresolve.c (resolve_mask_arg): If a mask is an array
1446 expression, convert it to kind=1.
1448 2007-09-13 Tobias Burnus <burnus@net-b.de>
1451 * expr.c (gfc_check_conformance): Print ranks in the error message.
1452 * resolve.c (resolve_elemental_actual): Check also conformance of
1453 the actual arguments for elemental functions.
1455 2007-09-13 Tobias Burnus <burnus@net-b.de>
1457 * symbol.c (gfc_add_elemental,gfc_add_pure,gfc_add_recursive):
1458 Allow prefixes only to be specified once.
1460 2007-09-13 Tobias Burnus <burnus@net-b.de>
1463 * symbol.c (check_conflict): Add conflict of ELEMENTAL with Bind(C).
1465 2007-09-12 Tobias Burnus <burnus@net-b.de>
1468 * check.c (scalar_check): Move up in the file.
1469 (kind_check): Call scalar_check.
1470 (dim_check): If optional, do not call nonoptional_check; use
1472 (gfc_check_all_any,gfc_check_count,gfc_check_cshift,gfc_check_eoshift,
1473 gfc_check_lbound,gfc_check_minloc_maxloc,check_reduction,
1474 gfc_check_spread,gfc_check_ubound): Use true/false instead of 0/1
1475 for dim_check; honor changed meaning of optional.
1476 (gfc_check_int): Replace checks by kind_check.
1477 (gfc_check_size): Replace checks by dim_check.
1479 2007-09-12 Tobias Burnus <burnus@net-b.de>
1483 * symbol.c (check_conflict): Add conflict between INTRINSIC and ENTRY
1484 and between BIND(C) and PARAMETER.
1486 2007-09-12 Tobias Burnus <burnus@net-b.de>
1488 * trans-expr.c (gfc_conv_initializer): Fix expr == NULL check.
1490 2007-09-12 Jan Hubicka <jh@suse.cz>
1492 * f95-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1494 2007-09-12 Christopher D. Rickett <crickett@lanl.gov>
1497 * trans-expr.c (gfc_conv_initializer): Remove unnecessary test for
1498 intmod_sym_id and use derived symbol to set new kind of C_NULL_PTR
1499 and C_NULL_FUNPTR expressions.
1501 2007-09-11 Christopher D. Rickett <crickett@lanl.gov>
1504 * trans-expr.c (gfc_trans_structure_assign): Convert component
1505 C_NULL_PTR and C_NULL_FUNPTR component initializers to (void *).
1506 * trans-types.c (gfc_get_derived_type): Create a backend_decl for
1507 the c_address field of C_PTR and C_FUNPTR and ensure initializer
1508 is of proper type/kind for (void *).
1510 2007-09-11 Jan Hubicka <jh@suse.cz>
1512 * f95-lang.c (gfc_expand_function): Kill.
1513 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1515 2007-09-08 Tobias Burnus <burnus@net-b.de>
1518 * gfortran.texi: Document when CPP is called.
1520 * intrinsic.texi (IOR): Fix typos.
1522 2007-09-10 Paul Thomas <pault@gcc.gnu.org>
1525 * trans-expr.c (copyable_array_p): Add tests that expression
1526 is a variable, that it has no subreferences and that it is a
1528 (gfc_trans_assignment): Change conditions to suit modifications
1529 to copyable_array_p.
1531 2007-09-06 Tom Tromey <tromey@redhat.com>
1533 * scanner.c (get_file): Update.
1534 (load_file): Update.
1535 (gfc_next_char_literal): Use gfc_linebuf_linenum.
1536 * f95-lang.c (gfc_init): Update.
1537 * gfortran.h (gfc_linebuf_linenum): New macro.
1539 2007-09-05 Sandra Loosemore <sandra@codesourcery.com>
1541 * trans-decl.c (build_entry_thunks): Use set_cfun.
1542 (gfc_generate_function_code): Likewise.
1544 2007-09-05 Paul Thomas <pault@gcc.gnu.org>
1547 * primary.c (gfc_match_rvalue): Make expressions that refer
1548 to derived type parameters that have array references into
1549 variable expressions. Remove references to use association
1553 * decl.c (add_init_expr_to_sym): Provide assumed character
1554 length parameters with the length of the initialization
1555 expression, if a constant, or that of the first element of
1558 2007-09-04 Janus Weil <jaydub66@gmail.com>
1559 Paul Thomas <pault@gcc.gnu.org>
1561 * decl.c (match_procedure_decl,match_procedure_in_interface,
1562 gfc_match_procedure): Handle PROCEDURE statements.
1563 * gfortran.h (struct gfc_symbol): New member "gfc_symbol *interface".
1564 (enum gfc_statement): New element "ST_PROCEDURE".
1565 (strcut symbol_attribute): New member "unsigned procedure".
1566 * interface.c (check_interface0): Extended error checking.
1567 * match.h: Add gfc_match_procedure prototype.
1568 * parse.c (decode_statement,next_statement,gfc_ascii_statement,
1569 parse_derived,parse_interface): Implement PROCEDURE statements.
1570 * resolve.c (resolve_symbol): Ditto.
1571 * symbol.c (check_conflict): Ditto.
1572 (gfc_add_proc): New function for setting the procedure attribute.
1573 (copy_formal_args): New function for copying formal argument lists.
1575 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
1577 * Make-lang.in (gfortranspec.o): Remove SHLIB_MULTILIB.
1579 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1581 * gfortranspec.c (lang_specific_driver): Use CONST_CAST2.
1582 * options.c (gfc_post_options): Supply a TYPE for CONST_CAST.
1583 * parse.c (parse_omp_structured_block): Likewise,
1584 * st.c (gfc_free_statement): Likewise,
1586 2007-09-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1589 * libgfortran.h: New file.
1590 * iso-fortran-env.def: Use macros in the new header instead of
1591 hardcoded integer constants.
1592 * Make-lang.in (F95_PARSER_OBJS, GFORTRAN_TRANS_DEPS): Add
1593 fortran/libgfortran.h.
1594 * gfortran.h (GFC_STD_*, GFC_FPE_*, options_convert,
1595 ioerror_codes): Remove.
1596 * trans.c (ERROR_ALLOCATION): Remove.
1597 (gfc_call_malloc, gfc_allocate_with_status,
1598 gfc_allocate_array_with_status): Use LIBERROR_ALLOCATION.
1599 * trans-types.h (GFC_DTYPE_*): Remove.
1600 * trans-decl.c (gfc_generate_function_code): Use
1601 GFC_CONVERT_NATIVE instead of CONVERT_NATIVE.
1602 * trans-io.c (set_parameter_value, set_parameter_ref): Use
1603 LIBERROR_* macros instead of IOERROR_ macros.
1604 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use
1605 LIBERROR_END and LIBERROR_EOR instead of hardcoded constants.
1606 * options.c (gfc_init_options): Use GFC_CONVERT_NATIVE instead of
1608 (gfc_handle_option): Use GFC_CONVERT_* macros instead of CONVERT_*.
1610 2007-09-02 Steven G. Kargl <kargl@gcc.gnu.org>
1612 * invoke.texi: Fix the -frange-checking option entry.
1614 2007-09-02 Roger Sayle <roger@eyesopen.com>
1616 * decl.c (match_string_p): New helper function to explicitly match
1617 a string of characters.
1618 (match_attr_spec): Remove no longer needed DECL_COLON from decl_types.
1619 Delete decls array and peek_char. Rewrite decl attribute parser to
1620 avoid calling gfc_match_strings.
1621 * match.c (gfc_match_strings): Delete unused function.
1622 * match.h (gfc_match_strings): Delete prototype.
1624 2007-09-02 Tobias Schlüuter <tobi@gcc.gnu.org>
1626 * dump-parse-tree.c (show_char_const): New function.
1627 (gfc_show_expr): Use it.
1628 * expr.c (find_substring_ref): Rework to not keep characters
1629 dangling beyond end of string.
1631 2007-09-02 H.J. Lu <hongjiu.lu@intel.com>
1634 * array.c (expand_iterator): Initialize frame.prev.
1636 2007-08-31 Tobias Burnus <burnus@net-b.de>
1639 * io.c (match_io): Also diagnose extra comma for READ.
1641 2007-08-31 Joseph Myers <joseph@codesourcery.com>
1643 * intrinsic.texi (LGAMMA): Remove empty @cindex line.
1645 2007-08-31 Paul Thomas <pault@gcc.gnu.org>
1651 * gfortran.h : Add prototype for gfc_resolve_substring_charlen.
1652 * resolve.c (gfc_resolve_substring_charlen): New function.
1653 (resolve_ref): Call gfc_resolve_substring_charlen.
1654 (gfc_resolve_character_operator): New function.
1655 (gfc_resolve_expr): Call the new functions in cases where the
1656 character length is missing.
1657 * iresolve.c (cshift, eoshift, merge, pack, reshape, spread,
1658 transpose, unpack): Call gfc_resolve_substring_charlen for
1659 source expressions that are character and have a reference.
1660 * trans.h (gfc_trans_init_string_length) Change name to
1661 gfc_conv_string_length; modify references in trans-expr.c,
1662 trans-array.c and trans-decl.c.
1663 * trans-expr.c (gfc_trans_string_length): Handle case of no
1665 (gfc_conv_aliased_arg): Remove code for treating substrings
1666 and replace with call to gfc_trans_string_length.
1667 * trans-array.c (gfc_conv_expr_descriptor): Remove code for
1668 treating strings and call gfc_trans_string_length instead.
1670 2007-08-30 Tobias Burnus <burnus@net-b.de>
1673 * interface.c (check_interface0): Improve error for external procs.
1674 (check_sym_interfaces): Fix checking of module procedures.
1676 2007-08-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1679 * iresolve.c (gfc_resolve_getarg): Handle non-default integer
1681 * check.c (gfc_check_getarg): New function
1682 * intrinsic.h: Add prototype for gfc_check_getarg.
1683 * intrinsic.c (add_subroutines): Add reference to gfc_check_getarg.
1684 * intrinsic.texi (GETARG): Adjust documentation.
1686 2007-08-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1687 Tobias Burnus <burnus@gcc.gnu.org>
1690 * intrinsic.c (add_functions): Add IS_IOSTAT_END and
1691 IS_IOSTAT_EOR intrinsics.
1692 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_IOSTAT_END and
1693 GFC_ISYM_IS_IOSTAT_EOR.
1694 * trans-intrinsic.c (gfc_conv_has_intvalue): New function.
1695 (gfc_conv_intrinsic_function): Call gfc_conv_has_intvalue for
1696 GFC_ISYM_IS_IOSTAT_END and GFC_ISYM_IS_IOSTAT_EOR.
1697 * intrinsic.texi: Add IS_IOSTAT_END and IS_IOSTAT_EOR.
1699 2007-08-28 Christopher D. Rickett <crickett@lanl.gov>
1702 * decl.c (build_sym): Pass number of identifiers on line to
1704 (set_binding_label): Verify that only one identifier given if
1705 NAME= specified, even if the given binding label has zero length.
1706 (gfc_match_bind_c): Remove declaration for has_name_equals because
1707 it hides the static global one that is needed.
1709 2007-08-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1711 * trans-array.c (gfc_grow_array): Use gfc_call_realloc.
1712 (gfc_array_allocate): Use gfc_allocate_with_status and
1713 gfc_allocate_array_with_status.
1714 (gfc_array_deallocate): Use gfc_deallocate_with_status.
1715 (gfc_trans_dealloc_allocated): Use gfc_deallocate_with_status.
1716 * trans-stmt.c (gfc_trans_allocate): Use gfc_allocate_with_status.
1717 (gfc_trans_deallocate): Use gfc_deallocate_with_status.
1718 * trans.c (gfc_allocate_with_status, gfc_allocate_array_with_status,
1719 gfc_deallocate_with_status, gfc_call_realloc): New functions.
1720 * trans.h (gfc_allocate_with_status, gfc_allocate_array_with_status,
1721 gfc_deallocate_with_status, gfc_call_realloc): New prototypes.
1722 (gfor_fndecl_internal_realloc, gfor_fndecl_allocate,
1723 gfor_fndecl_allocate_array, gfor_fndecl_deallocate): Remove.
1724 * f95-lang.c (gfc_init_builtin_functions): Create decl for
1726 * trans-decl.c (gfor_fndecl_internal_realloc,
1727 gfor_fndecl_allocate, gfor_fndecl_allocate_array,
1728 gfor_fndecl_deallocate): Remove function decls.
1729 (gfc_build_builtin_function_decls): Likewise.
1731 2007-08-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1734 Revert previous patch.
1736 2007-08-28 Jakub Jelinek <jakub@redhat.com>
1739 * Make-lang.in (fortran/trans-types.o): Depend on $(FLAGS_H).
1740 * trans-types.c: Include flags.h.
1741 (gfc_get_nodesc_array_type): Add TYPE_DECL TYPE_NAME with
1742 correct bounds and dimensions for packed arrays.
1744 2007-08-27 Tobias Burnus <burnus@net-b.de>
1746 * simplify.c (gfc_simplify_lgamma): Fix mpfr_lgamma call.
1748 2007-08-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1751 * trans-io.c (create_dummy_iostat): New function to create a unique
1752 dummy variable expression to use with IOSTAT.
1753 (gfc_trans_inquire): Use the new function to pass unit number error info
1754 to run-time library if a regular IOSTAT variable was not given.
1756 2007-08-26 H.J. Lu <hongjiu.lu@intel.com>
1758 * gfortran.h (gfc_isym_id): Add GFC_ISYM_GAMMA and
1761 2007-08-26 Asher Langton <langton2@llnl.gov>
1762 Tobias Burnus <burnus@net-b.de>
1764 * gfortran.h (gfc_option_t): Add flag_recursive.
1765 * lang.opt: Add -frecursive option and update -fopenmp.
1766 * invoke.texi (-frecursive): Document new option.
1767 (-fopenmp,-fno-automatic,-fmax-stack-var-size): Update.
1768 * options.c (gfc_init_options, gfc_post_options,
1769 gfc_handle_option): Add -frecursive and modify -fopenmp.
1770 (gfc_post_options): Add warning for conflicting flags.
1772 2007-08-26 Tobias Burnus <burnus@net-b.de>
1775 * module.c (mio_symbol_ref,mio_interface_rest): Return pointer_info.
1776 (load_operator_interfaces): Support multible loading of an operator.
1778 2007-08-26 Tobias Burnus <burnus@net-b.de>
1781 * match.c (gfc_match_common): Remove SEQUENCE diagnostics.
1782 * resolve.c (resolve_common_blocks): Add SEQUENCE diagnostics;
1783 fix walking through the tree.
1785 2007-08-26 Tobias Burnus <burnus@net-b.de>
1788 * intrinsic.h (gfc_simplify_gamma,gfc_simplify_lgamma,
1789 gfc_resolve_gamma,gfc_resolve_lgamma): New function declations.
1790 * mathbuiltins.def: Define GAMMA and LGAMMA.
1791 * intrinsic.c (add_functions): Add GAMMA, DGAMMA, LGAMMA, ALGAMA
1793 * simplify.c (gfc_simplify_gamma,gfc_simplify_lgamma): New functions.
1794 * iresolve.c (gfc_resolve_gamma,gfc_resolve_lgamma): New functions.
1795 * intrinsic.texi: Add documentation for GAMMA and LGAMMA.
1797 2007-08-26 Tobias Burnus <burnus@net-b.de>
1800 * parse.c (parse_derived): Support empty derived type
1801 definitions for Fortran 2003.
1803 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1805 * trans-openmp.c (gfc_omp_privatize_by_reference): Constify.
1806 * trans.h (gfc_omp_privatize_by_reference): Likewise.
1808 2007-08-24 Tobias Burnus <burnus@net-b.de>
1811 * intrinsic.c (gfc_intrinsic_func_interface): Fix initialization
1814 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1817 * iresolve.c: Don't convert array masks.
1819 2007-08-24 Tobias Burnus <burnus@net-b.de>
1822 * trans-array.c (gfc_conv_expr_descriptor): Copy bounds for
1823 whole-array pointer assignments.
1825 2007-08-23 Jakub Jelinek <jakub@redhat.com>
1827 * decl.c (variable_decl): Don't share charlen structs if
1829 * trans-decl.c (create_function_arglist): Assert
1830 f->sym->ts.cl->backend_decl is NULL instead of unsharing
1831 charlen struct here.
1833 2007-08-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1836 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Remove
1837 runtime error checking.
1839 2007-08-22 Roger Sayle <roger@eyesopen.com>
1840 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1842 * match.c (intrinsic_operators): Delete.
1843 (gfc_match_intrinsic_op): Rewrite matcher to avoid calling
1846 2007-08-22 Christopher D. Rickett <crickett@lanl.gov>
1849 * resolve.c (gfc_iso_c_sub_interface): Remove setting of type and
1850 kind for optional SHAPE parameter of C_F_POINTER.
1852 2007-08-22 Janus Weil <jaydub66@gmail.com>
1854 * decl.c (match_attr_spec): Pass on errors from gfc_match_bind_c.
1855 (gfc_match_bind_c): Bugfix in check for NAME= with abstract interfaces.
1856 (gfc_match_mopdproc): Bugfix to reject module procedures in
1857 abstract interfaces.
1859 2007-08-22 Kai Tietz <kai.tietz@onevision.com>
1861 * f95-lang.c: (gfc_init_decl_processing): Choose sizetype by using
1864 2007-08-21 Paul Brook <paul@codesourcery.com>
1865 Nathan Sidwell <nathan@codesourcery.com>
1866 Mark Mitchell <mark@codesourcery.com>
1867 Joseph Myers <joseph@codesourcery.com>
1869 * gfortranspec.c (lang_specific_driver): Use pkgversion_string.
1870 * Make-lang.in (gfortran.pod): Define BUGURL.
1871 * invoke.texi: Use BUGURL for bug-reporting instructions.
1873 2007-08-19 Roger Sayle <roger@eyesopen.com>
1875 * match.c (intrinsic_operators): Make static.
1876 (gfc_op2string): New function for converting a gfc_intrinsic_op to
1877 to a "const char*", replacing the macro of the same name.
1878 * gfortran.h (intrinsic_operators): Delete prototype.
1879 (gfc_op2string): Replace macro with function prototype.
1881 2007-08-18 Tobias Burnus <burnus@net-b.de>
1883 * gfortran.h (gfc_is_intrinsic_typename): Add declaration.
1884 * symbol.c (gfc_is_intrinsic_typename): New function.
1885 * parse.c (decode_statement): Check for space in ABSTRACT INTERFACE.
1886 (parse_interface): Use gfc_is_intrinsic_typename.
1887 * decl.c (gfc_match_derived_decl): Ditto.
1888 * module.c (gfc_match_use): Use gcc_unreachable() for
1889 INTERFACE_ABSTRACT in switch().
1891 2007-08-18 Roger Sayle <roger@eyesopen.com>
1893 * primary.c (match_logical_constant_string): New function to match
1894 a ".true." or a ".false.".
1895 (match_logical_constant): Use it instead of gfc_match_strings.
1897 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
1898 Janus Weil <jaydub66@gmail.com>
1900 * interface.c (gfc_match_interface,gfc_match_abstract_interface,
1901 gfc_match_end_interface,gfc_add_interface): Add abstract interface.
1902 * dump-parse-tree.c (gfc_show_attr): Ditto.
1903 * gfortran.h (interface_type,symbol_attribute): Ditto.
1904 * module.c (gfc_match_use,ab_attribute,attr_bits,
1905 mio_symbol_attribute): Ditto.
1906 * resolve.c (resolve_function): Ditto.
1908 * parse.c (decode_statement): Ditto.
1909 (parse_interface): Ditto, check for C1203 (name of abstract interface
1910 cannot be the same as an intrinsic type).
1911 * decl.c (gfc_match_bind_c): Check for NAME= with abstract interfaces.
1912 (access_attr_decl): Handle Abstract interfaces.
1914 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
1917 * expr.c (gfc_check_pointer_assign): If the rhs is the
1918 initialization expression for the rhs, there is no error.
1920 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
1923 * trans-array.c (get_array_ctor_strlen): Set the character
1924 length of a zero length array to zero.
1926 2007-08-16 Tobias Burnus <burnus@net-b.de>
1929 * module.c (gfc_match_use): Mark user operators as such.
1930 (find_use_name_n): Distinguish between operators and other symbols.
1931 (find_use_name,number_use_names,mio_namelist,
1932 load_operator_interfaces,load_generic_interfaces,read_module,
1933 write_generic): Update find_use_name_n calls.
1935 2007-08-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1938 * trans.c (gfc_create_var_np): Do not emit warnings for
1939 anonymous variables.
1941 2007-08-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1944 * decl.c (gfc_get_type_attr_spec): Fix whitespace.
1945 (gfc_match_derived_decl): Fix logic.
1947 2007-08-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1950 * trans-intrinsic.c (build_fixbound_expr): Convert to result type
1953 2007-08-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1956 * trans-expr.c (gfc_conv_substring_expr): Only call
1957 gfc_conv_substring if expr->ref is not NULL.
1958 * expr.c (gfc_is_constant_expr): If e->ref is NULL, the substring
1959 expression might be a constant.
1960 (gfc_simplify_expr): Handle missing start and end, as well as
1963 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
1966 * match.c (gfc_match_call): Do not create a new symtree in the
1967 case where the existing symbol is external and not referenced.
1969 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
1972 * decl.c (variable_decl): Check for an imported symbol
1973 by looking for its symtree and testing for the imported
1975 (gfc_match_import): Remove change of symbol's namespace
1976 and set the attribute imported instead.
1977 * symbol.c (gfc_get_sym_tree): It is not an error if a
1979 * gfortran.h : Add the 'imported' to symbol_attribute.
1981 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
1984 * trans-array.c (gfc_conv_array_transpose): Set the offset
1985 of the destination to zero if the loop is zero based.
1987 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1990 * intrinsic.c (add_functions): Add optional KIND argument to ACHAR.
1991 * iresolve.c (gfc_resolve_achar): Handle the KIND argument.
1992 * check.c (gfc_check_achar): Check for the optional KIND argument.
1993 * simplify.c (gfc_simplify_achar): Use KIND argument.
1994 * intrinsic.h (gfc_check_achar, gfc_simplify_achar,
1995 gfc_resolve_achar): Adjust prototypes.
1997 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2001 * trans-expr.c (gfc_conv_function_call): When no formal argument
2002 list is available, we still substitute missing optional arguments.
2003 * check.c (gfc_check_random_seed): Correct the check on the
2004 number of arguments to RANDOM_SEED.
2005 * intrinsic.c (add_subroutines): Add a resolution function to
2007 * iresolve.c (gfc_resolve_random_seed): New function.
2008 * intrinsic.h (gfc_resolve_random_seed): New prototype.
2010 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2013 * error.c (error_uinteger): New function.
2014 (error_integer): Call error_uinteger.
2015 (error_print): Handle %u, %lu, %li and %ld format specifiers.
2016 * interface.c (compare_actual_formal): Use the new %lu specifier.
2018 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2021 * lang.opt (-fmodule-private): New option.
2022 * gfortran.h (gfc_option_t): Add flag_module_private member.
2023 * invoke.texi (-fmodule-private): Document the new option.
2024 * module.c (gfc_check_access): Allow the -fmodule-private option
2025 to modify the default behaviour.
2026 * options.c (gfc_init_options): Initialize flag_module_private.
2027 (gfc_handle_option): Handle -fmodule-private.
2029 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2032 * intrinsic.c (add_functions): Add KIND arguments to COUNT,
2033 IACHAR, ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND
2035 * iresolve.c (gfc_resolve_count): Add kind argument.
2036 (gfc_resolve_iachar): New function.
2037 (gfc_resolve_ichar): Add kind argument.
2038 (gfc_resolve_index_func): Likewise.
2039 (gfc_resolve_lbound): Likewise.
2040 (gfc_resolve_len): Likewise.
2041 (gfc_resolve_len_trim): Likewise.
2042 (gfc_resolve_scan): Likewise.
2043 (gfc_resolve_size): New function.
2044 (gfc_resolve_ubound): Add kind argument.
2045 (gfc_resolve_verify): Likewise.
2046 * trans-decl.c (gfc_get_extern_function_decl): Allow specific
2047 intrinsics to have 4 arguments.
2048 * check.c (gfc_check_count): Add kind argument.
2049 (gfc_check_ichar_iachar): Likewise.
2050 (gfc_check_index): Likewise.
2051 (gfc_check_lbound): Likewise.
2052 (gfc_check_len_lentrim): New function.
2053 (gfc_check_scan): Add kind argument.
2054 (gfc_check_size): Likewise.
2055 (gfc_check_ubound): Likewise.
2056 (gfc_check_verify): Likewise.
2057 * intrinsic.texi: Update documentation for COUNT, IACHAR, ICHAR,
2058 INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND and VERIFY.
2059 * simplify.c (get_kind): Whitespace fix.
2060 (int_expr_with_kind): New function.
2061 (gfc_simplify_iachar): Add kind argument.
2062 (gfc_simplify_iachar): Likewise.
2063 (gfc_simplify_ichar): Likewise.
2064 (gfc_simplify_index): Likewise.
2065 (simplify_bound_dim): Likewise.
2066 (simplify_bound): Likewise.
2067 (gfc_simplify_lbound): Likewise.
2068 (gfc_simplify_len): Likewise.
2069 (gfc_simplify_len_trim): Likewise.
2070 (gfc_simplify_scan): Likewise.
2071 (gfc_simplify_shape): Pass NULL as kind argument to gfc_simplify_size.
2072 (gfc_simplify_size): Add kind argument.
2073 (gfc_simplify_ubound): Likewise.
2074 (gfc_simplify_verify): Likewise.
2075 * intrinsic.h: Update prototypes and add new ones.
2076 * trans-intrinsic.c (gfc_conv_intrinsic_index): Rename into
2077 gfc_conv_intrinsic_index_scan_verify.
2078 (gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove.
2079 (gfc_conv_intrinsic_function): Call
2080 gfc_conv_intrinsic_index_scan_verify to translate the INDEX,
2081 SCAN and VERIFY intrinsics.
2083 2007-08-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2086 * invoke.texi (-fbacktrace): Document the new behaviour.
2088 2007-08-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2091 * trans-array.c (gfc_conv_expr_descriptor): Use
2092 gfc_conv_const_charlen to generate backend_decl of right type.
2093 * trans-expr.c (gfc_conv_expr_op): Use correct return type.
2094 (gfc_build_compare_string): Use int type instead of default
2095 integer kind for single character comparison.
2096 (gfc_conv_aliased_arg): Give backend_decl the right type.
2097 * trans-decl.c (gfc_build_intrinsic_function_decls): Make
2098 compare_string return an int.
2100 2007-08-11 Ian Lance Taylor <iant@google.com>
2102 * f95-lang.c (gfc_get_alias_set): Change return type to
2105 2007-08-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2108 * trans.c (gfc_trans_runtime_check): Reorder arguments and
2109 add extra variable arguments. Hand them to the library function.
2110 * trans.h (gfc_trans_runtime_check): Update prototype.
2111 * trans-array.c (gfc_trans_array_bound_check): Issue more
2112 detailled error messages.
2113 (gfc_conv_array_ref): Likewise.
2114 (gfc_conv_ss_startstride): Likewise.
2115 (gfc_trans_dummy_array_bias): Reorder arguments to
2116 gfc_trans_runtime_check.
2117 * trans-expr.c (gfc_conv_substring): Issue more detailled
2119 (gfc_conv_function_call): Reorder arguments to gfc_trans_runtime_check.
2120 * trans-stmt.c (gfc_trans_goto): Likewise.
2121 * trans-io.c (set_string): Reorder arguments to
2122 gfc_trans_runtime_check and issue a more detailled error message.
2123 * trans-decl.c (gfc_build_builtin_function_decls): Make
2124 runtime_error and runtime_error_at handle a variable number of
2126 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Reorder arguments
2127 to gfc_trans_runtime_check.
2128 (gfc_conv_intrinsic_minmax): Likewise.
2129 (gfc_conv_intrinsic_repeat): Issue more detailled error messages.
2131 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2133 * gfortranspec.c (lang_specific_driver): Use CONST_CAST.
2134 * options.c (gfc_post_options): Likewise.
2135 * parse.c (parse_omp_structured_block): Likewise.
2136 * st.c (gfc_free_statement): Likewise.
2138 2007-08-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2141 * trans-decl.c (gfc_build_builtin_function_decls): Change
2142 prototype for associated.
2143 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert the
2144 result of __builtin_isnan into a boolean.
2145 (gfc_conv_intrinsic_strcmp): Cleanup.
2146 (gfc_conv_associated): Convert the result of the associated
2147 function into a boolean.
2149 2007-08-09 Tobias Burnus <burnus@net-b.de>
2152 * io.c (format_token): Add FMT_ERROR.
2153 (next_char_not_space): Print error/warning when
2154 '\t' are used in format specifications.
2155 (format_lex): Propagate error.
2156 (check_format): Ditto.
2158 2007-08-09 Tobias Burnus <burnus@net-b.de>
2161 * arith.c (arith_error): Point in the error message
2162 to -fno-range-check.
2164 2007-08-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2167 * intrinsic.texi (SIZEOF): Add mention to C_SIZE_T.
2169 2007-08-06 Christopher D. Rickett <crickett@lanl.gov>
2172 * trans-expr.c (gfc_conv_scalar_char_value): Convert the tree and
2173 actual arg expressions for scalar characters passed by-value to
2175 (gfc_conv_function_call): Call gfc_conv_scalar_char_value.
2176 * trans.h: Add prototype for gfc_conv_scalar_char_value.
2177 * trans-decl.c (generate_local_decl): Convert by-value character
2178 dummy args of bind(c) procedures using
2179 gfc_conv_scalar_char_value.
2181 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2184 * iresolve.c (gfc_resolve_alarm_sub): Suffix the subroutine name
2185 with the kind of the STATUS argument.
2187 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2190 * intrinsic.c (add_functions): Fix name of argument to CHDIR.
2192 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2195 * iresolve.c (gfc_resolve_exit): Convert argument to default
2198 2007-08-06 Daniel Franke <franke.daniel@gmail.com>
2200 * resolve.c (derived_pointer): Removed, replaced callers by access
2201 to appropiate attribute bit.
2202 (derived_inaccessable): Shortcut recursion depth.
2203 (resolve_fl_namelist): Fixed checks for private components in namelists.
2205 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2208 * trans.h (gfor_fndecl_string_minmax): New prototype.
2209 * trans-decl.c (gfor_fndecl_string_minmax): New variable.
2210 (gfc_build_intrinsic_function_decls): Create gfor_fndecl_string_minmax.
2211 * check.c (gfc_check_min_max): Allow for character arguments.
2212 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): New function.
2213 (gfc_conv_intrinsic_function): Add special case for MIN and MAX
2214 intrinsics with character arguments.
2215 * simplify.c (simplify_min_max): Add simplification for character
2218 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2221 * invoke.texi: Adjust documentation for option -fsyntax-only.
2223 2007-08-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2224 Tobias Burnus <burnus@gcc.gnu.org>
2227 * intrinsic.h (gfc_check_isnan): Add prototype.
2228 * gfortran.h (gfc_isym_id): Add GFC_ISYM_ISNAN.
2229 * intrinsic.c (add_functions): Add ISNAN intrinsic.
2230 * check.c (gfc_check_isnan): New function.
2231 * trans-intrinsic.c (gfc_conv_intrinsic_isnan): New function.
2232 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_isnan
2234 * intrinsic.texi: Document ISNAN.
2236 2007-08-04 Paul Thomas <pault@gcc.gnu.org>
2239 * symbol.c (get_unique_symtree): Moved from module.c.
2240 * module.c (get_unique_symtree): Moved to symbol.c.
2241 * decl.c (get_proc_name): Transfer the typespec from the local
2242 symbol to the module symbol, in the case that an entry is also
2243 a module procedure. Ensure the local symbol is cleaned up by
2244 pointing to it with a unique symtree.
2246 * dump_parse_tree (gfc_show_code_node): Add EXEC_ASSIGN_CALL.
2248 2008-08-04 Steven G. Kargl <kargl@gcc.gnu.org>
2251 * iresolve.c (gfc_resolve_rrspacing): Convert argument(s) to
2253 (gfc_resolve_scale): Ditto.
2254 (gfc_resolve_set_exponent): Ditto.
2255 (gfc_resolve_spacing): Ditto.
2258 * trans-intrinsic.c (gfc_conv_intrinsic_si_kind,
2259 gfc_conv_intrinsic_sr_kind): Convert the argument(s) to the
2260 expected KIND, and fold the result to the expected KIND.
2262 2007-08-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2265 * f95-lang.c (gfc_init_builtin_functions): Defin builtins for
2266 lround{f,,l} and llround{f,,l}.
2267 * trans-intrinsic.c (build_fix_expr): Generate calls to the
2268 {l,}round{f,,l} functions.
2270 2007-08-01 Thomas Koenig <tkoenig@gcc.gnu.org>
2273 * intrinsic.c (resolve_mask_arg): New function.
2274 (gfc_resolve_maxloc): Use resolve_mask_arg for mask resolution.
2275 (gfc_resolve_maxval): Likewise.
2276 (gfc_resolve_minloc): Likewise.
2277 (gfc_resolve_minval): Likewise.
2278 (gfc_resolve_pack): Likewise.
2279 (gfc_resolve_product): Likewise.
2280 (gfc_resolve_sum): Likewise.
2281 (gfc_resolve_unpack): Likewise.
2283 2007-08-01 Tobias Burnus <burnus@net-b.de>
2286 * match.c (gfc_match_allocate): Better check that STAT is
2289 * check.c (gfc_check_allocated): Reorder checks to improve
2292 2007-08-01 Nick Clifton <nickc@redhat.com>
2294 * arith.c: Change copyright header to refer to version 3 of the
2295 GNU General Public License and to point readers at the COPYING3
2296 file and the FSF's license web page.
2297 * openmp.c, interface.c, intrinsic.c, trans-array.c, trans-expr.c,
2298 symbol.c, iso-fortran-env.def, intrinsic.h, decl.c, trans-array.h,
2299 matchexp.c, dump-parse-tree.c, trans-common.c, array.c,
2300 Make-lang.in, trans-openmp.c, gfortran.h, error.c,
2301 iso-c-binding.def, lang.opt, data.c, trans-const.c, trans-stmt.c,
2302 expr.c, trans-const.h, trans-stmt.h, module.c, trans.c, scanner.c,
2303 trans-types.c, trans.h, gfortranspec.c, trans-types.h,
2304 lang-specs.h, io.c, bbt.c, resolve.c, f95-lang.c, st.c,
2305 iresolve.c, match.c, trans-decl.c, trans-io.c, target-memory.c,
2306 match.h, target-memory.h, parse.c, arith.h, check.c, dependency.c,
2307 parse.h, types.def, convert.c, dependency.h, primary.c,
2308 trans-intrinsic.c, options.c, misc.c, simplify.c: Likewise.
2310 2007-08-01 Daniel Franke <franke.daniel@gmail.com>
2312 * trans-decl.c (generate_local_decl): Emit warning on unused parameter
2313 on "-Wall -Wextra" or "-Wunused-parameter" but not on "-Wall", changed
2314 messages that start with lower case to upper case.
2315 * invoke.texi (-Wparameter-unused): Document differences between gcc
2316 and gfortran regarding this option.
2318 2007-08-01 Daniel Franke <franke.daniel@gmail.com>
2321 * expr.c (check_specification_function): Skip check if no symtree
2324 2007-08-01 Paul Thomas <pault@gcc.gnu.org>
2327 * resolve.c (resolve_entries): Entries declared to be module
2328 procedures must point to the function namespace.
2330 2007-07-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2333 * trans-stmt.c (gfc_trans_return): Convert to correct type.
2335 2007-07-31 Steven G. Kargl <kargl@gcc.gnu.org>
2338 * trans-intrinsic.c (gfc_conv_intrinsic_exponent): Convert to correct
2341 2007-07-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2343 * invoke.texi: Document -fsign-zero flag.
2345 2007-07-29 Paul Thomas <pault@gcc.gnu.org>
2348 * trans-expr.c (gfc_conv_expr_reference): Add block for case of
2349 scalar pointer functions so that NULL result is correctly
2353 * trans-array.c (gfc_trans_array_constructor): On detecting a
2354 multi-dimensional parameter array, set the loop limits.
2356 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
2359 * resolve.c (resolve_fl_parameter): Check for constant shape arrays,
2360 adjusted error message.
2362 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
2364 * invoke.texi: Removed -w from option summary.
2366 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
2369 * intrinsic.texi (IRAND, RAND, RANDOM_NUMBER): Document algorithm
2370 used for random number generator.
2372 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
2374 * gfortran.h, interface.c, resolve.c, symbol.c: Fix comment
2376 * intrinsic.texi, invoke.texi: Fix typos.
2378 2007-07-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2381 * resolve.c (generic_sym): Check for a same symbol and if so, return to
2382 avoid infinite recursion.
2384 2007-07-28 Daniel Franke <franke.daniel@gmail.com>
2389 * gfortran.h (symbol_attribute): Added bits for pointer_comp,
2391 * parse.c (parse_derived): Set pointer_comp/private_comp bits if
2392 the derived type ultimately contains pointer components or private
2394 * module.c (ab_attribute): New values AB_POINTER_COMP, AB_PRIVATE_COMP.
2395 (attr_bits): Added names for new ab_attributes.
2396 (mio_symbol_attribute): Save/restore new attribute bits in modules.
2397 * match.c (gfc_match_namelist): Removed check for namelist objects
2399 * resolve.c (resolve_fl_namelist): Added check for pointer or
2400 private components in nested types. Added check for namelist objects
2403 2007-07-28 Paul Thomas <pault@gcc.gnu.org>
2406 * trans-expr.c (gfc_trans_scalar_assign): Revert to fixed order
2407 for lse and rse pre expressions, for derived types with
2408 allocatable components. Instead, assign the lhs to a temporary
2409 and deallocate after the assignment.
2411 2007-07-28 Janne Blomqvist <jb@gcc.gnu.org>
2414 * trans-stmt.c (gfc_trans_character_select): Replace occurrences
2415 of gfc_c_int_type_node with integer_type_node.
2416 * trans-decl.c (gfc_build_intrinsic_function_decls): Likewise.
2417 (gfc_build_builtin_function_decls): Likewise.
2418 (gfc_generate_function_code): Likewise.
2419 * trans-io.c (gfc_build_io_library_fndecls): Likewise.
2421 2007-07-27 Janne Blomqvist <jb@gcc.gnu.org>
2423 * trans-decl.c (gfc_build_builtin_function_decls): Use existing
2424 gfc_array_index_type rather than creating another typenode for
2425 gfc_index_integer_kind.
2427 2007-07-27 Janne Blomqvist <jb@gcc.gnu.org>
2429 * trans-io.c (gfc_build_io_library_fndecls): Change to use
2430 gfc_array_index_type for array descriptor triplets instead of
2433 2007-07-26 Steven G. Kargl <kargl@gcc.gnu.org>
2436 * resolve.c (resolve_operator): Add INTRINSIC_EQ_OS comparison.
2438 2007-07-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2439 Daniel Franke <franke.daniel@gmail.com>
2442 * primary.c (match_variable): Do not call gfc_add_flavor if symbol has
2443 attribute of ACCESS_PUBLIC or ACCESS_PRIVATE already marked.
2445 2007-07-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2448 * trans-stmt.c (gfc_trans_character_select): Replace the
2449 mechanism with labels by a SWITCH_EXPR.
2450 * trans-decl.c (gfc_build_builtin_function_decls): Change
2451 return type for select_string.
2453 2007-07-27 Paul Thomas <pault@gcc.gnu.org>
2456 * trans-decl.c (gfc_trans_deferred_vars): Set intent(out)
2457 derived types as referenced, if they have the the default
2460 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2462 * gfortran.h (generate_isocbinding_symbol): Constify.
2463 * symbol.c (gen_special_c_interop_ptr, gen_cptr_param,
2464 generate_isocbinding_symbol): Likewise.
2466 2007-07-24 Paul Thomas <pault@gcc.gnu.org>
2470 * trans-expr.c (gfc_conv_function_call): Remove the default
2471 initialization of intent(out) derived types.
2472 * symbol.c (gfc_lval_expr_from_sym): New function.
2473 * matchexp.c (gfc_get_parentheses): Return argument, if it is
2474 character and posseses a ref.
2475 * gfortran.h : Add prototype for gfc_lval_expr_from_sym.
2476 * resolve.c (has_default_initializer): Move higher up in file.
2477 (resolve_code): On detecting an interface assignment, check
2478 if the rhs and the lhs are the same symbol. If this is so,
2479 enclose the rhs in parenetheses to generate a temporary and
2480 prevent any possible aliasing.
2481 (apply_default_init): Remove code making the lval and call
2482 gfc_lval_expr_from_sym instead.
2483 (resolve_operator): Give a parentheses expression a type-
2484 spec if it has no type.
2485 * trans-decl.c (gfc_trans_deferred_vars): Apply the a default
2486 initializer, if any, to an intent(out) derived type, using
2487 gfc_lval_expr_from_sym and gfc_trans_assignment. Check if
2488 the dummy is present.
2490 2007-07-24 Daniel Franke <franke.daniel@gmail.com>
2493 * expr.c (check_init_expr): Simplify matched functions.
2495 2007-07-24 Daniel Franke <franke.daniel@gmail.com>
2498 * intrinsic.c (add_sym): Do not exclude any symbols, even if not part
2499 of the selected standard.
2500 (make generic): Likewise.
2501 (make alias): Likewise, set standard the alias belongs to.
2502 (add_subroutines): Call make_noreturn unconditionally.
2503 (check_intrinsic_standard): Change return value to try.
2504 (gfc_intrinsic_func_interface): Check return value of above function.
2505 (gfc_intrinsic_sub_interface): Likewise.
2507 2007-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
2510 * trans-decl.c (generate_function_code): Add argument
2511 for flag_bounds_check to the array for set_options.
2512 * invoke.texi (-fbounds-check): Document new libarary run-time
2515 2007-07-23 Daniel Franke <franke.daniel@gmail.com>
2519 * expr.c (check_transformational): Reject valid transformational
2520 intrinsics to avoid ICE.
2521 (check_inquiry): Report error for assumed character lengths for
2522 all supported standards.
2523 (check_init_expr): Whitespace fix.
2525 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
2529 * decl.c (verify_bind_c_sym): Use the result symbol for functions
2530 with a result clause. Warn if implicitly typed. Verify the type
2531 and rank of the SHAPE argument, if given.
2532 * resolve.c (gfc_iso_c_sub_interface): Use gfc_procedure_use to
2533 check the actual args against the formal, sorting them if
2535 * symbol.c (gen_shape_param): Initialize type of SHAPE param to
2538 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
2541 * trans-decl.c (generate_local_decl): Convert the TREE_TYPE for by
2542 value character dummy args of BIND(C) procedures.
2543 * trans-expr.c (gfc_conv_variable): Do not build address
2544 expression for BT_CHARACTER dummy args.
2546 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
2547 Tobias Burnus <burnus@net-b.de>
2550 * trans-expr.c (gfc_conv_function_call): Handle c_funloc.
2551 * trans-types.c: Add pfunc_type_node.
2552 (gfc_init_types,gfc_typenode_for_spec): Use it.
2553 * resolve.c (gfc_iso_c_func_interface): Fix whitespace and
2554 improve error message.
2556 2007-07-22 Daniel Franke <franke.daniel@gmail.com>
2559 * parse.c (gfc_fixup_sibling_symbols): No replacement of symbols if
2560 the current is a namelist.
2562 2007-07-22 Daniel Franke <franke.daniel@gmail.com>
2568 * gfortran.h (gfc_intrinsic_sym): Changed members elemental, pure,
2569 generic, specific, actual_ok, noreturn into bits of a bitfield,
2570 added bits for inquiry, transformational, conversion.
2571 * check.c (non_init_transformational): Removed, removed all callers.
2572 * intrinsic.c (enum class): New.
2573 (add_sym*): Replaced argument elemetal by enum class. Changed all
2575 (add_functions): Assign appropriate classes to intrinsic functions.
2576 (add_subroutines): Assign appropriate classes to intrinsic subroutines.
2577 (add_conv): Set conversion attribute.
2578 (gfc_init_expr_extensions): Removed, removed all callers.
2579 (gfc_intrinsic_func_interface): Reimplemented check for non-standard
2580 initializatione expressions.
2581 * expr.c (check_specification_function): New.
2582 (gfc_is_constant_expr): Added check for specification functions.
2583 (check_init_expr_arguments): New.
2584 (check_inquiry): Changed return value to MATCH, added checks for
2585 inquiry functions defined by F2003.
2586 (check_transformational): New.
2588 (check_elemental): New.
2589 (check_conversion): New.
2590 (check_init_expr): Call new check functions, add more specific error
2593 2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
2596 * resolve.c (set_name_and_label): Set kind number for character
2597 version of c_f_pointer.
2598 (gfc_iso_c_sub_interface): Set the kind of the SHAPE formal arg to
2599 that of the actual SHAPE arg.
2600 * symbol.c (gen_shape_param): Initialize kind for SHAPE arg.
2602 2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
2605 * symbol.c (generate_isocbinding_symbol): Remove unnecessary
2609 * resolve.c (gfc_iso_c_func_interface): Reject assumed-shape and
2610 deferred-shape arrays as args to C_LOC. Fix bug in testing
2611 character args to C_LOC.
2613 2007-07-21 Lee Millward <lee.millward@gmail.com>
2616 * trans-intrinsic.c (gfc_conv_intrinsic_int): Evaluate all
2617 arguments passed, not just the first one. Adjust code to
2618 refer to "args[0]" instead of "arg" as a result.
2620 2007-07-19 Christopher D. Rickett <crickett@lanl.gov>
2623 * trans-expr.c (gfc_conv_function_call): Inline C_LOC.
2625 2007-07-18 Christopher D. Rickett <crickett@lanl.gov>
2628 * symbol.c (generate_isocbinding_symbol): Fix bug where
2629 ISOCBINDING_FUNPTR was generated for C_LOC instead of the needed
2632 2007-07-17 Janus Weil <jaydub66@gmail.com>
2635 * resolve.c (resolve_fl_namelist): Check for namelist private
2636 components in contained subprograms.
2638 2007-07-17 Paul Thomas <pault@gcc.gnu.org>
2642 * trans-expr.c (gfc_trans_subcomponent_assign): Ensure that
2643 renormalization unity base is done independently of existing
2645 (gfc_trans_scalar_assign): If rhs is not a variable, put
2646 lse->pre after rse->pre to ensure that de-allocation of lhs
2647 occurs after evaluation of rhs.
2649 2007-07-16 Lee Millward <lee.millward@gmail.com>
2654 * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
2655 to operate on a stack allocated array for the intrinsic arguments
2656 instead of creating a TREE_LIST. Add two new parameters for the
2657 array and the number of elements. Update all callers to allocate
2658 an array of the correct length to pass in. Update comment.
2659 (gfc_intrinsic_argument_list_length): New function.
2660 (gfc_conv_intrinsic_conversion): Call it.
2661 (gfc_conv_intrinsic_mnimax): Likewise.
2662 (gfc_conv_intrinsic_merge): Likewise.
2663 (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
2665 (gfc_conv_intrinsic_cmplx): Likewise.
2666 (gfc_conv_intrinsic_ctime): Likewise.
2667 (gfc_covn_intrinsic_fdate): Likewise.
2668 (gfc_conv_intrinsic_ttynam): Likewise.
2669 (gfc_conv_intrinsic_ishftc): Likewise.
2670 (gfc_conv_intrinsic_index): Likewise.
2671 (gfc_conv_intrinsic_scan): Likewise.
2672 (gfc_conv_intrinsic_verify): Likewise.
2673 (gfc_conv_intrinsic_trim): Likewise.
2674 (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
2675 (gfc_conv_intrinsic_exponent): Likewise.
2676 (gfc_conv_intrinsic_bound): Likewise.
2677 (gfc_conv_intrinsic_abs): Likewise.
2678 (gfc_conv_intrinsic_mod): Likewise.
2679 (gfc_conv_intrinsic_sign): Likewise.
2680 (gfc_conv_intrinsic_len): Likewise.
2681 (gfc_conv_intrinsic_adjust): Likewise.
2682 (gfc_conv_intrinsic_si_kind): Likewise.
2684 2007-07-16 Janne Blomqvist <jb@gcc.gnu.org>
2687 * trans-decl.c (gfc_build_builtin_function_decls): Remove
2688 DECL_IS_MALLOC attribute from internal_realloc, thus reverting
2689 part of my 2007-07-03 patch.
2691 2007-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2692 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2695 * gfortran.h (gfc_option_t): Add flag_sign_zero field.
2696 * lang.opt (-fsign-zero): New option.
2697 * trans.h: Rename gfor_fndecl_set_std into gfor_fndecl_set_options.
2698 * trans-decl.c (gfc_build_builtin_function_decls): Build the function
2699 declaration to pass an array containing the options to be used by the
2700 runtime library. (gfc_generate_function_code): Build an array that
2701 contains option values to be passed to the runtime library and the call
2703 * options.c (gfc_init_options): Initialize the flag_sign_zero field.
2704 (gfc_handle_option): Handle the -fsign-zero option.
2706 2007-07-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2709 * trans-array.c (gfc_conv_array_ref): Only evaluate index once.
2711 2007-07-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2714 * iresolve.c (gfc_resolve_mvbits): Convert FROMPOS, LEN and TOPOS
2717 2007-07-14 Thomas Koenig <tkoenig@gcc.gnu.org>
2720 * iresolve.c(gfc_resolve_pack): A scalar mask has
2721 to be kind=4, an array mask with kind<4 is converted
2722 to gfc_default_logical_kind automatically.
2723 (gfc_resolve_unpack): Convert mask to gfc_default_lotical_kind
2726 2007-07-14 Paul Thomas <pault@gcc.gnu.org>
2729 * parse.c (parse_spec): Emit error on unexpected statement
2732 2007-07-13 Daniel Franke <franke.daniel@gmail.com>
2734 * invoke.texi: Unified upper- and lower-case in menus.
2735 (-w, -W): Removed, documented by gcc.
2736 * intrinsic.texi: Unified Class-section entries, added
2737 subroutine/function warning where appropiate.
2739 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
2742 * decl.c (gfc_match_suffix): Removed surplus general error that hides
2743 a more specific message.
2744 * resolve.c (resolve_fl_variable): Reject illegal initializiers only
2745 if not already done.
2746 (resolve_fl_procedure): Added check for initializers of functions.
2748 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
2751 * invoke.texi (-static-libgfortran): Document new option.
2753 2007-07-12 Paul Thomas <pault@gcc.gnu.org>
2757 * module.c (write_generic): Restore patch of 2007-07-10 and use
2758 symbol name if there are no use names.
2760 2007-07-12 Christopher D. Rickett <crickett@lanl.gov>
2763 * decl.c (verify_c_interop_param): Require character string dummy
2764 args to BIND(C) procedures to have length 1.
2765 * resolve.c (resolve_fl_procedure): Modify parameter checking for
2769 * resolve.c (gfc_iso_c_func_interface): Verify that a valid
2770 expression is given as an argument to C_LOC and C_ASSOCIATED.
2771 * trans-io.c (transfer_expr): Add argument for code block. Add
2772 standards check to determine if an error message should be
2773 reported for printing C_PTR or C_FUNPTR.
2774 (transfer_array_component): Update arguments to transfer_expr.
2775 (gfc_trans_transfer): Ditto.
2777 * symbol.c (gen_cptr_param): Fix whitespace.
2779 2007-07-12 Jakub Jelinek <jakub@redhat.com>
2782 * trans.h (GFC_POINTER_TYPE_P): Define.
2783 * trans-types.c (gfc_sym_type): Set it for types on attr->sym.pointer.
2784 * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
2785 if GFC_POINTER_TYPE_P is set on the type.
2787 2007-07-12 Richard Guenther <rguenther@suse.de>
2789 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Convert
2790 arguments to gfc_charlen_type_node.
2791 * trans-io.c (gfc_convert_array_to_string): Convert type
2792 size to gfc_array_index_type.
2794 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
2798 * module.c: Reverted Paul's patch from 2007-07-10.
2800 2007-07-11 Richard Guenther <rguenther@suse.de>
2802 * trans-array.c (gfc_conv_array_parameter): Use correct
2803 types for comparison.
2804 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
2805 correct types for POINTER_PLUS_EXPR.
2806 * trans-stmt.c (gfc_trans_forall_loop): Use correct type
2807 for integer one constant.
2809 2007-07-10 Paul Thomas <pault@gcc.gnu.org>
2812 * resolve.c (is_external_proc): New function. Adds test that
2813 the symbol is not an intrinsic procedure.
2814 * (resolve_function, resolve_call): Replace logical statements
2815 with call to is_external_proc.
2818 * simplify.c (gfc_simplify_transfer): If mold has rank, the
2822 * module.c (write_generic): Write the local name of the
2825 2007-07-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2828 * trans-array.c (gfc_trans_array_constructor): Mark offset field
2829 with TREE_NO_WARNING.
2830 * trans-decl.c (gfc_build_qualified_array): Mark lbound, ubound,
2831 stride and size variables with TREE_NO_WARNING.
2833 2007-07-09 Steven G. Kargl <kargl@gcc.gnu.org>
2835 * trans-decl.c (set_tree_decl_type_code): Remove function.
2836 (generate_local_decl): Remove reference to set_tree_decl_type_code.
2838 2007-07-09 Daniel Franke <franke.daniel@gmail.com>
2841 * trans-decl.c (generate_local_decl) Emit a warning if an unused
2844 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
2847 * module.c (gfc_match_use): Do not set an non-existant
2848 intrinsic operator if a user-defined operator is found.
2850 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
2854 * trans-decl.c (generate_local_decl): Adjusted warning on unused
2855 dummy arguments, tell middle-end not to emit additional warnings.
2857 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
2858 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2861 * gfortran.h (gfc_intrinsic_op): Added INTRINSIC_EQ_OS,
2862 INTRINSIC_NE_OS, INTRINSIC_GT_OS, INTRINSIC_GE_OS,
2863 INTRINSIC_LT_OS and INTRINSIC_LE_OS.
2864 * arith.c (eval_intrinsic, eval_type_intrinsic0): Likewise.
2865 * arith.h (gfc_eq, gfc_ne, gfc_gt, gfc_ge, gfc_lt, gfc_le):
2866 Added gfc_intrinsic_op as third argument type.
2867 * dump-parse-tree.c (gfc_show_expr): Account for new enum values.
2868 * expr.c (simplify_intrinsic_op, check_intrinsic_op): Likewise.
2869 * interface.c (check_operator_interface): Likewise.
2870 (gfc_check_interfaces): Added cross-checks for FORTRAN 77 and
2871 Fortran 90 style operators using new enum values.
2872 (gfc_extend_expr): Likewise.
2873 (gfc_add_interface): Likewise.
2874 * match.c (intrinsic_operators): Distinguish FORTRAN 77 style
2875 operators from Fortran 90 style operators using new enum values.
2876 * matchexp.c (match_level_4): Account for new enum values.
2877 * module.c (mio_expr): Likewise.
2878 * resolve.c (resolve_operator): Deal with new enum values, fix
2879 inconsistent error messages.
2880 * trans-expr.c (gfc_conv_expr_op): Account for new enum values.
2882 2007-07-08 Tobias Burnus <burnus@net-b.de>
2885 * interface.c (get_expr_storage_size): Properly obtain lower bound.
2886 (compare_actual_formal): Add space before parenthesis.
2888 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
2891 * resolve.c (resolve_fl_procedure): Added check for PRIVATE types
2892 in PUBLIC interfaces.
2894 2007-07-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2897 * decl.c (match_attr_spec): Don't return MATCH_ERROR if comma found and
2898 gfc_match_bind_c does not return MATCH_YES.
2900 2007-07-07 Kazu Hirata <kazu@codesourcery.com>
2902 * decl.c, gfortran.h, interface.c, module.c, resolve.c,
2903 trans-array.c, trans-decl.c: Fix comment typos. Follow
2904 spelling conventions.
2905 * intrinsic.texi: Fix typos. Follow spelling conventions.
2907 2007-05-06 Daniel Franke <franke.daniel@gmail.com>
2910 * symbol.c (save_status): New.
2911 * gfortran.h (save_status): Added external declaration.
2912 (check_conflict): Check for conflicting explicite SAVE statements
2914 (gen_special_c_interop_ptr): Use SAVE_EXPLICIT constant.
2915 * module.c (ab_attribute, attr_bits): Removed enumerator value
2916 AB_SAVE for save attribute.
2917 (mio_symbol_attribute): Import/export the full SAVE status,
2918 removed usage of AB_SAVE.
2919 * dump-parse-tree.c (gfc_show_attr): Dump full SAVE status.
2920 * decl.c (add_init_expr_to_sym): Set SAVE_IMPLICIT only if not
2923 2007-07-05 Daniel Franke <franke.daniel@gmail.com>
2924 Tobias Burnus <burnus@net-b.de>
2927 * gfortran.h (symbol_attribute): Change save attribute into an enum.
2928 * decl.c (add_init_expr_to_sym): Set it to SAVE_IMPLICIT.
2929 * symbol.c (gfc_add_save): Check for SAVE_EXPLICIT.
2930 * resolve.c (resolve_fl_variable): Check for SAVE_EXPLICIT.
2931 (resolve_symbol): Allow OMP threadprivate with
2932 initialization SAVEd and save_all variable.
2933 * trans-decl.c (gfc_finish_var_decl): Remove obsolete sym->value check.
2935 2007-07-05 Paul Thomas <pault@gcc.gnu.org>
2938 * match.c (gfc_match_call): Check, in all cases, that a symbol
2939 is neither generic nor a subroutine before trying to add it as
2943 * match.c (gfc_match_do): Reset the implied_index attribute.
2945 2007-07-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2948 * trans-intrinsic.c (trans-intrinsic.c): Handle optional
2949 arguments correctly for MIN and MAX intrinsics.
2951 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2954 * io.c (check_format): Always call gfc_error for errors.
2955 (check_format_string): Change type of this function to try and
2956 return the result of check_format.
2957 (check_io_constraints): Return MATCH_ERROR if check_format_string
2960 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2963 * decl.c (get_proc_name): Include attr->mod_proc in check for error.
2965 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2968 * gfortran.h: Change type of gfc_assign_data_value from void to try.
2969 * data.c (gfc_assign_data_value): Return FAILURE if error found.
2970 * resolve.c (check_data_variable): If gfc_assign_data_value returns
2971 failure, break out of loop and return failure.
2973 2007-07-03 Christopher D. Rickett <crickett@lanl.gov>
2976 * symbol.c (gen_cptr_param): Generate C_PTR and C_FUNPTR if necessary.
2977 (build_formal_args): Pass intrinsic module symbol id to
2980 2007-07-03 Tobias Burnus <burnus@net-b.de>
2983 * resolve.c (resolve_common_blocks): New check function.
2984 (resolve_types): Use it.
2986 2007-07-03 Tobias Burnus <burnus@net-b.de>
2989 * interface.c (get_sym_storage_size): New function.
2990 (get_sym_storage_size): New function.
2991 (compare_actual_formal): Enhance sequence association
2992 support and improve checking.
2994 2007-07-03 Janne Blomqvist <jb@gcc.gnu.org>
2996 * trans-decl.c (gfc_build_builtin_function_decls): Mark
2997 internal_realloc as a malloc function.
2999 2007-07-03 Tobias Burnus <burnus@net-b.de>
3002 * resolve.c (resolve_operator): Check for NULL as operand.
3004 2007-07-02 Tobias Burnus <burnus@net-b.de>
3006 * gfortran.texi (Fortran 2003): Add ISO Bind C.
3007 * intrinsic.texi (C_ASSOCIATED,C_F_POINTER,C_F_PROCPOINTER,
3008 C_FUNLOC,C_LOC): Document new ISO Bind C intrinsics.
3010 2007-07-01 Christopher D. Rickett <crickett@lanl.gov>
3012 * interface.c (gfc_compare_derived_types): Special case for comparing
3013 derived types across namespaces.
3014 (gfc_compare_types): Deal with BT_VOID.
3015 (compare_parameter): Use BT_VOID to accept ISO C Binding pointers.
3016 * trans-expr.c (gfc_conv_function_call): Remove setting parm_kind
3018 (gfc_conv_initializer): Deal with ISO C Binding NULL_PTR and
3020 (gfc_conv_expr): Convert expressions for ISO C Binding derived types.
3021 * symbol.c (gfc_set_default_type): BIND(C) variables should not be
3022 Implicitly declared.
3023 (check_conflict): Add BIND(C) and check for conflicts.
3024 (gfc_add_explicit_interface): Whitespace.
3025 (gfc_add_is_bind_c): New function.
3026 (gfc_copy_attr): Use it.
3027 (gfc_new_symbol): Initialize ISO C Binding objects.
3028 (get_iso_c_binding_dt): New function.
3029 (verify_bind_c_derived_type): Ditto.
3030 (gen_special_c_interop_ptr): Ditto.
3031 (add_formal_arg): Ditto.
3032 (gen_cptr_param): Ditto.
3033 (gen_fptr_param): Ditto.
3034 (gen_shape_param): Ditto.
3035 (add_proc_interface): Ditto.
3036 (build_formal_args): Ditto.
3037 (generate_isocbinding_symbol): Ditto.
3038 (get_iso_c_sym): Ditto.
3039 * decl.c (num_idents_on_line, has_name_equals): New variables.
3040 (verify_c_interop_param): New function.
3041 (build_sym): Finish binding labels and deal with COMMON blocks.
3042 (add_init_expr_to_sym): Check if the initialized expression is
3043 an iso_c_binding named constants
3044 (variable_decl): Set ISO C Binding type_spec components.
3045 (gfc_match_kind_spec): Check match for C interoperable kind.
3046 (match_char_spec): Fix comment. Chnage gfc_match_small_int
3047 to gfc_match_small_int_expr. Check for C interoperable kind.
3048 (match_type_spec): Clear the current binding label.
3049 (match_attr_spec): Add DECL_IS_BIND_C. If BIND(C) is found, use it
3051 (set_binding_label): New function.
3052 (set_com_block_bind_c): Ditto.
3053 (verify_c_interop): Ditto.
3054 (verify_com_block_vars_c_interop): Ditto.
3055 (verify_bind_c_sym): Ditto.
3056 (set_verify_bind_c_sym): Ditto.
3057 (set_verify_bind_c_com_block): Ditto.
3058 (get_bind_c_idents): Ditto.
3059 (gfc_match_bind_c_stmt): Ditto.
3060 (gfc_match_data_decl): Use num_idents_on_line.
3061 (match_result): Deal with right paren in BIND(C).
3062 (gfc_match_suffix): New function.
3063 (gfc_match_function_decl): Use it. Code is re-arranged to deal with
3064 ISO C Binding result clauses.
3065 (gfc_match_subroutine): Deal with BIND(C).
3066 (gfc_match_bind_c): New function.
3067 (gfc_get_type_attr_spec): New function. Code is re-arranged in and
3068 taken from gfc_match_derived_decl.
3069 (gfc_match_derived_decl): Add check for BIND(C).
3070 * trans-common.c: Forward declare gfc_get_common.
3071 (gfc_sym_mangled_common_id): Change arg from 'const char *name' to
3072 'gfc_common_head *com'. Check for ISO C Binding of the common block.
3073 (build_common_decl): 'com->name' to 'com in SET_DECL_ASSEMBLER_NAME.
3074 * gfortran.h: Add GFC_MAX_BINDING_LABEL_LEN
3076 (sym_flavor): Add FL_VOID.
3077 (iso_fortran_env_symbol, iso_c_binding_symbol, intmod_id): New enum
3078 (CInteropKind_t): New struct.
3079 (c_interop_kinds_table): Use it. Declare an array of structs.
3080 (symbol_attribute): Add is_bind_c, is_c_interop, and is_iso_c
3082 (gfc_typespec): Add is_c_interop; is_iso_c, and f90_type members.
3083 (gfc_symbol): Add from_intmod, intmod_sym_id, binding_label, and
3084 common_block members.
3085 (gfc_common_head): Add binding_label and is_bind_c members.
3086 (gfc_gsymbol): Add sym_name, mod_name, and binding_label members.
3087 Add prototypes for get_c_kind, gfc_validate_c_kind,
3088 gfc_check_any_c_kind, gfc_add_is_bind_c, gfc_add_value,
3089 verify_c_interop, verify_c_interop_param, verify_bind_c_sym,
3090 verify_bind_c_derived_type, verify_com_block_vars_c_interop,
3091 generate_isocbinding_symbol, get_iso_c_sym, gfc_iso_c_sub_interface
3092 * iso-c-binding.def: New file. This file contains the definitions
3093 of the types provided by the Fortran 2003 ISO_C_BINDING intrinsic
3095 * trans-const.c (gfc_conv_constant_to_tree): Deal with C_NULL_PTR
3096 or C_NULL_FUNPTR expressions.
3097 * expr.c (gfc_copy_expr): Add BT_VOID case. For BT_CHARACTER, the
3098 ISO C Binding requires a minimum string length of 1 for '\0'.
3099 * module.c (intmod_sym): New struct.
3100 (pointer_info): Add binding_label member.
3101 (write_atom): Set len to 0 for NULL pointers. Check for NULL p and *p.
3102 (ab_attribute): Add AB_IS_BIND_C, AB_IS_C_INTEROP and AB_IS_ISO_C.
3103 (attr_bits): Add "IS_BIND_C", "IS_C_INTEROP", and "IS_ISO_C".
3104 (mio_symbol_attribute): Deal with ISO C Binding attributes.
3105 (bt_types): Add "VOID".
3106 (mio_typespec): Deal with ISO C Binding components.
3107 (mio_namespace_ref): Add intmod variable.
3108 (mio_symbol): Check for symbols from an intrinsic module.
3109 (load_commons): Check for BIND(C) common block.
3110 (read_module): Read binding_label and use it.
3111 (write_common): Add label. Write BIND(C) info.
3112 (write_blank_common): Blank commons are not BIND(C). Explicitly
3114 (write_symbol): Deal with binding_label.
3115 (sort_iso_c_rename_list): New function.
3116 (import_iso_c_binding_module): Ditto.
3117 (create_int_parameter): Add to args.
3118 (use_iso_fortran_env_module): Adjust to deal with iso_c_binding
3120 * trans-types.c (c_interop_kinds_table): new array of structs.
3121 (gfc_validate_c_kind): New function.
3122 (gfc_check_any_c_kind): Ditto.
3123 (get_real_kind_from_node): Ditto.
3124 (get_int_kind_from_node): Ditto.
3125 (get_int_kind_from_width): Ditto.
3126 (get_int_kind_from_minimal_width): Ditto.
3127 (init_c_interop_kinds): Ditto.
3128 (gfc_init_kinds): call init_c_interop_kinds.
3129 (gfc_typenode_for_spec): Adjust for BT_VOID and ISO C Binding pointers.
3130 Adjust handling of BT_DERIVED.
3131 (gfc_sym_type): Whitespace.
3132 (gfc_get_derived_type): Account for iso_c_binding derived types
3133 * resolve.c (is_scalar_expr_ptr): New function.
3134 (gfc_iso_c_func_interface): Ditto.
3135 (resolve_function): Use gfc_iso_c_func_interface.
3136 (set_name_and_label): New function.
3137 (gfc_iso_c_sub_interface): Ditto.
3138 (resolve_specific_s0): Use gfc_iso_c_sub_interface.
3139 (resolve_bind_c_comms): New function.
3140 (resolve_bind_c_derived_types): Ditto.
3141 (gfc_verify_binding_labels): Ditto.
3142 (resolve_fl_procedure): Check for ISO C interoperability.
3143 (resolve_symbol): Check C interoperability.
3144 (resolve_types): Walk the namespace. Check COMMON blocks.
3145 * trans-decl.c (gfc_sym_mangled_identifier): Prevent the mangling
3146 of identifiers that have an assigned binding label.
3147 (gfc_sym_mangled_function_id): Use the binding label rather than
3149 (gfc_finish_var_decl): Put variables that are BIND(C) into a common
3150 segment of the object file, because this is what C would do.
3151 (gfc_create_module_variable): Conver to proper types
3152 (set_tree_decl_type_code): New function.
3153 (generate_local_decl): Check dummy variables and derived types for
3154 ISO C Binding attributes.
3155 * match.c (gfc_match_small_int_expr): New function.
3156 (gfc_match_name_C): Ditto.
3157 (match_common_name): Deal with ISO C Binding in COMMON blocks
3158 * trans-io.c (transfer_expr): Deal with C_NULL_PTR or C_NULL_FUNPTR
3160 * match.h: Add prototypes for gfc_match_small_int_expr,
3161 gfc_match_name_C, match_common_name, set_com_block_bind_c,
3162 set_binding_label, set_verify_bind_c_sym,
3163 set_verify_bind_c_com_block, get_bind_c_idents,
3164 gfc_match_bind_c_stmt, gfc_match_suffix, gfc_match_bind_c,
3165 gfc_get_type_attr_spec
3166 * parse.c (decode_statement): Use gfc_match_bind_c_stmt
3167 (parse_derived): Init *derived_sym = NULL, and gfc_current_block
3168 later for valiadation.
3169 * primary.c (got_delim): Set ISO C Binding components of ts.
3170 (match_logical_constant): Ditto.
3171 (match_complex_constant): Ditto.
3172 (match_complex_constant): Ditto.
3173 (gfc_match_rvalue): Check for existence of at least one arg for
3174 C_LOC, C_FUNLOC, and C_ASSOCIATED.
3175 * misc.c (gfc_clear_ts): Clear ISO C Bindoing components in ts.
3176 (get_c_kind): New function.
3178 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
3181 * trans-expr.c (gfc_conv_power_op): Use builtin_powi for
3183 * f95-lang.c (gfc_init_builtin_functions): Add builtin_powi to the
3186 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
3188 * trans.h: Remove decls for 64-bit allocation functions.
3189 * trans-array.c (gfc_grow_array): Always pick the standard realloc
3191 (gfc_array_allocate): Likewise.
3192 * trans-decl.c: Remove trees for 64-bit allocation functions.
3193 (gfc_build_builtin_function_decls): Don't build fndecls for 64-bit
3194 allocations functions, use index_int_type for normal allocation
3197 2007-06-30 Daniel Franke <franke.daniel@gmail.com>
3200 * intrinsic.c (add_functions): Additional function types.
3201 (gfc_convert_type_warn): Remove intrinsic-flag from
3202 conversion functions.
3203 * resolve.c (resolve_symbol): Added type checks to
3204 explicitly defined intrinsics.
3206 2007-06-30 Tobias Burnus <burnus@net-b.de>
3209 * io.c (check_format): Allow zero to precede the
3212 2007-06-30 Paul Thomas <pault@gcc.gnu.org>
3215 * simplify.c (gfc_simplify_repeat): Add handling of character
3216 literal for first argument.
3218 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
3220 * resolve.c (resolve_operator): Added check whether a user
3221 defined operator is available.
3223 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
3225 * openmp.c (resolve_omp_clauses): Adjust error message to
3226 better reflect the actual requirement.
3228 2007-06-29 Tobias Burnus <burnus@net-b.de>
3231 * io.c (format_lex): Fix FMT_ZERO.
3232 (check_format,check_format_string,gfc_match_format,
3233 check_io_constraints) Additional checking for READ.
3235 2007-06-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3238 * lang.opt (static-libgfortran): New option.
3239 * gfortranspec.c (ADD_ARG_LIBGFORTRAN): New macro.
3240 (Option): Add OPTION_static and OPTION_static_libgfortran.
3241 (lookup_option): Handle the new -static-libgfortran option.
3242 (lang_specific_driver): Check whether -static is passed.
3243 Handle the new -static-libgfortran option.
3244 * options.c (gfc_handle_option): If -static-libgfortran is
3245 passed and isn't supported on this configuration, error out.
3247 2007-06-27 Daniel Franke <franke.daniel@gmail.com>
3250 * openmp.c (resolve_omp_clauses): Emit error on allocatable
3251 components in COPYIN, COPYPRIVATE, FIRSTPRIVATE and LASTPRIVATE
3254 2007-06-25 Paul Thomas <pault@gcc.gnu.org>
3257 * resolve.c (check_host_association): Return if the old symbol
3258 is use associated. Introduce retval to reduce the number of
3259 evaluations of the first-order return value.
3262 * match.c (gfc_match_call): If a host associated symbol is not
3263 a subroutine, build a new symtree/symbol in the current name
3266 2007-06-24 Tobias Burnus <burnus@net-de>
3269 * interface.c (gfc_compare_derived_types): Add access check.
3270 * symbol.c (gfc_find_component): Ditto.
3271 (gfc_set_component_attr,gfc_get_component_attr) Copy access state.
3272 * dump-parse-tree.c (gfc_show_components): Dump access state.
3273 * gfortran.h (struct gfc_component): Add gfc_access.
3274 * module.c (mio_component): Add access state.
3275 * (gfc_match_structure_constructor): Check for private access state.
3277 2007-06-24 Paul Thomas <pault@gcc.gnu.org>
3281 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Calculate
3282 the offset between the loop counter and the position as
3283 defined. Add the offset within the loop so that the mask acts
3284 correctly. Do not advance the location on the basis that it
3287 2007-06-22 Daniel Franke <franke.daniel@gmail.com>
3290 * symbol.c (gfc_copy_attr): Emit errors for duplicate
3291 EXTERNAL/INTRINSIC statements.
3293 2007-06-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3296 * expr.c (gfc_check_assign): If the rvalue expression type is NULL_EXPR,
3297 check to see if the lvalue has attribute pointer and data.
3299 2007-06-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3302 * resolve.c (gfc_resolve_iterator_expr): Add check for REAL using
3303 gfc_notify_standard. (gfc_resolve_iterator): Remove check.
3304 (resolve_branch): Change "Obsolete" to "Deleted feature".
3305 * io.c (resolve_tag): Ditto.
3306 * match.c (gfc_match_pause, gfc_match_assign, gfc_match_goto): Ditto.
3308 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3311 * match.c (gfc_match_common): If the symbol value expression type is
3312 NULL_EXPR, don't error if previously initialized.
3314 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3317 * decl.c (get_proc_name) Check symbol for generic interface
3320 2007-06-20 Andrew Pinski <andrew_pinski@playstation.sony.com>
3321 Richard Guenther <rguenther@suse.de>
3324 * trans.c (gfc_build_addr_expr): Use the correct types.
3326 2007-06-19 Paul Thomas <pault@gcc.gnu.org>
3330 * resolve.c (resolve_code): Use gfc_impure_variable as a
3331 condition for rejecting derived types with pointers, in pure
3333 (gfc_impure_variable): Add test for dummy arguments of pure
3334 procedures; any for functions and INTENT_IN for subroutines.
3337 * data.c (gfc_assign_data_value): Change the ICE on an array
3338 reference initializer not being an array into an error and
3339 clear init to prevent a repetition of the error.
3341 2007-06-17 Janne Blomqvist <jb@gcc.gnu.org>
3343 * gfortran.texi: Add documentation for GFORTRAN_UNBUFFERED_n
3344 environment variables. Fix documentation for
3345 GFORTRAN_UNBUFFERED_ALL environment variable.
3347 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
3349 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
3350 POINTER_PLUS_EXPR instead of PLUS_EXPR for pointer addition.
3351 * trans-expr.c (gfc_trans_string_copy): Create
3352 POINTER_PLUS_EXPR instead of a PLUS_EXPR
3355 2007-06-14 Paul Thomas <pault@gcc.gnu.org>
3358 * trans-common.c (build_common_decl): If resizing of common
3359 decl is needed, update the TREE_TYPE.
3361 2007-06-13 Tobias Burnus <burnus@net-b.de>
3364 * interface.c (has_vector_section): New.
3365 (compare_actual_formal): Check for array sections with vector subscript.
3367 2007-06-12 Dirk Mueller <dmueller@suse.de>
3369 * trans-stmt.c (gfc_trans_call): fix gcc_assert to
3370 a comparison, not an assignment.
3372 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
3374 * trans-common.c (create_common): Initialize 'field_init'.
3376 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
3380 * trans-common.c (get_init_field): New function.
3381 (create_common): Call get_init_field for overlapping
3382 initializers in equivalence blocks.
3383 * resolve.c (resolve_equivalence_derived, resolve_equivalence):
3384 Remove constraints on initializers in equivalence blocks.
3385 * target-memory.c (expr_to_char, gfc_merge_initializers):
3387 (encode_derived): Add the bit offset to the byte offset to get
3388 the total offset to the field.
3389 * target-memory.h : Add prototype for gfc_merge_initializers.
3391 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
3393 * trans-types.c (gfc_signed_type): Remove.
3394 * trans-types.h (gfc_signed_type): Remove.
3395 * f95-lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
3397 2007-06-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3399 * trans-intrinsic.c: Revert Lee's 2007-06-04 patch.
3401 2007-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
3402 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3405 * match.c (gfc_match_special_char): New function. Match special char.
3407 * match.h: Add prototype.
3408 * io.c (next_char): Use it.
3409 * primary.c (next_string_char): Ditto.
3411 2007-06-06 Steven G. Kargl <kargl@gcc.gnu.org>
3413 * decl.c: Miscellaneous whitespace fixes.
3415 * gfortran.h: Likewise.
3416 * interface.c : Likewise.
3418 * match.c: Likewise.
3419 * match.h: Likewise.
3420 * module.c: Likewise.
3421 * parse.c: Likewise.
3422 * resolve.c: Likewise.
3423 * symbol.c: Likewise.
3424 * trans-array.c: Likewise.
3425 * trans-common.c: Likewise.
3426 * trans-decl.c: Likewise.
3427 * trans-intrinsic.c: Likewise.
3428 * trans-io.c: Likewise.
3429 * trans-stmt.c: Likewise.
3430 * trans-types.c: Likewise.
3432 2007-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3435 * parse.c (decode_statement): Don't call gfc_undo_symbols on MATCH_ERROR
3436 for ST_FUNCTION since it is called in reject_statement.
3437 (parse_contained): If error, loop back after reject_statement and try
3438 again. Free the namespace if an error occured.
3440 2007-06-04 Lee Millward <lee.millward@codesourcery.com>
3442 * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
3443 to operate on a stack allocated array for the intrinsic arguments
3444 instead of creating a TREE_LIST. Add two new parameters for the
3445 array and the number of elements. Update all callers to allocate
3446 an array of the correct length to pass in. Update comment.
3447 (gfc_intrinsic_argument_list_length): New function.
3448 (gfc_conv_intrinsic_mnimax): Call it.
3449 (gfc_conv_intrinsic_merge): Likewise.
3450 (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
3452 (gfc_conv_intrinsic_cmplx): Likewise.
3453 (gfc_conv_intrinsic_ctime): Likewise.
3454 (gfc_covn_intrinsic_fdate): Likewise.
3455 (gfc_conv_intrinsic_ttynam): Likewise.
3456 (gfc_conv_intrinsic_ishftc): Likewise.
3457 (gfc_conv_intrinsic_index): Likewise.
3458 (gfc_conv_intrinsic_scan): Likewise.
3459 (gfc_conv_intrinsic_verify): Likewise.
3460 (gfc_conv_intrinsic_trim): Likewise.
3461 (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
3462 (gfc_conv_intrinsic_exponent): Likewise.
3463 (gfc_conv_intrinsic_bound): Likewise.
3464 (gfc_conv_intrinsic_abs): Likewise.
3465 (gfc_conv_intrinsic_mod): Likewise.
3466 (gfc_conv_intrinsic_sign): Likewise.
3467 (gfc_conv_intrinsic_len): Likewise.
3468 (gfc_conv_intrinsic_adjust): Likewise.
3469 (gfc_conv_intrinsic_si_kind): Likewise.
3471 2007-06-04 Steve Ellcey <sje@cup.hp.com>
3473 * trans-array.c (gfc_conv_array_parameter): Initialize tmp.
3475 2007-05-31 Richard Guenther <rguenther@suse.de>
3477 * trans-expr.c (gfc_conv_expr_op): Use zero constant
3478 that matches the lse type.
3479 (gfc_trans_string_copy): Use sizetype zero constant.
3480 * intrinsic.c (add_functions): The sizeof intrinsic has
3482 * trans-types.c (gfc_get_dtype): Convert size to index
3483 type before shifting.
3484 * trans-array.c (gfc_trans_array_constructor_value): Use
3485 index type for offset computation.
3486 * trans-intrinsic.c (gfc_conv_associated): Use correct type
3489 2007-05-31 Paul Thomas <pault@gcc.gnu.org>
3492 * trans-array.c (gfc_trans_array_constructor): Treat the case
3493 where the ss expression charlen is missing.
3495 22007-05-31 Paul Thomas <pault@gcc.gnu.org>
3498 * module.c (mio_symtree_ref): If an equivalence group member
3499 is not used, give it a hidden symbol and set the pointer_info.
3500 (load_equiv): Only free the equivalence if none of the members
3503 2007-05-29 Daniel Franke <franke.daniel@gmail.com>
3505 * gfortran.h: Renamed 'enum gfc_generic_isym_id' to 'enum gfc_isym_id',
3506 added missing GFC_ISYM_* enumerators, ordered alphabetically.
3507 (struct gfc_intrinsic_sym): Renamed 'generic_id' to 'id'.
3508 (gfc_find_subroutine): New prototype.
3509 * intrinsic.c (add_sym, add_sym_*): Added argument 'id' and changed all callers.
3510 (find_subroutine): Renamed to 'gfc_find_subroutine', removed static.
3511 * dependency.c: Changed usage of isym->generic_id to isym->id.
3512 * openmp.c: Likewise.
3513 * resolve.c: Likewise.
3514 * trans-array.c: Likewise.
3515 * trans-expr.c: Likewise.
3516 * trans-intrinsic.c: Likewise.
3517 * trans-openmp.c: Likewise.
3519 2007-05-28 Tobias Schlüter <tobi@gcc.gnu.org>
3521 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIZEOF.
3522 * intrinsic.c (add_functions): Add stuff for SIZEOF intrinsic.
3523 * intrinsic.h (gfc_check_sizeof): Add prototype of ...
3524 * check.c (gfc_check_sizeof): .. new function.
3525 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): New function.
3526 (gfc_conv_intrinsic_strcmp): Whitespace fix.
3527 (gfc_conv_intrinsic_array_transfer): Remove double initialization,
3528 use fold_build. where appropriate.
3529 (gfc_conv_intrinsic_function): Add case for SIZEOF.
3530 * intrinsic.texi: Add documentation for SIZEOF.
3532 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
3534 * trans-array.c (gfc_conv_expr_descriptor): Edit comment.
3536 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
3539 * target-memory.c (gfc_target_expr_size): Add handling
3540 for size of BT_HOLLERITH variables.
3541 * check.c (gfc_check_transfer): Reject BT_HOLLERITH
3542 variables in MOLD argument of TRANSFER.
3544 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
3546 * gfortran.h (gfc_expr): Remove from_H, add "representation"
3548 * primary.c (match_hollerith_constant): Store the representation
3549 of the Hollerith in representation, not in value.character.
3550 * arith.c: Add dependency on target-memory.h.
3551 (eval_intrinsic): Remove check for from_H.
3552 (hollerith2representation): New function.
3553 (gfc_hollerith2int): Determine value of the new constant.
3554 (gfc_hollerith2real): Likewise.
3555 (gfc_hollerith2complex): Likewise.
3556 (gfc_hollerith2logical): Likewise.
3557 (gfc_hollerith2character): Point both representation.string and
3558 value.character.string at the value string.
3559 * data.c (create_character_initializer): For BT_HOLLERITH
3560 rvalues, get the value from the representation rather than
3562 * expr.c (free_expr0): Update handling of BT_HOLLERITH values
3563 and values with representation.string.
3564 (gfc_copy_expr): Likewise.
3565 * intrinsic.c (do_simplify): Remove special treatement of
3566 variables resulting from Hollerith constants.
3567 * dump-parse-trees.c (gfc_show_expr): Update handling of
3569 * trans-const.c (gfc_conv_constant_to_tree): Replace from_H
3570 check with check for representation.string; get Hollerith
3571 representation from representation.string, not value.character.
3572 * trans-expr.c (is_zero_initializer_p): Replace from_H check
3573 with check for representation.string.
3574 * trans-stmt.c (gfc_trans_integer_select): Use
3575 gfc_conv_mpz_to_tree for case values, so as to avoid picking up
3576 the memory representation if the case is given by a transfer
3578 * target-memory.c (gfc_target_encode_expr): Use the known memory
3579 representation rather than the value, if it exists.
3580 (gfc_target_interpret_expr): Store the memory representation of
3581 the interpreted expression as well as its value.
3582 (interpret_integer): Move to gfc_interpret_integer, make
3584 (interpret_float): Move to gfc_interpret_float, make non-static.
3585 (interpret_complex): Move to gfc_interpret_complex, make
3587 (interpret_logical): Move to gfc_interpret_logical, make
3589 (interpret_character): Move to gfc_interpret_character, make
3591 (interpret_derived): Move to gfc_interpret_derived, make
3593 * target-memory.h: Add prototypes for newly-exported
3594 gfc_interpret_* functions.
3596 2007-05-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3599 * parse.c (next_statement): Warn for truncated lines if source is free
3602 2007-05-27 Paul Thomas <pault@gcc.gnu.org>
3603 Tobias Burnus <burnus@net-b.de>
3606 * symbol.c (gfc_check_function_type): Copy dimensions of
3608 * resolve.c (resolve_contained_fntype): Improve symbol output in
3611 2007-05-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3614 * io.c (check_format): Add warning for H specifier in format.
3616 2007-05-26 Tobias Burnus <burnus@net-b.de>
3618 * gfortran.texi: Document the GFORTRAN_ERROR_DUMPCORE and
3619 GFORTRAN_ERROR_BACKTRACE environment variables.
3621 2007-05-26 Paul Thomas <pault@gcc.gnu.org>
3624 * trans.h : Add no_function_call bitfield to gfc_se structure.
3625 Add stmtblock_t argument to prototype of get_array_ctor_strlen.
3626 * trans-array.c (get_array_ctor_all_strlen): New function.
3627 (get_array_ctor_strlen): Add new stmtblock_t argument and call
3628 new function for character elements that are not constants,
3629 arrays or variables.
3630 (gfc_conv_array_parameter): Call get_array_ctor_strlen to get
3632 * trans-intrinsic (gfc_conv_intrinsic_len): Add new argument
3633 to call of get_array_ctor_strlen.
3635 2007-05-25 Kazu Hirata <kazu@codesourcery.com>
3637 * intrinsic.texi: Fix typos.
3639 2007-05-25 Paul Thomas <pault@gcc.gnu.org>
3642 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Change
3643 order in logic under EXPR_FUNCTION to handle functions with
3646 2007-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3649 * array.c (spec_dimen_size): Test for correct BT_INTEGER type.
3651 2007-05-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3654 * trans-expr.c (gfc_trans_zero_assign): Convert the result of
3655 TYPE_SIZE_UNIT into a signed type.
3656 (gfc_trans_array_copy): Likewise.
3657 (gfc_trans_array_constructor_copy): Likewise.
3658 * trans-array.c (gfc_trans_create_temp_array): Likewise.
3659 (gfc_grow_array): Likewise.
3660 (gfc_array_init_size): Likewise.
3661 (gfc_duplicate_allocatable): Likewise.
3662 * trans-stmt.c (allocate_temp_for_forall_nest_1): Likewise.
3664 2007-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3667 * resolve.c (resolve_function): Don't call resolve_global_procedure if
3668 there is no name. Delete duplicated statement in ELSE clause.
3670 2007-05-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3673 * trans-array.c (gfc_trans_array_bound_check): Take extra argument to
3674 indicate whether we should check the upper bound in that dimension.
3675 (gfc_conv_array_index_offset): Check only the lower bound of the
3676 last dimension for assumed-size arrays.
3677 (gfc_conv_array_ref): Likewise.
3678 (gfc_conv_ss_startstride): Likewise.
3680 2007-05-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3681 Daniel Franke <franke.daniel@gmail.com>
3684 * resolve.c (resolve_actual_arglist): Resolve actual argument after
3685 being identified as variable.
3687 2007-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3690 * trans-stmt.c (gfc_trans_do): Fix the value of loop variable
3693 2007-05-21 H.J. Lu <hongjiu.lu@intel.com>
3695 * trans-stmt.c (gfc_trans_do): Fix a typo in comment.
3697 2007-05-21 Paul Thomas <pault@gcc.gnu.org>
3701 * trans-array.c (gfc_conv_expr_descriptor): Obtain the stored
3702 offset for non-descriptor, source arrays and correct for stride
3703 not equal to one before writing to field of output descriptor.
3705 2007-05-20 Daniel Franke <franke.daniel@gmail.com>
3708 * check.c (check_rest): Improved argument conformance check and
3709 fixed error message generation.
3711 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3714 * Make-lang.in: Remove use of -Wno-error for expr.o, resolve.o,
3715 simplify.o and trans-common.o.
3717 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3720 * trans-array.c (gfc_trans_auto_array_allocation): Avoid
3721 multiplication of mismatched types.
3723 2007-05-18 Daniel Franke <franke.daniel@gmail.com>
3726 * symbol.c (gfc_add_flavor): Add the NAME to error message if
3729 2007-05-15 Daniel Franke <franke.daniel@gmail.com>
3734 * intrinsic.c (check_specific): Check elemental intrinsics for
3736 (add_functions): Fixed dummy argument names of BESJN and BESYN.
3737 Fixed elemental status of MCLOCK and MCLOCK8.
3738 * check.c (check_rest): Added check for array conformance.
3739 (gfc_check_merge): Removed check for array conformance.
3740 (gfc_check_besn): Removed check for scalarity.
3741 * intrinsic.texi (CSHIFT, EOSHIFT): Fixed typos.
3742 (BESJN, BESYN): Clarified documentation.
3744 2007-05-17 Tobias Burnus <burnus@net-b.de>
3746 * gfortran.texi (GFORTRAN_CONVERT_UNIT): Improve documentation.
3748 2007-05-16 Brooks Moses <brooks.moses@codesourcery.com>
3755 * target-memory.c: New file.
3756 * target-memory.h: New file.
3757 * simplify.c: Add #include "target-memory.h".
3758 (gfc_simplify_transfer): Implement constant-
3759 folding for TRANSFER intrinsic.
3760 * Make-lang.in: Add dependencies on new target-memory.* files.
3762 2007-05-15 Paul Brook <paul@codesourcery.com>
3764 * trans-types.c (gfc_type_for_size): Handle signed TImode.
3766 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3769 * trans.h (gfor_fndecl_internal_malloc, gfor_fndecl_internal_malloc64,
3770 gfor_fndecl_internal_free): Remove prototypes.
3771 (gfor_fndecl_os_error, gfc_call_free, gfc_call_malloc): Add prototypes.
3772 * trans.c (gfc_call_malloc, gfc_call_free): New functions.
3773 * f95-lang.c (gfc_init_builtin_functions): Add __builtin_free
3774 and __builtin_malloc builtins.
3775 * trans-decl.c (gfor_fndecl_internal_malloc,
3776 gfor_fndecl_internal_malloc64, gfor_fndecl_internal_free): Remove.
3777 (gfor_fndecl_os_error): Add.
3778 (gfc_build_builtin_function_decls): Don't create internal_malloc,
3779 internal_malloc64 and internal_free library function declaration.
3780 Create os_error library call function declaration.
3781 * trans-array.c (gfc_trans_allocate_array_storage,
3782 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
3783 gfc_conv_array_parameter, gfc_duplicate_allocatable): Use
3784 gfc_call_malloc and gfc_call_free instead of building calls to
3785 internal_malloc and internal_free.
3786 * trans-expr.c (gfc_conv_string_tmp): Likewise.
3787 * trans-stmt.c (gfc_do_allocate, gfc_trans_assign_need_temp,
3788 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
3789 gfc_trans_where_2: Likewise.
3790 * trans-intrinsic.c (gfc_conv_intrinsic_ctime,
3791 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
3792 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_trim): Likewise.
3794 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3797 * trans-expr.c (gfc_conv_substring): Evaluate substring bounds
3800 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
3802 * f95-lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
3803 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use unsigned_type_for
3804 instead of gfc_unsigned_type.
3805 * trans-stmt.c (gfc_trans_do): Use unsigned_type_for instead of
3807 * trans-types.c (gfc_unsigned_type): Remove.
3808 * trans-types.h (gfc_unsigned_type): Remove.
3810 2007-05-12 Paul Thomas <pault@gcc.gnu.org>
3813 * resolve.c (check_host_association): New function that detects
3814 incorrect host association and corrects it.
3815 (gfc_resolve_expr): Call the new function for variables and
3817 * match.h : Remove prototype for gfc_match_rvalue.
3818 * gfortran.h : Add prototype for gfc_match_rvalue.
3820 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
3823 * trans-expr.c (gfc_conv_function_call): Reduce indirection for
3824 direct assignments of recursive array valued functions.
3825 * primary.c (gfc_match_rvalue): Correct error for recursive
3826 function calls such that directly recursive calls of scalar
3827 function without an explicit result are disallowed.
3829 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
3832 * resolve.c (resolve_fl_namelist): It is not an error if the
3833 namelist element is the result variable of the enclosing
3834 function. Search for the symbol in current and all parent
3835 namespaces for a potential conflict.
3836 * symbol.c (check_conflict): Remove the conflict between
3837 'in_namelist' and 'FL_PROCEDURE' because the symbol info
3838 is not available to exclude function result variables.
3839 * trans-io.c (nml_get_addr_expr): Use the fake result decl
3840 if the symbol is an implicit result variable.
3842 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
3845 * decl.c (get_proc_name): If an entry has already been declared
3846 as a module procedure, pick up the symbol and the symtree and
3847 use them for the entry.
3849 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
3852 * resolve.c (resolve_symbol): Remove the flagging mechanism from the
3853 formal namespace resolution and instead check that the formal
3854 namespace is not the current namespace.
3856 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
3859 * trans-array.c (gfc_conv_array_parameter): Convert full array
3860 references to the result of the procedure enclusing the call.
3862 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
3866 * decl.c (add_init_expr_to_sym): Expand a scalar initializer
3867 for a parameter array into an array expression with the right
3869 * array.c (spec_dimen_size): Remove static attribute.
3870 * gfortran.h : Prototype for spec_dimen_size.
3872 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3875 * trans-stmt.c (gfc_trans_do): Handle large loop counts.
3877 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3880 * simplify.c (gfc_simplify_new_line): NEW_LINE can be simplified
3881 even for non constant arguments.
3883 2007-05-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3884 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3887 * gfortran.h: Add runtime error codes from libgfortran.h. Define
3889 * trans.c (gfc_trans_runtime_check): Update the format of runtime error
3890 messages to match library runtime errors. Use call to new library
3891 function runtime_error_at().
3892 * trans.h: Add prototype for new function gfc_trans_io_runtime_check.
3893 Add declaration for library functions runtime_error_at and
3895 * trans_io.c (gfc_trans_io_runtime_check): New function.
3896 (set_parameter_value): Add error checking for UNIT numbers.
3897 (set_parameter_ref): Initialize the users variable to zero.
3898 (gfc_trans_open): Move setting of unit number to after setting of common
3899 flags so that runtime error trapping can be detected.
3900 (gfc_trans_close): Likewise. (build_filepos): Likewise.
3901 (gfc_trans_inquire): Likewise. (build_dt): Likewise.
3902 * trans-decl.c: Add declarations for runtime_error_at and
3903 generate_error. (gfc_build_builtin_function_decls): Build function
3904 declarations for runtime_error_at and generate_error.
3906 2007-05-06 Paul Thomas <pault@gcc.gnu.org>
3909 * resolve.c (resolve_fl_procedure): Resolve constant character
3912 2007-05-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3915 * decl.c (match_char_spec): Add check for invalid character lengths.
3917 2007-05-04 Brooks Moses <brooks.moses@codesourcery.com>
3919 * intrinsic.texi (CMPLX): Document result kind.
3920 (COMPLEX): Add documentation.
3922 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
3925 * intrinsic.c (add_functions): Replaced calls to gfc_check_g77_math1
3926 by gfc_check_fn_r to avoid checks for scalarity.
3927 * check.c (gfc_check_besn): Removed check for scalarity.
3928 (gfc_check_g77_math1): Removed.
3929 * intrinsic.h (gfc_check_g77_math1): Removed.
3931 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
3933 * check.c (gfc_check_fseek_sub): Fixed typo.
3935 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
3938 * intrinsic.c (add_subroutines): Added FSEEK.
3939 * intrinsic.h (gfc_resolve_fseek_sub, gfc_check_fseek_sub): New.
3940 * iresolve.c (gfc_resolve_fseek_sub): New.
3941 * check.c (gfc_check_fseek_sub): New.
3942 * intrinsic.texi (FSEEK): Updated.
3944 2007-05-04 Tobias Burnus <burnus@net-b.de>
3947 * expr.c (gfc_check_pointer_assign): Check for NULL pointer.
3949 2007-05-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3952 * simplify.c (gfc_simplify_len): Only simplify integer lengths.
3954 2007-05-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3957 * simplify.c (gfc_simplify_repeat): Don't put function call with
3958 side effect in a gcc_assert().
3960 2007-05-04 Tobias Burnus <burnus@net-b.de>
3963 * interface.c (compare_actual_formal): Check character length.
3965 2007-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
3968 * dependency.c (gfc_full_array_ref_p): If the reference is
3969 to a single element, check that the array has a single
3970 element and that the correct element is referenced.
3972 2007-05-01 Daniel Franke <franke.daniel@gmail.com>
3974 * intrinsic.c (add_functions): Fixed ELEMENTAL specifications.
3975 (add_subroutines): Replaced magic numbers in function calls by
3976 ELEMENTAL and NOT_ELEMENTAL respectively.
3977 * intrinsic.texi (MVBITS): Changed class to elemental subroutine.
3978 (RANDOM_NUMBER): Changed class to subroutine.
3979 (HUGE, TINY): Changed class to inquiry function.
3981 2007-04-30 Brooks Moses <brooks.moses@codesourcery.com>
3983 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_get_double_int.
3984 (gfc_conv_tree_to_mpz): New function.
3985 (gfc_conv_mpfr_to_tree): Use real_from_mpfr.
3986 (gfc_conv_tree_to_mpfr): New function.
3987 * trans-const.h: (gfc_conv_tree_to_mpz): New prototype.
3988 (gfc_conv_tree_to_mpfr): New prototype.
3990 2007-04-30 Daniel Franke <franke.daniel@gmail.com>
3992 * intrinsic.texi (IERRNO): Changed class to non-elemental function.
3993 (LOG10): Removed COMPLEX as accepted argument type.
3994 (NEW_LINE): Changed class from elemental to inquiry function.
3995 (SIGN): Removed requirement of scalar arguments.
3996 (SNGL): Changed class to elemental function.
3998 2007-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4001 * simplify.c (simplify_bound_dim): New function.
4002 (simplify_bound): Use the above. Perform simplification of LBOUND
4003 and UBOUND when DIM argument is not present.
4005 2007-04-29 Daniel Franke <franke.daniel@gmail.com>
4007 * gfortran.texi: Cleaned up keyword index.
4008 * invoke.texi: Likewise.
4009 * intrinsic.texi: Likewise.
4011 2007-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4014 * scanner.c (load_file): Discard the byte order mark if one is
4015 found on the first non-preprocessor line of a file.
4017 2007-04-29 Paul Thomas <pault@gcc.gnu.org>
4020 * trans-array.c (gfc_conv_resolve_dependencies): Create a temp
4021 whenever a dependency is found.
4023 2007-04-28 Tobias Schlüter <tobi@gcc.gnu.org>
4025 * options.c (gfc_handle_option): Ensure requested free form line
4026 length is not too small.
4028 2007-04-27 Brooks Moses <brooks.moses@codesourcery.com>
4030 * intrinsic.texi (Transfer): Improve documentation.
4032 2007-04-27 Brooks Moses <brooks.moses@codesourcery.com>
4034 * gfortran.texi (Option Index): Add @samp as needed.
4036 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
4038 * gfortran.texi: Added node and menu entry for an option index.
4039 * invoke.texi: Moved command line option related entries of the concept
4040 index to the option index.
4042 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
4044 * intrinsic.texi (AND, FPUT, FPUTC, MODULO, OR, SET_EXPONENT,
4045 XOR): Fixed examples.
4047 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
4049 * intrinsic.texi (PRODUCT, RESHAPE, SPACING, SPREAD, SUM,
4050 SYSTEM_CLOCK, TRANSFER, UNPACK): New.
4051 (DATE_AND_TIME, CPU_TIME, RRSPACING): Added cross references.
4053 2007-04-26 Daniel Franke <franke.daniel@gmail.com>
4055 * intrinsic.texi (NULL, PACK, PRESENT, REPEAT, SCAN, SHAPE,
4056 SIZE, TRANSPOSE, TRIM, VERIFY): New.
4057 (ADJUSTL, ADJUSTR, INDEX): Added cross references.
4058 (INT, INT2, INT8, LONG): Enabled section header.
4060 2007-04-25 Janne Blomqvist <jb@gcc.gnu.org>
4062 * module.c (module_char): Replace fgetc() with
4064 (write_char): Replace fputc() with putc().
4065 * scanner.c (load_line): Replace fgetc() with getc().
4066 (gfc_read_orig_filename): Likewise.
4068 2007-04-25 Tobias Burnus <burnus@net-b.de>
4071 * error.c (error_print): Fix %% support.
4072 * intrinsic.c (sort_actual): Improve error message.
4073 * resolve.c (resolve_actual_arglist): Allow %VAL for
4074 interfaces defined in the module declaration part.
4076 2007-04-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4079 * intrinsic.texi (GETLOG): Update documentation to reflect
4082 2007-04-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4085 * module.c (write_char): Add character to the MD5 buffer.
4086 (read_md5_from_module_file): New function.
4087 (gfc_dump_module): Compute MD5 for new module file. Call
4088 read_md5_from_module_file. Only overwrite old module file
4089 if the new MD5 is different.
4091 2007-04-23 Paul Thomas <pault@gcc.gnu.org>
4094 * resolve.c (resolve_symbol): Allow resolution of formal
4095 namespaces nested within formal namespaces coming from modules.
4098 * trans-expr.c (gfc_trans_assignment): Make the call to
4099 gfc_trans_zero_assign conditional on the lhs array ref being
4102 2007-04-23 Tobias Burnus <burnus@net-b.de>
4104 * primary.c (match_integer_constant): Mention -fno-range-check
4105 in the error message.
4107 2007-04-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4110 * scanner.c (load_line): Remove check for comment after ampersand and
4111 adjust tracking of ampersand.
4113 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
4115 * f95-lang.c (lang_tree_node): Use GENERIC_NEXT
4116 instead of checking GIMPLE_STMT_P in chain_next.
4118 2007-04-17 Tobias Schlüter <tobi@gcc.gnu.org>
4120 * trans-types.h (gfc_packed): New enum.
4121 (gfc_get_nodesc_array_type): Change prototype to use new enum.
4122 * trans-types.c (gfc_get_nodesc_array): Use gfc_packed for
4123 argument packed. Adapt all references to values accordingly.
4124 (gfc_sym_type): Use enum values in call to gfc_get_nodesc_array.
4125 (gfc_get_derived_type): Likewise.
4126 * trans-array.c (gfc_build_constant_array_constructor): Likewise.
4127 * trans-expr.c (gfc_get_interface_mapping_charlen): Changed packed
4128 argument to type gfc_packed.
4129 (gfc_add_interface_mapping): Use enum values in call to
4130 gfc_get_interface_mapping.
4131 * trans-decl.c (gfc_build_dummy_array_decl): Adapt to use enum
4132 values when determining packing.
4134 * trans-decl.c (gfc_finish_decl): Remove unused second argument
4135 'init'. Simplify code accordingly. Remove calls to
4136 gfc_fatal_error in favor of gcc_assert.
4137 (create_function_arglist): Remove second argument from calls to
4139 (gfc_trans_dummy_character): Likewise.
4141 * arith.h: Update copyright years.
4142 * dependency.h: Likewise.
4143 * gfortran.h: Likewise.
4144 * lang-specs.h: Likewise.
4145 * parse.h: Likewise.
4146 * symbol.c: Likewise.
4147 * trans.h: Likewise.
4148 * trans.c: Likewise.
4149 * trans-array.c: Likewise.
4150 * trans-common.c: Likewise.
4151 * trans-const.h: Likewise.
4152 * trans-const.c: Likewise.
4153 * trans-decl.c: Likewise.
4154 * trans-expr.c: Likewise.
4155 * trans-io.c: Likewise.
4156 * trans-openmp.c: Likewise.
4157 * trans-types.h: Likewise.
4158 * types.def: Likewise.
4160 2007-04-17 Tobias Schlüter <tobi@gcc.gnu.org>
4163 * decl.c (gfc_sym_mangled_identifier): Use capital letters in name
4165 (gfc_sym_mangled_function_id): Likewise.
4167 2007-04-15 Paul Thomas <pault@gcc.gnu.org>
4170 * primary.c (check_for_implicit_index): New function to check
4171 that a host associated variable is not an undeclared implied
4173 (gfc_match_rvalue, match_variable): Use it and reset the
4174 implied_index attribute.
4175 * gfortran.h : Add the implied_index field to symbol_attribute.
4176 * match.c (gfc_match_iterator): Mark the iterator variable
4177 with the new attribute.
4178 * decl.c (build_sym): Reset the new attribute.
4180 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
4182 * gfc-internals.texi: Fix typos.
4183 * simplify.c: Fix a comment typo.
4185 2007-04-14 Bernhard Fischer <aldot@gcc.gnu.org>
4187 * primary.c: Commentary typo fix; Add question about redundant (?)
4190 2007-04-14 Paul Thomas <pault@gcc.gnu.org>
4194 * expr.c (scalarize_intrinsic_call): New function to
4195 scalarize elemental intrinsic functions in initialization
4197 (check_init_expr): Detect elemental intrinsic functions
4198 in initalization expressions and call previous.
4200 2007-04-13 Tobias Burnus <burnus@net-b.de>
4203 * primary.c (match_variable): External functions
4206 2007-04-13 Paul Thomas <pault@gcc.gnu.org>
4209 * trans-types.c (copy_dt_decls_ifequal): Do not get pointer
4210 derived type components.
4212 2007-04-13 Tobias Schlüter <tobi@gcc.gnu.org>
4215 * resolve.c: Include obstack.h and bitmap.h. New variable
4217 (code_stack): Add tail and reachable_labels fields.
4218 (reachable_labels): New function.
4219 (resolve_branch): Rework to use new fields in code_stack.
4220 (resolve_code): Call reachable_labels.
4221 (resolve_codes): Allocate and free labels_obstack.
4223 2007-04-12 Tobias Schlüter <tobi@gcc.gnu.org>
4226 * decl.c (match_char_spec): Move check for negative CHARACTER
4228 * resolve.c (resolve_charlen): ... here.
4229 (resolve_types): Resolve CHARACTER lengths earlier.
4231 2007-04-12 Daniel Franke <franke.daniel@gmail.com>
4234 * intrinsic.texi (RANDOM_SEED, RANDOM_NUMBER): New.
4236 2007-04-12 Tobias Schlüter <tobi@gcc.gnu.org>
4239 * primary.c (gfc_variable_attr): Don't copy string length if it
4241 * resolve.c (resolve_code): Clarify error message.
4244 * decl.c (gfc_match_end): Also check for construct name in END
4245 FORALL and END WERE statements.
4246 * match.c (match_case_eos): Use uppercase for statement name in
4248 (match_elsewhere): Construct name may appear iff construct has a
4251 * trans-types.c: Update copyright years. Reformat long comment
4252 explaining array descriptor format. Remove obsolete mention of
4255 * arith.c (gfc_arith_uplus): Rename to ...
4256 (gfc_arith_identity): ... this.
4257 (gfc_parentheses): New function.
4258 (gfc_uplus): Adapt to renamed function.
4259 * arith.h (gfc_parentheses): Add prototype.
4260 * expr.c (gfc_copy_expr): Deal with INTRINSIC_PARENTHESES.
4261 (simplifiy_intrinsic_op): Treat INTRINSIC_UPLUS separately from
4262 INTRINSIC_PARENTHESES.
4264 2007-04-12 Tobias Burnus <burnus@net-b.de>
4267 * decl.c (match_attr_spec): Allow PRIVATE/PUBLIC
4268 attribute in type definitions.
4269 (gfc_match_private): Allow PRIVATE statement only
4270 in specification part of modules.
4271 (gfc_match_public): Ditto for PUBLIC.
4272 (gfc_match_derived_decl): Allow PRIVATE/PUBLIC attribute only in
4273 specificification part of modules.
4275 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
4278 * intrinsic.c (add_functions): Add ref. to gfc_resolve_achar.
4279 * intrinsic.h : Add prototype for gfc_resolve_achar.
4280 * iresolve.c (gfc_resolve_achar): New function.
4282 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
4285 * resolve.c (resolve_fl_variable): Set flag to 2 for automatic
4286 arrays. Make condition for automatic array error explicit.
4287 If a dummy, no error on an INTENT(OUT) derived type.
4289 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
4292 * expr.c (find_array_element): Correct arithmetic for rank > 1.
4294 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
4297 * check.c (numeric_check): If an expresson has not got a type,
4298 see if it is a symbol for which a default type applies.
4300 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
4303 * trans-decl.c (gfc_get_symbol_decl): Allow unreferenced use
4306 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
4309 * symbol.c (gfc_check_function_type): New function.
4310 * gfortran.h : Add prototype for previous.
4311 * parse.c (parse_progunit): Call it after parsing specification
4314 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
4317 * trans-expr.c (gfc_conv_function_call): Give a dummy
4318 procedure the correct type if it has alternate returns.
4320 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
4323 * decl.c (gfc_match_modproc): Go up to the top of the namespace
4324 tree to find the module namespace for gfc_get_symbol.
4326 2007-04-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4329 * fortran/gfortran.h (gfc_charlen_int_kind): New prototype.
4330 * fortran/trans-types.c (gfc_charlen_int_kind): New variable.
4331 (gfc_init_types): Define gfc_charlen_int_kind.
4332 * fortran/trans.h (gfor_fndecl_string_repeat): Remove prototype.
4333 * fortran/trans-decl.c (gfor_fndecl_string_repeat): Delete.
4334 (gfc_build_intrinsic_function_decls): Don't set
4335 gfor_fndecl_string_repeat.
4336 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_repeat): Rewrite
4337 so that we don't have to call a library function.
4338 * fortran/simplify.c (gfc_simplify_repeat): Perform the necessary
4339 checks on the NCOPIES argument, and work with arbitrary size
4342 2007-03-31 Tobias Burnus <burnus@net-b.de>
4344 * intrinsic.c (add_functions): Fix name of dummy argument
4345 for new_line and exit intrinsic.
4347 2007-03-31 Paul Thomas <pault@gcc.gnu.org>
4350 * gfortran.texi: Add a section for the %VAL, %REF and %LOC
4353 2007-03-30 Rafael Avila de Espindola <espindola@google.com>
4355 * trans-types.c (gfc_signed_or_unsigned_type): Remove.
4356 (gfc_unsigned_type): Use get_signed_or_unsigned_type instead of
4357 gfc_signed_or_unsigned_type.
4358 (gfc_signed_type): Ditto.
4359 * trans-types.h (gfc_signed_or_unsigned_type): Remove.
4360 * f95-lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
4362 2007-03-30 Tobias Schlüter <tobi@gcc.gnu.org>
4364 * symbol.c (gfc_find_gsymbol): Simplify, don't unconditionally
4365 descend into all branches.
4367 2007-03-29 Tobias Schlüter <tobi@gcc.gnu.org>
4369 * intrinsic.c (conv_name): Let gfc_get_string handle the format.
4370 (find_conv): Compare pointers instead of calling strcmp.
4371 (find_sym): Likewise, but ensure that the compared pointer is in
4372 the global string table.
4374 2007-03-28 Tobias Schlüter <tobi@gcc.gnu.org>
4376 * gfc-internals.texi: Fix output filename. Merge type index into
4377 concept index. Start documentation of gfc_code structure.
4379 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
4381 * gfc-internals.texi: New file,
4382 * Make-lang.in: Add rules to convert it to dvi, pdf, and info.
4384 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
4386 * error.c (show_locus): Remove always-false test.
4388 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
4390 * lang.opt: Minor edits to descriptions.
4392 2007-03-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4395 * fortran/interface.c (check_operator_interface): Implement
4396 the standard checks on user operators extending intrinsic operators.
4397 * fortran/resolve.c (resolve_operator): If the ranks of operators
4398 don't match, don't error out but try the user-defined ones first.
4400 2007-03-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4403 * expr.c (check_dimension): Fix logic of comparisons.
4405 2007-03-24 Paul Thomas <pault@gcc.gnu.org>
4408 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Return
4409 int result that is non-zero if the expression is the function
4410 result. Only the characteristics of the result expression
4411 can be used in a procedure interface, so simplify LEN in situ
4412 using its character length.
4416 * trans-expr.c (gfc_conv_function_call): Do not use
4417 gfc_conv_expr_reference for actual pointer function with formal
4418 target because a temporary is created that does not transfer
4419 the reference correctly. Do not indirect formal pointer
4420 functions since it is the function reference that is needed.
4422 2007-03-24 Brooks Moses <brooks.moses@codesourcery.com>
4424 * gfortran.h: Edit comments on GFC_STD_*.
4426 2007-03-23 Brooks Moses <brooks.moses@codesourcery.com>
4428 * invoke.texi: Misc. small typo fixes.
4429 (-Wcharacter-truncation): Add.
4430 (-Wnonstd-intrinsics): Correct spelling.
4432 (-fintrinsic-modules-path): Add.
4434 2007-03-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4437 * arith.c (complex_pow): Rewrite to handle large power.
4438 (gfc_arith_power): Handle large power in the real and integer
4441 2007-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4444 * trans-const.c (gfc_conv_mpz_to_tree): Allow integer constants
4445 larger than twice the width of a HOST_WIDE_INT.
4447 2006-03-22 Paul Thomas <pault@gcc.gnu.org>
4450 * trans-intrinsic.c (gfc_size_in_bytes): Remove function.
4451 (gfc_conv_intrinsic_array_transfer): Remove calls to previous.
4452 Explicitly extract TREE_TYPEs for source and mold. Use these
4453 to calculate length of source and mold, except for characters,
4454 where the se string_length is used. For mold, the TREE_TYPE is
4455 recalculated using gfc_get_character_type_len so that the
4456 result is correctly cast for character literals and substrings.
4457 Do not use gfc_typenode_for_spec for the final cast.
4459 2007-03-22 Tobias Schlüter <tobi@gcc.gnu.org>
4462 * decl.c (gfc_match_derived_decl): Reliably reject
4463 'doubleprecision' and 'doublecomplex' as type names.
4465 2007-03-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4468 * trans-expr.c (gfc_trans_init_string_length): Length should
4470 (gfc_conv_function_call): Likewise.
4472 2007-03-18 Paul Thomas <pault@gcc.gnu.org>
4476 * symbo.c : Add gfc_derived_types.
4477 (gfc_free_dt_list): Free derived type list gfc_derived_types.
4478 (gfc_free_namespace): Remove call to gfc_free_dt_list.
4479 (gfc_symbol_done_2): Call gfc_free_dt_list.
4480 * gfortran.h : Declare gfc_derived_types to be external. Remove
4481 derived types field from gfc_namespace.
4482 * resolve.c (resolve_fl_derived): Refer to gfc_derived types
4483 rather than namespace derived_types.
4484 (resolve_fntype): Remove special treatment for module
4485 derived type functions.
4486 * trans-types.c (gfc_get_derived_type): Remove search for like
4487 derived types. Finish by copying back end declaration to like
4488 derived types in the derived type list gfc_derived_types.
4490 2007-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4493 * trans-expr.c (gfc_conv_powi): Make n argument unsigned hwi.
4494 (gfc_conv_cst_int_power): Handle integer exponent with care,
4495 since it might be too large for us.
4497 2007-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4500 * invoke.texi: Fix typo.
4502 2007-03-16 Tobias Burnus <burnus@net-b.de>
4504 * trans-decl.c (gfc_generate_function_code): Use all arguments of
4507 2007-03-15 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4509 * gfortran.h (gfc_option_t): Add flag_backtrace field.
4510 * lang.opt: Add -fbacktrace option.
4511 * invoke.texi: Document the new option.
4512 * trans-decl.c (gfc_build_builtin_function_decls): Add new
4513 option to the call to set_std.
4514 * options.c (gfc_init_options, gfc_handle_option): Handle the
4517 2007-03-15 Tobias Burnus <burnus@gcc.gnu.org>
4518 Paul Thomas <pault@gcc.gnu.org>
4521 * decl.c (gfc_match_import): If the parent of the current name-
4522 space is null, try looking for an imported symbol in the parent
4523 of the proc_name interface.
4524 * resolve.c (resolve_fl_variable): Do not check for blocking of
4525 host association by a same symbol, if the symbol is in an
4528 2007-03-15 Paul Thomas <pault@gcc.gnu.org>
4531 * decl.c (match_data_constant): Before going on to try to match
4532 a name, try to match a structure component.
4536 * resolve.c (resolve_actual_arglist): Do not reject a generic
4537 actual argument if it has a same name specific interface.
4540 * trans-array.c (parse_interface): Do not nullify allocatable
4541 components if the symbol has the saved attribute.
4543 2007-03-14 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4545 * trans-array.c (gfc_trans_auto_array_allocation): Replace
4546 fold(convert()) by fold_convert().
4547 (gfc_duplicate_allocatable): Likewise.
4548 * trans-intrinsic.c (gfc_conv_intrinsic_dot_product): Use
4549 build_int_cst instead of converting an integer_zero_node
4552 2007-03-14 Jakub Jelinek <jakub@redhat.com>
4554 * module.c (mio_typespec): Don't look at ts->cl if not BT_CHARACTER.
4556 2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
4561 * intrinsics.texi (CHDIR): Fix argument names, note
4562 that STATUS must be a default integer.
4563 (CTIME): Fix argument names, note that RESULT must
4564 be a default integer.
4565 (EXIT): Note that STATUS must be a default integer.
4567 2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
4570 * intrinsic.texi: General whitespace cleanup, remove
4571 comment about missing intrinsics.
4572 (menu): Add lines for new entries listed below.
4573 (ACOSH): Mention specific function DACOSH, correct
4574 description phrasing.
4575 (ASINH): Mention specific function DASINH, correct
4576 description phrasing.
4577 (ATANH): Mention specific function DATANH, correct
4578 description phrasing.
4579 (COS): Add index entry for CCOS.
4580 (CPU_TIME): Correct "REAL" to "REAL(*)".
4581 (EXP): Add index entry for CEXP.
4582 (INT): Correct argument name to "A".
4586 (MAX): Add index entries for specific variants.
4587 (MCLOCK): New entry.
4588 (MCLOCK8): New entry.
4589 (SECNDS): Adjust to a more standard form.
4590 (SECOND): New entry.
4591 (TIME): Add cross-reference to MCLOCK.
4592 (TIME8): Add cross-reference to MCLOCK8.
4594 2007-03-11 Paul Thomas <pault@gcc.gnu.org>
4597 * parse.c (parse_interface): Use the default types from the
4598 formal namespace if a function or its result do not have a type
4599 after parsing the specification statements.
4601 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
4603 * intrinsic.texi: (ICHAR) Improve internal I/O note.
4604 (ACHAR): Reference it.
4605 (CHAR): Reference it.
4606 (IACHAR): Reference it.
4608 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
4610 * intrinsic.texi: (LINK) Document function form.
4616 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
4618 * intrinsic.texi: minor typo fixes, removed prologue.
4619 (FSEEK): moved to correct place in alphabetical order.
4621 2007-03-08 Daniel Franke <franke.daniel@gmail.com>
4624 * check.c (gfc_check_alarm_sub): Added check for default integer
4625 kind of status argument.
4626 * iresolve.c (gfc_resolve_alarm_sub): Removed conversion of
4628 * intrinsic.texi (ALARM): Extended documentation.
4630 2007-03-08 Daniel Franke <franke.daniel@gmail.com>
4632 * intrinsic.texi (GERROR, ISATTY, TTYNAM): New.
4633 (ABORT, FLUSH, FNUM, IRAND, MALLOC, SIGNAL, SRAND): Fixed typo.
4634 * intrinsic.c (add_subroutines): Adjusted dummy argument names
4635 of GERROR and TTYNAM.
4637 2007-07-08 Tobias Burnus <burnus@net-b.de>
4639 * module.c (gfc_match_use): Support renaming of operators
4641 * gfortran.texi (Fortran 2003 Status): Document support of
4642 renaming of operators.
4644 2007-07-08 Tobias Burnus <burnus@net-b.de>
4647 * module.c (read_module): Always import module name as symbol.
4648 (gfc_match_use): Disallow module name in the only clause of
4651 2007-03-08 Paul Thomas <pault@gcc.gnu.org>
4654 * expr.c (find_array_section): Correct arithmetic for section
4657 2007-03-07 Brooks Moses <brooks.moses@codesourcery.com>
4659 * iresolve.c (gfc_resolve_ishftc): Correct s_kind value.
4661 2007-03-06 Daniel Franke <franke.daniel@gmail.com>
4663 PR documentation/30950
4664 * intrinsic.texi (AND, CPU_TIME): Fix dummy argument names.
4665 (FREE): Fix call syntax.
4667 2007-03-06 Brooks Moses <brooks.moses@codesourcery.com>
4669 * intrinsic.texi: Limit column widths to a total of .85.
4671 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
4673 * gfortran.texi (GFortran and G77): Rewrite completely.
4675 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
4677 * match.c (gfc_match_name): Expanded comment.
4679 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
4681 * gfortran.texi (Old-style kind specifications): Document
4682 special handling of old-style kind specifiers for COMPLEX.
4683 * decl.c (gfc_match_old_kind_spec): Document kind/bytesize
4684 assumptions for COMPLEX in comment.
4686 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
4689 * gfortranspec.c (lang_specific_driver): Update program
4690 name and copyright date.
4692 2007-03-03 Paul Thomas <pault@gcc.gnu.org>
4695 * check.c (dim_rank_check): The shape of subsections of
4696 assumed-size arrays is known.
4698 2007-03-02 Paul Thomas <pault@gcc.gnu.org>
4699 Tobias Burnus <burnus@net-b.de>
4702 * decl.c (gfc_match_entry): Remove erroneous entry result check.
4704 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
4706 * Make-lang.in: Add install-pdf target as copied from
4707 automake v1.10 rules.
4709 2007-03-01 Tobias Burnus <burnus@net-b.de>
4712 * trans-intrinsic.c (gfc_conv_intrinsic_size): Compare pointers.
4714 2007-02-28 Tobias Burnus <burnus@net-b.de>
4715 Paul Thomas <pault@gcc.gnu.org>
4719 * resolve.c (resolve_actual_arglist): Allow by-value
4720 arguments and non-default-kind for %VAL().
4721 * trans-expr.c (conv_arglist_function): Allow
4722 non-default-kind for %VAL().
4724 2007-02-28 Tobias Burnus <burnus@net-b.de>
4727 * primary.c (next_string_char): Correct reading a character
4728 after the delimiter.
4729 (match_string_constant): Print warning message only once.
4731 2007-02-27 Richard Guenther <rguenther@suse.de>
4733 * trans-array.c (structure_alloc_comps): Use correct type
4734 for null pointer constant.
4736 2007-02-26 Brooks Moses <brooks.moses@codesourcery.com>
4738 * gfortran.texi: Standardize title page, remove version number
4739 from copyright page.
4741 2007-02-26 Thomas Koenig <Thomas.Koenig@online.de>
4742 Paul Thomas <pault@gcc.gnu.org>
4745 * trans-intrinsic.c (gfc_conv_intrinsic_size):
4746 If dim is an optional argument, check for its
4747 presence and call size0 or size1, respectively.
4749 2007-02-23 Paul Thomas <pault@gcc.gnu.org>
4752 * resolve.c (has_default_initializer): New function.
4753 (resolve_fl_variable): Call has_default_initializer to determine if
4754 the derived type has a default initializer to its ultimate
4758 2007-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4760 * options.c (set_default_std_flags): New function to consolidate
4762 (gfc_init_options): Use new function.
4763 (gfc_handle_option): Use new function.
4765 2007-02-22 Brooks Moses <brooks.moses@codesourcery.com>
4767 * gfortran.texi (Old-style kind specifications): Document
4768 special handling of old-style kind specifiers for COMPLEX.
4769 * decl.c (gfc_match_old_kind_spec): Documented kind/bytesize
4770 assumptions in comment.
4772 2007-02-21 Bernhard Fischer <aldot@gcc.gnu.org>
4774 * parse.c (next_free): Gooble spaces after OpenMP sentinel.
4776 2007-02-20 Thomas Koenig <Thomas.Koenig@online.de>
4779 * match.c (gfc_match_iterator): Remove conflict between
4780 loop variable and pointer.
4782 2007-02-20 Tobias Burnus <burnus@net-b.de>
4785 * symbol.c (gfc_add_volatile): Allow to set VOLATILE
4786 attribute for host-associated variables.
4787 * gfortran.h (symbol_attribute): Save namespace
4788 where VOLATILE has been set.
4789 * trans-decl.c (gfc_finish_var_decl): Move variable
4790 declaration to the top.
4792 2007-02-20 Tobias Burnus <burnus@net-b.de>
4795 * resolve.c (resolve_symbol): Add character dummy VALUE check.
4797 2007-02-19 Thomas Koenig <Thomas.Koenig@online.de>
4800 * fortran/iresolve.c (gfc_resolve_maxloc): Remove coercion of
4801 argument to default integer.
4802 (gfc_resolve_minloc): Likewise.
4804 2007-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4807 * options.c (gfc_init_options): Relax warning level for obsolescent.
4808 * match.c (match_arithmetic_if): Change to obsolescent from deleted.
4809 (gfc_match_if): Same.
4811 2007-02-18 Roger Sayle <roger@eyesopen.com>
4813 * trans-array.c (gfc_build_constant_array_constructor): When the
4814 shape of the constructor is known, use that to construct the
4816 (gfc_trans_constant_array_constructor): Initialize the "info"
4817 information for all of the dimensions of the array constructor.
4818 (constant_array_constructor_loop_size): New function.
4819 (gfc_trans_array_constructor): Use it to determine whether a
4820 loop is suitable for "constant array constructor" optimization.
4822 * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Use fold_build2
4823 instead of build2, to avoid conditions like "(a != b) != 0".
4825 2007-02-18 Roger Sayle <roger@eyesopen.com>
4826 Paul Thomas <pault@gcc.gnu.org>
4829 * match.c (match_forall_iterator): Use gfc_match_expr instead
4830 of gfc_match_variable to match the iterator variable. Return
4831 MATCH_NO if not a variable. Remove the reset of the symbol's
4834 2007-02-16 Tobias Burnus <burnus@net-b.de>
4837 * trans-decl.c (gfc_generate_function_code): Do not initialize
4838 pointers to derived components.
4840 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
4841 Brooks Moses <brooks.moses@codesourcery.com>
4842 Lee Millward <lee.millward@codesourcery.com>
4844 * trans-expr.c (gfc_conv_power_op): Use build_call_expr.
4845 (gfc_conv_string_tmp): Likewise.
4846 (gfc_conv_concat_op): Likewise.
4847 (gfc_build_compare_string): Likewise.
4848 (gfc_conv_function_call): Use build_call_list instead of build3.
4850 * trans-array.c (gfc_trans_allocate_array_storage): Use
4852 (gfc_grow_array): Likewise.
4853 (gfc_trans_array_ctor_element): Likewise.
4854 (gfc_trans_array_constructor_value): Likewise.
4855 (gfc_array_allocate): Likewise.
4856 (gfc_array_deallocate): Likewise.
4857 (gfc_trans_auto_array_allocation): Likewise.
4858 (gfc_trans_dummy_array_bias): Likewise.
4859 (gfc_conv_array_parameter): Likewise.
4860 (gfc_trans_dealloc_allocated): Likewise.
4861 (gfc_duplicate_allocatable): Likewise.
4863 * trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr.
4864 (gfc_trans_omp_flush): Likewise.
4866 * trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr.
4867 (gfc_trans_pause): Likewise.
4868 (gfc_trans_stop): Likewise.
4869 (gfc_trans_character_select): Likewise.
4870 (gfc_do_allocate): Likewise.
4871 (gfc_trans_assign_need_temp): Likewise.
4872 (gfc_trans_pointer_assign_need_temp): Likewise.
4873 (gfc_trans_forall_1): Likewise.
4874 (gfc_trans_where_2): Likewise.
4875 (gfc_trans_allocate): Likewise.
4876 (gfc_trans_deallocate): Likewise.
4878 * trans.c (gfc_trans_runtime_check): Use build_call_expr.
4880 * trans-io.c (gfc_trans_open): Use build_call_expr.
4881 (gfc_trans_close): Likewise.
4882 (build_filepos): Likewise.
4883 (gfc_trans_inquire): Likewise.
4884 (NML_FIRST_ARG): Delete.
4885 (NML_ADD_ARG): Delete.
4886 (transfer_namelist_element): Use build_call_expr.
4887 (build_dt): Likewise.
4888 (gfc_trans_dt_end): Likewise.
4889 (transfer_expr): Likewise.
4890 (transfer_array-desc): Likewise.
4892 * trans-decl.c (gfc_generate_function_code): Use build_call_expr.
4893 (gfc_generate_constructors): Likewise.
4895 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr.
4896 (gfc_conv_intrinsic_fdate): Likewise.
4897 (gfc_conv_intrinsic_ttynam): Likewise.
4898 (gfc_conv_intrinsic_array_transfer): Likewise.
4899 (gfc_conv_associated): Likewise.
4900 (gfc_conv_intrinsic_si_kind): Likewise.
4901 (gfc_conv_intrinsic_trim): Likewise.
4902 (gfc_conv_intrinsic_repeat: Likewise.
4903 (gfc_conv_intrinsic_iargc): Likewise.
4905 2007-02-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4908 * scanner.c (gfc_next_char_literal): Add check for end of file after
4909 call to advance_line.
4911 2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>
4914 * primary.c (match_logical_constant): Return MATCH_ERROR on invalid
4917 2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>
4919 * misc.c (gfc_typename): Fix potential buffer overflow.
4921 2007-02-13 Paul Thomas <pault@gcc.gnu.org>
4924 * module.c (read_module): Set pointer_info to referenced if the
4925 symbol has no namespace.
4927 2007-02-12 Nick Clifton <nickc@redhat.com>
4929 * lang.opt: Add Warning attribute to warning options.
4931 2007-02-11 Daniel Franke <franke.daniel@gmail.com>
4933 * intrinsic.texi (HOSTNM): Fix typographical error in syntax.
4934 (SLEEP): Added section and documentation.
4936 2007-02-11 Tobias Schlüter <tobi@gcc.gnu.org>
4939 * decl.c (add_init_expr_to_sym): Remove ENUM specific code.
4940 (variable_decl): Likewise. Rewrap comment.
4941 (match_attr_spec): Remove ENUM specific code.
4942 (gfc_match_enum): Fix typo in error message.
4943 (enumerator_decl): New function.
4944 (gfc_match_enumerator_def): Use enumerator_decl instead of
4945 variable_decl. Adapt code accordingly.
4947 2007-02-11 Paul Thomas <pault@gcc.gnu.org>
4950 * module.c (find_symtree_for_symbol): New function to return
4951 a symtree that is not a "unique symtree" given a symbol.
4952 (read_module): Do not automatically set pointer_info to
4953 referenced because this inhibits the generation of a unique
4954 symtree. Recycle the existing symtree if possible by calling
4955 find_symtree_for_symbol.
4958 * decl.c (add_init_expr_to_sym): Make new charlen for an array
4959 constructor initializer.
4961 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
4963 * f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address
4964 and __emutls_register_common.
4965 * openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls.
4966 * trans-common.c (build_common_decl): Don't check have_tls.
4967 * trans-decl.c (gfc_finish_var_decl): Likewise.
4968 * types.def (BT_WORD, BT_FN_PTR_PTR): New.
4969 (BT_FN_VOID_PTR_WORD_WORD_PTR): New.
4971 2007-02-09 Tobias Burnus <burnus@net-b.de>
4974 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc,
4975 gfc_conv_intrinsic_minmaxval): Use HUGE-1 for most negative integer.
4977 2007-02-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4980 * trans-array.c (gfc_trans_create_temp_array): Remove use of the
4981 function argument. Always generate code for negative extent.
4983 * trans-array.h (gfc_trans_create_temp_array): Change prototype.
4984 * trans-expr.c (gfc_conv_function_call): Remove use of last argument
4985 of gfc_trans_create_temp_array.
4986 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Likewise.
4987 * trans-stmt.c (gfc_conv_elemental_dependencies): Likewise.
4989 2007-02-08 Roger Sayle <roger@eyesopen.com>
4991 * trans-stmt.c (gfc_trans_forall_1): Optimize the cases where the
4992 mask expression is a compile-time constant (".true." or ".false.").
4994 2007-02-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4997 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Evaluate
4998 arguments only once. Generate check that NCOPIES argument is not
5001 2007-02-04 Steven G. Kargl <kargl@gcc.gnu.org>
5004 * fortran/invoke.texi: Update documentation.
5005 * fortran/options.c (gfc_post_options): Deal with tabs with -std=f2003
5008 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
5010 * trans-array.c: Fix a comment typo.
5012 2007-02-03 Paul Thomas <pault@gcc.gnu.org>
5015 * array.c (match_array_element_spec): If the length of an array is
5016 negative, adjust the upper limit to make it zero length.
5019 * resolve.c (pure_function, resolve_function): Initialize name to
5020 null to clear up build warnings.
5021 (resolve_fl_variable): Look at components explicitly to check for
5022 default initializer, rather than using gfc_default_initializer.
5024 2007-02-02 Steven G. Kargl <kargl@gcc.gnu.org>
5027 * resolve.c (resolve_generic_f): Check for non-NULL sym.
5029 2007-02-02 Roger Sayle <roger@eyesopen.com>
5031 * trans.c (gfc_build_array_ref): Use STRIP_TYPE_NOPS to eliminate
5032 NON_LVALUE_EXPR nodes and useless type conversions.
5034 2007-02-02 Paul Thomas <pault@gcc.gnu.org>
5038 * trans-expr.c (gfc_conv_aliased_arg): Remove static attribute
5039 from function and make sure that substring lengths are
5041 (is_aliased_array): Remove static attribute.
5042 * trans.c : Add prototypes for gfc_conv_aliased_arg and
5044 * trans-io.c (set_internal_unit): Add the post block to the
5045 arguments of the function. Use is_aliased_array to check if
5046 temporary is needed; if so call gfc_conv_aliased_arg.
5047 (build_dt): Pass the post block to set_internal_unit and
5048 add to the block after all io activiy is done.
5050 2007-02-01 Roger Sayle <roger@eyesopen.com>
5052 * trans-array.c (gfc_conv_expr_descriptor): We don't need to use
5053 a temporary array to pass a constant non-character array constructor.
5054 Generalize the descriptor generation code to handle scalarizer
5055 "info" without an array reference.
5057 2007-02-01 Roger Sayle <roger@eyesopen.com>
5059 * dependency.c (gfc_check_dependency) <EXPR_ARRAY>: Implement
5060 dependency checking for array constructors.
5062 2007-02-01 Roger Sayle <roger@eyesopen.com>
5064 * trans-stmt.c (compute_overall_iter_number): Document function
5065 arguments. Generalize "unconditional forall nest with constant
5066 bounds" optimization to eliminate unconditional inner loops with
5069 2007-01-31 Tobias Burnus <burnus@net-b.de>
5072 * interface.c (compare_actual_formal): Check conformance between
5073 actual and VOLATILE dummy arguments.
5074 * symbol.c (gfc_add_volatile): Allow setting of VOLATILE
5075 multiple times in different scopes.
5076 * decl.c (gfc_match_volatile): Search symbol in host association.
5078 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
5080 * simplify.c, trans-array.c: Fix comment typos.
5082 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5084 * invoke.texi (Code Gen Options): Fix abbreviation typo.
5085 * intrinsic.texi (ACCESS, LSHIFT, RSHIFT): Fix typos.
5087 2007-01-30 Steve Ellcey <sje@cup.hp.com>
5090 * trans-types.c (gfc_get_function_type): Do not add void_type_node
5092 * trans-decl.c (create_function_arglist): Change assert.
5094 2007-01-29 Paul Thomas <pault@gcc.gnu.org>
5097 * module.c (read_module): If a symbol is excluded by an ONLY
5098 clause, check to see if there is a symtree already loaded. If
5099 so, attach the symtree to the pointer_info.
5101 2007-01-28 Thomas Koenig <Thomas.Koenig@online.de>
5104 * gfortran.h: Remove gfc_simplify_init_1.
5105 * arith.h: Remove third argument from gfc_compare_string.
5106 * arith.c (gfc_compare_expression): Remove third argument
5107 from call to gfc_compare_string.
5108 (gfc_compare_string): Remove third argument xcoll_table.
5109 Remove use of xcoll_table.
5110 * misc.c (gfc_init_1): Remove call to gfc_simplify_init_1.
5111 * simplify.c (ascii_table): Remove.
5112 (xascii_table): Likewise.
5113 (gfc_simplify_achar): ICE if extract_int fails. Remove use of
5114 ascii_table. Warn if -Wsurprising and value < 0 or > 127.
5115 (gfc_simplify_char): ICE if extract_int fails. Error if
5116 value < 0 or value > 255.
5117 (gfc_simplify_iachar): Remove use of xascii_table.
5118 Char values outside of 0..255 are an ICE.
5119 (gfc_simplify_lge): Remove use of xascii_table.
5120 (gfc_simplify_lgt): Likewise.
5121 (gfc_simplify_lle): Likewise.
5122 (gfc_simplify_llt): Likewise.
5123 (invert_table): Remove.
5124 (gfc_simplify_init_1): Remove.
5126 2007-01-27 Roger Sayle <roger@eyesopen.com>
5128 * trans-stmt.c (forall_info): Replace the next_nest and outer
5129 fields that previously implemented a doubly-linked list with a
5130 single prev_nest field (singly-linked list).
5131 (gfc_trans_nested_forall_loop): The nested_forall_info argument
5132 now denotes the innermost FORALL in the loop nest.
5133 (compute_overall_iter_number): Use prev_nest instead of next_nest.
5134 (gfc_trans_forall_1): Link/cons the new "info" to the head of the
5135 nested_forall_info linked list. Free the current "info" when done.
5137 2007-01-27 Paul Thomas <pault@gcc.gnu.org>
5140 * trans-expr.c (gfc_conv_operator_assign): New function.
5141 * trans.h : Add prototype for gfc_conv_operator_assign.
5142 * trans-stmt.c (gfc_trans_where_assign): Add a gfc_symbol for
5143 a potential operator assignment subroutine. If it is non-NULL
5144 call gfc_conv_operator_assign instead of the first assignment.
5145 ( gfc_trans_where_2): In the case of an operator assignment,
5146 extract the argument expressions from the code for the
5147 subroutine call and pass the symbol to gfc_trans_where_assign.
5148 resolve.c (resolve_where, gfc_resolve_where_code_in_forall,
5149 gfc_resolve_forall_body): Resolve the subroutine call for
5150 operator assignments.
5152 2007-01-26 Steven Bosscher <stevenb.gcc@gmail.com>
5153 Steven G. Kargl <kargl@gcc.gnu.org>
5156 * fortran/io.c (next_char): Deal with backslash escaped characters.
5157 Issue warnings in non -std=gnu cases.
5158 * fortran/primary.c (next_string_char): Issue warnings in non
5160 2007-01-26 Tobias Burnus <burnus@net-b.de>
5162 * lang-specs.h: Add support for .f03 and .F03 extensions.
5163 * gfortran.texi: Document .f03 extension.
5164 * options.c (form_from_filename): Recognize .f03.
5166 2007-01-25 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5169 * lang.opt (Wall): Remove RejectNegative.
5170 * options.c (gfc_handle_option): Wall can be disabled.
5171 (set_Wall): Add a parameter for disabling Wall.
5173 2007-01-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
5176 * scanner.c (load_line): Remove check fot ctrl-z and don't gobble.
5178 2007-01-23 Paul Thomas <pault@gcc.gnu.org>
5181 * match.c (gfc_match_namelist): Add check for assumed size character
5182 in namelist and provide error if found.
5184 2007-01-21 Brooks Moses <brooks.moses@codesourcery.com>
5186 * intrinsic.texi (ACHAR): Added cross-references.
5187 (CHAR): Put cross-references in alphabetical order.
5188 (IACHAR): Added cross-references.
5189 (ICHAR): Added cross-references.
5191 2007-01-20 Brooks Moses <brooks.moses@codesourcery.com>
5193 * intrinsic.texi: Edited all "Syntax" examples to a consistent form.
5194 (MAXVAL): Corrected description of result characteristics.
5196 (UMASK): Added documentation.
5198 2007-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
5200 * openmp.c, matchexp.c, module.c, scanner.c, resolve.c, st.c,
5201 parse.c, primary.c, options.c, misc.c, simplify.c: Next installment
5202 in the massive whitespace patch.
5204 2007-01-20 Roger Sayle <roger@eyesopen.com>
5206 * module.c (mio_array_ref): The dimen_type fields of an array ref
5207 are an enumerated type and can't be read/written directly with a
5208 call to mio_integer. Instead loop over and cast each element.
5210 2007-01-20 Roger Sayle <roger@eyesopen.com>
5212 * dependency.c (gfc_full_array_ref_p): Check that ref->next is NULL,
5213 i.e. that the ARRAY_REF doesn't mention components.
5214 * trans-array.c (gfc_constant_array_constructor_p): Export external
5215 function renamed from constant_array_constructor_p.
5216 (gfc_build_constant_array_constructor): Export.
5217 (gfc_trans_array_constructor): Update call to the renamed function
5218 constant_array_constructor_p.
5219 * trans-array.h (gfc_constant_array_constructor_p): Prototype here.
5220 (gfc_build_constant_array_constructor): Likewise.
5221 * trans-expr.c (gfc_build_memcpy_call): New helper function split
5222 out from gfc_trans_array_copy.
5223 (gfc_trans_array_copy): Use gfc_build_memcpy_call.
5224 (gfc_trans_array_constructor_copy): New function to optimize
5225 assigning an entire array from a constant array constructor.
5226 (gfc_trans_assignment): Call gfc_trans_array_constructor_copy
5229 2007-01-20 Roger Sayle <roger@eyesopen.com>
5231 * trans-intrinsic.c (gfc_conv_intrinsic_sign): New branchless
5232 implementation for the SIGN intrinsic with integral operands.
5233 (gfc_conv_intrinsic_minmax): Fix whitespace.
5235 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
5237 * gfortran.h (gfc_options_t): Add flag_allow_leading_underscore.
5238 * lang.opt: Add -fallow-leading-underscore.
5239 * match.c (gfc_match_name): Allow leading underscore in symbol
5240 name if -fallow-leading-underscore is used.
5241 * symbol.c (gfc_get_default_type): Add special case for symbol
5242 names beginning with an underscore.
5243 * trans-decl.c (gfc_get_extern_function_decl,
5244 gfc_build_intrinsic_function_decls): Add _gfortran prefix to
5245 library symbols selected_int_kind, selected_real_kind and
5247 * options.c (gfc_init_options, gfc_handle_option): Handle the
5248 new -fallow-leading-underscore option.
5250 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
5253 * options.c (gfc_handle_module_path_options): Path used in -J
5254 option is now added to the module search path.
5256 2007-01-20 Richard Guenther <rguenther@suse.de>
5259 * f95-lang.c (gfc_init_builtin_functions): Provide cbrt and
5260 cexpi builtins if we have TARGET_C99_FUNCTIONS. Provide
5261 sincos builtins if the target has sincos.
5263 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
5265 * intrinsic.texi (MATMUL): Corrected a typo.
5266 (MAX): Separated @var arguments.
5267 (MIN): Separated @var arguments.
5269 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
5271 * intrinsic.texi: general whitespace cleanup.
5272 (menu): Added TIME8, removed UNMASK.
5273 (AINT): Clarified argument requirement.
5274 (ANINT): Clarified argument requirement.
5275 (CEILING): Clarified argument requirement.
5276 (CHAR): Clarified argument requirement.
5277 (CMPLX): Clarified argument requirement.
5278 (DCMPLX): Clarified argument requirement.
5279 (FGET): Line rewrapping.
5280 (FLOOR): Clarified argument requirement.
5281 (GMTIME): Added documentation.
5282 (IAND): Added cross-reference.
5283 (IBCLR): Added cross-reference.
5284 (IBSET): Added cross-reference.
5285 (IEOR): Added cross-reference.
5286 (INT): Collapsed examples, clarified argument requirement.
5287 (IOR): Added cross-references.
5288 (LEN_TRIM): Corrected result kind.
5289 (LINK): Added cross-reference.
5290 (LLT): Removed "documentation pending".
5291 (LOGICAL): Added documentation.
5292 (LSHIFT): Added documentation.
5293 (LTIME): Added documentation.
5294 (MATMUL): Added documentation.
5295 (MAX): Added documentation.
5296 (MAXLOC): Added documentation.
5297 (MAXVAL): Added documentation.
5298 (MERGE): Added documentation.
5299 (MIN): Added documentation.
5300 (MINLOC): Added documentation.
5301 (MINVAL): Added documentation.
5302 (MVBITS): Moved to correct place, added documentation.
5303 (NOT): Added documentation.
5304 (PERROR): Added documentation.
5305 (RAN): Moved to correct place, added documentation.
5306 (REAL): Clarified argument requirement.
5307 (RENAME): Added documentation.
5308 (RSHIFT): Clarified argument requirement.
5309 (SIGN): Corrected table specification.
5310 (SYMLNK): Added documentation.
5311 (SYSTEM): Added documentation.
5312 (TIME): Added documentation.
5313 (TIME8): Added section and documentation.
5314 (UNMASK): Removed erroneous section.
5316 2007-01-18 H.J. Lu <hongjiu.lu@intel.com>
5318 * trans-stmt.c (compute_overall_iter_number): Fix a typo.
5320 2007-01-18 Roger Sayle <roger@eyesopen.com>
5322 * trans-expr.c (copyable_array_p): Consider user derived types without
5323 allocatable components to be copyable.
5325 2007-01-18 Roger Sayle <roger@eyesopen.com>
5327 * trans-stmt.c (compute_overall_iter_number): Enhance to precompute
5328 the number of interations in unconditional FORALL nests with constant
5331 2007-01-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
5332 Tobias Burnus <burnus@net-b.de>
5335 * gfortran.h (gfc_option_t): Add flag_dump_core.
5336 * lang.opt: Add -fdump-core option.
5337 * invoke.texi: Document the new options.
5338 * trans-decl.c (gfc_build_builtin_function_decls): Add new
5339 options to the call to set_std.
5340 * options.c (gfc_init_options, gfc_handle_option): Set the
5343 2007-01-17 Paul Thomas <pault@gcc.gnu.org>
5346 * module.c (load_generic_interfaces): Make the marking of the
5347 symbol as ambiguous conditional on the module names being
5349 (write_generic): Ensure that the generic interface has a
5350 non-NULL module field.
5352 2007-01-16 Roger Sayle <roger@eyesopen.com>
5355 * trans-stmt.c (forall_info): Remove pmask field.
5356 (gfc_trans_forall_loop): Remove NVAR argument, instead assume that
5357 NVAR covers all the interation variables in the current forall_info.
5358 Add an extra OUTER parameter, which specified the loop header in
5359 which to place mask index initializations.
5360 (gfc_trans_nested_forall_loop): Remove NEST_FLAG argument.
5361 Change the semantics of MASK_FLAG to only control the mask in the
5363 (compute_overall_iter_number): Optimize the trivial case of a
5364 top-level loop having a constant number of iterations. Update
5365 call to gfc_trans_nested_forall_loop. Calculate the number of
5366 times the inner loop will be executed, not to size of the
5368 (allocate_temp_for_forall_nest_1): Reuse SIZE as BYTESIZE when
5369 sizeof(type) == 1. Tidy up.
5370 (gfc_trans_assign_need_temp): Remove NEST_FLAG argument from calls
5371 to gfc_trans_nested_forall_loop.
5372 (gfc_trans_pointer_assign_need_temp): Likewise.
5373 (gfc_trans_forall_1): Remove unused BYTESIZE, TMPVAR, SIZEVAR and
5374 LENVAR local variables. Split mask allocation into a separate
5375 hunk/pass from mask population. Use allocate_temp_for_forall_nest
5376 to allocate the FORALL mask with the correct size. Update calls
5377 to gfc_trans_nested_forall_loop.
5378 (gfc_evaluate_where_mask): Update call to
5379 gfc_trans_nested_forall_loop.
5380 (gfc_trans_where_2): Likewise.
5382 2007-01-15 Paul Thomas <pault@gcc.gnu.org>
5385 * trans-stmt.c (gfc_trans_call): If it does not have one, get
5386 a backend_decl for an alternate return.
5389 * resolve.c (pure_function): Statement functions are pure. Note
5390 that this will have to recurse to comply fully with F95.
5393 * resolve.c (resolve_function): Only a reference to the final
5394 dimension of an assumed size array is an error in an inquiry
5398 * resolve.c (resolve_function): Make sure that the function
5399 expression has a type.
5401 2007-01-14 Paul Thomas <pault@gcc.gnu.org>
5404 * trans-decl.c (gfc_sym_mangled_function_id): Module, external
5405 symbols must not have the module name prepended.
5407 2007-01-11 Thomas Koenig <Thomas.Koenig@online.de>
5410 * iresolve.c (gfc_resolve_maxloc): If the rank
5411 of the return array is nonzero and we process an
5412 integer array smaller than default kind, coerce
5413 the array to default integer.
5414 * iresolve.c (gfc_resolve_minloc): Likewise.
5416 2007-01-11 Brooks Moses <brooks.moses@codesourcery.com>
5418 * simplify.c: Update copyright to 2007.
5421 2007-01-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
5424 * scanner.c (gfc_release_include_path): Free gfc_option.module_dir
5427 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
5429 * simplify.c (gfc_simplify_ibclr): Fix POS comparison.
5430 (gfc_simplify_ibset): Same.
5432 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
5436 * simplify.c (convert_mpz_to_unsigned): New function.
5437 (convert_mpz_to_signed): New function, largely based on
5439 (twos_complement): Removed.
5440 (gfc_simplify_ibclr): Add conversions to and from an
5441 unsigned representation before bit-twiddling.
5442 (gfc_simplify_ibset): Same.
5443 (gfc_simplify_ishftc): Add checks for overly large
5444 constant arguments, only check the third argument if
5445 it's present, carry over high bits into the result as
5446 appropriate, and perform the final conversion back to
5447 a signed representation using the correct sign bit.
5448 (gfc_simplify_not): Removed unnecessary masking.
5450 2007-01-09 Paul Thomas <pault@gcc.gnu.org>
5453 * resolve.c (resolve_code): Use the code->expr character length
5454 directly to set length of llen.
5456 2007-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
5459 * lang.opt: Add Wcharacter_truncation option.
5460 * options.c (gfc_init_options): Initialize
5461 gfc_option.warn_character_truncation to zero.
5462 (gfc_handle_option): Add case for OPT_Wcharacter_truncation.
5464 2007-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
5466 * interface.c, intrinsic.c, gfortranspec.c, io.c, f95-lang.c,
5467 iresolve.c, match.c: Update Copyright years. Whitespace.
5469 2007-01-08 Richard Guenther <rguenther@suse.de>
5471 * trans-io.c (transfer_array_desc): Use build_int_cst instead
5474 2007-01-08 Roger Sayle <roger@eyesopen.com>
5476 * trans-array.c (constant_array_constructor_p): New function to
5477 determine whether an array constructor consists only of constant
5478 elements, and if so return it's size.
5479 (gfc_build_constant_array_constructor): Construct a statically
5480 initialized gfortran array for a given EXPR_ARRAY.
5481 (gfc_trans_constant_array_constructor): Efficiently scalarize
5482 a constant array constructor.
5483 (gfc_trans_array_constructor): Tidy up use of CONST_STRING.
5484 Special case scalarization of constant array constructors, all of
5485 whose elements are specified, using constant_array_constructor_p
5486 and gfc_trans_constant_array_constructor.
5487 (gfc_conv_scalarized_array_ref): Check whetger info->offset is zero
5488 before adding it to index, to avoid creating a NON_LVALUE_EXPR.
5490 2007-01-08 Kazu Hirata <kazu@codesourcery.com>
5492 gfortran.texi: Fix typos.
5494 2007-01-07 Steven G. Kargl <kargl@gcc.gnu.org>
5496 * decl.c, dump-parse-tree.c, error.c, data.c, expr.c, dependency.c,
5497 convert.c: Update Copyright dates. Fix whitespace.
5499 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
5501 * data.c (gfc_assign_data_value): Fix whitespace.
5503 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
5505 * trans-array.c (gfc_trans_create_temp_array, gfc_array_init_size):
5506 Commentary typo fix.
5508 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
5511 * match.c (gfc_match_name): Print diagnostics for invalid
5514 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
5516 * array.c: Fix whitespace in comment table.
5518 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
5520 * array.c, bbt.c, check.c: Update copyright years. Whitespace.
5522 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
5524 * arith.c: Update copyright years. Whitespace.
5526 2007-01-05 Roger Sayle <roger@eyesopen.com>
5528 * trans-expr.c (gfc_trans_assignment_1): New subroutine to scalarize
5529 array assignments split out from gfc_trans_assignment.
5530 (gfc_trans_array_copy): New function to implement array to array
5531 copies via calls to __builtin_memcpy.
5532 (copyable_array_p): New helper function to identify an array of
5533 simple/POD types, that may be copied/assigned using memcpy.
5534 (gfc_trans_assignment): Use gfc_trans_array_copy to handle simple
5535 whole array assignments considered suitable by copyable_array_p.
5536 Invoke gfc_trans_assignment_1 to perform the fallback scalarization.
5538 2007-01-05 Roger Sayle <roger@eyesopen.com>
5540 * trans-array.c (gfc_trans_array_constructor_value): Make the
5541 static const "data" array as TREE_READONLY.
5542 * trans-stmt.c (gfc_trans_character_select): Likewise.
5544 2007-01-05 Roger Sayle <roger@eyesopen.com>
5546 * trans-array.c (gfc_conv_loop_setup): Test whether the loop
5547 stride is one, to avoid fold_build2 introducing a useless
5548 NON_LVALUE_EXPR node.
5550 2007-01-05 Tobias Burnus <burnus@net-b.de>
5552 * symbol.c (check_conflict): Fix error message.
5554 2007-01-05 Paul Thomas <pault@gcc.gnu.org>
5557 * decl.c (gfc_in_match_data, gfc_set_in_match_data): New
5558 functions to signal that a DATA statement is being matched.
5559 (gfc_match_data): Call gfc_set_in_match_data on entry and on
5561 * gfortran.h : Add prototypes for above.
5562 * expr.c (check_init_expr): Avoid check on parameter or
5563 variable if gfc_in_match_data is true.
5564 (gfc_match_init_expr): Do not call error on non-reduction of
5565 expression if gfc_in_match_data is true.
5569 * decl.c (gfc_set_constant_character_len): Add boolean arg to
5570 flag array constructor resolution. Warn if string is being
5571 truncated. Standard dependent error if string is padded. Set
5572 new arg to false for all three calls to
5573 gfc_set_constant_character_len.
5574 * match.h : Add boolean arg to prototype for
5575 gfc_set_constant_character_len.
5576 * gfortran.h : Add warn_character_truncation to gfc_options.
5577 * options.c (set_Wall): Set warn_character_truncation if -Wall
5579 * resolve.c (resolve_code): Warn if rhs string in character
5580 assignment has to be truncated.
5581 * array.c (gfc_resolve_character_array_constructor): Set new
5582 argument to true for call to gfc_set_constant_character_len.
5584 2007-01-05 Tobias Burnus <burnus@net-b.de>
5587 * interface.c (compare_parameter_intent): New function.
5588 (check_intents): Support pointer intents.
5589 * symbol.c (check_conflict): Support pointer intents,
5590 better conflict_std message.
5591 * expr.c (gfc_check_assign,gfc_check_pointer_assign):
5592 Support pointer intents.
5593 * resolve.c (resolve_deallocate_expr,resolve_allocate_expr):
5594 Support pointer intents.
5596 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
5599 * check.c (gfc_check_kill_sub): Add checks for non-scalar
5602 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
5604 * intrinsic.texi: Minor cleanup, reflowing overlong
5605 paragraphs, and correcting whitespace.
5607 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
5609 * intrinsic.texi (LBOUND): Add documentation.
5610 (LGE): Add documentation.
5611 (LGT): Add documentation.
5612 (LINK): Add documentation.
5613 (LLE): Add documentation.
5614 (LLT): Add documentation.
5615 (LNBLNK): Add documentation.
5616 (UBOUND): Add documentation.
5617 (UNLINK): Add documentation.
5619 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
5621 * intrinsic.texi (IAND): Clarify argument specifications.
5622 (IBCLR): Add documentation.
5623 (IBITS): Add documentation.
5624 (IBSET): Add documentation.
5625 (IEOR): Add documentation.
5626 (IERRNO): Add documentation.
5627 (INDEX): Add documentation.
5628 (IOR): Add documentation.
5629 (ISHFT): Add documentation.
5630 (ISHFTC): Add documentation.
5631 (KILL): Add documentation.
5632 (LEN_TRIM): Add documentation.
5634 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
5637 * interface.c (compare_actual_formal): check for
5638 alternate returns when iterating over non-present
5641 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
5643 * invoke.texi: Update manpage copyright to include 2007.
5645 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
5647 * gfortran.texi: Update copyright to include 2007.
5648 * intrinsic.texi: Update copyright to include 2007.
5649 * invoke.texi: Update copyright to include 2007.
5651 2007-01-02 Tobias Burnus <burnus@net-b.de>
5652 Jakub Jelinek <jakub@redhat.com>
5655 * scanner.c (open_included_file): Revert patch.
5656 (gfc_open_included_file): Support absolute pathnames.
5657 (gfc_open_intrinsic_module): Support absolute pathnames.
5659 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
5661 * gfortran.texi (GNU Fortran and GCC): Rewrite
5663 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
5665 * gfortran.texi (Introduction): Lower "Part I:
5666 Introduction" to a chapter, renumber Parts II and III to
5668 * intrinsic.texi (Introduction): Rename to "Introduction
5669 to Intrinsics" to avoid conflict with the new chapter.
5671 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
5673 * intrinsic.texi (Introduction): Rewrite first paragraph.
5675 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
5677 * invoke.texi (OpenMP): Added index entry.
5678 * gfortran.texi (title page): Removed erroneous '*'.
5680 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
5682 * gfortran.texi (GFORTRAN_DEFAULT_RECL): Added units
5684 (Extensions): Miscellaneous minor rewriting and copyediting.
5685 (BOZ-literal constants): Renamed from Hexadecimal constants.
5686 (Hollerith constants support): Added explanation and
5687 suggestions for standard-conforming modern equivalents.
5689 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
5691 * intrinsic.texi: Improvements to index entries; change
5692 @findex entries to @cindex entries.
5693 * invoke.texi: Standardize and improve index entries.
5694 * gfortran.texi: Fix @code in one index entry.
5696 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
5698 * invoke.texi: Change @code-type macros to appropriate
5699 variants (@command, @option, etc.)
5700 * gfortran.texi: Same.
5702 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
5704 * intrinsic.texi: Various minor cleanups.
5706 2007-01-02 Steven G. Kargl <kargls@comcast.net>
5708 * trans-intrinsic.c (gfc_conv_intrinsic_ibits): Fix call to
5711 2007-01-02 Tobias Burnus <burnus@net-b.de>
5714 * scanner.c (open_included_file): Support full-path filenames.
5716 2007-01-02 Paul Thomas <pault@gcc.gnu.org>
5719 * interface.c (check_sym_interfaces): Remove call to
5720 resolve_global_procedure.
5721 gfortran.h : Remove prototype for resolve_global_procedure.
5722 resolve.c (resolve_global_procedure): Add static attribute
5723 to function declaration.
5725 2007-01-01 Steven G. Kargl <kargls@comcast.net>
5727 * ChangeLog: Copy to ...
5728 * ChangeLog-2006: here.