1 2007-07-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4 * trans-array.c (gfc_trans_array_constructor): Mark offset field
6 * trans-decl.c (gfc_build_qualified_array): Mark lbound, ubound,
7 stride and size variables with TREE_NO_WARNING.
9 2007-07-09 Steven G. Kargl <kargl@gcc.gnu.org>
11 * trans-decl.c (set_tree_decl_type_code): Remove function.
12 (generate_local_decl): Remove reference to set_tree_decl_type_code.
14 2007-07-09 Daniel Franke <franke.daniel@gmail.com>
17 * trans-decl.c (generate_local_decl) Emit a warning if an unused
20 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
23 * module.c (gfc_match_use): Do not set an non-existant
24 intrinsic operator if a user-defined operator is found.
26 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
30 * trans-decl.c (generate_local_decl): Adjusted warning on unused
31 dummy arguments, tell middle-end not to emit additional warnings.
33 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
34 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
37 * gfortran.h (gfc_intrinsic_op): Added INTRINSIC_EQ_OS,
38 INTRINSIC_NE_OS, INTRINSIC_GT_OS, INTRINSIC_GE_OS,
39 INTRINSIC_LT_OS and INTRINSIC_LE_OS.
40 * arith.c (eval_intrinsic, eval_type_intrinsic0): Likewise.
41 * arith.h (gfc_eq, gfc_ne, gfc_gt, gfc_ge, gfc_lt, gfc_le):
42 Added gfc_intrinsic_op as third argument type.
43 * dump-parse-tree.c (gfc_show_expr): Account for new enum values.
44 * expr.c (simplify_intrinsic_op, check_intrinsic_op): Likewise.
45 * interface.c (check_operator_interface): Likewise.
46 (gfc_check_interfaces): Added cross-checks for FORTRAN 77 and
47 Fortran 90 style operators using new enum values.
48 (gfc_extend_expr): Likewise.
49 (gfc_add_interface): Likewise.
50 * match.c (intrinsic_operators): Distinguish FORTRAN 77 style
51 operators from Fortran 90 style operators using new enum values.
52 * matchexp.c (match_level_4): Account for new enum values.
53 * module.c (mio_expr): Likewise.
54 * resolve.c (resolve_operator): Deal with new enum values, fix
55 inconsistent error messages.
56 * trans-expr.c (gfc_conv_expr_op): Account for new enum values.
58 2007-07-08 Tobias Burnus <burnus@net-b.de>
61 * interface.c (get_expr_storage_size): Properly obtain lower bound.
62 (compare_actual_formal): Add space before parenthesis.
64 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
67 * resolve.c (resolve_fl_procedure): Added check for PRIVATE types
70 2007-07-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
73 * decl.c (match_attr_spec): Don't return MATCH_ERROR if comma found and
74 gfc_match_bind_c does not return MATCH_YES.
76 2007-07-07 Kazu Hirata <kazu@codesourcery.com>
78 * decl.c, gfortran.h, interface.c, module.c, resolve.c,
79 trans-array.c, trans-decl.c: Fix comment typos. Follow
81 * intrinsic.texi: Fix typos. Follow spelling conventions.
83 2007-05-06 Daniel Franke <franke.daniel@gmail.com>
86 * symbol.c (save_status): New.
87 * gfortran.h (save_status): Added external declaration.
88 (check_conflict): Check for conflicting explicite SAVE statements
90 (gen_special_c_interop_ptr): Use SAVE_EXPLICIT constant.
91 * module.c (ab_attribute, attr_bits): Removed enumerator value
92 AB_SAVE for save attribute.
93 (mio_symbol_attribute): Import/export the full SAVE status,
94 removed usage of AB_SAVE.
95 * dump-parse-tree.c (gfc_show_attr): Dump full SAVE status.
96 * decl.c (add_init_expr_to_sym): Set SAVE_IMPLICIT only if not
99 2007-07-05 Daniel Franke <franke.daniel@gmail.com>
100 Tobias Burnus <burnus@net-b.de>
103 * gfortran.h (symbol_attribute): Change save attribute into an enum.
104 * decl.c (add_init_expr_to_sym): Set it to SAVE_IMPLICIT.
105 * symbol.c (gfc_add_save): Check for SAVE_EXPLICIT.
106 * resolve.c (resolve_fl_variable): Check for SAVE_EXPLICIT.
107 (resolve_symbol): Allow OMP threadprivate with
108 initialization SAVEd and save_all variable.
109 * trans-decl.c (gfc_finish_var_decl): Remove obsolete sym->value check.
111 2007-07-05 Paul Thomas <pault@gcc.gnu.org>
114 * match.c (gfc_match_call): Check, in all cases, that a symbol
115 is neither generic nor a subroutine before trying to add it as
119 * match.c (gfc_match_do): Reset the implied_index attribute.
121 2007-07-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
124 * trans-intrinsic.c (trans-intrinsic.c): Handle optional
125 arguments correctly for MIN and MAX intrinsics.
127 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
130 * io.c (check_format): Always call gfc_error for errors.
131 (check_format_string): Change type of this function to try and
132 return the result of check_format.
133 (check_io_constraints): Return MATCH_ERROR if check_format_string
136 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
139 * decl.c (get_proc_name): Include attr->mod_proc in check for error.
141 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
144 * gfortran.h: Change type of gfc_assign_data_value from void to try.
145 * data.c (gfc_assign_data_value): Return FAILURE if error found.
146 * resolve.c (check_data_variable): If gfc_assign_data_value returns
147 failure, break out of loop and return failure.
149 2007-07-03 Christopher D. Rickett <crickett@lanl.gov>
152 * symbol.c (gen_cptr_param): Generate C_PTR and C_FUNPTR if necessary.
153 (build_formal_args): Pass intrinsic module symbol id to
156 2007-07-03 Tobias Burnus <burnus@net-b.de>
159 * resolve.c (resolve_common_blocks): New check function.
160 (resolve_types): Use it.
162 2007-07-03 Tobias Burnus <burnus@net-b.de>
165 * interface.c (get_sym_storage_size): New function.
166 (get_sym_storage_size): New function.
167 (compare_actual_formal): Enhance sequence association
168 support and improve checking.
170 2007-07-03 Janne Blomqvist <jb@gcc.gnu.org>
172 * trans-decl.c (gfc_build_builtin_function_decls): Mark
173 internal_realloc as a malloc function.
175 2007-07-03 Tobias Burnus <burnus@net-b.de>
178 * resolve.c (resolve_operator): Check for NULL as operand.
180 2007-07-02 Tobias Burnus <burnus@net-b.de>
182 * gfortran.texi (Fortran 2003): Add ISO Bind C.
183 * intrinsic.texi (C_ASSOCIATED,C_F_POINTER,C_F_PROCPOINTER,
184 C_FUNLOC,C_LOC): Document new ISO Bind C intrinsics.
186 2007-07-01 Christopher D. Rickett <crickett@lanl.gov>
188 * interface.c (gfc_compare_derived_types): Special case for comparing
189 derived types across namespaces.
190 (gfc_compare_types): Deal with BT_VOID.
191 (compare_parameter): Use BT_VOID to accept ISO C Binding pointers.
192 * trans-expr.c (gfc_conv_function_call): Remove setting parm_kind
194 (gfc_conv_initializer): Deal with ISO C Binding NULL_PTR and
196 (gfc_conv_expr): Convert expressions for ISO C Binding derived types.
197 * symbol.c (gfc_set_default_type): BIND(C) variables should not be
199 (check_conflict): Add BIND(C) and check for conflicts.
200 (gfc_add_explicit_interface): Whitespace.
201 (gfc_add_is_bind_c): New function.
202 (gfc_copy_attr): Use it.
203 (gfc_new_symbol): Initialize ISO C Binding objects.
204 (get_iso_c_binding_dt): New function.
205 (verify_bind_c_derived_type): Ditto.
206 (gen_special_c_interop_ptr): Ditto.
207 (add_formal_arg): Ditto.
208 (gen_cptr_param): Ditto.
209 (gen_fptr_param): Ditto.
210 (gen_shape_param): Ditto.
211 (add_proc_interface): Ditto.
212 (build_formal_args): Ditto.
213 (generate_isocbinding_symbol): Ditto.
214 (get_iso_c_sym): Ditto.
215 * decl.c (num_idents_on_line, has_name_equals): New variables.
216 (verify_c_interop_param): New function.
217 (build_sym): Finish binding labels and deal with COMMON blocks.
218 (add_init_expr_to_sym): Check if the initialized expression is
219 an iso_c_binding named constants
220 (variable_decl): Set ISO C Binding type_spec components.
221 (gfc_match_kind_spec): Check match for C interoperable kind.
222 (match_char_spec): Fix comment. Chnage gfc_match_small_int
223 to gfc_match_small_int_expr. Check for C interoperable kind.
224 (match_type_spec): Clear the current binding label.
225 (match_attr_spec): Add DECL_IS_BIND_C. If BIND(C) is found, use it
227 (set_binding_label): New function.
228 (set_com_block_bind_c): Ditto.
229 (verify_c_interop): Ditto.
230 (verify_com_block_vars_c_interop): Ditto.
231 (verify_bind_c_sym): Ditto.
232 (set_verify_bind_c_sym): Ditto.
233 (set_verify_bind_c_com_block): Ditto.
234 (get_bind_c_idents): Ditto.
235 (gfc_match_bind_c_stmt): Ditto.
236 (gfc_match_data_decl): Use num_idents_on_line.
237 (match_result): Deal with right paren in BIND(C).
238 (gfc_match_suffix): New function.
239 (gfc_match_function_decl): Use it. Code is re-arranged to deal with
240 ISO C Binding result clauses.
241 (gfc_match_subroutine): Deal with BIND(C).
242 (gfc_match_bind_c): New function.
243 (gfc_get_type_attr_spec): New function. Code is re-arranged in and
244 taken from gfc_match_derived_decl.
245 (gfc_match_derived_decl): Add check for BIND(C).
246 * trans-common.c: Forward declare gfc_get_common.
247 (gfc_sym_mangled_common_id): Change arg from 'const char *name' to
248 'gfc_common_head *com'. Check for ISO C Binding of the common block.
249 (build_common_decl): 'com->name' to 'com in SET_DECL_ASSEMBLER_NAME.
250 * gfortran.h: Add GFC_MAX_BINDING_LABEL_LEN
252 (sym_flavor): Add FL_VOID.
253 (iso_fortran_env_symbol, iso_c_binding_symbol, intmod_id): New enum
254 (CInteropKind_t): New struct.
255 (c_interop_kinds_table): Use it. Declare an array of structs.
256 (symbol_attribute): Add is_bind_c, is_c_interop, and is_iso_c
258 (gfc_typespec): Add is_c_interop; is_iso_c, and f90_type members.
259 (gfc_symbol): Add from_intmod, intmod_sym_id, binding_label, and
260 common_block members.
261 (gfc_common_head): Add binding_label and is_bind_c members.
262 (gfc_gsymbol): Add sym_name, mod_name, and binding_label members.
263 Add prototypes for get_c_kind, gfc_validate_c_kind,
264 gfc_check_any_c_kind, gfc_add_is_bind_c, gfc_add_value,
265 verify_c_interop, verify_c_interop_param, verify_bind_c_sym,
266 verify_bind_c_derived_type, verify_com_block_vars_c_interop,
267 generate_isocbinding_symbol, get_iso_c_sym, gfc_iso_c_sub_interface
268 * iso-c-binding.def: New file. This file contains the definitions
269 of the types provided by the Fortran 2003 ISO_C_BINDING intrinsic
271 * trans-const.c (gfc_conv_constant_to_tree): Deal with C_NULL_PTR
272 or C_NULL_FUNPTR expressions.
273 * expr.c (gfc_copy_expr): Add BT_VOID case. For BT_CHARACTER, the
274 ISO C Binding requires a minimum string length of 1 for '\0'.
275 * module.c (intmod_sym): New struct.
276 (pointer_info): Add binding_label member.
277 (write_atom): Set len to 0 for NULL pointers. Check for NULL p and *p.
278 (ab_attribute): Add AB_IS_BIND_C, AB_IS_C_INTEROP and AB_IS_ISO_C.
279 (attr_bits): Add "IS_BIND_C", "IS_C_INTEROP", and "IS_ISO_C".
280 (mio_symbol_attribute): Deal with ISO C Binding attributes.
281 (bt_types): Add "VOID".
282 (mio_typespec): Deal with ISO C Binding components.
283 (mio_namespace_ref): Add intmod variable.
284 (mio_symbol): Check for symbols from an intrinsic module.
285 (load_commons): Check for BIND(C) common block.
286 (read_module): Read binding_label and use it.
287 (write_common): Add label. Write BIND(C) info.
288 (write_blank_common): Blank commons are not BIND(C). Explicitly
290 (write_symbol): Deal with binding_label.
291 (sort_iso_c_rename_list): New function.
292 (import_iso_c_binding_module): Ditto.
293 (create_int_parameter): Add to args.
294 (use_iso_fortran_env_module): Adjust to deal with iso_c_binding
296 * trans-types.c (c_interop_kinds_table): new array of structs.
297 (gfc_validate_c_kind): New function.
298 (gfc_check_any_c_kind): Ditto.
299 (get_real_kind_from_node): Ditto.
300 (get_int_kind_from_node): Ditto.
301 (get_int_kind_from_width): Ditto.
302 (get_int_kind_from_minimal_width): Ditto.
303 (init_c_interop_kinds): Ditto.
304 (gfc_init_kinds): call init_c_interop_kinds.
305 (gfc_typenode_for_spec): Adjust for BT_VOID and ISO C Binding pointers.
306 Adjust handling of BT_DERIVED.
307 (gfc_sym_type): Whitespace.
308 (gfc_get_derived_type): Account for iso_c_binding derived types
309 * resolve.c (is_scalar_expr_ptr): New function.
310 (gfc_iso_c_func_interface): Ditto.
311 (resolve_function): Use gfc_iso_c_func_interface.
312 (set_name_and_label): New function.
313 (gfc_iso_c_sub_interface): Ditto.
314 (resolve_specific_s0): Use gfc_iso_c_sub_interface.
315 (resolve_bind_c_comms): New function.
316 (resolve_bind_c_derived_types): Ditto.
317 (gfc_verify_binding_labels): Ditto.
318 (resolve_fl_procedure): Check for ISO C interoperability.
319 (resolve_symbol): Check C interoperability.
320 (resolve_types): Walk the namespace. Check COMMON blocks.
321 * trans-decl.c (gfc_sym_mangled_identifier): Prevent the mangling
322 of identifiers that have an assigned binding label.
323 (gfc_sym_mangled_function_id): Use the binding label rather than
325 (gfc_finish_var_decl): Put variables that are BIND(C) into a common
326 segment of the object file, because this is what C would do.
327 (gfc_create_module_variable): Conver to proper types
328 (set_tree_decl_type_code): New function.
329 (generate_local_decl): Check dummy variables and derived types for
330 ISO C Binding attributes.
331 * match.c (gfc_match_small_int_expr): New function.
332 (gfc_match_name_C): Ditto.
333 (match_common_name): Deal with ISO C Binding in COMMON blocks
334 * trans-io.c (transfer_expr): Deal with C_NULL_PTR or C_NULL_FUNPTR
336 * match.h: Add prototypes for gfc_match_small_int_expr,
337 gfc_match_name_C, match_common_name, set_com_block_bind_c,
338 set_binding_label, set_verify_bind_c_sym,
339 set_verify_bind_c_com_block, get_bind_c_idents,
340 gfc_match_bind_c_stmt, gfc_match_suffix, gfc_match_bind_c,
341 gfc_get_type_attr_spec
342 * parse.c (decode_statement): Use gfc_match_bind_c_stmt
343 (parse_derived): Init *derived_sym = NULL, and gfc_current_block
344 later for valiadation.
345 * primary.c (got_delim): Set ISO C Binding components of ts.
346 (match_logical_constant): Ditto.
347 (match_complex_constant): Ditto.
348 (match_complex_constant): Ditto.
349 (gfc_match_rvalue): Check for existence of at least one arg for
350 C_LOC, C_FUNLOC, and C_ASSOCIATED.
351 * misc.c (gfc_clear_ts): Clear ISO C Bindoing components in ts.
352 (get_c_kind): New function.
354 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
357 * trans-expr.c (gfc_conv_power_op): Use builtin_powi for
359 * f95-lang.c (gfc_init_builtin_functions): Add builtin_powi to the
362 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
364 * trans.h: Remove decls for 64-bit allocation functions.
365 * trans-array.c (gfc_grow_array): Always pick the standard realloc
367 (gfc_array_allocate): Likewise.
368 * trans-decl.c: Remove trees for 64-bit allocation functions.
369 (gfc_build_builtin_function_decls): Don't build fndecls for 64-bit
370 allocations functions, use index_int_type for normal allocation
373 2007-06-30 Daniel Franke <franke.daniel@gmail.com>
376 * intrinsic.c (add_functions): Additional function types.
377 (gfc_convert_type_warn): Remove intrinsic-flag from
378 conversion functions.
379 * resolve.c (resolve_symbol): Added type checks to
380 explicitly defined intrinsics.
382 2007-06-30 Tobias Burnus <burnus@net-b.de>
385 * io.c (check_format): Allow zero to precede the
388 2007-06-30 Paul Thomas <pault@gcc.gnu.org>
391 * simplify.c (gfc_simplify_repeat): Add handling of character
392 literal for first argument.
394 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
396 * resolve.c (resolve_operator): Added check whether a user
397 defined operator is available.
399 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
401 * openmp.c (resolve_omp_clauses): Adjust error message to
402 better reflect the actual requirement.
404 2007-06-29 Tobias Burnus <burnus@net-b.de>
407 * io.c (format_lex): Fix FMT_ZERO.
408 (check_format,check_format_string,gfc_match_format,
409 check_io_constraints) Additional checking for READ.
411 2007-06-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
414 * lang.opt (static-libgfortran): New option.
415 * gfortranspec.c (ADD_ARG_LIBGFORTRAN): New macro.
416 (Option): Add OPTION_static and OPTION_static_libgfortran.
417 (lookup_option): Handle the new -static-libgfortran option.
418 (lang_specific_driver): Check whether -static is passed.
419 Handle the new -static-libgfortran option.
420 * options.c (gfc_handle_option): If -static-libgfortran is
421 passed and isn't supported on this configuration, error out.
423 2007-06-27 Daniel Franke <franke.daniel@gmail.com>
426 * openmp.c (resolve_omp_clauses): Emit error on allocatable
427 components in COPYIN, COPYPRIVATE, FIRSTPRIVATE and LASTPRIVATE
430 2007-06-25 Paul Thomas <pault@gcc.gnu.org>
433 * resolve.c (check_host_association): Return if the old symbol
434 is use associated. Introduce retval to reduce the number of
435 evaluations of the first-order return value.
438 * match.c (gfc_match_call): If a host associated symbol is not
439 a subroutine, build a new symtree/symbol in the current name
442 2007-06-24 Tobias Burnus <burnus@net-de>
445 * interface.c (gfc_compare_derived_types): Add access check.
446 * symbol.c (gfc_find_component): Ditto.
447 (gfc_set_component_attr,gfc_get_component_attr) Copy access state.
448 * dump-parse-tree.c (gfc_show_components): Dump access state.
449 * gfortran.h (struct gfc_component): Add gfc_access.
450 * module.c (mio_component): Add access state.
451 * (gfc_match_structure_constructor): Check for private access state.
453 2007-06-24 Paul Thomas <pault@gcc.gnu.org>
457 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Calculate
458 the offset between the loop counter and the position as
459 defined. Add the offset within the loop so that the mask acts
460 correctly. Do not advance the location on the basis that it
463 2007-06-22 Daniel Franke <franke.daniel@gmail.com>
466 * symbol.c (gfc_copy_attr): Emit errors for duplicate
467 EXTERNAL/INTRINSIC statements.
469 2007-06-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
472 * expr.c (gfc_check_assign): If the rvalue expression type is NULL_EXPR,
473 check to see if the lvalue has attribute pointer and data.
475 2007-06-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
478 * resolve.c (gfc_resolve_iterator_expr): Add check for REAL using
479 gfc_notify_standard. (gfc_resolve_iterator): Remove check.
480 (resolve_branch): Change "Obsolete" to "Deleted feature".
481 * io.c (resolve_tag): Ditto.
482 * match.c (gfc_match_pause, gfc_match_assign, gfc_match_goto): Ditto.
484 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
487 * match.c (gfc_match_common): If the symbol value expression type is
488 NULL_EXPR, don't error if previously initialized.
490 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
493 * decl.c (get_proc_name) Check symbol for generic interface
496 2007-06-20 Andrew Pinski <andrew_pinski@playstation.sony.com>
497 Richard Guenther <rguenther@suse.de>
500 * trans.c (gfc_build_addr_expr): Use the correct types.
502 2007-06-19 Paul Thomas <pault@gcc.gnu.org>
506 * resolve.c (resolve_code): Use gfc_impure_variable as a
507 condition for rejecting derived types with pointers, in pure
509 (gfc_impure_variable): Add test for dummy arguments of pure
510 procedures; any for functions and INTENT_IN for subroutines.
513 * data.c (gfc_assign_data_value): Change the ICE on an array
514 reference initializer not being an array into an error and
515 clear init to prevent a repetition of the error.
517 2007-06-17 Janne Blomqvist <jb@gcc.gnu.org>
519 * gfortran.texi: Add documentation for GFORTRAN_UNBUFFERED_n
520 environment variables. Fix documentation for
521 GFORTRAN_UNBUFFERED_ALL environment variable.
523 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
525 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
526 POINTER_PLUS_EXPR instead of PLUS_EXPR for pointer addition.
527 * trans-expr.c (gfc_trans_string_copy): Create
528 POINTER_PLUS_EXPR instead of a PLUS_EXPR
531 2007-06-14 Paul Thomas <pault@gcc.gnu.org>
534 * trans-common.c (build_common_decl): If resizing of common
535 decl is needed, update the TREE_TYPE.
537 2007-06-13 Tobias Burnus <burnus@net-b.de>
540 * interface.c (has_vector_section): New.
541 (compare_actual_formal): Check for array sections with vector subscript.
543 2007-06-12 Dirk Mueller <dmueller@suse.de>
545 * trans-stmt.c (gfc_trans_call): fix gcc_assert to
546 a comparison, not an assignment.
548 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
550 * trans-common.c (create_common): Initialize 'field_init'.
552 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
556 * trans-common.c (get_init_field): New function.
557 (create_common): Call get_init_field for overlapping
558 initializers in equivalence blocks.
559 * resolve.c (resolve_equivalence_derived, resolve_equivalence):
560 Remove constraints on initializers in equivalence blocks.
561 * target-memory.c (expr_to_char, gfc_merge_initializers):
563 (encode_derived): Add the bit offset to the byte offset to get
564 the total offset to the field.
565 * target-memory.h : Add prototype for gfc_merge_initializers.
567 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
569 * trans-types.c (gfc_signed_type): Remove.
570 * trans-types.h (gfc_signed_type): Remove.
571 * f95-lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
573 2007-06-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
575 * trans-intrinsic.c: Revert Lee's 2007-06-04 patch.
577 2007-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
578 Jerry DeLisle <jvdelisle@gcc.gnu.org>
581 * match.c (gfc_match_special_char): New function. Match special char.
583 * match.h: Add prototype.
584 * io.c (next_char): Use it.
585 * primary.c (next_string_char): Ditto.
587 2007-06-06 Steven G. Kargl <kargl@gcc.gnu.org>
589 * decl.c: Miscellaneous whitespace fixes.
591 * gfortran.h: Likewise.
592 * interface.c : Likewise.
596 * module.c: Likewise.
598 * resolve.c: Likewise.
599 * symbol.c: Likewise.
600 * trans-array.c: Likewise.
601 * trans-common.c: Likewise.
602 * trans-decl.c: Likewise.
603 * trans-intrinsic.c: Likewise.
604 * trans-io.c: Likewise.
605 * trans-stmt.c: Likewise.
606 * trans-types.c: Likewise.
608 2007-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
611 * parse.c (decode_statement): Don't call gfc_undo_symbols on MATCH_ERROR
612 for ST_FUNCTION since it is called in reject_statement.
613 (parse_contained): If error, loop back after reject_statement and try
614 again. Free the namespace if an error occured.
616 2007-06-04 Lee Millward <lee.millward@codesourcery.com>
618 * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
619 to operate on a stack allocated array for the intrinsic arguments
620 instead of creating a TREE_LIST. Add two new parameters for the
621 array and the number of elements. Update all callers to allocate
622 an array of the correct length to pass in. Update comment.
623 (gfc_intrinsic_argument_list_length): New function.
624 (gfc_conv_intrinsic_mnimax): Call it.
625 (gfc_conv_intrinsic_merge): Likewise.
626 (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
628 (gfc_conv_intrinsic_cmplx): Likewise.
629 (gfc_conv_intrinsic_ctime): Likewise.
630 (gfc_covn_intrinsic_fdate): Likewise.
631 (gfc_conv_intrinsic_ttynam): Likewise.
632 (gfc_conv_intrinsic_ishftc): Likewise.
633 (gfc_conv_intrinsic_index): Likewise.
634 (gfc_conv_intrinsic_scan): Likewise.
635 (gfc_conv_intrinsic_verify): Likewise.
636 (gfc_conv_intrinsic_trim): Likewise.
637 (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
638 (gfc_conv_intrinsic_exponent): Likewise.
639 (gfc_conv_intrinsic_bound): Likewise.
640 (gfc_conv_intrinsic_abs): Likewise.
641 (gfc_conv_intrinsic_mod): Likewise.
642 (gfc_conv_intrinsic_sign): Likewise.
643 (gfc_conv_intrinsic_len): Likewise.
644 (gfc_conv_intrinsic_adjust): Likewise.
645 (gfc_conv_intrinsic_si_kind): Likewise.
647 2007-06-04 Steve Ellcey <sje@cup.hp.com>
649 * trans-array.c (gfc_conv_array_parameter): Initialize tmp.
651 2007-05-31 Richard Guenther <rguenther@suse.de>
653 * trans-expr.c (gfc_conv_expr_op): Use zero constant
654 that matches the lse type.
655 (gfc_trans_string_copy): Use sizetype zero constant.
656 * intrinsic.c (add_functions): The sizeof intrinsic has
658 * trans-types.c (gfc_get_dtype): Convert size to index
659 type before shifting.
660 * trans-array.c (gfc_trans_array_constructor_value): Use
661 index type for offset computation.
662 * trans-intrinsic.c (gfc_conv_associated): Use correct type
665 2007-05-31 Paul Thomas <pault@gcc.gnu.org>
668 * trans-array.c (gfc_trans_array_constructor): Treat the case
669 where the ss expression charlen is missing.
671 22007-05-31 Paul Thomas <pault@gcc.gnu.org>
674 * module.c (mio_symtree_ref): If an equivalence group member
675 is not used, give it a hidden symbol and set the pointer_info.
676 (load_equiv): Only free the equivalence if none of the members
679 2007-05-29 Daniel Franke <franke.daniel@gmail.com>
681 * gfortran.h: Renamed 'enum gfc_generic_isym_id' to 'enum gfc_isym_id',
682 added missing GFC_ISYM_* enumerators, ordered alphabetically.
683 (struct gfc_intrinsic_sym): Renamed 'generic_id' to 'id'.
684 (gfc_find_subroutine): New prototype.
685 * intrinsic.c (add_sym, add_sym_*): Added argument 'id' and changed all callers.
686 (find_subroutine): Renamed to 'gfc_find_subroutine', removed static.
687 * dependency.c: Changed usage of isym->generic_id to isym->id.
688 * openmp.c: Likewise.
689 * resolve.c: Likewise.
690 * trans-array.c: Likewise.
691 * trans-expr.c: Likewise.
692 * trans-intrinsic.c: Likewise.
693 * trans-openmp.c: Likewise.
695 2007-05-28 Tobias Schlüter <tobi@gcc.gnu.org>
697 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIZEOF.
698 * intrinsic.c (add_functions): Add stuff for SIZEOF intrinsic.
699 * intrinsic.h (gfc_check_sizeof): Add prototype of ...
700 * check.c (gfc_check_sizeof): .. new function.
701 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): New function.
702 (gfc_conv_intrinsic_strcmp): Whitespace fix.
703 (gfc_conv_intrinsic_array_transfer): Remove double initialization,
704 use fold_build. where appropriate.
705 (gfc_conv_intrinsic_function): Add case for SIZEOF.
706 * intrinsic.texi: Add documentation for SIZEOF.
708 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
710 * trans-array.c (gfc_conv_expr_descriptor): Edit comment.
712 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
715 * target-memory.c (gfc_target_expr_size): Add handling
716 for size of BT_HOLLERITH variables.
717 * check.c (gfc_check_transfer): Reject BT_HOLLERITH
718 variables in MOLD argument of TRANSFER.
720 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
722 * gfortran.h (gfc_expr): Remove from_H, add "representation"
724 * primary.c (match_hollerith_constant): Store the representation
725 of the Hollerith in representation, not in value.character.
726 * arith.c: Add dependency on target-memory.h.
727 (eval_intrinsic): Remove check for from_H.
728 (hollerith2representation): New function.
729 (gfc_hollerith2int): Determine value of the new constant.
730 (gfc_hollerith2real): Likewise.
731 (gfc_hollerith2complex): Likewise.
732 (gfc_hollerith2logical): Likewise.
733 (gfc_hollerith2character): Point both representation.string and
734 value.character.string at the value string.
735 * data.c (create_character_initializer): For BT_HOLLERITH
736 rvalues, get the value from the representation rather than
738 * expr.c (free_expr0): Update handling of BT_HOLLERITH values
739 and values with representation.string.
740 (gfc_copy_expr): Likewise.
741 * intrinsic.c (do_simplify): Remove special treatement of
742 variables resulting from Hollerith constants.
743 * dump-parse-trees.c (gfc_show_expr): Update handling of
745 * trans-const.c (gfc_conv_constant_to_tree): Replace from_H
746 check with check for representation.string; get Hollerith
747 representation from representation.string, not value.character.
748 * trans-expr.c (is_zero_initializer_p): Replace from_H check
749 with check for representation.string.
750 * trans-stmt.c (gfc_trans_integer_select): Use
751 gfc_conv_mpz_to_tree for case values, so as to avoid picking up
752 the memory representation if the case is given by a transfer
754 * target-memory.c (gfc_target_encode_expr): Use the known memory
755 representation rather than the value, if it exists.
756 (gfc_target_interpret_expr): Store the memory representation of
757 the interpreted expression as well as its value.
758 (interpret_integer): Move to gfc_interpret_integer, make
760 (interpret_float): Move to gfc_interpret_float, make non-static.
761 (interpret_complex): Move to gfc_interpret_complex, make
763 (interpret_logical): Move to gfc_interpret_logical, make
765 (interpret_character): Move to gfc_interpret_character, make
767 (interpret_derived): Move to gfc_interpret_derived, make
769 * target-memory.h: Add prototypes for newly-exported
770 gfc_interpret_* functions.
772 2007-05-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
775 * parse.c (next_statement): Warn for truncated lines if source is free
778 2007-05-27 Paul Thomas <pault@gcc.gnu.org>
779 Tobias Burnus <burnus@net-b.de>
782 * symbol.c (gfc_check_function_type): Copy dimensions of
784 * resolve.c (resolve_contained_fntype): Improve symbol output in
787 2007-05-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
790 * io.c (check_format): Add warning for H specifier in format.
792 2007-05-26 Tobias Burnus <burnus@net-b.de>
794 * gfortran.texi: Document the GFORTRAN_ERROR_DUMPCORE and
795 GFORTRAN_ERROR_BACKTRACE environment variables.
797 2007-05-26 Paul Thomas <pault@gcc.gnu.org>
800 * trans.h : Add no_function_call bitfield to gfc_se structure.
801 Add stmtblock_t argument to prototype of get_array_ctor_strlen.
802 * trans-array.c (get_array_ctor_all_strlen): New function.
803 (get_array_ctor_strlen): Add new stmtblock_t argument and call
804 new function for character elements that are not constants,
806 (gfc_conv_array_parameter): Call get_array_ctor_strlen to get
808 * trans-intrinsic (gfc_conv_intrinsic_len): Add new argument
809 to call of get_array_ctor_strlen.
811 2007-05-25 Kazu Hirata <kazu@codesourcery.com>
813 * intrinsic.texi: Fix typos.
815 2007-05-25 Paul Thomas <pault@gcc.gnu.org>
818 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Change
819 order in logic under EXPR_FUNCTION to handle functions with
822 2007-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
825 * array.c (spec_dimen_size): Test for correct BT_INTEGER type.
827 2007-05-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
830 * trans-expr.c (gfc_trans_zero_assign): Convert the result of
831 TYPE_SIZE_UNIT into a signed type.
832 (gfc_trans_array_copy): Likewise.
833 (gfc_trans_array_constructor_copy): Likewise.
834 * trans-array.c (gfc_trans_create_temp_array): Likewise.
835 (gfc_grow_array): Likewise.
836 (gfc_array_init_size): Likewise.
837 (gfc_duplicate_allocatable): Likewise.
838 * trans-stmt.c (allocate_temp_for_forall_nest_1): Likewise.
840 2007-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
843 * resolve.c (resolve_function): Don't call resolve_global_procedure if
844 there is no name. Delete duplicated statement in ELSE clause.
846 2007-05-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
849 * trans-array.c (gfc_trans_array_bound_check): Take extra argument to
850 indicate whether we should check the upper bound in that dimension.
851 (gfc_conv_array_index_offset): Check only the lower bound of the
852 last dimension for assumed-size arrays.
853 (gfc_conv_array_ref): Likewise.
854 (gfc_conv_ss_startstride): Likewise.
856 2007-05-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
857 Daniel Franke <franke.daniel@gmail.com>
860 * resolve.c (resolve_actual_arglist): Resolve actual argument after
861 being identified as variable.
863 2007-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
866 * trans-stmt.c (gfc_trans_do): Fix the value of loop variable
869 2007-05-21 H.J. Lu <hongjiu.lu@intel.com>
871 * trans-stmt.c (gfc_trans_do): Fix a typo in comment.
873 2007-05-21 Paul Thomas <pault@gcc.gnu.org>
877 * trans-array.c (gfc_conv_expr_descriptor): Obtain the stored
878 offset for non-descriptor, source arrays and correct for stride
879 not equal to one before writing to field of output descriptor.
881 2007-05-20 Daniel Franke <franke.daniel@gmail.com>
884 * check.c (check_rest): Improved argument conformance check and
885 fixed error message generation.
887 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
890 * Make-lang.in: Remove use of -Wno-error for expr.o, resolve.o,
891 simplify.o and trans-common.o.
893 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
896 * trans-array.c (gfc_trans_auto_array_allocation): Avoid
897 multiplication of mismatched types.
899 2007-05-18 Daniel Franke <franke.daniel@gmail.com>
902 * symbol.c (gfc_add_flavor): Add the NAME to error message if
905 2007-05-15 Daniel Franke <franke.daniel@gmail.com>
910 * intrinsic.c (check_specific): Check elemental intrinsics for
912 (add_functions): Fixed dummy argument names of BESJN and BESYN.
913 Fixed elemental status of MCLOCK and MCLOCK8.
914 * check.c (check_rest): Added check for array conformance.
915 (gfc_check_merge): Removed check for array conformance.
916 (gfc_check_besn): Removed check for scalarity.
917 * intrinsic.texi (CSHIFT, EOSHIFT): Fixed typos.
918 (BESJN, BESYN): Clarified documentation.
920 2007-05-17 Tobias Burnus <burnus@net-b.de>
922 * gfortran.texi (GFORTRAN_CONVERT_UNIT): Improve documentation.
924 2007-05-16 Brooks Moses <brooks.moses@codesourcery.com>
931 * target-memory.c: New file.
932 * target-memory.h: New file.
933 * simplify.c: Add #include "target-memory.h".
934 (gfc_simplify_transfer): Implement constant-
935 folding for TRANSFER intrinsic.
936 * Make-lang.in: Add dependencies on new target-memory.* files.
938 2007-05-15 Paul Brook <paul@codesourcery.com>
940 * trans-types.c (gfc_type_for_size): Handle signed TImode.
942 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
945 * trans.h (gfor_fndecl_internal_malloc, gfor_fndecl_internal_malloc64,
946 gfor_fndecl_internal_free): Remove prototypes.
947 (gfor_fndecl_os_error, gfc_call_free, gfc_call_malloc): Add prototypes.
948 * trans.c (gfc_call_malloc, gfc_call_free): New functions.
949 * f95-lang.c (gfc_init_builtin_functions): Add __builtin_free
950 and __builtin_malloc builtins.
951 * trans-decl.c (gfor_fndecl_internal_malloc,
952 gfor_fndecl_internal_malloc64, gfor_fndecl_internal_free): Remove.
953 (gfor_fndecl_os_error): Add.
954 (gfc_build_builtin_function_decls): Don't create internal_malloc,
955 internal_malloc64 and internal_free library function declaration.
956 Create os_error library call function declaration.
957 * trans-array.c (gfc_trans_allocate_array_storage,
958 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
959 gfc_conv_array_parameter, gfc_duplicate_allocatable): Use
960 gfc_call_malloc and gfc_call_free instead of building calls to
961 internal_malloc and internal_free.
962 * trans-expr.c (gfc_conv_string_tmp): Likewise.
963 * trans-stmt.c (gfc_do_allocate, gfc_trans_assign_need_temp,
964 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
965 gfc_trans_where_2: Likewise.
966 * trans-intrinsic.c (gfc_conv_intrinsic_ctime,
967 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
968 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_trim): Likewise.
970 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
973 * trans-expr.c (gfc_conv_substring): Evaluate substring bounds
976 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
978 * f95-lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
979 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use unsigned_type_for
980 instead of gfc_unsigned_type.
981 * trans-stmt.c (gfc_trans_do): Use unsigned_type_for instead of
983 * trans-types.c (gfc_unsigned_type): Remove.
984 * trans-types.h (gfc_unsigned_type): Remove.
986 2007-05-12 Paul Thomas <pault@gcc.gnu.org>
989 * resolve.c (check_host_association): New function that detects
990 incorrect host association and corrects it.
991 (gfc_resolve_expr): Call the new function for variables and
993 * match.h : Remove prototype for gfc_match_rvalue.
994 * gfortran.h : Add prototype for gfc_match_rvalue.
996 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
999 * trans-expr.c (gfc_conv_function_call): Reduce indirection for
1000 direct assignments of recursive array valued functions.
1001 * primary.c (gfc_match_rvalue): Correct error for recursive
1002 function calls such that directly recursive calls of scalar
1003 function without an explicit result are disallowed.
1005 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
1008 * resolve.c (resolve_fl_namelist): It is not an error if the
1009 namelist element is the result variable of the enclosing
1010 function. Search for the symbol in current and all parent
1011 namespaces for a potential conflict.
1012 * symbol.c (check_conflict): Remove the conflict between
1013 'in_namelist' and 'FL_PROCEDURE' because the symbol info
1014 is not available to exclude function result variables.
1015 * trans-io.c (nml_get_addr_expr): Use the fake result decl
1016 if the symbol is an implicit result variable.
1018 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
1021 * decl.c (get_proc_name): If an entry has already been declared
1022 as a module procedure, pick up the symbol and the symtree and
1023 use them for the entry.
1025 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
1028 * resolve.c (resolve_symbol): Remove the flagging mechanism from the
1029 formal namespace resolution and instead check that the formal
1030 namespace is not the current namespace.
1032 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
1035 * trans-array.c (gfc_conv_array_parameter): Convert full array
1036 references to the result of the procedure enclusing the call.
1038 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
1042 * decl.c (add_init_expr_to_sym): Expand a scalar initializer
1043 for a parameter array into an array expression with the right
1045 * array.c (spec_dimen_size): Remove static attribute.
1046 * gfortran.h : Prototype for spec_dimen_size.
1048 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1051 * trans-stmt.c (gfc_trans_do): Handle large loop counts.
1053 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1056 * simplify.c (gfc_simplify_new_line): NEW_LINE can be simplified
1057 even for non constant arguments.
1059 2007-05-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1060 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1063 * gfortran.h: Add runtime error codes from libgfortran.h. Define
1065 * trans.c (gfc_trans_runtime_check): Update the format of runtime error
1066 messages to match library runtime errors. Use call to new library
1067 function runtime_error_at().
1068 * trans.h: Add prototype for new function gfc_trans_io_runtime_check.
1069 Add declaration for library functions runtime_error_at and
1071 * trans_io.c (gfc_trans_io_runtime_check): New function.
1072 (set_parameter_value): Add error checking for UNIT numbers.
1073 (set_parameter_ref): Initialize the users variable to zero.
1074 (gfc_trans_open): Move setting of unit number to after setting of common
1075 flags so that runtime error trapping can be detected.
1076 (gfc_trans_close): Likewise. (build_filepos): Likewise.
1077 (gfc_trans_inquire): Likewise. (build_dt): Likewise.
1078 * trans-decl.c: Add declarations for runtime_error_at and
1079 generate_error. (gfc_build_builtin_function_decls): Build function
1080 declarations for runtime_error_at and generate_error.
1082 2007-05-06 Paul Thomas <pault@gcc.gnu.org>
1085 * resolve.c (resolve_fl_procedure): Resolve constant character
1088 2007-05-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1091 * decl.c (match_char_spec): Add check for invalid character lengths.
1093 2007-05-04 Brooks Moses <brooks.moses@codesourcery.com>
1095 * intrinsic.texi (CMPLX): Document result kind.
1096 (COMPLEX): Add documentation.
1098 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
1101 * intrinsic.c (add_functions): Replaced calls to gfc_check_g77_math1
1102 by gfc_check_fn_r to avoid checks for scalarity.
1103 * check.c (gfc_check_besn): Removed check for scalarity.
1104 (gfc_check_g77_math1): Removed.
1105 * intrinsic.h (gfc_check_g77_math1): Removed.
1107 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
1109 * check.c (gfc_check_fseek_sub): Fixed typo.
1111 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
1114 * intrinsic.c (add_subroutines): Added FSEEK.
1115 * intrinsic.h (gfc_resolve_fseek_sub, gfc_check_fseek_sub): New.
1116 * iresolve.c (gfc_resolve_fseek_sub): New.
1117 * check.c (gfc_check_fseek_sub): New.
1118 * intrinsic.texi (FSEEK): Updated.
1120 2007-05-04 Tobias Burnus <burnus@net-b.de>
1123 * expr.c (gfc_check_pointer_assign): Check for NULL pointer.
1125 2007-05-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1128 * simplify.c (gfc_simplify_len): Only simplify integer lengths.
1130 2007-05-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1133 * simplify.c (gfc_simplify_repeat): Don't put function call with
1134 side effect in a gcc_assert().
1136 2007-05-04 Tobias Burnus <burnus@net-b.de>
1139 * interface.c (compare_actual_formal): Check character length.
1141 2007-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1144 * dependency.c (gfc_full_array_ref_p): If the reference is
1145 to a single element, check that the array has a single
1146 element and that the correct element is referenced.
1148 2007-05-01 Daniel Franke <franke.daniel@gmail.com>
1150 * intrinsic.c (add_functions): Fixed ELEMENTAL specifications.
1151 (add_subroutines): Replaced magic numbers in function calls by
1152 ELEMENTAL and NOT_ELEMENTAL respectively.
1153 * intrinsic.texi (MVBITS): Changed class to elemental subroutine.
1154 (RANDOM_NUMBER): Changed class to subroutine.
1155 (HUGE, TINY): Changed class to inquiry function.
1157 2007-04-30 Brooks Moses <brooks.moses@codesourcery.com>
1159 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_get_double_int.
1160 (gfc_conv_tree_to_mpz): New function.
1161 (gfc_conv_mpfr_to_tree): Use real_from_mpfr.
1162 (gfc_conv_tree_to_mpfr): New function.
1163 * trans-const.h: (gfc_conv_tree_to_mpz): New prototype.
1164 (gfc_conv_tree_to_mpfr): New prototype.
1166 2007-04-30 Daniel Franke <franke.daniel@gmail.com>
1168 * intrinsic.texi (IERRNO): Changed class to non-elemental function.
1169 (LOG10): Removed COMPLEX as accepted argument type.
1170 (NEW_LINE): Changed class from elemental to inquiry function.
1171 (SIGN): Removed requirement of scalar arguments.
1172 (SNGL): Changed class to elemental function.
1174 2007-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1177 * simplify.c (simplify_bound_dim): New function.
1178 (simplify_bound): Use the above. Perform simplification of LBOUND
1179 and UBOUND when DIM argument is not present.
1181 2007-04-29 Daniel Franke <franke.daniel@gmail.com>
1183 * gfortran.texi: Cleaned up keyword index.
1184 * invoke.texi: Likewise.
1185 * intrinsic.texi: Likewise.
1187 2007-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1190 * scanner.c (load_file): Discard the byte order mark if one is
1191 found on the first non-preprocessor line of a file.
1193 2007-04-29 Paul Thomas <pault@gcc.gnu.org>
1196 * trans-array.c (gfc_conv_resolve_dependencies): Create a temp
1197 whenever a dependency is found.
1199 2007-04-28 Tobias Schlüter <tobi@gcc.gnu.org>
1201 * options.c (gfc_handle_option): Ensure requested free form line
1202 length is not too small.
1204 2007-04-27 Brooks Moses <brooks.moses@codesourcery.com>
1206 * intrinsic.texi (Transfer): Improve documentation.
1208 2007-04-27 Brooks Moses <brooks.moses@codesourcery.com>
1210 * gfortran.texi (Option Index): Add @samp as needed.
1212 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
1214 * gfortran.texi: Added node and menu entry for an option index.
1215 * invoke.texi: Moved command line option related entries of the concept
1216 index to the option index.
1218 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
1220 * intrinsic.texi (AND, FPUT, FPUTC, MODULO, OR, SET_EXPONENT,
1221 XOR): Fixed examples.
1223 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
1225 * intrinsic.texi (PRODUCT, RESHAPE, SPACING, SPREAD, SUM,
1226 SYSTEM_CLOCK, TRANSFER, UNPACK): New.
1227 (DATE_AND_TIME, CPU_TIME, RRSPACING): Added cross references.
1229 2007-04-26 Daniel Franke <franke.daniel@gmail.com>
1231 * intrinsic.texi (NULL, PACK, PRESENT, REPEAT, SCAN, SHAPE,
1232 SIZE, TRANSPOSE, TRIM, VERIFY): New.
1233 (ADJUSTL, ADJUSTR, INDEX): Added cross references.
1234 (INT, INT2, INT8, LONG): Enabled section header.
1236 2007-04-25 Janne Blomqvist <jb@gcc.gnu.org>
1238 * module.c (module_char): Replace fgetc() with
1240 (write_char): Replace fputc() with putc().
1241 * scanner.c (load_line): Replace fgetc() with getc().
1242 (gfc_read_orig_filename): Likewise.
1244 2007-04-25 Tobias Burnus <burnus@net-b.de>
1247 * error.c (error_print): Fix %% support.
1248 * intrinsic.c (sort_actual): Improve error message.
1249 * resolve.c (resolve_actual_arglist): Allow %VAL for
1250 interfaces defined in the module declaration part.
1252 2007-04-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1255 * intrinsic.texi (GETLOG): Update documentation to reflect
1258 2007-04-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1261 * module.c (write_char): Add character to the MD5 buffer.
1262 (read_md5_from_module_file): New function.
1263 (gfc_dump_module): Compute MD5 for new module file. Call
1264 read_md5_from_module_file. Only overwrite old module file
1265 if the new MD5 is different.
1267 2007-04-23 Paul Thomas <pault@gcc.gnu.org>
1270 * resolve.c (resolve_symbol): Allow resolution of formal
1271 namespaces nested within formal namespaces coming from modules.
1274 * trans-expr.c (gfc_trans_assignment): Make the call to
1275 gfc_trans_zero_assign conditional on the lhs array ref being
1278 2007-04-23 Tobias Burnus <burnus@net-b.de>
1280 * primary.c (match_integer_constant): Mention -fno-range-check
1281 in the error message.
1283 2007-04-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1286 * scanner.c (load_line): Remove check for comment after ampersand and
1287 adjust tracking of ampersand.
1289 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
1291 * f95-lang.c (lang_tree_node): Use GENERIC_NEXT
1292 instead of checking GIMPLE_STMT_P in chain_next.
1294 2007-04-17 Tobias Schlüter <tobi@gcc.gnu.org>
1296 * trans-types.h (gfc_packed): New enum.
1297 (gfc_get_nodesc_array_type): Change prototype to use new enum.
1298 * trans-types.c (gfc_get_nodesc_array): Use gfc_packed for
1299 argument packed. Adapt all references to values accordingly.
1300 (gfc_sym_type): Use enum values in call to gfc_get_nodesc_array.
1301 (gfc_get_derived_type): Likewise.
1302 * trans-array.c (gfc_build_constant_array_constructor): Likewise.
1303 * trans-expr.c (gfc_get_interface_mapping_charlen): Changed packed
1304 argument to type gfc_packed.
1305 (gfc_add_interface_mapping): Use enum values in call to
1306 gfc_get_interface_mapping.
1307 * trans-decl.c (gfc_build_dummy_array_decl): Adapt to use enum
1308 values when determining packing.
1310 * trans-decl.c (gfc_finish_decl): Remove unused second argument
1311 'init'. Simplify code accordingly. Remove calls to
1312 gfc_fatal_error in favor of gcc_assert.
1313 (create_function_arglist): Remove second argument from calls to
1315 (gfc_trans_dummy_character): Likewise.
1317 * arith.h: Update copyright years.
1318 * dependency.h: Likewise.
1319 * gfortran.h: Likewise.
1320 * lang-specs.h: Likewise.
1321 * parse.h: Likewise.
1322 * symbol.c: Likewise.
1323 * trans.h: Likewise.
1324 * trans.c: Likewise.
1325 * trans-array.c: Likewise.
1326 * trans-common.c: Likewise.
1327 * trans-const.h: Likewise.
1328 * trans-const.c: Likewise.
1329 * trans-decl.c: Likewise.
1330 * trans-expr.c: Likewise.
1331 * trans-io.c: Likewise.
1332 * trans-openmp.c: Likewise.
1333 * trans-types.h: Likewise.
1334 * types.def: Likewise.
1336 2007-04-17 Tobias Schlüter <tobi@gcc.gnu.org>
1339 * decl.c (gfc_sym_mangled_identifier): Use capital letters in name
1341 (gfc_sym_mangled_function_id): Likewise.
1343 2007-04-15 Paul Thomas <pault@gcc.gnu.org>
1346 * primary.c (check_for_implicit_index): New function to check
1347 that a host associated variable is not an undeclared implied
1349 (gfc_match_rvalue, match_variable): Use it and reset the
1350 implied_index attribute.
1351 * gfortran.h : Add the implied_index field to symbol_attribute.
1352 * match.c (gfc_match_iterator): Mark the iterator variable
1353 with the new attribute.
1354 * decl.c (build_sym): Reset the new attribute.
1356 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
1358 * gfc-internals.texi: Fix typos.
1359 * simplify.c: Fix a comment typo.
1361 2007-04-14 Bernhard Fischer <aldot@gcc.gnu.org>
1363 * primary.c: Commentary typo fix; Add question about redundant (?)
1366 2007-04-14 Paul Thomas <pault@gcc.gnu.org>
1370 * expr.c (scalarize_intrinsic_call): New function to
1371 scalarize elemental intrinsic functions in initialization
1373 (check_init_expr): Detect elemental intrinsic functions
1374 in initalization expressions and call previous.
1376 2007-04-13 Tobias Burnus <burnus@net-b.de>
1379 * primary.c (match_variable): External functions
1382 2007-04-13 Paul Thomas <pault@gcc.gnu.org>
1385 * trans-types.c (copy_dt_decls_ifequal): Do not get pointer
1386 derived type components.
1388 2007-04-13 Tobias Schlüter <tobi@gcc.gnu.org>
1391 * resolve.c: Include obstack.h and bitmap.h. New variable
1393 (code_stack): Add tail and reachable_labels fields.
1394 (reachable_labels): New function.
1395 (resolve_branch): Rework to use new fields in code_stack.
1396 (resolve_code): Call reachable_labels.
1397 (resolve_codes): Allocate and free labels_obstack.
1399 2007-04-12 Tobias Schlüter <tobi@gcc.gnu.org>
1402 * decl.c (match_char_spec): Move check for negative CHARACTER
1404 * resolve.c (resolve_charlen): ... here.
1405 (resolve_types): Resolve CHARACTER lengths earlier.
1407 2007-04-12 Daniel Franke <franke.daniel@gmail.com>
1410 * intrinsic.texi (RANDOM_SEED, RANDOM_NUMBER): New.
1412 2007-04-12 Tobias Schlüter <tobi@gcc.gnu.org>
1415 * primary.c (gfc_variable_attr): Don't copy string length if it
1417 * resolve.c (resolve_code): Clarify error message.
1420 * decl.c (gfc_match_end): Also check for construct name in END
1421 FORALL and END WERE statements.
1422 * match.c (match_case_eos): Use uppercase for statement name in
1424 (match_elsewhere): Construct name may appear iff construct has a
1427 * trans-types.c: Update copyright years. Reformat long comment
1428 explaining array descriptor format. Remove obsolete mention of
1431 * arith.c (gfc_arith_uplus): Rename to ...
1432 (gfc_arith_identity): ... this.
1433 (gfc_parentheses): New function.
1434 (gfc_uplus): Adapt to renamed function.
1435 * arith.h (gfc_parentheses): Add prototype.
1436 * expr.c (gfc_copy_expr): Deal with INTRINSIC_PARENTHESES.
1437 (simplifiy_intrinsic_op): Treat INTRINSIC_UPLUS separately from
1438 INTRINSIC_PARENTHESES.
1440 2007-04-12 Tobias Burnus <burnus@net-b.de>
1443 * decl.c (match_attr_spec): Allow PRIVATE/PUBLIC
1444 attribute in type definitions.
1445 (gfc_match_private): Allow PRIVATE statement only
1446 in specification part of modules.
1447 (gfc_match_public): Ditto for PUBLIC.
1448 (gfc_match_derived_decl): Allow PRIVATE/PUBLIC attribute only in
1449 specificification part of modules.
1451 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
1454 * intrinsic.c (add_functions): Add ref. to gfc_resolve_achar.
1455 * intrinsic.h : Add prototype for gfc_resolve_achar.
1456 * iresolve.c (gfc_resolve_achar): New function.
1458 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
1461 * resolve.c (resolve_fl_variable): Set flag to 2 for automatic
1462 arrays. Make condition for automatic array error explicit.
1463 If a dummy, no error on an INTENT(OUT) derived type.
1465 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
1468 * expr.c (find_array_element): Correct arithmetic for rank > 1.
1470 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
1473 * check.c (numeric_check): If an expresson has not got a type,
1474 see if it is a symbol for which a default type applies.
1476 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
1479 * trans-decl.c (gfc_get_symbol_decl): Allow unreferenced use
1482 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
1485 * symbol.c (gfc_check_function_type): New function.
1486 * gfortran.h : Add prototype for previous.
1487 * parse.c (parse_progunit): Call it after parsing specification
1490 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
1493 * trans-expr.c (gfc_conv_function_call): Give a dummy
1494 procedure the correct type if it has alternate returns.
1496 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
1499 * decl.c (gfc_match_modproc): Go up to the top of the namespace
1500 tree to find the module namespace for gfc_get_symbol.
1502 2007-04-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1505 * fortran/gfortran.h (gfc_charlen_int_kind): New prototype.
1506 * fortran/trans-types.c (gfc_charlen_int_kind): New variable.
1507 (gfc_init_types): Define gfc_charlen_int_kind.
1508 * fortran/trans.h (gfor_fndecl_string_repeat): Remove prototype.
1509 * fortran/trans-decl.c (gfor_fndecl_string_repeat): Delete.
1510 (gfc_build_intrinsic_function_decls): Don't set
1511 gfor_fndecl_string_repeat.
1512 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_repeat): Rewrite
1513 so that we don't have to call a library function.
1514 * fortran/simplify.c (gfc_simplify_repeat): Perform the necessary
1515 checks on the NCOPIES argument, and work with arbitrary size
1518 2007-03-31 Tobias Burnus <burnus@net-b.de>
1520 * intrinsic.c (add_functions): Fix name of dummy argument
1521 for new_line and exit intrinsic.
1523 2007-03-31 Paul Thomas <pault@gcc.gnu.org>
1526 * gfortran.texi: Add a section for the %VAL, %REF and %LOC
1529 2007-03-30 Rafael Avila de Espindola <espindola@google.com>
1531 * trans-types.c (gfc_signed_or_unsigned_type): Remove.
1532 (gfc_unsigned_type): Use get_signed_or_unsigned_type instead of
1533 gfc_signed_or_unsigned_type.
1534 (gfc_signed_type): Ditto.
1535 * trans-types.h (gfc_signed_or_unsigned_type): Remove.
1536 * f95-lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
1538 2007-03-30 Tobias Schlüter <tobi@gcc.gnu.org>
1540 * symbol.c (gfc_find_gsymbol): Simplify, don't unconditionally
1541 descend into all branches.
1543 2007-03-29 Tobias Schlüter <tobi@gcc.gnu.org>
1545 * intrinsic.c (conv_name): Let gfc_get_string handle the format.
1546 (find_conv): Compare pointers instead of calling strcmp.
1547 (find_sym): Likewise, but ensure that the compared pointer is in
1548 the global string table.
1550 2007-03-28 Tobias Schlüter <tobi@gcc.gnu.org>
1552 * gfc-internals.texi: Fix output filename. Merge type index into
1553 concept index. Start documentation of gfc_code structure.
1555 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
1557 * gfc-internals.texi: New file,
1558 * Make-lang.in: Add rules to convert it to dvi, pdf, and info.
1560 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
1562 * error.c (show_locus): Remove always-false test.
1564 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
1566 * lang.opt: Minor edits to descriptions.
1568 2007-03-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1571 * fortran/interface.c (check_operator_interface): Implement
1572 the standard checks on user operators extending intrinsic operators.
1573 * fortran/resolve.c (resolve_operator): If the ranks of operators
1574 don't match, don't error out but try the user-defined ones first.
1576 2007-03-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1579 * expr.c (check_dimension): Fix logic of comparisons.
1581 2007-03-24 Paul Thomas <pault@gcc.gnu.org>
1584 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Return
1585 int result that is non-zero if the expression is the function
1586 result. Only the characteristics of the result expression
1587 can be used in a procedure interface, so simplify LEN in situ
1588 using its character length.
1592 * trans-expr.c (gfc_conv_function_call): Do not use
1593 gfc_conv_expr_reference for actual pointer function with formal
1594 target because a temporary is created that does not transfer
1595 the reference correctly. Do not indirect formal pointer
1596 functions since it is the function reference that is needed.
1598 2007-03-24 Brooks Moses <brooks.moses@codesourcery.com>
1600 * gfortran.h: Edit comments on GFC_STD_*.
1602 2007-03-23 Brooks Moses <brooks.moses@codesourcery.com>
1604 * invoke.texi: Misc. small typo fixes.
1605 (-Wcharacter-truncation): Add.
1606 (-Wnonstd-intrinsics): Correct spelling.
1608 (-fintrinsic-modules-path): Add.
1610 2007-03-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1613 * arith.c (complex_pow): Rewrite to handle large power.
1614 (gfc_arith_power): Handle large power in the real and integer
1617 2007-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1620 * trans-const.c (gfc_conv_mpz_to_tree): Allow integer constants
1621 larger than twice the width of a HOST_WIDE_INT.
1623 2006-03-22 Paul Thomas <pault@gcc.gnu.org>
1626 * trans-intrinsic.c (gfc_size_in_bytes): Remove function.
1627 (gfc_conv_intrinsic_array_transfer): Remove calls to previous.
1628 Explicitly extract TREE_TYPEs for source and mold. Use these
1629 to calculate length of source and mold, except for characters,
1630 where the se string_length is used. For mold, the TREE_TYPE is
1631 recalculated using gfc_get_character_type_len so that the
1632 result is correctly cast for character literals and substrings.
1633 Do not use gfc_typenode_for_spec for the final cast.
1635 2007-03-22 Tobias Schlüter <tobi@gcc.gnu.org>
1638 * decl.c (gfc_match_derived_decl): Reliably reject
1639 'doubleprecision' and 'doublecomplex' as type names.
1641 2007-03-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1644 * trans-expr.c (gfc_trans_init_string_length): Length should
1646 (gfc_conv_function_call): Likewise.
1648 2007-03-18 Paul Thomas <pault@gcc.gnu.org>
1652 * symbo.c : Add gfc_derived_types.
1653 (gfc_free_dt_list): Free derived type list gfc_derived_types.
1654 (gfc_free_namespace): Remove call to gfc_free_dt_list.
1655 (gfc_symbol_done_2): Call gfc_free_dt_list.
1656 * gfortran.h : Declare gfc_derived_types to be external. Remove
1657 derived types field from gfc_namespace.
1658 * resolve.c (resolve_fl_derived): Refer to gfc_derived types
1659 rather than namespace derived_types.
1660 (resolve_fntype): Remove special treatment for module
1661 derived type functions.
1662 * trans-types.c (gfc_get_derived_type): Remove search for like
1663 derived types. Finish by copying back end declaration to like
1664 derived types in the derived type list gfc_derived_types.
1666 2007-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1669 * trans-expr.c (gfc_conv_powi): Make n argument unsigned hwi.
1670 (gfc_conv_cst_int_power): Handle integer exponent with care,
1671 since it might be too large for us.
1673 2007-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1676 * invoke.texi: Fix typo.
1678 2007-03-16 Tobias Burnus <burnus@net-b.de>
1680 * trans-decl.c (gfc_generate_function_code): Use all arguments of
1683 2007-03-15 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1685 * gfortran.h (gfc_option_t): Add flag_backtrace field.
1686 * lang.opt: Add -fbacktrace option.
1687 * invoke.texi: Document the new option.
1688 * trans-decl.c (gfc_build_builtin_function_decls): Add new
1689 option to the call to set_std.
1690 * options.c (gfc_init_options, gfc_handle_option): Handle the
1693 2007-03-15 Tobias Burnus <burnus@gcc.gnu.org>
1694 Paul Thomas <pault@gcc.gnu.org>
1697 * decl.c (gfc_match_import): If the parent of the current name-
1698 space is null, try looking for an imported symbol in the parent
1699 of the proc_name interface.
1700 * resolve.c (resolve_fl_variable): Do not check for blocking of
1701 host association by a same symbol, if the symbol is in an
1704 2007-03-15 Paul Thomas <pault@gcc.gnu.org>
1707 * decl.c (match_data_constant): Before going on to try to match
1708 a name, try to match a structure component.
1712 * resolve.c (resolve_actual_arglist): Do not reject a generic
1713 actual argument if it has a same name specific interface.
1716 * trans-array.c (parse_interface): Do not nullify allocatable
1717 components if the symbol has the saved attribute.
1719 2007-03-14 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1721 * trans-array.c (gfc_trans_auto_array_allocation): Replace
1722 fold(convert()) by fold_convert().
1723 (gfc_duplicate_allocatable): Likewise.
1724 * trans-intrinsic.c (gfc_conv_intrinsic_dot_product): Use
1725 build_int_cst instead of converting an integer_zero_node
1728 2007-03-14 Jakub Jelinek <jakub@redhat.com>
1730 * module.c (mio_typespec): Don't look at ts->cl if not BT_CHARACTER.
1732 2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
1737 * intrinsics.texi (CHDIR): Fix argument names, note
1738 that STATUS must be a default integer.
1739 (CTIME): Fix argument names, note that RESULT must
1740 be a default integer.
1741 (EXIT): Note that STATUS must be a default integer.
1743 2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
1746 * intrinsic.texi: General whitespace cleanup, remove
1747 comment about missing intrinsics.
1748 (menu): Add lines for new entries listed below.
1749 (ACOSH): Mention specific function DACOSH, correct
1750 description phrasing.
1751 (ASINH): Mention specific function DASINH, correct
1752 description phrasing.
1753 (ATANH): Mention specific function DATANH, correct
1754 description phrasing.
1755 (COS): Add index entry for CCOS.
1756 (CPU_TIME): Correct "REAL" to "REAL(*)".
1757 (EXP): Add index entry for CEXP.
1758 (INT): Correct argument name to "A".
1762 (MAX): Add index entries for specific variants.
1763 (MCLOCK): New entry.
1764 (MCLOCK8): New entry.
1765 (SECNDS): Adjust to a more standard form.
1766 (SECOND): New entry.
1767 (TIME): Add cross-reference to MCLOCK.
1768 (TIME8): Add cross-reference to MCLOCK8.
1770 2007-03-11 Paul Thomas <pault@gcc.gnu.org>
1773 * parse.c (parse_interface): Use the default types from the
1774 formal namespace if a function or its result do not have a type
1775 after parsing the specification statements.
1777 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
1779 * intrinsic.texi: (ICHAR) Improve internal I/O note.
1780 (ACHAR): Reference it.
1781 (CHAR): Reference it.
1782 (IACHAR): Reference it.
1784 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
1786 * intrinsic.texi: (LINK) Document function form.
1792 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
1794 * intrinsic.texi: minor typo fixes, removed prologue.
1795 (FSEEK): moved to correct place in alphabetical order.
1797 2007-03-08 Daniel Franke <franke.daniel@gmail.com>
1800 * check.c (gfc_check_alarm_sub): Added check for default integer
1801 kind of status argument.
1802 * iresolve.c (gfc_resolve_alarm_sub): Removed conversion of
1804 * intrinsic.texi (ALARM): Extended documentation.
1806 2007-03-08 Daniel Franke <franke.daniel@gmail.com>
1808 * intrinsic.texi (GERROR, ISATTY, TTYNAM): New.
1809 (ABORT, FLUSH, FNUM, IRAND, MALLOC, SIGNAL, SRAND): Fixed typo.
1810 * intrinsic.c (add_subroutines): Adjusted dummy argument names
1811 of GERROR and TTYNAM.
1813 2007-07-08 Tobias Burnus <burnus@net-b.de>
1815 * module.c (gfc_match_use): Support renaming of operators
1817 * gfortran.texi (Fortran 2003 Status): Document support of
1818 renaming of operators.
1820 2007-07-08 Tobias Burnus <burnus@net-b.de>
1823 * module.c (read_module): Always import module name as symbol.
1824 (gfc_match_use): Disallow module name in the only clause of
1827 2007-03-08 Paul Thomas <pault@gcc.gnu.org>
1830 * expr.c (find_array_section): Correct arithmetic for section
1833 2007-03-07 Brooks Moses <brooks.moses@codesourcery.com>
1835 * iresolve.c (gfc_resolve_ishftc): Correct s_kind value.
1837 2007-03-06 Daniel Franke <franke.daniel@gmail.com>
1839 PR documentation/30950
1840 * intrinsic.texi (AND, CPU_TIME): Fix dummy argument names.
1841 (FREE): Fix call syntax.
1843 2007-03-06 Brooks Moses <brooks.moses@codesourcery.com>
1845 * intrinsic.texi: Limit column widths to a total of .85.
1847 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
1849 * gfortran.texi (GFortran and G77): Rewrite completely.
1851 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
1853 * match.c (gfc_match_name): Expanded comment.
1855 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
1857 * gfortran.texi (Old-style kind specifications): Document
1858 special handling of old-style kind specifiers for COMPLEX.
1859 * decl.c (gfc_match_old_kind_spec): Document kind/bytesize
1860 assumptions for COMPLEX in comment.
1862 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
1865 * gfortranspec.c (lang_specific_driver): Update program
1866 name and copyright date.
1868 2007-03-03 Paul Thomas <pault@gcc.gnu.org>
1871 * check.c (dim_rank_check): The shape of subsections of
1872 assumed-size arrays is known.
1874 2007-03-02 Paul Thomas <pault@gcc.gnu.org>
1875 Tobias Burnus <burnus@net-b.de>
1878 * decl.c (gfc_match_entry): Remove erroneous entry result check.
1880 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1882 * Make-lang.in: Add install-pdf target as copied from
1883 automake v1.10 rules.
1885 2007-03-01 Tobias Burnus <burnus@net-b.de>
1888 * trans-intrinsic.c (gfc_conv_intrinsic_size): Compare pointers.
1890 2007-02-28 Tobias Burnus <burnus@net-b.de>
1891 Paul Thomas <pault@gcc.gnu.org>
1895 * resolve.c (resolve_actual_arglist): Allow by-value
1896 arguments and non-default-kind for %VAL().
1897 * trans-expr.c (conv_arglist_function): Allow
1898 non-default-kind for %VAL().
1900 2007-02-28 Tobias Burnus <burnus@net-b.de>
1903 * primary.c (next_string_char): Correct reading a character
1904 after the delimiter.
1905 (match_string_constant): Print warning message only once.
1907 2007-02-27 Richard Guenther <rguenther@suse.de>
1909 * trans-array.c (structure_alloc_comps): Use correct type
1910 for null pointer constant.
1912 2007-02-26 Brooks Moses <brooks.moses@codesourcery.com>
1914 * gfortran.texi: Standardize title page, remove version number
1915 from copyright page.
1917 2007-02-26 Thomas Koenig <Thomas.Koenig@online.de>
1918 Paul Thomas <pault@gcc.gnu.org>
1921 * trans-intrinsic.c (gfc_conv_intrinsic_size):
1922 If dim is an optional argument, check for its
1923 presence and call size0 or size1, respectively.
1925 2007-02-23 Paul Thomas <pault@gcc.gnu.org>
1928 * resolve.c (has_default_initializer): New function.
1929 (resolve_fl_variable): Call has_default_initializer to determine if
1930 the derived type has a default initializer to its ultimate
1934 2007-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1936 * options.c (set_default_std_flags): New function to consolidate
1938 (gfc_init_options): Use new function.
1939 (gfc_handle_option): Use new function.
1941 2007-02-22 Brooks Moses <brooks.moses@codesourcery.com>
1943 * gfortran.texi (Old-style kind specifications): Document
1944 special handling of old-style kind specifiers for COMPLEX.
1945 * decl.c (gfc_match_old_kind_spec): Documented kind/bytesize
1946 assumptions in comment.
1948 2007-02-21 Bernhard Fischer <aldot@gcc.gnu.org>
1950 * parse.c (next_free): Gooble spaces after OpenMP sentinel.
1952 2007-02-20 Thomas Koenig <Thomas.Koenig@online.de>
1955 * match.c (gfc_match_iterator): Remove conflict between
1956 loop variable and pointer.
1958 2007-02-20 Tobias Burnus <burnus@net-b.de>
1961 * symbol.c (gfc_add_volatile): Allow to set VOLATILE
1962 attribute for host-associated variables.
1963 * gfortran.h (symbol_attribute): Save namespace
1964 where VOLATILE has been set.
1965 * trans-decl.c (gfc_finish_var_decl): Move variable
1966 declaration to the top.
1968 2007-02-20 Tobias Burnus <burnus@net-b.de>
1971 * resolve.c (resolve_symbol): Add character dummy VALUE check.
1973 2007-02-19 Thomas Koenig <Thomas.Koenig@online.de>
1976 * fortran/iresolve.c (gfc_resolve_maxloc): Remove coercion of
1977 argument to default integer.
1978 (gfc_resolve_minloc): Likewise.
1980 2007-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1983 * options.c (gfc_init_options): Relax warning level for obsolescent.
1984 * match.c (match_arithmetic_if): Change to obsolescent from deleted.
1985 (gfc_match_if): Same.
1987 2007-02-18 Roger Sayle <roger@eyesopen.com>
1989 * trans-array.c (gfc_build_constant_array_constructor): When the
1990 shape of the constructor is known, use that to construct the
1992 (gfc_trans_constant_array_constructor): Initialize the "info"
1993 information for all of the dimensions of the array constructor.
1994 (constant_array_constructor_loop_size): New function.
1995 (gfc_trans_array_constructor): Use it to determine whether a
1996 loop is suitable for "constant array constructor" optimization.
1998 * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Use fold_build2
1999 instead of build2, to avoid conditions like "(a != b) != 0".
2001 2007-02-18 Roger Sayle <roger@eyesopen.com>
2002 Paul Thomas <pault@gcc.gnu.org>
2005 * match.c (match_forall_iterator): Use gfc_match_expr instead
2006 of gfc_match_variable to match the iterator variable. Return
2007 MATCH_NO if not a variable. Remove the reset of the symbol's
2010 2007-02-16 Tobias Burnus <burnus@net-b.de>
2013 * trans-decl.c (gfc_generate_function_code): Do not initialize
2014 pointers to derived components.
2016 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
2017 Brooks Moses <brooks.moses@codesourcery.com>
2018 Lee Millward <lee.millward@codesourcery.com>
2020 * trans-expr.c (gfc_conv_power_op): Use build_call_expr.
2021 (gfc_conv_string_tmp): Likewise.
2022 (gfc_conv_concat_op): Likewise.
2023 (gfc_build_compare_string): Likewise.
2024 (gfc_conv_function_call): Use build_call_list instead of build3.
2026 * trans-array.c (gfc_trans_allocate_array_storage): Use
2028 (gfc_grow_array): Likewise.
2029 (gfc_trans_array_ctor_element): Likewise.
2030 (gfc_trans_array_constructor_value): Likewise.
2031 (gfc_array_allocate): Likewise.
2032 (gfc_array_deallocate): Likewise.
2033 (gfc_trans_auto_array_allocation): Likewise.
2034 (gfc_trans_dummy_array_bias): Likewise.
2035 (gfc_conv_array_parameter): Likewise.
2036 (gfc_trans_dealloc_allocated): Likewise.
2037 (gfc_duplicate_allocatable): Likewise.
2039 * trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr.
2040 (gfc_trans_omp_flush): Likewise.
2042 * trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr.
2043 (gfc_trans_pause): Likewise.
2044 (gfc_trans_stop): Likewise.
2045 (gfc_trans_character_select): Likewise.
2046 (gfc_do_allocate): Likewise.
2047 (gfc_trans_assign_need_temp): Likewise.
2048 (gfc_trans_pointer_assign_need_temp): Likewise.
2049 (gfc_trans_forall_1): Likewise.
2050 (gfc_trans_where_2): Likewise.
2051 (gfc_trans_allocate): Likewise.
2052 (gfc_trans_deallocate): Likewise.
2054 * trans.c (gfc_trans_runtime_check): Use build_call_expr.
2056 * trans-io.c (gfc_trans_open): Use build_call_expr.
2057 (gfc_trans_close): Likewise.
2058 (build_filepos): Likewise.
2059 (gfc_trans_inquire): Likewise.
2060 (NML_FIRST_ARG): Delete.
2061 (NML_ADD_ARG): Delete.
2062 (transfer_namelist_element): Use build_call_expr.
2063 (build_dt): Likewise.
2064 (gfc_trans_dt_end): Likewise.
2065 (transfer_expr): Likewise.
2066 (transfer_array-desc): Likewise.
2068 * trans-decl.c (gfc_generate_function_code): Use build_call_expr.
2069 (gfc_generate_constructors): Likewise.
2071 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr.
2072 (gfc_conv_intrinsic_fdate): Likewise.
2073 (gfc_conv_intrinsic_ttynam): Likewise.
2074 (gfc_conv_intrinsic_array_transfer): Likewise.
2075 (gfc_conv_associated): Likewise.
2076 (gfc_conv_intrinsic_si_kind): Likewise.
2077 (gfc_conv_intrinsic_trim): Likewise.
2078 (gfc_conv_intrinsic_repeat: Likewise.
2079 (gfc_conv_intrinsic_iargc): Likewise.
2081 2007-02-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2084 * scanner.c (gfc_next_char_literal): Add check for end of file after
2085 call to advance_line.
2087 2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>
2090 * primary.c (match_logical_constant): Return MATCH_ERROR on invalid
2093 2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>
2095 * misc.c (gfc_typename): Fix potential buffer overflow.
2097 2007-02-13 Paul Thomas <pault@gcc.gnu.org>
2100 * module.c (read_module): Set pointer_info to referenced if the
2101 symbol has no namespace.
2103 2007-02-12 Nick Clifton <nickc@redhat.com>
2105 * lang.opt: Add Warning attribute to warning options.
2107 2007-02-11 Daniel Franke <franke.daniel@gmail.com>
2109 * intrinsic.texi (HOSTNM): Fix typographical error in syntax.
2110 (SLEEP): Added section and documentation.
2112 2007-02-11 Tobias Schlüter <tobi@gcc.gnu.org>
2115 * decl.c (add_init_expr_to_sym): Remove ENUM specific code.
2116 (variable_decl): Likewise. Rewrap comment.
2117 (match_attr_spec): Remove ENUM specific code.
2118 (gfc_match_enum): Fix typo in error message.
2119 (enumerator_decl): New function.
2120 (gfc_match_enumerator_def): Use enumerator_decl instead of
2121 variable_decl. Adapt code accordingly.
2123 2007-02-11 Paul Thomas <pault@gcc.gnu.org>
2126 * module.c (find_symtree_for_symbol): New function to return
2127 a symtree that is not a "unique symtree" given a symbol.
2128 (read_module): Do not automatically set pointer_info to
2129 referenced because this inhibits the generation of a unique
2130 symtree. Recycle the existing symtree if possible by calling
2131 find_symtree_for_symbol.
2134 * decl.c (add_init_expr_to_sym): Make new charlen for an array
2135 constructor initializer.
2137 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
2139 * f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address
2140 and __emutls_register_common.
2141 * openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls.
2142 * trans-common.c (build_common_decl): Don't check have_tls.
2143 * trans-decl.c (gfc_finish_var_decl): Likewise.
2144 * types.def (BT_WORD, BT_FN_PTR_PTR): New.
2145 (BT_FN_VOID_PTR_WORD_WORD_PTR): New.
2147 2007-02-09 Tobias Burnus <burnus@net-b.de>
2150 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc,
2151 gfc_conv_intrinsic_minmaxval): Use HUGE-1 for most negative integer.
2153 2007-02-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2156 * trans-array.c (gfc_trans_create_temp_array): Remove use of the
2157 function argument. Always generate code for negative extent.
2159 * trans-array.h (gfc_trans_create_temp_array): Change prototype.
2160 * trans-expr.c (gfc_conv_function_call): Remove use of last argument
2161 of gfc_trans_create_temp_array.
2162 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Likewise.
2163 * trans-stmt.c (gfc_conv_elemental_dependencies): Likewise.
2165 2007-02-08 Roger Sayle <roger@eyesopen.com>
2167 * trans-stmt.c (gfc_trans_forall_1): Optimize the cases where the
2168 mask expression is a compile-time constant (".true." or ".false.").
2170 2007-02-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2173 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Evaluate
2174 arguments only once. Generate check that NCOPIES argument is not
2177 2007-02-04 Steven G. Kargl <kargl@gcc.gnu.org>
2180 * fortran/invoke.texi: Update documentation.
2181 * fortran/options.c (gfc_post_options): Deal with tabs with -std=f2003
2184 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
2186 * trans-array.c: Fix a comment typo.
2188 2007-02-03 Paul Thomas <pault@gcc.gnu.org>
2191 * array.c (match_array_element_spec): If the length of an array is
2192 negative, adjust the upper limit to make it zero length.
2195 * resolve.c (pure_function, resolve_function): Initialize name to
2196 null to clear up build warnings.
2197 (resolve_fl_variable): Look at components explicitly to check for
2198 default initializer, rather than using gfc_default_initializer.
2200 2007-02-02 Steven G. Kargl <kargl@gcc.gnu.org>
2203 * resolve.c (resolve_generic_f): Check for non-NULL sym.
2205 2007-02-02 Roger Sayle <roger@eyesopen.com>
2207 * trans.c (gfc_build_array_ref): Use STRIP_TYPE_NOPS to eliminate
2208 NON_LVALUE_EXPR nodes and useless type conversions.
2210 2007-02-02 Paul Thomas <pault@gcc.gnu.org>
2214 * trans-expr.c (gfc_conv_aliased_arg): Remove static attribute
2215 from function and make sure that substring lengths are
2217 (is_aliased_array): Remove static attribute.
2218 * trans.c : Add prototypes for gfc_conv_aliased_arg and
2220 * trans-io.c (set_internal_unit): Add the post block to the
2221 arguments of the function. Use is_aliased_array to check if
2222 temporary is needed; if so call gfc_conv_aliased_arg.
2223 (build_dt): Pass the post block to set_internal_unit and
2224 add to the block after all io activiy is done.
2226 2007-02-01 Roger Sayle <roger@eyesopen.com>
2228 * trans-array.c (gfc_conv_expr_descriptor): We don't need to use
2229 a temporary array to pass a constant non-character array constructor.
2230 Generalize the descriptor generation code to handle scalarizer
2231 "info" without an array reference.
2233 2007-02-01 Roger Sayle <roger@eyesopen.com>
2235 * dependency.c (gfc_check_dependency) <EXPR_ARRAY>: Implement
2236 dependency checking for array constructors.
2238 2007-02-01 Roger Sayle <roger@eyesopen.com>
2240 * trans-stmt.c (compute_overall_iter_number): Document function
2241 arguments. Generalize "unconditional forall nest with constant
2242 bounds" optimization to eliminate unconditional inner loops with
2245 2007-01-31 Tobias Burnus <burnus@net-b.de>
2248 * interface.c (compare_actual_formal): Check conformance between
2249 actual and VOLATILE dummy arguments.
2250 * symbol.c (gfc_add_volatile): Allow setting of VOLATILE
2251 multiple times in different scopes.
2252 * decl.c (gfc_match_volatile): Search symbol in host association.
2254 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
2256 * simplify.c, trans-array.c: Fix comment typos.
2258 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2260 * invoke.texi (Code Gen Options): Fix abbreviation typo.
2261 * intrinsic.texi (ACCESS, LSHIFT, RSHIFT): Fix typos.
2263 2007-01-30 Steve Ellcey <sje@cup.hp.com>
2266 * trans-types.c (gfc_get_function_type): Do not add void_type_node
2268 * trans-decl.c (create_function_arglist): Change assert.
2270 2007-01-29 Paul Thomas <pault@gcc.gnu.org>
2273 * module.c (read_module): If a symbol is excluded by an ONLY
2274 clause, check to see if there is a symtree already loaded. If
2275 so, attach the symtree to the pointer_info.
2277 2007-01-28 Thomas Koenig <Thomas.Koenig@online.de>
2280 * gfortran.h: Remove gfc_simplify_init_1.
2281 * arith.h: Remove third argument from gfc_compare_string.
2282 * arith.c (gfc_compare_expression): Remove third argument
2283 from call to gfc_compare_string.
2284 (gfc_compare_string): Remove third argument xcoll_table.
2285 Remove use of xcoll_table.
2286 * misc.c (gfc_init_1): Remove call to gfc_simplify_init_1.
2287 * simplify.c (ascii_table): Remove.
2288 (xascii_table): Likewise.
2289 (gfc_simplify_achar): ICE if extract_int fails. Remove use of
2290 ascii_table. Warn if -Wsurprising and value < 0 or > 127.
2291 (gfc_simplify_char): ICE if extract_int fails. Error if
2292 value < 0 or value > 255.
2293 (gfc_simplify_iachar): Remove use of xascii_table.
2294 Char values outside of 0..255 are an ICE.
2295 (gfc_simplify_lge): Remove use of xascii_table.
2296 (gfc_simplify_lgt): Likewise.
2297 (gfc_simplify_lle): Likewise.
2298 (gfc_simplify_llt): Likewise.
2299 (invert_table): Remove.
2300 (gfc_simplify_init_1): Remove.
2302 2007-01-27 Roger Sayle <roger@eyesopen.com>
2304 * trans-stmt.c (forall_info): Replace the next_nest and outer
2305 fields that previously implemented a doubly-linked list with a
2306 single prev_nest field (singly-linked list).
2307 (gfc_trans_nested_forall_loop): The nested_forall_info argument
2308 now denotes the innermost FORALL in the loop nest.
2309 (compute_overall_iter_number): Use prev_nest instead of next_nest.
2310 (gfc_trans_forall_1): Link/cons the new "info" to the head of the
2311 nested_forall_info linked list. Free the current "info" when done.
2313 2007-01-27 Paul Thomas <pault@gcc.gnu.org>
2316 * trans-expr.c (gfc_conv_operator_assign): New function.
2317 * trans.h : Add prototype for gfc_conv_operator_assign.
2318 * trans-stmt.c (gfc_trans_where_assign): Add a gfc_symbol for
2319 a potential operator assignment subroutine. If it is non-NULL
2320 call gfc_conv_operator_assign instead of the first assignment.
2321 ( gfc_trans_where_2): In the case of an operator assignment,
2322 extract the argument expressions from the code for the
2323 subroutine call and pass the symbol to gfc_trans_where_assign.
2324 resolve.c (resolve_where, gfc_resolve_where_code_in_forall,
2325 gfc_resolve_forall_body): Resolve the subroutine call for
2326 operator assignments.
2328 2007-01-26 Steven Bosscher <stevenb.gcc@gmail.com>
2329 Steven G. Kargl <kargl@gcc.gnu.org>
2332 * fortran/io.c (next_char): Deal with backslash escaped characters.
2333 Issue warnings in non -std=gnu cases.
2334 * fortran/primary.c (next_string_char): Issue warnings in non
2336 2007-01-26 Tobias Burnus <burnus@net-b.de>
2338 * lang-specs.h: Add support for .f03 and .F03 extensions.
2339 * gfortran.texi: Document .f03 extension.
2340 * options.c (form_from_filename): Recognize .f03.
2342 2007-01-25 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2345 * lang.opt (Wall): Remove RejectNegative.
2346 * options.c (gfc_handle_option): Wall can be disabled.
2347 (set_Wall): Add a parameter for disabling Wall.
2349 2007-01-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2352 * scanner.c (load_line): Remove check fot ctrl-z and don't gobble.
2354 2007-01-23 Paul Thomas <pault@gcc.gnu.org>
2357 * match.c (gfc_match_namelist): Add check for assumed size character
2358 in namelist and provide error if found.
2360 2007-01-21 Brooks Moses <brooks.moses@codesourcery.com>
2362 * intrinsic.texi (ACHAR): Added cross-references.
2363 (CHAR): Put cross-references in alphabetical order.
2364 (IACHAR): Added cross-references.
2365 (ICHAR): Added cross-references.
2367 2007-01-20 Brooks Moses <brooks.moses@codesourcery.com>
2369 * intrinsic.texi: Edited all "Syntax" examples to a consistent form.
2370 (MAXVAL): Corrected description of result characteristics.
2372 (UMASK): Added documentation.
2374 2007-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
2376 * openmp.c, matchexp.c, module.c, scanner.c, resolve.c, st.c,
2377 parse.c, primary.c, options.c, misc.c, simplify.c: Next installment
2378 in the massive whitespace patch.
2380 2007-01-20 Roger Sayle <roger@eyesopen.com>
2382 * module.c (mio_array_ref): The dimen_type fields of an array ref
2383 are an enumerated type and can't be read/written directly with a
2384 call to mio_integer. Instead loop over and cast each element.
2386 2007-01-20 Roger Sayle <roger@eyesopen.com>
2388 * dependency.c (gfc_full_array_ref_p): Check that ref->next is NULL,
2389 i.e. that the ARRAY_REF doesn't mention components.
2390 * trans-array.c (gfc_constant_array_constructor_p): Export external
2391 function renamed from constant_array_constructor_p.
2392 (gfc_build_constant_array_constructor): Export.
2393 (gfc_trans_array_constructor): Update call to the renamed function
2394 constant_array_constructor_p.
2395 * trans-array.h (gfc_constant_array_constructor_p): Prototype here.
2396 (gfc_build_constant_array_constructor): Likewise.
2397 * trans-expr.c (gfc_build_memcpy_call): New helper function split
2398 out from gfc_trans_array_copy.
2399 (gfc_trans_array_copy): Use gfc_build_memcpy_call.
2400 (gfc_trans_array_constructor_copy): New function to optimize
2401 assigning an entire array from a constant array constructor.
2402 (gfc_trans_assignment): Call gfc_trans_array_constructor_copy
2405 2007-01-20 Roger Sayle <roger@eyesopen.com>
2407 * trans-intrinsic.c (gfc_conv_intrinsic_sign): New branchless
2408 implementation for the SIGN intrinsic with integral operands.
2409 (gfc_conv_intrinsic_minmax): Fix whitespace.
2411 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2413 * gfortran.h (gfc_options_t): Add flag_allow_leading_underscore.
2414 * lang.opt: Add -fallow-leading-underscore.
2415 * match.c (gfc_match_name): Allow leading underscore in symbol
2416 name if -fallow-leading-underscore is used.
2417 * symbol.c (gfc_get_default_type): Add special case for symbol
2418 names beginning with an underscore.
2419 * trans-decl.c (gfc_get_extern_function_decl,
2420 gfc_build_intrinsic_function_decls): Add _gfortran prefix to
2421 library symbols selected_int_kind, selected_real_kind and
2423 * options.c (gfc_init_options, gfc_handle_option): Handle the
2424 new -fallow-leading-underscore option.
2426 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2429 * options.c (gfc_handle_module_path_options): Path used in -J
2430 option is now added to the module search path.
2432 2007-01-20 Richard Guenther <rguenther@suse.de>
2435 * f95-lang.c (gfc_init_builtin_functions): Provide cbrt and
2436 cexpi builtins if we have TARGET_C99_FUNCTIONS. Provide
2437 sincos builtins if the target has sincos.
2439 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
2441 * intrinsic.texi (MATMUL): Corrected a typo.
2442 (MAX): Separated @var arguments.
2443 (MIN): Separated @var arguments.
2445 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
2447 * intrinsic.texi: general whitespace cleanup.
2448 (menu): Added TIME8, removed UNMASK.
2449 (AINT): Clarified argument requirement.
2450 (ANINT): Clarified argument requirement.
2451 (CEILING): Clarified argument requirement.
2452 (CHAR): Clarified argument requirement.
2453 (CMPLX): Clarified argument requirement.
2454 (DCMPLX): Clarified argument requirement.
2455 (FGET): Line rewrapping.
2456 (FLOOR): Clarified argument requirement.
2457 (GMTIME): Added documentation.
2458 (IAND): Added cross-reference.
2459 (IBCLR): Added cross-reference.
2460 (IBSET): Added cross-reference.
2461 (IEOR): Added cross-reference.
2462 (INT): Collapsed examples, clarified argument requirement.
2463 (IOR): Added cross-references.
2464 (LEN_TRIM): Corrected result kind.
2465 (LINK): Added cross-reference.
2466 (LLT): Removed "documentation pending".
2467 (LOGICAL): Added documentation.
2468 (LSHIFT): Added documentation.
2469 (LTIME): Added documentation.
2470 (MATMUL): Added documentation.
2471 (MAX): Added documentation.
2472 (MAXLOC): Added documentation.
2473 (MAXVAL): Added documentation.
2474 (MERGE): Added documentation.
2475 (MIN): Added documentation.
2476 (MINLOC): Added documentation.
2477 (MINVAL): Added documentation.
2478 (MVBITS): Moved to correct place, added documentation.
2479 (NOT): Added documentation.
2480 (PERROR): Added documentation.
2481 (RAN): Moved to correct place, added documentation.
2482 (REAL): Clarified argument requirement.
2483 (RENAME): Added documentation.
2484 (RSHIFT): Clarified argument requirement.
2485 (SIGN): Corrected table specification.
2486 (SYMLNK): Added documentation.
2487 (SYSTEM): Added documentation.
2488 (TIME): Added documentation.
2489 (TIME8): Added section and documentation.
2490 (UNMASK): Removed erroneous section.
2492 2007-01-18 H.J. Lu <hongjiu.lu@intel.com>
2494 * trans-stmt.c (compute_overall_iter_number): Fix a typo.
2496 2007-01-18 Roger Sayle <roger@eyesopen.com>
2498 * trans-expr.c (copyable_array_p): Consider user derived types without
2499 allocatable components to be copyable.
2501 2007-01-18 Roger Sayle <roger@eyesopen.com>
2503 * trans-stmt.c (compute_overall_iter_number): Enhance to precompute
2504 the number of interations in unconditional FORALL nests with constant
2507 2007-01-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2508 Tobias Burnus <burnus@net-b.de>
2511 * gfortran.h (gfc_option_t): Add flag_dump_core.
2512 * lang.opt: Add -fdump-core option.
2513 * invoke.texi: Document the new options.
2514 * trans-decl.c (gfc_build_builtin_function_decls): Add new
2515 options to the call to set_std.
2516 * options.c (gfc_init_options, gfc_handle_option): Set the
2519 2007-01-17 Paul Thomas <pault@gcc.gnu.org>
2522 * module.c (load_generic_interfaces): Make the marking of the
2523 symbol as ambiguous conditional on the module names being
2525 (write_generic): Ensure that the generic interface has a
2526 non-NULL module field.
2528 2007-01-16 Roger Sayle <roger@eyesopen.com>
2531 * trans-stmt.c (forall_info): Remove pmask field.
2532 (gfc_trans_forall_loop): Remove NVAR argument, instead assume that
2533 NVAR covers all the interation variables in the current forall_info.
2534 Add an extra OUTER parameter, which specified the loop header in
2535 which to place mask index initializations.
2536 (gfc_trans_nested_forall_loop): Remove NEST_FLAG argument.
2537 Change the semantics of MASK_FLAG to only control the mask in the
2539 (compute_overall_iter_number): Optimize the trivial case of a
2540 top-level loop having a constant number of iterations. Update
2541 call to gfc_trans_nested_forall_loop. Calculate the number of
2542 times the inner loop will be executed, not to size of the
2544 (allocate_temp_for_forall_nest_1): Reuse SIZE as BYTESIZE when
2545 sizeof(type) == 1. Tidy up.
2546 (gfc_trans_assign_need_temp): Remove NEST_FLAG argument from calls
2547 to gfc_trans_nested_forall_loop.
2548 (gfc_trans_pointer_assign_need_temp): Likewise.
2549 (gfc_trans_forall_1): Remove unused BYTESIZE, TMPVAR, SIZEVAR and
2550 LENVAR local variables. Split mask allocation into a separate
2551 hunk/pass from mask population. Use allocate_temp_for_forall_nest
2552 to allocate the FORALL mask with the correct size. Update calls
2553 to gfc_trans_nested_forall_loop.
2554 (gfc_evaluate_where_mask): Update call to
2555 gfc_trans_nested_forall_loop.
2556 (gfc_trans_where_2): Likewise.
2558 2007-01-15 Paul Thomas <pault@gcc.gnu.org>
2561 * trans-stmt.c (gfc_trans_call): If it does not have one, get
2562 a backend_decl for an alternate return.
2565 * resolve.c (pure_function): Statement functions are pure. Note
2566 that this will have to recurse to comply fully with F95.
2569 * resolve.c (resolve_function): Only a reference to the final
2570 dimension of an assumed size array is an error in an inquiry
2574 * resolve.c (resolve_function): Make sure that the function
2575 expression has a type.
2577 2007-01-14 Paul Thomas <pault@gcc.gnu.org>
2580 * trans-decl.c (gfc_sym_mangled_function_id): Module, external
2581 symbols must not have the module name prepended.
2583 2007-01-11 Thomas Koenig <Thomas.Koenig@online.de>
2586 * iresolve.c (gfc_resolve_maxloc): If the rank
2587 of the return array is nonzero and we process an
2588 integer array smaller than default kind, coerce
2589 the array to default integer.
2590 * iresolve.c (gfc_resolve_minloc): Likewise.
2592 2007-01-11 Brooks Moses <brooks.moses@codesourcery.com>
2594 * simplify.c: Update copyright to 2007.
2597 2007-01-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2600 * scanner.c (gfc_release_include_path): Free gfc_option.module_dir
2603 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
2605 * simplify.c (gfc_simplify_ibclr): Fix POS comparison.
2606 (gfc_simplify_ibset): Same.
2608 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
2612 * simplify.c (convert_mpz_to_unsigned): New function.
2613 (convert_mpz_to_signed): New function, largely based on
2615 (twos_complement): Removed.
2616 (gfc_simplify_ibclr): Add conversions to and from an
2617 unsigned representation before bit-twiddling.
2618 (gfc_simplify_ibset): Same.
2619 (gfc_simplify_ishftc): Add checks for overly large
2620 constant arguments, only check the third argument if
2621 it's present, carry over high bits into the result as
2622 appropriate, and perform the final conversion back to
2623 a signed representation using the correct sign bit.
2624 (gfc_simplify_not): Removed unnecessary masking.
2626 2007-01-09 Paul Thomas <pault@gcc.gnu.org>
2629 * resolve.c (resolve_code): Use the code->expr character length
2630 directly to set length of llen.
2632 2007-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2635 * lang.opt: Add Wcharacter_truncation option.
2636 * options.c (gfc_init_options): Initialize
2637 gfc_option.warn_character_truncation to zero.
2638 (gfc_handle_option): Add case for OPT_Wcharacter_truncation.
2640 2007-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
2642 * interface.c, intrinsic.c, gfortranspec.c, io.c, f95-lang.c,
2643 iresolve.c, match.c: Update Copyright years. Whitespace.
2645 2007-01-08 Richard Guenther <rguenther@suse.de>
2647 * trans-io.c (transfer_array_desc): Use build_int_cst instead
2650 2007-01-08 Roger Sayle <roger@eyesopen.com>
2652 * trans-array.c (constant_array_constructor_p): New function to
2653 determine whether an array constructor consists only of constant
2654 elements, and if so return it's size.
2655 (gfc_build_constant_array_constructor): Construct a statically
2656 initialized gfortran array for a given EXPR_ARRAY.
2657 (gfc_trans_constant_array_constructor): Efficiently scalarize
2658 a constant array constructor.
2659 (gfc_trans_array_constructor): Tidy up use of CONST_STRING.
2660 Special case scalarization of constant array constructors, all of
2661 whose elements are specified, using constant_array_constructor_p
2662 and gfc_trans_constant_array_constructor.
2663 (gfc_conv_scalarized_array_ref): Check whetger info->offset is zero
2664 before adding it to index, to avoid creating a NON_LVALUE_EXPR.
2666 2007-01-08 Kazu Hirata <kazu@codesourcery.com>
2668 gfortran.texi: Fix typos.
2670 2007-01-07 Steven G. Kargl <kargl@gcc.gnu.org>
2672 * decl.c, dump-parse-tree.c, error.c, data.c, expr.c, dependency.c,
2673 convert.c: Update Copyright dates. Fix whitespace.
2675 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
2677 * data.c (gfc_assign_data_value): Fix whitespace.
2679 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
2681 * trans-array.c (gfc_trans_create_temp_array, gfc_array_init_size):
2682 Commentary typo fix.
2684 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
2687 * match.c (gfc_match_name): Print diagnostics for invalid
2690 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
2692 * array.c: Fix whitespace in comment table.
2694 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
2696 * array.c, bbt.c, check.c: Update copyright years. Whitespace.
2698 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
2700 * arith.c: Update copyright years. Whitespace.
2702 2007-01-05 Roger Sayle <roger@eyesopen.com>
2704 * trans-expr.c (gfc_trans_assignment_1): New subroutine to scalarize
2705 array assignments split out from gfc_trans_assignment.
2706 (gfc_trans_array_copy): New function to implement array to array
2707 copies via calls to __builtin_memcpy.
2708 (copyable_array_p): New helper function to identify an array of
2709 simple/POD types, that may be copied/assigned using memcpy.
2710 (gfc_trans_assignment): Use gfc_trans_array_copy to handle simple
2711 whole array assignments considered suitable by copyable_array_p.
2712 Invoke gfc_trans_assignment_1 to perform the fallback scalarization.
2714 2007-01-05 Roger Sayle <roger@eyesopen.com>
2716 * trans-array.c (gfc_trans_array_constructor_value): Make the
2717 static const "data" array as TREE_READONLY.
2718 * trans-stmt.c (gfc_trans_character_select): Likewise.
2720 2007-01-05 Roger Sayle <roger@eyesopen.com>
2722 * trans-array.c (gfc_conv_loop_setup): Test whether the loop
2723 stride is one, to avoid fold_build2 introducing a useless
2724 NON_LVALUE_EXPR node.
2726 2007-01-05 Tobias Burnus <burnus@net-b.de>
2728 * symbol.c (check_conflict): Fix error message.
2730 2007-01-05 Paul Thomas <pault@gcc.gnu.org>
2733 * decl.c (gfc_in_match_data, gfc_set_in_match_data): New
2734 functions to signal that a DATA statement is being matched.
2735 (gfc_match_data): Call gfc_set_in_match_data on entry and on
2737 * gfortran.h : Add prototypes for above.
2738 * expr.c (check_init_expr): Avoid check on parameter or
2739 variable if gfc_in_match_data is true.
2740 (gfc_match_init_expr): Do not call error on non-reduction of
2741 expression if gfc_in_match_data is true.
2745 * decl.c (gfc_set_constant_character_len): Add boolean arg to
2746 flag array constructor resolution. Warn if string is being
2747 truncated. Standard dependent error if string is padded. Set
2748 new arg to false for all three calls to
2749 gfc_set_constant_character_len.
2750 * match.h : Add boolean arg to prototype for
2751 gfc_set_constant_character_len.
2752 * gfortran.h : Add warn_character_truncation to gfc_options.
2753 * options.c (set_Wall): Set warn_character_truncation if -Wall
2755 * resolve.c (resolve_code): Warn if rhs string in character
2756 assignment has to be truncated.
2757 * array.c (gfc_resolve_character_array_constructor): Set new
2758 argument to true for call to gfc_set_constant_character_len.
2760 2007-01-05 Tobias Burnus <burnus@net-b.de>
2763 * interface.c (compare_parameter_intent): New function.
2764 (check_intents): Support pointer intents.
2765 * symbol.c (check_conflict): Support pointer intents,
2766 better conflict_std message.
2767 * expr.c (gfc_check_assign,gfc_check_pointer_assign):
2768 Support pointer intents.
2769 * resolve.c (resolve_deallocate_expr,resolve_allocate_expr):
2770 Support pointer intents.
2772 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
2775 * check.c (gfc_check_kill_sub): Add checks for non-scalar
2778 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
2780 * intrinsic.texi: Minor cleanup, reflowing overlong
2781 paragraphs, and correcting whitespace.
2783 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
2785 * intrinsic.texi (LBOUND): Add documentation.
2786 (LGE): Add documentation.
2787 (LGT): Add documentation.
2788 (LINK): Add documentation.
2789 (LLE): Add documentation.
2790 (LLT): Add documentation.
2791 (LNBLNK): Add documentation.
2792 (UBOUND): Add documentation.
2793 (UNLINK): Add documentation.
2795 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
2797 * intrinsic.texi (IAND): Clarify argument specifications.
2798 (IBCLR): Add documentation.
2799 (IBITS): Add documentation.
2800 (IBSET): Add documentation.
2801 (IEOR): Add documentation.
2802 (IERRNO): Add documentation.
2803 (INDEX): Add documentation.
2804 (IOR): Add documentation.
2805 (ISHFT): Add documentation.
2806 (ISHFTC): Add documentation.
2807 (KILL): Add documentation.
2808 (LEN_TRIM): Add documentation.
2810 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
2813 * interface.c (compare_actual_formal): check for
2814 alternate returns when iterating over non-present
2817 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
2819 * invoke.texi: Update manpage copyright to include 2007.
2821 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
2823 * gfortran.texi: Update copyright to include 2007.
2824 * intrinsic.texi: Update copyright to include 2007.
2825 * invoke.texi: Update copyright to include 2007.
2827 2007-01-02 Tobias Burnus <burnus@net-b.de>
2828 Jakub Jelinek <jakub@redhat.com>
2831 * scanner.c (open_included_file): Revert patch.
2832 (gfc_open_included_file): Support absolute pathnames.
2833 (gfc_open_intrinsic_module): Support absolute pathnames.
2835 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
2837 * gfortran.texi (GNU Fortran and GCC): Rewrite
2839 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
2841 * gfortran.texi (Introduction): Lower "Part I:
2842 Introduction" to a chapter, renumber Parts II and III to
2844 * intrinsic.texi (Introduction): Rename to "Introduction
2845 to Intrinsics" to avoid conflict with the new chapter.
2847 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
2849 * intrinsic.texi (Introduction): Rewrite first paragraph.
2851 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
2853 * invoke.texi (OpenMP): Added index entry.
2854 * gfortran.texi (title page): Removed erroneous '*'.
2856 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
2858 * gfortran.texi (GFORTRAN_DEFAULT_RECL): Added units
2860 (Extensions): Miscellaneous minor rewriting and copyediting.
2861 (BOZ-literal constants): Renamed from Hexadecimal constants.
2862 (Hollerith constants support): Added explanation and
2863 suggestions for standard-conforming modern equivalents.
2865 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
2867 * intrinsic.texi: Improvements to index entries; change
2868 @findex entries to @cindex entries.
2869 * invoke.texi: Standardize and improve index entries.
2870 * gfortran.texi: Fix @code in one index entry.
2872 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
2874 * invoke.texi: Change @code-type macros to appropriate
2875 variants (@command, @option, etc.)
2876 * gfortran.texi: Same.
2878 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
2880 * intrinsic.texi: Various minor cleanups.
2882 2007-01-02 Steven G. Kargl <kargls@comcast.net>
2884 * trans-intrinsic.c (gfc_conv_intrinsic_ibits): Fix call to
2887 2007-01-02 Tobias Burnus <burnus@net-b.de>
2890 * scanner.c (open_included_file): Support full-path filenames.
2892 2007-01-02 Paul Thomas <pault@gcc.gnu.org>
2895 * interface.c (check_sym_interfaces): Remove call to
2896 resolve_global_procedure.
2897 gfortran.h : Remove prototype for resolve_global_procedure.
2898 resolve.c (resolve_global_procedure): Add static attribute
2899 to function declaration.
2901 2007-01-01 Steven G. Kargl <kargls@comcast.net>
2903 * ChangeLog: Copy to ...
2904 * ChangeLog-2006: here.