1 2007-12-22 Daniel Franke <franke.daniel@gmail.com>
4 * simplify.c (gfc_simplify_repeat): Added safeguard for empty
7 2007-12-22 Thomas Koenig <tkoenig@gcc.gnu.org>
10 * check.c (gfc_check_cshift): Add check that shift is
13 2007-12-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
16 * iresolve.c (gfc_resolve_cshift): Take optional dim path
17 only if the argument is an optional itself.
18 * iresolve.c (gfc_resolve_eoshift): Same.
20 2007-12-21 Paul Thomas <pault@gcc.gnu.org>
23 * trans-decl.c (gfc_finish_var_decl): Do not mark derived types
24 with default initializers as TREE_STATIC unless they are in the
26 (gfc_get_symbol_decl): Pass derived types with a default
27 initializer to gfc_defer_symbol_init.
28 (init_default_dt): Apply default initializer to a derived type.
29 (init_intent_out_dt): Call init_default_dt.
30 (gfc_trans_deferred_vars): Ditto.
32 * module.c (read_module): Check sym->module is there before
33 using it in a string comparison.
36 2007-12-20 Tobias Burnus <burnus@net-b.de>
39 * gfortran.texi (BOZ): Document behavior for complex
41 * target-memory.h (gfc_convert_boz): Update prototype.
42 * target-memory.c (gfc_convert_boz): Add error check
43 and convert BOZ to smallest possible bit size.
44 * resolve.c (resolve_ordinary_assign): Check return value.
45 * expr.c (gfc_check_assign): Ditto.
46 * simplify.c (simplify_cmplx, gfc_simplify_dble,
47 gfc_simplify_float, gfc_simplify_real): Ditto.
49 2007-12-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
52 * match.h: New function declaration.
53 * match.c (gfc_match_parens): New function to look for mismatched
54 parenthesis. (gfc_match_if): Use new function to catch missing '('.
56 2007-12-19 Daniel Franke <franke.daniel@gmail.com>
59 * expr.c (check_init_expr): Check whether variables with flavor
60 FL_PARAMETER do have a value assigned. Added error messages where
62 * simplify.c (gfc_simplify_transfer): Added check if the MOLD
63 argument is a constant if working with initialization
66 2007-12-17 Tobias Burnus <burnus@net-b.de>
68 * intrinsic.c (add_functions): Undo change; mark float and
70 * intrinsic.texi (FLOAT, SNGL): Change standard to F77 and later.
71 * gfortran.texi (BOZ): Make note about FLOAT etc. clearer.
73 2007-12-16 Tobias Burnus <burnus@net-b.de>
76 * intrinsic.c (add_functions): Mark float and sngl as STD_GNU.
77 (gfc_intrinsic_func_interface): Reject REAL, DBLE and CMPLX
78 in initialization expressions for -std=f95.
80 2007-12-16 Thomas Koenig <tkoenig@gcc.gnu.org>
83 * resolve.c (compare_bound): If either of the types of
84 the arguments isn't INTEGER, return CMP_UNKNOWN.
86 2007-12-16 Tobias Burnus <burnus@net-b.de>
89 * trans-types.c (gfc_init_types): Change build_type_variant
90 to build_qualified_type.
91 (gfc_sym_type): Return gfc_character1_type_node for
92 character-returning bind(C) functions.
93 * trans-expr.c (gfc_conv_function_call): Do not set
94 se->string_length for character-returning bind(c) functions.
95 (gfc_trans_string_copy,gfc_trans_scalar_assign):
96 Support also single characters.
98 2007-12-16 Bernhard Fischer <aldot@gcc.gnu.org>
100 * errors.c (gfc_notify_std): As originally stated but improperly
101 changed, disregard warnings_are_errors for deciding which buffer
104 2007-12-16 Paul Thomas <pault@gcc.gnu.org>
109 * trans-array.c (gfc_trans_array_constructor_value): If the
110 iterator variable does not have a backend_decl, use a local
112 (get_elemental_fcn_charlen): New function to map the character
113 length of an elemental function onto its actual arglist.
114 (gfc_conv_expr_descriptor): Call the above so that the size of
115 the temporary can be evaluated.
116 * trans-expr.c : Include arith.h and change prototype of
117 gfc_apply_interface_mapping_to_expr to return void. Change all
118 references to gfc_apply_interface_mapping_to_expr accordingly.
119 (gfc_free_interface_mapping): Free the 'expr' field.
120 (gfc_add_interface_mapping): Add an argument for the actual
121 argument expression. This is copied to the 'expr' field of the
122 mapping. Only stabilize the backend_decl if the se is present.
123 Copy the character length expression and only add it's backend
124 declaration if se is present. Return without working on the
125 backend declaration for the new symbol if se is not present.
126 (gfc_map_intrinsic_function) : To simplify intrinsics 'len',
127 'size', 'ubound' and 'lbound' and then to map the result.
128 (gfc_map_fcn_formal_to_actual): Performs the formal to actual
129 mapping for the case of a function found in a specification
130 expression in the interface being mapped.
131 (gfc_apply_interface_mapping_to_ref): Remove seen_result and
132 all its references. Remove the inline simplification of LEN
133 and call gfc_map_intrinsic_function instead. Change the
134 order of mapping of the actual arguments and simplifying
135 intrinsic functions. Finally, if a function maps to an
136 actual argument, call gfc_map_fcn_formal_to_actual.
137 (gfc_conv_function_call): Add 'e' to the call to
138 gfc_add_interface_mapping.
139 * dump-parse-tree.c (gfc_show_symbol_n): New function for
141 * gfortran.h : Add prototype for gfc_show_symbol_n.
142 * trans.h : Add 'expr' field to gfc_add_interface_mapping.
143 Add 'expr' to prototype for gfc_show_symbol_n.
144 * resolve.c (resolve_generic_f0): Set specific function as
147 2007-12-14 Tobias Burnus <burnus@net-b.de>
150 * resolve.c (resolve_symbol): Do not emit public-variable-
151 of-private-derived-type error for non-module variables.
153 2007-12-14 Tobias Burnus <burnus@net-b.de>
156 * expr.c (gfc_check_assign): Add range checks for assignments of BOZs.
157 * resolve.c (resolve_ordinary_assign): Ditto.
158 * arith.c (gfc_range_check): Fix return value for complex numbers.
160 2007-12-14 Daniel Franke <franke.daniel@gmail.com>
163 * module.c (parse_atom): Fixed parsing of modules files whose
164 lines are terminated by CRLF.
166 2007-12-13 Anton Korobeynikov <asl@math.spbu.ru>
168 * trans-decl.c (gfc_build_builtin_function_decls): Correct decl
169 construction for select_string() and internal_unpack()
171 2007-12-13 Duncan Sands <baldrick@free.fr>
172 Anton Korobeynikov <asl@math.spbu.ru>
174 * trans-expr.c (gfc_conv_structure): Make sure record constructors
175 for static variables are marked constant.
177 2007-12-12 Tobias Burnus <burnus@net-b.de>
180 * decl.c (match_char_kind): Support use-associated/imported
182 (gfc_match_kind_spec): Support als BT_CHARACTER, when
183 re-scanning kind spec.
185 2007-12-11 Aldy Hernandez <aldyh@redhat.com>
187 * decl.c (add_global_entry): Make type unsigned.
189 2007-12-11 Bernhard Fischer <aldot@gcc.gnu.org>
191 * decl.c (match_prefix): Make seen_type a boolean.
192 (add_global_entry): Cache type distinction.
193 * trans-decl.c: Whitespace cleanup.
195 2007-12-10 Tobias Burnus <burnus@net-b.de>
198 * interface.c (get_expr_storage_size): Use signed integer when
199 obtaining the bounds.
201 2007-12-09 Jakub Jelinek <jakub@redhat.com>
204 * trans.h (struct array_descr_info): Forward declaration.
205 (gfc_get_array_descr_info): New prototype.
206 (enum gfc_array_kind): New type.
207 (struct lang_type): Add akind field.
208 (GFC_TYPE_ARRAY_AKIND): Define.
209 * trans-types.c: Include dwarf2out.h.
210 (gfc_build_array_type): Add akind argument. Adjust
211 gfc_get_array_type_bounds call.
212 (gfc_get_nodesc_array_type): Include proper debug info even for
214 (gfc_get_array_type_bounds): Add akind argument, set
215 GFC_TYPE_ARRAY_AKIND to it.
216 (gfc_sym_type, gfc_get_derived_type): Adjust gfc_build_array_type
218 (gfc_get_array_descr_info): New function.
219 * trans-array.c (gfc_trans_create_temp_array,
220 gfc_conv_expr_descriptor): Adjust gfc_get_array_type_bounds
222 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Likewise.
223 * trans-types.h (gfc_get_array_type_bounds): Adjust prototype.
224 * Make-lang.in (fortran/trans-types.o): Depend on dwarf2out.h.
225 * f95-lang.c (LANG_HOOKS_GET_ARRAY_DESCR_INFO): Define.
227 2007-12-09 Paul Thomas <pault@gcc.gnu.org>
230 * dump-parse-tree.c (gfc_show_expr_n): New function for
232 * gfortran.h : Add prototype for gfc_show_expr_n.
233 * expr.c (simplify_constructor): Copy the constructor
234 expression and try to simplify that. If success, replace the
235 original. Otherwise discard the copy, keep going through
236 the structure and return success.
239 * decl.c (build_struct): Pad out default initializers with
240 spaces to the component character length.
242 2007-12-08 Tobias Burnus <burnus@net-b.de>
248 * gfortran.texi (BOZ literal constants): Improve documentation
249 and adapt for BOZ changes.
250 * Make-lang.ini (resolve.o): Add target-memory.h dependency.
251 * gfortran.h (gfc_expr): Add is_boz flag.
252 * expr.c: Include target-memory.h.
253 (gfc_check_assign): Support transferring BOZ for real/cmlx.
254 * resolve.c: Include target-memory.h
255 (resolve_ordinary_assign): Support transferring BOZ for real/cmlx.
256 * target-memory.c (gfc_convert_boz): New function.
257 * target-memory.c (gfc_convert_boz): Add prototype.
258 * primary.c (match_boz_constant): Set is_boz, enable F95 error
259 also without -pedantic, and allow for Fortran 2003 BOZ.
260 (match_real_constant): Fix comment.
261 * simplify.c (simplify_cmplx,gfc_simplify_dble,gfc_simplify_float,
262 gfc_simplify_real): Support Fortran 2003 BOZ.
264 2007-12-08 Jakub Jelinek <jakub@redhat.com>
267 * gfortran.h (gfc_file): Remove sibling and down fields.
268 * scanner.c (file_changes, file_changes_cur, file_changes_count,
269 file_changes_allocated): New variables.
270 (add_file_change, report_file_change): New functions.
271 (change_file): Remove.
272 (gfc_start_source_files, gfc_end_source_files): Call
273 report_file_change instead of change_file.
274 (gfc_advance_line): Call report_file_change instead of change_file,
275 call it even if lb->file == lb->next->file.
276 (get_file): Revert last changes.
277 (preprocessor_line): Call add_file_change when entering or leaving
279 (load_file): Likewise. Set file_change[...].lb for all newly added
282 2007-12-06 Tobias Burnus <burnus@net-b.de>
285 * primary.c (match_boz_constant): Add gfc_notify_std diagnostics.
287 2007-12-06 Paul Thomas <pault@gcc.gnu.org>
290 * module.c (find_symbol): Do not return symtrees with unique
291 names, which shows that they are private.
293 2007-12-05 Jakub Jelinek <jakub@redhat.com>
296 * gfortran.h (gfc_file): Remove included_by field, add sibling and
298 (gfc_start_source_files, gfc_end_source_files): New prototypes.
299 * parse.c (gfc_parse_file): Call gfc_start_source_files and
300 gfc_end_source_files instead of calling the debugging hooks directly.
301 * error.c (show_locus): Use up field instead of included_by.
302 * scanner.c (change_file, gfc_start_source_files,
303 gfc_end_source_files): New functions.
304 (gfc_advance_line): Call change_file instead of calling debug hooks
306 (get_file): Set up rather than included_by. Initialize down and
308 (preprocessor_line, load_file): Don't set up field here.
310 2007-12-05 Tobias Burnus <burnus@net-b.de>
313 * arith.h (gfc_compare_expr): Add operator argument, needed
315 * arith.c (gfc_arith_init_1): Use mpfr_min instead of mpfr_cmp/set
317 (compare_real): New function, as mpfr_cmp but takes NaN into account.
318 (gfc_compare_expr): Use compare_real.
319 (compare_complex): Take NaN into account.
320 (gfc_arith_eq,gfc_arith_ne,gfc_arith_gt,gfc_arith_ge,gfc_arith_lt,
321 gfc_arith_le): Pass operator to gfc_compare_expr.
322 * resolve.c (compare_cases,resolve_select): Pass operator
324 * simplify.c (simplify_min_max): Take NaN into account.
326 2007-12-04 Tobias Burnus <burnus@net-b.de>
329 * module.c (mio_gmp_real): Properly write NaN and Infinity.
331 2007-12-02 Tobias Burnus <burnus@net-b.de>
334 * symbol.c (generate_isocbinding_symbol): Fix setting string length.
336 2007-11-30 Tobias Burnus <burnus@net-b.de>
339 * match.h: Add bool allow_binding_name to gfc_match_bind_c.
340 * decl.c (match_attr_spec,gfc_match_bind_c_stmt,gfc_match_entry):
342 (gfc_match_bind_c): Add allow_binding_name argument, reject
343 binding name for dummy arguments.
344 (gfc_match_suffix,gfc_match_subroutine): Make use of
347 2007-11-30 Tobias Burnus <burnus@net-b.de>
350 * symbol.c (generate_isocbinding_symbol): Set string length.
351 * dump-parse-tree.c (gfc_show_attr): Show BIND(C) attribute.
352 * misc.c (gfc_basic_typename): Handle BT_VOID.
354 2007-11-29 Steven G. Kargl <kargls@comcast.net>
357 * fortran/arith.c (gfc_check_real_range): Set intermediate values
358 to +-Inf and 0 when -fno-range-check is in effect.
359 * fortran/invoke.texi: Improve -fno-range-check description.
362 * fortran/invoke.texi: Document the C escaped characters activated
365 2007-11-29 Tobias Burnus <burnus@net-b.de>
368 * trans-decl.c (generate_dependency_declarations): Check
369 for NULL pointers before accessing the string length.
371 2007-11-29 Tobias Burnus <burnus@net-b.de>
374 * intrinsic.c (gfc_get_intrinsic_sub_symbol): Add comment.
375 (gfc_intrinsic_sub_interface): Copy elemental state if needed.
376 * iresolve.c (gfc_resolve_mvbits): Mark procedure as elemental.
378 2007-11-28 Jakub Jelinek <jakub@redhat.com>
380 * trans-expr.c (gfc_trans_string_copy): Convert both dest and
384 * trans-openmp.c (gfc_omp_privatize_by_reference): For REFERENCE_TYPE
385 pass by reference only PARM_DECLs or non-artificial decls.
387 2007-11-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
390 * decl.c (match_data_constant): Use gfc_match_init_expr to match the
391 array spec and set the initializer expression.
393 2007-11-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
396 * match.c (gfc_match_common): Add additional check for BLOCK DATA.
398 2007-11-27 Paul Thomas <pault@gcc.gnu.org>
401 *resolve.c (resolve_ordinary_assign): Use find_sym_in_expr to
402 test if a temporary should be written for a vector subscript
406 * restore.c (pure_stmt_function): Add prototype and new
407 function. Calls impure_stmt_fcn.
408 (pure_function): Call it.
409 (impure_stmt_fcn): New function.
411 * expr.c (gfc_traverse_expr): Call *func for all expression
412 types, not just variables. Add traversal of character lengths,
413 iterators and component character lengths and arrayspecs.
414 (expr_set_symbols_referenced): Return false if not a variable.
415 * trans-stmt.c (forall_replace, forall_restore): Ditto.
416 * resolve.c (forall_index): Ditto.
417 (sym_in_expr): New function.
418 (find_sym_in_expr): Rewrite to traverse expression calling
420 *trans-decl.c (expr_decls): New function.
421 (generate_expr_decls): Rewrite to traverse expression calling
423 *match.c (check_stmt_fcn): New function.
424 (recursive_stmt_fcn): Rewrite to traverse expression calling
427 2007-11-27 Paul Thomas <pault@gcc.gnu.org>
430 *interface.c (compare_actual_formal): Exclude assumed size
431 arrays from the possibility of scalar to array mapping.
432 * decl.c (get_proc_name): Fix whitespace problem.
435 * gfortran.h : Add 'use_rename' bit to symbol_attribute.
436 * module.c : Add 'renamed' field to pointer_info.u.rsym.
437 (load_generic_interfaces): Add 'renamed' that is set after the
438 number_use_names is called. This is used to set the attribute
439 use_rename, which, in its turn identifies those symbols that
440 have not been renamed.
441 (load_needed): If pointer_info.u.rsym->renamed is set, then
442 set the use_rename attribute of the symbol.
443 (read_module): Correct an erroneous use of use_flag. Use the
444 renamed flag and the use_rename attribute to determine which
445 symbols are not renamed.
447 2007-11-26 Steven G. Kargl <kargls@comcast.net>
450 * options.c: Change default behavior of backslash processing.
451 * invoke.texi: Update documentation.
453 2007-11-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
456 * decl.c (add_init_expr_to_sym): Remove error message.
457 * resolve.c (check_data_variable): Add new check for a data variable
458 that has an array spec, but no ref and issue an error.
459 * match.c (gfc_match_common): Remove error message.
461 2007-11-25 Tobias Burnus <burnus@net-b.de>
464 * trans-types.c (gfc_return_by_reference,
465 gfc_get_function_type): Do not return result of
466 character-returning bind(C) functions as argument.
467 * trans-expr.c (gfc_conv_function_call): Ditto.
469 2007-11-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
472 * gfortran.texi: Document default forms assumed for various file
475 2007-11-25 Paul Thomas <pault@gcc.gnu.org>
478 * decl.c (get_proc_name): If ENTRY statement occurs before type
479 specification, set the symbol untyped and ensure that it is in
480 the procedure namespace.
482 2007-11-24 Paul Thomas <pault@gcc.gnu.org>
485 * module.c (find_symtree_for_symbol): Move to new location.
486 (find_symbol): New function.
487 (load_generic_interfaces): Rework completely so that symtrees
488 have the local name and symbols have the use name. Renamed
489 generic interfaces exclude the use of the interface without an
490 ONLY clause (11.3.2).
491 (read_module): Implement 11.3.2 in the same way as for generic
494 2007-11-23 Christopher D. Rickett <crickett@lanl.gov>
496 * trans-common.c (build_common_decl): Fix the alignment for
497 BIND(C) common blocks.
499 2007-11-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
502 * iresolve.c (gfc_resolve_nearest): If sign variable kind does not match
503 kind of input variable, convert it to match.
506 * trans.h: Modify prototype for gfc_conv_missing_dummy.
507 * trans-expr.c (gfc_conv_missing_dummy): Modify to pass an integer kind
508 parameter in. Set the type of the dummy to the kind given.
509 (gfc_conv_function_call): Pass representation.length to
510 gfc_conv_missing_dummy.
511 * iresolve.c (gfc_resolve_cshift): Determine the correct kind to use and
512 if appropriate set representation.length to this kind value.
513 (gfc_resolve_eoshift): Likewise.
514 * check.c (gfc_check_cshift): Enable dim_check to allow DIM as an
515 optional argument. (gfc_check_eoshift): Likewise.
516 * trans_intrinsic.c (gfc_conv_intrinsic_function_args): Update call to
517 gfc_conv_missing_dummy.
519 2007-11-23 Tobias Burnus <burnus@net-b.de>
522 * module.c (load_needed): Ensure binding_label is not lost.
524 * decl.c (set_binding_label,gfc_match_bind_c): Replace
527 2007-11-23 Tobias Burnus <burnus@net-b.de>
528 Steven G. Kargl <kargl@gcc.gnu.org>
531 * simplify.c (gfc_simplify_nearest): Fix NEAREST for
534 2007-11-23 Aldy Hernandez <aldyh@redhat.com>
536 * trans-expr.c (gfc_trans_string_copy): Use "void *" when building a
539 2007-11-22 Tobias Burnus <burnus@net-b.de>
541 * primary.c (gfc_match_structure_constructor): Allow
542 constructor for types without components.
544 2007-11-22 Tobias Burnus <burnus@net-b.de>
547 * trans-expr.c (gfc_conv_function_call): Do not append
548 string length arguments when calling bind(c) procedures.
549 * trans-decl.c (create_function_arglist): Do not append
550 string length arguments when declaring bind(c) procedures.
552 2007-11-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
555 * resolve.c (resolve_structure_cons): Also check for zero rank.
557 2007-11-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
560 * trans-expr.c (gfc_conv_missing_dummy): Revert.
561 * iresolve.c (gfc_resolve_cshift): Revert.
562 (gfc_resolve_eoshift): Likewise.
563 * check.c (gfc_check_cshift): Revert.
564 (gfc_check_eoshift): Likewise.
566 2007-11-19 Tobias Burnus <burnus@net-b.de>
569 * decl.c (gfc_match_entry): Support BIND(C).
570 (gfc_match_subroutine): Fix comment typo.
572 2007-11-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
575 * trans-expr.c (gfc_conv_missing_dummy): Set the type of the dummy
576 argument to default integer if flagged to do so. Fix typo in comment.
577 * resolve.c (gfc_resolve_dim_arg): Whitespace cleanup.
578 * iresolve.c (gfc_resolve_cshift): Do not convert type, mark attribute
579 for converting the DIM type appropriately in trans-expr.c.
580 (gfc_resolve_eoshift): Likewise.
581 * check.c (dim_check): Remove pre-existing dead code.
582 (gfc_check_cshift): Enable dim_check to allow DIM as an optional.
583 (gfc_check_eoshift): Likewise.
584 * trans_intrinsic.c (gfc_conv_intrinsic_function_args): Fix whitespace.
586 2007-11-18 Paul Thomas <pault@gcc.gnu.org>
589 * trans-array.c (gfc_conv_expr_descriptor): Remove exception
590 for indirect references in the call to gfc_trans_scalar_assign.
591 * trans-expr.c (gfc_conv_string_parameter): Instead of asserting
592 that the expression is not an indirect reference, cast it to a
593 pointer type of the length given by se->string_length.
595 2007-11-18 Tobias Burnus <burnus@net-b.de>
598 * primary.c (match_variable): Reject non-result entry symbols.
599 * resolve.c (resolve_contained_fntype): Do not check entry master
602 2007-11-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
604 * trans-types.c (gfc_init_types): Use wider buffer.
606 2007-11-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
608 * trans-types.c (gfc_init_types): Use Fortran-90-style type
611 2007-11-17 Tobias Burnus <burnus@net-b.de>
614 * decl.c (gfc_match_suffix,gfc_match_subroutine): Disallow
615 bind(c) attribute for internal procedures.
617 2007-11-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
620 * interface.c (gfc_current_interface_head,
621 gfc_set_current_interface_head): New functions.
622 * decl.c (gfc_match_modproc): Move check for syntax error earlier.
623 On syntax error, restore previous state of the interface.
624 * gfortran.h (gfc_current_interface_head,
625 gfc_set_current_interface_head): New prototypes.
627 2007-11-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
630 * module.c (struct written_common, written_commons): New structure.
631 (compare_written_commons, free_written_common, write_common_0):
633 (write_common): Call recursive function write_common_0.
635 2007-11-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
638 * io.c (check_format_string): Only check character expressions.
639 (match_dt_format): Return MATCH_ERROR if that is what
640 gfc_match_st_label said.
642 2007-11-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
645 * expr.c (check_inquiry): Don't call gfc_error now.
647 2007-11-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
651 * scanner.c (start_source_file, end_source_file,
652 exit_remaining_files, gfc_advance_line): Revert rev. 130016.
654 2007-11-16 Paul Thomas <pault@gcc.gnu.org>
657 * trans-stmt.c (gfc_conv_elemental_dependencies): Add check for
658 INTENT_INOUT as well as INTENT_OUT.
659 (gfc_trans_call): Remove redundant gcc_asserts in dependency
662 2007-11-16 Paul Thomas <pault@gcc.gnu.org>
665 * trans-array.c (gfc_conv_array_parameter ): Allow allocatable
668 2007-11-15 Tobias Burnus <burnus@net-b.de>
671 * decl.c (match_procedure_decl): Pre-resolve interface.
672 * resolve.c (resolve_symbol): Reject interfaces later
673 declared in procedure statements.
675 2007-11-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
678 * decl.c (match_procedure_decl): Remove TODO and allow intrinsics in
679 PROCEDURE declarations. Set attr.untyped to allow the interface to be
680 resolved later where the symbol type will be set.
681 * interface.c (compare_intr_interfaces): Remove static from pointer
682 declarations. Add type and kind checks for dummy function arguments.
683 (compare_actual_formal_intr): New function to compare an actual
684 argument with an intrinsic function. (gfc_procedures_use): Add check for
685 interface that points to an intrinsic function, use the new function.
686 * resolve.c (resolve_specific_f0): Resolve the intrinsic interface.
687 (resolve_specific_s0): Ditto.
689 2007-11-13 Paul Thomas <pault@gcc.gnu.org>
692 * iresolve.c (gfc_resolve_transfer): Do not try to convert
693 to a constant MOLD expression, if it is an assumed size
696 2007-11-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
698 * trans-common.c: Remove prototype for gfc_get_common.
700 2007-11-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
703 * trans.c (gfc_call_realloc): Fix the logic and rename variables.
705 2007-11-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
708 * scanner.c (start_source_file, end_source_file,
709 exit_remaining_files): New functions.
710 (gfc_advance_line): Use the new functions.
712 2007-11-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
715 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use correct type.
717 2007-11-08 Tobias Burnus <burnus@net-b.de>
720 * interface.c (check_sym_interfaces): Disallow PROCEDURE-declared
721 procedures for MODULE PROCEDURE.
722 * decl.c (match_procedure_in_interface): Do not mark as procedure.
724 2007-11-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
727 * trans-array.c (gfc_conv_array_parameter): Evaluate
728 se->string_length instead of the expr->ts.cl->backend_decl.
730 2007-11-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
732 * gfortran.h: Shorten comment.
733 * trans-types.c (gfc_get_function_type): Allow argument to have
735 * trans-decl.c (gfc_sym_mangled_function_id): Mangle main program
737 (build_function_decl): Fix comment.
738 * parse.c (main_program_symbol): Give the main program its proper
739 name, if any. Set its flavor to FL_PROGRAM.
740 (gfc_parse_file): Likewise.
742 2007-11-02 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
744 * intrinsic.texi (ALLOCATED): Fix typo.
746 2007-10-31 Tobias Burnus <burnus@net-b.de>
749 * modules.c (intrinsics): Use only alphabetic names for
752 2007-10-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
755 * interface.c (compare_intr_interfaces): New function to check intrinsic
756 function arguments against formal arguments. (compare_interfaces): Fix
757 logic in comparison of function and subroutine attributes.
758 (compare_parameter): Use new function for intrinsic as argument.
759 * resolve.c (resolve_actual_arglist): Allow an intrinsic without
760 function attribute to be checked further. Set function attribute if
761 intrinsic symbol is found, return FAILURE if not.
763 2007-10-31 Paul Thomas <pault@gcc.gnu.org>
766 * decl.c (gfc_match_entry): Do not make ENTRY name
767 global for contained procedures.
768 * parse.c (gfc_fixup_sibling_symbols): Fix code for
769 determining whether a procedure is external.
771 2007-10-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
774 * trans-intrinsic.c (gfc_conv_intrinsic_isnan): Strip NOP_EXPR
775 from the result of build_call_expr.
777 2007-10-29 Paul Thomas <pault@gcc.gnu.org>
783 * trans-array.c (gfc_conv_loop_setup): Send a complete type to
784 gfc_trans_create_temp_array if the temporary is character.
785 * trans-stmt.c (gfc_trans_assign_need_temp): Do likewise for
786 allocate_temp_for_forall_nest.
787 (forall_replace): New function.
788 (forall_replace_symtree): New function.
789 (forall_restore): New function.
790 (forall_restore_symtree): New function.
791 (forall_make_variable_temp): New function.
792 (check_forall_dependencies): New function.
793 (cleanup_forall_symtrees): New function.
794 gfc_trans_forall_1): Add and initialize pre and post blocks.
795 Call check_forall_dependencies to check for all dependencies
796 and either trigger second forall block to copy temporary or
797 copy lval, outside the forall construct and replace all
798 dependent references. After assignment clean-up and coalesce
799 the blocks at the end of the function.
800 * gfortran.h : Add prototypes for gfc_traverse_expr and
802 expr.c (gfc_traverse_expr): New function to traverse expression
803 and visit all subexpressions, under control of a logical flag,
804 a symbol and an integer pointer. The slave function is caller
805 defined and is only called on EXPR_VARIABLE.
806 (expr_set_symbols_referenced): Called by above to set symbols
808 (gfc_expr_set_symbols_referenced): Rework of this function to
809 use two new functions above.
810 * resolve.c (find_forall_index): Rework with gfc_traverse_expr,
812 (forall_index): New function used by previous.
813 * dependency.c (gfc_check_dependency): Use gfc_dep_resolver for
814 all references, not just REF_ARRAY.
815 (gfc_dep_resolver): Correct the logic for substrings so that
816 overlapping arrays are handled correctly.
818 2007-10-28 Tobias Schlüter <tobi@gcc.gnu.org>
821 * module.c (write_symbol): Fix whitespace.
822 (write_symbol0): Walk symtree from left-to-right instead
824 (write_symbol1): Similarly change walk of pointer info tree.
825 (write_module): Insert linebreak.
826 * symbol.c (gfc_traverse_symtree): Change to left-to-right order.
827 (traverse_ns): Likewise.
829 2007-10-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
832 * decl.c (char_len_param_value): Add check for conflicting attributes of
835 2007-10-27 Tobias Burnus <burnus@net-b.de>
838 * lang-specs.h: Support .ftn and .FTN extension, use CPP for .FOR.
839 * options.c (form_from_filename): Support .ftn extension.
840 * gfortran.texi: Document support of .for and .ftn file extension.
842 2007-10-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
845 * intrinsic.h: Add prototypes for four new functions, gfc_check_datan2,
846 gfc_check_dprod, gfc_check_fn_d, and gfc_check_x_yd.
847 * intrinsic.c (add_functions): Add double precision checks for dabs,
848 dacos, dacosh, dasin, dasinh, datan, datanh, datan2, dbesj0, dbesj1,
849 dbesy0, dbesy1, dcos, dcosh, ddim, derf, derfc, dexp, dgamma,
850 dlgama, dlog, dlog10, dmod, dsign, dsin, dsinh, dsqrt, dtan, and dtanh.
851 Add real check dprod.
852 * check.c (gfc_check_datan2): New function to check for double precision
853 argumants. (gfc_check_dprod, gfc_check_fn_d, and gfc_check_x_yd): Ditto.
855 2007-10-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
857 * invoke.texi: Fix typo in -fmax-errors=.
859 2007-10-26 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
862 * gfortran.texi: Document that there is no logical/integer
863 conversion performed during I/O operations.
865 2007-10-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
868 * resolve.c (resolve_actual_arglist): Fix error message text.
870 2007-10-22 Steven G. Kargl <kargl@gcc.gnu.org>
873 * gfortran.h (gfc_data_value): Change repeat from unsigned int
875 * decl.c(top_val_list): Remove msg variable. Use mpz_t for
877 * resolve.c (values): Change left from unsigned int to mpz_t.
878 (next_data_value): Change for mpz_t.
879 (check_data_variable): Change ??? to FIXME in a comment. Use
881 (resolve_data ): Use "mpz_t left".
883 2007-10-21 Paul Thomas <pault@gcc.gnu.org>
886 * resolve.c (resolve_ordinary_assign): New function that takes
887 the code to resolve an assignment from resolve_code. In
888 addition, it makes a temporary of any vector index, on the
889 lhs, using gfc_get_parentheses.
890 (resolve_code): On EXEC_ASSIGN call the new function.
892 2007-10-20 Tobias Burnus <burnus@net-b.de>
895 * resolve.c (resolve_variable): Check that symbol is in the same
896 namespace as the entry function.
898 2007-10-20 Paul Thomas <pault@gcc.gnu.org>
899 FX Coudert <fxcoudert@gcc.gnu.org>
902 * trans-array.c (gfc_conv_expr_descriptor): For all except
903 indirect references, use gfc_trans_scalar_assign instead of
905 * iresolve.c (check_charlen_present): Separate creation of cl
906 if necessary and add code to treat an EXPR_ARRAY.
907 (gfc_resolve_char_achar): New function.
908 (gfc_resolve_achar, gfc_resolve_char): Call it.
909 (gfc_resolve_transfer): If the MOLD expression does not have a
910 character length expression, get it from a constant length.
912 2007-10-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
915 * simplify.c (gfc_simplify_transfer): Only warn for short transfer when
916 -Wsurprising is given.
917 * invoke.texi: Document revised behavior.
919 2007-10-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
922 * gfortran.texi: Document GFORTRAN_UNBUFFERED_PRECONNECTED
923 environment variable. Delete mention of environment variable
924 GFORTRAN_UNBUFFERED_n.
926 2007-10-18 Paul Thomas <pault@gcc.gnu.org>
929 * resolve.c (check_host_association): Check singly contained
930 namespaces and start search for symbol in current namespace.
932 2007-10-18 Paul Thomas <pault@gcc.gnu.org>
933 Dominique d'Humieres <dominiq@lps.ens.fr>
936 * simplify.c (gfc_simplify_transfer): Return null if the source
937 expression is EXPR_FUNCTION.
939 2007-10-17 Christopher D. Rickett <crickett@lanl.gov>
942 * symbol.c (gen_special_c_interop_ptr): Remove code to create
943 constructor for c_null_ptr and c_null_funptr with value of 0.
944 * expr.c (check_init_expr): Prevent check on constructors for
945 iso_c_binding derived types.
946 * resolve.c (resolve_structure_cons): Verify that the user isn't
947 trying to invoke a structure constructor for one of the
948 iso_c_binding derived types.
950 2007-10-15 Christopher D. Rickett <crickett@lanl.gov>
953 * trans-expr.c (gfc_conv_function_call): Generate code to inline
955 * symbol.c (get_iso_c_sym): Preserve from_intmod and intmod_sym_id
956 attributes in the resolved symbol.
957 * resolve.c (gfc_iso_c_sub_interface): Remove dead code.
959 2007-10-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
962 * trans-io.c (create_dummy_iostat): New function to create a unique
963 dummy variable expression to use with IOSTAT.
964 (gfc_trans_inquire): Use the new function to pass unit number error info
965 to run-time library if a regular IOSTAT variable was not given.
967 2007-10-14 Tobias Burnus <burnus@net-b.de>
970 * trans-array.c (gfc_conv_ss_startstride): Fix dimension check.
971 (gfc_trans_array_bound_check, gfc_conv_array_ref,
972 gfc_conv_ss_startstride): Simplify error message.
973 * resolve.c (check_dimension): Fix dimension-type switch;
974 improve error message.
976 2007-10-13 Tobias Schlüter <tobi@gcc.gnu.org>
977 Paul Thomas <pault@gcc.gnu.org>
981 * trans-array.c (get_array_ctor_var_strlen): Check upper bound for
982 constness instead of lower bound.
983 (get_array_ctor_strlen): Add bounds-checking code.
985 2007-10-12 Paul Thomas <pault@gcc.gnu.org>
988 * resolve.c (resolve_actual_arglist): If the actual argument is
989 ambiguous, then there is an error.
991 2007-10-12 Paul Thomas <pault@gcc.gnu.org>
994 * expr.c (gfc_specification_expr): If a function is not
995 external, intrinsic or pure is an error. Set the symbol pure
996 to prevent repeat errors.
998 2007-10-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1001 * expr.c (find_array_section): Check for constructor constantness.
1003 2007-10-08 Tobias Schlüter <tobi@gcc.gnu.org>
1006 * resolve.c (gfc_resolve_expr): Fix indentation.
1007 (resolve_fl_variable_derived): Rename argument.
1008 (resolve_fl_variable): Fix case in message. Clarify logic.
1009 Correctly simplify array bounds.
1011 2007-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1014 * mathbuiltins.def (GAMMA): Change function name to
1015 "tgamma" instad of "gamma".
1017 2007-10-07 Tobias Schlüter <tobi@gcc.gnu.org>
1020 * expr.c (check_inquiry): Typo fix in error message.
1021 (check_init_expr): Same * 3.
1022 (check_restricted): Verify that no dummy arguments appear in
1023 restricted expressions in ELEMENTAL procedures.
1024 * resolve.c (resolve_fl_variable): Exchange order of checks to
1027 2007-10-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1030 * simplify.c (range_check): Return gfc_bad_expr if incoming expression
1033 2007-10-06 Tobias Schlüter <tobi@gcc.gnu.org>
1035 * simplify.c (gfc_simplify_size): Fix typo.
1037 2007-10-06 Tobias Schlüter <tobi@gcc.gnu.org>
1040 * resolve.c (gfc_find_forall_index): Move towards top,
1042 (find_forall_index): ... this. Add check for NULL expr.
1043 (resolve_forall_iterators): Verify additional constraint.
1044 (resolve_forall): Remove checks obsoleted by new code in
1045 resolve_forall_iterators.
1047 2007-10-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1049 * gfortran.h (gfc_get_data_variable, gfc_get_data_value,
1050 gfc_get_data): Move to decl.c.
1051 (global_used): Rename into gfc_global_used.
1052 (gfc_formalize_init_value, gfc_get_section_index,
1053 gfc_assign_data_value, gfc_assign_data_value_range,
1054 gfc_advance_section): Move to data.h.
1055 (gfc_set_in_match_data): Remove.
1056 * decl.c (gfc_get_data_variable, gfc_get_data_value,
1057 gfc_get_data): Move here.
1058 (gfc_set_in_match_data): Rename into set_in_match_data.
1059 (gfc_match_data): Likewise.
1060 (add_global_entry): Rename global_used into gfc_global_used.
1061 * data.c: Include data.h.
1062 * trans.h (gfc_todo_error): Remove.
1063 * trans-array.c (gfc_trans_array_constructor,
1064 gfc_conv_ss_startstride, gfc_conv_loop_setup): Change
1065 gfc_todo_error into assertions.
1066 * resolve.c (resolve_global_procedure): Rename global_used into
1068 * parse.c (gfc_global_used, parse_module, add_global_procedure,
1069 add_global_program): Likewise.
1070 * trans-intrinsic.c (gfc_walk_intrinsic_function): Rename
1071 global_used into gfc_global_used.
1072 * Make-lang.in: Add dependencies on fortran/data.h.
1075 2007-10-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1078 * decl.c (match_char_kind): New function.
1079 (match_char_spec): Use match_char_kind.
1081 2007-10-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1084 * scanner.c (gfc_advance_line): Call debug_hooks->end_source_file
1085 and debug_hooks->start_source_file when appropriate, and set
1087 (gfc_define_undef_line): New function.
1088 (load_file): Don't error out on #define and #undef lines.
1089 * parse.c (next_statement): Call gfc_define_undef_line.
1090 (gfc_parse_file): Call debug_hooks->start_source_file and
1091 debug_hooks->end_source_file for the main source file if
1093 * gfortran.h (gfc_linebuf): Add dbg_emitted field.
1094 (gfc_define_undef_line): New prototype.
1096 2007-10-04 Tobias Schlüter <tobi@gcc.gnu.org>
1099 * resolve.c (resolve_operator): Always copy the type for
1100 expressions in parentheses.
1102 2007-10-04 Paul Thomas <pault@gcc.gnu.org>
1106 * interface.c (check_interface1): Revert patch of 10-02.
1108 2007-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1111 * trans-decl.c (build_function_decl): Set "externally_visible"
1112 attribute on the MAIN program decl.
1114 2007-10-03 Tobias Schlüter <tobi@gcc.gnu.org>
1117 * resolve.c (has_default_initializer): Move to top. Make bool.
1118 (resolve_common_blocks): Simplify logic. Add case for derived
1119 type initialization.
1120 (resolve_fl_variable_derived): Split out from ...
1121 (resolve_fl_variable): ... here, while adapting to new h_d_i
1124 2007-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1127 * options.c (gfc_post_options): Issue an error when
1128 -fwhole-program is used.
1130 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
1133 * interface.c (check_interface1): Specific procedures are
1134 always ambiguous if they have the same name.
1136 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
1139 * primary.c (gfc_match_rvalue): Make all expressions with array
1140 references to structure parameters into variable expressions.
1142 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
1145 * trans-decl.c (init_intent_out_dt): New function.
1146 (gfc_trans_deferred_vars): Remove the code for default
1147 initialization of INTENT(OUT) derived types and put it
1148 in the new function. Call it earlier than before, so
1149 that array offsets and lower bounds are available.
1151 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
1154 * decl.c (get_proc_name): Return rc if rc is non-zero; ie. if
1155 the name is a reference to an ambiguous symbol.
1157 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
1162 * decl.c : Declare gfc_function_kind_locs and
1163 gfc_function_type_locus.
1164 (gfc_match_kind_spec): Add second argument kind_expr_only.
1165 Store locus before trying to match the expression. If the
1166 current state corresponds to a function declaration and there
1167 is no match to the expression, read to the parenthesis, return
1168 kind = -1, dump the expression and return.
1169 (gfc_match_type_spec): Renamed from match_type_spec and all
1170 references changed. If an interface or an external function,
1171 store the locus, set kind = -1 and return. Otherwise, if kind
1172 is already = -1, use gfc_find_symbol to try to find a use
1173 associated or imported type.
1174 match.h : Prototype for gfc_match_type_spec.
1175 * parse.c (match_deferred_characteristics): New function.
1176 (parse_spec): If in a function, statement is USE or IMPORT
1177 or DERIVED_DECL and the function kind=-1, call
1178 match_deferred_characteristics. If kind=-1 at the end of the
1179 specification expressions, this is an error.
1180 * parse.h : Declare external gfc_function_kind_locs and
1181 gfc_function_type_locus.
1183 2007-09-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1185 * module.c (mio_expr): Avoid -Wcast-qual warning.
1187 2007-09-27 Tobias Schlüter <tobi@gcc.gnu.org>
1189 * arith.c (reduce_binary_aa): Fix capitalization.
1190 * check.c (gfc_check_dot_product): Likewise.
1191 (gfc_check_matmul): Likewise.
1192 * expr.c (gfc_check_conformance): Likewise.
1193 (gfc_check_assign): Likewise.
1194 (gfc_default_initializer): Simplify logic.
1195 * trans.c (gfc_msg_bounds): Make const.
1196 (gfc_msg_fault): Likewise.
1197 (gfc_msg_wrong_return): Likewise.
1198 * trans.h: Add const to corresponding extern declarations.
1200 2007-09-27 Paul Thomas <pault@gcc.gnu.org>
1203 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Allow for the
1204 possibility of the optional KIND argument by making arg
1205 an array, counting the number of arguments and using arg[0].
1207 2007-09-26 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1210 * invoke.texi: Add note to -ffpe-trap option. Fix typos.
1212 2007-09-23 Tobias Schlüter <tobi@gcc.gnu.org>
1215 * io.c (check_format_string): Move NULL and constant checks into
1217 (check_io_constraints): Call gfc_simplify_expr() before calling
1218 check_format_string(). Remove NULL and constant checks.
1220 2007-09-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1223 * scanner.c, parse.c, gfortran.h: Revert revision 128671.
1225 2007-09-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1228 * scanner.c (preprocessor_line): Call linemap_add when exiting
1230 (gfc_new_file): Adjust debug code for USE_MAPPED_LOCATION.
1232 2007-09-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1235 * trans-types.c (gfc_get_desc_dim_type): Mark artificial
1236 variables with TREE_NO_WARNING.
1237 (gfc_get_array_descriptor_base): Likewise.
1239 2007-09-22 Paul Thomas <pault@gcc.gnu.org>
1243 * trans-decl.c (gfc_create_module_variable): Output
1244 derived type parameters.
1245 * arith.c (gfc_parentheses): Return the argument if
1246 it is a constant expression.
1247 * primary.c (gfc_match_rvalue): Remove the clearing of
1248 the module name and the use_assoc attribute for derived
1249 type parameter expressions.
1251 2007-09-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1254 * scanner.c (gfc_advance_line): Call debug_hooks->start_source_file
1255 and debug_hooks->end_source_file when entering and exiting
1257 (gfc_define_undef_line): New function.
1258 (load_file): Ignore #define and #undef preprocessor lines
1259 while reading source files.
1260 * parse.c (next_statement): Handle #define and #undef
1262 (gfc_parse_file): Call debug_hooks->start_source_file and
1263 debug_hooks->end_source_file for the main source file if
1264 requested by the debug format.
1265 * gfortran.h (gfc_define_undef_line): Add prototype.
1267 2007-09-22 Tobias Burnus <burnus@net-b.de>
1270 * scanner.c (skip_free_comments): Warn if !$OMP& is used
1271 if no OpenMP directive is to be continued.
1273 2007-09-21 Paul Thomas <pault@gcc.gnu.org>
1275 *trans-expr.c (gfc_trans_pointer_assignment): Convert array
1276 descriptor for subref pointer assignements, rather than using
1277 the loop info version.
1279 2007-09-21 Tobias Burnus <burnus@net-b.de>
1282 * simplify.c (gfc_simplify_transfer): Warn if source size
1283 is smaller than result size.
1285 2007-09-20 Asher Langton <langton2@llnl.gov>
1288 * gfortran.h : Add init_local_* enums and init_flag_* flags to
1290 * lang.opt: Add -finit-local-zero, -finit-real, -finit-integer,
1291 -finit-character, and -finit-logical flags.
1292 * invoke.texi: Document new options.
1293 * resolve.c (build_init_assign): New function.
1294 (apply_init_assign): Move part of function into build_init_assign.
1295 (build_default_init_expr): Build local initializer (-finit-*).
1296 (apply_default_init_local): Apply local initializer (-finit-*).
1297 (resolve_fl_variable): Try to add local initializer (-finit-*).
1298 * options.c (gfc_init_options, gfc_handle_option,
1299 gfc_post_options): Handle -finit-local-zero, -finit-real,
1300 -finit-integer, -finit-character, and -finit-logical flags.
1302 2007-09-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1305 * gfortran.h (symbol_attribute): Add zero_comp field.
1306 * symbol.c (gfc_use_derived): Handle case of emtpy derived types.
1307 * decl.c (gfc_match_data_decl): Likewise.
1308 (gfc_match_derived_decl): Likewise.
1309 * module.c (ab_attribute, attr_bits): Add AB_ZERO_COMP member.
1310 (mio_symbol_attribute): Write and read AB_ZERO_COMP.
1311 * resolve.c (resolve_symbol): Handle case of emtpy derived types.
1312 * parse.c (parse_derived): Likewise.
1314 2007-09-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1317 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
1318 reduce_binary_aa): Call ourselves recursively if an element of
1319 the constructor is itself a constant array.
1321 2007-09-20 Tobias Schlüter <tobi@gcc.gnu.org>
1323 * io.c (resolve_tag_format): New function using code split out
1324 and simplified from ...
1325 (resolve_tag): ... this function. Simplify logic. Unify
1326 IOSTAT, IOLENGTH and SIZE handling.
1328 2007-09-20 Christopher D. Rickett <crickett@lanl.gov>
1331 * resolve.c (gfc_iso_c_func_interface): Use information from
1332 subcomponent if applicable.
1334 2007-09-20 Tobias Burnus <burnus@net-b.de>
1337 * intrinsic.text: Add documentation of the intrinsic modules.
1338 * gfortran.texi: Link to intrinsic-modules section and to
1341 2007-09-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1344 * trans-array.c (gfc_conv_ss_startstride): Only perform bounds
1345 checking for optional args when they are present.
1347 2007-09-18 Tobias Burnus <burnus@net-b.de>
1350 * resolve.c (resolve_elemental_actual): Check for conformance
1351 of intent out/inout dummies.
1353 2007-09-17 Tobias Burnus <burnus@net-b.de>
1356 * resolve.c (resolve_symbol): Reject public variable of
1357 private derived-types for Fortran 95.
1359 2007-09-17 Tobias Burnus <burnus@net-b.de>
1361 * resolve.c (resolve_fl_procedure): Allow private dummies
1364 2007-09-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1366 * trans-types.c (gfc_get_desc_dim_type): Do not to try
1368 (gfc_get_array_descriptor_base): Likewise.
1369 (gfc_get_mixed_entry_union): Likewise
1370 (gfc_get_derived_type): Set decl location for fields and
1371 derived type itself.
1373 2007-09-16 Paul Thomas <pault@gcc.gnu.org>
1379 * trans.h : Add extra argument to gfc_build_array_ref. Rename
1380 gfc_conv_aliased_arg to gfc_conv_subref_array_arg. Move
1381 prototype of is_aliased_array to gfortran.h and rename it
1382 gfc_is_subref_array. Add field span to lang_decl, add a new
1383 decl lang specific flag accessed by GFC_DECL_SUBREF_ARRAY_P
1384 and a new type flag GFC_DECL_SUBREF_ARRAY_P.
1385 * trans.c (gfc_build_array_ref): Add the new argument, decl.
1386 If this is a subreference array pointer, use the lang_decl
1387 field 'span' to calculate the offset in bytes and use pointer
1388 arithmetic to address the element.
1389 * trans-array.c (gfc_conv_scalarized_array_ref,
1390 gfc_conv_array_ref): Add the backend declaration as the third
1391 field, if it is likely to be a subreference array pointer.
1392 (gfc_conv_descriptor_dimension, gfc_trans_array_ctor_element,
1393 gfc_trans_array_constructor_element, structure_alloc_comps,
1394 gfc_conv_array_index_offset): For all other references to
1395 gfc_build_array_ref, set the third argument to NULL.
1396 (gfc_get_dataptr_offset): New function.
1397 (gfc_conv_expr_descriptor): If the rhs of a pointer assignment
1398 is a subreference array, then calculate the offset to the
1399 subreference of the first element and set the descriptor data
1400 pointer to this, using gfc_get_dataptr_offset.
1401 trans-expr.c (gfc_get_expr_charlen): Use the expression for the
1402 character length for a character subreference.
1403 (gfc_conv_substring, gfc_conv_subref_array_arg): Add NULL for
1404 third argument in call to gfc_build_array_ref.
1405 (gfc_conv_aliased_arg): Rename to gfc_conv_subref_array_arg.
1406 (is_aliased_array): Remove.
1407 (gfc_conv_function_call): Change reference to is_aliased_array
1408 to gfc_is_subref_array and reference to gfc_conv_aliased_arg to
1409 gfc_conv_subref_array_arg.
1410 (gfc_trans_pointer_assignment): Add the array element length to
1411 the lang_decl 'span' field.
1412 * gfortran.h : Add subref_array_pointer to symbol_attribute and
1413 add the prototype for gfc_is_subref_array.
1414 * trans-stmt.c : Add NULL for third argument in all references
1415 to gfc_build_array_ref.
1416 * expr.c (gfc_is_subref_array): Renamed is_aliased_array.
1417 If this is a subreference array pointer, return true.
1418 (gfc_check_pointer_assign): If the rhs is a subreference array,
1419 set the lhs subreference_array_pointer attribute.
1420 * trans-decl.c (gfc_get_symbol_decl): Allocate the lang_decl
1421 field if the symbol is a subreference array pointer and set an
1422 initial value of zero for the 'span' field.
1423 * trans-io.c (set_internal_unit): Refer to is_subref_array and
1424 gfc_conv_subref_array_arg.
1425 (nml_get_addr_expr): Add NULL third argument to
1426 gfc_build_array_ref.
1427 (gfc_trans_transfer): Use the scalarizer for a subreference
1430 2007-09-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1432 * iresolve.c (resolve_mask_arg): If a mask is an array
1433 expression, convert it to kind=1.
1435 2007-09-13 Tobias Burnus <burnus@net-b.de>
1438 * expr.c (gfc_check_conformance): Print ranks in the error message.
1439 * resolve.c (resolve_elemental_actual): Check also conformance of
1440 the actual arguments for elemental functions.
1442 2007-09-13 Tobias Burnus <burnus@net-b.de>
1444 * symbol.c (gfc_add_elemental,gfc_add_pure,gfc_add_recursive):
1445 Allow prefixes only to be specified once.
1447 2007-09-13 Tobias Burnus <burnus@net-b.de>
1450 * symbol.c (check_conflict): Add conflict of ELEMENTAL with Bind(C).
1452 2007-09-12 Tobias Burnus <burnus@net-b.de>
1455 * check.c (scalar_check): Move up in the file.
1456 (kind_check): Call scalar_check.
1457 (dim_check): If optional, do not call nonoptional_check; use
1459 (gfc_check_all_any,gfc_check_count,gfc_check_cshift,gfc_check_eoshift,
1460 gfc_check_lbound,gfc_check_minloc_maxloc,check_reduction,
1461 gfc_check_spread,gfc_check_ubound): Use true/false instead of 0/1
1462 for dim_check; honor changed meaning of optional.
1463 (gfc_check_int): Replace checks by kind_check.
1464 (gfc_check_size): Replace checks by dim_check.
1466 2007-09-12 Tobias Burnus <burnus@net-b.de>
1470 * symbol.c (check_conflict): Add conflict between INTRINSIC and ENTRY
1471 and between BIND(C) and PARAMETER.
1473 2007-09-12 Tobias Burnus <burnus@net-b.de>
1475 * trans-expr.c (gfc_conv_initializer): Fix expr == NULL check.
1477 2007-09-12 Jan Hubicka <jh@suse.cz>
1479 * f95-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1481 2007-09-12 Christopher D. Rickett <crickett@lanl.gov>
1484 * trans-expr.c (gfc_conv_initializer): Remove unnecessary test for
1485 intmod_sym_id and use derived symbol to set new kind of C_NULL_PTR
1486 and C_NULL_FUNPTR expressions.
1488 2007-09-11 Christopher D. Rickett <crickett@lanl.gov>
1491 * trans-expr.c (gfc_trans_structure_assign): Convert component
1492 C_NULL_PTR and C_NULL_FUNPTR component initializers to (void *).
1493 * trans-types.c (gfc_get_derived_type): Create a backend_decl for
1494 the c_address field of C_PTR and C_FUNPTR and ensure initializer
1495 is of proper type/kind for (void *).
1497 2007-09-11 Jan Hubicka <jh@suse.cz>
1499 * f95-lang.c (gfc_expand_function): Kill.
1500 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1502 2007-09-08 Tobias Burnus <burnus@net-b.de>
1505 * gfortran.texi: Document when CPP is called.
1507 * intrinsic.texi (IOR): Fix typos.
1509 2007-09-10 Paul Thomas <pault@gcc.gnu.org>
1512 * trans-expr.c (copyable_array_p): Add tests that expression
1513 is a variable, that it has no subreferences and that it is a
1515 (gfc_trans_assignment): Change conditions to suit modifications
1516 to copyable_array_p.
1518 2007-09-06 Tom Tromey <tromey@redhat.com>
1520 * scanner.c (get_file): Update.
1521 (load_file): Update.
1522 (gfc_next_char_literal): Use gfc_linebuf_linenum.
1523 * f95-lang.c (gfc_init): Update.
1524 * gfortran.h (gfc_linebuf_linenum): New macro.
1526 2007-09-05 Sandra Loosemore <sandra@codesourcery.com>
1528 * trans-decl.c (build_entry_thunks): Use set_cfun.
1529 (gfc_generate_function_code): Likewise.
1531 2007-09-05 Paul Thomas <pault@gcc.gnu.org>
1534 * primary.c (gfc_match_rvalue): Make expressions that refer
1535 to derived type parameters that have array references into
1536 variable expressions. Remove references to use association
1540 * decl.c (add_init_expr_to_sym): Provide assumed character
1541 length parameters with the length of the initialization
1542 expression, if a constant, or that of the first element of
1545 2007-09-04 Janus Weil <jaydub66@gmail.com>
1546 Paul Thomas <pault@gcc.gnu.org>
1548 * decl.c (match_procedure_decl,match_procedure_in_interface,
1549 gfc_match_procedure): Handle PROCEDURE statements.
1550 * gfortran.h (struct gfc_symbol): New member "gfc_symbol *interface".
1551 (enum gfc_statement): New element "ST_PROCEDURE".
1552 (strcut symbol_attribute): New member "unsigned procedure".
1553 * interface.c (check_interface0): Extended error checking.
1554 * match.h: Add gfc_match_procedure prototype.
1555 * parse.c (decode_statement,next_statement,gfc_ascii_statement,
1556 parse_derived,parse_interface): Implement PROCEDURE statements.
1557 * resolve.c (resolve_symbol): Ditto.
1558 * symbol.c (check_conflict): Ditto.
1559 (gfc_add_proc): New function for setting the procedure attribute.
1560 (copy_formal_args): New function for copying formal argument lists.
1562 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
1564 * Make-lang.in (gfortranspec.o): Remove SHLIB_MULTILIB.
1566 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1568 * gfortranspec.c (lang_specific_driver): Use CONST_CAST2.
1569 * options.c (gfc_post_options): Supply a TYPE for CONST_CAST.
1570 * parse.c (parse_omp_structured_block): Likewise,
1571 * st.c (gfc_free_statement): Likewise,
1573 2007-09-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1576 * libgfortran.h: New file.
1577 * iso-fortran-env.def: Use macros in the new header instead of
1578 hardcoded integer constants.
1579 * Make-lang.in (F95_PARSER_OBJS, GFORTRAN_TRANS_DEPS): Add
1580 fortran/libgfortran.h.
1581 * gfortran.h (GFC_STD_*, GFC_FPE_*, options_convert,
1582 ioerror_codes): Remove.
1583 * trans.c (ERROR_ALLOCATION): Remove.
1584 (gfc_call_malloc, gfc_allocate_with_status,
1585 gfc_allocate_array_with_status): Use LIBERROR_ALLOCATION.
1586 * trans-types.h (GFC_DTYPE_*): Remove.
1587 * trans-decl.c (gfc_generate_function_code): Use
1588 GFC_CONVERT_NATIVE instead of CONVERT_NATIVE.
1589 * trans-io.c (set_parameter_value, set_parameter_ref): Use
1590 LIBERROR_* macros instead of IOERROR_ macros.
1591 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use
1592 LIBERROR_END and LIBERROR_EOR instead of hardcoded constants.
1593 * options.c (gfc_init_options): Use GFC_CONVERT_NATIVE instead of
1595 (gfc_handle_option): Use GFC_CONVERT_* macros instead of CONVERT_*.
1597 2007-09-02 Steven G. Kargl <kargl@gcc.gnu.org>
1599 * invoke.texi: Fix the -frange-checking option entry.
1601 2007-09-02 Roger Sayle <roger@eyesopen.com>
1603 * decl.c (match_string_p): New helper function to explicitly match
1604 a string of characters.
1605 (match_attr_spec): Remove no longer needed DECL_COLON from decl_types.
1606 Delete decls array and peek_char. Rewrite decl attribute parser to
1607 avoid calling gfc_match_strings.
1608 * match.c (gfc_match_strings): Delete unused function.
1609 * match.h (gfc_match_strings): Delete prototype.
1611 2007-09-02 Tobias Schlüuter <tobi@gcc.gnu.org>
1613 * dump-parse-tree.c (show_char_const): New function.
1614 (gfc_show_expr): Use it.
1615 * expr.c (find_substring_ref): Rework to not keep characters
1616 dangling beyond end of string.
1618 2007-09-02 H.J. Lu <hongjiu.lu@intel.com>
1621 * array.c (expand_iterator): Initialize frame.prev.
1623 2007-08-31 Tobias Burnus <burnus@net-b.de>
1626 * io.c (match_io): Also diagnose extra comma for READ.
1628 2007-08-31 Joseph Myers <joseph@codesourcery.com>
1630 * intrinsic.texi (LGAMMA): Remove empty @cindex line.
1632 2007-08-31 Paul Thomas <pault@gcc.gnu.org>
1638 * gfortran.h : Add prototype for gfc_resolve_substring_charlen.
1639 * resolve.c (gfc_resolve_substring_charlen): New function.
1640 (resolve_ref): Call gfc_resolve_substring_charlen.
1641 (gfc_resolve_character_operator): New function.
1642 (gfc_resolve_expr): Call the new functions in cases where the
1643 character length is missing.
1644 * iresolve.c (cshift, eoshift, merge, pack, reshape, spread,
1645 transpose, unpack): Call gfc_resolve_substring_charlen for
1646 source expressions that are character and have a reference.
1647 * trans.h (gfc_trans_init_string_length) Change name to
1648 gfc_conv_string_length; modify references in trans-expr.c,
1649 trans-array.c and trans-decl.c.
1650 * trans-expr.c (gfc_trans_string_length): Handle case of no
1652 (gfc_conv_aliased_arg): Remove code for treating substrings
1653 and replace with call to gfc_trans_string_length.
1654 * trans-array.c (gfc_conv_expr_descriptor): Remove code for
1655 treating strings and call gfc_trans_string_length instead.
1657 2007-08-30 Tobias Burnus <burnus@net-b.de>
1660 * interface.c (check_interface0): Improve error for external procs.
1661 (check_sym_interfaces): Fix checking of module procedures.
1663 2007-08-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1666 * iresolve.c (gfc_resolve_getarg): Handle non-default integer
1668 * check.c (gfc_check_getarg): New function
1669 * intrinsic.h: Add prototype for gfc_check_getarg.
1670 * intrinsic.c (add_subroutines): Add reference to gfc_check_getarg.
1671 * intrinsic.texi (GETARG): Adjust documentation.
1673 2007-08-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1674 Tobias Burnus <burnus@gcc.gnu.org>
1677 * intrinsic.c (add_functions): Add IS_IOSTAT_END and
1678 IS_IOSTAT_EOR intrinsics.
1679 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_IOSTAT_END and
1680 GFC_ISYM_IS_IOSTAT_EOR.
1681 * trans-intrinsic.c (gfc_conv_has_intvalue): New function.
1682 (gfc_conv_intrinsic_function): Call gfc_conv_has_intvalue for
1683 GFC_ISYM_IS_IOSTAT_END and GFC_ISYM_IS_IOSTAT_EOR.
1684 * intrinsic.texi: Add IS_IOSTAT_END and IS_IOSTAT_EOR.
1686 2007-08-28 Christopher D. Rickett <crickett@lanl.gov>
1689 * decl.c (build_sym): Pass number of identifiers on line to
1691 (set_binding_label): Verify that only one identifier given if
1692 NAME= specified, even if the given binding label has zero length.
1693 (gfc_match_bind_c): Remove declaration for has_name_equals because
1694 it hides the static global one that is needed.
1696 2007-08-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1698 * trans-array.c (gfc_grow_array): Use gfc_call_realloc.
1699 (gfc_array_allocate): Use gfc_allocate_with_status and
1700 gfc_allocate_array_with_status.
1701 (gfc_array_deallocate): Use gfc_deallocate_with_status.
1702 (gfc_trans_dealloc_allocated): Use gfc_deallocate_with_status.
1703 * trans-stmt.c (gfc_trans_allocate): Use gfc_allocate_with_status.
1704 (gfc_trans_deallocate): Use gfc_deallocate_with_status.
1705 * trans.c (gfc_allocate_with_status, gfc_allocate_array_with_status,
1706 gfc_deallocate_with_status, gfc_call_realloc): New functions.
1707 * trans.h (gfc_allocate_with_status, gfc_allocate_array_with_status,
1708 gfc_deallocate_with_status, gfc_call_realloc): New prototypes.
1709 (gfor_fndecl_internal_realloc, gfor_fndecl_allocate,
1710 gfor_fndecl_allocate_array, gfor_fndecl_deallocate): Remove.
1711 * f95-lang.c (gfc_init_builtin_functions): Create decl for
1713 * trans-decl.c (gfor_fndecl_internal_realloc,
1714 gfor_fndecl_allocate, gfor_fndecl_allocate_array,
1715 gfor_fndecl_deallocate): Remove function decls.
1716 (gfc_build_builtin_function_decls): Likewise.
1718 2007-08-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1721 Revert previous patch.
1723 2007-08-28 Jakub Jelinek <jakub@redhat.com>
1726 * Make-lang.in (fortran/trans-types.o): Depend on $(FLAGS_H).
1727 * trans-types.c: Include flags.h.
1728 (gfc_get_nodesc_array_type): Add TYPE_DECL TYPE_NAME with
1729 correct bounds and dimensions for packed arrays.
1731 2007-08-27 Tobias Burnus <burnus@net-b.de>
1733 * simplify.c (gfc_simplify_lgamma): Fix mpfr_lgamma call.
1735 2007-08-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1738 * trans-io.c (create_dummy_iostat): New function to create a unique
1739 dummy variable expression to use with IOSTAT.
1740 (gfc_trans_inquire): Use the new function to pass unit number error info
1741 to run-time library if a regular IOSTAT variable was not given.
1743 2007-08-26 H.J. Lu <hongjiu.lu@intel.com>
1745 * gfortran.h (gfc_isym_id): Add GFC_ISYM_GAMMA and
1748 2007-08-26 Asher Langton <langton2@llnl.gov>
1749 Tobias Burnus <burnus@net-b.de>
1751 * gfortran.h (gfc_option_t): Add flag_recursive.
1752 * lang.opt: Add -frecursive option and update -fopenmp.
1753 * invoke.texi (-frecursive): Document new option.
1754 (-fopenmp,-fno-automatic,-fmax-stack-var-size): Update.
1755 * options.c (gfc_init_options, gfc_post_options,
1756 gfc_handle_option): Add -frecursive and modify -fopenmp.
1757 (gfc_post_options): Add warning for conflicting flags.
1759 2007-08-26 Tobias Burnus <burnus@net-b.de>
1762 * module.c (mio_symbol_ref,mio_interface_rest): Return pointer_info.
1763 (load_operator_interfaces): Support multible loading of an operator.
1765 2007-08-26 Tobias Burnus <burnus@net-b.de>
1768 * match.c (gfc_match_common): Remove SEQUENCE diagnostics.
1769 * resolve.c (resolve_common_blocks): Add SEQUENCE diagnostics;
1770 fix walking through the tree.
1772 2007-08-26 Tobias Burnus <burnus@net-b.de>
1775 * intrinsic.h (gfc_simplify_gamma,gfc_simplify_lgamma,
1776 gfc_resolve_gamma,gfc_resolve_lgamma): New function declations.
1777 * mathbuiltins.def: Define GAMMA and LGAMMA.
1778 * intrinsic.c (add_functions): Add GAMMA, DGAMMA, LGAMMA, ALGAMA
1780 * simplify.c (gfc_simplify_gamma,gfc_simplify_lgamma): New functions.
1781 * iresolve.c (gfc_resolve_gamma,gfc_resolve_lgamma): New functions.
1782 * intrinsic.texi: Add documentation for GAMMA and LGAMMA.
1784 2007-08-26 Tobias Burnus <burnus@net-b.de>
1787 * parse.c (parse_derived): Support empty derived type
1788 definitions for Fortran 2003.
1790 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1792 * trans-openmp.c (gfc_omp_privatize_by_reference): Constify.
1793 * trans.h (gfc_omp_privatize_by_reference): Likewise.
1795 2007-08-24 Tobias Burnus <burnus@net-b.de>
1798 * intrinsic.c (gfc_intrinsic_func_interface): Fix initialization
1801 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1804 * iresolve.c: Don't convert array masks.
1806 2007-08-24 Tobias Burnus <burnus@net-b.de>
1809 * trans-array.c (gfc_conv_expr_descriptor): Copy bounds for
1810 whole-array pointer assignments.
1812 2007-08-23 Jakub Jelinek <jakub@redhat.com>
1814 * decl.c (variable_decl): Don't share charlen structs if
1816 * trans-decl.c (create_function_arglist): Assert
1817 f->sym->ts.cl->backend_decl is NULL instead of unsharing
1818 charlen struct here.
1820 2007-08-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1823 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Remove
1824 runtime error checking.
1826 2007-08-22 Roger Sayle <roger@eyesopen.com>
1827 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1829 * match.c (intrinsic_operators): Delete.
1830 (gfc_match_intrinsic_op): Rewrite matcher to avoid calling
1833 2007-08-22 Christopher D. Rickett <crickett@lanl.gov>
1836 * resolve.c (gfc_iso_c_sub_interface): Remove setting of type and
1837 kind for optional SHAPE parameter of C_F_POINTER.
1839 2007-08-22 Janus Weil <jaydub66@gmail.com>
1841 * decl.c (match_attr_spec): Pass on errors from gfc_match_bind_c.
1842 (gfc_match_bind_c): Bugfix in check for NAME= with abstract interfaces.
1843 (gfc_match_mopdproc): Bugfix to reject module procedures in
1844 abstract interfaces.
1846 2007-08-22 Kai Tietz <kai.tietz@onevision.com>
1848 * f95-lang.c: (gfc_init_decl_processing): Choose sizetype by using
1851 2007-08-21 Paul Brook <paul@codesourcery.com>
1852 Nathan Sidwell <nathan@codesourcery.com>
1853 Mark Mitchell <mark@codesourcery.com>
1854 Joseph Myers <joseph@codesourcery.com>
1856 * gfortranspec.c (lang_specific_driver): Use pkgversion_string.
1857 * Make-lang.in (gfortran.pod): Define BUGURL.
1858 * invoke.texi: Use BUGURL for bug-reporting instructions.
1860 2007-08-19 Roger Sayle <roger@eyesopen.com>
1862 * match.c (intrinsic_operators): Make static.
1863 (gfc_op2string): New function for converting a gfc_intrinsic_op to
1864 to a "const char*", replacing the macro of the same name.
1865 * gfortran.h (intrinsic_operators): Delete prototype.
1866 (gfc_op2string): Replace macro with function prototype.
1868 2007-08-18 Tobias Burnus <burnus@net-b.de>
1870 * gfortran.h (gfc_is_intrinsic_typename): Add declaration.
1871 * symbol.c (gfc_is_intrinsic_typename): New function.
1872 * parse.c (decode_statement): Check for space in ABSTRACT INTERFACE.
1873 (parse_interface): Use gfc_is_intrinsic_typename.
1874 * decl.c (gfc_match_derived_decl): Ditto.
1875 * module.c (gfc_match_use): Use gcc_unreachable() for
1876 INTERFACE_ABSTRACT in switch().
1878 2007-08-18 Roger Sayle <roger@eyesopen.com>
1880 * primary.c (match_logical_constant_string): New function to match
1881 a ".true." or a ".false.".
1882 (match_logical_constant): Use it instead of gfc_match_strings.
1884 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
1885 Janus Weil <jaydub66@gmail.com>
1887 * interface.c (gfc_match_interface,gfc_match_abstract_interface,
1888 gfc_match_end_interface,gfc_add_interface): Add abstract interface.
1889 * dump-parse-tree.c (gfc_show_attr): Ditto.
1890 * gfortran.h (interface_type,symbol_attribute): Ditto.
1891 * module.c (gfc_match_use,ab_attribute,attr_bits,
1892 mio_symbol_attribute): Ditto.
1893 * resolve.c (resolve_function): Ditto.
1895 * parse.c (decode_statement): Ditto.
1896 (parse_interface): Ditto, check for C1203 (name of abstract interface
1897 cannot be the same as an intrinsic type).
1898 * decl.c (gfc_match_bind_c): Check for NAME= with abstract interfaces.
1899 (access_attr_decl): Handle Abstract interfaces.
1901 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
1904 * expr.c (gfc_check_pointer_assign): If the rhs is the
1905 initialization expression for the rhs, there is no error.
1907 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
1910 * trans-array.c (get_array_ctor_strlen): Set the character
1911 length of a zero length array to zero.
1913 2007-08-16 Tobias Burnus <burnus@net-b.de>
1916 * module.c (gfc_match_use): Mark user operators as such.
1917 (find_use_name_n): Distinguish between operators and other symbols.
1918 (find_use_name,number_use_names,mio_namelist,
1919 load_operator_interfaces,load_generic_interfaces,read_module,
1920 write_generic): Update find_use_name_n calls.
1922 2007-08-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1925 * trans.c (gfc_create_var_np): Do not emit warnings for
1926 anonymous variables.
1928 2007-08-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1931 * decl.c (gfc_get_type_attr_spec): Fix whitespace.
1932 (gfc_match_derived_decl): Fix logic.
1934 2007-08-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1937 * trans-intrinsic.c (build_fixbound_expr): Convert to result type
1940 2007-08-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1943 * trans-expr.c (gfc_conv_substring_expr): Only call
1944 gfc_conv_substring if expr->ref is not NULL.
1945 * expr.c (gfc_is_constant_expr): If e->ref is NULL, the substring
1946 expression might be a constant.
1947 (gfc_simplify_expr): Handle missing start and end, as well as
1950 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
1953 * match.c (gfc_match_call): Do not create a new symtree in the
1954 case where the existing symbol is external and not referenced.
1956 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
1959 * decl.c (variable_decl): Check for an imported symbol
1960 by looking for its symtree and testing for the imported
1962 (gfc_match_import): Remove change of symbol's namespace
1963 and set the attribute imported instead.
1964 * symbol.c (gfc_get_sym_tree): It is not an error if a
1966 * gfortran.h : Add the 'imported' to symbol_attribute.
1968 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
1971 * trans-array.c (gfc_conv_array_transpose): Set the offset
1972 of the destination to zero if the loop is zero based.
1974 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1977 * intrinsic.c (add_functions): Add optional KIND argument to ACHAR.
1978 * iresolve.c (gfc_resolve_achar): Handle the KIND argument.
1979 * check.c (gfc_check_achar): Check for the optional KIND argument.
1980 * simplify.c (gfc_simplify_achar): Use KIND argument.
1981 * intrinsic.h (gfc_check_achar, gfc_simplify_achar,
1982 gfc_resolve_achar): Adjust prototypes.
1984 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1988 * trans-expr.c (gfc_conv_function_call): When no formal argument
1989 list is available, we still substitute missing optional arguments.
1990 * check.c (gfc_check_random_seed): Correct the check on the
1991 number of arguments to RANDOM_SEED.
1992 * intrinsic.c (add_subroutines): Add a resolution function to
1994 * iresolve.c (gfc_resolve_random_seed): New function.
1995 * intrinsic.h (gfc_resolve_random_seed): New prototype.
1997 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2000 * error.c (error_uinteger): New function.
2001 (error_integer): Call error_uinteger.
2002 (error_print): Handle %u, %lu, %li and %ld format specifiers.
2003 * interface.c (compare_actual_formal): Use the new %lu specifier.
2005 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2008 * lang.opt (-fmodule-private): New option.
2009 * gfortran.h (gfc_option_t): Add flag_module_private member.
2010 * invoke.texi (-fmodule-private): Document the new option.
2011 * module.c (gfc_check_access): Allow the -fmodule-private option
2012 to modify the default behaviour.
2013 * options.c (gfc_init_options): Initialize flag_module_private.
2014 (gfc_handle_option): Handle -fmodule-private.
2016 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2019 * intrinsic.c (add_functions): Add KIND arguments to COUNT,
2020 IACHAR, ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND
2022 * iresolve.c (gfc_resolve_count): Add kind argument.
2023 (gfc_resolve_iachar): New function.
2024 (gfc_resolve_ichar): Add kind argument.
2025 (gfc_resolve_index_func): Likewise.
2026 (gfc_resolve_lbound): Likewise.
2027 (gfc_resolve_len): Likewise.
2028 (gfc_resolve_len_trim): Likewise.
2029 (gfc_resolve_scan): Likewise.
2030 (gfc_resolve_size): New function.
2031 (gfc_resolve_ubound): Add kind argument.
2032 (gfc_resolve_verify): Likewise.
2033 * trans-decl.c (gfc_get_extern_function_decl): Allow specific
2034 intrinsics to have 4 arguments.
2035 * check.c (gfc_check_count): Add kind argument.
2036 (gfc_check_ichar_iachar): Likewise.
2037 (gfc_check_index): Likewise.
2038 (gfc_check_lbound): Likewise.
2039 (gfc_check_len_lentrim): New function.
2040 (gfc_check_scan): Add kind argument.
2041 (gfc_check_size): Likewise.
2042 (gfc_check_ubound): Likewise.
2043 (gfc_check_verify): Likewise.
2044 * intrinsic.texi: Update documentation for COUNT, IACHAR, ICHAR,
2045 INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND and VERIFY.
2046 * simplify.c (get_kind): Whitespace fix.
2047 (int_expr_with_kind): New function.
2048 (gfc_simplify_iachar): Add kind argument.
2049 (gfc_simplify_iachar): Likewise.
2050 (gfc_simplify_ichar): Likewise.
2051 (gfc_simplify_index): Likewise.
2052 (simplify_bound_dim): Likewise.
2053 (simplify_bound): Likewise.
2054 (gfc_simplify_lbound): Likewise.
2055 (gfc_simplify_len): Likewise.
2056 (gfc_simplify_len_trim): Likewise.
2057 (gfc_simplify_scan): Likewise.
2058 (gfc_simplify_shape): Pass NULL as kind argument to gfc_simplify_size.
2059 (gfc_simplify_size): Add kind argument.
2060 (gfc_simplify_ubound): Likewise.
2061 (gfc_simplify_verify): Likewise.
2062 * intrinsic.h: Update prototypes and add new ones.
2063 * trans-intrinsic.c (gfc_conv_intrinsic_index): Rename into
2064 gfc_conv_intrinsic_index_scan_verify.
2065 (gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove.
2066 (gfc_conv_intrinsic_function): Call
2067 gfc_conv_intrinsic_index_scan_verify to translate the INDEX,
2068 SCAN and VERIFY intrinsics.
2070 2007-08-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2073 * invoke.texi (-fbacktrace): Document the new behaviour.
2075 2007-08-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2078 * trans-array.c (gfc_conv_expr_descriptor): Use
2079 gfc_conv_const_charlen to generate backend_decl of right type.
2080 * trans-expr.c (gfc_conv_expr_op): Use correct return type.
2081 (gfc_build_compare_string): Use int type instead of default
2082 integer kind for single character comparison.
2083 (gfc_conv_aliased_arg): Give backend_decl the right type.
2084 * trans-decl.c (gfc_build_intrinsic_function_decls): Make
2085 compare_string return an int.
2087 2007-08-11 Ian Lance Taylor <iant@google.com>
2089 * f95-lang.c (gfc_get_alias_set): Change return type to
2092 2007-08-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2095 * trans.c (gfc_trans_runtime_check): Reorder arguments and
2096 add extra variable arguments. Hand them to the library function.
2097 * trans.h (gfc_trans_runtime_check): Update prototype.
2098 * trans-array.c (gfc_trans_array_bound_check): Issue more
2099 detailled error messages.
2100 (gfc_conv_array_ref): Likewise.
2101 (gfc_conv_ss_startstride): Likewise.
2102 (gfc_trans_dummy_array_bias): Reorder arguments to
2103 gfc_trans_runtime_check.
2104 * trans-expr.c (gfc_conv_substring): Issue more detailled
2106 (gfc_conv_function_call): Reorder arguments to gfc_trans_runtime_check.
2107 * trans-stmt.c (gfc_trans_goto): Likewise.
2108 * trans-io.c (set_string): Reorder arguments to
2109 gfc_trans_runtime_check and issue a more detailled error message.
2110 * trans-decl.c (gfc_build_builtin_function_decls): Make
2111 runtime_error and runtime_error_at handle a variable number of
2113 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Reorder arguments
2114 to gfc_trans_runtime_check.
2115 (gfc_conv_intrinsic_minmax): Likewise.
2116 (gfc_conv_intrinsic_repeat): Issue more detailled error messages.
2118 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2120 * gfortranspec.c (lang_specific_driver): Use CONST_CAST.
2121 * options.c (gfc_post_options): Likewise.
2122 * parse.c (parse_omp_structured_block): Likewise.
2123 * st.c (gfc_free_statement): Likewise.
2125 2007-08-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2128 * trans-decl.c (gfc_build_builtin_function_decls): Change
2129 prototype for associated.
2130 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert the
2131 result of __builtin_isnan into a boolean.
2132 (gfc_conv_intrinsic_strcmp): Cleanup.
2133 (gfc_conv_associated): Convert the result of the associated
2134 function into a boolean.
2136 2007-08-09 Tobias Burnus <burnus@net-b.de>
2139 * io.c (format_token): Add FMT_ERROR.
2140 (next_char_not_space): Print error/warning when
2141 '\t' are used in format specifications.
2142 (format_lex): Propagate error.
2143 (check_format): Ditto.
2145 2007-08-09 Tobias Burnus <burnus@net-b.de>
2148 * arith.c (arith_error): Point in the error message
2149 to -fno-range-check.
2151 2007-08-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2154 * intrinsic.texi (SIZEOF): Add mention to C_SIZE_T.
2156 2007-08-06 Christopher D. Rickett <crickett@lanl.gov>
2159 * trans-expr.c (gfc_conv_scalar_char_value): Convert the tree and
2160 actual arg expressions for scalar characters passed by-value to
2162 (gfc_conv_function_call): Call gfc_conv_scalar_char_value.
2163 * trans.h: Add prototype for gfc_conv_scalar_char_value.
2164 * trans-decl.c (generate_local_decl): Convert by-value character
2165 dummy args of bind(c) procedures using
2166 gfc_conv_scalar_char_value.
2168 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2171 * iresolve.c (gfc_resolve_alarm_sub): Suffix the subroutine name
2172 with the kind of the STATUS argument.
2174 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2177 * intrinsic.c (add_functions): Fix name of argument to CHDIR.
2179 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2182 * iresolve.c (gfc_resolve_exit): Convert argument to default
2185 2007-08-06 Daniel Franke <franke.daniel@gmail.com>
2187 * resolve.c (derived_pointer): Removed, replaced callers by access
2188 to appropiate attribute bit.
2189 (derived_inaccessable): Shortcut recursion depth.
2190 (resolve_fl_namelist): Fixed checks for private components in namelists.
2192 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2195 * trans.h (gfor_fndecl_string_minmax): New prototype.
2196 * trans-decl.c (gfor_fndecl_string_minmax): New variable.
2197 (gfc_build_intrinsic_function_decls): Create gfor_fndecl_string_minmax.
2198 * check.c (gfc_check_min_max): Allow for character arguments.
2199 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): New function.
2200 (gfc_conv_intrinsic_function): Add special case for MIN and MAX
2201 intrinsics with character arguments.
2202 * simplify.c (simplify_min_max): Add simplification for character
2205 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2208 * invoke.texi: Adjust documentation for option -fsyntax-only.
2210 2007-08-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2211 Tobias Burnus <burnus@gcc.gnu.org>
2214 * intrinsic.h (gfc_check_isnan): Add prototype.
2215 * gfortran.h (gfc_isym_id): Add GFC_ISYM_ISNAN.
2216 * intrinsic.c (add_functions): Add ISNAN intrinsic.
2217 * check.c (gfc_check_isnan): New function.
2218 * trans-intrinsic.c (gfc_conv_intrinsic_isnan): New function.
2219 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_isnan
2221 * intrinsic.texi: Document ISNAN.
2223 2007-08-04 Paul Thomas <pault@gcc.gnu.org>
2226 * symbol.c (get_unique_symtree): Moved from module.c.
2227 * module.c (get_unique_symtree): Moved to symbol.c.
2228 * decl.c (get_proc_name): Transfer the typespec from the local
2229 symbol to the module symbol, in the case that an entry is also
2230 a module procedure. Ensure the local symbol is cleaned up by
2231 pointing to it with a unique symtree.
2233 * dump_parse_tree (gfc_show_code_node): Add EXEC_ASSIGN_CALL.
2235 2008-08-04 Steven G. Kargl <kargl@gcc.gnu.org>
2238 * iresolve.c (gfc_resolve_rrspacing): Convert argument(s) to
2240 (gfc_resolve_scale): Ditto.
2241 (gfc_resolve_set_exponent): Ditto.
2242 (gfc_resolve_spacing): Ditto.
2245 * trans-intrinsic.c (gfc_conv_intrinsic_si_kind,
2246 gfc_conv_intrinsic_sr_kind): Convert the argument(s) to the
2247 expected KIND, and fold the result to the expected KIND.
2249 2007-08-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2252 * f95-lang.c (gfc_init_builtin_functions): Defin builtins for
2253 lround{f,,l} and llround{f,,l}.
2254 * trans-intrinsic.c (build_fix_expr): Generate calls to the
2255 {l,}round{f,,l} functions.
2257 2007-08-01 Thomas Koenig <tkoenig@gcc.gnu.org>
2260 * intrinsic.c (resolve_mask_arg): New function.
2261 (gfc_resolve_maxloc): Use resolve_mask_arg for mask resolution.
2262 (gfc_resolve_maxval): Likewise.
2263 (gfc_resolve_minloc): Likewise.
2264 (gfc_resolve_minval): Likewise.
2265 (gfc_resolve_pack): Likewise.
2266 (gfc_resolve_product): Likewise.
2267 (gfc_resolve_sum): Likewise.
2268 (gfc_resolve_unpack): Likewise.
2270 2007-08-01 Tobias Burnus <burnus@net-b.de>
2273 * match.c (gfc_match_allocate): Better check that STAT is
2276 * check.c (gfc_check_allocated): Reorder checks to improve
2279 2007-08-01 Nick Clifton <nickc@redhat.com>
2281 * arith.c: Change copyright header to refer to version 3 of the
2282 GNU General Public License and to point readers at the COPYING3
2283 file and the FSF's license web page.
2284 * openmp.c, interface.c, intrinsic.c, trans-array.c, trans-expr.c,
2285 symbol.c, iso-fortran-env.def, intrinsic.h, decl.c, trans-array.h,
2286 matchexp.c, dump-parse-tree.c, trans-common.c, array.c,
2287 Make-lang.in, trans-openmp.c, gfortran.h, error.c,
2288 iso-c-binding.def, lang.opt, data.c, trans-const.c, trans-stmt.c,
2289 expr.c, trans-const.h, trans-stmt.h, module.c, trans.c, scanner.c,
2290 trans-types.c, trans.h, gfortranspec.c, trans-types.h,
2291 lang-specs.h, io.c, bbt.c, resolve.c, f95-lang.c, st.c,
2292 iresolve.c, match.c, trans-decl.c, trans-io.c, target-memory.c,
2293 match.h, target-memory.h, parse.c, arith.h, check.c, dependency.c,
2294 parse.h, types.def, convert.c, dependency.h, primary.c,
2295 trans-intrinsic.c, options.c, misc.c, simplify.c: Likewise.
2297 2007-08-01 Daniel Franke <franke.daniel@gmail.com>
2299 * trans-decl.c (generate_local_decl): Emit warning on unused parameter
2300 on "-Wall -Wextra" or "-Wunused-parameter" but not on "-Wall", changed
2301 messages that start with lower case to upper case.
2302 * invoke.texi (-Wparameter-unused): Document differences between gcc
2303 and gfortran regarding this option.
2305 2007-08-01 Daniel Franke <franke.daniel@gmail.com>
2308 * expr.c (check_specification_function): Skip check if no symtree
2311 2007-08-01 Paul Thomas <pault@gcc.gnu.org>
2314 * resolve.c (resolve_entries): Entries declared to be module
2315 procedures must point to the function namespace.
2317 2007-07-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2320 * trans-stmt.c (gfc_trans_return): Convert to correct type.
2322 2007-07-31 Steven G. Kargl <kargl@gcc.gnu.org>
2325 * trans-intrinsic.c (gfc_conv_intrinsic_exponent): Convert to correct
2328 2007-07-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2330 * invoke.texi: Document -fsign-zero flag.
2332 2007-07-29 Paul Thomas <pault@gcc.gnu.org>
2335 * trans-expr.c (gfc_conv_expr_reference): Add block for case of
2336 scalar pointer functions so that NULL result is correctly
2340 * trans-array.c (gfc_trans_array_constructor): On detecting a
2341 multi-dimensional parameter array, set the loop limits.
2343 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
2346 * resolve.c (resolve_fl_parameter): Check for constant shape arrays,
2347 adjusted error message.
2349 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
2351 * invoke.texi: Removed -w from option summary.
2353 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
2356 * intrinsic.texi (IRAND, RAND, RANDOM_NUMBER): Document algorithm
2357 used for random number generator.
2359 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
2361 * gfortran.h, interface.c, resolve.c, symbol.c: Fix comment
2363 * intrinsic.texi, invoke.texi: Fix typos.
2365 2007-07-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2368 * resolve.c (generic_sym): Check for a same symbol and if so, return to
2369 avoid infinite recursion.
2371 2007-07-28 Daniel Franke <franke.daniel@gmail.com>
2376 * gfortran.h (symbol_attribute): Added bits for pointer_comp,
2378 * parse.c (parse_derived): Set pointer_comp/private_comp bits if
2379 the derived type ultimately contains pointer components or private
2381 * module.c (ab_attribute): New values AB_POINTER_COMP, AB_PRIVATE_COMP.
2382 (attr_bits): Added names for new ab_attributes.
2383 (mio_symbol_attribute): Save/restore new attribute bits in modules.
2384 * match.c (gfc_match_namelist): Removed check for namelist objects
2386 * resolve.c (resolve_fl_namelist): Added check for pointer or
2387 private components in nested types. Added check for namelist objects
2390 2007-07-28 Paul Thomas <pault@gcc.gnu.org>
2393 * trans-expr.c (gfc_trans_scalar_assign): Revert to fixed order
2394 for lse and rse pre expressions, for derived types with
2395 allocatable components. Instead, assign the lhs to a temporary
2396 and deallocate after the assignment.
2398 2007-07-28 Janne Blomqvist <jb@gcc.gnu.org>
2401 * trans-stmt.c (gfc_trans_character_select): Replace occurrences
2402 of gfc_c_int_type_node with integer_type_node.
2403 * trans-decl.c (gfc_build_intrinsic_function_decls): Likewise.
2404 (gfc_build_builtin_function_decls): Likewise.
2405 (gfc_generate_function_code): Likewise.
2406 * trans-io.c (gfc_build_io_library_fndecls): Likewise.
2408 2007-07-27 Janne Blomqvist <jb@gcc.gnu.org>
2410 * trans-decl.c (gfc_build_builtin_function_decls): Use existing
2411 gfc_array_index_type rather than creating another typenode for
2412 gfc_index_integer_kind.
2414 2007-07-27 Janne Blomqvist <jb@gcc.gnu.org>
2416 * trans-io.c (gfc_build_io_library_fndecls): Change to use
2417 gfc_array_index_type for array descriptor triplets instead of
2420 2007-07-26 Steven G. Kargl <kargl@gcc.gnu.org>
2423 * resolve.c (resolve_operator): Add INTRINSIC_EQ_OS comparison.
2425 2007-07-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2426 Daniel Franke <franke.daniel@gmail.com>
2429 * primary.c (match_variable): Do not call gfc_add_flavor if symbol has
2430 attribute of ACCESS_PUBLIC or ACCESS_PRIVATE already marked.
2432 2007-07-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2435 * trans-stmt.c (gfc_trans_character_select): Replace the
2436 mechanism with labels by a SWITCH_EXPR.
2437 * trans-decl.c (gfc_build_builtin_function_decls): Change
2438 return type for select_string.
2440 2007-07-27 Paul Thomas <pault@gcc.gnu.org>
2443 * trans-decl.c (gfc_trans_deferred_vars): Set intent(out)
2444 derived types as referenced, if they have the the default
2447 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2449 * gfortran.h (generate_isocbinding_symbol): Constify.
2450 * symbol.c (gen_special_c_interop_ptr, gen_cptr_param,
2451 generate_isocbinding_symbol): Likewise.
2453 2007-07-24 Paul Thomas <pault@gcc.gnu.org>
2457 * trans-expr.c (gfc_conv_function_call): Remove the default
2458 initialization of intent(out) derived types.
2459 * symbol.c (gfc_lval_expr_from_sym): New function.
2460 * matchexp.c (gfc_get_parentheses): Return argument, if it is
2461 character and posseses a ref.
2462 * gfortran.h : Add prototype for gfc_lval_expr_from_sym.
2463 * resolve.c (has_default_initializer): Move higher up in file.
2464 (resolve_code): On detecting an interface assignment, check
2465 if the rhs and the lhs are the same symbol. If this is so,
2466 enclose the rhs in parenetheses to generate a temporary and
2467 prevent any possible aliasing.
2468 (apply_default_init): Remove code making the lval and call
2469 gfc_lval_expr_from_sym instead.
2470 (resolve_operator): Give a parentheses expression a type-
2471 spec if it has no type.
2472 * trans-decl.c (gfc_trans_deferred_vars): Apply the a default
2473 initializer, if any, to an intent(out) derived type, using
2474 gfc_lval_expr_from_sym and gfc_trans_assignment. Check if
2475 the dummy is present.
2477 2007-07-24 Daniel Franke <franke.daniel@gmail.com>
2480 * expr.c (check_init_expr): Simplify matched functions.
2482 2007-07-24 Daniel Franke <franke.daniel@gmail.com>
2485 * intrinsic.c (add_sym): Do not exclude any symbols, even if not part
2486 of the selected standard.
2487 (make generic): Likewise.
2488 (make alias): Likewise, set standard the alias belongs to.
2489 (add_subroutines): Call make_noreturn unconditionally.
2490 (check_intrinsic_standard): Change return value to try.
2491 (gfc_intrinsic_func_interface): Check return value of above function.
2492 (gfc_intrinsic_sub_interface): Likewise.
2494 2007-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
2497 * trans-decl.c (generate_function_code): Add argument
2498 for flag_bounds_check to the array for set_options.
2499 * invoke.texi (-fbounds-check): Document new libarary run-time
2502 2007-07-23 Daniel Franke <franke.daniel@gmail.com>
2506 * expr.c (check_transformational): Reject valid transformational
2507 intrinsics to avoid ICE.
2508 (check_inquiry): Report error for assumed character lengths for
2509 all supported standards.
2510 (check_init_expr): Whitespace fix.
2512 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
2516 * decl.c (verify_bind_c_sym): Use the result symbol for functions
2517 with a result clause. Warn if implicitly typed. Verify the type
2518 and rank of the SHAPE argument, if given.
2519 * resolve.c (gfc_iso_c_sub_interface): Use gfc_procedure_use to
2520 check the actual args against the formal, sorting them if
2522 * symbol.c (gen_shape_param): Initialize type of SHAPE param to
2525 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
2528 * trans-decl.c (generate_local_decl): Convert the TREE_TYPE for by
2529 value character dummy args of BIND(C) procedures.
2530 * trans-expr.c (gfc_conv_variable): Do not build address
2531 expression for BT_CHARACTER dummy args.
2533 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
2534 Tobias Burnus <burnus@net-b.de>
2537 * trans-expr.c (gfc_conv_function_call): Handle c_funloc.
2538 * trans-types.c: Add pfunc_type_node.
2539 (gfc_init_types,gfc_typenode_for_spec): Use it.
2540 * resolve.c (gfc_iso_c_func_interface): Fix whitespace and
2541 improve error message.
2543 2007-07-22 Daniel Franke <franke.daniel@gmail.com>
2546 * parse.c (gfc_fixup_sibling_symbols): No replacement of symbols if
2547 the current is a namelist.
2549 2007-07-22 Daniel Franke <franke.daniel@gmail.com>
2555 * gfortran.h (gfc_intrinsic_sym): Changed members elemental, pure,
2556 generic, specific, actual_ok, noreturn into bits of a bitfield,
2557 added bits for inquiry, transformational, conversion.
2558 * check.c (non_init_transformational): Removed, removed all callers.
2559 * intrinsic.c (enum class): New.
2560 (add_sym*): Replaced argument elemetal by enum class. Changed all
2562 (add_functions): Assign appropriate classes to intrinsic functions.
2563 (add_subroutines): Assign appropriate classes to intrinsic subroutines.
2564 (add_conv): Set conversion attribute.
2565 (gfc_init_expr_extensions): Removed, removed all callers.
2566 (gfc_intrinsic_func_interface): Reimplemented check for non-standard
2567 initializatione expressions.
2568 * expr.c (check_specification_function): New.
2569 (gfc_is_constant_expr): Added check for specification functions.
2570 (check_init_expr_arguments): New.
2571 (check_inquiry): Changed return value to MATCH, added checks for
2572 inquiry functions defined by F2003.
2573 (check_transformational): New.
2575 (check_elemental): New.
2576 (check_conversion): New.
2577 (check_init_expr): Call new check functions, add more specific error
2580 2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
2583 * resolve.c (set_name_and_label): Set kind number for character
2584 version of c_f_pointer.
2585 (gfc_iso_c_sub_interface): Set the kind of the SHAPE formal arg to
2586 that of the actual SHAPE arg.
2587 * symbol.c (gen_shape_param): Initialize kind for SHAPE arg.
2589 2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
2592 * symbol.c (generate_isocbinding_symbol): Remove unnecessary
2596 * resolve.c (gfc_iso_c_func_interface): Reject assumed-shape and
2597 deferred-shape arrays as args to C_LOC. Fix bug in testing
2598 character args to C_LOC.
2600 2007-07-21 Lee Millward <lee.millward@gmail.com>
2603 * trans-intrinsic.c (gfc_conv_intrinsic_int): Evaluate all
2604 arguments passed, not just the first one. Adjust code to
2605 refer to "args[0]" instead of "arg" as a result.
2607 2007-07-19 Christopher D. Rickett <crickett@lanl.gov>
2610 * trans-expr.c (gfc_conv_function_call): Inline C_LOC.
2612 2007-07-18 Christopher D. Rickett <crickett@lanl.gov>
2615 * symbol.c (generate_isocbinding_symbol): Fix bug where
2616 ISOCBINDING_FUNPTR was generated for C_LOC instead of the needed
2619 2007-07-17 Janus Weil <jaydub66@gmail.com>
2622 * resolve.c (resolve_fl_namelist): Check for namelist private
2623 components in contained subprograms.
2625 2007-07-17 Paul Thomas <pault@gcc.gnu.org>
2629 * trans-expr.c (gfc_trans_subcomponent_assign): Ensure that
2630 renormalization unity base is done independently of existing
2632 (gfc_trans_scalar_assign): If rhs is not a variable, put
2633 lse->pre after rse->pre to ensure that de-allocation of lhs
2634 occurs after evaluation of rhs.
2636 2007-07-16 Lee Millward <lee.millward@gmail.com>
2641 * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
2642 to operate on a stack allocated array for the intrinsic arguments
2643 instead of creating a TREE_LIST. Add two new parameters for the
2644 array and the number of elements. Update all callers to allocate
2645 an array of the correct length to pass in. Update comment.
2646 (gfc_intrinsic_argument_list_length): New function.
2647 (gfc_conv_intrinsic_conversion): Call it.
2648 (gfc_conv_intrinsic_mnimax): Likewise.
2649 (gfc_conv_intrinsic_merge): Likewise.
2650 (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
2652 (gfc_conv_intrinsic_cmplx): Likewise.
2653 (gfc_conv_intrinsic_ctime): Likewise.
2654 (gfc_covn_intrinsic_fdate): Likewise.
2655 (gfc_conv_intrinsic_ttynam): Likewise.
2656 (gfc_conv_intrinsic_ishftc): Likewise.
2657 (gfc_conv_intrinsic_index): Likewise.
2658 (gfc_conv_intrinsic_scan): Likewise.
2659 (gfc_conv_intrinsic_verify): Likewise.
2660 (gfc_conv_intrinsic_trim): Likewise.
2661 (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
2662 (gfc_conv_intrinsic_exponent): Likewise.
2663 (gfc_conv_intrinsic_bound): Likewise.
2664 (gfc_conv_intrinsic_abs): Likewise.
2665 (gfc_conv_intrinsic_mod): Likewise.
2666 (gfc_conv_intrinsic_sign): Likewise.
2667 (gfc_conv_intrinsic_len): Likewise.
2668 (gfc_conv_intrinsic_adjust): Likewise.
2669 (gfc_conv_intrinsic_si_kind): Likewise.
2671 2007-07-16 Janne Blomqvist <jb@gcc.gnu.org>
2674 * trans-decl.c (gfc_build_builtin_function_decls): Remove
2675 DECL_IS_MALLOC attribute from internal_realloc, thus reverting
2676 part of my 2007-07-03 patch.
2678 2007-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2679 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2682 * gfortran.h (gfc_option_t): Add flag_sign_zero field.
2683 * lang.opt (-fsign-zero): New option.
2684 * trans.h: Rename gfor_fndecl_set_std into gfor_fndecl_set_options.
2685 * trans-decl.c (gfc_build_builtin_function_decls): Build the function
2686 declaration to pass an array containing the options to be used by the
2687 runtime library. (gfc_generate_function_code): Build an array that
2688 contains option values to be passed to the runtime library and the call
2690 * options.c (gfc_init_options): Initialize the flag_sign_zero field.
2691 (gfc_handle_option): Handle the -fsign-zero option.
2693 2007-07-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2696 * trans-array.c (gfc_conv_array_ref): Only evaluate index once.
2698 2007-07-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2701 * iresolve.c (gfc_resolve_mvbits): Convert FROMPOS, LEN and TOPOS
2704 2007-07-14 Thomas Koenig <tkoenig@gcc.gnu.org>
2707 * iresolve.c(gfc_resolve_pack): A scalar mask has
2708 to be kind=4, an array mask with kind<4 is converted
2709 to gfc_default_logical_kind automatically.
2710 (gfc_resolve_unpack): Convert mask to gfc_default_lotical_kind
2713 2007-07-14 Paul Thomas <pault@gcc.gnu.org>
2716 * parse.c (parse_spec): Emit error on unexpected statement
2719 2007-07-13 Daniel Franke <franke.daniel@gmail.com>
2721 * invoke.texi: Unified upper- and lower-case in menus.
2722 (-w, -W): Removed, documented by gcc.
2723 * intrinsic.texi: Unified Class-section entries, added
2724 subroutine/function warning where appropiate.
2726 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
2729 * decl.c (gfc_match_suffix): Removed surplus general error that hides
2730 a more specific message.
2731 * resolve.c (resolve_fl_variable): Reject illegal initializiers only
2732 if not already done.
2733 (resolve_fl_procedure): Added check for initializers of functions.
2735 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
2738 * invoke.texi (-static-libgfortran): Document new option.
2740 2007-07-12 Paul Thomas <pault@gcc.gnu.org>
2744 * module.c (write_generic): Restore patch of 2007-07-10 and use
2745 symbol name if there are no use names.
2747 2007-07-12 Christopher D. Rickett <crickett@lanl.gov>
2750 * decl.c (verify_c_interop_param): Require character string dummy
2751 args to BIND(C) procedures to have length 1.
2752 * resolve.c (resolve_fl_procedure): Modify parameter checking for
2756 * resolve.c (gfc_iso_c_func_interface): Verify that a valid
2757 expression is given as an argument to C_LOC and C_ASSOCIATED.
2758 * trans-io.c (transfer_expr): Add argument for code block. Add
2759 standards check to determine if an error message should be
2760 reported for printing C_PTR or C_FUNPTR.
2761 (transfer_array_component): Update arguments to transfer_expr.
2762 (gfc_trans_transfer): Ditto.
2764 * symbol.c (gen_cptr_param): Fix whitespace.
2766 2007-07-12 Jakub Jelinek <jakub@redhat.com>
2769 * trans.h (GFC_POINTER_TYPE_P): Define.
2770 * trans-types.c (gfc_sym_type): Set it for types on attr->sym.pointer.
2771 * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
2772 if GFC_POINTER_TYPE_P is set on the type.
2774 2007-07-12 Richard Guenther <rguenther@suse.de>
2776 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Convert
2777 arguments to gfc_charlen_type_node.
2778 * trans-io.c (gfc_convert_array_to_string): Convert type
2779 size to gfc_array_index_type.
2781 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
2785 * module.c: Reverted Paul's patch from 2007-07-10.
2787 2007-07-11 Richard Guenther <rguenther@suse.de>
2789 * trans-array.c (gfc_conv_array_parameter): Use correct
2790 types for comparison.
2791 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
2792 correct types for POINTER_PLUS_EXPR.
2793 * trans-stmt.c (gfc_trans_forall_loop): Use correct type
2794 for integer one constant.
2796 2007-07-10 Paul Thomas <pault@gcc.gnu.org>
2799 * resolve.c (is_external_proc): New function. Adds test that
2800 the symbol is not an intrinsic procedure.
2801 * (resolve_function, resolve_call): Replace logical statements
2802 with call to is_external_proc.
2805 * simplify.c (gfc_simplify_transfer): If mold has rank, the
2809 * module.c (write_generic): Write the local name of the
2812 2007-07-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2815 * trans-array.c (gfc_trans_array_constructor): Mark offset field
2816 with TREE_NO_WARNING.
2817 * trans-decl.c (gfc_build_qualified_array): Mark lbound, ubound,
2818 stride and size variables with TREE_NO_WARNING.
2820 2007-07-09 Steven G. Kargl <kargl@gcc.gnu.org>
2822 * trans-decl.c (set_tree_decl_type_code): Remove function.
2823 (generate_local_decl): Remove reference to set_tree_decl_type_code.
2825 2007-07-09 Daniel Franke <franke.daniel@gmail.com>
2828 * trans-decl.c (generate_local_decl) Emit a warning if an unused
2831 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
2834 * module.c (gfc_match_use): Do not set an non-existant
2835 intrinsic operator if a user-defined operator is found.
2837 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
2841 * trans-decl.c (generate_local_decl): Adjusted warning on unused
2842 dummy arguments, tell middle-end not to emit additional warnings.
2844 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
2845 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2848 * gfortran.h (gfc_intrinsic_op): Added INTRINSIC_EQ_OS,
2849 INTRINSIC_NE_OS, INTRINSIC_GT_OS, INTRINSIC_GE_OS,
2850 INTRINSIC_LT_OS and INTRINSIC_LE_OS.
2851 * arith.c (eval_intrinsic, eval_type_intrinsic0): Likewise.
2852 * arith.h (gfc_eq, gfc_ne, gfc_gt, gfc_ge, gfc_lt, gfc_le):
2853 Added gfc_intrinsic_op as third argument type.
2854 * dump-parse-tree.c (gfc_show_expr): Account for new enum values.
2855 * expr.c (simplify_intrinsic_op, check_intrinsic_op): Likewise.
2856 * interface.c (check_operator_interface): Likewise.
2857 (gfc_check_interfaces): Added cross-checks for FORTRAN 77 and
2858 Fortran 90 style operators using new enum values.
2859 (gfc_extend_expr): Likewise.
2860 (gfc_add_interface): Likewise.
2861 * match.c (intrinsic_operators): Distinguish FORTRAN 77 style
2862 operators from Fortran 90 style operators using new enum values.
2863 * matchexp.c (match_level_4): Account for new enum values.
2864 * module.c (mio_expr): Likewise.
2865 * resolve.c (resolve_operator): Deal with new enum values, fix
2866 inconsistent error messages.
2867 * trans-expr.c (gfc_conv_expr_op): Account for new enum values.
2869 2007-07-08 Tobias Burnus <burnus@net-b.de>
2872 * interface.c (get_expr_storage_size): Properly obtain lower bound.
2873 (compare_actual_formal): Add space before parenthesis.
2875 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
2878 * resolve.c (resolve_fl_procedure): Added check for PRIVATE types
2879 in PUBLIC interfaces.
2881 2007-07-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2884 * decl.c (match_attr_spec): Don't return MATCH_ERROR if comma found and
2885 gfc_match_bind_c does not return MATCH_YES.
2887 2007-07-07 Kazu Hirata <kazu@codesourcery.com>
2889 * decl.c, gfortran.h, interface.c, module.c, resolve.c,
2890 trans-array.c, trans-decl.c: Fix comment typos. Follow
2891 spelling conventions.
2892 * intrinsic.texi: Fix typos. Follow spelling conventions.
2894 2007-05-06 Daniel Franke <franke.daniel@gmail.com>
2897 * symbol.c (save_status): New.
2898 * gfortran.h (save_status): Added external declaration.
2899 (check_conflict): Check for conflicting explicite SAVE statements
2901 (gen_special_c_interop_ptr): Use SAVE_EXPLICIT constant.
2902 * module.c (ab_attribute, attr_bits): Removed enumerator value
2903 AB_SAVE for save attribute.
2904 (mio_symbol_attribute): Import/export the full SAVE status,
2905 removed usage of AB_SAVE.
2906 * dump-parse-tree.c (gfc_show_attr): Dump full SAVE status.
2907 * decl.c (add_init_expr_to_sym): Set SAVE_IMPLICIT only if not
2910 2007-07-05 Daniel Franke <franke.daniel@gmail.com>
2911 Tobias Burnus <burnus@net-b.de>
2914 * gfortran.h (symbol_attribute): Change save attribute into an enum.
2915 * decl.c (add_init_expr_to_sym): Set it to SAVE_IMPLICIT.
2916 * symbol.c (gfc_add_save): Check for SAVE_EXPLICIT.
2917 * resolve.c (resolve_fl_variable): Check for SAVE_EXPLICIT.
2918 (resolve_symbol): Allow OMP threadprivate with
2919 initialization SAVEd and save_all variable.
2920 * trans-decl.c (gfc_finish_var_decl): Remove obsolete sym->value check.
2922 2007-07-05 Paul Thomas <pault@gcc.gnu.org>
2925 * match.c (gfc_match_call): Check, in all cases, that a symbol
2926 is neither generic nor a subroutine before trying to add it as
2930 * match.c (gfc_match_do): Reset the implied_index attribute.
2932 2007-07-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2935 * trans-intrinsic.c (trans-intrinsic.c): Handle optional
2936 arguments correctly for MIN and MAX intrinsics.
2938 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2941 * io.c (check_format): Always call gfc_error for errors.
2942 (check_format_string): Change type of this function to try and
2943 return the result of check_format.
2944 (check_io_constraints): Return MATCH_ERROR if check_format_string
2947 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2950 * decl.c (get_proc_name): Include attr->mod_proc in check for error.
2952 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2955 * gfortran.h: Change type of gfc_assign_data_value from void to try.
2956 * data.c (gfc_assign_data_value): Return FAILURE if error found.
2957 * resolve.c (check_data_variable): If gfc_assign_data_value returns
2958 failure, break out of loop and return failure.
2960 2007-07-03 Christopher D. Rickett <crickett@lanl.gov>
2963 * symbol.c (gen_cptr_param): Generate C_PTR and C_FUNPTR if necessary.
2964 (build_formal_args): Pass intrinsic module symbol id to
2967 2007-07-03 Tobias Burnus <burnus@net-b.de>
2970 * resolve.c (resolve_common_blocks): New check function.
2971 (resolve_types): Use it.
2973 2007-07-03 Tobias Burnus <burnus@net-b.de>
2976 * interface.c (get_sym_storage_size): New function.
2977 (get_sym_storage_size): New function.
2978 (compare_actual_formal): Enhance sequence association
2979 support and improve checking.
2981 2007-07-03 Janne Blomqvist <jb@gcc.gnu.org>
2983 * trans-decl.c (gfc_build_builtin_function_decls): Mark
2984 internal_realloc as a malloc function.
2986 2007-07-03 Tobias Burnus <burnus@net-b.de>
2989 * resolve.c (resolve_operator): Check for NULL as operand.
2991 2007-07-02 Tobias Burnus <burnus@net-b.de>
2993 * gfortran.texi (Fortran 2003): Add ISO Bind C.
2994 * intrinsic.texi (C_ASSOCIATED,C_F_POINTER,C_F_PROCPOINTER,
2995 C_FUNLOC,C_LOC): Document new ISO Bind C intrinsics.
2997 2007-07-01 Christopher D. Rickett <crickett@lanl.gov>
2999 * interface.c (gfc_compare_derived_types): Special case for comparing
3000 derived types across namespaces.
3001 (gfc_compare_types): Deal with BT_VOID.
3002 (compare_parameter): Use BT_VOID to accept ISO C Binding pointers.
3003 * trans-expr.c (gfc_conv_function_call): Remove setting parm_kind
3005 (gfc_conv_initializer): Deal with ISO C Binding NULL_PTR and
3007 (gfc_conv_expr): Convert expressions for ISO C Binding derived types.
3008 * symbol.c (gfc_set_default_type): BIND(C) variables should not be
3009 Implicitly declared.
3010 (check_conflict): Add BIND(C) and check for conflicts.
3011 (gfc_add_explicit_interface): Whitespace.
3012 (gfc_add_is_bind_c): New function.
3013 (gfc_copy_attr): Use it.
3014 (gfc_new_symbol): Initialize ISO C Binding objects.
3015 (get_iso_c_binding_dt): New function.
3016 (verify_bind_c_derived_type): Ditto.
3017 (gen_special_c_interop_ptr): Ditto.
3018 (add_formal_arg): Ditto.
3019 (gen_cptr_param): Ditto.
3020 (gen_fptr_param): Ditto.
3021 (gen_shape_param): Ditto.
3022 (add_proc_interface): Ditto.
3023 (build_formal_args): Ditto.
3024 (generate_isocbinding_symbol): Ditto.
3025 (get_iso_c_sym): Ditto.
3026 * decl.c (num_idents_on_line, has_name_equals): New variables.
3027 (verify_c_interop_param): New function.
3028 (build_sym): Finish binding labels and deal with COMMON blocks.
3029 (add_init_expr_to_sym): Check if the initialized expression is
3030 an iso_c_binding named constants
3031 (variable_decl): Set ISO C Binding type_spec components.
3032 (gfc_match_kind_spec): Check match for C interoperable kind.
3033 (match_char_spec): Fix comment. Chnage gfc_match_small_int
3034 to gfc_match_small_int_expr. Check for C interoperable kind.
3035 (match_type_spec): Clear the current binding label.
3036 (match_attr_spec): Add DECL_IS_BIND_C. If BIND(C) is found, use it
3038 (set_binding_label): New function.
3039 (set_com_block_bind_c): Ditto.
3040 (verify_c_interop): Ditto.
3041 (verify_com_block_vars_c_interop): Ditto.
3042 (verify_bind_c_sym): Ditto.
3043 (set_verify_bind_c_sym): Ditto.
3044 (set_verify_bind_c_com_block): Ditto.
3045 (get_bind_c_idents): Ditto.
3046 (gfc_match_bind_c_stmt): Ditto.
3047 (gfc_match_data_decl): Use num_idents_on_line.
3048 (match_result): Deal with right paren in BIND(C).
3049 (gfc_match_suffix): New function.
3050 (gfc_match_function_decl): Use it. Code is re-arranged to deal with
3051 ISO C Binding result clauses.
3052 (gfc_match_subroutine): Deal with BIND(C).
3053 (gfc_match_bind_c): New function.
3054 (gfc_get_type_attr_spec): New function. Code is re-arranged in and
3055 taken from gfc_match_derived_decl.
3056 (gfc_match_derived_decl): Add check for BIND(C).
3057 * trans-common.c: Forward declare gfc_get_common.
3058 (gfc_sym_mangled_common_id): Change arg from 'const char *name' to
3059 'gfc_common_head *com'. Check for ISO C Binding of the common block.
3060 (build_common_decl): 'com->name' to 'com in SET_DECL_ASSEMBLER_NAME.
3061 * gfortran.h: Add GFC_MAX_BINDING_LABEL_LEN
3063 (sym_flavor): Add FL_VOID.
3064 (iso_fortran_env_symbol, iso_c_binding_symbol, intmod_id): New enum
3065 (CInteropKind_t): New struct.
3066 (c_interop_kinds_table): Use it. Declare an array of structs.
3067 (symbol_attribute): Add is_bind_c, is_c_interop, and is_iso_c
3069 (gfc_typespec): Add is_c_interop; is_iso_c, and f90_type members.
3070 (gfc_symbol): Add from_intmod, intmod_sym_id, binding_label, and
3071 common_block members.
3072 (gfc_common_head): Add binding_label and is_bind_c members.
3073 (gfc_gsymbol): Add sym_name, mod_name, and binding_label members.
3074 Add prototypes for get_c_kind, gfc_validate_c_kind,
3075 gfc_check_any_c_kind, gfc_add_is_bind_c, gfc_add_value,
3076 verify_c_interop, verify_c_interop_param, verify_bind_c_sym,
3077 verify_bind_c_derived_type, verify_com_block_vars_c_interop,
3078 generate_isocbinding_symbol, get_iso_c_sym, gfc_iso_c_sub_interface
3079 * iso-c-binding.def: New file. This file contains the definitions
3080 of the types provided by the Fortran 2003 ISO_C_BINDING intrinsic
3082 * trans-const.c (gfc_conv_constant_to_tree): Deal with C_NULL_PTR
3083 or C_NULL_FUNPTR expressions.
3084 * expr.c (gfc_copy_expr): Add BT_VOID case. For BT_CHARACTER, the
3085 ISO C Binding requires a minimum string length of 1 for '\0'.
3086 * module.c (intmod_sym): New struct.
3087 (pointer_info): Add binding_label member.
3088 (write_atom): Set len to 0 for NULL pointers. Check for NULL p and *p.
3089 (ab_attribute): Add AB_IS_BIND_C, AB_IS_C_INTEROP and AB_IS_ISO_C.
3090 (attr_bits): Add "IS_BIND_C", "IS_C_INTEROP", and "IS_ISO_C".
3091 (mio_symbol_attribute): Deal with ISO C Binding attributes.
3092 (bt_types): Add "VOID".
3093 (mio_typespec): Deal with ISO C Binding components.
3094 (mio_namespace_ref): Add intmod variable.
3095 (mio_symbol): Check for symbols from an intrinsic module.
3096 (load_commons): Check for BIND(C) common block.
3097 (read_module): Read binding_label and use it.
3098 (write_common): Add label. Write BIND(C) info.
3099 (write_blank_common): Blank commons are not BIND(C). Explicitly
3101 (write_symbol): Deal with binding_label.
3102 (sort_iso_c_rename_list): New function.
3103 (import_iso_c_binding_module): Ditto.
3104 (create_int_parameter): Add to args.
3105 (use_iso_fortran_env_module): Adjust to deal with iso_c_binding
3107 * trans-types.c (c_interop_kinds_table): new array of structs.
3108 (gfc_validate_c_kind): New function.
3109 (gfc_check_any_c_kind): Ditto.
3110 (get_real_kind_from_node): Ditto.
3111 (get_int_kind_from_node): Ditto.
3112 (get_int_kind_from_width): Ditto.
3113 (get_int_kind_from_minimal_width): Ditto.
3114 (init_c_interop_kinds): Ditto.
3115 (gfc_init_kinds): call init_c_interop_kinds.
3116 (gfc_typenode_for_spec): Adjust for BT_VOID and ISO C Binding pointers.
3117 Adjust handling of BT_DERIVED.
3118 (gfc_sym_type): Whitespace.
3119 (gfc_get_derived_type): Account for iso_c_binding derived types
3120 * resolve.c (is_scalar_expr_ptr): New function.
3121 (gfc_iso_c_func_interface): Ditto.
3122 (resolve_function): Use gfc_iso_c_func_interface.
3123 (set_name_and_label): New function.
3124 (gfc_iso_c_sub_interface): Ditto.
3125 (resolve_specific_s0): Use gfc_iso_c_sub_interface.
3126 (resolve_bind_c_comms): New function.
3127 (resolve_bind_c_derived_types): Ditto.
3128 (gfc_verify_binding_labels): Ditto.
3129 (resolve_fl_procedure): Check for ISO C interoperability.
3130 (resolve_symbol): Check C interoperability.
3131 (resolve_types): Walk the namespace. Check COMMON blocks.
3132 * trans-decl.c (gfc_sym_mangled_identifier): Prevent the mangling
3133 of identifiers that have an assigned binding label.
3134 (gfc_sym_mangled_function_id): Use the binding label rather than
3136 (gfc_finish_var_decl): Put variables that are BIND(C) into a common
3137 segment of the object file, because this is what C would do.
3138 (gfc_create_module_variable): Conver to proper types
3139 (set_tree_decl_type_code): New function.
3140 (generate_local_decl): Check dummy variables and derived types for
3141 ISO C Binding attributes.
3142 * match.c (gfc_match_small_int_expr): New function.
3143 (gfc_match_name_C): Ditto.
3144 (match_common_name): Deal with ISO C Binding in COMMON blocks
3145 * trans-io.c (transfer_expr): Deal with C_NULL_PTR or C_NULL_FUNPTR
3147 * match.h: Add prototypes for gfc_match_small_int_expr,
3148 gfc_match_name_C, match_common_name, set_com_block_bind_c,
3149 set_binding_label, set_verify_bind_c_sym,
3150 set_verify_bind_c_com_block, get_bind_c_idents,
3151 gfc_match_bind_c_stmt, gfc_match_suffix, gfc_match_bind_c,
3152 gfc_get_type_attr_spec
3153 * parse.c (decode_statement): Use gfc_match_bind_c_stmt
3154 (parse_derived): Init *derived_sym = NULL, and gfc_current_block
3155 later for valiadation.
3156 * primary.c (got_delim): Set ISO C Binding components of ts.
3157 (match_logical_constant): Ditto.
3158 (match_complex_constant): Ditto.
3159 (match_complex_constant): Ditto.
3160 (gfc_match_rvalue): Check for existence of at least one arg for
3161 C_LOC, C_FUNLOC, and C_ASSOCIATED.
3162 * misc.c (gfc_clear_ts): Clear ISO C Bindoing components in ts.
3163 (get_c_kind): New function.
3165 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
3168 * trans-expr.c (gfc_conv_power_op): Use builtin_powi for
3170 * f95-lang.c (gfc_init_builtin_functions): Add builtin_powi to the
3173 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
3175 * trans.h: Remove decls for 64-bit allocation functions.
3176 * trans-array.c (gfc_grow_array): Always pick the standard realloc
3178 (gfc_array_allocate): Likewise.
3179 * trans-decl.c: Remove trees for 64-bit allocation functions.
3180 (gfc_build_builtin_function_decls): Don't build fndecls for 64-bit
3181 allocations functions, use index_int_type for normal allocation
3184 2007-06-30 Daniel Franke <franke.daniel@gmail.com>
3187 * intrinsic.c (add_functions): Additional function types.
3188 (gfc_convert_type_warn): Remove intrinsic-flag from
3189 conversion functions.
3190 * resolve.c (resolve_symbol): Added type checks to
3191 explicitly defined intrinsics.
3193 2007-06-30 Tobias Burnus <burnus@net-b.de>
3196 * io.c (check_format): Allow zero to precede the
3199 2007-06-30 Paul Thomas <pault@gcc.gnu.org>
3202 * simplify.c (gfc_simplify_repeat): Add handling of character
3203 literal for first argument.
3205 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
3207 * resolve.c (resolve_operator): Added check whether a user
3208 defined operator is available.
3210 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
3212 * openmp.c (resolve_omp_clauses): Adjust error message to
3213 better reflect the actual requirement.
3215 2007-06-29 Tobias Burnus <burnus@net-b.de>
3218 * io.c (format_lex): Fix FMT_ZERO.
3219 (check_format,check_format_string,gfc_match_format,
3220 check_io_constraints) Additional checking for READ.
3222 2007-06-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3225 * lang.opt (static-libgfortran): New option.
3226 * gfortranspec.c (ADD_ARG_LIBGFORTRAN): New macro.
3227 (Option): Add OPTION_static and OPTION_static_libgfortran.
3228 (lookup_option): Handle the new -static-libgfortran option.
3229 (lang_specific_driver): Check whether -static is passed.
3230 Handle the new -static-libgfortran option.
3231 * options.c (gfc_handle_option): If -static-libgfortran is
3232 passed and isn't supported on this configuration, error out.
3234 2007-06-27 Daniel Franke <franke.daniel@gmail.com>
3237 * openmp.c (resolve_omp_clauses): Emit error on allocatable
3238 components in COPYIN, COPYPRIVATE, FIRSTPRIVATE and LASTPRIVATE
3241 2007-06-25 Paul Thomas <pault@gcc.gnu.org>
3244 * resolve.c (check_host_association): Return if the old symbol
3245 is use associated. Introduce retval to reduce the number of
3246 evaluations of the first-order return value.
3249 * match.c (gfc_match_call): If a host associated symbol is not
3250 a subroutine, build a new symtree/symbol in the current name
3253 2007-06-24 Tobias Burnus <burnus@net-de>
3256 * interface.c (gfc_compare_derived_types): Add access check.
3257 * symbol.c (gfc_find_component): Ditto.
3258 (gfc_set_component_attr,gfc_get_component_attr) Copy access state.
3259 * dump-parse-tree.c (gfc_show_components): Dump access state.
3260 * gfortran.h (struct gfc_component): Add gfc_access.
3261 * module.c (mio_component): Add access state.
3262 * (gfc_match_structure_constructor): Check for private access state.
3264 2007-06-24 Paul Thomas <pault@gcc.gnu.org>
3268 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Calculate
3269 the offset between the loop counter and the position as
3270 defined. Add the offset within the loop so that the mask acts
3271 correctly. Do not advance the location on the basis that it
3274 2007-06-22 Daniel Franke <franke.daniel@gmail.com>
3277 * symbol.c (gfc_copy_attr): Emit errors for duplicate
3278 EXTERNAL/INTRINSIC statements.
3280 2007-06-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3283 * expr.c (gfc_check_assign): If the rvalue expression type is NULL_EXPR,
3284 check to see if the lvalue has attribute pointer and data.
3286 2007-06-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3289 * resolve.c (gfc_resolve_iterator_expr): Add check for REAL using
3290 gfc_notify_standard. (gfc_resolve_iterator): Remove check.
3291 (resolve_branch): Change "Obsolete" to "Deleted feature".
3292 * io.c (resolve_tag): Ditto.
3293 * match.c (gfc_match_pause, gfc_match_assign, gfc_match_goto): Ditto.
3295 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3298 * match.c (gfc_match_common): If the symbol value expression type is
3299 NULL_EXPR, don't error if previously initialized.
3301 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3304 * decl.c (get_proc_name) Check symbol for generic interface
3307 2007-06-20 Andrew Pinski <andrew_pinski@playstation.sony.com>
3308 Richard Guenther <rguenther@suse.de>
3311 * trans.c (gfc_build_addr_expr): Use the correct types.
3313 2007-06-19 Paul Thomas <pault@gcc.gnu.org>
3317 * resolve.c (resolve_code): Use gfc_impure_variable as a
3318 condition for rejecting derived types with pointers, in pure
3320 (gfc_impure_variable): Add test for dummy arguments of pure
3321 procedures; any for functions and INTENT_IN for subroutines.
3324 * data.c (gfc_assign_data_value): Change the ICE on an array
3325 reference initializer not being an array into an error and
3326 clear init to prevent a repetition of the error.
3328 2007-06-17 Janne Blomqvist <jb@gcc.gnu.org>
3330 * gfortran.texi: Add documentation for GFORTRAN_UNBUFFERED_n
3331 environment variables. Fix documentation for
3332 GFORTRAN_UNBUFFERED_ALL environment variable.
3334 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
3336 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
3337 POINTER_PLUS_EXPR instead of PLUS_EXPR for pointer addition.
3338 * trans-expr.c (gfc_trans_string_copy): Create
3339 POINTER_PLUS_EXPR instead of a PLUS_EXPR
3342 2007-06-14 Paul Thomas <pault@gcc.gnu.org>
3345 * trans-common.c (build_common_decl): If resizing of common
3346 decl is needed, update the TREE_TYPE.
3348 2007-06-13 Tobias Burnus <burnus@net-b.de>
3351 * interface.c (has_vector_section): New.
3352 (compare_actual_formal): Check for array sections with vector subscript.
3354 2007-06-12 Dirk Mueller <dmueller@suse.de>
3356 * trans-stmt.c (gfc_trans_call): fix gcc_assert to
3357 a comparison, not an assignment.
3359 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
3361 * trans-common.c (create_common): Initialize 'field_init'.
3363 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
3367 * trans-common.c (get_init_field): New function.
3368 (create_common): Call get_init_field for overlapping
3369 initializers in equivalence blocks.
3370 * resolve.c (resolve_equivalence_derived, resolve_equivalence):
3371 Remove constraints on initializers in equivalence blocks.
3372 * target-memory.c (expr_to_char, gfc_merge_initializers):
3374 (encode_derived): Add the bit offset to the byte offset to get
3375 the total offset to the field.
3376 * target-memory.h : Add prototype for gfc_merge_initializers.
3378 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
3380 * trans-types.c (gfc_signed_type): Remove.
3381 * trans-types.h (gfc_signed_type): Remove.
3382 * f95-lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
3384 2007-06-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3386 * trans-intrinsic.c: Revert Lee's 2007-06-04 patch.
3388 2007-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
3389 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3392 * match.c (gfc_match_special_char): New function. Match special char.
3394 * match.h: Add prototype.
3395 * io.c (next_char): Use it.
3396 * primary.c (next_string_char): Ditto.
3398 2007-06-06 Steven G. Kargl <kargl@gcc.gnu.org>
3400 * decl.c: Miscellaneous whitespace fixes.
3402 * gfortran.h: Likewise.
3403 * interface.c : Likewise.
3405 * match.c: Likewise.
3406 * match.h: Likewise.
3407 * module.c: Likewise.
3408 * parse.c: Likewise.
3409 * resolve.c: Likewise.
3410 * symbol.c: Likewise.
3411 * trans-array.c: Likewise.
3412 * trans-common.c: Likewise.
3413 * trans-decl.c: Likewise.
3414 * trans-intrinsic.c: Likewise.
3415 * trans-io.c: Likewise.
3416 * trans-stmt.c: Likewise.
3417 * trans-types.c: Likewise.
3419 2007-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3422 * parse.c (decode_statement): Don't call gfc_undo_symbols on MATCH_ERROR
3423 for ST_FUNCTION since it is called in reject_statement.
3424 (parse_contained): If error, loop back after reject_statement and try
3425 again. Free the namespace if an error occured.
3427 2007-06-04 Lee Millward <lee.millward@codesourcery.com>
3429 * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
3430 to operate on a stack allocated array for the intrinsic arguments
3431 instead of creating a TREE_LIST. Add two new parameters for the
3432 array and the number of elements. Update all callers to allocate
3433 an array of the correct length to pass in. Update comment.
3434 (gfc_intrinsic_argument_list_length): New function.
3435 (gfc_conv_intrinsic_mnimax): Call it.
3436 (gfc_conv_intrinsic_merge): Likewise.
3437 (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
3439 (gfc_conv_intrinsic_cmplx): Likewise.
3440 (gfc_conv_intrinsic_ctime): Likewise.
3441 (gfc_covn_intrinsic_fdate): Likewise.
3442 (gfc_conv_intrinsic_ttynam): Likewise.
3443 (gfc_conv_intrinsic_ishftc): Likewise.
3444 (gfc_conv_intrinsic_index): Likewise.
3445 (gfc_conv_intrinsic_scan): Likewise.
3446 (gfc_conv_intrinsic_verify): Likewise.
3447 (gfc_conv_intrinsic_trim): Likewise.
3448 (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
3449 (gfc_conv_intrinsic_exponent): Likewise.
3450 (gfc_conv_intrinsic_bound): Likewise.
3451 (gfc_conv_intrinsic_abs): Likewise.
3452 (gfc_conv_intrinsic_mod): Likewise.
3453 (gfc_conv_intrinsic_sign): Likewise.
3454 (gfc_conv_intrinsic_len): Likewise.
3455 (gfc_conv_intrinsic_adjust): Likewise.
3456 (gfc_conv_intrinsic_si_kind): Likewise.
3458 2007-06-04 Steve Ellcey <sje@cup.hp.com>
3460 * trans-array.c (gfc_conv_array_parameter): Initialize tmp.
3462 2007-05-31 Richard Guenther <rguenther@suse.de>
3464 * trans-expr.c (gfc_conv_expr_op): Use zero constant
3465 that matches the lse type.
3466 (gfc_trans_string_copy): Use sizetype zero constant.
3467 * intrinsic.c (add_functions): The sizeof intrinsic has
3469 * trans-types.c (gfc_get_dtype): Convert size to index
3470 type before shifting.
3471 * trans-array.c (gfc_trans_array_constructor_value): Use
3472 index type for offset computation.
3473 * trans-intrinsic.c (gfc_conv_associated): Use correct type
3476 2007-05-31 Paul Thomas <pault@gcc.gnu.org>
3479 * trans-array.c (gfc_trans_array_constructor): Treat the case
3480 where the ss expression charlen is missing.
3482 22007-05-31 Paul Thomas <pault@gcc.gnu.org>
3485 * module.c (mio_symtree_ref): If an equivalence group member
3486 is not used, give it a hidden symbol and set the pointer_info.
3487 (load_equiv): Only free the equivalence if none of the members
3490 2007-05-29 Daniel Franke <franke.daniel@gmail.com>
3492 * gfortran.h: Renamed 'enum gfc_generic_isym_id' to 'enum gfc_isym_id',
3493 added missing GFC_ISYM_* enumerators, ordered alphabetically.
3494 (struct gfc_intrinsic_sym): Renamed 'generic_id' to 'id'.
3495 (gfc_find_subroutine): New prototype.
3496 * intrinsic.c (add_sym, add_sym_*): Added argument 'id' and changed all callers.
3497 (find_subroutine): Renamed to 'gfc_find_subroutine', removed static.
3498 * dependency.c: Changed usage of isym->generic_id to isym->id.
3499 * openmp.c: Likewise.
3500 * resolve.c: Likewise.
3501 * trans-array.c: Likewise.
3502 * trans-expr.c: Likewise.
3503 * trans-intrinsic.c: Likewise.
3504 * trans-openmp.c: Likewise.
3506 2007-05-28 Tobias Schlüter <tobi@gcc.gnu.org>
3508 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIZEOF.
3509 * intrinsic.c (add_functions): Add stuff for SIZEOF intrinsic.
3510 * intrinsic.h (gfc_check_sizeof): Add prototype of ...
3511 * check.c (gfc_check_sizeof): .. new function.
3512 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): New function.
3513 (gfc_conv_intrinsic_strcmp): Whitespace fix.
3514 (gfc_conv_intrinsic_array_transfer): Remove double initialization,
3515 use fold_build. where appropriate.
3516 (gfc_conv_intrinsic_function): Add case for SIZEOF.
3517 * intrinsic.texi: Add documentation for SIZEOF.
3519 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
3521 * trans-array.c (gfc_conv_expr_descriptor): Edit comment.
3523 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
3526 * target-memory.c (gfc_target_expr_size): Add handling
3527 for size of BT_HOLLERITH variables.
3528 * check.c (gfc_check_transfer): Reject BT_HOLLERITH
3529 variables in MOLD argument of TRANSFER.
3531 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
3533 * gfortran.h (gfc_expr): Remove from_H, add "representation"
3535 * primary.c (match_hollerith_constant): Store the representation
3536 of the Hollerith in representation, not in value.character.
3537 * arith.c: Add dependency on target-memory.h.
3538 (eval_intrinsic): Remove check for from_H.
3539 (hollerith2representation): New function.
3540 (gfc_hollerith2int): Determine value of the new constant.
3541 (gfc_hollerith2real): Likewise.
3542 (gfc_hollerith2complex): Likewise.
3543 (gfc_hollerith2logical): Likewise.
3544 (gfc_hollerith2character): Point both representation.string and
3545 value.character.string at the value string.
3546 * data.c (create_character_initializer): For BT_HOLLERITH
3547 rvalues, get the value from the representation rather than
3549 * expr.c (free_expr0): Update handling of BT_HOLLERITH values
3550 and values with representation.string.
3551 (gfc_copy_expr): Likewise.
3552 * intrinsic.c (do_simplify): Remove special treatement of
3553 variables resulting from Hollerith constants.
3554 * dump-parse-trees.c (gfc_show_expr): Update handling of
3556 * trans-const.c (gfc_conv_constant_to_tree): Replace from_H
3557 check with check for representation.string; get Hollerith
3558 representation from representation.string, not value.character.
3559 * trans-expr.c (is_zero_initializer_p): Replace from_H check
3560 with check for representation.string.
3561 * trans-stmt.c (gfc_trans_integer_select): Use
3562 gfc_conv_mpz_to_tree for case values, so as to avoid picking up
3563 the memory representation if the case is given by a transfer
3565 * target-memory.c (gfc_target_encode_expr): Use the known memory
3566 representation rather than the value, if it exists.
3567 (gfc_target_interpret_expr): Store the memory representation of
3568 the interpreted expression as well as its value.
3569 (interpret_integer): Move to gfc_interpret_integer, make
3571 (interpret_float): Move to gfc_interpret_float, make non-static.
3572 (interpret_complex): Move to gfc_interpret_complex, make
3574 (interpret_logical): Move to gfc_interpret_logical, make
3576 (interpret_character): Move to gfc_interpret_character, make
3578 (interpret_derived): Move to gfc_interpret_derived, make
3580 * target-memory.h: Add prototypes for newly-exported
3581 gfc_interpret_* functions.
3583 2007-05-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3586 * parse.c (next_statement): Warn for truncated lines if source is free
3589 2007-05-27 Paul Thomas <pault@gcc.gnu.org>
3590 Tobias Burnus <burnus@net-b.de>
3593 * symbol.c (gfc_check_function_type): Copy dimensions of
3595 * resolve.c (resolve_contained_fntype): Improve symbol output in
3598 2007-05-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3601 * io.c (check_format): Add warning for H specifier in format.
3603 2007-05-26 Tobias Burnus <burnus@net-b.de>
3605 * gfortran.texi: Document the GFORTRAN_ERROR_DUMPCORE and
3606 GFORTRAN_ERROR_BACKTRACE environment variables.
3608 2007-05-26 Paul Thomas <pault@gcc.gnu.org>
3611 * trans.h : Add no_function_call bitfield to gfc_se structure.
3612 Add stmtblock_t argument to prototype of get_array_ctor_strlen.
3613 * trans-array.c (get_array_ctor_all_strlen): New function.
3614 (get_array_ctor_strlen): Add new stmtblock_t argument and call
3615 new function for character elements that are not constants,
3616 arrays or variables.
3617 (gfc_conv_array_parameter): Call get_array_ctor_strlen to get
3619 * trans-intrinsic (gfc_conv_intrinsic_len): Add new argument
3620 to call of get_array_ctor_strlen.
3622 2007-05-25 Kazu Hirata <kazu@codesourcery.com>
3624 * intrinsic.texi: Fix typos.
3626 2007-05-25 Paul Thomas <pault@gcc.gnu.org>
3629 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Change
3630 order in logic under EXPR_FUNCTION to handle functions with
3633 2007-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3636 * array.c (spec_dimen_size): Test for correct BT_INTEGER type.
3638 2007-05-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3641 * trans-expr.c (gfc_trans_zero_assign): Convert the result of
3642 TYPE_SIZE_UNIT into a signed type.
3643 (gfc_trans_array_copy): Likewise.
3644 (gfc_trans_array_constructor_copy): Likewise.
3645 * trans-array.c (gfc_trans_create_temp_array): Likewise.
3646 (gfc_grow_array): Likewise.
3647 (gfc_array_init_size): Likewise.
3648 (gfc_duplicate_allocatable): Likewise.
3649 * trans-stmt.c (allocate_temp_for_forall_nest_1): Likewise.
3651 2007-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3654 * resolve.c (resolve_function): Don't call resolve_global_procedure if
3655 there is no name. Delete duplicated statement in ELSE clause.
3657 2007-05-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3660 * trans-array.c (gfc_trans_array_bound_check): Take extra argument to
3661 indicate whether we should check the upper bound in that dimension.
3662 (gfc_conv_array_index_offset): Check only the lower bound of the
3663 last dimension for assumed-size arrays.
3664 (gfc_conv_array_ref): Likewise.
3665 (gfc_conv_ss_startstride): Likewise.
3667 2007-05-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3668 Daniel Franke <franke.daniel@gmail.com>
3671 * resolve.c (resolve_actual_arglist): Resolve actual argument after
3672 being identified as variable.
3674 2007-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3677 * trans-stmt.c (gfc_trans_do): Fix the value of loop variable
3680 2007-05-21 H.J. Lu <hongjiu.lu@intel.com>
3682 * trans-stmt.c (gfc_trans_do): Fix a typo in comment.
3684 2007-05-21 Paul Thomas <pault@gcc.gnu.org>
3688 * trans-array.c (gfc_conv_expr_descriptor): Obtain the stored
3689 offset for non-descriptor, source arrays and correct for stride
3690 not equal to one before writing to field of output descriptor.
3692 2007-05-20 Daniel Franke <franke.daniel@gmail.com>
3695 * check.c (check_rest): Improved argument conformance check and
3696 fixed error message generation.
3698 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3701 * Make-lang.in: Remove use of -Wno-error for expr.o, resolve.o,
3702 simplify.o and trans-common.o.
3704 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3707 * trans-array.c (gfc_trans_auto_array_allocation): Avoid
3708 multiplication of mismatched types.
3710 2007-05-18 Daniel Franke <franke.daniel@gmail.com>
3713 * symbol.c (gfc_add_flavor): Add the NAME to error message if
3716 2007-05-15 Daniel Franke <franke.daniel@gmail.com>
3721 * intrinsic.c (check_specific): Check elemental intrinsics for
3723 (add_functions): Fixed dummy argument names of BESJN and BESYN.
3724 Fixed elemental status of MCLOCK and MCLOCK8.
3725 * check.c (check_rest): Added check for array conformance.
3726 (gfc_check_merge): Removed check for array conformance.
3727 (gfc_check_besn): Removed check for scalarity.
3728 * intrinsic.texi (CSHIFT, EOSHIFT): Fixed typos.
3729 (BESJN, BESYN): Clarified documentation.
3731 2007-05-17 Tobias Burnus <burnus@net-b.de>
3733 * gfortran.texi (GFORTRAN_CONVERT_UNIT): Improve documentation.
3735 2007-05-16 Brooks Moses <brooks.moses@codesourcery.com>
3742 * target-memory.c: New file.
3743 * target-memory.h: New file.
3744 * simplify.c: Add #include "target-memory.h".
3745 (gfc_simplify_transfer): Implement constant-
3746 folding for TRANSFER intrinsic.
3747 * Make-lang.in: Add dependencies on new target-memory.* files.
3749 2007-05-15 Paul Brook <paul@codesourcery.com>
3751 * trans-types.c (gfc_type_for_size): Handle signed TImode.
3753 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3756 * trans.h (gfor_fndecl_internal_malloc, gfor_fndecl_internal_malloc64,
3757 gfor_fndecl_internal_free): Remove prototypes.
3758 (gfor_fndecl_os_error, gfc_call_free, gfc_call_malloc): Add prototypes.
3759 * trans.c (gfc_call_malloc, gfc_call_free): New functions.
3760 * f95-lang.c (gfc_init_builtin_functions): Add __builtin_free
3761 and __builtin_malloc builtins.
3762 * trans-decl.c (gfor_fndecl_internal_malloc,
3763 gfor_fndecl_internal_malloc64, gfor_fndecl_internal_free): Remove.
3764 (gfor_fndecl_os_error): Add.
3765 (gfc_build_builtin_function_decls): Don't create internal_malloc,
3766 internal_malloc64 and internal_free library function declaration.
3767 Create os_error library call function declaration.
3768 * trans-array.c (gfc_trans_allocate_array_storage,
3769 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
3770 gfc_conv_array_parameter, gfc_duplicate_allocatable): Use
3771 gfc_call_malloc and gfc_call_free instead of building calls to
3772 internal_malloc and internal_free.
3773 * trans-expr.c (gfc_conv_string_tmp): Likewise.
3774 * trans-stmt.c (gfc_do_allocate, gfc_trans_assign_need_temp,
3775 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
3776 gfc_trans_where_2: Likewise.
3777 * trans-intrinsic.c (gfc_conv_intrinsic_ctime,
3778 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
3779 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_trim): Likewise.
3781 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3784 * trans-expr.c (gfc_conv_substring): Evaluate substring bounds
3787 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
3789 * f95-lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
3790 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use unsigned_type_for
3791 instead of gfc_unsigned_type.
3792 * trans-stmt.c (gfc_trans_do): Use unsigned_type_for instead of
3794 * trans-types.c (gfc_unsigned_type): Remove.
3795 * trans-types.h (gfc_unsigned_type): Remove.
3797 2007-05-12 Paul Thomas <pault@gcc.gnu.org>
3800 * resolve.c (check_host_association): New function that detects
3801 incorrect host association and corrects it.
3802 (gfc_resolve_expr): Call the new function for variables and
3804 * match.h : Remove prototype for gfc_match_rvalue.
3805 * gfortran.h : Add prototype for gfc_match_rvalue.
3807 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
3810 * trans-expr.c (gfc_conv_function_call): Reduce indirection for
3811 direct assignments of recursive array valued functions.
3812 * primary.c (gfc_match_rvalue): Correct error for recursive
3813 function calls such that directly recursive calls of scalar
3814 function without an explicit result are disallowed.
3816 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
3819 * resolve.c (resolve_fl_namelist): It is not an error if the
3820 namelist element is the result variable of the enclosing
3821 function. Search for the symbol in current and all parent
3822 namespaces for a potential conflict.
3823 * symbol.c (check_conflict): Remove the conflict between
3824 'in_namelist' and 'FL_PROCEDURE' because the symbol info
3825 is not available to exclude function result variables.
3826 * trans-io.c (nml_get_addr_expr): Use the fake result decl
3827 if the symbol is an implicit result variable.
3829 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
3832 * decl.c (get_proc_name): If an entry has already been declared
3833 as a module procedure, pick up the symbol and the symtree and
3834 use them for the entry.
3836 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
3839 * resolve.c (resolve_symbol): Remove the flagging mechanism from the
3840 formal namespace resolution and instead check that the formal
3841 namespace is not the current namespace.
3843 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
3846 * trans-array.c (gfc_conv_array_parameter): Convert full array
3847 references to the result of the procedure enclusing the call.
3849 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
3853 * decl.c (add_init_expr_to_sym): Expand a scalar initializer
3854 for a parameter array into an array expression with the right
3856 * array.c (spec_dimen_size): Remove static attribute.
3857 * gfortran.h : Prototype for spec_dimen_size.
3859 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3862 * trans-stmt.c (gfc_trans_do): Handle large loop counts.
3864 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3867 * simplify.c (gfc_simplify_new_line): NEW_LINE can be simplified
3868 even for non constant arguments.
3870 2007-05-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3871 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3874 * gfortran.h: Add runtime error codes from libgfortran.h. Define
3876 * trans.c (gfc_trans_runtime_check): Update the format of runtime error
3877 messages to match library runtime errors. Use call to new library
3878 function runtime_error_at().
3879 * trans.h: Add prototype for new function gfc_trans_io_runtime_check.
3880 Add declaration for library functions runtime_error_at and
3882 * trans_io.c (gfc_trans_io_runtime_check): New function.
3883 (set_parameter_value): Add error checking for UNIT numbers.
3884 (set_parameter_ref): Initialize the users variable to zero.
3885 (gfc_trans_open): Move setting of unit number to after setting of common
3886 flags so that runtime error trapping can be detected.
3887 (gfc_trans_close): Likewise. (build_filepos): Likewise.
3888 (gfc_trans_inquire): Likewise. (build_dt): Likewise.
3889 * trans-decl.c: Add declarations for runtime_error_at and
3890 generate_error. (gfc_build_builtin_function_decls): Build function
3891 declarations for runtime_error_at and generate_error.
3893 2007-05-06 Paul Thomas <pault@gcc.gnu.org>
3896 * resolve.c (resolve_fl_procedure): Resolve constant character
3899 2007-05-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3902 * decl.c (match_char_spec): Add check for invalid character lengths.
3904 2007-05-04 Brooks Moses <brooks.moses@codesourcery.com>
3906 * intrinsic.texi (CMPLX): Document result kind.
3907 (COMPLEX): Add documentation.
3909 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
3912 * intrinsic.c (add_functions): Replaced calls to gfc_check_g77_math1
3913 by gfc_check_fn_r to avoid checks for scalarity.
3914 * check.c (gfc_check_besn): Removed check for scalarity.
3915 (gfc_check_g77_math1): Removed.
3916 * intrinsic.h (gfc_check_g77_math1): Removed.