1 2006-11-08 Tobias Burnus <burnus@net-b.de>
3 * gfortran.texi: Add volatile and internal-file
4 namelist to Fortran 2003 status.
5 * intrinsic.texi: Correct CHMOD entry.
7 2006-11-07 Paul Thomas <pault@gcc.gnu.org>
11 * decl.c (variable_decl): Add test for presence of proc_name.
12 * error.c (gfc_error_flag_test): New function.
13 * gfortran.h : Prototype for gfc_error_flag_test.
15 2006-11-07 Tobias Burnus <burnus@net-b.de>
18 * symbol.c (check_conflict, gfc_add_volatile): Add volatile support.
19 * decl.c (match_attr_spec, gfc_match_volatile): Add volatile support.
20 * gfortran.h (symbol_attribute): Add volatile_ to struct.
21 * resolve.c (was_declared): Add volatile support.
22 * trans-decl.c (gfc_finish_var_decl): Add volatile support.
23 * match.h: Declare gfc_match_volatile.
24 * parse.c (decode_statement): Recognize volatile.
25 * modules.c (ab_attribute, attr_bits, mio_symbol_attribute):
27 * dump-parse-tree.c (gfc_show_attr): Add volatile support.
29 2006-11-06 Tobias Burnus <burnus@net-b.de>
31 * decl.c (match_attr_spec, gfc_match_enum): Unify gfc_notify_std
32 message for GFC_STD_F2003.
33 * array.c (gfc_match_array_constructor): Unify gfc_notify_std
34 message for GFC_STD_F2003.
35 * io.c (check_io_constraints): Unify gfc_notify_std message for
37 * resolve.c (resolve_actual_arglist): Unify gfc_notify_std message
40 2006-11-06 Brooks Moses <brooks.moses@codesourcery.com>
42 * intrinsic.texi: Added documentation for FTELL, GETLOG, and
45 2006-11-06 Erik Edelmann <eedelman@gcc.gnu.org>
49 * expr.c (find_array_section): Support vector subscripts. Don't
50 add sizes for dimen_type == DIMEN_ELEMENT to the shape array.
52 2006-11-05 Bernhard Fischer <aldot@gcc.gnu.org>
55 * error.c (gfc_warning): If warnings_are_errors then treat
56 warnings as errors with respect to the exit code.
57 (gfc_notify_std): Ditto.
58 (gfc_warning_now): Ditto.
60 2006-11-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu,org>
61 Paul Thomas <pault@gcc.gnu.org>
64 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Use built_in fmod
65 for both MOD and MODULO, if it is available.
68 * trans-expr.c (gfc_conv_aliased_arg): For an INTENT(OUT), save
69 the declarations from the unused loops by merging the block
70 scope for each; this ensures that the temporary is declared.
72 2006-11-04 Brooks Moses <brooks.moses@codesourcery.com>
74 * error.c (show_locus): Add trailing colon in error messages.
75 (error_print): Avoid leading space in error lines.
77 2006-11-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
80 * expr.c (gfc_simplify_expr): Correct memory allocation.
82 2006-11-02 Brooks Moses <brooks.moses@codesourcery.com>
84 * error.c (show_locus): Remove "In file" from error messages.
86 2006-10-31 Geoffrey Keating <geoffk@apple.com>
88 * trans-decl.c (gfc_generate_constructors): Update for removal
89 of get_file_function_name.
91 2006-11-01 Bernhard Fischer <aldot@gcc.gnu.org>
94 * trans-common.c (gfc_trans_common): If the blank common is
95 in a procedure or program without a name then proc_name is null, so
96 use the locus of the common.
97 (gfc_sym_mangled_common_id): Fix whitespace.
98 * match.c (gfc_match_common): Emit warning about blank common in
101 2006-10-31 Francois-Xavier Coudert <coudert@clipper.ens.fr>
104 * decl.c (gfc_set_constant_character_len): NULL-terminate the
105 character constant string.
106 * data.c (create_character_intializer): Likewise.
107 * expr.c (gfc_simplify_expr): NULL-terminate the substring
109 * primary.c (match_hollerith_constant): NULL-terminate the
110 character constant string.
112 2006-10-31 Paul Thomas <pault@gcc.gnu.org>
115 * trans-intrinsic.c (gfc_conv_intrinsic_len): Rearrange to have
116 a specific case for EXPR_VARIABLE and, in default, build an ss
117 to call gfc_conv_expr_descriptor for array expressions..
120 * trans-expr.c (gfc_set_interface_mapping_bounds): In the case
121 that GFC_TYPE_ARRAY_LBOUND is not available, use descriptor
122 values for it and GFC_TYPE_ARRAY_UBOUND.
125 * trans-types.c (gfc_get_derived_type): If the derived type
126 namespace has neither a parent nor a proc_name, set NULL for
127 the search namespace.
129 2006-10-30 Tobias Burnus <burnus@net-b.de>
132 * io.c (check_io_constraints): Fix keyword string comparison.
134 2006-10-30 Andrew Pinski <pinskia@gmail.com>
137 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer):
138 Change over to create VIEW_CONVERT_EXPR instead of using an
139 ADDR_EXPR, a cast and then an indirect reference
141 2006-10-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
143 * trans-intrinsic.c (gfc_conv_intrinsic_loc): Make LOC return a
146 2006-10-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
149 * decl.c (get_proc_name): Bump current namespace refs count.
151 2006-10-29 Jakub Jelinek <jakub@redhat.com>
154 * trans-openmp.c (gfc_trans_omp_array_reduction): Set attr.flavor
155 of init_val_sym and outer_sym to FL_VARIABLE.
157 2006-10-29 Kazu Hirata <kazu@codesourcery.com>
159 * intrinsic.texi: Fix a typo.
161 2006-10-27 Steven G. Kargl <kargl@gcc.gnu.org>
163 * gfortran.h: Remove GFC_MPFR_TOO_OLD.
164 * arith.c (arctangent2): Remove function
165 (gfc_check_real_range): Remove subnormal kludge.
166 * arith.h: Remove arctangent2 prototype.
167 * simplify.c: (gfc_simplify_atan2): Remove use of arctangent2.
168 (gfc_simplify_exponent, gfc_simplify_log, gfc_simplify_nearest,
169 gfc_simplify_rrspacing, gfc_simplify_spacing): Remove mpfr kludges.
171 2006-10-28 Tobias Burnus <burnus@net-b.de>
174 * io.c (check_io_constraints): Allow namelists
175 for internal files for Fortran 2003.
177 2006-10-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
180 * decl.c (gfc_free_data_all): New function to free all data structures
181 after errors in DATA statements and declarations.
182 (top_var_list): Use new function.(top_val_list): Use new function.
183 (gfc_match_data_decl): Use new function.
184 * misc.c (gfc_typename): Fixed incorrect function name in error text.
186 2006-10-24 Erik Edelmann <eedelman@gcc.gnu.org>
189 * expr.c (simplify_parameter_variable): Keep rank of original
192 2006-10-23 Rafael Avila de Espindola <rafael.espindola@gmail.com>
194 * Make-lang.in (f951$(exeext)): Depend on and link with attribs.o.
195 * trans.h (builtin_function): Rename to gfc_builtin_function.
196 Change the signature.
197 * 95-lang.c (LANG_HOOKS_BUILTIN_FUNCTION): Define as
198 gfc_builtin_function.
199 (builtin_function): Rename to gfc_builtin_function. Move common
200 code to builtin_function.
201 (gfc_define_builtin): Replace calls to builtin_function with
204 2006-10-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
207 * lang.opt: Add -fexternal-blas and -fblas-matmul-limit options.
208 * options.c (gfc_init_options): Initialize new flags.
209 (gfc_handle_option): Handle new flags.
210 * gfortran.h (gfc_option): Add flag_external_blas and
211 blas_matmul_limit flags.
212 * trans-expr.c (gfc_conv_function_call): Use new argument
213 append_args, appending it at the end of the argument list
214 built for a function call.
215 * trans-stmt.c (gfc_trans_call): Use NULL_TREE for the new
216 append_args argument to gfc_trans_call.
217 * trans.h (gfc_conv_function_call): Update prototype.
218 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
219 prototypes for BLAS ?gemm routines.
220 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Generate the
221 extra arguments given to the library matmul function, and give
222 them to gfc_conv_function_call.
223 * invoke.texi: Add documentation for -fexternal-blas and
226 2006-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
228 * Make-lang.in (F95_LIBS): Delete.
229 * f951$(exeext): Use $(LIBS) instead of $(F95_LIBS).
230 * config-lang.in (need_gmp): Delete.
232 2006-10-19 Brooks Moses <bmoses@stanford.edu>
234 * invoke.texi: Fixed "denormal" typo.
236 2006-10-19 Paul Thomas <pault@gcc.gnu.org>
240 * gfortran.h : Add EXEC_INIT_ASSIGN.
241 * dump-parse-tree.c (gfc_show_code_node): The same.
242 * trans-openmp.c (gfc_trans_omp_array_reduction): Set new
243 argument for gfc_trans_assignment to false.
244 * trans-stmt.c (gfc_trans_forall_1): The same.
245 * trans-expr.c (gfc_conv_function_call, gfc_trans_assign,
246 gfc_trans_arrayfunc_assign, gfc_trans_assignment): The
247 same. In the latter function, use the new flag to stop
248 the checking of the lhs for deallocation.
249 (gfc_trans_init_assign): New function.
250 * trans-stmt.h : Add prototype for gfc_trans_init_assign.
251 * trans.c (gfc_trans_code): Implement EXEC_INIT_ASSIGN.
252 * trans.h : Add new boolean argument to the prototype of
253 gfc_trans_assignment.
254 * resolve.c (resolve_allocate_exp): Replace EXEC_ASSIGN by
256 (resolve_code): EXEC_INIT_ASSIGN does not need resolution.
257 (apply_default_init): New function.
258 (resolve_symbol): Call it for derived types that become
259 defined but which do not already have an initialization
261 * st.c (gfc_free_statement): Include EXEC_INIT_ASSIGN.
263 2006-10-16 Tobias Burnus <burnus@net-b.de>
265 * primary.c: Revert 'significand'-to-'significant' comment change.
266 * invoke.texi (Warning Options): Minor cleanup for
267 -Wimplicit-interface.
269 2006-10-17 Paul Thomas <pault@gcc.gnu.org>
272 * trans-array.c (gfc_trans_array_bounds): Test for and set
273 negative stride of a non-constant bound array to zero.
276 * data.c (create_character_intializer): Copy and simplify
277 the expressions for the start and end of a sub-string
280 2006-10-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
282 * io.c (gfc_match_close): Ensure that status is terminated by
285 2006-10-16 Tobias Burnus <burnus@net-b.de>
287 * trans-stmt.c: Fix a typo
288 * invoke.texi: Fix typos
289 * resolve.c: Fix a comment typo
290 * trans-decl.c: Fix a comment typo
291 * primary.c: Fix a comment typo
293 2006-10-15 Steven G. Kargl <kargl@gcc.gnu.org>
296 * io.c (match_io): Check for a default-char-expr for PRINT format.
298 2006-10-15 Bernhard Fischer <aldot@gcc.gnu.org>
301 * lang.opt (Wunused-labels): Remove.
302 * options.c: Remove references to gfc_option.warn_unused_labels.
303 * gfortran.h: Remove variable warn_unused_labels.
304 * resolve.c (warn_unused_fortran_label) : Use warn_unused_label
305 instead of gfc_option.warn_unused_labels.
306 * invoke.texi: Remove documentation of -Wunused-labels.
308 2006-10-14 Tobias Burnus <burnus@net-b.de>
310 * gfortran.texi: Add link to GFortran apps
311 * intrinsic.texi: Updated documentation of ACCESS and CHMOD
313 2006-10-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
316 * scanner.c (load_line): Add checks for illegal use of '&' and issue
317 warnings. Issue errors with -pedantic.
319 2006-10-14 Paul Thomas <pault@gcc.gnu.org>
322 * trans-expr.c (gfc_trans_pointer_assignment): Add the expression
323 for the assignment of null to the data field to se->pre, rather
326 2006-10-14 Kazu Hirata <kazu@codesourcery.com>
328 * intrinsic.texi: Fix typos.
329 * trans-array.c: Fix a comment typo.
331 2006-10-13 Brooks Moses <bmoses@stanford.edu>
333 * intrinsic.texi (STAT): Reverted a format in example code to
334 octal; noted this in accompanying string.
336 2006-10-13 Paul Thomas <pault@gcc.gnu.org>
339 * decl.c (get_proc_name, gfc_match_function_decl): Add
340 attr.implicit_type to conditions that throw error for
341 existing explicit interface and that allow new type-
345 * resolve.c (resolve_fl_namelist): Do not check for
346 namelist/procedure conflict, if the symbol corresponds
347 to a good local variable declaration.
350 * decl.c (get_proc_name): Replace the detection of a declared
351 procedure by the presence of a formal argument list by the
352 attributes of the symbol and the presence of an explicit
356 * resolve.c (resolve_fl_variable): See if the host association
357 of a derived type is blocked by the presence of another type I
358 object in the current namespace.
361 * resolve.c (resolve_fl_derived): Check for the presence of
362 the derived type for a derived type component.
365 * module.c (gfc_use_module): Check that the first words in a
366 module file are 'GFORTRAN module'.
369 * resolve.c (resolve_transfer): Test functions for suitability
370 for IO, as well as variables.
373 * trans-expr.c (gfc_trans_scalar_assign): Remove nullify of
376 2006-10-13 Francois-Xavier Coudert <coudert@clipper.ens.fr>
379 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Generate correct
380 code for LBOUND and UBOUND intrinsics.
382 2006-10-13 Francois-Xavier Coudert <coudert@clipper.ens.fr>
385 * io.c (compare_to_allowed_values): New function.
386 (gfc_match_open): Add checks for constant values of specifiers.
387 (gfc_match_close): Add checks for constant values of the STATUS
390 2006-10-12 Brooks Moses <bmoses@stanford.edu>
392 * intrinsic.texi (STAT): Fixed a format typo in sample code.
394 2006-10-12 Brooks Moses <bmoses@stanford.edu>
396 * intrinsic.texi (STAT): Shortened lines in sample code.
398 2006-10-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
400 * gfortran.h (gfc_show_actual_arglist, gfc_show_array_ref,
401 gfc_show_array_spec, gfc_show_attr, gfc_show_code,
402 gfc_show_components, gfc_show_constructor, gfc_show_equiv,
403 gfc_show_expr, gfc_show_namelist, gfc_show_ref, gfc_show_symbol,
404 gfc_show_typespec): Add prototypes.
405 * dump-parse-tree.c (gfc_show_actual_arglist, gfc_show_array_ref,
406 gfc_show_array_spec, gfc_show_attr, gfc_show_code,
407 gfc_show_components, gfc_show_constructor, gfc_show_equiv,
408 gfc_show_expr, gfc_show_namelist, gfc_show_ref, gfc_show_symbol,
409 gfc_show_typespec): Remove 'static' from declaration.
411 2006-10-10 Brooks Moses <bmoses@stanford.edu>
413 * invoke.texi, gfortran.texi: Corrected erronous dashes.
415 2006-10-10 Brooks Moses <bmoses@stanford.edu>
417 * Make-lang.in: Added "fortran.pdf", "gfortran.pdf" target
420 2006-10-10 Daniel Franke <franke.daniel@gmail.com>
422 * intrinsic.texi: added documentation for FSTAT, GETARG,GET_COMMAND,
423 GET_COMMAND_ARGUMENT, GETENV, GET_ENVIRONMENT_VARIABLE, IAND, IARGC,
424 LSTAT and STAT, removed the reference to PR19292 from ACCESS, CHMOD,
425 GMTIME, LSHIFT, LTIME, RSHIFT.
427 2006-10-10 Brooks Moses <bmoses@stanford.edu>
429 * gfortran.texi (Standards): Update to current status.
431 2006-10-09 Brooks Moses <bmoses@stanford.edu>
433 * Make-lang.in: Added intrinsic.texi to GFORTRAN_TEXI
436 2006-10-09 Brooks Moses <bmoses@stanford.edu>
438 * intrinsic.texi (MOVE_ALLOC): changed "Options" to "Standards".
440 2006-10-09 Steven G. Kargl <kargl@gcc.gnu.org>
442 * gfortran.h: Define GFC_MPFR_TOO_OLD via mpfr version info.
443 * arith.c (arctangent, gfc_check_real_range): Use it.
444 * simplify.c (gfc_simplify_atan2, gfc_simplify_exponent,
445 gfc_simplify_log, gfc_simplify_nearest): Use it.
449 * iresolve.c (gfc_resolve_rrspacing): Give rrspacing library
450 routine hidden precision argument.
451 (gfc_resolve_spacing): Give spacing library routine hidden
452 precision, emin - 1, and tiny(x) arguments.
453 * simplify.c (gfc_simplify_nearest): Remove explicit subnormalization.
454 (gfc_simplify_rrspacing): Implement formula from Fortran 95 standard.
455 (gfc_simplify_spacing): Implement formula from Fortran 2003 standard.
456 * trans-intrinsic.c (gfc_intrinsic_map_t) Declare rrspacing and
457 spacing via LIBF_FUNCTION
458 (prepare_arg_info, call_builtin_clz, gfc_conv_intrinsic_spacing,
459 gfc_conv_intrinsic_rrspacing): Remove functions.
460 (gfc_conv_intrinsic_function): Remove calls to
461 gfc_conv_intrinsic_spacing and gfc_conv_intrinsic_rrspacing.
462 * f95-lang.c (gfc_init_builtin_functions): Remove __builtin_clz,
463 __builtin_clzl and __builtin_clzll
465 2006-10-09 Richard Henderson <rth@redhat.com>
469 2006-10-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
471 * intrinsic.c (add_sym_0s, add_sym_1s, add_sym_2s, add_sym_3s,
472 add_sym_4s, add_sym_5s, add_functions): Use macro ACTUAL_NO,
473 ACTUAL_YES, NOT_ELEMENTAL and ELEMENTAL instead of constants
474 0 and 1 as second and third arguments to add_sym* functions.
476 2006-10-08 Erik Edelmann <edelmann@gcc.gnu.org>
477 Paul Thomas <pault@gcc.gnu.org>
480 * interface.c (gfc_compare_derived_types): Add comparison of
481 the allocatable field.
482 * intrinsic.c (add_subroutines): Add MOVE_ALLOC.
483 * trans-expr.c (gfc_conv_aliased_arg, gfc_trans_subarray_assign,
484 gfc_trans_subcomponent_assign, gfc_conv_string_parameter,
485 gfc_trans_scalar_assign): Add extra arguments l_is_temp
486 and r_is_var to references to latter function.
487 (gfc_conv_function_call): Add enum for types of argument and
488 an associated variable parm_kind. Deallocate components of
489 INTENT(OUT) and non-variable arrays.
490 (gfc_trans_subcomponent_assign): Add block to assign arrays
491 to allocatable components.
492 (gfc_trans_scalar_assign): Add block to handle assignments of
493 derived types with allocatable components, using the above new
494 arguments to control allocation/deallocation of memory and the
495 copying of allocated arrays.
496 * trans-array.c (gfc_array_allocate): Remove old identification
497 of pointer and replace with that of an allocatable array. Add
498 nullify of structures with allocatable components.
499 (gfc_conv_array_initializer): Treat EXPR_NULL.
500 (gfc_conv_array_parameter): Deallocate allocatable components
501 of non-variable structures.
502 (gfc_trans_dealloc_allocated): Use second argument of library
503 deallocate to inhibit, without error, freeing NULL pointers.
504 (get_full_array_size): New function to return the size of a
506 (gfc_duplicate_allocatable): New function to allocate and copy
508 (structure_alloc_comps): New recursive function to deallocate,
509 nullify or copy allocatable components.
510 (gfc_nullify_alloc_comp, gfc_deallocate_alloc_comp,
511 gfc_copy_alloc_comp): New interface functions to call previous.
512 (gfc_trans_deferred_array): Add the code to nullify allocatable
513 components, when entering scope, and to deallocate them on
514 leaving. Do not call gfc_trans_static_array_pointer and return
515 for structures with allocatable components and default
517 * symbol.c (gfc_set_component_attr): Set allocatable field.
518 (gfc_get_component_attr): Set the allocatable attribute.
519 * intrinsic.h : Prototype for gfc_check_move_alloc.
520 * decl.c (build_struct): Apply TR15581 constraints for
521 allocatable components.
522 (variable_decl): Default initializer is always NULL for
523 allocatable components.
524 (match_attr_spec): Allow, or not, allocatable components,
525 according to the standard in force.
526 * trans-array.h : Prototypes for gfc_nullify_alloc_comp,
527 gfc_deallocate_alloc_comp, gfc_copy_alloc_comp and
528 gfc_duplicate_allocatable.
529 * gfortran.texi : Add mention of TR15581 extensions.
530 * gfortran.h : Add attribute alloc_comp, add
531 gfc_components field allocatable and add the prototype
532 for gfc_expr_to_initialize.
533 * trans-stmt.c (generate_loop_for_temp_to_lhs,
534 generate_loop_for_rhs_to_temp, gfc_trans_where_assign,
535 gfc_trans_where_3): Add extra arguments to calls to
536 gfc_trans_scalar_assign and set appropriately.
537 (gfc_trans_allocate): Nullify allocatable components.
538 (gfc_trans_deallocate): Deallocate to ultimate allocatable
539 components but stop at ultimate pointer components.
540 * module.c (mio_symbol_attribute, mio_symbol_attribute,
541 mio_component): Add module support for allocatable
543 * trans-types.c (gfc_get_derived_type): Treat allocatable
545 * trans.h : Add two boolean arguments to
546 gfc_trans_scalar_assign.
547 * resolve.c (resolve_structure_cons): Check conformance of
548 constructor element and the component.
549 (resolve_allocate_expr): Add expression to nullify the
550 constructor expression for allocatable components.
551 (resolve_transfer): Inhibit I/O of derived types with
552 allocatable components.
553 (resolve_fl_derived): Skip check of bounds of allocatable
555 * trans-decl.c (gfc_get_symbol_decl): Add derived types
556 with allocatable components to deferred variable.
557 (gfc_trans_deferred_vars): Make calls for derived types
558 with allocatable components to gfc_trans_deferred_array.
559 (gfc_generate_function_code): Nullify allocatable
560 component function result on entry.
561 * parse.c (parse_derived): Set symbol attr.allocatable if
562 allocatable components are present.
563 * check.c (gfc_check_allocated): Enforce attr.allocatable
564 for intrinsic arguments.
565 (gfc_check_move_alloc): Check arguments of move_alloc.
566 * primary.c (gfc_variable_attr): Set allocatable attribute.
567 * intrinsic.texi : Add index entry and section for
570 2006-10-08 Paul Thomas <pault@gcc.gnu.org>
573 * resolve.c (resolve_structure_cons): It is an error if the
574 pointer component elements of a derived type constructor are
575 not pointer or target.
579 * trans-stmt.c (generate_loop_for_temp_to_lhs,
580 generate_loop_for_rhs_to_temp): Provide a string length for
581 the temporary by copying that of the other side of the scalar
584 2006-10-08 Tobias Burnus <burnus@net-b.de>
587 * intrinsic.c (add_functions): Add new_line Fortran 2003 intrinsic.
588 * intrinsic.h: Add gfc_simplify_new_line and gfc_check_new_line
590 * check.c (gfc_check_new_line): New function.
591 * simplify.c (gfc_simplify_new_line): New function.
592 * intrinsic.texi: Document new_line intrinsic.
594 2006-10-07 Francois-Xavier Coudert <coudert@clipper.ens.fr>
598 * gcc/fortran/intrinsic.c (add_sym): Define the actual_ok when a
599 gfc_intrinsic_sym structure is filled.
600 (gfc_intrinsic_actual_ok): New function.
601 (add_sym_0s, add_sym_1s, add_sym_2s, add_sym_3s, add_sym_4s,
602 add_sym_5s): Intrinsic subroutines are not allowed as actual
603 arguments, so we remove argument actual_ok.
604 (add_functions): Correct the values for actual_ok of all intrinsics.
605 Add comments for gfc_check_access_func and gfc_resolve_index_func.
606 (add_subroutines): Remove the actual_ok argument, which was never used.
607 * gcc/fortran/intrinsic.h (gfc_intrinsic_actual_ok): New prototype.
608 * gcc/fortran/gfortran.h (gfc_resolve_index_func): New prototype.
609 * gcc/fortran/resolve.c (resolve_actual_arglist): Check whether
610 an intrinsic used as an argument list is allowed there.
611 * gcc/fortran/iresolve.c (gfc_resolve_index_func): New function.
612 (gfc_resolve_len): Change intrinsic function name to agree with
614 * gcc/fortran/trans-decl.c (gfc_get_extern_function_decl): Add
615 new case, because some specific intrinsics take 3 arguments.
616 * gcc/fortran/intrinsic.texi: DIMAG is a GNU extension.
618 2006-10-06 Jakub Jelinek <jakub@redhat.com>
621 * trans-decl.c (gfc_finish_var_decl): With -fno-automatic, don't
622 make artificial variables or pointer to variable automatic array
625 * scanner.c (skip_free_comments): Return bool instead of void.
626 (gfc_next_char_literal): Don't return ' ' if & is missing after
627 !$omp or !$. Use skip_{free,fixed}_comments directly instead
628 of gfc_skip_comments.
630 2006-10-04 Brooks Moses <bmoses@stanford.edu>
632 * gfortran.texi: (Current Status): update and rewrite to reflect
633 actual status more accurately.
635 2006-10-04 Brooks Moses <bmoses@stanford.edu>
637 * gfortran.texi: Consistently refer to the compiler as "GNU
639 * intrinsic.texi: Ditto.
640 * invoke.texi: Ditto.
642 2006-10-04 Richard Henderson <rth@redhat.com>
643 Jakub Jelinek <jakub@redhat.com>
645 * f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address
646 and __emutls_register_common.
647 * openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls.
648 * trans-common.c (build_common_decl): Don't check have_tls.
649 * trans-decl.c (gfc_finish_var_decl): Likewise.
650 * types.def (BT_WORD, BT_FN_PTR_PTR): New.
651 (BT_FN_VOID_PTR_WORD_WORD_PTR): New.
653 2006-10-04 Paul Thomas <pault@gcc.gnu.org>
656 * resolve.c (resolve_allocate_expr): Exclude derived types from
657 search for dependences between allocated variables and the
658 specification expressions for other allocations in the same
661 2006-10-04 Paul Thomas <pault@gcc.gnu.org>
664 * resolve.c (resolve_structure_cons): Do not return FAILURE if
665 component expression is NULL.
667 2006-10-03 Paul Thomas <pault@gcc.gnu.org>
671 * resolve.c (find_sym_in_expr): New function that returns true
672 if a symbol is found in an expression.
673 (resolve_allocate_expr): Check whether the STAT variable is
674 itself allocated in the same statement. Use the call above to
675 check whether any of the allocated arrays are used in array
676 specifications in the same statement.
678 2006-10-03 Steven G. Kargl <kargl@gcc.gnu.org>
680 * arith.c (gfc_check_real_range): Use correct exponent range for
683 2006-10-03 Paul Thomas <pault@gcc.gnu.org>
688 * trans-expr.c (gfc_conv_function_call): Check the expression
689 and the formal symbol are present when testing the actual
694 * resolve.c (resolve_entries): It is an error if the entries
695 of an array-valued function do not have the same shape.
697 2006-10-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
700 * trans-decl.c (gfc_get_fake_result_decl): Mark var as
703 2006-10-02 Jerry DeLisle <jvdelisle@gcc.gnu.org>
706 * gfortran.h (gfc_option_t): Add max_continue_fixed and
708 * options.c (gfc_init_options): Initialize fixed form and free form
709 consecutive continuation line limits.
710 * scanner.c (gfc_scanner_init_1): Initialize continue_line
711 and continue_count. (gfc_next_char_literal): Count the number of
712 continuation lines in the current statement and warn if limit
715 2006-10-02 Jerry DeLisle <jvdelisle@gcc.gnu.org>
718 * scanner.c (gfc_next_char_literal): Add check for missing '&'
719 and warn if in_string, otherwise return ' '.
721 2006-10-02 Francois-Xavier Coudert <coudert@clipper.ens.fr>
724 * primary.c (match_sym_complex_part): Named constants as real or
725 imaginary part of complex a named constant are only allowed in
728 2006-10-01 Brooks Moses <bmoses@stanford.edu>
730 * gfortran.texi: Corrected references to MALLOC intrinsic.
731 * invoke.texi: Minor cleanup and clarification to the Dialect
734 2006-09-30 Brooks Moses <bmoses@stanford.edu>
736 * invoke.texi: Add mention of BOZ constants and integer
737 overflow to -fno-range-check.
738 * gfortran.texi: Add mention of -fno-range-check to
739 section on BOZ contants.
741 2006-09-30 Bernhard Fischer <aldot@gcc.gnu.org>
743 * resolve.c: Fix commentary typo. Fix whitespace.
745 2006-09-28 Steven G. Kargl <kargl@gcc.gnu.org>
748 * arith.c (gfc_check_integer_range): Disable range checking via
751 2006-09-28 Steven G. Kargl <kargl@gcc.gnu.org>
753 * arith.c: Change conditional test for inclusion of arctangent().
754 (gfc_check_real_range): Change conditional test for use of
756 * simplify.c (gfc_simplify_atan2): Fix conditional for use of
757 mpfr_atan2() instead of arctangent().
758 (gfc_simplify_exponent): Fix conditional for use of mpfr_get_exp().
759 (gfc_simplify_log): Fix conditional for use of mpfr_atan2() instead
761 (gfc_simplify_nearest): Fix conditional for use of mpfr_nextafter().
763 2006-09-27 Steven G. Kargl <kargl@gcc.gnu.org>
765 * arith.c: Conditionally include arctangent2().
766 (gfc_check_real_range): Use mpfr_subnormalize in preference to local
768 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Append
769 l for long double functions.
770 * simplify.c: Wrap Copyright to new line.
771 (gfc_simplify_atan2): Use mpfr_atan2 in preference to arctangent2().
772 (gfc_simplify_log): Ditto.
776 * simplify.c (gfc_simplify_exponent): Use mpfr_get_exp in
777 preference to broken local hack.
780 * simplify.c (gfc_simplify_nearest): Use mpfr_nexttoward and
781 mpfr_subnormalize to handle numbers near zero in preference to broken
784 2006-09-26 Jakub Jelinek <jakub@redhat.com>
787 * scanner.c (include_line): Handle conditional include.
789 2006-09-25 Tobias Schluter <tobias.schlueter@physik.uni-muenchen.de>
792 * error.c (show_loci): No need to risk an ICE to output a
793 slightly nicer error message.
795 2006-09-19 Paul Thomas <pault@gcc.gnu.org>
796 Steven Bosscher <steven@gcc.gnu.org>
799 * trans-stmt.c (gfc_trans_character_select): Store the label
800 from select_string and then clean up any temporaries from the
801 conversion of the select expression, before branching to the
804 2006-09-18 Paul Thomas <pault@gcc.gnu.org>
807 * primary.c (match_variable): If the compiler is in a module
808 specification block, an interface block or a contains section,
809 reset host_flag to force the changed symbols mechanism.
812 * trans-stmt.c (gfc_trans_character_select): Add the post block
813 for the expression to the main block, after the call to
814 select_string and the last label.
816 2006-09-18 Paul Thomas <pault@gcc.gnu.org>
819 * iresolve.c (resolve_spread): Build shape for result if the
820 source shape is available and dim and ncopies are constants.
822 2006-09-18 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
826 * trans-decl.c (generate_local_decl): Change from 'warning' to
827 'gfc_warning' to have line numbers correctly reported.
829 2006-09-15 Paul Thomas <pault@gcc.gnu.org>
832 * decl.c (match_old_style_init): Set the 'where' field of the
833 gfc_data structure 'newdata'.
835 * match.c (match_case_eos): Add a comprehensible error message.
837 2006-09-13 Wolfgang Gellerich <gellerich@de.ibm.com>
839 * trans-expr.c (gfc_add_interface_mapping): For characters, dereference
840 pointer if necessary and then perform the cast.
842 2006-09-11 Steven G. Kargl <kargl@gcc.gnu.org>
844 * intrinsic.c: Update Copyright date.
845 * intrinsic.h: Ditto.
847 2006-09-11 Paul Thomas <pault@gcc.gnu.org>
850 * trans-expr.c (gfc_conv_function_call): Obtain the string length
851 of a dummy character(*) function from the symbol if it is not
852 already translated. For a call to a character(*) function, use
853 the passed, hidden string length argument, which is available
854 from the backend_decl of the formal argument.
855 * resolve.c (resolve_function): It is an error if a function call
856 to a character(*) function is other than a dummy procedure or
859 2006-09-10 Paul Thomas <pault@gcc.gnu.org>
862 * trans-types.c (gfc_get_derived_type): Use the parent namespace of
863 the procedure if the type's own namespace does not have a parent.
865 2006-09-10 Paul Thomas <pault@gcc.gnu.org>
868 * expr.c (find_array_section): Only use the array lower and upper
869 bounds for the start and end of the sections, where the expr is
872 2006-09-10 Paul Thomas <pault@gcc.gnu.org>
875 * trans-array.c (gfc_trans_array_constructor_value): Create a temporary
876 loop variable to hold the current loop variable in case it is modified
877 by the array constructor.
879 2006-09-07 Steven G. Kargl <kargls@comcast.net>
881 * gfortran.h (gfc_integer_info): Eliminate max_int.
882 * arith.c (gfc_arith_init_1): Remove initialization of max_int.
883 (gfc_arith_done_1): Remove clearing of max_int.
884 (gfc_check_integer_range): Fix range chekcing of overflow.
885 * simplify.c (gfc_simplify_not): Construct mask that was max_int.
887 2006-09-05 Paul Thomas <pault@gcc.gnu.org>
890 * gfortran.h : Restore the gfc_dt_list structure and reference
891 to it in gfc_namespace.
892 * resolve.c (resolve_fl_derived): Restore the building of the
893 list of derived types for the current namespace. Modify the
894 restored code so that a check is made to see if the symbol is
896 (resolve_fntype): Make sure that the specification block
897 version of the derived type is used for a module function that
899 * symbol.c (gfc_free_dt_list): Restore.
900 (gfc_free_namespace): Restore call to previous.
901 * trans-types.c (copy_dt_decls_ifequal): Restore.
902 (gfc_get_derived_type): Restore all the paraphenalia for
903 association of derived types, including calls to previous.
904 Modify the restored code such that all derived types are built
905 if their symbols are found in the parent namespace; not just
906 non-module types. Add backend_decls to like derived types in
907 sibling namespaces, as well as that of the derived type.
909 2006-08-30 Kazu Hirata <kazu@codesourcery.com>
911 * match.c: Fix a comment typo.
913 2006-08-30 Paul Thomas <pault@gcc.gnu.org>
916 * trans-expr.c (gfc_conv_aliased_arg): Ensure that the temp
917 declaration is retained for INTENT(OUT) arguments.
921 * resolve.c (resolve_generic_f): Make error message more
923 (resolve_generic_s): Restructure search for specific procedures
924 to be similar to resolve_generic_f and change to similar error
925 message. Ensure that symbol reference is refreshed, in case
926 the search produces a NULL.
927 (resolve_specific_s): Restructure search, as above and as
928 resolve_specific_f. Ensure that symbol reference is refreshed,
929 in case the search produces a NULL.
933 * interface.c (check_operator_interface): Throw error if the
934 interface assignment tries to change intrinsic type assigments
935 or has less than two arguments. Also, it is an error if an
936 interface operator contains an alternate return.
939 * parse.c (gfc_fixup_sibling_symbols): Do not modify the symbol
940 if it is a dummy in the contained namespace.
942 2006-08-29 Steven G. Kargl <kargls@comcast.net>
945 * match.c: Wrap copyright.
946 (gfc_match_assignment): Return MATCH_NO for failed lvalue. Remove
947 gotos. Move error handling of FL_PARAMETER to ...
948 * gfc_match_if: Deal with MATCH_NO from above.
949 * primary.c: Wrap copyright.
950 (match_variable): ... here. Improve error messages.
952 2006-08-29 Paul Thomas <pault@gcc.gnu.org>
955 * symbol.c (gfc_use_derived): Never eliminate the symbol,
956 following reassociation of use associated derived types.
958 2006-08-26 Steven G. Kargl <kargls@comcast.net>
960 * arith.h: Update Copyright dates. Fix whitespace.
961 * arith.c: Update Copyright dates. Fix whitespace. Fix comments.
962 (gfc_arith_done_1): Clean up pedantic_min_int and subnormal.
964 2006-08-26 Tobias Burnus <burnus@net-b.de>
966 * gfortran.texi: Note variable initialization causes SAVE attribute.
967 * intrinsic.texi: Clarify support for KIND=16 and KIND=10.
968 Mention -std=f2003. Cross reference INQUIRE from ACCESS intrinsic.
969 Add missing ) in ACOS.
971 2006-08-26 Daniel Franke <franke.daniel@gmail.com>
973 * intrinsic.texi: Update Copyright date. Added documentation
974 for ACOSH, AND, ASINH, ATANH, CHDIR, FGET, FGETC, FPUT, FPUTC,
975 GETCWD, OR and XOR intrinsics, removed inadvertently introduced
976 doc-stubs for EQV and NEQV, corrected some typographical errors.
978 2006-08-24 Daniel Franke <franke.daniel@gmail.com>,
979 Brooks Moses <bmoses@stanford.edu>
981 * intrinsic.texi: Added doc-stubs for undocumented intrinsics,
982 added a "See Also" section, renamed the "Options" section to
983 "Standard", improved the index, and made numerous minor
984 typo corrections and grammatical fixes.
986 2006-08-24 Paul Thomas <pault@gcc.gnu.org>
989 * symbol.c (shift_types): Shift the derived type references in
991 (gfc_use_derived): Return if the derived type symbol is already
992 in another namspace. Add searches for the derived type in
996 * decl.c (add_init_expr_to_sym): Restore the original but
997 restricted to parameter arrays to fix a regression.
999 2006-08-23 Steven G. Kargl <kargls@comcast.net>
1001 * gfortran.texi: Fix last commit where a "no" was deleted and
1002 a grammatical error was introduced.
1004 2006-08-23 Steven G. Kargl <kargls@comcast.net>
1006 * gfortran.texi: Spell check. Add a few contributors to
1007 Chapter 9. Expand the description of BOZ constant handling.
1009 2006-08-20 Janne Blomqvist <jb@gcc.gnu.org>
1012 * gfortran.texi: Mention STREAM I/O among supported F2003
1015 2006-08-20 Paul Thomas <pault@gcc.gnu.org>
1019 * gfortran.h : Eliminate gfc_dt_list structure and reference
1020 to it in gfc_namespace.
1021 * resolve.c (resolve_fl_derived): Remove the building of the
1022 list of derived types for the current namespace.
1023 * symbol.c (find_renamed_type): New function to find renamed
1024 derived types by symbol name rather than symtree name.
1025 (gfc_use_derived): Search parent namespace for identical
1026 derived type and use it, even if local version is complete,
1027 except in interface bodies. Ensure that renamed derived types
1028 are found by call to find_renamed_type. Recurse for derived
1030 (gfc_free_dt_list): Remove.
1031 (gfc_free_namespace): Remove call to previous.
1032 * trans-types.c (copy_dt_decls_ifequal): Remove.
1033 (gfc_get_derived_type): Remove all the paraphenalia for
1034 association of derived types, including calls to previous.
1035 * match.c (gfc_match_allocate): Call gfc_use_derived to
1036 associate any derived types that are being allocated.
1039 * resolve.c (resolve_actual_arglist): The passing of
1040 a generic procedure name as an actual argument is an
1044 * resolve.c (resolve_variable): Check for a symtree before
1045 resolving references.
1048 * primary.c (match_variable): Return MATCH_NO if the symbol
1049 is that of the program.
1052 * trans-expr.c (gfc_trans_subcomponent_assign): Translate
1053 derived type component expressions other than another derived
1057 * expr.c (find_array_section): Correct errors in
1058 the handling of a missing start value for the
1059 index triplet in an array reference.
1062 * trans-decl.c (gfc_build_dummy_array_decl): Before resetting
1063 reference to backend_decl, set it DECL_ARTIFICIAL.
1064 (gfc_get_symbol_decl): Likewise for original dummy decl, when
1065 a copy is made of an array.
1066 (create_function_arglist): Likewise for the _entry paramter
1068 (build_entry_thunks): Likewise for dummies in entry thunks.
1071 * trans-decl.c (gfc_get_symbol_decl): Ensure that the
1072 DECL_CONTEXT of the length of a character dummy is the
1073 same as that of the symbol declaration.
1076 * decl.c (add_init_expr_to_sym): Remove setting of charlen for
1077 an initializer of an assumed charlen variable.
1080 * trans-decl.c (generate_expr_decls): New function.
1081 (generate_dependency_declarations): New function.
1082 (generate_local_decl): Call previous if not either a dummy or
1083 a declaration in an entry master.
1085 2006-08-19 Erik Edelmann <eedelman@gcc.gnu.org>
1088 * resolve.c (resolve_fl_variable): Set a default initializer for
1089 derived types with INTENT(OUT) even if 'flag' is true.
1090 * trans-expr.c (gfc_conv_function_call): Insert code to
1091 reinitialize INTENT(OUT) arguments of derived type with default
1094 2006-08-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1097 * gfortran.h: Add new pointer for stream position to st_inquire.
1098 Rename gfc_large_io_int_kind to gfc_intio_kind.
1099 * trans-types.c (gfc_init_kinds): use gfc_intio_kind.
1100 * io.c: Add new IO tag for file position going in and another for out.
1101 (match_dt_element): Match new tag_spos.
1102 (gfc_resolve_dt): Resolve new tag_spos.
1103 (gfc_free_inquire): Free inquire->strm_pos.
1104 (match_inquire_element): Match new tag_strm_out.
1105 (gfc_resolve_inquire): Resolve new tag_strm_out.
1106 * trans-io.c: Rename IOPARM_type_large_io_int to IOPARM_type_intio.
1107 (gfc_build_st_parameter): Same.
1108 (gfc_build_io_library_fndecls) Same. and add build pointer type pintio.
1109 (gfc_trans_inquire): Translate strm_pos for inquire.
1110 * ioparm.def: Reorder flags to accomodate addition of new inquire
1111 flag for strm_pos_out and add it in.
1113 2006-08-06 Paul Thomas <pault@gcc.gnu.org>
1116 * parse.c (parse_derived): Remove the test for sequence type
1117 components of a sequence type.
1118 * resolve.c (resolve_fl_derived): Put the test here so that
1119 pointer components are tested.
1121 2006-08-05 Steven G. Kargl <kargls@comcast.nt>
1124 * resolve.c(resolve_elemental_actual): Add flags.h to use -pedantic
1125 and exclude conversion functions in conditional. Change gfc_error
1127 (warn_unused_label) Rename to ...
1128 (warn_unused_fortran_label) avoid warn_unused_label in flags.h.
1130 2006-07-30 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1132 * intrinsic.c (add_functions): Add ACCESS, CHMOD, RSHIFT, LSHIFT.
1133 (add_subroutines): Add LTIME, GMTIME and CHMOD.
1134 * intrinsic.h (gfc_check_access_func, gfc_check_chmod,
1135 gfc_check_chmod_sub, gfc_check_ltime_gmtime, gfc_simplify_rshift,
1136 gfc_simplify_lshift, gfc_resolve_access, gfc_resolve_chmod,
1137 gfc_resolve_rshift, gfc_resolve_lshift, gfc_resolve_chmod_sub,
1138 gfc_resolve_gmtime, gfc_resolve_ltime): Add prototypes.
1139 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_ACCESS,
1140 GFC_ISYM_CHMOD, GFC_ISYM_LSHIFT, GFC_ISYM_RSHIFT.
1141 * iresolve.c (gfc_resolve_access, gfc_resolve_chmod,
1142 gfc_resolve_rshift, gfc_resolve_lshift, gfc_resolve_chmod_sub,
1143 gfc_resolve_gmtime, gfc_resolve_ltime): New functions.
1144 * check.c (gfc_check_access_func, gfc_check_chmod,
1145 gfc_check_chmod_sub, gfc_check_ltime_gmtime): New functions.
1146 * trans-intrinsic.c (gfc_conv_intrinsic_rlshift): New function.
1147 (gfc_conv_intrinsic_function): Add cases for the new GFC_ISYM_*.
1149 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1151 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
1153 2006-07-26 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1155 * intrinsic.c (add_functions): Add INT2, SHORT, INT8, LONG,
1156 LSTAT, MCLOCK and MCLOCK8 intrinsic functions.
1157 (add_subroutines): Add LSTAT intrinsic subroutine.
1158 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_INT2,
1159 GFC_ISYM_INT8, GFC_ISYM_LONG, GFC_ISYM_LSTAT, GFC_ISYM_MCLOCK
1160 and GFC_ISYM_MCLOCK8.
1161 * iresolve.c (gfc_resolve_int2, gfc_resolve_int8,
1162 gfc_resolve_long, gfc_resolve_lstat, gfc_resolve_mclock,
1163 gfc_resolve_mclock8, gfc_resolve_lstat_sub): New functions.
1164 * check.c (gfc_check_intconv): New function.
1165 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add cases for
1166 the added GFC_ISYM_*.
1167 * simplify.c (gfc_simplify_intconv, gfc_simplify_int2,
1168 gfc_simplify_int8, gfc_simplify_long): New functions.
1169 * intrinsic.h (gfc_check_intconv, gfc_simplify_int2,
1170 gfc_simplify_int8, gfc_simplify_long, gfc_resolve_int2,
1171 gfc_resolve_int8, gfc_resolve_long, gfc_resolve_lstat,
1172 gfc_resolve_mclock, gfc_resolve_mclock8, gfc_resolve_lstat_sub):
1175 2006-07-24 Erik Edelmann <eedelman@gcc.gnu.org>
1178 * trans-array.c (gfc_conv_array_parameter): Give special treatment for
1179 ALLOCATABLEs if they are themselves dummy variables.
1181 2006-07-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1184 * gfortran.h: Declare gfc_large_io_int_kind.
1185 * trans-types.c (gfc_init_kinds): Set gfc_large_io_int_kind
1187 * trans-io.c (enum iofield_type): Add large_io_int type.
1188 (gfc_build_st_parameter): Same.
1189 (gfc_build_io_library_fndecls): Same.
1190 * ioparm_def: Use large_io_int to define rec.
1192 2006-07-22 Steven Bosscher <steven@gcc.gnu.org>
1195 * trans-stmt.c (gfc_trans_arithmetic_if): Evaluate the condition once.
1197 2006-07-16 Jakub Jelinek <jakub@redhat.com>
1200 * trans-openmp.c (gfc_trans_omp_do): Look for LASTPRIVATE in
1201 code->exp.omp_clauses rather than in the 3rd function argument.
1203 2006-07-16 Paul Thomas <pault@gcc.gnu.org>
1206 * trans-common.c (translate_common): If common_segment is NULL
1207 emit error that common block does not exist.
1210 * io.c (check_io_constraints): It is an error if an ADVANCE
1211 specifier appears without an explicit format.
1214 * resolve.c (resolve_generic_s): For a use_associated function,
1215 do not search for an alternative symbol in the parent name
1219 * resolve.c (resolve_elemental_actual): New function t combine
1220 all the checks of elemental procedure actual arguments. In
1221 addition, check of array valued optional args(this PR) has
1223 (resolve_function, resolve_call): Remove parts that treated
1224 elemental procedure actual arguments and call the above.
1226 2006-07-14 Steven G. Kargl <kargls@comcast.net>
1228 * trans-expr.c (gfc_trans_string_copy): Evaluate the string lengths
1230 006-07-13 Paul Thomas <pault@gcc.gnu.org>
1233 * trans-expr.c (gfc_conv_aliased_arg): Missing formal arg means
1234 that intent is INOUT (fixes regression).
1237 * check.c (check_present): The only permitted reference is a
1238 full array reference.
1241 * decl.c (variable_decl): Add error if a derived type is not
1242 from the current namespace if the namespace is an interface
1245 2006-07-12 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1248 * trans-expr.c (gfc_trans_string_copy): Generate inline code
1249 to perform string copying instead of calling a library function.
1250 * trans-decl.c (gfc_build_intrinsic_function_decls): Don't build
1251 decl for copy_string.
1252 * trans.h (gfor_fndecl_copy_string): Remove prototype.
1254 2006-07-11 Feng Wang <fengwang@nudt.edu.cn>
1257 * trans-io.c (transfer_expr): Deal with Hollerith constants used in
1260 2006-07-07 Kazu Hirata <kazu@codesourcery.com>
1262 * intrinsic.texi: Fix typos.
1264 2006-07-07 Paul Thomas <pault@gcc.gnu.org>
1268 * io.c (resolve_tag): Any integer that is not an assigned
1269 variable is an error.
1271 2006-07-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1274 * trans-array.c (gfc_trans_array_bound_check): Add a locus
1275 argument, and use it in the error messages.
1276 (gfc_conv_array_index_offset): Donc perform bounds checking on
1277 the last dimension of assumed-size arrays.
1279 2006-07-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1282 * trans-stmt.c (compute_inner_temp_size): Don't perform bounds
1283 checking when calculating the bounds of scalarization.
1285 2006-07-05 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1288 * interface.c (gfc_match_interface): Don't allow dummy procedures
1289 to have a generic interface.
1291 2006-07-04 Paul Thomas <pault@gcc.gnu.org>
1294 * trans-array.c (gfc_conv_expr_descriptor): When building temp,
1295 ensure that the substring reference uses a new charlen.
1296 * trans-expr.c (gfc_conv_aliased_arg): Add the formal intent to
1297 the argument list, lift the treatment of missing string lengths
1298 from the above and implement the use of the intent.
1299 (gfc_conv_function_call): Add the extra argument to the call to
1303 * trans-array.c (get_array_ctor_var_strlen): Treat a constant
1304 substring reference.
1305 * array.c (gfc_resolve_character_array_constructor): Remove
1306 static attribute and add the gfc_ prefix, make use of element
1307 charlens for the expression and pick up constant string lengths
1308 for expressions that are not themselves constant.
1309 * gfortran.h : resolve_character_array_constructor prototype
1311 * resolve.c (gfc_resolve_expr): Call resolve_character_array_
1312 constructor again after expanding the constructor, to ensure
1313 that the character length is passed to the expression.
1315 2006-07-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1316 Daniel Franke <franke.daniel@gmail.com>
1318 * intrinsic.c (add_subroutines): Add ITIME and IDATE.
1319 * intrinsic.h (gfc_check_itime_idate,gfc_resolve_idate,
1320 fc_resolve_itime): New protos.
1321 * iresolve.c (gfc_resolve_itime, gfc_resolve_idate): New functions.
1322 * check.c (gfc_check_itime_idate): New function.
1323 * intrinsic.texi: Document the new intrinsics.
1325 2006-07-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1327 * intrinsics/date_and_time.c (itime0,idate0,itime_i4,itime_i8,
1328 idate_i4,idate_i8): New functions.
1331 2006-07-03 Asher Langton <langton2@llnl.gov>
1333 * decl.c (match_old_style_init): Add data attribute to symbol.
1335 2006-07-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1337 * iresolve.c (gfc_resolve_cpu_time, gfc_resolve_random_number):
1338 Remove ATTRIBUTE_UNUSED for used argument.
1340 2006-07-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1342 * intrinsic.texi: Document new intrinsics.
1344 2006-07-01 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
1347 * parse.c (next_free): Error out on line starting with semicolon.
1348 (next_fixed): Fix formatting. Error out on line starting with
1351 2006-06-30 Kazu Hirata <kazu@codesourcery.com>
1353 * check.c: Fix a comment typo.
1355 2006-06-25 Paul Thomas <pault@gcc.gnu.org>
1358 * interface.c (compare_actual_formal): Signal an error if the formal
1359 argument is a pure procedure and the actual is not pure.
1362 * resolve.c (resolve_actual_arglist): If the type of procedure
1363 passed as an actual argument is not already declared, see if it is
1367 * resolve.c (resolve_select): Use bits 1 and 2 of a new int to
1368 keep track of the appearance of constant logical case expressions.
1369 Signal an error is either value appears more than once.
1372 * resolve.c (resolve_fl_procedure): Signal an error if an elemental
1373 function is not scalar valued.
1376 * match.c (recursive_stmt_fcn): Perform implicit typing of variables.
1379 * match.c (match_forall_iterator): Mark new variables as
1380 FL_UNKNOWN if the match fails.
1383 * match.c (gfc_match_forall): Remove extraneous call to
1387 * resolve.c (resolve_code, resolve_function): Rework
1388 forall_flag scheme so that it is set and has a value of
1389 2, when the code->expr (ie. the forall mask) is resolved.
1390 This is used to change "block" to "mask" in the non-PURE
1393 2006-06-24 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1396 * resolve.c (resolve_substring): Don't issue out-of-bounds
1397 error messages when the range has zero size.
1399 2006-06-24 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1402 * lang-specs.h (f95-cpp-input): Pass -ffree-form to f951 unless
1403 -ffixed-form is explicitly specified.
1405 2006-06-24 Paul Thomas <pault@gcc.gnu.org>
1408 * trans-array.c (gfc_conv_expr_descriptor): When building temp,
1409 use the substring reference to calculate the length if the
1410 expression does not have a charlen.
1412 2006-06-24 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1415 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Support cases where
1416 there is no integer kind equal to the resulting real kind.
1417 * intrinsic.c (add_functions): MODULO is not allowed as an actual
1420 2006-06-23 Steven G. Kargl <kargls@comcast.net>
1423 * match.c (gfc_match_if): Handle errors in assignment in simple if.
1425 2006-06-22 Asher Langton <langton2@llnl.gov>
1428 * primary.c (gfc_match_rvalue): Don't call match_substring for
1429 implicit non-character types.
1431 2006-06-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1434 * iresolve.c (gfc_resolve_reshape): Call reshape_r4 and
1435 reshape_r8 instead of reshape_4 and reshape_8.
1436 (gfc_resolve_transpose): Likewise for transpose.
1438 2006-06-21 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1440 * trans-expr.c (gfc_conv_missing_dummy, gfc_conv_unary_op,
1441 gfc_conv_cst_int_power, gfc_conv_string_tmp,
1442 gfc_conv_function_call): Replace calls to convert on constant
1443 integer nodes by build_int_cst.
1444 * trans-stmt.c (gfc_trans_do): Likewise.
1445 * trans-io.c (set_internal_unit, transfer_namelist_element):
1447 * trans-decl.c (build_entry_thunks): Likewise.
1449 2006-06-20 Steven G. Kargl <kargls@comcast.net>
1451 * simplify.c (gfc_simplify_rrspacing): Initialize and clear mpfr_t
1454 2006-06-20 Paul Thomas <pault@gcc.gnu.org>
1458 * check.c (non_init_transformational): New function.
1459 (find_substring_ref): New function to signal use of disallowed
1460 transformational intrinsic in an initialization expression.
1461 (gfc_check_all_any): Call previous if initialization expr.
1462 (gfc_check_count): The same.
1463 (gfc_check_cshift): The same.
1464 (gfc_check_dot_product): The same.
1465 (gfc_check_eoshift): The same.
1466 (gfc_check_minloc_maxloc): The same.
1467 (gfc_check_minval_maxval): The same.
1468 (gfc_check_gfc_check_product_sum): The same.
1469 (gfc_check_pack): The same.
1470 (gfc_check_spread): The same.
1471 (gfc_check_transpose): The same.
1472 (gfc_check_unpack): The same.
1475 *intrinsic.c (add_functions): Add gfc_simplify_transfer.
1476 *intrinsic.h : Add prototype for gfc_simplify_transfer.
1477 *simplify.c (gfc_simplify_transfer) : New function to act as
1478 placeholder for eventual implementation. Emit error for now.
1481 * expr.c (find_array_element): Eliminate condition on length of
1482 offset. Add bounds checking. Rearrange exit. Return try and
1483 put gfc_constructor result as an argument.
1484 (find_array_section): New function.
1485 (find_substring_ref): New function.
1486 (simplify_const_ref): Add calls to previous.
1487 (simplify_parameter_variable): Return on NULL expr.
1488 (gfc_simplify_expr): Only call gfc_expand_constructor for full
1492 * match.c (gfc_match_forall): Add missing locus to gfc_code.
1494 2006-06-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1497 * trans-intrinsic.c (gfc_conv_associated): Use pre and post blocks
1498 of the scalarization expression.
1500 2006-06-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1504 * arith.c (gfc_range_check): Return ARITH_OK if -fno-range-check. Add
1505 return of ARITH_NAN, ARITH_UNDERFLOW, and ARITH_OVERFLOW.
1506 (gfc_arith_divide): If -fno-range-check allow mpfr to divide by zero.
1507 * gfortran.h (gfc_option_t): Add new flag.
1508 * invoke.texi: Document new flag.
1509 * lang.opt: Add option -frange-check.
1510 * options.c (gfc_init_options): Initialize new flag.
1511 (gfc_handle_options): Set flag if invoked.
1512 * simplify.c (range_check): Add error messages for
1513 overflow, underflow, and other errors.
1514 * trans-const.c (gfc_conv_mpfr_to_tree): Build NaN and Inf from mpfr
1517 2006-06-17 Karl Berry <karl@gnu.org>
1519 * gfortran.texi (@dircategory): Use "Software development"
1520 instead of "Programming", following the Free Software Directory.
1522 2006-06-16 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1525 * trans-array.c (gfc_conv_ss_startstride): Correct the runtime
1526 conditions for bounds-checking. Check for nonzero stride.
1527 Don't check the last dimension of assumed-size arrays. Fix the
1528 dimension displayed in the error message.
1530 2006-06-15 Thomas Koenig <Thomas.Koenig@online.de>
1532 * trans-array.h (gfc_trans_create_temp_array): Add bool
1534 * trans-arrray.c (gfc_trans_create_temp_array): Add extra
1535 argument "function" to show if we are translating a function.
1536 If we are translating a function, perform checks whether
1537 the size along any argument is negative. In that case,
1539 (gfc_trans_allocate_storage): Add function argument (as
1540 false) to gfc_trans_create_temp_array call.
1541 * trans-expr.c (gfc_conv_function_call): Add function
1542 argument (as true) to gfc_trans_create_temp_array call.
1543 * trans-stmt.c (gfc_conv_elemental_dependencies): Add
1544 function argument (as false) to gfc_trans_create_temp_array
1546 * trans-intrinsic.c: Likewise.
1548 2006-06-10 Paul Thomas <pault@gcc.gnu.org>
1553 * decl.c (get_proc_name): Add new argument to flag that a
1554 module function entry is being treated. If true, correct
1555 error condition, add symtree to module namespace and add
1557 (gfc_match_function_decl, gfc_match_entry,
1558 gfc_match_subroutine): Use the new argument in calls to
1560 * resolve.c (resolve_entries): ENTRY symbol reference to
1561 to master entry namespace if a module function.
1562 * trans-decl.c (gfc_create_module_variable): Return if
1563 the symbol is an entry.
1564 * trans-exp.c (gfc_conv_variable): Check that parent_decl
1567 2006-06-09 Jakub Jelinek <jakub@redhat.com>
1570 * trans-openmp.c (gfc_omp_clause_default_ctor): New function.
1571 * trans.h (gfc_omp_clause_default_ctor): New prototype.
1572 * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): Define.
1574 2006-06-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1577 * trans-expr.c (gfc_conv_substring): If the substring start is
1578 greater than its end, the length of the substring is zero, and
1580 (gfc_trans_string_copy): Don't generate a call to
1581 _gfortran_copy_string when destination length is zero.
1583 2006-06-08 Asher Langton <langton2@llnl.gov>
1586 * trans-array.c (gfc_conv_array_ref): Eliminate bounds checking
1587 for assumed-size Cray pointees.
1589 2006-06-08 Steven G. Kargl <kargls@comcat.net>
1591 * intrinsic.c (add_subroutine): Make make_noreturn() conditional on
1592 the appropriate symbol name.
1594 2006-06-07 Paul Thomas <pault@gcc.gnu.org>
1597 * resolve.c (resolve_fl_variable): Error if an automatic
1598 object has the SAVE attribute.
1601 * expr.c (simplify_intrinsic_op): Transfer the rank and
1602 the locus to the simplified expression.
1606 * gfortran.h : Add int entry_id to gfc_symbol.
1607 * resolve.c : Add static variables current_entry_id and
1609 (resolve_variable): During code resolution, check if a
1610 reference to a dummy variable in an executable expression
1611 is preceded by its appearance as a parameter in an entry.
1612 Likewise check its specification expressions.
1613 (resolve_code): Update current_entry_id on EXEC_ENTRY.
1614 (resolve_charlen, resolve_fl_variable): Set and reset
1616 (is_non_constant_shape_array): Do not return on detection
1617 of a variable but continue to resolve all the expressions.
1618 (resolve_codes): set current_entry_id to an out of range
1621 2006-06-06 Mike Stump <mrs@apple.com>
1623 * Make-lang.in: Rename to htmldir to build_htmldir to avoid
1624 installing during build.
1626 2006-06-06 Paul Thomas <pault@gcc.gnu.org>
1629 * match.c (gfc_match_common): Fix code typo. Remove
1630 sym->name, since sym is NULL, and replace with name.
1632 2006-06-05 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1635 * resolve.c (compute_last_value_for_triplet): New function.
1636 (check_dimension): Correctly handle zero-sized array sections.
1637 Add checking on last element of array sections.
1639 2006-06-05 Steven G. Kargl <kargls@comcast.net>
1641 * data.c (gfc_assign_data_value): Fix comment typo. Remove
1644 2006-06-05 Paul Thomas <pault@gcc.gnu.org>
1647 * data.c (create_character_intializer): Add warning message
1648 for truncated string.
1651 * symbol.c : Include flags.h.
1652 (gfc_add_type): If a procedure and types are the same do not
1653 throw an error unless standard is less than gnu or pedantic.
1656 * parse.c (parse_do_block): Error if named block do construct
1657 does not have a named enddo.
1660 * check.c (gfc_check_associated): Pick up EXPR_NULL for pointer
1661 as well as target and put error return at end of function.
1663 2006-06-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1665 * trans.c (gfc_msg_bounds, gfc_msg_fault, gfc_msg_wrong_return):
1666 Add strings for common runtime error messages.
1667 (gfc_trans_runtime_check): Add a locus argument, use a string
1668 and not a string tree for the message.
1669 * trans.h (gfc_trans_runtime_check): Change prototype accordingly.
1670 (gfc_msg_bounds, gfc_msg_fault, gfc_msg_wrong_return): Add proto.
1671 * trans-const.c (gfc_strconst_bounds, gfc_strconst_fault,
1672 gfc_strconst_wrong_return, gfc_strconst_current_filename): Remove.
1673 (gfc_init_constants): Likewise.
1674 * trans-const.h: Likewise.
1675 * trans-decl.c (gfc_build_builtin_function_decls): Call to
1676 _gfortran_runtime_error has only one argument, the message string.
1677 * trans-array.h (gfc_conv_array_ref): Add a symbol argument and a
1679 * trans-array.c (gfc_trans_array_bound_check): Build precise
1681 (gfc_conv_array_ref): Use the new symbol argument and the locus
1682 to build more precise error messages.
1683 (gfc_conv_ss_startstride): More precise error messages.
1684 * trans-expr.c (gfc_conv_variable): Give symbol reference and
1685 locus to gfc_conv_array_ref.
1686 (gfc_conv_function_call): Use the new prototype for
1687 gfc_trans_runtime_check.
1688 * trans-stmt.c (gfc_trans_goto): Build more precise error message.
1689 * trans-io.c (set_string): Likewise.
1690 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use new prototype
1691 for gfc_trans_runtime_check.
1693 2006-06-01 Thomas Koenig <Thomas.Koenig@online.de>
1696 * arith.c: Cast the characters from the strings to unsigned
1697 char to avoid values less than 0 for extended ASCII.
1699 2006-06-01 Per Bothner <bothner@bothner.com>
1701 * data.c (gfc_assign_data_value): Handle USE_MAPPED_LOCATION.
1702 * scanner.c (gfc_gobble_whitespace): Likewise.
1704 2006-06-01 Paul Thomas <pault@gcc.gnu.org>
1708 * interface.c (compare_parameter): Return 1 if the actual arg
1709 is external and the formal is a procedure.
1710 (compare_actual_formal): If the actual argument is a variable
1711 and the formal a procedure, this an error. If a gsymbol exists
1712 for a procedure of the same name, this is not yet resolved and
1713 the error is cleared.
1715 * trans-intrinsic.c (gfc_conv_associated): Make provision for
1716 zero array length or zero string length contingent on presence
1717 of target, for consistency with standard.
1719 2006-05-30 Asher Langton <langton2@llnl.gov>
1721 * symbol.c (check_conflict): Allow external, function, and
1722 subroutine attributes with Cray pointees.
1723 * trans-expr.c (gfc_conv_function_val): Translate Cray pointees
1724 that point to procedures.
1725 * gfortran.texi: Document new feature.
1727 2006-05-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1730 * io.c (check_format): Add error for missing period in format
1731 specifier unless -std=legacy.
1732 * gfortran.texi: Add description of expanded namelist read and
1733 missing period in format extensions.
1735 2006-05-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1738 * trans-array.c (gfc_conv_array_ref): Perform out-of-bounds
1739 checking for assumed-size arrrays for all but the last dimension.
1741 2006-05-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1743 * invoke.texi: Change -fpackderived into -fpack-derived.
1745 2006-05-29 Kazu Hirata <kazu@codesourcery.com>
1747 * options.c, primary.c, resolve.c, trans-common.c: Fix typos
1750 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
1752 * check.c, expr.c, resolve.c, trans-common.c,
1753 trans-intrinsic.c, trans-stmt.c, trans-types.c: Fix comment typos.
1755 2006-05-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1758 * trans-array.c (gfc_conv_array_ref): Don't perform out-of-bounds
1759 checking for assumed-size arrrays.
1761 2006-05-27 Paul Thomas <pault@gcc.gnu.org>
1763 * trans-intrinsic.c (gfc_conv_associated): If pointer in first
1764 arguments has zero array length of zero string length, return
1767 2006-05-26 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1770 * trans-array.c (gfc_trans_dummy_array_bias): Don't use stride as
1771 a temporary variable when -fbounds-check is enabled, since its
1772 value will be needed later.
1774 2006-05-26 Thomas Koenig <Thomas.Koenig@online.de>
1777 * io.c (match_io): print (1,*) is an error.
1779 2006-05-26 Paul Thomas <pault@gcc.gnu.org>
1782 * resolve.c (find_array_spec): Add gfc_symbol, derived, and
1783 use to track repeated component references.
1787 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Use
1788 se->string_length throughout and use memcpy to populate the
1789 expression returned to the scalarizer.
1790 (gfc_size_in_bytes): New function.
1792 2006-05-21 Paul Thomas <pault@gcc.gnu.org>
1795 * primary.c (gfc_match_rvalue): Test if symbol represents a
1796 direct recursive function reference. Error if array valued,
1797 go to function0 otherwise.
1799 2006-05-21 Paul Thomas <pault@gcc.gnu.org>
1802 * interface.c (gfc_extend_assign): Use new EXEC_ASSIGN_CALL.
1803 * gfortran.h : Put EXEC_ASSIGN_CALL in enum.
1804 * trans-stmt.c (gfc_conv_elemental_dependencies): New function.
1805 (gfc_trans_call): Call it. Add new boolian argument to flag
1806 need for dependency checking. Assert intent OUT and IN for arg1
1808 (gfc_trans_forall_1): Use new code EXEC_ASSIGN_CALL.
1809 trans-stmt.h : Modify prototype of gfc_trans_call.
1810 trans.c (gfc_trans_code): Add call for EXEC_ASSIGN_CALL.
1811 st.c (gfc_free_statement): Free actual for EXEC_ASSIGN_CALL.
1812 * dependency.c (gfc_check_fncall_dependency): Don't check other
1816 * resolve.c : Remove resolving_index_expr.
1817 (entry_parameter): Remove.
1818 (gfc_resolve_expr, resolve_charlen, resolve_fl_variable): Lift
1819 calls to entry_parameter and references to resolving_index_expr.
1822 * check.c (gfc_check_associated): Replace NULL assert with an
1823 error message, since it is possible to generate bad code that
1824 has us fall through to here..
1827 * iresolve.c (maxloc, minloc): If DIM is not present, pass the
1828 rank of ARRAY as the shape of the result. Otherwise, pass the
1829 shape of ARRAY, less the dimension DIM.
1830 (maxval, minval): The same, when DIM is present, otherwise no
1833 2006-05-19 H.J. Lu <hongjiu.lu@intel.com>
1836 * trans-array.c (gfc_conv_expr_descriptor): Don't zero the
1837 first stride to indicate a temporary.
1838 * trans-expr.c (gfc_conv_function_call): Likewise.
1840 2006-05-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1841 Feng Wang <fengwang@nudt.edu.cn>
1844 * dump-parse-tree.c (gfc_show_expr): Deal with Hollerith constants.
1845 * data.c (create_character_intializer): Set from_H flag if character is
1846 initialized by Hollerith constant.
1848 2006-05-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1851 * resolve.c (resolve_call, resolve_function): Issue an error
1852 if a function or subroutine call is recursive but the function or
1853 subroutine wasn't declared as such.
1855 2006-05-07 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1858 * gfortran.dg/recursive_check_1.f: New test.
1861 2006-05-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1864 * dump-parse-tree.c (gfc_show_code_node): Try harder to find the
1865 called procedure name.
1867 2006-05-17 Jakub Jelinek <jakub@redhat.com>
1870 * trans-openmp.c (gfc_trans_omp_parallel_do,
1871 gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare): Set
1872 OMP_PARALLEL_COMBINED flag.
1874 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
1877 * Make-lang.in (GFORTRAN_D_OBJS): Replace gcc.o with
1880 2006-05-15 Paul Thomas <pault@gcc.gnu.org>
1883 * resolve.c: Static resolving_index_expr initialized.
1884 (entry_parameter): New function to emit errors for variables
1885 that are not entry parameters.
1886 (gfc_resolve_expr): Call entry_parameter, when resolving
1887 variables, if the namespace has entries and resolving_index_expr
1889 (resolve_charlen): Set resolving_index_expr before the call to
1890 resolve_index_expr and reset it afterwards.
1891 (resolve_fl_variable): The same before and after the call to
1892 is_non_constant_shape_array, which ultimately makes a call to
1896 * resolve.c (resolve_code): Add error condition that the return
1897 expression must be scalar.
1900 * matchexp.c (gfc_get_parentheses): New function.
1901 (match_primary): Remove inline code and call above.
1902 * gfortran.h: Provide prototype for gfc_get_parentheses.
1903 * resolve.c (resolve_array_ref): Call the above, when start is a
1904 derived type variable array reference.
1906 2006-05-15 Jakub Jelinek <jakub@redhat.com>
1909 * trans-openmp.c (gfc_trans_omp_array_reduction): Ensure
1910 OMP_CLAUSE_REDUCTION_{INIT,MERGE} are set to BIND_EXPR.
1912 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
1914 * Make-lang.in (fortran/options.o): Depend on $(TARGET_H).
1916 2006-05-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1919 * parse.c (next_free): Return instead of calling decode_statement
1922 2005-05-10 Thomas Koenig <Thomas.Koenig@online.de>
1925 * trans-array.c(gfc_array_allocate): If ref->next exists
1926 that is if there is a statement like ALLOCATE(foo%bar(2)),
1927 F95 rules require that bar should be a pointer.
1929 2006-05-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1932 * resolve.c (gfc_resolve_index): Make REAL array indices a
1933 GFC_STD_LEGACY feature.
1935 2006-05-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1938 * parse.c (reject_statement): Clear gfc_new_block.
1940 2006-05-09 Steven G. Kargl <kargls@comcast.net>
1942 * invoke.texi: Missed file in previous commit. Update
1943 description of -fall-intrinsics
1945 2006-05-07 Steven Boscher <steven@gcc.gnu.org>
1948 * parse.c (next_statement): Add check to avoid an ICE when
1949 gfc_current_locus.lb is not set.
1951 2006-05-07 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
1954 * match.c (match_case_eos): Error out on garbage following
1957 2006-05-07 Paul Thomas <pault@gcc.gnu.org>
1960 * trans-array.c (get_array_ctor_strlen): Remove static attribute.
1961 * trans.h: Add prototype for get_array_ctor_strlen.
1962 * trans-intrinsic.c (gfc_conv_intrinsic_len): Switch on EXPR_ARRAY
1963 and call get_array_ctor_strlen.
1965 2006-05-05 Steven G. Kargl <kargls@comcast.net>
1967 * invoke.texi: Update description of -fall-intrinsics
1968 * options.c (gfc_post_options): Disable -Wnonstd-intrinsics if
1969 -fall-intrinsics is used.
1970 (gfc_handle_option): Permit -Wno-nonstd-intrinsics.
1972 2006-05-04 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
1974 * simplify.c (ascii_table): Fix wrong entry.
1976 2006-05-02 Steven G. Kargl <kargls@comcast.net>
1979 * lang.opt: Fix -Wtab description
1982 * lang.opt: New flag -fall-intrinsics.
1983 * invoke.texi: Document option.
1984 * gfortran.h (options_t): New member flag_all_intrinsics.
1985 * options.c (gfc_init_options, gfc_handle_option): Set new option.
1986 sort nearby misplaced options.
1987 * intrinsic.c (add_sym, make_generic, make_alias): Use it.
1989 2006-05-02 Paul Thomas <pault@gcc.gnu.org>
1992 * module.c: Add static flag in_load_equiv.
1993 (mio_expr_ref): Return if no symtree and in_load_equiv.
1994 (load_equiv): If any of the equivalence members have no symtree, free
1995 the equivalence and the associated expressions.
1998 * trans-common.c (gfc_trans_common): Invert the order of calls to
1999 finish equivalences and gfc_commit_symbols.
2001 2006-04-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2004 * simplify.c (simplify_len): Character variables with constant
2005 length can be simplified.
2007 2006-04-29 H.J. Lu <hongjiu.lu@intel.com>
2010 * trans-array.c (gfc_conv_array_transpose): Move gcc_assert
2011 before gfc_conv_expr_descriptor.
2013 2006-04-23 Paul Thomas <pault@gcc.gnu.org>
2016 * resolve.c (resolve_call): Check conformity of elemental
2017 subroutine actual arguments.
2019 2006-04-22 Jakub Jelinek <jakub@redhat.com>
2022 * iresolve.c (gfc_resolve_reshape): Use reshape_r16 for real(16).
2023 (gfc_resolve_transpose): Use transpose_r16 for real(16).
2025 2006-04-21 Paul Thomas <pault@gcc.gnu.org>
2028 * resolve.c (resolve_function): Remove general restriction on auto
2029 character length function interfaces.
2030 (gfc_resolve_uops): Check restrictions on defined operator
2032 (resolve_types): Call the check for defined operators.
2035 * trans-array.c (gfc_trans_array_constructor_subarray): Remove
2036 redundant gfc_todo_error.
2037 (get_array_ctor_var_strlen): Remove typo in enum.
2039 2006-04-18 Bernhard Fischer <aldot@gcc.gnu.org>
2041 * parse.c (next_free): Use consistent error string between
2042 free-form and fixed-form for illegal statement label of zero.
2043 (next_fixed): Use consistent warning string between free-form
2044 and fixed-form for statement labels for empty statements.
2046 2006-04-18 Steve Ellcey <sje@cup.hp.com>
2048 * trans-io.c (gfc_build_io_library_fndecls): Align pad.
2050 2006-04-16 Thomas Koenig <Thomas.Koenig@online.de>
2053 * trans-array.c(gfc_array_init_size): Introduce or_expr
2054 which is true if the size along any dimension
2055 is negative. Create a temporary variable with base
2056 name size. If or_expr is true, set the temporary to 0,
2057 to the normal size otherwise.
2059 2006-04-16 Paul Thomas <pault@gcc.gnu.org>
2062 * intrinsic.c (add_functions): Mark LOGICAL as elemental.
2065 * expr.c (gfc_check_assign): Extend scope of error to include
2066 assignments to a procedure in the main program or, from a
2067 module or internal procedure that is not that represented by
2068 the lhs symbol. Use VARIABLE rather than l-value in message.
2071 * trans-array.c (gfc_trans_deferred_array): If the backend_decl
2072 is not a descriptor, dereference and then test and use the type.
2075 * trans-decl.c (gfc_trans_deferred_vars): Check if an array
2076 result, is also automatic character length. If so, process
2077 the character length.
2082 * trans_intrinsic.c (gfc_walk_intrinsic_bound): Set
2083 data.info.dimen for bound intrinsics.
2084 * trans_array.c (gfc_conv_ss_startstride): Pick out LBOUND and
2085 UBOUND intrinsics and supply their shape information to the ss
2089 * trans_expr.c (gfc_trans_function_call): Add a new block, post,
2090 in to which all the argument post blocks are put. Add this block
2091 to se->pre after a byref call or to se->post, otherwise.
2093 2006-04-14 Roger Sayle <roger@eyesopen.com>
2095 * trans-io.c (set_string): Use fold_build2 and build_int_cst instead
2096 of build2 and convert to construct "x < 0" rather than "x <= -1".
2098 2006-04-13 Richard Henderson <rth@redhat.com>
2100 * trans-openmp.c (gfc_trans_omp_sections): Adjust for changed
2101 number of operands to OMP_SECTIONS.
2103 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
2105 * gfortran.texi: Fix typos. Follow spelling conventions.
2106 * resolve.c, trans-expr.c, trans-stmt.c: Fix comment typos.
2107 Follow spelling conventions.
2109 2006-04-05 Roger Sayle <roger@eyesopen.com>
2111 * dependency.c (get_no_elements): Delete function.
2112 (get_deps): Delete function.
2113 (transform_sections): Delete function.
2114 (gfc_check_section_vs_section): Significant rewrite.
2116 2006-04-04 H.J. Lu <hongjiu.lu@intel.com>
2119 * trans-array.c (gfc_conv_expr_descriptor): Only dereference
2120 character pointer when copying temporary.
2123 * trans-array.c (gfc_conv_expr_descriptor): Properly copy
2124 temporary character with non constant size.
2126 2006-04-03 Paul Thomas <pault@gcc.gnu.org>
2129 * trans.h: Prototype for gfc_conv_missing_dummy.
2130 * trans-expr (gfc_conv_missing_dummy): New function
2131 (gfc_conv_function_call): Call it and tidy up some of the code.
2132 * trans-intrinsic (gfc_conv_intrinsic_function_args): The same.
2135 * array.c (gfc_array_dimen_size): If available, return shape[dimen].
2136 * resolve.c (resolve_function): If available, use the argument
2137 shape for the function expression.
2138 * iresolve.c (gfc_resolve_transfer): Set shape[0] = size.
2140 2006-04-02 Erik Edelmann <eedelman@gcc.gnu.org>
2142 * trans-array.c (gfc_trans_dealloc_allocated): Take a
2143 tree representation of the array to be deallocated as argument
2144 instead of its gfc_symbol.
2145 (gfc_trans_deferred_array): Update call to
2146 gfc_trans_dealloc_allocated.
2147 * trans-array.h (gfc_trans_dealloc_allocated): Update
2149 * trans-expr.c (gfc_conv_function_call): Update call to
2150 gfc_trans_dealloc_allocated, get indirect reference to dummy
2153 2006-04-01 Roger Sayle <roger@eyesopen.com>
2156 * trans-array.c (gfc_trans_allocate_array_storage): In array index
2157 calculations use gfc_index_zero_node and gfc_index_one_node instead
2158 of integer_zero_node and integer_one_node respectively.
2159 (gfc_conv_array_transpose): Likewise.
2160 (gfc_conv_ss_startstride): Likewise.
2161 (gfc_trans_dummy_array_bias): Likewise.
2163 2006-04-01 Roger Sayle <roger@eyesopen.com>
2165 * dependency.c (gfc_is_inside_range): Delete.
2166 (gfc_check_element_vs_section): Significant rewrite.
2168 2006-04-01 Roger Sayle <roger@eyesopen.com>
2170 * dependency.c (gfc_dep_compare_expr): Strip parentheses and unary
2171 plus operators when comparing expressions. Handle comparisons of
2172 the form "X+C vs. X", "X vs. X+C", "X-C vs. X" and "X vs. X-C" where
2173 C is an integer constant. Handle comparisons of the form "P+Q vs.
2174 R+S" and "P-Q vs. R-S". Handle comparisons of integral extensions
2175 specially (increasing functions) so extend(A) > extend(B), when A>B.
2176 (gfc_check_element_vs_element): Move test later, so that we ignore
2177 the fact that "A < B" or "A > B" when A or B contains a forall index.
2179 2006-03-31 Asher Langton <langton2@llnl.gov>
2182 * expr.c (gfc_check_assign): Allow cray pointee to be assumes-size.
2184 2006-03-30 Paul Thomas <paulthomas2@wanadoo.fr>
2185 Bud Davis <bdavis9659@sbcglobal.net>
2188 * module.c (load_needed): Traverse entire tree before returning.
2190 2006-03-30 Roger Sayle <roger@eyesopen.com>
2193 * trans.c (gfc_trans_runtime_check): Promote the arguments of
2194 __builtin_expect to the correct types, and the result back to
2197 2006-03-29 Carlos O'Donell <carlos@codesourcery.com>
2199 * Make-lang.in: Rename docdir to gcc_docdir.
2201 2006-03-28 Steven G. Kargl <kargls@comcast.net>
2203 * intrinsic.texi: s/floor/float in previous commit.
2205 2006-03-28 Paul Thomas <pault@gcc.gnu.org>
2208 * resolve.c (resolve_fl_procedure): Do not check the access of
2209 derived types for internal procedures.
2211 2006-03-27 Jakub Jelinek <jakub@redhat.com>
2213 * io.c (check_io_constraints): Don't look at
2214 dt->advance->value.charater.string, unless it is a CHARACTER
2217 * f95-lang.c (gfc_get_alias_set): New function.
2218 (LANG_HOOKS_GET_ALIAS_SET): Define.
2220 2006-03-25 Steven G. Kargl <kargls@comcast.net>
2223 * intrinsic.c (add_functions): Allow FLOAT to accept all integer kinds.
2224 * intrinsic.texi: Document FLOAT.
2226 2006-03-25 Thomas Koenig <Thomas.Koenig@online.de>
2229 * iresolve.c (gfc_resolve_reshape): Remove doubling of
2230 kind for complex. For real(kind=10), call reshape_r10.
2231 (gfc_resolve_transpose): For real(kind=10), call
2234 2006-03-25 Roger Sayle <roger@eyesopen.com>
2236 * dependency.c (gfc_check_dependency): Improve handling of pointers;
2237 Two variables of different types can't have a dependency, and two
2238 variables with the same symbol are equal, even if pointers.
2240 2006-03-24 Roger Sayle <roger@eyesopen.com>
2242 * gfortran.h (gfc_symbol): Add a new "forall_index" bit field.
2243 * match.c (match_forall_iterator): Set forall_index field on
2244 the iteration variable's symbol.
2245 * dependency.c (contains_forall_index_p): New function to
2246 traverse a gfc_expr to check whether it contains a variable
2247 with forall_index set in it's symbol.
2248 (gfc_check_element_vs_element): Return GFC_DEP_EQUAL for scalar
2249 constant expressions that don't variables used as FORALL indices.
2251 2006-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2254 * error.c (gfc_fatal_error): Return ICE_EXIT_CODE instead of 4.
2256 2006-03-22 Thomas Koenig <Thomas.Koenig@online.de>
2259 * gfortran.h (gfc_option_t): Add record_marker.
2260 * lang.opt: Add -frecord-marker=4 and -frecord-marker=8.
2261 * trans-decl.c: Add gfor_fndecl_set_record_marker.
2262 (gfc_build_builtin_function_decls): Set
2263 gfor_fndecl_set_record_marker.
2264 (gfc_generate_function_code): If we are in the main program
2265 and -frecord-marker was provided, call set_record_marker.
2266 * options.c (gfc_handle_option): Add handling for
2267 -frecord-marker=4 and -frecord-marker=8.
2268 * invoke.texi: Document -frecord-marker.
2270 2006-03-22 Paul Thomas <pault@gcc.gnu.org>
2273 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): New
2274 function to implement array valued TRANSFER intrinsic.
2275 (gfc_conv_intrinsic_function): Call the new function if TRANSFER
2276 and non-null se->ss.
2277 (gfc_walk_intrinsic_function): Treat TRANSFER as one of the
2278 special cases by calling gfc_walk_intrinsic_libfunc directly.
2280 2006-03-21 Toon Moene <toon@moene.indiv.nluug.nl>
2282 * options.c (gfc_init_options): Initialize
2283 flag_argument_noalias to 3.
2285 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de>
2288 * iresolve.c (gfc_resolve_maxloc): If mask is scalar,
2289 prefix the function name with an "s". If the mask is scalar
2290 or if its kind is smaller than gfc_default_logical_kind,
2291 coerce it to default kind.
2292 (gfc_resolve_maxval): Likewise.
2293 (gfc_resolve_minloc): Likewise.
2294 (gfc_resolve_minval): Likewise.
2295 (gfc_resolve_product): Likewise.
2296 (gfc_resolve_sum): Likewise.
2298 2006-03-19 Paul Thomas <pault@gcc.gnu.org>
2301 *expr.c (external_spec_function): Permit elemental functions.
2304 *interface.c (compare_actual_formal): Detect call for procedure
2305 usage and require rank checking, in this case, for assumed shape
2306 and deferred shape arrays.
2307 (gfc_procedure_use): Revert to pre-PR25070 call to
2308 compare_actual_formal that does not require rank checking..
2310 2006-03-16 Roger Sayle <roger@eyesopen.com>
2312 * gfortran.h (gfc_equiv_info): Add length field.
2313 * trans-common.c (copy_equiv_list_to_ns): Set the length field.
2314 * dependency.c (gfc_are_equivalenced_arrays): Use both the offset
2315 and length fields to determine whether the two equivalenced symbols
2318 2006-03-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2321 * gfortran.h: Add warn_ampersand.
2322 * invoke.texi: Add documentation for new option.
2323 * lang.opt: Add Wampersand.
2324 * options.c (gfc_init_options): Initialize warn_ampersand.
2325 (gfc_post_options): Set the warn if pedantic.
2326 (set_Wall): Set warn_ampersand.
2327 (gfc_handle_option: Add Wampersand for itself, -std=f95, and -std=f2003.
2328 * scanner.c (gfc_next_char_literal): Add test for missing '&' in
2329 continued character constant and give warning if missing.
2331 2006-03-14 Steven G. Kargl <kargls@comcast.net>
2334 * gfortran.h: Wrap Copyright line.
2335 (gfc_option_t): add warn_tabs member.
2336 * lang.opt: Update Coyright year. Add the Wtabs.
2337 * invoke.texi: Document -Wtabs.
2338 * scanner.c (gfc_gobble_whitespace): Use warn_tabs. Add linenum to
2339 suppress multiple warnings.
2340 (load_line): Use warn_tabs. Add linenum, current_line, seen_comment
2341 to suppress multiple warnings.
2342 * options.c (gfc_init_options): Initialize warn_tabs.
2343 (set_Wall): set warn_tabs for -Wall.
2344 (gfc_post_options): Adjust flag_tabs depending on -pedantic.
2345 (gfc_handle_option): Process command-line option -W[no-]tabs
2347 2006-03-13 Paul Thomas <pault@gcc.gnu.org>
2350 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Set the initial position to zero and
2351 modify the condition for updating it, to implement the F2003 requirement for all(mask)
2354 2006-03-13 Jakub Jelinek <jakub@redhat.com>
2356 * trans-openmp.c (gfc_trans_omp_variable): Handle references
2358 * trans-expr.c (gfc_conv_variable): Remove useless setting
2359 of parent_flag, formatting.
2361 * trans-decl.c (gfc_get_fake_result_decl): Re-add setting of
2362 GFC_DECL_RESULT flag.
2364 2003-03-11 Roger Sayle <roger@eyesopen.com>
2366 * dependency.c (gfc_dep_compare_expr) <EXPR_OP>: Allow unary and
2367 binary operators to compare equal if their operands are equal.
2368 <EXPR_FUNCTION>: Allow "constant" intrinsic conversion functions
2369 to compare equal, if their operands are equal.
2371 2006-03-11 Erik Edelmann <eedelman@gcc.gnu.org>
2373 * symbol.c (check_conflict): Allow allocatable function results,
2374 except for elemental functions.
2375 * trans-array.c (gfc_trans_allocate_temp_array): Rename to ...
2376 (gfc_trans_create_temp_array): ... this, and add new argument
2378 (gfc_trans_array_constructor, gfc_conv_loop_setup): Update call
2379 to gfc_trans_allocate_temp_array.
2380 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
2381 * trans-expr.c (gfc_conv_function_call): Use new arg of
2382 gfc_trans_create_temp_array avoid pre-allocation of temporary
2383 result variables of pointer AND allocatable functions.
2384 (gfc_trans_arrayfunc_assign): Return NULL for allocatable
2386 * resolve.c (resolve_symbol): Copy value of 'allocatable' attribute
2387 from sym->result to sym.
2389 2006-03-09 Erik Edelmann <eedelman@gcc.gnu.org>
2391 * trans-expr.c (gfc_add_interface_mapping): Copy 'allocatable'
2392 attribute from sym to new_sym. Call build_fold_indirect_ref()
2393 for allocatable arguments.
2395 2006-03-09 Paul Thomas <pault@gcc.gnu.org>
2398 * trans-array.c (gfc_conv_expr_descriptor): Exclude calculation of
2399 the offset and data when se->data_not_needed is set.
2400 * trans.h: Include the data_not_need bit in gfc_se.
2401 * trans-intrinsic.c (gfc_conv_intrinsic_size): Set it for SIZE.
2403 2006-03-06 Paul Thomas <pault@gcc.gnu.org>
2404 Erik Edelmann <eedelman@gcc.gnu.org>
2406 * trans-array.c (gfc_trans_dealloc_allocated): New function.
2407 (gfc_trans_deferred_array): Use it, instead of inline code.
2408 * trans-array.h: Prototype for gfc_trans_dealloc_allocated().
2409 * trans-expr.c (gfc_conv_function_call): Deallocate allocated
2410 ALLOCATABLE, INTENT(OUT) arguments upon procedure entry.
2412 2006-03-06 Paul Thomas <pault@gcc.gnu.org>
2415 * resolve.c (resolve_function): Add name after test for pureness.
2418 * trans-expr.c (gfc_conv_variable): Detect reference to parent result,
2419 store current_function_decl, replace with parent, whilst calls are
2420 made to gfc_get_fake_result_decl, and restore afterwards. Signal this
2421 to gfc_get_fake_result_decl with a new argument, parent_flag.
2422 * trans-stmt.c (gfc_trans_return): gfc_get_fake_result_decl 2nd arg
2424 * trans.h: Add parent_flag to gfc_get_fake_result_decl prototype.
2425 * trans-decl.c (gfc_get_fake_result_decl): On parent_flag, being set,
2426 add decl to parent function. Replace refs to current_fake_result_decl
2427 with refs to this_result_decl.
2428 (gfc_generate_function_code): Null parent_fake_result_decl before the
2429 translation of code for contained procedures. Set parent_flag to zero
2430 in call to gfc_get_fake_result_decl.
2431 * trans-intrinsic.c (gfc_conv_intrinsic_len): The same.
2433 2006-03-05 Steven G. Kargl <kargls@comcast.net>
2435 * simplify.c (gfc_simplify_verify): Fix return when SET=''.
2437 2006-03-05 Erik Edelmann <eedelman@gcc.gnu.org>
2440 * symbol.c (conf_std): New macro.
2441 (check_conflict): Use it to allow ALLOCATABLE dummy
2442 arguments for F2003.
2443 * trans-expr.c (gfc_conv_function_call): Pass the
2444 address of the array descriptor when dummy argument is
2446 * interface.c (compare_allocatable): New function.
2447 (compare_actual_formal): Use it.
2448 * resolve.c (resolve_deallocate_expr,
2449 resolve_allocate_expr): Check that INTENT(IN) variables
2450 aren't (de)allocated.
2451 * gfortran.texi (Fortran 2003 status): List ALLOCATABLE
2452 dummy arguments as supported.
2454 2006-03-03 Roger Sayle <roger@eyesopen.com>
2456 * dependency.c (gfc_check_element_vs_element): Revert last change.
2458 2006-03-03 Roger Sayle <roger@eyesopen.com>
2460 * dependency.c (gfc_check_element_vs_element): Consider two
2461 unordered scalar subscripts as (potentially) equal.
2463 2006-03-03 Roger Sayle <roger@eyesopen.com>
2465 * dependency.c (gfc_check_dependency): Call gfc_dep_resolver to
2466 check whether two array references have a dependency.
2467 (gfc_check_element_vs_element): Assume lref and rref must be
2468 REF_ARRAYs. If gfc_dep_compare_expr returns -2, assume these
2469 references could potentially overlap.
2470 (gfc_dep_resolver): Whitespace and comment tweaks. Assume a
2471 dependency if the references have different depths. Rewrite
2472 final term to clarrify we only have a dependency for overlaps.
2474 2006-03-03 Thomas Koenig <Thomas.Koenig@online.de>
2477 * trans-array.h: Adjust gfc_array_allocate prototype.
2478 * trans-array.c (gfc_array_allocate): Change type of
2479 gfc_array_allocatate to bool. Function returns true if
2480 it operates on an array. Change second argument to gfc_expr.
2481 Find last reference in chain.
2482 If the function operates on an allocatable array, emit call to
2483 allocate_array() or allocate64_array().
2484 * trans-stmt.c (gfc_trans_allocate): Code to follow to last
2485 reference has been moved to gfc_array_allocate.
2486 * trans.h: Add declaration for gfor_fndecl_allocate_array and
2487 gfor_fndecl_allocate64_array.
2488 (gfc_build_builtin_function_decls): Add gfor_fndecl_allocate_array
2489 and gfor_fndecl_allocate64_array.
2491 2006-03-01 Roger Sayle <roger@eyesopen.com>
2493 * trans-stmt.c (generate_loop_for_temp_to_lhs): Add an additional
2494 INVERT argument to invert the sense of the WHEREMASK argument.
2495 Remove unneeded code to AND together a list of masks.
2496 (generate_loop_for_rhs_to_temp): Likewise.
2497 (gfc_trans_assign_need_temp): Likewise.
2498 (gfc_trans_forall_1): Likewise.
2499 (gfc_evaluate_where_mask): Likewise, add a new INVERT argument
2500 to specify the sense of the MASK argument.
2501 (gfc_trans_where_assign): Likewise.
2502 (gfc_trans_where_2): Likewise. Restructure code that decides
2503 whether we need to allocate zero, one or two temporary masks.
2504 If this is a top-level WHERE (i.e. the incoming MASK is NULL),
2505 we only need to allocate at most one temporary mask, and can
2506 invert it's sense to provide the complementary pending execution
2507 mask. Only calculate the size of the required temporary arrays
2509 (gfc_trans_where): Update call to gfc_trans_where_2.
2511 2006-03-01 Paul Thomas <pault@gcc.gnu.org>
2513 * iresolve.c (gfc_resolve_dot_product): Remove any difference in
2514 treatment of logical types.
2515 * trans-intrinsic.c (gfc_conv_intrinsic_dot_product): New function.
2518 * trans-decl.c (gfc_get_symbol_decl): Extend condition that symbols
2519 must be referenced to include unreferenced symbols in an interface
2523 * trans-array.c (gfc_conv_resolve_dependencies): Add call to
2524 gfc_are_equivalenced_arrays.
2525 * symbol.c (gfc_free_equiv_infos, gfc_free_equiv_lists): New
2526 functions. (gfc_free_namespace): Call them.
2527 * trans-common.c (copy_equiv_list_to_ns): New function.
2528 (add_equivalences): Call it.
2529 * gfortran.h: Add equiv_lists to gfc_namespace and define
2530 gfc_equiv_list and gfc_equiv_info.
2531 * dependency.c (gfc_are_equivalenced_arrays): New function.
2532 (gfc_check_dependency): Call it.
2533 * dependency.h: Prototype for gfc_are_equivalenced_arrays.
2535 2006-03-01 Roger Sayle <roger@eyesopen.com>
2537 * dependency.c (gfc_is_same_range): Compare the stride, lower and
2538 upper bounds when testing array reference ranges for equality.
2539 (gfc_check_dependency): Fix indentation whitespace.
2540 (gfc_check_element_vs_element): Likewise.
2541 (gfc_dep_resolver): Likewise.
2543 2006-02-28 Thomas Koenig <Thomas.Koenig@online.de>
2545 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc):
2546 If the mask expression exists and has rank 0, enclose the
2547 generated loop in an "if (mask)". Put the default
2548 initialization into the else branch.
2550 2006-02-25 Thomas Koenig <Thomas.Koenig@online.de>
2553 * trans-intrinsic.c (gfc_conv_intrinsic_arith): If the
2554 mask expression exists and has rank 0, enclose the generated
2555 loop in an "if (mask)".
2556 * (gfc_conv_intrinsic_minmaxloc): Likewise.
2558 2006-02-24 Paul Thomas <pault@gcc.gnu.org>
2561 * resolve.c (resolve_contained_functions, resolve_types,
2562 gfc_resolve): Revert patch of 2006-02-19.
2564 2006-02-24 Paul Thomas <pault@gcc.gnu.org>
2567 * dependency.c (gfc_is_same_range): Correct typo.
2568 (gfc_check_section_vs_section): Call gfc_is_same_range.
2571 * trans-common.c (add_equivalences): Add a new flag that is set when
2572 an equivalence is seen that prevents more from being reset until the
2573 start of a new traversal of the list, thus ensuring completion of
2574 all the equivalences.
2576 2006-02-23 Erik Edelmann <eedelman@gcc.gnu.org>
2578 * module.c (read_module): Remove redundant code lines.
2580 2006-02-20 Rafael
\81Ávila de Esp
\81índola <rafael.espindola@gmail.com>
2581 * Make-lang.in (FORTRAN): Remove
2582 (.PHONY): Remove F95 and f95. Add fortran
2584 2006-02-20 Roger Sayle <roger@eyesopen.com>
2586 * trans-stmt.c (gfc_trans_where_2): Avoid updating unused current
2587 execution mask for empty WHERE/ELSEWHERE clauses. Don't allocate
2588 temporary mask arrays if they won't be used.
2590 2006-02-20 Roger Sayle <roger@eyesopen.com>
2592 * trans-stmt.c (gfc_trans_where_assign): Remove code to handle
2593 traversing a linked list of MASKs. The MASK is now always a
2594 single element requiring no ANDing during the assignment.
2596 2006-02-19 Thomas Koenig <Thomas.Koenig@online.de>
2598 * gfortran.texi: Document environment variables which
2599 influence runtime behavior.
2601 2006-02-19 H.J. Lu <hongjiu.lu@intel.com>
2603 * resolve.c (resolve_contained_functions): Call resolve_entries
2605 (resolve_types): Remove calls to resolve_entries and
2606 resolve_contained_functions.
2607 (gfc_resolve): Call resolve_contained_functions.
2609 2006-02-19 Erik Edelmann <eedelman@gcc.gnu.org>
2612 * intrinsic.c (gfc_convert_type_warn): Call
2613 gfc_intrinsic_symbol() on the newly created symbol.
2615 2006-02-19 Paul Thomas <pault@gcc.gnu.org>
2618 * resolve.c (is_non_constant_shape_array): New function.
2619 (resolve_fl_variable): Remove code for the new function and call it.
2620 (resolve_fl_namelist): New function. Add test for namelist array
2621 with non-constant shape, using is_non_constant_shape_array.
2622 (resolve_symbol): Remove code for resolve_fl_namelist and call it.
2625 * match.c (match_namelist): Increment the refs field of an accepted
2626 namelist object symbol.
2627 * resolve.c (resolve_fl_namelist): Test namelist objects for a conflict
2628 with contained or module procedures.
2630 2006-02-18 Roger Sayle <roger@eyesopen.com>
2632 * trans-stmt.c (struct temporary_list): Delete.
2633 (gfc_trans_where_2): Major reorganization. Remove no longer needed
2634 TEMP argument. Allocate and deallocate the control mask and
2635 pending control mask locally.
2636 (gfc_trans_forall_1): Delete TEMP local variable, and update
2637 call to gfc_trans_where_2. No need to deallocate arrays after.
2638 (gfc_evaluate_where_mask): Major reorganization. Change return
2639 type to void. Pass in parent execution mask, MASK, and two
2640 already allocated mask arrays CMASK and PMASK. On return
2641 CMASK := MASK & COND, PMASK := MASK & !COND. MASK, CMASK and
2642 CMASK may all be NULL, or refer to the same temporary arrays.
2643 (gfc_trans_where): Update call to gfc_trans_where_2. We no
2644 longer need a TEMP variable or to deallocate temporary arrays
2645 allocated by gfc_trans_where_2.
2647 2006-02-18 Danny Smith <dannysmith@users.sourceforeg.net>
2649 * gfortran.h (gfc_add_attribute): Change uint to unsigned int.
2650 * symbol.c (gfc_add_attribute): Likewise for definition.
2651 * resolve.c (resolve_global_procedure): Likewise for variable 'type'.
2653 2006-02-17 Richard Sandiford <richard@codesourcery.com>
2655 * trans-common.c: Include rtl.h earlier.
2656 * trans-decl.c: Likewise.
2658 2006-02-16 Jakub Jelinek <jakub@redhat.com>
2661 * parse.c (parse_omp_do, parse_omp_structured_block): Call
2662 gfc_commit_symbols and gfc_warning_check.
2664 * openmp.c (resolve_omp_clauses): Add a dummy case label to workaround
2665 PR middle-end/26316.
2667 2006-02-16 Paul Thomas <pault@gcc.gnu.org>
2670 * trans-expr.c (gfc_add_interface_mapping): Use the actual argument
2671 for character(*) arrays, rather than casting to the type and kind
2672 parameters of the formal argument.
2674 2006-02-15 Toon Moene <toon@moene.indiv.nluug.nl>
2677 * options.c: Do not warn for Fortran 2003 features by default.
2679 2006-02-15 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
2681 * check.c: Update copyright years.
2683 * check.c (gfc_check_minloc_maxloc, check_reduction): Don't call
2684 dim_range_check on not-present optional dim argument.
2686 2006-02-15 Jakub Jelinek <jakub@redhat.com>
2690 * Make-lang.in (install-finclude-dir): New goal.
2691 (fortran.install-common): Depend on install-finclude-dir.
2692 * lang-specs.h: If not -nostdinc, add -I finclude.
2694 2006-02-14 Thomas Koenig <Thomas.Koenig@online.de>
2697 * check.c (dim_check): Perform all checks if dim is optional.
2698 (gfc_check_minloc_maxloc): Use dim_check and dim_rank_check
2699 to check dim argument.
2700 (check_reduction): Likewise.
2702 2006-02-14 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
2705 * io.c (match_ltag): Mark label as referenced.
2707 2006-02-14 Jakub Jelinek <jakub@redhat.com>
2708 Richard Henderson <rth@redhat.com>
2709 Diego Novillo <dnovillo@redhat.com>
2711 * invoke.texi: Document -fopenmp.
2712 * gfortran.texi (Extensions): Document OpenMP.
2714 Backport from gomp-20050608-branch
2715 * trans-openmp.c: Call build_omp_clause instead of
2716 make_node when creating OMP_CLAUSE_* trees.
2717 (gfc_trans_omp_reduction_list): Remove argument 'code'.
2720 * trans.h (build4_v): Define.
2721 * trans-openmp.c: Call build4_v to create OMP_PARALLEL nodes.
2722 Call build3_v to create OMP_SECTIONS nodes.
2725 * openmp.c (gfc_match_omp_variable_list): Call gfc_set_sym_referenced
2726 on all symbols added to the variable list.
2728 * openmp.c (gfc_match_omp_clauses): Fix check for non-INTRINSIC
2729 procedure symbol in REDUCTION.
2731 * trans-openmp.c (gfc_trans_omp_array_reduction): Use gfc_add
2732 for MINUS_EXPR OMP_CLAUSE_REDUCTION_CODE.
2734 * trans-openmp.c (gfc_trans_omp_do): Add PBLOCK argument. If PBLOCK
2735 is non-NULL, evaluate INIT/COND/INCR and chunk size expressions in
2736 that statement block.
2737 (gfc_trans_omp_parallel_do): Pass non-NULL PBLOCK to gfc_trans_omp_do
2738 for non-ordered non-static combined loops.
2739 (gfc_trans_omp_directive): Pass NULL PBLOCK to gfc_trans_omp_do.
2741 * openmp.c: Include target.h and toplev.h.
2742 (gfc_match_omp_threadprivate): Emit diagnostic if target does
2744 * Make-lang.in (fortran/openmp.o): Add dependencies on
2745 target.h and toplev.h.
2747 * trans-decl.c (gfc_get_fake_result_decl): Set GFC_DECL_RESULT.
2748 * trans-openmp.c (gfc_omp_privatize_by_reference): Make
2749 DECL_ARTIFICIAL vars predetermined shared except GFC_DECL_RESULT.
2750 (gfc_omp_disregard_value_expr): Handle GFC_DECL_RESULT.
2751 (gfc_trans_omp_variable): New function.
2752 (gfc_trans_omp_variable_list, gfc_trans_omp_reduction_list): Use it.
2753 * trans.h (GFC_DECL_RESULT): Define.
2755 * trans-openmp.c (gfc_omp_firstprivatize_type_sizes): New function.
2756 * f95-lang.c (LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES): Define.
2757 * trans.h (gfc_omp_firstprivatize_type_sizes): New prototype.
2759 * trans-openmp.c (gfc_omp_privatize_by_reference): Return
2760 true if a pointer has GFC_DECL_SAVED_DESCRIPTOR set.
2761 (gfc_trans_omp_array_reduction, gfc_trans_omp_reduction_list): New
2763 (gfc_trans_omp_clauses): Add WHERE argument. Call
2764 gfc_trans_omp_reduction_list rather than gfc_trans_omp_variable_list
2766 (gfc_trans_omp_do, gfc_trans_omp_parallel, gfc_trans_omp_parallel_do,
2767 gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare,
2768 gfc_trans_omp_sections, gfc_trans_omp_single): Adjust
2769 gfc_trans_omp_clauses callers.
2771 * openmp.c (omp_current_do_code): New var.
2772 (gfc_resolve_omp_do_blocks): New function.
2773 (gfc_resolve_omp_parallel_blocks): Call it.
2774 (gfc_resolve_do_iterator): Add CODE argument. Don't propagate
2775 predetermination if argument is !$omp do or !$omp parallel do
2777 * resolve.c (resolve_code): Call gfc_resolve_omp_do_blocks
2778 for EXEC_OMP_DO. Adjust gfc_resolve_do_iterator caller.
2779 * fortran.h (gfc_resolve_omp_do_blocks): New prototype.
2780 (gfc_resolve_do_iterator): Add CODE argument.
2782 * trans.h (gfc_omp_predetermined_sharing,
2783 gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause): New
2785 (GFC_DECL_COMMON_OR_EQUIV, GFC_DECL_CRAY_POINTEE): Define.
2786 * trans-openmp.c (gfc_omp_predetermined_sharing,
2787 gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause): New
2789 * trans-common.c (build_equiv_decl, build_common_decl,
2790 create_common): Set GFC_DECL_COMMON_OR_EQUIV flag on the decls.
2791 * trans-decl.c (gfc_finish_cray_pointee): Set GFC_DECL_CRAY_POINTEE
2793 * f95-lang.c (LANG_HOOKS_OMP_PREDETERMINED_SHARING,
2794 LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR,
2795 LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE): Define.
2797 * openmp.c (resolve_omp_clauses): Remove extraneous comma.
2799 * symbol.c (check_conflict): Add conflict between cray_pointee and
2801 * openmp.c (gfc_match_omp_threadprivate): Fail if
2802 gfc_add_threadprivate returned FAILURE.
2803 (resolve_omp_clauses): Diagnose Cray pointees in SHARED,
2804 {,FIRST,LAST}PRIVATE and REDUCTION clauses and Cray pointers in
2805 {FIRST,LAST}PRIVATE and REDUCTION clauses.
2807 * resolve.c (omp_workshare_flag): New variable.
2808 (resolve_function): Diagnose use of non-ELEMENTAL user defined
2809 function in WORKSHARE construct.
2810 (resolve_code): Cleanup forall_save use. Make sure omp_workshare_flag
2811 is set to correct value in different contexts.
2813 * openmp.c (resolve_omp_clauses): Replace %s with '%s' when printing
2815 (resolve_omp_atomic): Likewise.
2818 * scanner.c (skip_free_comments): Set at_bol at the beginning of the
2819 loop, not before it.
2820 (skip_fixed_comments): Handle ! comments in the middle of line here
2822 (gfc_skip_comments): Use skip_fixed_comments for FIXED_FORM even if
2824 (gfc_next_char_literal): Fix expected canonicalized *$omp string.
2826 * trans-openmp.c (gfc_trans_omp_do): Use make_node and explicit
2827 initialization to build OMP_FOR instead of build.
2829 * trans-decl.c (gfc_gimplify_function): Invoke
2830 diagnose_omp_structured_block_errors.
2832 * trans-openmp.c (gfc_trans_omp_master): Use OMP_MASTER.
2833 (gfc_trans_omp_ordered): Use OMP_ORDERED.
2835 * gfortran.h (gfc_resolve_do_iterator, gfc_resolve_blocks,
2836 gfc_resolve_omp_parallel_blocks): New prototypes.
2837 * resolve.c (resolve_blocks): Renamed to...
2838 (gfc_resolve_blocks): ... this. Remove static.
2839 (gfc_resolve_forall): Adjust caller.
2840 (resolve_code): Only call gfc_resolve_blocks if code->block != 0
2841 and not for EXEC_OMP_PARALLEL* directives. Call
2842 gfc_resolve_omp_parallel_blocks for EXEC_OMP_PARALLEL* directives.
2843 Call gfc_resolve_do_iterator if resolved successfully EXEC_DO
2845 * openmp.c: Include pointer-set.h.
2846 (omp_current_ctx): New variable.
2847 (gfc_resolve_omp_parallel_blocks, gfc_resolve_do_iterator): New
2849 * Make-lang.in (fortran/openmp.o): Depend on pointer-set.h.
2851 * openmp.c (gfc_match_omp_clauses): For max/min/iand/ior/ieor,
2852 look up symbol if it exists, use its name instead and, if it is not
2853 INTRINSIC, issue diagnostics.
2855 * parse.c (parse_omp_do): Handle implied end do properly.
2856 (parse_executable): If parse_omp_do returned ST_IMPLIED_ENDDO,
2857 return it instead of continuing.
2859 * trans-openmp.c (gfc_trans_omp_critical): Update for changed
2861 (gfc_trans_omp_do, gfc_trans_omp_parallel, gfc_trans_omp_parallel_do,
2862 gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare,
2863 gfc_trans_omp_sections, gfc_trans_omp_single): Likewise.
2865 * trans.h (gfc_omp_privatize_by_reference): New prototype.
2866 * f95-lang.c (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Redefine
2867 to gfc_omp_privatize_by_reference.
2868 * trans-openmp.c (gfc_omp_privatize_by_reference): New function.
2870 * trans-stmt.h (gfc_trans_omp_directive): Add comment.
2872 * openmp.c (gfc_match_omp_variable_list): Add ALLOW_COMMON argument.
2873 Disallow COMMON matching if it is set.
2874 (gfc_match_omp_clauses, gfc_match_omp_flush): Adjust all callers.
2875 (resolve_omp_clauses): Show locus in error messages. Check that
2876 variable types in reduction clauses are appropriate for reduction
2879 * resolve.c (resolve_symbol): Don't error if a threadprivate module
2880 variable isn't SAVEd.
2882 * trans-openmp.c (gfc_trans_omp_do): Put count into BLOCK, not BODY.
2883 Fix typo in condition. Fix DOVAR initialization.
2885 * openmp.c (gfc_match_omp_clauses): Match min/iand/ior/ieor
2886 rather than .min. etc.
2888 * trans-openmpc.c (omp_not_yet): Remove.
2889 (gfc_trans_omp_parallel_do): Keep listprivate clause on parallel.
2890 Force creation of BIND_EXPR around the workshare construct.
2891 (gfc_trans_omp_parallel_sections): Likewise.
2892 (gfc_trans_omp_parallel_workshare): Likewise.
2894 * types.def (BT_I16, BT_FN_I16_VPTR_I16,
2895 BT_FN_BOOL_VPTR_I16_I16, BT_FN_I16_VPTR_I16_I16): Add.
2897 * trans-openmp.c (gfc_trans_omp_clauses): Create OMP_CLAUSE_DEFAULT.
2898 (gfc_trans_omp_code): New function.
2899 (gfc_trans_omp_do): Use it, remove omp_not_yet uses.
2900 (gfc_trans_omp_parallel, gfc_trans_omp_single): Likewise.
2901 (gfc_trans_omp_sections): Likewise. Only treat empty last section
2902 specially if lastprivate clause is present.
2903 * f95-lang.c (gfc_init_builtin_functions): Create BUILT_IN_TRAP
2906 * trans-openmp.c (gfc_trans_omp_variable_list): Update for
2907 OMP_CLAUSE_DECL name change.
2908 (gfc_trans_omp_do): Likewise.
2910 * trans-openmp.c (gfc_trans_omp_clauses): Create OMP_CLAUSE_REDUCTION
2912 (gfc_trans_omp_atomic): Build OMP_ATOMIC instead of expanding
2913 sync builtins directly.
2914 (gfc_trans_omp_single): Build OMP_SINGLE statement.
2916 * trans-openmp.c (gfc_trans_add_clause): New.
2917 (gfc_trans_omp_variable_list): Take a tree code and build the clause
2918 node here. Link it to the head of a list.
2919 (gfc_trans_omp_clauses): Update to match.
2920 (gfc_trans_omp_do): Use gfc_trans_add_clause.
2922 * trans-openmp.c (gfc_trans_omp_clauses): Change second argument to
2923 gfc_omp_clauses *. Use gfc_evaluate_now instead of creating
2924 temporaries by hand.
2925 (gfc_trans_omp_atomic, gfc_trans_omp_critical): Use buildN_v macros.
2926 (gfc_trans_omp_do): New function.
2927 (gfc_trans_omp_master): Dont' check for gfc_trans_code returning NULL.
2928 (gfc_trans_omp_parallel): Adjust gfc_trans_omp_clauses caller.
2929 Use buildN_v macros.
2930 (gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_sections,
2931 gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections,
2932 gfc_trans_omp_single, gfc_trans_omp_workshare): New functions.
2933 (gfc_trans_omp_directive): Use them.
2934 * parse.c (parse_omp_do): Allow new_st.op == EXEC_NOP.
2935 * openmp.c (resolve_omp_clauses): Check for list items present
2936 in multiple clauses.
2937 (resolve_omp_do): Check that iteration variable is not THREADPRIVATE
2938 and is not present in any clause variable lists other than PRIVATE
2941 * gfortran.h (symbol_attribute): Add threadprivate bit.
2942 (gfc_common_head): Add threadprivate member, change use_assoc
2943 and saved into char to save space.
2944 (gfc_add_threadprivate): New prototype.
2945 * symbol.c (check_conflict): Handle threadprivate.
2946 (gfc_add_threadprivate): New function.
2947 (gfc_copy_attr): Copy threadprivate.
2948 * trans-openmp.c (gfc_trans_omp_clauses): Avoid creating a temporary
2949 if IF or NUM_THREADS is constant. Create OMP_CLAUSE_SCHEDULE and
2951 * resolve.c (resolve_symbol): Complain if a THREADPRIVATE symbol
2952 outside a module and not in COMMON has is not SAVEd.
2953 (resolve_equivalence): Ensure THREADPRIVATE objects don't get
2955 * trans-common.c: Include target.h and rtl.h.
2956 (build_common_decl): Set DECL_TLS_MODEL if THREADPRIVATE.
2957 * trans-decl.c: Include rtl.h.
2958 (gfc_finish_var_decl): Set DECL_TLS_MODEL if THREADPRIVATE.
2959 * dump-parse-tree.c (gfc_show_attr): Handle THREADPRIVATE.
2960 * Make-lang.in (fortran/trans-decl.o): Depend on $(RTL_H).
2961 (fortran/trans-common.o): Depend on $(RTL_H) and $(TARGET_H).
2962 * openmp.c (gfc_match_omp_variable_list): Ensure COMMON block
2963 is from current namespace.
2964 (gfc_match_omp_threadprivate): Rewrite.
2965 (resolve_omp_clauses): Check some clause restrictions.
2966 * module.c (ab_attribute): Add AB_THREADPRIVATE.
2967 (attr_bits): Add THREADPRIVATE.
2968 (mio_symbol_attribute, mio_symbol_attribute): Handle threadprivate.
2969 (load_commons, write_common, write_blank_common): Adjust for type
2970 change of saved, store/load threadprivate bit from the integer
2973 * types.def (BT_FN_UINT_UINT): New.
2974 (BT_FN_VOID_UINT_UINT): Remove.
2976 * trans-openmp.c (gfc_trans_omp_clauses, gfc_trans_omp_barrier,
2977 gfc_trans_omp_critical, gfc_trans_omp_flush, gfc_trans_omp_master,
2978 gfc_trans_omp_ordered, gfc_trans_omp_parallel): New functions.
2979 (gfc_trans_omp_directive): Use them.
2981 * openmp.c (expr_references_sym): Add SE argument, don't look
2983 (is_conversion): New function.
2984 (resolve_omp_atomic): Adjust expr_references_sym callers. Handle
2985 promoted expressions.
2986 * trans-openmp.c (gfc_trans_omp_atomic): New function.
2987 (gfc_trans_omp_directive): Call it.
2989 * f95-lang.c (builtin_type_for_size): New function.
2990 (gfc_init_builtin_functions): Initialize synchronization and
2992 * types.def: New file.
2993 * Make-lang.in (f95-lang.o): Depend on $(BUILTINS_DEF) and
2996 * trans-openmp.c: Rename GOMP_* tree codes into OMP_*.
2998 * dump-parse-tree.c (show_symtree): Don't crash if ns->proc_name
3001 * dump-parse-tree.c (gfc_show_namelist, gfc_show_omp_node): New
3003 (gfc_show_code_node): Call gfc_show_omp_node for EXEC_OMP_* nodes.
3005 * parse.c (parse_omp_do): Call pop_state before next_statement.
3006 * openmp.c (expr_references_sym, resolve_omp_atomic, resolve_omp_do):
3008 (gfc_resolve_omp_directive): Call them.
3009 * match.c (match_exit_cycle): Issue error if EXIT or CYCLE statement
3010 leaves an OpenMP structured block or if EXIT terminates !$omp do
3013 * Make-lang.in (F95_PARSER_OBJS): Add fortran/openmp.o.
3014 (F95_OBJS): Add fortran/trans-openmp.o.
3015 (fortran/trans-openmp.o): Depend on $(GFORTRAN_TRANS_DEPS).
3016 * lang.opt: Add -fopenmp option.
3017 * options.c (gfc_init_options): Initialize it.
3018 (gfc_handle_option): Handle it.
3019 * gfortran.h (ST_OMP_ATOMIC, ST_OMP_BARRIER, ST_OMP_CRITICAL,
3020 ST_OMP_END_CRITICAL, ST_OMP_END_DO, ST_OMP_END_MASTER,
3021 ST_OMP_END_ORDERED, ST_OMP_END_PARALLEL, ST_OMP_END_PARALLEL_DO,
3022 ST_OMP_END_PARALLEL_SECTIONS, ST_OMP_END_PARALLEL_WORKSHARE,
3023 ST_OMP_END_SECTIONS, ST_OMP_END_SINGLE, ST_OMP_END_WORKSHARE,
3024 ST_OMP_DO, ST_OMP_FLUSH, ST_OMP_MASTER, ST_OMP_ORDERED,
3025 ST_OMP_PARALLEL, ST_OMP_PARALLEL_DO, ST_OMP_PARALLEL_SECTIONS,
3026 ST_OMP_PARALLEL_WORKSHARE, ST_OMP_SECTIONS, ST_OMP_SECTION,
3027 ST_OMP_SINGLE, ST_OMP_THREADPRIVATE, ST_OMP_WORKSHARE): New
3029 (OMP_LIST_PRIVATE, OMP_LIST_FIRSTPRIVATE, OMP_LIST_LASTPRIVATE,
3030 OMP_LIST_COPYPRIVATE, OMP_LIST_SHARED, OMP_LIST_COPYIN,
3031 OMP_LIST_PLUS, OMP_LIST_REDUCTION_FIRST, OMP_LIST_MULT,
3032 OMP_LIST_SUB, OMP_LIST_AND, OMP_LIST_OR, OMP_LIST_EQV,
3033 OMP_LIST_NEQV, OMP_LIST_MAX, OMP_LIST_MIN, OMP_LIST_IAND,
3034 OMP_LIST_IOR, OMP_LIST_IEOR, OMP_LIST_REDUCTION_LAST, OMP_LIST_NUM):
3035 New OpenMP variable list types.
3036 (gfc_omp_clauses): New typedef.
3037 (gfc_get_omp_clauses): Define.
3038 (EXEC_OMP_CRITICAL, EXEC_OMP_DO, EXEC_OMP_FLUSH, EXEC_OMP_MASTER,
3039 EXEC_OMP_ORDERED, EXEC_OMP_PARALLEL, EXEC_OMP_PARALLEL_DO,
3040 EXEC_OMP_PARALLEL_SECTIONS, EXEC_OMP_PARALLEL_WORKSHARE,
3041 EXEC_OMP_SECTIONS, EXEC_OMP_SINGLE, EXEC_OMP_WORKSHARE,
3042 EXEC_OMP_ATOMIC, EXEC_OMP_BARRIER, EXEC_OMP_END_NOWAIT,
3043 EXEC_OMP_END_SINGLE): New OpenMP gfc_exec_op codes.
3044 (struct gfc_code): Add omp_clauses, omp_name, omp_namelist
3045 and omp_bool fields to ext union.
3046 (flag_openmp): Declare.
3047 (gfc_free_omp_clauses, gfc_resolve_omp_directive): New prototypes.
3048 * scanner.c (openmp_flag, openmp_locus): New variables.
3049 (skip_free_comments, skip_fixed_comments, gfc_next_char_literal):
3050 Handle OpenMP directive lines and conditional compilation magic
3052 * parse.h (COMP_OMP_STRUCTURED_BLOCK): New compile state.
3053 * parse.c (decode_omp_directive, parse_omp_do, parse_omp_atomic,
3054 parse_omp_structured_block): New functions.
3055 (next_free, next_fixed): Parse OpenMP directives.
3056 (case_executable, case_exec_markers, case_decl): Add ST_OMP_*
3058 (gfc_ascii_statement): Handle ST_OMP_* codes.
3059 (parse_executable): Rearrange the loop slightly, so that
3060 parse_omp_do can return next_statement.
3061 * match.h (gfc_match_omp_eos, gfc_match_omp_atomic,
3062 gfc_match_omp_barrier, gfc_match_omp_critical, gfc_match_omp_do,
3063 gfc_match_omp_flush, gfc_match_omp_master, gfc_match_omp_ordered,
3064 gfc_match_omp_parallel, gfc_match_omp_parallel_do,
3065 gfc_match_omp_parallel_sections, gfc_match_omp_parallel_workshare,
3066 gfc_match_omp_sections, gfc_match_omp_single,
3067 gfc_match_omp_threadprivate, gfc_match_omp_workshare,
3068 gfc_match_omp_end_nowait, gfc_match_omp_end_single): New prototypes.
3069 * resolve.c (resolve_blocks): Ignore EXEC_OMP_* block directives.
3070 (resolve_code): Call gfc_resolve_omp_directive on EXEC_OMP_*
3072 * trans.c (gfc_trans_code): Call gfc_trans_omp_directive for
3073 EXEC_OMP_* directives.
3074 * st.c (gfc_free_statement): Handle EXEC_OMP_* statement freeing.
3075 * trans-stmt.h (gfc_trans_omp_directive): New prototype.
3076 * openmp.c: New file.
3077 * trans-openmp.c: New file.
3079 2006-02-13 Andrew Pinski <pinskia@physics.uc.edu>
3080 Jakub Jelinek <jakub@redhat.com>
3083 * trans-decl.c (gfc_get_symbol_decl, gfc_get_fake_result_decl): Use
3084 gfc_add_decl_to_function rather than gfc_finish_var_decl on length.
3086 2006-02-13 Paul Thomas <pault@gcc.gnu.org>
3090 * resolve.c (resolve_symbol): Extend the requirement that module
3091 arrays have constant bounds to those in the main program. At the
3092 same time simplify the array bounds, to avoiding trapping parameter
3093 array references, and exclude automatic character length from main
3094 and modules. Rearrange resolve_symbol and resolve_derived to put as
3095 each flavor together, as much as is possible and move all specific
3096 code for flavors FL_VARIABLE, FL_PROCEDURE and FL_PARAMETER into new
3098 (resolve_fl_var_and_proc, resolve_fl_variable, resolve_fl_procedure):
3099 New functions to do work of resolve_symbol.
3100 (resolve_index_expr): New function that is called from resolved_symbol
3101 and is extracted from resolve_charlen.
3102 (resolve_charlen): Call this new function.
3103 (resolve_fl_derived): Renamed resolve_derived to be consistent with
3104 the naming of the new functions for the other flavours. Change the
3105 charlen checking so that the style is consistent with other similar
3106 checks. Add the generation of the gfc_dt_list, removed from resolve_
3110 * resolve.c (resolve_actual_arglist): Prevent internal procedures
3111 from being dummy arguments.
3114 * resolve.c (resolve_actual_arglist): Prevent pure but non-intrinsic
3115 procedures from being dummy arguments.
3118 * resolve.c (check_data_variable): Add test that data variable is in
3122 * resolve.c (resolve_call): Add test that the subroutine does not
3125 2006-02-12 Erik Edelmann <eedelman@gcc.gnu.org>
3128 * trans-array.c (gfc_trans_allocate_array_storage): New argument
3129 dealloc; free the temporary only if dealloc is true.
3130 (gfc_trans_allocate_temp_array): New argument bool dealloc, to be
3131 passed onwards to gfc_trans_allocate_array_storage.
3132 (gfc_trans_array_constructor, gfc_conv_loop_setup): Update call to
3133 gfc_trans_allocate_temp_array.
3134 * trans-array.h (gfc_trans_allocate_temp_array): Update function
3136 * trans-expr.c (gfc_conv_function_call): Set new argument 'dealloc'
3137 to gfc_trans_allocate_temp_array to false in case of functions
3139 (gfc_trans_arrayfunc_assign): Return NULL for functions returning
3142 2006-02-10 Steven G. Kargl <kargls@comcast.net>
3145 *decl.c (variable_decl): Improve error message. Remove initialization
3146 typespec. Wrap long line.
3147 *expr.c (gfc_check_pointer_assign): Permit checking of type, kind type,
3149 *simplify.c (gfc_simplify_null): Ensure type, kind type, and rank
3153 2006-02-10 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
3156 * arith.c (eval_intrinsic): Accept INTRINSIC_PARENTHESES.
3157 * expr.c (check_intrinsic_op): Likewise.
3158 * module.c (mio_expr): Likewise.
3160 2006-02-09 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
3162 * dump-parse-tree.c: Update copyright years.
3163 * matchexp.c: Likewise.
3164 * module.c: Likewise.
3167 * gfortran.h (gfc_intrinsic_op): Add INTRINSIC_PARENTHESES.
3168 * dump-parse-tree (gfc_show_expr): Handle INTRINSIC_PARENTHESES.
3169 * expr.c (simplify_intrinsic_op): Treat INTRINSIC_PARENTHESES as
3170 if it were INTRINSIC_UPLUS.
3171 * resolve.c (resolve_operator): Handle INTRINSIC_PARENTHESES.
3172 * match.c (intrinsic_operators): Add INTRINSIC_PARENTHESES.
3173 * matchexp.c (match_primary): Record parentheses surrounding
3174 numeric expressions.
3175 * module.c (intrinsics): Add INTRINSIC_PARENTHESES for module
3177 * trans-expr.c (gfc_conv_expr_op): Handle INTRINSIC_PARENTHESES.
3179 2006-02-09 Paul Thomas <pault@gcc.gnu.org>
3182 * trans-stmt.c (gfc_trans_allocate): Provide assumed character length
3183 scalar with missing backend_decl for the hidden dummy charlen.
3186 * interface.c (gfc_extend_assign): Remove detection of non-PURE
3187 subroutine in assignment interface, with gfc_error, and put it in
3188 * resolve.c (resolve_code).
3191 * interface.c (gfc_procedure_use): Flag rank checking for non-
3192 elemental, contained or interface procedures in call to
3193 (compare_actual_formal), where ranks are checked for assumed
3196 2006-02-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3199 * trans-decl.c (gfc_generate_function_code): Add new argument,
3200 pedantic, to set_std call.
3202 2006-02-06 Thomas Koenig <Thomas.Koenig@online.de>
3205 * gfortran.texi: Document the GFORTRAN_CONVERT_UNIT environment
3207 * invoke.texi: Mention the "Runtime" chapter.
3208 Document the -fconvert= option.
3209 * gfortran.h: Add options_convert.
3210 * lang.opt: Add fconvert=little-endian, fconvert=big-endian,
3211 fconvert=native and fconvert=swap.
3212 * trans-decl.c (top level): Add gfor_fndecl_set_convert.
3213 (gfc_build_builtin_function_decls): Set gfor_fndecl_set_convert.
3214 (gfc_generate_function_code): If -fconvert was specified,
3215 and this is the main program, add a call to set_convert().
3216 * options.c: Handle the -fconvert options.
3218 2006-02-06 Roger Sayle <roger@eyesopen.com>
3220 * trans-stmt.c (gfc_evaluate_where_mask): Allow the NMASK argument
3221 to be NULL to indicate that the not mask isn't required.
3222 (gfc_trans_where_2): Remove PMASK argument. Avoid calculating the
3223 pending mask for the last clause of a WHERE chain. Update recursive
3225 (gfc_trans_forall_1): Update call to gfc_trans_where_2.
3226 (gfc_trans_where): Likewise.
3228 2006-02-06 Jakub Jelinek <jakub@redhat.com>
3230 Backport from gomp-20050608-branch
3231 * trans-decl.c (create_function_arglist): Handle dummy functions.
3233 * trans-decl.c (gfc_get_symbol_decl): Revert explicit setting of
3235 (gfc_trans_vla_type_sizes): Also "gimplify"
3236 GFC_TYPE_ARRAY_DATAPTR_TYPE for GFC_DESCRIPTOR_TYPE_P types.
3237 * trans-array.c (gfc_trans_deferred_array): Call
3238 gfc_trans_vla_type_sizes.
3240 * trans-decl.c (saved_function_decls, saved_parent_function_decls):
3241 Remove unnecessary initialization.
3242 (create_function_arglist): Make sure __result has complete type.
3243 (gfc_get_fake_result_decl): Change current_fake_result_decl into
3244 a tree chain. For entry master, create a separate variable
3245 for each result name. For BT_CHARACTER results, call
3246 gfc_finish_var_decl on length even if it has been already created,
3247 but not pushdecl'ed.
3248 (gfc_trans_vla_type_sizes): For function/entry result, adjust
3249 result value type, not the FUNCTION_TYPE.
3250 (gfc_generate_function_code): Adjust for current_fake_result_decl
3252 (gfc_trans_deferred_vars): Likewise. Call gfc_trans_vla_type_sizes
3253 even on result if it is assumed-length character.
3255 * trans-decl.c (gfc_trans_dummy_character): Add SYM argument.
3256 Call gfc_trans_vla_type_sizes.
3257 (gfc_trans_auto_character_variable): Call gfc_trans_vla_type_sizes.
3258 (gfc_trans_vla_one_sizepos, gfc_trans_vla_type_sizes_1,
3259 gfc_trans_vla_type_sizes): New functions.
3260 (gfc_trans_deferred_vars): Adjust gfc_trans_dummy_character
3261 callers. Call gfc_trans_vla_type_sizes on assumed-length
3262 character parameters.
3263 * trans-array.c (gfc_trans_array_bounds,
3264 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias): Call
3265 gfc_trans_vla_type_sizes.
3266 * trans.h (gfc_trans_vla_type_sizes): New prototype.
3268 * trans-decl.c (gfc_build_qualified_array): For non-assumed-size
3269 arrays without constant size, create also an index var for
3270 GFC_TYPE_ARRAY_SIZE (type). If the type is incomplete, complete
3272 (gfc_create_string_length): Don't call gfc_defer_symbol_init
3273 if just creating DECL_ARGUMENTS.
3274 (gfc_get_symbol_decl): Call gfc_finish_var_decl and
3275 gfc_defer_symbol_init even if ts.cl->backend_decl is already
3276 set to a VAR_DECL that doesn't have DECL_CONTEXT yet.
3277 (create_function_arglist): Rework, so that hidden length
3278 arguments for CHARACTER parameters are created together with
3279 the parameters. Resolve ts.cl->backend_decl for CHARACTER
3280 parameters. If the argument is a non-constant length array
3281 or CHARACTER, ensure PARM_DECL has different type than
3283 (generate_local_decl): Call gfc_get_symbol_decl even
3284 for non-referenced non-constant length CHARACTER parameters
3285 after optionally issuing warnings.
3286 * trans-array.c (gfc_trans_array_bounds): Set last stride
3287 to GFC_TYPE_ARRAY_SIZE (type) to initialize it as well.
3288 (gfc_trans_dummy_array_bias): Initialize GFC_TYPE_ARRAY_SIZE (type)
3291 * trans-expr.c (gfc_conv_expr_val): Fix comment typo.
3293 * trans-stmt.c (gfc_trans_simple_do): Fix comment.
3295 2006-02-04 Roger Sayle <roger@eyesopen.com>
3297 * dependency.c (gfc_check_dependency): Remove unused vars and nvars
3298 arguments. Replace with an "identical" argument. A full array
3299 reference to the same symbol is a dependency if identical is true.
3300 * dependency.h (gfc_check_dependency): Update prototype.
3301 * trans-array.h (gfc_check_dependency): Delete duplicate prototype.
3302 * trans-stmt.c: #include dependency.h for gfc_check_dependency.
3303 (gfc_trans_forall_1): Update calls to gfc_check_dependency.
3304 (gfc_trans_where_2): Likewise. Remove unneeded variables.
3305 (gfc_trans_where_3): New function for simple non-dependent WHEREs.
3306 (gfc_trans_where): Call gfc_trans_where_3 to translate simple
3307 F90-style WHERE statements without internal dependencies.
3308 * Make-lang.in (trans-stmt.o): Depend upon dependency.h.
3310 2006-02-05 H.J. Lu <hongjiu.lu@intel.com>
3314 * resolve.c (resolve_types): New function.
3315 (resolve_codes): Likewise.
3316 (gfc_resolve): Use them.
3318 2006-02-05 Roger Sayle <roger@eyesopen.com>
3320 * trans-stmt.c (gfc_evaluate_where_mask): Use LOGICAL*1 for WHERE
3321 masks instead of LOGICAL*4.
3323 2006-02-05 Jakub Jelinek <jakub@redhat.com>
3325 * resolve.c (resolve_symbol): Initialize constructor_expr to NULL.
3327 2006-02-04 Thomas Koenig <Thomas.Koenig@online.de>
3330 check.c (identical_dimen_shape): New function.
3331 (check_dot_product): Use identical_dimen_shape() to check sizes
3333 (gfc_check_matmul): Likewise.
3334 (gfc_check_merge): Check conformance between tsource and fsource
3335 and between tsource and mask.
3336 (gfc_check_pack): Check conformance between array and mask.
3338 2006-02-03 Steven G. Kargl <kargls@comcast>
3339 Paul Thomas <pault@gcc.gnu.org>
3342 * resolve.c (resolve_symbol): Default initialization of derived type
3343 component reguires the SAVE attribute.
3345 2006-02-02 Steven G. Kargl <kargls@comcast>
3348 match.c (gfc_match_nullify): Free the list from head not tail.
3351 * match.c (match_forall_header): Fix internal error caused by bogus
3355 2006-01-31 Thomas Koenig <Thomas.Koenig@online.de>
3358 expr.c (gfc_check_conformance): Reorder error message
3360 check.c(gfc_check_minloc_maxloc): Call gfc_check_conformance
3361 for checking arguments array and mask.
3362 (check_reduction): Likewise.
3364 2006-01-30 Erik Edelmann <eedelman@gcc.gnu.org>
3367 * trans-io.c (set_internal_unit): Check the rank of the
3368 expression node itself instead of its symbol.
3370 2006-01-29 Paul Thomas <pault@gcc.gnu.org>
3376 * interface.c (compare_actual_formal): Error for INTENT(OUT or INOUT)
3377 if actual argument is not a variable.
3379 2006-01-28 Paul Thomas <pault@gcc.gnu.org>
3382 * expr.c (gfc_check_assign, gfc_check_pointer_assign): Emit error if
3383 the lvalue is a use associated procedure.
3387 * expr.c (gfc_check_pointer_assign): Emit error if lvalue and rvalue
3388 character lengths are not the same. Use gfc_dep_compare_expr for the
3390 * gfortran.h: Add prototype for gfc_dep_compare_expr.
3391 * dependency.h: Remove prototype for gfc_dep_compare_expr.
3393 2006-01-27 Paul Thomas <pault@gcc.gnu.org>
3396 * resolve.c (resolve_function): Add GFC_ISYM_LOC to the list of
3397 generic_ids exempted from assumed size checking.
3399 2006-01-27 Jakub Jelinek <jakub@redhat.com>
3402 * Make-lang.in (fortran/scanner.o): Depend on toplev.h.
3403 * lang.opt (fpreprocessed): New option.
3404 * scanner.c: Include toplev.h.
3405 (gfc_src_file, gfc_src_preprocessor_lines): New variables.
3406 (preprocessor_line): Unescape filename if there were any
3408 (load_file): If initial and gfc_src_file is not NULL,
3409 use it rather than opening the file. If gfc_src_preprocessor_lines
3410 has non-NULL elements, pass it to preprocessor_line.
3411 (unescape_filename, gfc_read_orig_filename): New functions.
3412 * gfortran.h (gfc_option_t): Add flag_preprocessed.
3413 (gfc_read_orig_filename): New prototype.
3414 * options.c (gfc_init_options): Clear flag_preprocessed.
3415 (gfc_post_options): If flag_preprocessed, call
3416 gfc_read_orig_filename.
3417 (gfc_handle_option): Handle OPT_fpreprocessed.
3418 * lang-specs.h: Pass -fpreprocessed to f951 if preprocessing
3421 2006-01-27 Erik Edelmann <eedelman@gcc.gnu.org>
3423 * symbol.c (free_old_symbol): Fix confusing comment, and add code
3424 to free old_symbol->formal.
3426 2006-01-26 Paul Thomas <pault@gcc.gnu.org>
3429 * resolve.c (resolve_function): Exclude statement functions from
3430 global reference checking.
3436 * resolve.c (resolve_function): Declare a gfc_symbol to replace the
3437 references through the symtree to the symbol associated with the
3438 function expresion. Give error on reference to an assumed character
3439 length function is defined in an interface or an external function
3440 that is not a dummy argument.
3441 (resolve_symbol): Give error if an assumed character length function
3442 is array-valued, pointer-valued, pure or recursive. Emit warning
3443 that character(*) value functions are obsolescent in F95.
3446 * trans-expr.c (gfc_conv_function_call): The above patch to resolve.c
3447 prevents any assumed character length function call from getting here
3448 except intrinsics such as SPREAD. In this case, ensure that no
3449 segfault occurs from referencing non-existent charlen->length->
3450 expr_type and provide a backend_decl for the charlen from the charlen
3451 of the first actual argument.
3453 Cure temp name confusion.
3454 * trans-expr.c (gfc_get_interface_mapping_array): Change name of
3455 temporary from "parm" to "ifm" to avoid clash with temp coming from
3458 2006-01-25 Erik Edelmann <eedelman@gcc.gnu.org>
3461 * symbol.c (free_old_symbol): New function.
3462 (gfc_commit_symbols): Use it.
3463 (gfc_commit_symbol): New function.
3464 (gfc_use_derived): Use it.
3465 * gfortran.h: Add prototype for gfc_commit_symbol.
3466 * intrinsic.c (gfc_find_function): Search in 'conversion'
3467 if not found in 'functions'.
3468 (gfc_convert_type_warn): Add a symtree to the new
3469 expression node, and commit the new symtree->n.sym.
3470 * resolve.c (gfc_resolve_index): Make sure typespec is
3471 properly initialized.
3473 2006-01-23 Paul Thomas <pault@gcc.gnu.org>
3476 * decl.c (get_proc_name): Replace subroutine and function attributes
3477 in "already defined" test by the formal arglist pointer being non-NULL.
3479 Fix regression in testing of admissability of attributes.
3480 * symbol.c (gfc_add_attribute): If the current_attr has non-zero
3481 intent, do not do the check for a dummy being used.
3482 * decl.c (attr_decl1): Add current_attr.intent as the third argument
3483 in the call to gfc_add_attribute.
3484 * gfortran.h: Add the third argument to the prototype for
3487 2006-01-21 Joseph S. Myers <joseph@codesourcery.com>
3489 * gfortranspec.c (lang_specific_driver): Update copyright notice
3492 2006-01-21 Paul Thomas <pault@gcc.gnu.org>
3496 * decl.c (get_proc_name): If there is an existing
3497 symbol in the encompassing namespace, call errors
3498 if it is a procedure of the same name or the kind
3499 field is set, indicating a type declaration.
3505 * decl.c (add_global_entry): New function to check
3506 for existing global symbol with this name and to
3507 create new one if none exists.
3508 (gfc_match_entry): Call add_global_entry before
3509 matching argument lists for subroutine and function
3511 * gfortran.h: Prototype for existing function,
3513 * resolve.c (resolve_global_procedure): New function
3514 to check global symbols for procedures.
3515 (resolve_call, resolve_function): Calls to this
3516 new function for non-contained and non-module
3518 * match.c (match_common): Add check for existing
3519 global symbol, creat one if none exists and emit
3520 error if there is a clash.
3521 * parse.c (global_used): Remove static and use the
3522 gsymbol name rather than the new_block name, so that
3523 the function can be called from resolve.c.
3524 (parse_block_data, parse_module, add_global_procedure):
3525 Improve checks for existing gsymbols. Emit error if
3526 already defined or if references were to another type.
3530 * trans-expr.c (gfc_conv_aliased_arg): New function called by
3531 gfc_conv_function_call that coverts an expression for an aliased
3532 component reference to a derived type array into a temporary array
3533 of the same type as the component. The temporary is passed as an
3534 actual argument for the procedure call and is copied back to the
3535 derived type after the call.
3536 (is_aliased_array): New function that detects an array reference
3537 that is followed by a component reference.
3538 (gfc_conv_function_call): Detect an aliased actual argument with
3539 is_aliased_array and convert it to a temporary and back again
3540 using gfc_conv_aliased_arg.
3542 2006-01-19 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
3544 * gfortranspec.c: Update copyright years.
3545 * trans.c: Likewise.
3546 * trans-array.c: Likewise.
3547 * trans-array.h: Likewise.
3548 * trans-decl.c: Likewise.
3549 * trans-stmt.c: Likewise.
3550 * trans-stmt.h: Likewise.
3551 * trans-types.c: Likewise.
3553 2006-01-18 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
3557 * gfortran.h (BBT_HEADER): Move definition up.
3558 (gfc_st_label): Add BBT_HEADER, remove 'prev' and 'next'.
3559 * io.c (format_asterisk): Adapt initializer.
3560 * resolve.c (resolve_branch): Allow FORTRAN 66 cross-block GOTOs
3562 (warn_unused_label): Take gfc_st_label label as argument, adapt to
3564 (gfc_resolve): Adapt call to warn_unused_label.
3565 * symbol.c (compare_st_labels): New function.
3566 (gfc_free_st_label, free_st_labels, gfc_get_st_label): Convert to
3567 using balanced binary tree.
3568 * decl.c (match_char_length, gfc_match_old_kind_spec): Do away
3570 (warn_unused_label): Adapt to binary tree.
3571 * match.c (gfc_match_small_literal_int): Only set cnt if non-NULL.
3572 * primary.c (match_kind_param): Do away with cnt.
3574 2006-01-18 Paul Thomas <pault@gcc.gnu.org>
3579 * symbol.c (check_conflict): Add pointer valued elemental
3580 functions and internal procedures with the external attribute
3581 to the list of conflicts.
3582 (gfc_add_attribute): New catch-all function to perform the
3583 checking of symbol attributes for attribute declaration
3585 * decl.c (attr_decl1): Call gfc_add_attribute for each of -
3586 (gfc_match_external, gfc_match_intent, gfc_match_intrinsic,
3587 gfc_match_pointer, gfc_match_dimension, gfc_match_target):
3588 Remove spurious calls to checks in symbol.c. Set the
3589 attribute directly and use the call to attr_decl() for
3591 * gfortran.h: Add prototype for gfc_add_attribute.
3594 * resolve.c (resolve_function): Exclude PRESENT from assumed size
3595 argument checking. Replace strcmp's with comparisons with generic
3598 2006-01-16 Rafael
\81Ávila de Esp
\81índola <rafael.espindola@gmail.com>
3600 * gfortranspec.c (lang_specific_spec_functions): Remove.
3602 2006-01-16 Richard Guenther <rguenther@suse.de>
3604 * trans-stmt.c (gfc_trans_if_1): Use fold_buildN and build_int_cst.
3605 (gfc_trans_arithmetic_if): Likewise.
3606 (gfc_trans_simple_do): Likewise.
3607 (gfc_trans_do): Likewise.
3608 (gfc_trans_do_while): Likewise.
3609 (gfc_trans_logical_select): Likewise.
3610 (gfc_trans_forall_loop): Likewise.
3611 (generate_loop_for_temp_to_lhs): Likewise.
3612 (generate_loop_for_rhs_to_temp): Likewise.
3613 (gfc_trans_allocate): Likewise.
3614 * trans.c (gfc_add_expr_to_block): Do not fold expr again.
3616 2006-01-16 Richard Guenther <rguenther@suse.de>
3618 * trans-expr.c (gfc_conv_function_call): Use fold_build2.
3619 * trans-stmt.c (gfc_trans_goto): Likewise. Use build_int_cst.
3620 * trans.c (gfc_trans_runtime_check): Don't fold the condition
3623 2006-01-13 Steven G. Kargl <kargls@comcast.net>
3626 * symbol.c (gfc_free_st_label): Give variable meaningful name. Remove
3627 unneeded parenthesis. Fix-up the head of the list (2 lines gleaned
3630 2006-01-13 Diego Novillo <dnovillo@redhat.com>
3632 * trans.c (gfc_add_expr_to_block): Do not fold tcc_statement
3635 2006-01-11 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
3637 * parse.c (next_fixed): Remove superfluous string concatenation.
3639 2006-01-11 Bernhard Fischer <rep.nop@aon.at>
3642 * scanner.c (load_line): use maxlen to determine the line-length used
3643 for padding lines in fixed form.
3645 2006-01-11 Paul Thomas <pault@gcc.gnu.org>
3648 * trans-types.c (copy_dt_decls_ifequal): Copy backend decl for
3651 2006-01-09 Andrew Pinski <pinskia@physics.uc.edu>
3654 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Use fold_convert
3655 to avoid type mismatch.
3657 2006-01-09 Andrew Pinski <pinskia@physics.uc.edu>
3660 * trans-decl.c (gfc_generate_function_code): Move the NULLing of
3661 current_fake_result_decl down to below generate_local_vars.
3663 2006-01-09 Feng Wang <fengwang@nudt.edu.cn>
3666 * trans-expr.c (gfc_to_single_character): New function that converts
3667 string to single character if its length is 1.
3668 (gfc_build_compare_string):New function that compare string and handle
3669 single character specially.
3670 (gfc_conv_expr_op): Use gfc_build_compare_string.
3671 (gfc_trans_string_copy): Use gfc_to_single_character.
3672 * trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Use
3673 gfc_build_compare_string.
3674 * trans.h (gfc_build_compare_string): Add prototype.
3676 2006-01-09 Feng Wang <fengwang@nudt.edu.cn>
3678 * simplify.c (gfc_simplify_char): Use UCHAR_MAX instead of literal
3680 (gfc_simplify_ichar): Get the result from unsinged char and in the
3681 range 0 to UCHAR_MAX instead of CHAR_MIN to CHAR_MAX.
3683 2006-01-08 Erik Edelmann <eedelman@gcc.gnu.org>
3686 * resolve.c (resolve_fntype): Check that PUBLIC functions
3687 aren't of PRIVATE type.
3689 2006-01-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3691 * decl.c (gfc_match_function_decl): Correctly error out in case of
3692 omitted function argument list.
3694 2006-01-07 Paul Thomas <pault@gcc.gnu.org>
3697 * trans-array.c (gfc_reverse_ss): Remove static attribute.
3698 (gfc_walk_elemental_function_args): Replace gfc_expr * argument for
3699 the function call with the corresponding gfc_actual_arglist*. Change
3701 (gfc_walk_function_expr): Call to gfc_walk_elemental_function_args
3702 now requires the actual argument list instead of the expression for
3704 * trans-array.h: Modify the prototype for gfc_walk_elemental_function_args
3705 and provide a prototype for gfc_reverse_ss.
3706 * trans-stmt.h (gfc_trans_call): Add the scalarization code for the case
3707 where an elemental subroutine has array valued actual arguments.
3713 * resolve.c (check_assumed_size_reference): New function to check for upper
3714 bound in assumed size array references.
3715 (resolve_assumed_size_actual): New function to do a very restricted scan
3716 of actual argument expressions of those procedures for which incomplete
3717 assumed size array references are not allowed.
3718 (resolve_function, resolve_call): Switch off assumed size checking of
3719 actual arguments, except for elemental procedures and intrinsic
3720 inquiry functions, in some circumstances.
3721 (resolve_variable): Call check_assumed_size_reference.
3723 2006-01-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3726 * io.c (next_char_not_space): New function that returns the next
3727 character that is not white space.
3728 (format_lex): Use the new function to skip whitespace within
3731 2006-01-05 Erik Edelmann <eedelman@gcc.gnu.org>
3734 * expr.c (gfc_expr_set_symbols_referenced): New function.
3735 * gfortran.h: Add a function prototype for it.
3736 * resolve.c (resolve_function): Use it for
3737 use associated character functions lengths.
3738 * expr.c, gfortran.h, resolve.c: Updated copyright years.
3740 2006-01-03 Steven G. Kargl <kargls@comcast.net>
3743 * resolve.c (resolve_forall_iterators): Check for scalar variables;
3744 Check stride is nonzero.
3746 2006-01-02 Steven G. Kargl <kargls@comcast.net>
3749 * parse.c (next_free): Check for whitespace after the label.
3750 * match.c (gfc_match_small_literal_int): Initialize cnt variable.
3752 2006-01-01 Steven G. Kargl <kargls@comcast.net>
3754 * ChangeLog: Split previous years into ...
3755 * ChangeLog-2002: here.
3756 * ChangeLog-2003: here.
3757 * ChangeLog-2004: here.
3758 * ChangeLog-2005: here.