1 2007-11-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4 * interface.c (gfc_current_interface_head,
5 gfc_set_current_interface_head): New functions.
6 * decl.c (gfc_match_modproc): Move check for syntax error earlier.
7 On syntax error, restore previous state of the interface.
8 * gfortran.h (gfc_current_interface_head,
9 gfc_set_current_interface_head): New prototypes.
11 2007-11-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
14 * module.c (struct written_common, written_commons): New structure.
15 (compare_written_commons, free_written_common, write_common_0):
17 (write_common): Call recursive function write_common_0.
19 2007-11-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
22 * io.c (check_format_string): Only check character expressions.
23 (match_dt_format): Return MATCH_ERROR if that is what
24 gfc_match_st_label said.
26 2007-11-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
29 * expr.c (check_inquiry): Don't call gfc_error now.
31 2007-11-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
35 * scanner.c (start_source_file, end_source_file,
36 exit_remaining_files, gfc_advance_line): Revert rev. 130016.
38 2007-11-16 Paul Thomas <pault@gcc.gnu.org>
41 * trans-stmt.c (gfc_conv_elemental_dependencies): Add check for
42 INTENT_INOUT as well as INTENT_OUT.
43 (gfc_trans_call): Remove redundant gcc_asserts in dependency
46 2007-11-16 Paul Thomas <pault@gcc.gnu.org>
49 * trans-array.c (gfc_conv_array_parameter ): Allow allocatable
52 2007-11-15 Tobias Burnus <burnus@net-b.de>
55 * decl.c (match_procedure_decl): Pre-resolve interface.
56 * resolve.c (resolve_symbol): Reject interfaces later
57 declared in procedure statements.
59 2007-11-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
62 * decl.c (match_procedure_decl): Remove TODO and allow intrinsics in
63 PROCEDURE declarations. Set attr.untyped to allow the interface to be
64 resolved later where the symbol type will be set.
65 * interface.c (compare_intr_interfaces): Remove static from pointer
66 declarations. Add type and kind checks for dummy function arguments.
67 (compare_actual_formal_intr): New function to compare an actual
68 argument with an intrinsic function. (gfc_procedures_use): Add check for
69 interface that points to an intrinsic function, use the new function.
70 * resolve.c (resolve_specific_f0): Resolve the intrinsic interface.
71 (resolve_specific_s0): Ditto.
73 2007-11-13 Paul Thomas <pault@gcc.gnu.org>
76 * iresolve.c (gfc_resolve_transfer): Do not try to convert
77 to a constant MOLD expression, if it is an assumed size
80 2007-11-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
82 * trans-common.c: Remove prototype for gfc_get_common.
84 2007-11-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
87 * trans.c (gfc_call_realloc): Fix the logic and rename variables.
89 2007-11-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
92 * scanner.c (start_source_file, end_source_file,
93 exit_remaining_files): New functions.
94 (gfc_advance_line): Use the new functions.
96 2007-11-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
99 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use correct type.
101 2007-11-08 Tobias Burnus <burnus@net-b.de>
104 * interface.c (check_sym_interfaces): Disallow PROCEDURE-declared
105 procedures for MODULE PROCEDURE.
106 * decl.c (match_procedure_in_interface): Do not mark as procedure.
108 2007-11-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
111 * trans-array.c (gfc_conv_array_parameter): Evaluate
112 se->string_length instead of the expr->ts.cl->backend_decl.
114 2007-11-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
116 * gfortran.h: Shorten comment.
117 * trans-types.c (gfc_get_function_type): Allow argument to have
119 * trans-decl.c (gfc_sym_mangled_function_id): Mangle main program
121 (build_function_decl): Fix comment.
122 * parse.c (main_program_symbol): Give the main program its proper
123 name, if any. Set its flavor to FL_PROGRAM.
124 (gfc_parse_file): Likewise.
126 2007-11-02 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
128 * intrinsic.texi (ALLOCATED): Fix typo.
130 2007-10-31 Tobias Burnus <burnus@net-b.de>
133 * modules.c (intrinsics): Use only alphabetic names for
136 2007-10-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
139 * interface.c (compare_intr_interfaces): New function to check intrinsic
140 function arguments against formal arguments. (compare_interfaces): Fix
141 logic in comparison of function and subroutine attributes.
142 (compare_parameter): Use new function for intrinsic as argument.
143 * resolve.c (resolve_actual_arglist): Allow an intrinsic without
144 function attribute to be checked further. Set function attribute if
145 intrinsic symbol is found, return FAILURE if not.
147 2007-10-31 Paul Thomas <pault@gcc.gnu.org>
150 * decl.c (gfc_match_entry): Do not make ENTRY name
151 global for contained procedures.
152 * parse.c (gfc_fixup_sibling_symbols): Fix code for
153 determining whether a procedure is external.
155 2007-10-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
158 * trans-intrinsic.c (gfc_conv_intrinsic_isnan): Strip NOP_EXPR
159 from the result of build_call_expr.
161 2007-10-29 Paul Thomas <pault@gcc.gnu.org>
167 * trans-array.c (gfc_conv_loop_setup): Send a complete type to
168 gfc_trans_create_temp_array if the temporary is character.
169 * trans-stmt.c (gfc_trans_assign_need_temp): Do likewise for
170 allocate_temp_for_forall_nest.
171 (forall_replace): New function.
172 (forall_replace_symtree): New function.
173 (forall_restore): New function.
174 (forall_restore_symtree): New function.
175 (forall_make_variable_temp): New function.
176 (check_forall_dependencies): New function.
177 (cleanup_forall_symtrees): New function.
178 gfc_trans_forall_1): Add and initialize pre and post blocks.
179 Call check_forall_dependencies to check for all dependencies
180 and either trigger second forall block to copy temporary or
181 copy lval, outside the forall construct and replace all
182 dependent references. After assignment clean-up and coalesce
183 the blocks at the end of the function.
184 * gfortran.h : Add prototypes for gfc_traverse_expr and
186 expr.c (gfc_traverse_expr): New function to traverse expression
187 and visit all subexpressions, under control of a logical flag,
188 a symbol and an integer pointer. The slave function is caller
189 defined and is only called on EXPR_VARIABLE.
190 (expr_set_symbols_referenced): Called by above to set symbols
192 (gfc_expr_set_symbols_referenced): Rework of this function to
193 use two new functions above.
194 * resolve.c (find_forall_index): Rework with gfc_traverse_expr,
196 (forall_index): New function used by previous.
197 * dependency.c (gfc_check_dependency): Use gfc_dep_resolver for
198 all references, not just REF_ARRAY.
199 (gfc_dep_resolver): Correct the logic for substrings so that
200 overlapping arrays are handled correctly.
202 2007-10-28 Tobias Schlüter <tobi@gcc.gnu.org>
205 * module.c (write_symbol): Fix whitespace.
206 (write_symbol0): Walk symtree from left-to-right instead
208 (write_symbol1): Similarly change walk of pointer info tree.
209 (write_module): Insert linebreak.
210 * symbol.c (gfc_traverse_symtree): Change to left-to-right order.
211 (traverse_ns): Likewise.
213 2007-10-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
216 * decl.c (char_len_param_value): Add check for conflicting attributes of
219 2007-10-27 Tobias Burnus <burnus@net-b.de>
222 * lang-specs.h: Support .ftn and .FTN extension, use CPP for .FOR.
223 * options.c (form_from_filename): Support .ftn extension.
224 * gfortran.texi: Document support of .for and .ftn file extension.
226 2007-10-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
229 * intrinsic.h: Add prototypes for four new functions, gfc_check_datan2,
230 gfc_check_dprod, gfc_check_fn_d, and gfc_check_x_yd.
231 * intrinsic.c (add_functions): Add double precision checks for dabs,
232 dacos, dacosh, dasin, dasinh, datan, datanh, datan2, dbesj0, dbesj1,
233 dbesy0, dbesy1, dcos, dcosh, ddim, derf, derfc, dexp, dgamma,
234 dlgama, dlog, dlog10, dmod, dsign, dsin, dsinh, dsqrt, dtan, and dtanh.
235 Add real check dprod.
236 * check.c (gfc_check_datan2): New function to check for double precision
237 argumants. (gfc_check_dprod, gfc_check_fn_d, and gfc_check_x_yd): Ditto.
239 2007-10-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
241 * invoke.texi: Fix typo in -fmax-errors=.
243 2007-10-26 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
246 * gfortran.texi: Document that there is no logical/integer
247 conversion performed during I/O operations.
249 2007-10-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
252 * resolve.c (resolve_actual_arglist): Fix error message text.
254 2007-10-22 Steven G. Kargl <kargl@gcc.gnu.org>
257 * gfortran.h (gfc_data_value): Change repeat from unsigned int
259 * decl.c(top_val_list): Remove msg variable. Use mpz_t for
261 * resolve.c (values): Change left from unsigned int to mpz_t.
262 (next_data_value): Change for mpz_t.
263 (check_data_variable): Change ??? to FIXME in a comment. Use
265 (resolve_data ): Use "mpz_t left".
267 2007-10-21 Paul Thomas <pault@gcc.gnu.org>
270 * resolve.c (resolve_ordinary_assign): New function that takes
271 the code to resolve an assignment from resolve_code. In
272 addition, it makes a temporary of any vector index, on the
273 lhs, using gfc_get_parentheses.
274 (resolve_code): On EXEC_ASSIGN call the new function.
276 2007-10-20 Tobias Burnus <burnus@net-b.de>
279 * resolve.c (resolve_variable): Check that symbol is in the same
280 namespace as the entry function.
282 2007-10-20 Paul Thomas <pault@gcc.gnu.org>
283 FX Coudert <fxcoudert@gcc.gnu.org>
286 * trans-array.c (gfc_conv_expr_descriptor): For all except
287 indirect references, use gfc_trans_scalar_assign instead of
289 * iresolve.c (check_charlen_present): Separate creation of cl
290 if necessary and add code to treat an EXPR_ARRAY.
291 (gfc_resolve_char_achar): New function.
292 (gfc_resolve_achar, gfc_resolve_char): Call it.
293 (gfc_resolve_transfer): If the MOLD expression does not have a
294 character length expression, get it from a constant length.
296 2007-10-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
299 * simplify.c (gfc_simplify_transfer): Only warn for short transfer when
300 -Wsurprising is given.
301 * invoke.texi: Document revised behavior.
303 2007-10-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
306 * gfortran.texi: Document GFORTRAN_UNBUFFERED_PRECONNECTED
307 environment variable. Delete mention of environment variable
308 GFORTRAN_UNBUFFERED_n.
310 2007-10-18 Paul Thomas <pault@gcc.gnu.org>
313 * resolve.c (check_host_association): Check singly contained
314 namespaces and start search for symbol in current namespace.
316 2007-10-18 Paul Thomas <pault@gcc.gnu.org>
317 Dominique d'Humieres <dominiq@lps.ens.fr>
320 * simplify.c (gfc_simplify_transfer): Return null if the source
321 expression is EXPR_FUNCTION.
323 2007-10-17 Christopher D. Rickett <crickett@lanl.gov>
326 * symbol.c (gen_special_c_interop_ptr): Remove code to create
327 constructor for c_null_ptr and c_null_funptr with value of 0.
328 * expr.c (check_init_expr): Prevent check on constructors for
329 iso_c_binding derived types.
330 * resolve.c (resolve_structure_cons): Verify that the user isn't
331 trying to invoke a structure constructor for one of the
332 iso_c_binding derived types.
334 2007-10-15 Christopher D. Rickett <crickett@lanl.gov>
337 * trans-expr.c (gfc_conv_function_call): Generate code to inline
339 * symbol.c (get_iso_c_sym): Preserve from_intmod and intmod_sym_id
340 attributes in the resolved symbol.
341 * resolve.c (gfc_iso_c_sub_interface): Remove dead code.
343 2007-10-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
346 * trans-io.c (create_dummy_iostat): New function to create a unique
347 dummy variable expression to use with IOSTAT.
348 (gfc_trans_inquire): Use the new function to pass unit number error info
349 to run-time library if a regular IOSTAT variable was not given.
351 2007-10-14 Tobias Burnus <burnus@net-b.de>
354 * trans-array.c (gfc_conv_ss_startstride): Fix dimension check.
355 (gfc_trans_array_bound_check, gfc_conv_array_ref,
356 gfc_conv_ss_startstride): Simplify error message.
357 * resolve.c (check_dimension): Fix dimension-type switch;
358 improve error message.
360 2007-10-13 Tobias Schlüter <tobi@gcc.gnu.org>
361 Paul Thomas <pault@gcc.gnu.org>
365 * trans-array.c (get_array_ctor_var_strlen): Check upper bound for
366 constness instead of lower bound.
367 (get_array_ctor_strlen): Add bounds-checking code.
369 2007-10-12 Paul Thomas <pault@gcc.gnu.org>
372 * resolve.c (resolve_actual_arglist): If the actual argument is
373 ambiguous, then there is an error.
375 2007-10-12 Paul Thomas <pault@gcc.gnu.org>
378 * expr.c (gfc_specification_expr): If a function is not
379 external, intrinsic or pure is an error. Set the symbol pure
380 to prevent repeat errors.
382 2007-10-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
385 * expr.c (find_array_section): Check for constructor constantness.
387 2007-10-08 Tobias Schlüter <tobi@gcc.gnu.org>
390 * resolve.c (gfc_resolve_expr): Fix indentation.
391 (resolve_fl_variable_derived): Rename argument.
392 (resolve_fl_variable): Fix case in message. Clarify logic.
393 Correctly simplify array bounds.
395 2007-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
398 * mathbuiltins.def (GAMMA): Change function name to
399 "tgamma" instad of "gamma".
401 2007-10-07 Tobias Schlüter <tobi@gcc.gnu.org>
404 * expr.c (check_inquiry): Typo fix in error message.
405 (check_init_expr): Same * 3.
406 (check_restricted): Verify that no dummy arguments appear in
407 restricted expressions in ELEMENTAL procedures.
408 * resolve.c (resolve_fl_variable): Exchange order of checks to
411 2007-10-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
414 * simplify.c (range_check): Return gfc_bad_expr if incoming expression
417 2007-10-06 Tobias Schlüter <tobi@gcc.gnu.org>
419 * simplify.c (gfc_simplify_size): Fix typo.
421 2007-10-06 Tobias Schlüter <tobi@gcc.gnu.org>
424 * resolve.c (gfc_find_forall_index): Move towards top,
426 (find_forall_index): ... this. Add check for NULL expr.
427 (resolve_forall_iterators): Verify additional constraint.
428 (resolve_forall): Remove checks obsoleted by new code in
429 resolve_forall_iterators.
431 2007-10-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
433 * gfortran.h (gfc_get_data_variable, gfc_get_data_value,
434 gfc_get_data): Move to decl.c.
435 (global_used): Rename into gfc_global_used.
436 (gfc_formalize_init_value, gfc_get_section_index,
437 gfc_assign_data_value, gfc_assign_data_value_range,
438 gfc_advance_section): Move to data.h.
439 (gfc_set_in_match_data): Remove.
440 * decl.c (gfc_get_data_variable, gfc_get_data_value,
441 gfc_get_data): Move here.
442 (gfc_set_in_match_data): Rename into set_in_match_data.
443 (gfc_match_data): Likewise.
444 (add_global_entry): Rename global_used into gfc_global_used.
445 * data.c: Include data.h.
446 * trans.h (gfc_todo_error): Remove.
447 * trans-array.c (gfc_trans_array_constructor,
448 gfc_conv_ss_startstride, gfc_conv_loop_setup): Change
449 gfc_todo_error into assertions.
450 * resolve.c (resolve_global_procedure): Rename global_used into
452 * parse.c (gfc_global_used, parse_module, add_global_procedure,
453 add_global_program): Likewise.
454 * trans-intrinsic.c (gfc_walk_intrinsic_function): Rename
455 global_used into gfc_global_used.
456 * Make-lang.in: Add dependencies on fortran/data.h.
459 2007-10-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
462 * decl.c (match_char_kind): New function.
463 (match_char_spec): Use match_char_kind.
465 2007-10-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
468 * scanner.c (gfc_advance_line): Call debug_hooks->end_source_file
469 and debug_hooks->start_source_file when appropriate, and set
471 (gfc_define_undef_line): New function.
472 (load_file): Don't error out on #define and #undef lines.
473 * parse.c (next_statement): Call gfc_define_undef_line.
474 (gfc_parse_file): Call debug_hooks->start_source_file and
475 debug_hooks->end_source_file for the main source file if
477 * gfortran.h (gfc_linebuf): Add dbg_emitted field.
478 (gfc_define_undef_line): New prototype.
480 2007-10-04 Tobias Schlüter <tobi@gcc.gnu.org>
483 * resolve.c (resolve_operator): Always copy the type for
484 expressions in parentheses.
486 2007-10-04 Paul Thomas <pault@gcc.gnu.org>
490 * interface.c (check_interface1): Revert patch of 10-02.
492 2007-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
495 * trans-decl.c (build_function_decl): Set "externally_visible"
496 attribute on the MAIN program decl.
498 2007-10-03 Tobias Schlüter <tobi@gcc.gnu.org>
501 * resolve.c (has_default_initializer): Move to top. Make bool.
502 (resolve_common_blocks): Simplify logic. Add case for derived
504 (resolve_fl_variable_derived): Split out from ...
505 (resolve_fl_variable): ... here, while adapting to new h_d_i
508 2007-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
511 * options.c (gfc_post_options): Issue an error when
512 -fwhole-program is used.
514 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
517 * interface.c (check_interface1): Specific procedures are
518 always ambiguous if they have the same name.
520 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
523 * primary.c (gfc_match_rvalue): Make all expressions with array
524 references to structure parameters into variable expressions.
526 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
529 * trans-decl.c (init_intent_out_dt): New function.
530 (gfc_trans_deferred_vars): Remove the code for default
531 initialization of INTENT(OUT) derived types and put it
532 in the new function. Call it earlier than before, so
533 that array offsets and lower bounds are available.
535 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
538 * decl.c (get_proc_name): Return rc if rc is non-zero; ie. if
539 the name is a reference to an ambiguous symbol.
541 2007-10-02 Paul Thomas <pault@gcc.gnu.org>
546 * decl.c : Declare gfc_function_kind_locs and
547 gfc_function_type_locus.
548 (gfc_match_kind_spec): Add second argument kind_expr_only.
549 Store locus before trying to match the expression. If the
550 current state corresponds to a function declaration and there
551 is no match to the expression, read to the parenthesis, return
552 kind = -1, dump the expression and return.
553 (gfc_match_type_spec): Renamed from match_type_spec and all
554 references changed. If an interface or an external function,
555 store the locus, set kind = -1 and return. Otherwise, if kind
556 is already = -1, use gfc_find_symbol to try to find a use
557 associated or imported type.
558 match.h : Prototype for gfc_match_type_spec.
559 * parse.c (match_deferred_characteristics): New function.
560 (parse_spec): If in a function, statement is USE or IMPORT
561 or DERIVED_DECL and the function kind=-1, call
562 match_deferred_characteristics. If kind=-1 at the end of the
563 specification expressions, this is an error.
564 * parse.h : Declare external gfc_function_kind_locs and
565 gfc_function_type_locus.
567 2007-09-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
569 * module.c (mio_expr): Avoid -Wcast-qual warning.
571 2007-09-27 Tobias Schlüter <tobi@gcc.gnu.org>
573 * arith.c (reduce_binary_aa): Fix capitalization.
574 * check.c (gfc_check_dot_product): Likewise.
575 (gfc_check_matmul): Likewise.
576 * expr.c (gfc_check_conformance): Likewise.
577 (gfc_check_assign): Likewise.
578 (gfc_default_initializer): Simplify logic.
579 * trans.c (gfc_msg_bounds): Make const.
580 (gfc_msg_fault): Likewise.
581 (gfc_msg_wrong_return): Likewise.
582 * trans.h: Add const to corresponding extern declarations.
584 2007-09-27 Paul Thomas <pault@gcc.gnu.org>
587 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Allow for the
588 possibility of the optional KIND argument by making arg
589 an array, counting the number of arguments and using arg[0].
591 2007-09-26 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
594 * invoke.texi: Add note to -ffpe-trap option. Fix typos.
596 2007-09-23 Tobias Schlüter <tobi@gcc.gnu.org>
599 * io.c (check_format_string): Move NULL and constant checks into
601 (check_io_constraints): Call gfc_simplify_expr() before calling
602 check_format_string(). Remove NULL and constant checks.
604 2007-09-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
607 * scanner.c, parse.c, gfortran.h: Revert revision 128671.
609 2007-09-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
612 * scanner.c (preprocessor_line): Call linemap_add when exiting
614 (gfc_new_file): Adjust debug code for USE_MAPPED_LOCATION.
616 2007-09-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
619 * trans-types.c (gfc_get_desc_dim_type): Mark artificial
620 variables with TREE_NO_WARNING.
621 (gfc_get_array_descriptor_base): Likewise.
623 2007-09-22 Paul Thomas <pault@gcc.gnu.org>
627 * trans-decl.c (gfc_create_module_variable): Output
628 derived type parameters.
629 * arith.c (gfc_parentheses): Return the argument if
630 it is a constant expression.
631 * primary.c (gfc_match_rvalue): Remove the clearing of
632 the module name and the use_assoc attribute for derived
633 type parameter expressions.
635 2007-09-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
638 * scanner.c (gfc_advance_line): Call debug_hooks->start_source_file
639 and debug_hooks->end_source_file when entering and exiting
641 (gfc_define_undef_line): New function.
642 (load_file): Ignore #define and #undef preprocessor lines
643 while reading source files.
644 * parse.c (next_statement): Handle #define and #undef
646 (gfc_parse_file): Call debug_hooks->start_source_file and
647 debug_hooks->end_source_file for the main source file if
648 requested by the debug format.
649 * gfortran.h (gfc_define_undef_line): Add prototype.
651 2007-09-22 Tobias Burnus <burnus@net-b.de>
654 * scanner.c (skip_free_comments): Warn if !$OMP& is used
655 if no OpenMP directive is to be continued.
657 2007-09-21 Paul Thomas <pault@gcc.gnu.org>
659 *trans-expr.c (gfc_trans_pointer_assignment): Convert array
660 descriptor for subref pointer assignements, rather than using
661 the loop info version.
663 2007-09-21 Tobias Burnus <burnus@net-b.de>
666 * simplify.c (gfc_simplify_transfer): Warn if source size
667 is smaller than result size.
669 2007-09-20 Asher Langton <langton2@llnl.gov>
672 * gfortran.h : Add init_local_* enums and init_flag_* flags to
674 * lang.opt: Add -finit-local-zero, -finit-real, -finit-integer,
675 -finit-character, and -finit-logical flags.
676 * invoke.texi: Document new options.
677 * resolve.c (build_init_assign): New function.
678 (apply_init_assign): Move part of function into build_init_assign.
679 (build_default_init_expr): Build local initializer (-finit-*).
680 (apply_default_init_local): Apply local initializer (-finit-*).
681 (resolve_fl_variable): Try to add local initializer (-finit-*).
682 * options.c (gfc_init_options, gfc_handle_option,
683 gfc_post_options): Handle -finit-local-zero, -finit-real,
684 -finit-integer, -finit-character, and -finit-logical flags.
686 2007-09-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
689 * gfortran.h (symbol_attribute): Add zero_comp field.
690 * symbol.c (gfc_use_derived): Handle case of emtpy derived types.
691 * decl.c (gfc_match_data_decl): Likewise.
692 (gfc_match_derived_decl): Likewise.
693 * module.c (ab_attribute, attr_bits): Add AB_ZERO_COMP member.
694 (mio_symbol_attribute): Write and read AB_ZERO_COMP.
695 * resolve.c (resolve_symbol): Handle case of emtpy derived types.
696 * parse.c (parse_derived): Likewise.
698 2007-09-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
701 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
702 reduce_binary_aa): Call ourselves recursively if an element of
703 the constructor is itself a constant array.
705 2007-09-20 Tobias Schlüter <tobi@gcc.gnu.org>
707 * io.c (resolve_tag_format): New function using code split out
708 and simplified from ...
709 (resolve_tag): ... this function. Simplify logic. Unify
710 IOSTAT, IOLENGTH and SIZE handling.
712 2007-09-20 Christopher D. Rickett <crickett@lanl.gov>
715 * resolve.c (gfc_iso_c_func_interface): Use information from
716 subcomponent if applicable.
718 2007-09-20 Tobias Burnus <burnus@net-b.de>
721 * intrinsic.text: Add documentation of the intrinsic modules.
722 * gfortran.texi: Link to intrinsic-modules section and to
725 2007-09-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
728 * trans-array.c (gfc_conv_ss_startstride): Only perform bounds
729 checking for optional args when they are present.
731 2007-09-18 Tobias Burnus <burnus@net-b.de>
734 * resolve.c (resolve_elemental_actual): Check for conformance
735 of intent out/inout dummies.
737 2007-09-17 Tobias Burnus <burnus@net-b.de>
740 * resolve.c (resolve_symbol): Reject public variable of
741 private derived-types for Fortran 95.
743 2007-09-17 Tobias Burnus <burnus@net-b.de>
745 * resolve.c (resolve_fl_procedure): Allow private dummies
748 2007-09-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
750 * trans-types.c (gfc_get_desc_dim_type): Do not to try
752 (gfc_get_array_descriptor_base): Likewise.
753 (gfc_get_mixed_entry_union): Likewise
754 (gfc_get_derived_type): Set decl location for fields and
757 2007-09-16 Paul Thomas <pault@gcc.gnu.org>
763 * trans.h : Add extra argument to gfc_build_array_ref. Rename
764 gfc_conv_aliased_arg to gfc_conv_subref_array_arg. Move
765 prototype of is_aliased_array to gfortran.h and rename it
766 gfc_is_subref_array. Add field span to lang_decl, add a new
767 decl lang specific flag accessed by GFC_DECL_SUBREF_ARRAY_P
768 and a new type flag GFC_DECL_SUBREF_ARRAY_P.
769 * trans.c (gfc_build_array_ref): Add the new argument, decl.
770 If this is a subreference array pointer, use the lang_decl
771 field 'span' to calculate the offset in bytes and use pointer
772 arithmetic to address the element.
773 * trans-array.c (gfc_conv_scalarized_array_ref,
774 gfc_conv_array_ref): Add the backend declaration as the third
775 field, if it is likely to be a subreference array pointer.
776 (gfc_conv_descriptor_dimension, gfc_trans_array_ctor_element,
777 gfc_trans_array_constructor_element, structure_alloc_comps,
778 gfc_conv_array_index_offset): For all other references to
779 gfc_build_array_ref, set the third argument to NULL.
780 (gfc_get_dataptr_offset): New function.
781 (gfc_conv_expr_descriptor): If the rhs of a pointer assignment
782 is a subreference array, then calculate the offset to the
783 subreference of the first element and set the descriptor data
784 pointer to this, using gfc_get_dataptr_offset.
785 trans-expr.c (gfc_get_expr_charlen): Use the expression for the
786 character length for a character subreference.
787 (gfc_conv_substring, gfc_conv_subref_array_arg): Add NULL for
788 third argument in call to gfc_build_array_ref.
789 (gfc_conv_aliased_arg): Rename to gfc_conv_subref_array_arg.
790 (is_aliased_array): Remove.
791 (gfc_conv_function_call): Change reference to is_aliased_array
792 to gfc_is_subref_array and reference to gfc_conv_aliased_arg to
793 gfc_conv_subref_array_arg.
794 (gfc_trans_pointer_assignment): Add the array element length to
795 the lang_decl 'span' field.
796 * gfortran.h : Add subref_array_pointer to symbol_attribute and
797 add the prototype for gfc_is_subref_array.
798 * trans-stmt.c : Add NULL for third argument in all references
799 to gfc_build_array_ref.
800 * expr.c (gfc_is_subref_array): Renamed is_aliased_array.
801 If this is a subreference array pointer, return true.
802 (gfc_check_pointer_assign): If the rhs is a subreference array,
803 set the lhs subreference_array_pointer attribute.
804 * trans-decl.c (gfc_get_symbol_decl): Allocate the lang_decl
805 field if the symbol is a subreference array pointer and set an
806 initial value of zero for the 'span' field.
807 * trans-io.c (set_internal_unit): Refer to is_subref_array and
808 gfc_conv_subref_array_arg.
809 (nml_get_addr_expr): Add NULL third argument to
811 (gfc_trans_transfer): Use the scalarizer for a subreference
814 2007-09-13 Thomas Koenig <tkoenig@gcc.gnu.org>
816 * iresolve.c (resolve_mask_arg): If a mask is an array
817 expression, convert it to kind=1.
819 2007-09-13 Tobias Burnus <burnus@net-b.de>
822 * expr.c (gfc_check_conformance): Print ranks in the error message.
823 * resolve.c (resolve_elemental_actual): Check also conformance of
824 the actual arguments for elemental functions.
826 2007-09-13 Tobias Burnus <burnus@net-b.de>
828 * symbol.c (gfc_add_elemental,gfc_add_pure,gfc_add_recursive):
829 Allow prefixes only to be specified once.
831 2007-09-13 Tobias Burnus <burnus@net-b.de>
834 * symbol.c (check_conflict): Add conflict of ELEMENTAL with Bind(C).
836 2007-09-12 Tobias Burnus <burnus@net-b.de>
839 * check.c (scalar_check): Move up in the file.
840 (kind_check): Call scalar_check.
841 (dim_check): If optional, do not call nonoptional_check; use
843 (gfc_check_all_any,gfc_check_count,gfc_check_cshift,gfc_check_eoshift,
844 gfc_check_lbound,gfc_check_minloc_maxloc,check_reduction,
845 gfc_check_spread,gfc_check_ubound): Use true/false instead of 0/1
846 for dim_check; honor changed meaning of optional.
847 (gfc_check_int): Replace checks by kind_check.
848 (gfc_check_size): Replace checks by dim_check.
850 2007-09-12 Tobias Burnus <burnus@net-b.de>
854 * symbol.c (check_conflict): Add conflict between INTRINSIC and ENTRY
855 and between BIND(C) and PARAMETER.
857 2007-09-12 Tobias Burnus <burnus@net-b.de>
859 * trans-expr.c (gfc_conv_initializer): Fix expr == NULL check.
861 2007-09-12 Jan Hubicka <jh@suse.cz>
863 * f95-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
865 2007-09-12 Christopher D. Rickett <crickett@lanl.gov>
868 * trans-expr.c (gfc_conv_initializer): Remove unnecessary test for
869 intmod_sym_id and use derived symbol to set new kind of C_NULL_PTR
870 and C_NULL_FUNPTR expressions.
872 2007-09-11 Christopher D. Rickett <crickett@lanl.gov>
875 * trans-expr.c (gfc_trans_structure_assign): Convert component
876 C_NULL_PTR and C_NULL_FUNPTR component initializers to (void *).
877 * trans-types.c (gfc_get_derived_type): Create a backend_decl for
878 the c_address field of C_PTR and C_FUNPTR and ensure initializer
879 is of proper type/kind for (void *).
881 2007-09-11 Jan Hubicka <jh@suse.cz>
883 * f95-lang.c (gfc_expand_function): Kill.
884 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
886 2007-09-08 Tobias Burnus <burnus@net-b.de>
889 * gfortran.texi: Document when CPP is called.
891 * intrinsic.texi (IOR): Fix typos.
893 2007-09-10 Paul Thomas <pault@gcc.gnu.org>
896 * trans-expr.c (copyable_array_p): Add tests that expression
897 is a variable, that it has no subreferences and that it is a
899 (gfc_trans_assignment): Change conditions to suit modifications
902 2007-09-06 Tom Tromey <tromey@redhat.com>
904 * scanner.c (get_file): Update.
906 (gfc_next_char_literal): Use gfc_linebuf_linenum.
907 * f95-lang.c (gfc_init): Update.
908 * gfortran.h (gfc_linebuf_linenum): New macro.
910 2007-09-05 Sandra Loosemore <sandra@codesourcery.com>
912 * trans-decl.c (build_entry_thunks): Use set_cfun.
913 (gfc_generate_function_code): Likewise.
915 2007-09-05 Paul Thomas <pault@gcc.gnu.org>
918 * primary.c (gfc_match_rvalue): Make expressions that refer
919 to derived type parameters that have array references into
920 variable expressions. Remove references to use association
924 * decl.c (add_init_expr_to_sym): Provide assumed character
925 length parameters with the length of the initialization
926 expression, if a constant, or that of the first element of
929 2007-09-04 Janus Weil <jaydub66@gmail.com>
930 Paul Thomas <pault@gcc.gnu.org>
932 * decl.c (match_procedure_decl,match_procedure_in_interface,
933 gfc_match_procedure): Handle PROCEDURE statements.
934 * gfortran.h (struct gfc_symbol): New member "gfc_symbol *interface".
935 (enum gfc_statement): New element "ST_PROCEDURE".
936 (strcut symbol_attribute): New member "unsigned procedure".
937 * interface.c (check_interface0): Extended error checking.
938 * match.h: Add gfc_match_procedure prototype.
939 * parse.c (decode_statement,next_statement,gfc_ascii_statement,
940 parse_derived,parse_interface): Implement PROCEDURE statements.
941 * resolve.c (resolve_symbol): Ditto.
942 * symbol.c (check_conflict): Ditto.
943 (gfc_add_proc): New function for setting the procedure attribute.
944 (copy_formal_args): New function for copying formal argument lists.
946 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
948 * Make-lang.in (gfortranspec.o): Remove SHLIB_MULTILIB.
950 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
952 * gfortranspec.c (lang_specific_driver): Use CONST_CAST2.
953 * options.c (gfc_post_options): Supply a TYPE for CONST_CAST.
954 * parse.c (parse_omp_structured_block): Likewise,
955 * st.c (gfc_free_statement): Likewise,
957 2007-09-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
960 * libgfortran.h: New file.
961 * iso-fortran-env.def: Use macros in the new header instead of
962 hardcoded integer constants.
963 * Make-lang.in (F95_PARSER_OBJS, GFORTRAN_TRANS_DEPS): Add
964 fortran/libgfortran.h.
965 * gfortran.h (GFC_STD_*, GFC_FPE_*, options_convert,
966 ioerror_codes): Remove.
967 * trans.c (ERROR_ALLOCATION): Remove.
968 (gfc_call_malloc, gfc_allocate_with_status,
969 gfc_allocate_array_with_status): Use LIBERROR_ALLOCATION.
970 * trans-types.h (GFC_DTYPE_*): Remove.
971 * trans-decl.c (gfc_generate_function_code): Use
972 GFC_CONVERT_NATIVE instead of CONVERT_NATIVE.
973 * trans-io.c (set_parameter_value, set_parameter_ref): Use
974 LIBERROR_* macros instead of IOERROR_ macros.
975 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use
976 LIBERROR_END and LIBERROR_EOR instead of hardcoded constants.
977 * options.c (gfc_init_options): Use GFC_CONVERT_NATIVE instead of
979 (gfc_handle_option): Use GFC_CONVERT_* macros instead of CONVERT_*.
981 2007-09-02 Steven G. Kargl <kargl@gcc.gnu.org>
983 * invoke.texi: Fix the -frange-checking option entry.
985 2007-09-02 Roger Sayle <roger@eyesopen.com>
987 * decl.c (match_string_p): New helper function to explicitly match
988 a string of characters.
989 (match_attr_spec): Remove no longer needed DECL_COLON from decl_types.
990 Delete decls array and peek_char. Rewrite decl attribute parser to
991 avoid calling gfc_match_strings.
992 * match.c (gfc_match_strings): Delete unused function.
993 * match.h (gfc_match_strings): Delete prototype.
995 2007-09-02 Tobias Schlüuter <tobi@gcc.gnu.org>
997 * dump-parse-tree.c (show_char_const): New function.
998 (gfc_show_expr): Use it.
999 * expr.c (find_substring_ref): Rework to not keep characters
1000 dangling beyond end of string.
1002 2007-09-02 H.J. Lu <hongjiu.lu@intel.com>
1005 * array.c (expand_iterator): Initialize frame.prev.
1007 2007-08-31 Tobias Burnus <burnus@net-b.de>
1010 * io.c (match_io): Also diagnose extra comma for READ.
1012 2007-08-31 Joseph Myers <joseph@codesourcery.com>
1014 * intrinsic.texi (LGAMMA): Remove empty @cindex line.
1016 2007-08-31 Paul Thomas <pault@gcc.gnu.org>
1022 * gfortran.h : Add prototype for gfc_resolve_substring_charlen.
1023 * resolve.c (gfc_resolve_substring_charlen): New function.
1024 (resolve_ref): Call gfc_resolve_substring_charlen.
1025 (gfc_resolve_character_operator): New function.
1026 (gfc_resolve_expr): Call the new functions in cases where the
1027 character length is missing.
1028 * iresolve.c (cshift, eoshift, merge, pack, reshape, spread,
1029 transpose, unpack): Call gfc_resolve_substring_charlen for
1030 source expressions that are character and have a reference.
1031 * trans.h (gfc_trans_init_string_length) Change name to
1032 gfc_conv_string_length; modify references in trans-expr.c,
1033 trans-array.c and trans-decl.c.
1034 * trans-expr.c (gfc_trans_string_length): Handle case of no
1036 (gfc_conv_aliased_arg): Remove code for treating substrings
1037 and replace with call to gfc_trans_string_length.
1038 * trans-array.c (gfc_conv_expr_descriptor): Remove code for
1039 treating strings and call gfc_trans_string_length instead.
1041 2007-08-30 Tobias Burnus <burnus@net-b.de>
1044 * interface.c (check_interface0): Improve error for external procs.
1045 (check_sym_interfaces): Fix checking of module procedures.
1047 2007-08-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1050 * iresolve.c (gfc_resolve_getarg): Handle non-default integer
1052 * check.c (gfc_check_getarg): New function
1053 * intrinsic.h: Add prototype for gfc_check_getarg.
1054 * intrinsic.c (add_subroutines): Add reference to gfc_check_getarg.
1055 * intrinsic.texi (GETARG): Adjust documentation.
1057 2007-08-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1058 Tobias Burnus <burnus@gcc.gnu.org>
1061 * intrinsic.c (add_functions): Add IS_IOSTAT_END and
1062 IS_IOSTAT_EOR intrinsics.
1063 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_IOSTAT_END and
1064 GFC_ISYM_IS_IOSTAT_EOR.
1065 * trans-intrinsic.c (gfc_conv_has_intvalue): New function.
1066 (gfc_conv_intrinsic_function): Call gfc_conv_has_intvalue for
1067 GFC_ISYM_IS_IOSTAT_END and GFC_ISYM_IS_IOSTAT_EOR.
1068 * intrinsic.texi: Add IS_IOSTAT_END and IS_IOSTAT_EOR.
1070 2007-08-28 Christopher D. Rickett <crickett@lanl.gov>
1073 * decl.c (build_sym): Pass number of identifiers on line to
1075 (set_binding_label): Verify that only one identifier given if
1076 NAME= specified, even if the given binding label has zero length.
1077 (gfc_match_bind_c): Remove declaration for has_name_equals because
1078 it hides the static global one that is needed.
1080 2007-08-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1082 * trans-array.c (gfc_grow_array): Use gfc_call_realloc.
1083 (gfc_array_allocate): Use gfc_allocate_with_status and
1084 gfc_allocate_array_with_status.
1085 (gfc_array_deallocate): Use gfc_deallocate_with_status.
1086 (gfc_trans_dealloc_allocated): Use gfc_deallocate_with_status.
1087 * trans-stmt.c (gfc_trans_allocate): Use gfc_allocate_with_status.
1088 (gfc_trans_deallocate): Use gfc_deallocate_with_status.
1089 * trans.c (gfc_allocate_with_status, gfc_allocate_array_with_status,
1090 gfc_deallocate_with_status, gfc_call_realloc): New functions.
1091 * trans.h (gfc_allocate_with_status, gfc_allocate_array_with_status,
1092 gfc_deallocate_with_status, gfc_call_realloc): New prototypes.
1093 (gfor_fndecl_internal_realloc, gfor_fndecl_allocate,
1094 gfor_fndecl_allocate_array, gfor_fndecl_deallocate): Remove.
1095 * f95-lang.c (gfc_init_builtin_functions): Create decl for
1097 * trans-decl.c (gfor_fndecl_internal_realloc,
1098 gfor_fndecl_allocate, gfor_fndecl_allocate_array,
1099 gfor_fndecl_deallocate): Remove function decls.
1100 (gfc_build_builtin_function_decls): Likewise.
1102 2007-08-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1105 Revert previous patch.
1107 2007-08-28 Jakub Jelinek <jakub@redhat.com>
1110 * Make-lang.in (fortran/trans-types.o): Depend on $(FLAGS_H).
1111 * trans-types.c: Include flags.h.
1112 (gfc_get_nodesc_array_type): Add TYPE_DECL TYPE_NAME with
1113 correct bounds and dimensions for packed arrays.
1115 2007-08-27 Tobias Burnus <burnus@net-b.de>
1117 * simplify.c (gfc_simplify_lgamma): Fix mpfr_lgamma call.
1119 2007-08-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1122 * trans-io.c (create_dummy_iostat): New function to create a unique
1123 dummy variable expression to use with IOSTAT.
1124 (gfc_trans_inquire): Use the new function to pass unit number error info
1125 to run-time library if a regular IOSTAT variable was not given.
1127 2007-08-26 H.J. Lu <hongjiu.lu@intel.com>
1129 * gfortran.h (gfc_isym_id): Add GFC_ISYM_GAMMA and
1132 2007-08-26 Asher Langton <langton2@llnl.gov>
1133 Tobias Burnus <burnus@net-b.de>
1135 * gfortran.h (gfc_option_t): Add flag_recursive.
1136 * lang.opt: Add -frecursive option and update -fopenmp.
1137 * invoke.texi (-frecursive): Document new option.
1138 (-fopenmp,-fno-automatic,-fmax-stack-var-size): Update.
1139 * options.c (gfc_init_options, gfc_post_options,
1140 gfc_handle_option): Add -frecursive and modify -fopenmp.
1141 (gfc_post_options): Add warning for conflicting flags.
1143 2007-08-26 Tobias Burnus <burnus@net-b.de>
1146 * module.c (mio_symbol_ref,mio_interface_rest): Return pointer_info.
1147 (load_operator_interfaces): Support multible loading of an operator.
1149 2007-08-26 Tobias Burnus <burnus@net-b.de>
1152 * match.c (gfc_match_common): Remove SEQUENCE diagnostics.
1153 * resolve.c (resolve_common_blocks): Add SEQUENCE diagnostics;
1154 fix walking through the tree.
1156 2007-08-26 Tobias Burnus <burnus@net-b.de>
1159 * intrinsic.h (gfc_simplify_gamma,gfc_simplify_lgamma,
1160 gfc_resolve_gamma,gfc_resolve_lgamma): New function declations.
1161 * mathbuiltins.def: Define GAMMA and LGAMMA.
1162 * intrinsic.c (add_functions): Add GAMMA, DGAMMA, LGAMMA, ALGAMA
1164 * simplify.c (gfc_simplify_gamma,gfc_simplify_lgamma): New functions.
1165 * iresolve.c (gfc_resolve_gamma,gfc_resolve_lgamma): New functions.
1166 * intrinsic.texi: Add documentation for GAMMA and LGAMMA.
1168 2007-08-26 Tobias Burnus <burnus@net-b.de>
1171 * parse.c (parse_derived): Support empty derived type
1172 definitions for Fortran 2003.
1174 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1176 * trans-openmp.c (gfc_omp_privatize_by_reference): Constify.
1177 * trans.h (gfc_omp_privatize_by_reference): Likewise.
1179 2007-08-24 Tobias Burnus <burnus@net-b.de>
1182 * intrinsic.c (gfc_intrinsic_func_interface): Fix initialization
1185 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1188 * iresolve.c: Don't convert array masks.
1190 2007-08-24 Tobias Burnus <burnus@net-b.de>
1193 * trans-array.c (gfc_conv_expr_descriptor): Copy bounds for
1194 whole-array pointer assignments.
1196 2007-08-23 Jakub Jelinek <jakub@redhat.com>
1198 * decl.c (variable_decl): Don't share charlen structs if
1200 * trans-decl.c (create_function_arglist): Assert
1201 f->sym->ts.cl->backend_decl is NULL instead of unsharing
1202 charlen struct here.
1204 2007-08-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1207 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Remove
1208 runtime error checking.
1210 2007-08-22 Roger Sayle <roger@eyesopen.com>
1211 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1213 * match.c (intrinsic_operators): Delete.
1214 (gfc_match_intrinsic_op): Rewrite matcher to avoid calling
1217 2007-08-22 Christopher D. Rickett <crickett@lanl.gov>
1220 * resolve.c (gfc_iso_c_sub_interface): Remove setting of type and
1221 kind for optional SHAPE parameter of C_F_POINTER.
1223 2007-08-22 Janus Weil <jaydub66@gmail.com>
1225 * decl.c (match_attr_spec): Pass on errors from gfc_match_bind_c.
1226 (gfc_match_bind_c): Bugfix in check for NAME= with abstract interfaces.
1227 (gfc_match_mopdproc): Bugfix to reject module procedures in
1228 abstract interfaces.
1230 2007-08-22 Kai Tietz <kai.tietz@onevision.com>
1232 * f95-lang.c: (gfc_init_decl_processing): Choose sizetype by using
1235 2007-08-21 Paul Brook <paul@codesourcery.com>
1236 Nathan Sidwell <nathan@codesourcery.com>
1237 Mark Mitchell <mark@codesourcery.com>
1238 Joseph Myers <joseph@codesourcery.com>
1240 * gfortranspec.c (lang_specific_driver): Use pkgversion_string.
1241 * Make-lang.in (gfortran.pod): Define BUGURL.
1242 * invoke.texi: Use BUGURL for bug-reporting instructions.
1244 2007-08-19 Roger Sayle <roger@eyesopen.com>
1246 * match.c (intrinsic_operators): Make static.
1247 (gfc_op2string): New function for converting a gfc_intrinsic_op to
1248 to a "const char*", replacing the macro of the same name.
1249 * gfortran.h (intrinsic_operators): Delete prototype.
1250 (gfc_op2string): Replace macro with function prototype.
1252 2007-08-18 Tobias Burnus <burnus@net-b.de>
1254 * gfortran.h (gfc_is_intrinsic_typename): Add declaration.
1255 * symbol.c (gfc_is_intrinsic_typename): New function.
1256 * parse.c (decode_statement): Check for space in ABSTRACT INTERFACE.
1257 (parse_interface): Use gfc_is_intrinsic_typename.
1258 * decl.c (gfc_match_derived_decl): Ditto.
1259 * module.c (gfc_match_use): Use gcc_unreachable() for
1260 INTERFACE_ABSTRACT in switch().
1262 2007-08-18 Roger Sayle <roger@eyesopen.com>
1264 * primary.c (match_logical_constant_string): New function to match
1265 a ".true." or a ".false.".
1266 (match_logical_constant): Use it instead of gfc_match_strings.
1268 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
1269 Janus Weil <jaydub66@gmail.com>
1271 * interface.c (gfc_match_interface,gfc_match_abstract_interface,
1272 gfc_match_end_interface,gfc_add_interface): Add abstract interface.
1273 * dump-parse-tree.c (gfc_show_attr): Ditto.
1274 * gfortran.h (interface_type,symbol_attribute): Ditto.
1275 * module.c (gfc_match_use,ab_attribute,attr_bits,
1276 mio_symbol_attribute): Ditto.
1277 * resolve.c (resolve_function): Ditto.
1279 * parse.c (decode_statement): Ditto.
1280 (parse_interface): Ditto, check for C1203 (name of abstract interface
1281 cannot be the same as an intrinsic type).
1282 * decl.c (gfc_match_bind_c): Check for NAME= with abstract interfaces.
1283 (access_attr_decl): Handle Abstract interfaces.
1285 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
1288 * expr.c (gfc_check_pointer_assign): If the rhs is the
1289 initialization expression for the rhs, there is no error.
1291 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
1294 * trans-array.c (get_array_ctor_strlen): Set the character
1295 length of a zero length array to zero.
1297 2007-08-16 Tobias Burnus <burnus@net-b.de>
1300 * module.c (gfc_match_use): Mark user operators as such.
1301 (find_use_name_n): Distinguish between operators and other symbols.
1302 (find_use_name,number_use_names,mio_namelist,
1303 load_operator_interfaces,load_generic_interfaces,read_module,
1304 write_generic): Update find_use_name_n calls.
1306 2007-08-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1309 * trans.c (gfc_create_var_np): Do not emit warnings for
1310 anonymous variables.
1312 2007-08-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1315 * decl.c (gfc_get_type_attr_spec): Fix whitespace.
1316 (gfc_match_derived_decl): Fix logic.
1318 2007-08-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1321 * trans-intrinsic.c (build_fixbound_expr): Convert to result type
1324 2007-08-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1327 * trans-expr.c (gfc_conv_substring_expr): Only call
1328 gfc_conv_substring if expr->ref is not NULL.
1329 * expr.c (gfc_is_constant_expr): If e->ref is NULL, the substring
1330 expression might be a constant.
1331 (gfc_simplify_expr): Handle missing start and end, as well as
1334 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
1337 * match.c (gfc_match_call): Do not create a new symtree in the
1338 case where the existing symbol is external and not referenced.
1340 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
1343 * decl.c (variable_decl): Check for an imported symbol
1344 by looking for its symtree and testing for the imported
1346 (gfc_match_import): Remove change of symbol's namespace
1347 and set the attribute imported instead.
1348 * symbol.c (gfc_get_sym_tree): It is not an error if a
1350 * gfortran.h : Add the 'imported' to symbol_attribute.
1352 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
1355 * trans-array.c (gfc_conv_array_transpose): Set the offset
1356 of the destination to zero if the loop is zero based.
1358 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1361 * intrinsic.c (add_functions): Add optional KIND argument to ACHAR.
1362 * iresolve.c (gfc_resolve_achar): Handle the KIND argument.
1363 * check.c (gfc_check_achar): Check for the optional KIND argument.
1364 * simplify.c (gfc_simplify_achar): Use KIND argument.
1365 * intrinsic.h (gfc_check_achar, gfc_simplify_achar,
1366 gfc_resolve_achar): Adjust prototypes.
1368 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1372 * trans-expr.c (gfc_conv_function_call): When no formal argument
1373 list is available, we still substitute missing optional arguments.
1374 * check.c (gfc_check_random_seed): Correct the check on the
1375 number of arguments to RANDOM_SEED.
1376 * intrinsic.c (add_subroutines): Add a resolution function to
1378 * iresolve.c (gfc_resolve_random_seed): New function.
1379 * intrinsic.h (gfc_resolve_random_seed): New prototype.
1381 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1384 * error.c (error_uinteger): New function.
1385 (error_integer): Call error_uinteger.
1386 (error_print): Handle %u, %lu, %li and %ld format specifiers.
1387 * interface.c (compare_actual_formal): Use the new %lu specifier.
1389 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1392 * lang.opt (-fmodule-private): New option.
1393 * gfortran.h (gfc_option_t): Add flag_module_private member.
1394 * invoke.texi (-fmodule-private): Document the new option.
1395 * module.c (gfc_check_access): Allow the -fmodule-private option
1396 to modify the default behaviour.
1397 * options.c (gfc_init_options): Initialize flag_module_private.
1398 (gfc_handle_option): Handle -fmodule-private.
1400 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1403 * intrinsic.c (add_functions): Add KIND arguments to COUNT,
1404 IACHAR, ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND
1406 * iresolve.c (gfc_resolve_count): Add kind argument.
1407 (gfc_resolve_iachar): New function.
1408 (gfc_resolve_ichar): Add kind argument.
1409 (gfc_resolve_index_func): Likewise.
1410 (gfc_resolve_lbound): Likewise.
1411 (gfc_resolve_len): Likewise.
1412 (gfc_resolve_len_trim): Likewise.
1413 (gfc_resolve_scan): Likewise.
1414 (gfc_resolve_size): New function.
1415 (gfc_resolve_ubound): Add kind argument.
1416 (gfc_resolve_verify): Likewise.
1417 * trans-decl.c (gfc_get_extern_function_decl): Allow specific
1418 intrinsics to have 4 arguments.
1419 * check.c (gfc_check_count): Add kind argument.
1420 (gfc_check_ichar_iachar): Likewise.
1421 (gfc_check_index): Likewise.
1422 (gfc_check_lbound): Likewise.
1423 (gfc_check_len_lentrim): New function.
1424 (gfc_check_scan): Add kind argument.
1425 (gfc_check_size): Likewise.
1426 (gfc_check_ubound): Likewise.
1427 (gfc_check_verify): Likewise.
1428 * intrinsic.texi: Update documentation for COUNT, IACHAR, ICHAR,
1429 INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND and VERIFY.
1430 * simplify.c (get_kind): Whitespace fix.
1431 (int_expr_with_kind): New function.
1432 (gfc_simplify_iachar): Add kind argument.
1433 (gfc_simplify_iachar): Likewise.
1434 (gfc_simplify_ichar): Likewise.
1435 (gfc_simplify_index): Likewise.
1436 (simplify_bound_dim): Likewise.
1437 (simplify_bound): Likewise.
1438 (gfc_simplify_lbound): Likewise.
1439 (gfc_simplify_len): Likewise.
1440 (gfc_simplify_len_trim): Likewise.
1441 (gfc_simplify_scan): Likewise.
1442 (gfc_simplify_shape): Pass NULL as kind argument to gfc_simplify_size.
1443 (gfc_simplify_size): Add kind argument.
1444 (gfc_simplify_ubound): Likewise.
1445 (gfc_simplify_verify): Likewise.
1446 * intrinsic.h: Update prototypes and add new ones.
1447 * trans-intrinsic.c (gfc_conv_intrinsic_index): Rename into
1448 gfc_conv_intrinsic_index_scan_verify.
1449 (gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove.
1450 (gfc_conv_intrinsic_function): Call
1451 gfc_conv_intrinsic_index_scan_verify to translate the INDEX,
1452 SCAN and VERIFY intrinsics.
1454 2007-08-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1457 * invoke.texi (-fbacktrace): Document the new behaviour.
1459 2007-08-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1462 * trans-array.c (gfc_conv_expr_descriptor): Use
1463 gfc_conv_const_charlen to generate backend_decl of right type.
1464 * trans-expr.c (gfc_conv_expr_op): Use correct return type.
1465 (gfc_build_compare_string): Use int type instead of default
1466 integer kind for single character comparison.
1467 (gfc_conv_aliased_arg): Give backend_decl the right type.
1468 * trans-decl.c (gfc_build_intrinsic_function_decls): Make
1469 compare_string return an int.
1471 2007-08-11 Ian Lance Taylor <iant@google.com>
1473 * f95-lang.c (gfc_get_alias_set): Change return type to
1476 2007-08-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1479 * trans.c (gfc_trans_runtime_check): Reorder arguments and
1480 add extra variable arguments. Hand them to the library function.
1481 * trans.h (gfc_trans_runtime_check): Update prototype.
1482 * trans-array.c (gfc_trans_array_bound_check): Issue more
1483 detailled error messages.
1484 (gfc_conv_array_ref): Likewise.
1485 (gfc_conv_ss_startstride): Likewise.
1486 (gfc_trans_dummy_array_bias): Reorder arguments to
1487 gfc_trans_runtime_check.
1488 * trans-expr.c (gfc_conv_substring): Issue more detailled
1490 (gfc_conv_function_call): Reorder arguments to gfc_trans_runtime_check.
1491 * trans-stmt.c (gfc_trans_goto): Likewise.
1492 * trans-io.c (set_string): Reorder arguments to
1493 gfc_trans_runtime_check and issue a more detailled error message.
1494 * trans-decl.c (gfc_build_builtin_function_decls): Make
1495 runtime_error and runtime_error_at handle a variable number of
1497 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Reorder arguments
1498 to gfc_trans_runtime_check.
1499 (gfc_conv_intrinsic_minmax): Likewise.
1500 (gfc_conv_intrinsic_repeat): Issue more detailled error messages.
1502 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1504 * gfortranspec.c (lang_specific_driver): Use CONST_CAST.
1505 * options.c (gfc_post_options): Likewise.
1506 * parse.c (parse_omp_structured_block): Likewise.
1507 * st.c (gfc_free_statement): Likewise.
1509 2007-08-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1512 * trans-decl.c (gfc_build_builtin_function_decls): Change
1513 prototype for associated.
1514 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert the
1515 result of __builtin_isnan into a boolean.
1516 (gfc_conv_intrinsic_strcmp): Cleanup.
1517 (gfc_conv_associated): Convert the result of the associated
1518 function into a boolean.
1520 2007-08-09 Tobias Burnus <burnus@net-b.de>
1523 * io.c (format_token): Add FMT_ERROR.
1524 (next_char_not_space): Print error/warning when
1525 '\t' are used in format specifications.
1526 (format_lex): Propagate error.
1527 (check_format): Ditto.
1529 2007-08-09 Tobias Burnus <burnus@net-b.de>
1532 * arith.c (arith_error): Point in the error message
1533 to -fno-range-check.
1535 2007-08-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1538 * intrinsic.texi (SIZEOF): Add mention to C_SIZE_T.
1540 2007-08-06 Christopher D. Rickett <crickett@lanl.gov>
1543 * trans-expr.c (gfc_conv_scalar_char_value): Convert the tree and
1544 actual arg expressions for scalar characters passed by-value to
1546 (gfc_conv_function_call): Call gfc_conv_scalar_char_value.
1547 * trans.h: Add prototype for gfc_conv_scalar_char_value.
1548 * trans-decl.c (generate_local_decl): Convert by-value character
1549 dummy args of bind(c) procedures using
1550 gfc_conv_scalar_char_value.
1552 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1555 * iresolve.c (gfc_resolve_alarm_sub): Suffix the subroutine name
1556 with the kind of the STATUS argument.
1558 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1561 * intrinsic.c (add_functions): Fix name of argument to CHDIR.
1563 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1566 * iresolve.c (gfc_resolve_exit): Convert argument to default
1569 2007-08-06 Daniel Franke <franke.daniel@gmail.com>
1571 * resolve.c (derived_pointer): Removed, replaced callers by access
1572 to appropiate attribute bit.
1573 (derived_inaccessable): Shortcut recursion depth.
1574 (resolve_fl_namelist): Fixed checks for private components in namelists.
1576 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1579 * trans.h (gfor_fndecl_string_minmax): New prototype.
1580 * trans-decl.c (gfor_fndecl_string_minmax): New variable.
1581 (gfc_build_intrinsic_function_decls): Create gfor_fndecl_string_minmax.
1582 * check.c (gfc_check_min_max): Allow for character arguments.
1583 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): New function.
1584 (gfc_conv_intrinsic_function): Add special case for MIN and MAX
1585 intrinsics with character arguments.
1586 * simplify.c (simplify_min_max): Add simplification for character
1589 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1592 * invoke.texi: Adjust documentation for option -fsyntax-only.
1594 2007-08-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1595 Tobias Burnus <burnus@gcc.gnu.org>
1598 * intrinsic.h (gfc_check_isnan): Add prototype.
1599 * gfortran.h (gfc_isym_id): Add GFC_ISYM_ISNAN.
1600 * intrinsic.c (add_functions): Add ISNAN intrinsic.
1601 * check.c (gfc_check_isnan): New function.
1602 * trans-intrinsic.c (gfc_conv_intrinsic_isnan): New function.
1603 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_isnan
1605 * intrinsic.texi: Document ISNAN.
1607 2007-08-04 Paul Thomas <pault@gcc.gnu.org>
1610 * symbol.c (get_unique_symtree): Moved from module.c.
1611 * module.c (get_unique_symtree): Moved to symbol.c.
1612 * decl.c (get_proc_name): Transfer the typespec from the local
1613 symbol to the module symbol, in the case that an entry is also
1614 a module procedure. Ensure the local symbol is cleaned up by
1615 pointing to it with a unique symtree.
1617 * dump_parse_tree (gfc_show_code_node): Add EXEC_ASSIGN_CALL.
1619 2008-08-04 Steven G. Kargl <kargl@gcc.gnu.org>
1622 * iresolve.c (gfc_resolve_rrspacing): Convert argument(s) to
1624 (gfc_resolve_scale): Ditto.
1625 (gfc_resolve_set_exponent): Ditto.
1626 (gfc_resolve_spacing): Ditto.
1629 * trans-intrinsic.c (gfc_conv_intrinsic_si_kind,
1630 gfc_conv_intrinsic_sr_kind): Convert the argument(s) to the
1631 expected KIND, and fold the result to the expected KIND.
1633 2007-08-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1636 * f95-lang.c (gfc_init_builtin_functions): Defin builtins for
1637 lround{f,,l} and llround{f,,l}.
1638 * trans-intrinsic.c (build_fix_expr): Generate calls to the
1639 {l,}round{f,,l} functions.
1641 2007-08-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1644 * intrinsic.c (resolve_mask_arg): New function.
1645 (gfc_resolve_maxloc): Use resolve_mask_arg for mask resolution.
1646 (gfc_resolve_maxval): Likewise.
1647 (gfc_resolve_minloc): Likewise.
1648 (gfc_resolve_minval): Likewise.
1649 (gfc_resolve_pack): Likewise.
1650 (gfc_resolve_product): Likewise.
1651 (gfc_resolve_sum): Likewise.
1652 (gfc_resolve_unpack): Likewise.
1654 2007-08-01 Tobias Burnus <burnus@net-b.de>
1657 * match.c (gfc_match_allocate): Better check that STAT is
1660 * check.c (gfc_check_allocated): Reorder checks to improve
1663 2007-08-01 Nick Clifton <nickc@redhat.com>
1665 * arith.c: Change copyright header to refer to version 3 of the
1666 GNU General Public License and to point readers at the COPYING3
1667 file and the FSF's license web page.
1668 * openmp.c, interface.c, intrinsic.c, trans-array.c, trans-expr.c,
1669 symbol.c, iso-fortran-env.def, intrinsic.h, decl.c, trans-array.h,
1670 matchexp.c, dump-parse-tree.c, trans-common.c, array.c,
1671 Make-lang.in, trans-openmp.c, gfortran.h, error.c,
1672 iso-c-binding.def, lang.opt, data.c, trans-const.c, trans-stmt.c,
1673 expr.c, trans-const.h, trans-stmt.h, module.c, trans.c, scanner.c,
1674 trans-types.c, trans.h, gfortranspec.c, trans-types.h,
1675 lang-specs.h, io.c, bbt.c, resolve.c, f95-lang.c, st.c,
1676 iresolve.c, match.c, trans-decl.c, trans-io.c, target-memory.c,
1677 match.h, target-memory.h, parse.c, arith.h, check.c, dependency.c,
1678 parse.h, types.def, convert.c, dependency.h, primary.c,
1679 trans-intrinsic.c, options.c, misc.c, simplify.c: Likewise.
1681 2007-08-01 Daniel Franke <franke.daniel@gmail.com>
1683 * trans-decl.c (generate_local_decl): Emit warning on unused parameter
1684 on "-Wall -Wextra" or "-Wunused-parameter" but not on "-Wall", changed
1685 messages that start with lower case to upper case.
1686 * invoke.texi (-Wparameter-unused): Document differences between gcc
1687 and gfortran regarding this option.
1689 2007-08-01 Daniel Franke <franke.daniel@gmail.com>
1692 * expr.c (check_specification_function): Skip check if no symtree
1695 2007-08-01 Paul Thomas <pault@gcc.gnu.org>
1698 * resolve.c (resolve_entries): Entries declared to be module
1699 procedures must point to the function namespace.
1701 2007-07-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1704 * trans-stmt.c (gfc_trans_return): Convert to correct type.
1706 2007-07-31 Steven G. Kargl <kargl@gcc.gnu.org>
1709 * trans-intrinsic.c (gfc_conv_intrinsic_exponent): Convert to correct
1712 2007-07-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1714 * invoke.texi: Document -fsign-zero flag.
1716 2007-07-29 Paul Thomas <pault@gcc.gnu.org>
1719 * trans-expr.c (gfc_conv_expr_reference): Add block for case of
1720 scalar pointer functions so that NULL result is correctly
1724 * trans-array.c (gfc_trans_array_constructor): On detecting a
1725 multi-dimensional parameter array, set the loop limits.
1727 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
1730 * resolve.c (resolve_fl_parameter): Check for constant shape arrays,
1731 adjusted error message.
1733 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
1735 * invoke.texi: Removed -w from option summary.
1737 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
1740 * intrinsic.texi (IRAND, RAND, RANDOM_NUMBER): Document algorithm
1741 used for random number generator.
1743 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
1745 * gfortran.h, interface.c, resolve.c, symbol.c: Fix comment
1747 * intrinsic.texi, invoke.texi: Fix typos.
1749 2007-07-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1752 * resolve.c (generic_sym): Check for a same symbol and if so, return to
1753 avoid infinite recursion.
1755 2007-07-28 Daniel Franke <franke.daniel@gmail.com>
1760 * gfortran.h (symbol_attribute): Added bits for pointer_comp,
1762 * parse.c (parse_derived): Set pointer_comp/private_comp bits if
1763 the derived type ultimately contains pointer components or private
1765 * module.c (ab_attribute): New values AB_POINTER_COMP, AB_PRIVATE_COMP.
1766 (attr_bits): Added names for new ab_attributes.
1767 (mio_symbol_attribute): Save/restore new attribute bits in modules.
1768 * match.c (gfc_match_namelist): Removed check for namelist objects
1770 * resolve.c (resolve_fl_namelist): Added check for pointer or
1771 private components in nested types. Added check for namelist objects
1774 2007-07-28 Paul Thomas <pault@gcc.gnu.org>
1777 * trans-expr.c (gfc_trans_scalar_assign): Revert to fixed order
1778 for lse and rse pre expressions, for derived types with
1779 allocatable components. Instead, assign the lhs to a temporary
1780 and deallocate after the assignment.
1782 2007-07-28 Janne Blomqvist <jb@gcc.gnu.org>
1785 * trans-stmt.c (gfc_trans_character_select): Replace occurrences
1786 of gfc_c_int_type_node with integer_type_node.
1787 * trans-decl.c (gfc_build_intrinsic_function_decls): Likewise.
1788 (gfc_build_builtin_function_decls): Likewise.
1789 (gfc_generate_function_code): Likewise.
1790 * trans-io.c (gfc_build_io_library_fndecls): Likewise.
1792 2007-07-27 Janne Blomqvist <jb@gcc.gnu.org>
1794 * trans-decl.c (gfc_build_builtin_function_decls): Use existing
1795 gfc_array_index_type rather than creating another typenode for
1796 gfc_index_integer_kind.
1798 2007-07-27 Janne Blomqvist <jb@gcc.gnu.org>
1800 * trans-io.c (gfc_build_io_library_fndecls): Change to use
1801 gfc_array_index_type for array descriptor triplets instead of
1804 2007-07-26 Steven G. Kargl <kargl@gcc.gnu.org>
1807 * resolve.c (resolve_operator): Add INTRINSIC_EQ_OS comparison.
1809 2007-07-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1810 Daniel Franke <franke.daniel@gmail.com>
1813 * primary.c (match_variable): Do not call gfc_add_flavor if symbol has
1814 attribute of ACCESS_PUBLIC or ACCESS_PRIVATE already marked.
1816 2007-07-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1819 * trans-stmt.c (gfc_trans_character_select): Replace the
1820 mechanism with labels by a SWITCH_EXPR.
1821 * trans-decl.c (gfc_build_builtin_function_decls): Change
1822 return type for select_string.
1824 2007-07-27 Paul Thomas <pault@gcc.gnu.org>
1827 * trans-decl.c (gfc_trans_deferred_vars): Set intent(out)
1828 derived types as referenced, if they have the the default
1831 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1833 * gfortran.h (generate_isocbinding_symbol): Constify.
1834 * symbol.c (gen_special_c_interop_ptr, gen_cptr_param,
1835 generate_isocbinding_symbol): Likewise.
1837 2007-07-24 Paul Thomas <pault@gcc.gnu.org>
1841 * trans-expr.c (gfc_conv_function_call): Remove the default
1842 initialization of intent(out) derived types.
1843 * symbol.c (gfc_lval_expr_from_sym): New function.
1844 * matchexp.c (gfc_get_parentheses): Return argument, if it is
1845 character and posseses a ref.
1846 * gfortran.h : Add prototype for gfc_lval_expr_from_sym.
1847 * resolve.c (has_default_initializer): Move higher up in file.
1848 (resolve_code): On detecting an interface assignment, check
1849 if the rhs and the lhs are the same symbol. If this is so,
1850 enclose the rhs in parenetheses to generate a temporary and
1851 prevent any possible aliasing.
1852 (apply_default_init): Remove code making the lval and call
1853 gfc_lval_expr_from_sym instead.
1854 (resolve_operator): Give a parentheses expression a type-
1855 spec if it has no type.
1856 * trans-decl.c (gfc_trans_deferred_vars): Apply the a default
1857 initializer, if any, to an intent(out) derived type, using
1858 gfc_lval_expr_from_sym and gfc_trans_assignment. Check if
1859 the dummy is present.
1861 2007-07-24 Daniel Franke <franke.daniel@gmail.com>
1864 * expr.c (check_init_expr): Simplify matched functions.
1866 2007-07-24 Daniel Franke <franke.daniel@gmail.com>
1869 * intrinsic.c (add_sym): Do not exclude any symbols, even if not part
1870 of the selected standard.
1871 (make generic): Likewise.
1872 (make alias): Likewise, set standard the alias belongs to.
1873 (add_subroutines): Call make_noreturn unconditionally.
1874 (check_intrinsic_standard): Change return value to try.
1875 (gfc_intrinsic_func_interface): Check return value of above function.
1876 (gfc_intrinsic_sub_interface): Likewise.
1878 2007-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1881 * trans-decl.c (generate_function_code): Add argument
1882 for flag_bounds_check to the array for set_options.
1883 * invoke.texi (-fbounds-check): Document new libarary run-time
1886 2007-07-23 Daniel Franke <franke.daniel@gmail.com>
1890 * expr.c (check_transformational): Reject valid transformational
1891 intrinsics to avoid ICE.
1892 (check_inquiry): Report error for assumed character lengths for
1893 all supported standards.
1894 (check_init_expr): Whitespace fix.
1896 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
1900 * decl.c (verify_bind_c_sym): Use the result symbol for functions
1901 with a result clause. Warn if implicitly typed. Verify the type
1902 and rank of the SHAPE argument, if given.
1903 * resolve.c (gfc_iso_c_sub_interface): Use gfc_procedure_use to
1904 check the actual args against the formal, sorting them if
1906 * symbol.c (gen_shape_param): Initialize type of SHAPE param to
1909 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
1912 * trans-decl.c (generate_local_decl): Convert the TREE_TYPE for by
1913 value character dummy args of BIND(C) procedures.
1914 * trans-expr.c (gfc_conv_variable): Do not build address
1915 expression for BT_CHARACTER dummy args.
1917 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
1918 Tobias Burnus <burnus@net-b.de>
1921 * trans-expr.c (gfc_conv_function_call): Handle c_funloc.
1922 * trans-types.c: Add pfunc_type_node.
1923 (gfc_init_types,gfc_typenode_for_spec): Use it.
1924 * resolve.c (gfc_iso_c_func_interface): Fix whitespace and
1925 improve error message.
1927 2007-07-22 Daniel Franke <franke.daniel@gmail.com>
1930 * parse.c (gfc_fixup_sibling_symbols): No replacement of symbols if
1931 the current is a namelist.
1933 2007-07-22 Daniel Franke <franke.daniel@gmail.com>
1939 * gfortran.h (gfc_intrinsic_sym): Changed members elemental, pure,
1940 generic, specific, actual_ok, noreturn into bits of a bitfield,
1941 added bits for inquiry, transformational, conversion.
1942 * check.c (non_init_transformational): Removed, removed all callers.
1943 * intrinsic.c (enum class): New.
1944 (add_sym*): Replaced argument elemetal by enum class. Changed all
1946 (add_functions): Assign appropriate classes to intrinsic functions.
1947 (add_subroutines): Assign appropriate classes to intrinsic subroutines.
1948 (add_conv): Set conversion attribute.
1949 (gfc_init_expr_extensions): Removed, removed all callers.
1950 (gfc_intrinsic_func_interface): Reimplemented check for non-standard
1951 initializatione expressions.
1952 * expr.c (check_specification_function): New.
1953 (gfc_is_constant_expr): Added check for specification functions.
1954 (check_init_expr_arguments): New.
1955 (check_inquiry): Changed return value to MATCH, added checks for
1956 inquiry functions defined by F2003.
1957 (check_transformational): New.
1959 (check_elemental): New.
1960 (check_conversion): New.
1961 (check_init_expr): Call new check functions, add more specific error
1964 2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
1967 * resolve.c (set_name_and_label): Set kind number for character
1968 version of c_f_pointer.
1969 (gfc_iso_c_sub_interface): Set the kind of the SHAPE formal arg to
1970 that of the actual SHAPE arg.
1971 * symbol.c (gen_shape_param): Initialize kind for SHAPE arg.
1973 2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
1976 * symbol.c (generate_isocbinding_symbol): Remove unnecessary
1980 * resolve.c (gfc_iso_c_func_interface): Reject assumed-shape and
1981 deferred-shape arrays as args to C_LOC. Fix bug in testing
1982 character args to C_LOC.
1984 2007-07-21 Lee Millward <lee.millward@gmail.com>
1987 * trans-intrinsic.c (gfc_conv_intrinsic_int): Evaluate all
1988 arguments passed, not just the first one. Adjust code to
1989 refer to "args[0]" instead of "arg" as a result.
1991 2007-07-19 Christopher D. Rickett <crickett@lanl.gov>
1994 * trans-expr.c (gfc_conv_function_call): Inline C_LOC.
1996 2007-07-18 Christopher D. Rickett <crickett@lanl.gov>
1999 * symbol.c (generate_isocbinding_symbol): Fix bug where
2000 ISOCBINDING_FUNPTR was generated for C_LOC instead of the needed
2003 2007-07-17 Janus Weil <jaydub66@gmail.com>
2006 * resolve.c (resolve_fl_namelist): Check for namelist private
2007 components in contained subprograms.
2009 2007-07-17 Paul Thomas <pault@gcc.gnu.org>
2013 * trans-expr.c (gfc_trans_subcomponent_assign): Ensure that
2014 renormalization unity base is done independently of existing
2016 (gfc_trans_scalar_assign): If rhs is not a variable, put
2017 lse->pre after rse->pre to ensure that de-allocation of lhs
2018 occurs after evaluation of rhs.
2020 2007-07-16 Lee Millward <lee.millward@gmail.com>
2025 * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
2026 to operate on a stack allocated array for the intrinsic arguments
2027 instead of creating a TREE_LIST. Add two new parameters for the
2028 array and the number of elements. Update all callers to allocate
2029 an array of the correct length to pass in. Update comment.
2030 (gfc_intrinsic_argument_list_length): New function.
2031 (gfc_conv_intrinsic_conversion): Call it.
2032 (gfc_conv_intrinsic_mnimax): Likewise.
2033 (gfc_conv_intrinsic_merge): Likewise.
2034 (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
2036 (gfc_conv_intrinsic_cmplx): Likewise.
2037 (gfc_conv_intrinsic_ctime): Likewise.
2038 (gfc_covn_intrinsic_fdate): Likewise.
2039 (gfc_conv_intrinsic_ttynam): Likewise.
2040 (gfc_conv_intrinsic_ishftc): Likewise.
2041 (gfc_conv_intrinsic_index): Likewise.
2042 (gfc_conv_intrinsic_scan): Likewise.
2043 (gfc_conv_intrinsic_verify): Likewise.
2044 (gfc_conv_intrinsic_trim): Likewise.
2045 (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
2046 (gfc_conv_intrinsic_exponent): Likewise.
2047 (gfc_conv_intrinsic_bound): Likewise.
2048 (gfc_conv_intrinsic_abs): Likewise.
2049 (gfc_conv_intrinsic_mod): Likewise.
2050 (gfc_conv_intrinsic_sign): Likewise.
2051 (gfc_conv_intrinsic_len): Likewise.
2052 (gfc_conv_intrinsic_adjust): Likewise.
2053 (gfc_conv_intrinsic_si_kind): Likewise.
2055 2007-07-16 Janne Blomqvist <jb@gcc.gnu.org>
2058 * trans-decl.c (gfc_build_builtin_function_decls): Remove
2059 DECL_IS_MALLOC attribute from internal_realloc, thus reverting
2060 part of my 2007-07-03 patch.
2062 2007-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2063 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2066 * gfortran.h (gfc_option_t): Add flag_sign_zero field.
2067 * lang.opt (-fsign-zero): New option.
2068 * trans.h: Rename gfor_fndecl_set_std into gfor_fndecl_set_options.
2069 * trans-decl.c (gfc_build_builtin_function_decls): Build the function
2070 declaration to pass an array containing the options to be used by the
2071 runtime library. (gfc_generate_function_code): Build an array that
2072 contains option values to be passed to the runtime library and the call
2074 * options.c (gfc_init_options): Initialize the flag_sign_zero field.
2075 (gfc_handle_option): Handle the -fsign-zero option.
2077 2007-07-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2080 * trans-array.c (gfc_conv_array_ref): Only evaluate index once.
2082 2007-07-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2085 * iresolve.c (gfc_resolve_mvbits): Convert FROMPOS, LEN and TOPOS
2088 2007-07-14 Thomas Koenig <tkoenig@gcc.gnu.org>
2091 * iresolve.c(gfc_resolve_pack): A scalar mask has
2092 to be kind=4, an array mask with kind<4 is converted
2093 to gfc_default_logical_kind automatically.
2094 (gfc_resolve_unpack): Convert mask to gfc_default_lotical_kind
2097 2007-07-14 Paul Thomas <pault@gcc.gnu.org>
2100 * parse.c (parse_spec): Emit error on unexpected statement
2103 2007-07-13 Daniel Franke <franke.daniel@gmail.com>
2105 * invoke.texi: Unified upper- and lower-case in menus.
2106 (-w, -W): Removed, documented by gcc.
2107 * intrinsic.texi: Unified Class-section entries, added
2108 subroutine/function warning where appropiate.
2110 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
2113 * decl.c (gfc_match_suffix): Removed surplus general error that hides
2114 a more specific message.
2115 * resolve.c (resolve_fl_variable): Reject illegal initializiers only
2116 if not already done.
2117 (resolve_fl_procedure): Added check for initializers of functions.
2119 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
2122 * invoke.texi (-static-libgfortran): Document new option.
2124 2007-07-12 Paul Thomas <pault@gcc.gnu.org>
2128 * module.c (write_generic): Restore patch of 2007-07-10 and use
2129 symbol name if there are no use names.
2131 2007-07-12 Christopher D. Rickett <crickett@lanl.gov>
2134 * decl.c (verify_c_interop_param): Require character string dummy
2135 args to BIND(C) procedures to have length 1.
2136 * resolve.c (resolve_fl_procedure): Modify parameter checking for
2140 * resolve.c (gfc_iso_c_func_interface): Verify that a valid
2141 expression is given as an argument to C_LOC and C_ASSOCIATED.
2142 * trans-io.c (transfer_expr): Add argument for code block. Add
2143 standards check to determine if an error message should be
2144 reported for printing C_PTR or C_FUNPTR.
2145 (transfer_array_component): Update arguments to transfer_expr.
2146 (gfc_trans_transfer): Ditto.
2148 * symbol.c (gen_cptr_param): Fix whitespace.
2150 2007-07-12 Jakub Jelinek <jakub@redhat.com>
2153 * trans.h (GFC_POINTER_TYPE_P): Define.
2154 * trans-types.c (gfc_sym_type): Set it for types on attr->sym.pointer.
2155 * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
2156 if GFC_POINTER_TYPE_P is set on the type.
2158 2007-07-12 Richard Guenther <rguenther@suse.de>
2160 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Convert
2161 arguments to gfc_charlen_type_node.
2162 * trans-io.c (gfc_convert_array_to_string): Convert type
2163 size to gfc_array_index_type.
2165 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
2169 * module.c: Reverted Paul's patch from 2007-07-10.
2171 2007-07-11 Richard Guenther <rguenther@suse.de>
2173 * trans-array.c (gfc_conv_array_parameter): Use correct
2174 types for comparison.
2175 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
2176 correct types for POINTER_PLUS_EXPR.
2177 * trans-stmt.c (gfc_trans_forall_loop): Use correct type
2178 for integer one constant.
2180 2007-07-10 Paul Thomas <pault@gcc.gnu.org>
2183 * resolve.c (is_external_proc): New function. Adds test that
2184 the symbol is not an intrinsic procedure.
2185 * (resolve_function, resolve_call): Replace logical statements
2186 with call to is_external_proc.
2189 * simplify.c (gfc_simplify_transfer): If mold has rank, the
2193 * module.c (write_generic): Write the local name of the
2196 2007-07-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2199 * trans-array.c (gfc_trans_array_constructor): Mark offset field
2200 with TREE_NO_WARNING.
2201 * trans-decl.c (gfc_build_qualified_array): Mark lbound, ubound,
2202 stride and size variables with TREE_NO_WARNING.
2204 2007-07-09 Steven G. Kargl <kargl@gcc.gnu.org>
2206 * trans-decl.c (set_tree_decl_type_code): Remove function.
2207 (generate_local_decl): Remove reference to set_tree_decl_type_code.
2209 2007-07-09 Daniel Franke <franke.daniel@gmail.com>
2212 * trans-decl.c (generate_local_decl) Emit a warning if an unused
2215 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
2218 * module.c (gfc_match_use): Do not set an non-existant
2219 intrinsic operator if a user-defined operator is found.
2221 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
2225 * trans-decl.c (generate_local_decl): Adjusted warning on unused
2226 dummy arguments, tell middle-end not to emit additional warnings.
2228 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
2229 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2232 * gfortran.h (gfc_intrinsic_op): Added INTRINSIC_EQ_OS,
2233 INTRINSIC_NE_OS, INTRINSIC_GT_OS, INTRINSIC_GE_OS,
2234 INTRINSIC_LT_OS and INTRINSIC_LE_OS.
2235 * arith.c (eval_intrinsic, eval_type_intrinsic0): Likewise.
2236 * arith.h (gfc_eq, gfc_ne, gfc_gt, gfc_ge, gfc_lt, gfc_le):
2237 Added gfc_intrinsic_op as third argument type.
2238 * dump-parse-tree.c (gfc_show_expr): Account for new enum values.
2239 * expr.c (simplify_intrinsic_op, check_intrinsic_op): Likewise.
2240 * interface.c (check_operator_interface): Likewise.
2241 (gfc_check_interfaces): Added cross-checks for FORTRAN 77 and
2242 Fortran 90 style operators using new enum values.
2243 (gfc_extend_expr): Likewise.
2244 (gfc_add_interface): Likewise.
2245 * match.c (intrinsic_operators): Distinguish FORTRAN 77 style
2246 operators from Fortran 90 style operators using new enum values.
2247 * matchexp.c (match_level_4): Account for new enum values.
2248 * module.c (mio_expr): Likewise.
2249 * resolve.c (resolve_operator): Deal with new enum values, fix
2250 inconsistent error messages.
2251 * trans-expr.c (gfc_conv_expr_op): Account for new enum values.
2253 2007-07-08 Tobias Burnus <burnus@net-b.de>
2256 * interface.c (get_expr_storage_size): Properly obtain lower bound.
2257 (compare_actual_formal): Add space before parenthesis.
2259 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
2262 * resolve.c (resolve_fl_procedure): Added check for PRIVATE types
2263 in PUBLIC interfaces.
2265 2007-07-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2268 * decl.c (match_attr_spec): Don't return MATCH_ERROR if comma found and
2269 gfc_match_bind_c does not return MATCH_YES.
2271 2007-07-07 Kazu Hirata <kazu@codesourcery.com>
2273 * decl.c, gfortran.h, interface.c, module.c, resolve.c,
2274 trans-array.c, trans-decl.c: Fix comment typos. Follow
2275 spelling conventions.
2276 * intrinsic.texi: Fix typos. Follow spelling conventions.
2278 2007-05-06 Daniel Franke <franke.daniel@gmail.com>
2281 * symbol.c (save_status): New.
2282 * gfortran.h (save_status): Added external declaration.
2283 (check_conflict): Check for conflicting explicite SAVE statements
2285 (gen_special_c_interop_ptr): Use SAVE_EXPLICIT constant.
2286 * module.c (ab_attribute, attr_bits): Removed enumerator value
2287 AB_SAVE for save attribute.
2288 (mio_symbol_attribute): Import/export the full SAVE status,
2289 removed usage of AB_SAVE.
2290 * dump-parse-tree.c (gfc_show_attr): Dump full SAVE status.
2291 * decl.c (add_init_expr_to_sym): Set SAVE_IMPLICIT only if not
2294 2007-07-05 Daniel Franke <franke.daniel@gmail.com>
2295 Tobias Burnus <burnus@net-b.de>
2298 * gfortran.h (symbol_attribute): Change save attribute into an enum.
2299 * decl.c (add_init_expr_to_sym): Set it to SAVE_IMPLICIT.
2300 * symbol.c (gfc_add_save): Check for SAVE_EXPLICIT.
2301 * resolve.c (resolve_fl_variable): Check for SAVE_EXPLICIT.
2302 (resolve_symbol): Allow OMP threadprivate with
2303 initialization SAVEd and save_all variable.
2304 * trans-decl.c (gfc_finish_var_decl): Remove obsolete sym->value check.
2306 2007-07-05 Paul Thomas <pault@gcc.gnu.org>
2309 * match.c (gfc_match_call): Check, in all cases, that a symbol
2310 is neither generic nor a subroutine before trying to add it as
2314 * match.c (gfc_match_do): Reset the implied_index attribute.
2316 2007-07-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2319 * trans-intrinsic.c (trans-intrinsic.c): Handle optional
2320 arguments correctly for MIN and MAX intrinsics.
2322 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2325 * io.c (check_format): Always call gfc_error for errors.
2326 (check_format_string): Change type of this function to try and
2327 return the result of check_format.
2328 (check_io_constraints): Return MATCH_ERROR if check_format_string
2331 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2334 * decl.c (get_proc_name): Include attr->mod_proc in check for error.
2336 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2339 * gfortran.h: Change type of gfc_assign_data_value from void to try.
2340 * data.c (gfc_assign_data_value): Return FAILURE if error found.
2341 * resolve.c (check_data_variable): If gfc_assign_data_value returns
2342 failure, break out of loop and return failure.
2344 2007-07-03 Christopher D. Rickett <crickett@lanl.gov>
2347 * symbol.c (gen_cptr_param): Generate C_PTR and C_FUNPTR if necessary.
2348 (build_formal_args): Pass intrinsic module symbol id to
2351 2007-07-03 Tobias Burnus <burnus@net-b.de>
2354 * resolve.c (resolve_common_blocks): New check function.
2355 (resolve_types): Use it.
2357 2007-07-03 Tobias Burnus <burnus@net-b.de>
2360 * interface.c (get_sym_storage_size): New function.
2361 (get_sym_storage_size): New function.
2362 (compare_actual_formal): Enhance sequence association
2363 support and improve checking.
2365 2007-07-03 Janne Blomqvist <jb@gcc.gnu.org>
2367 * trans-decl.c (gfc_build_builtin_function_decls): Mark
2368 internal_realloc as a malloc function.
2370 2007-07-03 Tobias Burnus <burnus@net-b.de>
2373 * resolve.c (resolve_operator): Check for NULL as operand.
2375 2007-07-02 Tobias Burnus <burnus@net-b.de>
2377 * gfortran.texi (Fortran 2003): Add ISO Bind C.
2378 * intrinsic.texi (C_ASSOCIATED,C_F_POINTER,C_F_PROCPOINTER,
2379 C_FUNLOC,C_LOC): Document new ISO Bind C intrinsics.
2381 2007-07-01 Christopher D. Rickett <crickett@lanl.gov>
2383 * interface.c (gfc_compare_derived_types): Special case for comparing
2384 derived types across namespaces.
2385 (gfc_compare_types): Deal with BT_VOID.
2386 (compare_parameter): Use BT_VOID to accept ISO C Binding pointers.
2387 * trans-expr.c (gfc_conv_function_call): Remove setting parm_kind
2389 (gfc_conv_initializer): Deal with ISO C Binding NULL_PTR and
2391 (gfc_conv_expr): Convert expressions for ISO C Binding derived types.
2392 * symbol.c (gfc_set_default_type): BIND(C) variables should not be
2393 Implicitly declared.
2394 (check_conflict): Add BIND(C) and check for conflicts.
2395 (gfc_add_explicit_interface): Whitespace.
2396 (gfc_add_is_bind_c): New function.
2397 (gfc_copy_attr): Use it.
2398 (gfc_new_symbol): Initialize ISO C Binding objects.
2399 (get_iso_c_binding_dt): New function.
2400 (verify_bind_c_derived_type): Ditto.
2401 (gen_special_c_interop_ptr): Ditto.
2402 (add_formal_arg): Ditto.
2403 (gen_cptr_param): Ditto.
2404 (gen_fptr_param): Ditto.
2405 (gen_shape_param): Ditto.
2406 (add_proc_interface): Ditto.
2407 (build_formal_args): Ditto.
2408 (generate_isocbinding_symbol): Ditto.
2409 (get_iso_c_sym): Ditto.
2410 * decl.c (num_idents_on_line, has_name_equals): New variables.
2411 (verify_c_interop_param): New function.
2412 (build_sym): Finish binding labels and deal with COMMON blocks.
2413 (add_init_expr_to_sym): Check if the initialized expression is
2414 an iso_c_binding named constants
2415 (variable_decl): Set ISO C Binding type_spec components.
2416 (gfc_match_kind_spec): Check match for C interoperable kind.
2417 (match_char_spec): Fix comment. Chnage gfc_match_small_int
2418 to gfc_match_small_int_expr. Check for C interoperable kind.
2419 (match_type_spec): Clear the current binding label.
2420 (match_attr_spec): Add DECL_IS_BIND_C. If BIND(C) is found, use it
2422 (set_binding_label): New function.
2423 (set_com_block_bind_c): Ditto.
2424 (verify_c_interop): Ditto.
2425 (verify_com_block_vars_c_interop): Ditto.
2426 (verify_bind_c_sym): Ditto.
2427 (set_verify_bind_c_sym): Ditto.
2428 (set_verify_bind_c_com_block): Ditto.
2429 (get_bind_c_idents): Ditto.
2430 (gfc_match_bind_c_stmt): Ditto.
2431 (gfc_match_data_decl): Use num_idents_on_line.
2432 (match_result): Deal with right paren in BIND(C).
2433 (gfc_match_suffix): New function.
2434 (gfc_match_function_decl): Use it. Code is re-arranged to deal with
2435 ISO C Binding result clauses.
2436 (gfc_match_subroutine): Deal with BIND(C).
2437 (gfc_match_bind_c): New function.
2438 (gfc_get_type_attr_spec): New function. Code is re-arranged in and
2439 taken from gfc_match_derived_decl.
2440 (gfc_match_derived_decl): Add check for BIND(C).
2441 * trans-common.c: Forward declare gfc_get_common.
2442 (gfc_sym_mangled_common_id): Change arg from 'const char *name' to
2443 'gfc_common_head *com'. Check for ISO C Binding of the common block.
2444 (build_common_decl): 'com->name' to 'com in SET_DECL_ASSEMBLER_NAME.
2445 * gfortran.h: Add GFC_MAX_BINDING_LABEL_LEN
2447 (sym_flavor): Add FL_VOID.
2448 (iso_fortran_env_symbol, iso_c_binding_symbol, intmod_id): New enum
2449 (CInteropKind_t): New struct.
2450 (c_interop_kinds_table): Use it. Declare an array of structs.
2451 (symbol_attribute): Add is_bind_c, is_c_interop, and is_iso_c
2453 (gfc_typespec): Add is_c_interop; is_iso_c, and f90_type members.
2454 (gfc_symbol): Add from_intmod, intmod_sym_id, binding_label, and
2455 common_block members.
2456 (gfc_common_head): Add binding_label and is_bind_c members.
2457 (gfc_gsymbol): Add sym_name, mod_name, and binding_label members.
2458 Add prototypes for get_c_kind, gfc_validate_c_kind,
2459 gfc_check_any_c_kind, gfc_add_is_bind_c, gfc_add_value,
2460 verify_c_interop, verify_c_interop_param, verify_bind_c_sym,
2461 verify_bind_c_derived_type, verify_com_block_vars_c_interop,
2462 generate_isocbinding_symbol, get_iso_c_sym, gfc_iso_c_sub_interface
2463 * iso-c-binding.def: New file. This file contains the definitions
2464 of the types provided by the Fortran 2003 ISO_C_BINDING intrinsic
2466 * trans-const.c (gfc_conv_constant_to_tree): Deal with C_NULL_PTR
2467 or C_NULL_FUNPTR expressions.
2468 * expr.c (gfc_copy_expr): Add BT_VOID case. For BT_CHARACTER, the
2469 ISO C Binding requires a minimum string length of 1 for '\0'.
2470 * module.c (intmod_sym): New struct.
2471 (pointer_info): Add binding_label member.
2472 (write_atom): Set len to 0 for NULL pointers. Check for NULL p and *p.
2473 (ab_attribute): Add AB_IS_BIND_C, AB_IS_C_INTEROP and AB_IS_ISO_C.
2474 (attr_bits): Add "IS_BIND_C", "IS_C_INTEROP", and "IS_ISO_C".
2475 (mio_symbol_attribute): Deal with ISO C Binding attributes.
2476 (bt_types): Add "VOID".
2477 (mio_typespec): Deal with ISO C Binding components.
2478 (mio_namespace_ref): Add intmod variable.
2479 (mio_symbol): Check for symbols from an intrinsic module.
2480 (load_commons): Check for BIND(C) common block.
2481 (read_module): Read binding_label and use it.
2482 (write_common): Add label. Write BIND(C) info.
2483 (write_blank_common): Blank commons are not BIND(C). Explicitly
2485 (write_symbol): Deal with binding_label.
2486 (sort_iso_c_rename_list): New function.
2487 (import_iso_c_binding_module): Ditto.
2488 (create_int_parameter): Add to args.
2489 (use_iso_fortran_env_module): Adjust to deal with iso_c_binding
2491 * trans-types.c (c_interop_kinds_table): new array of structs.
2492 (gfc_validate_c_kind): New function.
2493 (gfc_check_any_c_kind): Ditto.
2494 (get_real_kind_from_node): Ditto.
2495 (get_int_kind_from_node): Ditto.
2496 (get_int_kind_from_width): Ditto.
2497 (get_int_kind_from_minimal_width): Ditto.
2498 (init_c_interop_kinds): Ditto.
2499 (gfc_init_kinds): call init_c_interop_kinds.
2500 (gfc_typenode_for_spec): Adjust for BT_VOID and ISO C Binding pointers.
2501 Adjust handling of BT_DERIVED.
2502 (gfc_sym_type): Whitespace.
2503 (gfc_get_derived_type): Account for iso_c_binding derived types
2504 * resolve.c (is_scalar_expr_ptr): New function.
2505 (gfc_iso_c_func_interface): Ditto.
2506 (resolve_function): Use gfc_iso_c_func_interface.
2507 (set_name_and_label): New function.
2508 (gfc_iso_c_sub_interface): Ditto.
2509 (resolve_specific_s0): Use gfc_iso_c_sub_interface.
2510 (resolve_bind_c_comms): New function.
2511 (resolve_bind_c_derived_types): Ditto.
2512 (gfc_verify_binding_labels): Ditto.
2513 (resolve_fl_procedure): Check for ISO C interoperability.
2514 (resolve_symbol): Check C interoperability.
2515 (resolve_types): Walk the namespace. Check COMMON blocks.
2516 * trans-decl.c (gfc_sym_mangled_identifier): Prevent the mangling
2517 of identifiers that have an assigned binding label.
2518 (gfc_sym_mangled_function_id): Use the binding label rather than
2520 (gfc_finish_var_decl): Put variables that are BIND(C) into a common
2521 segment of the object file, because this is what C would do.
2522 (gfc_create_module_variable): Conver to proper types
2523 (set_tree_decl_type_code): New function.
2524 (generate_local_decl): Check dummy variables and derived types for
2525 ISO C Binding attributes.
2526 * match.c (gfc_match_small_int_expr): New function.
2527 (gfc_match_name_C): Ditto.
2528 (match_common_name): Deal with ISO C Binding in COMMON blocks
2529 * trans-io.c (transfer_expr): Deal with C_NULL_PTR or C_NULL_FUNPTR
2531 * match.h: Add prototypes for gfc_match_small_int_expr,
2532 gfc_match_name_C, match_common_name, set_com_block_bind_c,
2533 set_binding_label, set_verify_bind_c_sym,
2534 set_verify_bind_c_com_block, get_bind_c_idents,
2535 gfc_match_bind_c_stmt, gfc_match_suffix, gfc_match_bind_c,
2536 gfc_get_type_attr_spec
2537 * parse.c (decode_statement): Use gfc_match_bind_c_stmt
2538 (parse_derived): Init *derived_sym = NULL, and gfc_current_block
2539 later for valiadation.
2540 * primary.c (got_delim): Set ISO C Binding components of ts.
2541 (match_logical_constant): Ditto.
2542 (match_complex_constant): Ditto.
2543 (match_complex_constant): Ditto.
2544 (gfc_match_rvalue): Check for existence of at least one arg for
2545 C_LOC, C_FUNLOC, and C_ASSOCIATED.
2546 * misc.c (gfc_clear_ts): Clear ISO C Bindoing components in ts.
2547 (get_c_kind): New function.
2549 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
2552 * trans-expr.c (gfc_conv_power_op): Use builtin_powi for
2554 * f95-lang.c (gfc_init_builtin_functions): Add builtin_powi to the
2557 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
2559 * trans.h: Remove decls for 64-bit allocation functions.
2560 * trans-array.c (gfc_grow_array): Always pick the standard realloc
2562 (gfc_array_allocate): Likewise.
2563 * trans-decl.c: Remove trees for 64-bit allocation functions.
2564 (gfc_build_builtin_function_decls): Don't build fndecls for 64-bit
2565 allocations functions, use index_int_type for normal allocation
2568 2007-06-30 Daniel Franke <franke.daniel@gmail.com>
2571 * intrinsic.c (add_functions): Additional function types.
2572 (gfc_convert_type_warn): Remove intrinsic-flag from
2573 conversion functions.
2574 * resolve.c (resolve_symbol): Added type checks to
2575 explicitly defined intrinsics.
2577 2007-06-30 Tobias Burnus <burnus@net-b.de>
2580 * io.c (check_format): Allow zero to precede the
2583 2007-06-30 Paul Thomas <pault@gcc.gnu.org>
2586 * simplify.c (gfc_simplify_repeat): Add handling of character
2587 literal for first argument.
2589 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
2591 * resolve.c (resolve_operator): Added check whether a user
2592 defined operator is available.
2594 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
2596 * openmp.c (resolve_omp_clauses): Adjust error message to
2597 better reflect the actual requirement.
2599 2007-06-29 Tobias Burnus <burnus@net-b.de>
2602 * io.c (format_lex): Fix FMT_ZERO.
2603 (check_format,check_format_string,gfc_match_format,
2604 check_io_constraints) Additional checking for READ.
2606 2007-06-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2609 * lang.opt (static-libgfortran): New option.
2610 * gfortranspec.c (ADD_ARG_LIBGFORTRAN): New macro.
2611 (Option): Add OPTION_static and OPTION_static_libgfortran.
2612 (lookup_option): Handle the new -static-libgfortran option.
2613 (lang_specific_driver): Check whether -static is passed.
2614 Handle the new -static-libgfortran option.
2615 * options.c (gfc_handle_option): If -static-libgfortran is
2616 passed and isn't supported on this configuration, error out.
2618 2007-06-27 Daniel Franke <franke.daniel@gmail.com>
2621 * openmp.c (resolve_omp_clauses): Emit error on allocatable
2622 components in COPYIN, COPYPRIVATE, FIRSTPRIVATE and LASTPRIVATE
2625 2007-06-25 Paul Thomas <pault@gcc.gnu.org>
2628 * resolve.c (check_host_association): Return if the old symbol
2629 is use associated. Introduce retval to reduce the number of
2630 evaluations of the first-order return value.
2633 * match.c (gfc_match_call): If a host associated symbol is not
2634 a subroutine, build a new symtree/symbol in the current name
2637 2007-06-24 Tobias Burnus <burnus@net-de>
2640 * interface.c (gfc_compare_derived_types): Add access check.
2641 * symbol.c (gfc_find_component): Ditto.
2642 (gfc_set_component_attr,gfc_get_component_attr) Copy access state.
2643 * dump-parse-tree.c (gfc_show_components): Dump access state.
2644 * gfortran.h (struct gfc_component): Add gfc_access.
2645 * module.c (mio_component): Add access state.
2646 * (gfc_match_structure_constructor): Check for private access state.
2648 2007-06-24 Paul Thomas <pault@gcc.gnu.org>
2652 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Calculate
2653 the offset between the loop counter and the position as
2654 defined. Add the offset within the loop so that the mask acts
2655 correctly. Do not advance the location on the basis that it
2658 2007-06-22 Daniel Franke <franke.daniel@gmail.com>
2661 * symbol.c (gfc_copy_attr): Emit errors for duplicate
2662 EXTERNAL/INTRINSIC statements.
2664 2007-06-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2667 * expr.c (gfc_check_assign): If the rvalue expression type is NULL_EXPR,
2668 check to see if the lvalue has attribute pointer and data.
2670 2007-06-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2673 * resolve.c (gfc_resolve_iterator_expr): Add check for REAL using
2674 gfc_notify_standard. (gfc_resolve_iterator): Remove check.
2675 (resolve_branch): Change "Obsolete" to "Deleted feature".
2676 * io.c (resolve_tag): Ditto.
2677 * match.c (gfc_match_pause, gfc_match_assign, gfc_match_goto): Ditto.
2679 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2682 * match.c (gfc_match_common): If the symbol value expression type is
2683 NULL_EXPR, don't error if previously initialized.
2685 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2688 * decl.c (get_proc_name) Check symbol for generic interface
2691 2007-06-20 Andrew Pinski <andrew_pinski@playstation.sony.com>
2692 Richard Guenther <rguenther@suse.de>
2695 * trans.c (gfc_build_addr_expr): Use the correct types.
2697 2007-06-19 Paul Thomas <pault@gcc.gnu.org>
2701 * resolve.c (resolve_code): Use gfc_impure_variable as a
2702 condition for rejecting derived types with pointers, in pure
2704 (gfc_impure_variable): Add test for dummy arguments of pure
2705 procedures; any for functions and INTENT_IN for subroutines.
2708 * data.c (gfc_assign_data_value): Change the ICE on an array
2709 reference initializer not being an array into an error and
2710 clear init to prevent a repetition of the error.
2712 2007-06-17 Janne Blomqvist <jb@gcc.gnu.org>
2714 * gfortran.texi: Add documentation for GFORTRAN_UNBUFFERED_n
2715 environment variables. Fix documentation for
2716 GFORTRAN_UNBUFFERED_ALL environment variable.
2718 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
2720 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
2721 POINTER_PLUS_EXPR instead of PLUS_EXPR for pointer addition.
2722 * trans-expr.c (gfc_trans_string_copy): Create
2723 POINTER_PLUS_EXPR instead of a PLUS_EXPR
2726 2007-06-14 Paul Thomas <pault@gcc.gnu.org>
2729 * trans-common.c (build_common_decl): If resizing of common
2730 decl is needed, update the TREE_TYPE.
2732 2007-06-13 Tobias Burnus <burnus@net-b.de>
2735 * interface.c (has_vector_section): New.
2736 (compare_actual_formal): Check for array sections with vector subscript.
2738 2007-06-12 Dirk Mueller <dmueller@suse.de>
2740 * trans-stmt.c (gfc_trans_call): fix gcc_assert to
2741 a comparison, not an assignment.
2743 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
2745 * trans-common.c (create_common): Initialize 'field_init'.
2747 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
2751 * trans-common.c (get_init_field): New function.
2752 (create_common): Call get_init_field for overlapping
2753 initializers in equivalence blocks.
2754 * resolve.c (resolve_equivalence_derived, resolve_equivalence):
2755 Remove constraints on initializers in equivalence blocks.
2756 * target-memory.c (expr_to_char, gfc_merge_initializers):
2758 (encode_derived): Add the bit offset to the byte offset to get
2759 the total offset to the field.
2760 * target-memory.h : Add prototype for gfc_merge_initializers.
2762 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
2764 * trans-types.c (gfc_signed_type): Remove.
2765 * trans-types.h (gfc_signed_type): Remove.
2766 * f95-lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
2768 2007-06-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2770 * trans-intrinsic.c: Revert Lee's 2007-06-04 patch.
2772 2007-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
2773 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2776 * match.c (gfc_match_special_char): New function. Match special char.
2778 * match.h: Add prototype.
2779 * io.c (next_char): Use it.
2780 * primary.c (next_string_char): Ditto.
2782 2007-06-06 Steven G. Kargl <kargl@gcc.gnu.org>
2784 * decl.c: Miscellaneous whitespace fixes.
2786 * gfortran.h: Likewise.
2787 * interface.c : Likewise.
2789 * match.c: Likewise.
2790 * match.h: Likewise.
2791 * module.c: Likewise.
2792 * parse.c: Likewise.
2793 * resolve.c: Likewise.
2794 * symbol.c: Likewise.
2795 * trans-array.c: Likewise.
2796 * trans-common.c: Likewise.
2797 * trans-decl.c: Likewise.
2798 * trans-intrinsic.c: Likewise.
2799 * trans-io.c: Likewise.
2800 * trans-stmt.c: Likewise.
2801 * trans-types.c: Likewise.
2803 2007-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2806 * parse.c (decode_statement): Don't call gfc_undo_symbols on MATCH_ERROR
2807 for ST_FUNCTION since it is called in reject_statement.
2808 (parse_contained): If error, loop back after reject_statement and try
2809 again. Free the namespace if an error occured.
2811 2007-06-04 Lee Millward <lee.millward@codesourcery.com>
2813 * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
2814 to operate on a stack allocated array for the intrinsic arguments
2815 instead of creating a TREE_LIST. Add two new parameters for the
2816 array and the number of elements. Update all callers to allocate
2817 an array of the correct length to pass in. Update comment.
2818 (gfc_intrinsic_argument_list_length): New function.
2819 (gfc_conv_intrinsic_mnimax): Call it.
2820 (gfc_conv_intrinsic_merge): Likewise.
2821 (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
2823 (gfc_conv_intrinsic_cmplx): Likewise.
2824 (gfc_conv_intrinsic_ctime): Likewise.
2825 (gfc_covn_intrinsic_fdate): Likewise.
2826 (gfc_conv_intrinsic_ttynam): Likewise.
2827 (gfc_conv_intrinsic_ishftc): Likewise.
2828 (gfc_conv_intrinsic_index): Likewise.
2829 (gfc_conv_intrinsic_scan): Likewise.
2830 (gfc_conv_intrinsic_verify): Likewise.
2831 (gfc_conv_intrinsic_trim): Likewise.
2832 (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
2833 (gfc_conv_intrinsic_exponent): Likewise.
2834 (gfc_conv_intrinsic_bound): Likewise.
2835 (gfc_conv_intrinsic_abs): Likewise.
2836 (gfc_conv_intrinsic_mod): Likewise.
2837 (gfc_conv_intrinsic_sign): Likewise.
2838 (gfc_conv_intrinsic_len): Likewise.
2839 (gfc_conv_intrinsic_adjust): Likewise.
2840 (gfc_conv_intrinsic_si_kind): Likewise.
2842 2007-06-04 Steve Ellcey <sje@cup.hp.com>
2844 * trans-array.c (gfc_conv_array_parameter): Initialize tmp.
2846 2007-05-31 Richard Guenther <rguenther@suse.de>
2848 * trans-expr.c (gfc_conv_expr_op): Use zero constant
2849 that matches the lse type.
2850 (gfc_trans_string_copy): Use sizetype zero constant.
2851 * intrinsic.c (add_functions): The sizeof intrinsic has
2853 * trans-types.c (gfc_get_dtype): Convert size to index
2854 type before shifting.
2855 * trans-array.c (gfc_trans_array_constructor_value): Use
2856 index type for offset computation.
2857 * trans-intrinsic.c (gfc_conv_associated): Use correct type
2860 2007-05-31 Paul Thomas <pault@gcc.gnu.org>
2863 * trans-array.c (gfc_trans_array_constructor): Treat the case
2864 where the ss expression charlen is missing.
2866 22007-05-31 Paul Thomas <pault@gcc.gnu.org>
2869 * module.c (mio_symtree_ref): If an equivalence group member
2870 is not used, give it a hidden symbol and set the pointer_info.
2871 (load_equiv): Only free the equivalence if none of the members
2874 2007-05-29 Daniel Franke <franke.daniel@gmail.com>
2876 * gfortran.h: Renamed 'enum gfc_generic_isym_id' to 'enum gfc_isym_id',
2877 added missing GFC_ISYM_* enumerators, ordered alphabetically.
2878 (struct gfc_intrinsic_sym): Renamed 'generic_id' to 'id'.
2879 (gfc_find_subroutine): New prototype.
2880 * intrinsic.c (add_sym, add_sym_*): Added argument 'id' and changed all callers.
2881 (find_subroutine): Renamed to 'gfc_find_subroutine', removed static.
2882 * dependency.c: Changed usage of isym->generic_id to isym->id.
2883 * openmp.c: Likewise.
2884 * resolve.c: Likewise.
2885 * trans-array.c: Likewise.
2886 * trans-expr.c: Likewise.
2887 * trans-intrinsic.c: Likewise.
2888 * trans-openmp.c: Likewise.
2890 2007-05-28 Tobias Schlüter <tobi@gcc.gnu.org>
2892 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIZEOF.
2893 * intrinsic.c (add_functions): Add stuff for SIZEOF intrinsic.
2894 * intrinsic.h (gfc_check_sizeof): Add prototype of ...
2895 * check.c (gfc_check_sizeof): .. new function.
2896 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): New function.
2897 (gfc_conv_intrinsic_strcmp): Whitespace fix.
2898 (gfc_conv_intrinsic_array_transfer): Remove double initialization,
2899 use fold_build. where appropriate.
2900 (gfc_conv_intrinsic_function): Add case for SIZEOF.
2901 * intrinsic.texi: Add documentation for SIZEOF.
2903 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
2905 * trans-array.c (gfc_conv_expr_descriptor): Edit comment.
2907 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
2910 * target-memory.c (gfc_target_expr_size): Add handling
2911 for size of BT_HOLLERITH variables.
2912 * check.c (gfc_check_transfer): Reject BT_HOLLERITH
2913 variables in MOLD argument of TRANSFER.
2915 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
2917 * gfortran.h (gfc_expr): Remove from_H, add "representation"
2919 * primary.c (match_hollerith_constant): Store the representation
2920 of the Hollerith in representation, not in value.character.
2921 * arith.c: Add dependency on target-memory.h.
2922 (eval_intrinsic): Remove check for from_H.
2923 (hollerith2representation): New function.
2924 (gfc_hollerith2int): Determine value of the new constant.
2925 (gfc_hollerith2real): Likewise.
2926 (gfc_hollerith2complex): Likewise.
2927 (gfc_hollerith2logical): Likewise.
2928 (gfc_hollerith2character): Point both representation.string and
2929 value.character.string at the value string.
2930 * data.c (create_character_initializer): For BT_HOLLERITH
2931 rvalues, get the value from the representation rather than
2933 * expr.c (free_expr0): Update handling of BT_HOLLERITH values
2934 and values with representation.string.
2935 (gfc_copy_expr): Likewise.
2936 * intrinsic.c (do_simplify): Remove special treatement of
2937 variables resulting from Hollerith constants.
2938 * dump-parse-trees.c (gfc_show_expr): Update handling of
2940 * trans-const.c (gfc_conv_constant_to_tree): Replace from_H
2941 check with check for representation.string; get Hollerith
2942 representation from representation.string, not value.character.
2943 * trans-expr.c (is_zero_initializer_p): Replace from_H check
2944 with check for representation.string.
2945 * trans-stmt.c (gfc_trans_integer_select): Use
2946 gfc_conv_mpz_to_tree for case values, so as to avoid picking up
2947 the memory representation if the case is given by a transfer
2949 * target-memory.c (gfc_target_encode_expr): Use the known memory
2950 representation rather than the value, if it exists.
2951 (gfc_target_interpret_expr): Store the memory representation of
2952 the interpreted expression as well as its value.
2953 (interpret_integer): Move to gfc_interpret_integer, make
2955 (interpret_float): Move to gfc_interpret_float, make non-static.
2956 (interpret_complex): Move to gfc_interpret_complex, make
2958 (interpret_logical): Move to gfc_interpret_logical, make
2960 (interpret_character): Move to gfc_interpret_character, make
2962 (interpret_derived): Move to gfc_interpret_derived, make
2964 * target-memory.h: Add prototypes for newly-exported
2965 gfc_interpret_* functions.
2967 2007-05-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2970 * parse.c (next_statement): Warn for truncated lines if source is free
2973 2007-05-27 Paul Thomas <pault@gcc.gnu.org>
2974 Tobias Burnus <burnus@net-b.de>
2977 * symbol.c (gfc_check_function_type): Copy dimensions of
2979 * resolve.c (resolve_contained_fntype): Improve symbol output in
2982 2007-05-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2985 * io.c (check_format): Add warning for H specifier in format.
2987 2007-05-26 Tobias Burnus <burnus@net-b.de>
2989 * gfortran.texi: Document the GFORTRAN_ERROR_DUMPCORE and
2990 GFORTRAN_ERROR_BACKTRACE environment variables.
2992 2007-05-26 Paul Thomas <pault@gcc.gnu.org>
2995 * trans.h : Add no_function_call bitfield to gfc_se structure.
2996 Add stmtblock_t argument to prototype of get_array_ctor_strlen.
2997 * trans-array.c (get_array_ctor_all_strlen): New function.
2998 (get_array_ctor_strlen): Add new stmtblock_t argument and call
2999 new function for character elements that are not constants,
3000 arrays or variables.
3001 (gfc_conv_array_parameter): Call get_array_ctor_strlen to get
3003 * trans-intrinsic (gfc_conv_intrinsic_len): Add new argument
3004 to call of get_array_ctor_strlen.
3006 2007-05-25 Kazu Hirata <kazu@codesourcery.com>
3008 * intrinsic.texi: Fix typos.
3010 2007-05-25 Paul Thomas <pault@gcc.gnu.org>
3013 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Change
3014 order in logic under EXPR_FUNCTION to handle functions with
3017 2007-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3020 * array.c (spec_dimen_size): Test for correct BT_INTEGER type.
3022 2007-05-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3025 * trans-expr.c (gfc_trans_zero_assign): Convert the result of
3026 TYPE_SIZE_UNIT into a signed type.
3027 (gfc_trans_array_copy): Likewise.
3028 (gfc_trans_array_constructor_copy): Likewise.
3029 * trans-array.c (gfc_trans_create_temp_array): Likewise.
3030 (gfc_grow_array): Likewise.
3031 (gfc_array_init_size): Likewise.
3032 (gfc_duplicate_allocatable): Likewise.
3033 * trans-stmt.c (allocate_temp_for_forall_nest_1): Likewise.
3035 2007-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3038 * resolve.c (resolve_function): Don't call resolve_global_procedure if
3039 there is no name. Delete duplicated statement in ELSE clause.
3041 2007-05-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3044 * trans-array.c (gfc_trans_array_bound_check): Take extra argument to
3045 indicate whether we should check the upper bound in that dimension.
3046 (gfc_conv_array_index_offset): Check only the lower bound of the
3047 last dimension for assumed-size arrays.
3048 (gfc_conv_array_ref): Likewise.
3049 (gfc_conv_ss_startstride): Likewise.
3051 2007-05-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3052 Daniel Franke <franke.daniel@gmail.com>
3055 * resolve.c (resolve_actual_arglist): Resolve actual argument after
3056 being identified as variable.
3058 2007-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3061 * trans-stmt.c (gfc_trans_do): Fix the value of loop variable
3064 2007-05-21 H.J. Lu <hongjiu.lu@intel.com>
3066 * trans-stmt.c (gfc_trans_do): Fix a typo in comment.
3068 2007-05-21 Paul Thomas <pault@gcc.gnu.org>
3072 * trans-array.c (gfc_conv_expr_descriptor): Obtain the stored
3073 offset for non-descriptor, source arrays and correct for stride
3074 not equal to one before writing to field of output descriptor.
3076 2007-05-20 Daniel Franke <franke.daniel@gmail.com>
3079 * check.c (check_rest): Improved argument conformance check and
3080 fixed error message generation.
3082 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3085 * Make-lang.in: Remove use of -Wno-error for expr.o, resolve.o,
3086 simplify.o and trans-common.o.
3088 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3091 * trans-array.c (gfc_trans_auto_array_allocation): Avoid
3092 multiplication of mismatched types.
3094 2007-05-18 Daniel Franke <franke.daniel@gmail.com>
3097 * symbol.c (gfc_add_flavor): Add the NAME to error message if
3100 2007-05-15 Daniel Franke <franke.daniel@gmail.com>
3105 * intrinsic.c (check_specific): Check elemental intrinsics for
3107 (add_functions): Fixed dummy argument names of BESJN and BESYN.
3108 Fixed elemental status of MCLOCK and MCLOCK8.
3109 * check.c (check_rest): Added check for array conformance.
3110 (gfc_check_merge): Removed check for array conformance.
3111 (gfc_check_besn): Removed check for scalarity.
3112 * intrinsic.texi (CSHIFT, EOSHIFT): Fixed typos.
3113 (BESJN, BESYN): Clarified documentation.
3115 2007-05-17 Tobias Burnus <burnus@net-b.de>
3117 * gfortran.texi (GFORTRAN_CONVERT_UNIT): Improve documentation.
3119 2007-05-16 Brooks Moses <brooks.moses@codesourcery.com>
3126 * target-memory.c: New file.
3127 * target-memory.h: New file.
3128 * simplify.c: Add #include "target-memory.h".
3129 (gfc_simplify_transfer): Implement constant-
3130 folding for TRANSFER intrinsic.
3131 * Make-lang.in: Add dependencies on new target-memory.* files.
3133 2007-05-15 Paul Brook <paul@codesourcery.com>
3135 * trans-types.c (gfc_type_for_size): Handle signed TImode.
3137 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3140 * trans.h (gfor_fndecl_internal_malloc, gfor_fndecl_internal_malloc64,
3141 gfor_fndecl_internal_free): Remove prototypes.
3142 (gfor_fndecl_os_error, gfc_call_free, gfc_call_malloc): Add prototypes.
3143 * trans.c (gfc_call_malloc, gfc_call_free): New functions.
3144 * f95-lang.c (gfc_init_builtin_functions): Add __builtin_free
3145 and __builtin_malloc builtins.
3146 * trans-decl.c (gfor_fndecl_internal_malloc,
3147 gfor_fndecl_internal_malloc64, gfor_fndecl_internal_free): Remove.
3148 (gfor_fndecl_os_error): Add.
3149 (gfc_build_builtin_function_decls): Don't create internal_malloc,
3150 internal_malloc64 and internal_free library function declaration.
3151 Create os_error library call function declaration.
3152 * trans-array.c (gfc_trans_allocate_array_storage,
3153 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
3154 gfc_conv_array_parameter, gfc_duplicate_allocatable): Use
3155 gfc_call_malloc and gfc_call_free instead of building calls to
3156 internal_malloc and internal_free.
3157 * trans-expr.c (gfc_conv_string_tmp): Likewise.
3158 * trans-stmt.c (gfc_do_allocate, gfc_trans_assign_need_temp,
3159 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
3160 gfc_trans_where_2: Likewise.
3161 * trans-intrinsic.c (gfc_conv_intrinsic_ctime,
3162 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
3163 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_trim): Likewise.
3165 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3168 * trans-expr.c (gfc_conv_substring): Evaluate substring bounds
3171 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
3173 * f95-lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
3174 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use unsigned_type_for
3175 instead of gfc_unsigned_type.
3176 * trans-stmt.c (gfc_trans_do): Use unsigned_type_for instead of
3178 * trans-types.c (gfc_unsigned_type): Remove.
3179 * trans-types.h (gfc_unsigned_type): Remove.
3181 2007-05-12 Paul Thomas <pault@gcc.gnu.org>
3184 * resolve.c (check_host_association): New function that detects
3185 incorrect host association and corrects it.
3186 (gfc_resolve_expr): Call the new function for variables and
3188 * match.h : Remove prototype for gfc_match_rvalue.
3189 * gfortran.h : Add prototype for gfc_match_rvalue.
3191 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
3194 * trans-expr.c (gfc_conv_function_call): Reduce indirection for
3195 direct assignments of recursive array valued functions.
3196 * primary.c (gfc_match_rvalue): Correct error for recursive
3197 function calls such that directly recursive calls of scalar
3198 function without an explicit result are disallowed.
3200 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
3203 * resolve.c (resolve_fl_namelist): It is not an error if the
3204 namelist element is the result variable of the enclosing
3205 function. Search for the symbol in current and all parent
3206 namespaces for a potential conflict.
3207 * symbol.c (check_conflict): Remove the conflict between
3208 'in_namelist' and 'FL_PROCEDURE' because the symbol info
3209 is not available to exclude function result variables.
3210 * trans-io.c (nml_get_addr_expr): Use the fake result decl
3211 if the symbol is an implicit result variable.
3213 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
3216 * decl.c (get_proc_name): If an entry has already been declared
3217 as a module procedure, pick up the symbol and the symtree and
3218 use them for the entry.
3220 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
3223 * resolve.c (resolve_symbol): Remove the flagging mechanism from the
3224 formal namespace resolution and instead check that the formal
3225 namespace is not the current namespace.
3227 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
3230 * trans-array.c (gfc_conv_array_parameter): Convert full array
3231 references to the result of the procedure enclusing the call.
3233 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
3237 * decl.c (add_init_expr_to_sym): Expand a scalar initializer
3238 for a parameter array into an array expression with the right
3240 * array.c (spec_dimen_size): Remove static attribute.
3241 * gfortran.h : Prototype for spec_dimen_size.
3243 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3246 * trans-stmt.c (gfc_trans_do): Handle large loop counts.
3248 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3251 * simplify.c (gfc_simplify_new_line): NEW_LINE can be simplified
3252 even for non constant arguments.
3254 2007-05-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3255 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3258 * gfortran.h: Add runtime error codes from libgfortran.h. Define
3260 * trans.c (gfc_trans_runtime_check): Update the format of runtime error
3261 messages to match library runtime errors. Use call to new library
3262 function runtime_error_at().
3263 * trans.h: Add prototype for new function gfc_trans_io_runtime_check.
3264 Add declaration for library functions runtime_error_at and
3266 * trans_io.c (gfc_trans_io_runtime_check): New function.
3267 (set_parameter_value): Add error checking for UNIT numbers.
3268 (set_parameter_ref): Initialize the users variable to zero.
3269 (gfc_trans_open): Move setting of unit number to after setting of common
3270 flags so that runtime error trapping can be detected.
3271 (gfc_trans_close): Likewise. (build_filepos): Likewise.
3272 (gfc_trans_inquire): Likewise. (build_dt): Likewise.
3273 * trans-decl.c: Add declarations for runtime_error_at and
3274 generate_error. (gfc_build_builtin_function_decls): Build function
3275 declarations for runtime_error_at and generate_error.
3277 2007-05-06 Paul Thomas <pault@gcc.gnu.org>
3280 * resolve.c (resolve_fl_procedure): Resolve constant character
3283 2007-05-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3286 * decl.c (match_char_spec): Add check for invalid character lengths.
3288 2007-05-04 Brooks Moses <brooks.moses@codesourcery.com>
3290 * intrinsic.texi (CMPLX): Document result kind.
3291 (COMPLEX): Add documentation.
3293 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
3296 * intrinsic.c (add_functions): Replaced calls to gfc_check_g77_math1
3297 by gfc_check_fn_r to avoid checks for scalarity.
3298 * check.c (gfc_check_besn): Removed check for scalarity.
3299 (gfc_check_g77_math1): Removed.
3300 * intrinsic.h (gfc_check_g77_math1): Removed.
3302 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
3304 * check.c (gfc_check_fseek_sub): Fixed typo.
3306 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
3309 * intrinsic.c (add_subroutines): Added FSEEK.
3310 * intrinsic.h (gfc_resolve_fseek_sub, gfc_check_fseek_sub): New.
3311 * iresolve.c (gfc_resolve_fseek_sub): New.
3312 * check.c (gfc_check_fseek_sub): New.
3313 * intrinsic.texi (FSEEK): Updated.
3315 2007-05-04 Tobias Burnus <burnus@net-b.de>
3318 * expr.c (gfc_check_pointer_assign): Check for NULL pointer.
3320 2007-05-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3323 * simplify.c (gfc_simplify_len): Only simplify integer lengths.
3325 2007-05-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3328 * simplify.c (gfc_simplify_repeat): Don't put function call with
3329 side effect in a gcc_assert().
3331 2007-05-04 Tobias Burnus <burnus@net-b.de>
3334 * interface.c (compare_actual_formal): Check character length.
3336 2007-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
3339 * dependency.c (gfc_full_array_ref_p): If the reference is
3340 to a single element, check that the array has a single
3341 element and that the correct element is referenced.
3343 2007-05-01 Daniel Franke <franke.daniel@gmail.com>
3345 * intrinsic.c (add_functions): Fixed ELEMENTAL specifications.
3346 (add_subroutines): Replaced magic numbers in function calls by
3347 ELEMENTAL and NOT_ELEMENTAL respectively.
3348 * intrinsic.texi (MVBITS): Changed class to elemental subroutine.
3349 (RANDOM_NUMBER): Changed class to subroutine.
3350 (HUGE, TINY): Changed class to inquiry function.
3352 2007-04-30 Brooks Moses <brooks.moses@codesourcery.com>
3354 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_get_double_int.
3355 (gfc_conv_tree_to_mpz): New function.
3356 (gfc_conv_mpfr_to_tree): Use real_from_mpfr.
3357 (gfc_conv_tree_to_mpfr): New function.
3358 * trans-const.h: (gfc_conv_tree_to_mpz): New prototype.
3359 (gfc_conv_tree_to_mpfr): New prototype.
3361 2007-04-30 Daniel Franke <franke.daniel@gmail.com>
3363 * intrinsic.texi (IERRNO): Changed class to non-elemental function.
3364 (LOG10): Removed COMPLEX as accepted argument type.
3365 (NEW_LINE): Changed class from elemental to inquiry function.
3366 (SIGN): Removed requirement of scalar arguments.
3367 (SNGL): Changed class to elemental function.
3369 2007-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3372 * simplify.c (simplify_bound_dim): New function.
3373 (simplify_bound): Use the above. Perform simplification of LBOUND
3374 and UBOUND when DIM argument is not present.
3376 2007-04-29 Daniel Franke <franke.daniel@gmail.com>
3378 * gfortran.texi: Cleaned up keyword index.
3379 * invoke.texi: Likewise.
3380 * intrinsic.texi: Likewise.
3382 2007-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3385 * scanner.c (load_file): Discard the byte order mark if one is
3386 found on the first non-preprocessor line of a file.
3388 2007-04-29 Paul Thomas <pault@gcc.gnu.org>
3391 * trans-array.c (gfc_conv_resolve_dependencies): Create a temp
3392 whenever a dependency is found.
3394 2007-04-28 Tobias Schlüter <tobi@gcc.gnu.org>
3396 * options.c (gfc_handle_option): Ensure requested free form line
3397 length is not too small.
3399 2007-04-27 Brooks Moses <brooks.moses@codesourcery.com>
3401 * intrinsic.texi (Transfer): Improve documentation.
3403 2007-04-27 Brooks Moses <brooks.moses@codesourcery.com>
3405 * gfortran.texi (Option Index): Add @samp as needed.
3407 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
3409 * gfortran.texi: Added node and menu entry for an option index.
3410 * invoke.texi: Moved command line option related entries of the concept
3411 index to the option index.
3413 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
3415 * intrinsic.texi (AND, FPUT, FPUTC, MODULO, OR, SET_EXPONENT,
3416 XOR): Fixed examples.
3418 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
3420 * intrinsic.texi (PRODUCT, RESHAPE, SPACING, SPREAD, SUM,
3421 SYSTEM_CLOCK, TRANSFER, UNPACK): New.
3422 (DATE_AND_TIME, CPU_TIME, RRSPACING): Added cross references.
3424 2007-04-26 Daniel Franke <franke.daniel@gmail.com>
3426 * intrinsic.texi (NULL, PACK, PRESENT, REPEAT, SCAN, SHAPE,
3427 SIZE, TRANSPOSE, TRIM, VERIFY): New.
3428 (ADJUSTL, ADJUSTR, INDEX): Added cross references.
3429 (INT, INT2, INT8, LONG): Enabled section header.
3431 2007-04-25 Janne Blomqvist <jb@gcc.gnu.org>
3433 * module.c (module_char): Replace fgetc() with
3435 (write_char): Replace fputc() with putc().
3436 * scanner.c (load_line): Replace fgetc() with getc().
3437 (gfc_read_orig_filename): Likewise.
3439 2007-04-25 Tobias Burnus <burnus@net-b.de>
3442 * error.c (error_print): Fix %% support.
3443 * intrinsic.c (sort_actual): Improve error message.
3444 * resolve.c (resolve_actual_arglist): Allow %VAL for
3445 interfaces defined in the module declaration part.
3447 2007-04-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3450 * intrinsic.texi (GETLOG): Update documentation to reflect
3453 2007-04-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3456 * module.c (write_char): Add character to the MD5 buffer.
3457 (read_md5_from_module_file): New function.
3458 (gfc_dump_module): Compute MD5 for new module file. Call
3459 read_md5_from_module_file. Only overwrite old module file
3460 if the new MD5 is different.
3462 2007-04-23 Paul Thomas <pault@gcc.gnu.org>
3465 * resolve.c (resolve_symbol): Allow resolution of formal
3466 namespaces nested within formal namespaces coming from modules.
3469 * trans-expr.c (gfc_trans_assignment): Make the call to
3470 gfc_trans_zero_assign conditional on the lhs array ref being
3473 2007-04-23 Tobias Burnus <burnus@net-b.de>
3475 * primary.c (match_integer_constant): Mention -fno-range-check
3476 in the error message.
3478 2007-04-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3481 * scanner.c (load_line): Remove check for comment after ampersand and
3482 adjust tracking of ampersand.
3484 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
3486 * f95-lang.c (lang_tree_node): Use GENERIC_NEXT
3487 instead of checking GIMPLE_STMT_P in chain_next.
3489 2007-04-17 Tobias Schlüter <tobi@gcc.gnu.org>
3491 * trans-types.h (gfc_packed): New enum.
3492 (gfc_get_nodesc_array_type): Change prototype to use new enum.
3493 * trans-types.c (gfc_get_nodesc_array): Use gfc_packed for
3494 argument packed. Adapt all references to values accordingly.
3495 (gfc_sym_type): Use enum values in call to gfc_get_nodesc_array.
3496 (gfc_get_derived_type): Likewise.
3497 * trans-array.c (gfc_build_constant_array_constructor): Likewise.
3498 * trans-expr.c (gfc_get_interface_mapping_charlen): Changed packed
3499 argument to type gfc_packed.
3500 (gfc_add_interface_mapping): Use enum values in call to
3501 gfc_get_interface_mapping.
3502 * trans-decl.c (gfc_build_dummy_array_decl): Adapt to use enum
3503 values when determining packing.
3505 * trans-decl.c (gfc_finish_decl): Remove unused second argument
3506 'init'. Simplify code accordingly. Remove calls to
3507 gfc_fatal_error in favor of gcc_assert.
3508 (create_function_arglist): Remove second argument from calls to
3510 (gfc_trans_dummy_character): Likewise.
3512 * arith.h: Update copyright years.
3513 * dependency.h: Likewise.
3514 * gfortran.h: Likewise.
3515 * lang-specs.h: Likewise.
3516 * parse.h: Likewise.
3517 * symbol.c: Likewise.
3518 * trans.h: Likewise.
3519 * trans.c: Likewise.
3520 * trans-array.c: Likewise.
3521 * trans-common.c: Likewise.
3522 * trans-const.h: Likewise.
3523 * trans-const.c: Likewise.
3524 * trans-decl.c: Likewise.
3525 * trans-expr.c: Likewise.
3526 * trans-io.c: Likewise.
3527 * trans-openmp.c: Likewise.
3528 * trans-types.h: Likewise.
3529 * types.def: Likewise.
3531 2007-04-17 Tobias Schlüter <tobi@gcc.gnu.org>
3534 * decl.c (gfc_sym_mangled_identifier): Use capital letters in name
3536 (gfc_sym_mangled_function_id): Likewise.
3538 2007-04-15 Paul Thomas <pault@gcc.gnu.org>
3541 * primary.c (check_for_implicit_index): New function to check
3542 that a host associated variable is not an undeclared implied
3544 (gfc_match_rvalue, match_variable): Use it and reset the
3545 implied_index attribute.
3546 * gfortran.h : Add the implied_index field to symbol_attribute.
3547 * match.c (gfc_match_iterator): Mark the iterator variable
3548 with the new attribute.
3549 * decl.c (build_sym): Reset the new attribute.
3551 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
3553 * gfc-internals.texi: Fix typos.
3554 * simplify.c: Fix a comment typo.
3556 2007-04-14 Bernhard Fischer <aldot@gcc.gnu.org>
3558 * primary.c: Commentary typo fix; Add question about redundant (?)
3561 2007-04-14 Paul Thomas <pault@gcc.gnu.org>
3565 * expr.c (scalarize_intrinsic_call): New function to
3566 scalarize elemental intrinsic functions in initialization
3568 (check_init_expr): Detect elemental intrinsic functions
3569 in initalization expressions and call previous.
3571 2007-04-13 Tobias Burnus <burnus@net-b.de>
3574 * primary.c (match_variable): External functions
3577 2007-04-13 Paul Thomas <pault@gcc.gnu.org>
3580 * trans-types.c (copy_dt_decls_ifequal): Do not get pointer
3581 derived type components.
3583 2007-04-13 Tobias Schlüter <tobi@gcc.gnu.org>
3586 * resolve.c: Include obstack.h and bitmap.h. New variable
3588 (code_stack): Add tail and reachable_labels fields.
3589 (reachable_labels): New function.
3590 (resolve_branch): Rework to use new fields in code_stack.
3591 (resolve_code): Call reachable_labels.
3592 (resolve_codes): Allocate and free labels_obstack.
3594 2007-04-12 Tobias Schlüter <tobi@gcc.gnu.org>
3597 * decl.c (match_char_spec): Move check for negative CHARACTER
3599 * resolve.c (resolve_charlen): ... here.
3600 (resolve_types): Resolve CHARACTER lengths earlier.
3602 2007-04-12 Daniel Franke <franke.daniel@gmail.com>
3605 * intrinsic.texi (RANDOM_SEED, RANDOM_NUMBER): New.
3607 2007-04-12 Tobias Schlüter <tobi@gcc.gnu.org>
3610 * primary.c (gfc_variable_attr): Don't copy string length if it
3612 * resolve.c (resolve_code): Clarify error message.
3615 * decl.c (gfc_match_end): Also check for construct name in END
3616 FORALL and END WERE statements.
3617 * match.c (match_case_eos): Use uppercase for statement name in
3619 (match_elsewhere): Construct name may appear iff construct has a
3622 * trans-types.c: Update copyright years. Reformat long comment
3623 explaining array descriptor format. Remove obsolete mention of
3626 * arith.c (gfc_arith_uplus): Rename to ...
3627 (gfc_arith_identity): ... this.
3628 (gfc_parentheses): New function.
3629 (gfc_uplus): Adapt to renamed function.
3630 * arith.h (gfc_parentheses): Add prototype.
3631 * expr.c (gfc_copy_expr): Deal with INTRINSIC_PARENTHESES.
3632 (simplifiy_intrinsic_op): Treat INTRINSIC_UPLUS separately from
3633 INTRINSIC_PARENTHESES.
3635 2007-04-12 Tobias Burnus <burnus@net-b.de>
3638 * decl.c (match_attr_spec): Allow PRIVATE/PUBLIC
3639 attribute in type definitions.
3640 (gfc_match_private): Allow PRIVATE statement only
3641 in specification part of modules.
3642 (gfc_match_public): Ditto for PUBLIC.
3643 (gfc_match_derived_decl): Allow PRIVATE/PUBLIC attribute only in
3644 specificification part of modules.
3646 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
3649 * intrinsic.c (add_functions): Add ref. to gfc_resolve_achar.
3650 * intrinsic.h : Add prototype for gfc_resolve_achar.
3651 * iresolve.c (gfc_resolve_achar): New function.
3653 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
3656 * resolve.c (resolve_fl_variable): Set flag to 2 for automatic
3657 arrays. Make condition for automatic array error explicit.
3658 If a dummy, no error on an INTENT(OUT) derived type.
3660 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
3663 * expr.c (find_array_element): Correct arithmetic for rank > 1.
3665 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
3668 * check.c (numeric_check): If an expresson has not got a type,
3669 see if it is a symbol for which a default type applies.
3671 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
3674 * trans-decl.c (gfc_get_symbol_decl): Allow unreferenced use
3677 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
3680 * symbol.c (gfc_check_function_type): New function.
3681 * gfortran.h : Add prototype for previous.
3682 * parse.c (parse_progunit): Call it after parsing specification
3685 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
3688 * trans-expr.c (gfc_conv_function_call): Give a dummy
3689 procedure the correct type if it has alternate returns.
3691 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
3694 * decl.c (gfc_match_modproc): Go up to the top of the namespace
3695 tree to find the module namespace for gfc_get_symbol.
3697 2007-04-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3700 * fortran/gfortran.h (gfc_charlen_int_kind): New prototype.
3701 * fortran/trans-types.c (gfc_charlen_int_kind): New variable.
3702 (gfc_init_types): Define gfc_charlen_int_kind.
3703 * fortran/trans.h (gfor_fndecl_string_repeat): Remove prototype.
3704 * fortran/trans-decl.c (gfor_fndecl_string_repeat): Delete.
3705 (gfc_build_intrinsic_function_decls): Don't set
3706 gfor_fndecl_string_repeat.
3707 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_repeat): Rewrite
3708 so that we don't have to call a library function.
3709 * fortran/simplify.c (gfc_simplify_repeat): Perform the necessary
3710 checks on the NCOPIES argument, and work with arbitrary size
3713 2007-03-31 Tobias Burnus <burnus@net-b.de>
3715 * intrinsic.c (add_functions): Fix name of dummy argument
3716 for new_line and exit intrinsic.
3718 2007-03-31 Paul Thomas <pault@gcc.gnu.org>
3721 * gfortran.texi: Add a section for the %VAL, %REF and %LOC
3724 2007-03-30 Rafael Avila de Espindola <espindola@google.com>
3726 * trans-types.c (gfc_signed_or_unsigned_type): Remove.
3727 (gfc_unsigned_type): Use get_signed_or_unsigned_type instead of
3728 gfc_signed_or_unsigned_type.
3729 (gfc_signed_type): Ditto.
3730 * trans-types.h (gfc_signed_or_unsigned_type): Remove.
3731 * f95-lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
3733 2007-03-30 Tobias Schlüter <tobi@gcc.gnu.org>
3735 * symbol.c (gfc_find_gsymbol): Simplify, don't unconditionally
3736 descend into all branches.
3738 2007-03-29 Tobias Schlüter <tobi@gcc.gnu.org>
3740 * intrinsic.c (conv_name): Let gfc_get_string handle the format.
3741 (find_conv): Compare pointers instead of calling strcmp.
3742 (find_sym): Likewise, but ensure that the compared pointer is in
3743 the global string table.
3745 2007-03-28 Tobias Schlüter <tobi@gcc.gnu.org>
3747 * gfc-internals.texi: Fix output filename. Merge type index into
3748 concept index. Start documentation of gfc_code structure.
3750 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
3752 * gfc-internals.texi: New file,
3753 * Make-lang.in: Add rules to convert it to dvi, pdf, and info.
3755 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
3757 * error.c (show_locus): Remove always-false test.
3759 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
3761 * lang.opt: Minor edits to descriptions.
3763 2007-03-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3766 * fortran/interface.c (check_operator_interface): Implement
3767 the standard checks on user operators extending intrinsic operators.
3768 * fortran/resolve.c (resolve_operator): If the ranks of operators
3769 don't match, don't error out but try the user-defined ones first.
3771 2007-03-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3774 * expr.c (check_dimension): Fix logic of comparisons.
3776 2007-03-24 Paul Thomas <pault@gcc.gnu.org>
3779 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Return
3780 int result that is non-zero if the expression is the function
3781 result. Only the characteristics of the result expression
3782 can be used in a procedure interface, so simplify LEN in situ
3783 using its character length.
3787 * trans-expr.c (gfc_conv_function_call): Do not use
3788 gfc_conv_expr_reference for actual pointer function with formal
3789 target because a temporary is created that does not transfer
3790 the reference correctly. Do not indirect formal pointer
3791 functions since it is the function reference that is needed.
3793 2007-03-24 Brooks Moses <brooks.moses@codesourcery.com>
3795 * gfortran.h: Edit comments on GFC_STD_*.
3797 2007-03-23 Brooks Moses <brooks.moses@codesourcery.com>
3799 * invoke.texi: Misc. small typo fixes.
3800 (-Wcharacter-truncation): Add.
3801 (-Wnonstd-intrinsics): Correct spelling.
3803 (-fintrinsic-modules-path): Add.
3805 2007-03-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3808 * arith.c (complex_pow): Rewrite to handle large power.
3809 (gfc_arith_power): Handle large power in the real and integer
3812 2007-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3815 * trans-const.c (gfc_conv_mpz_to_tree): Allow integer constants
3816 larger than twice the width of a HOST_WIDE_INT.
3818 2006-03-22 Paul Thomas <pault@gcc.gnu.org>
3821 * trans-intrinsic.c (gfc_size_in_bytes): Remove function.
3822 (gfc_conv_intrinsic_array_transfer): Remove calls to previous.
3823 Explicitly extract TREE_TYPEs for source and mold. Use these
3824 to calculate length of source and mold, except for characters,
3825 where the se string_length is used. For mold, the TREE_TYPE is
3826 recalculated using gfc_get_character_type_len so that the
3827 result is correctly cast for character literals and substrings.
3828 Do not use gfc_typenode_for_spec for the final cast.
3830 2007-03-22 Tobias Schlüter <tobi@gcc.gnu.org>
3833 * decl.c (gfc_match_derived_decl): Reliably reject
3834 'doubleprecision' and 'doublecomplex' as type names.
3836 2007-03-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3839 * trans-expr.c (gfc_trans_init_string_length): Length should
3841 (gfc_conv_function_call): Likewise.
3843 2007-03-18 Paul Thomas <pault@gcc.gnu.org>
3847 * symbo.c : Add gfc_derived_types.
3848 (gfc_free_dt_list): Free derived type list gfc_derived_types.
3849 (gfc_free_namespace): Remove call to gfc_free_dt_list.
3850 (gfc_symbol_done_2): Call gfc_free_dt_list.
3851 * gfortran.h : Declare gfc_derived_types to be external. Remove
3852 derived types field from gfc_namespace.
3853 * resolve.c (resolve_fl_derived): Refer to gfc_derived types
3854 rather than namespace derived_types.
3855 (resolve_fntype): Remove special treatment for module
3856 derived type functions.
3857 * trans-types.c (gfc_get_derived_type): Remove search for like
3858 derived types. Finish by copying back end declaration to like
3859 derived types in the derived type list gfc_derived_types.
3861 2007-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3864 * trans-expr.c (gfc_conv_powi): Make n argument unsigned hwi.
3865 (gfc_conv_cst_int_power): Handle integer exponent with care,
3866 since it might be too large for us.
3868 2007-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3871 * invoke.texi: Fix typo.
3873 2007-03-16 Tobias Burnus <burnus@net-b.de>
3875 * trans-decl.c (gfc_generate_function_code): Use all arguments of
3878 2007-03-15 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3880 * gfortran.h (gfc_option_t): Add flag_backtrace field.
3881 * lang.opt: Add -fbacktrace option.
3882 * invoke.texi: Document the new option.
3883 * trans-decl.c (gfc_build_builtin_function_decls): Add new
3884 option to the call to set_std.
3885 * options.c (gfc_init_options, gfc_handle_option): Handle the
3888 2007-03-15 Tobias Burnus <burnus@gcc.gnu.org>
3889 Paul Thomas <pault@gcc.gnu.org>
3892 * decl.c (gfc_match_import): If the parent of the current name-
3893 space is null, try looking for an imported symbol in the parent
3894 of the proc_name interface.
3895 * resolve.c (resolve_fl_variable): Do not check for blocking of
3896 host association by a same symbol, if the symbol is in an
3899 2007-03-15 Paul Thomas <pault@gcc.gnu.org>
3902 * decl.c (match_data_constant): Before going on to try to match
3903 a name, try to match a structure component.
3907 * resolve.c (resolve_actual_arglist): Do not reject a generic
3908 actual argument if it has a same name specific interface.
3911 * trans-array.c (parse_interface): Do not nullify allocatable
3912 components if the symbol has the saved attribute.
3914 2007-03-14 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3916 * trans-array.c (gfc_trans_auto_array_allocation): Replace
3917 fold(convert()) by fold_convert().
3918 (gfc_duplicate_allocatable): Likewise.
3919 * trans-intrinsic.c (gfc_conv_intrinsic_dot_product): Use
3920 build_int_cst instead of converting an integer_zero_node
3923 2007-03-14 Jakub Jelinek <jakub@redhat.com>
3925 * module.c (mio_typespec): Don't look at ts->cl if not BT_CHARACTER.
3927 2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
3932 * intrinsics.texi (CHDIR): Fix argument names, note
3933 that STATUS must be a default integer.
3934 (CTIME): Fix argument names, note that RESULT must
3935 be a default integer.
3936 (EXIT): Note that STATUS must be a default integer.
3938 2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
3941 * intrinsic.texi: General whitespace cleanup, remove
3942 comment about missing intrinsics.
3943 (menu): Add lines for new entries listed below.
3944 (ACOSH): Mention specific function DACOSH, correct
3945 description phrasing.
3946 (ASINH): Mention specific function DASINH, correct
3947 description phrasing.
3948 (ATANH): Mention specific function DATANH, correct
3949 description phrasing.
3950 (COS): Add index entry for CCOS.
3951 (CPU_TIME): Correct "REAL" to "REAL(*)".
3952 (EXP): Add index entry for CEXP.
3953 (INT): Correct argument name to "A".
3957 (MAX): Add index entries for specific variants.
3958 (MCLOCK): New entry.
3959 (MCLOCK8): New entry.
3960 (SECNDS): Adjust to a more standard form.
3961 (SECOND): New entry.
3962 (TIME): Add cross-reference to MCLOCK.
3963 (TIME8): Add cross-reference to MCLOCK8.
3965 2007-03-11 Paul Thomas <pault@gcc.gnu.org>
3968 * parse.c (parse_interface): Use the default types from the
3969 formal namespace if a function or its result do not have a type
3970 after parsing the specification statements.
3972 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
3974 * intrinsic.texi: (ICHAR) Improve internal I/O note.
3975 (ACHAR): Reference it.
3976 (CHAR): Reference it.
3977 (IACHAR): Reference it.
3979 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
3981 * intrinsic.texi: (LINK) Document function form.
3987 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
3989 * intrinsic.texi: minor typo fixes, removed prologue.
3990 (FSEEK): moved to correct place in alphabetical order.
3992 2007-03-08 Daniel Franke <franke.daniel@gmail.com>
3995 * check.c (gfc_check_alarm_sub): Added check for default integer
3996 kind of status argument.
3997 * iresolve.c (gfc_resolve_alarm_sub): Removed conversion of
3999 * intrinsic.texi (ALARM): Extended documentation.
4001 2007-03-08 Daniel Franke <franke.daniel@gmail.com>
4003 * intrinsic.texi (GERROR, ISATTY, TTYNAM): New.
4004 (ABORT, FLUSH, FNUM, IRAND, MALLOC, SIGNAL, SRAND): Fixed typo.
4005 * intrinsic.c (add_subroutines): Adjusted dummy argument names
4006 of GERROR and TTYNAM.
4008 2007-07-08 Tobias Burnus <burnus@net-b.de>
4010 * module.c (gfc_match_use): Support renaming of operators
4012 * gfortran.texi (Fortran 2003 Status): Document support of
4013 renaming of operators.
4015 2007-07-08 Tobias Burnus <burnus@net-b.de>
4018 * module.c (read_module): Always import module name as symbol.
4019 (gfc_match_use): Disallow module name in the only clause of
4022 2007-03-08 Paul Thomas <pault@gcc.gnu.org>
4025 * expr.c (find_array_section): Correct arithmetic for section
4028 2007-03-07 Brooks Moses <brooks.moses@codesourcery.com>
4030 * iresolve.c (gfc_resolve_ishftc): Correct s_kind value.
4032 2007-03-06 Daniel Franke <franke.daniel@gmail.com>
4034 PR documentation/30950
4035 * intrinsic.texi (AND, CPU_TIME): Fix dummy argument names.
4036 (FREE): Fix call syntax.
4038 2007-03-06 Brooks Moses <brooks.moses@codesourcery.com>
4040 * intrinsic.texi: Limit column widths to a total of .85.
4042 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
4044 * gfortran.texi (GFortran and G77): Rewrite completely.
4046 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
4048 * match.c (gfc_match_name): Expanded comment.
4050 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
4052 * gfortran.texi (Old-style kind specifications): Document
4053 special handling of old-style kind specifiers for COMPLEX.
4054 * decl.c (gfc_match_old_kind_spec): Document kind/bytesize
4055 assumptions for COMPLEX in comment.
4057 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
4060 * gfortranspec.c (lang_specific_driver): Update program
4061 name and copyright date.
4063 2007-03-03 Paul Thomas <pault@gcc.gnu.org>
4066 * check.c (dim_rank_check): The shape of subsections of
4067 assumed-size arrays is known.
4069 2007-03-02 Paul Thomas <pault@gcc.gnu.org>
4070 Tobias Burnus <burnus@net-b.de>
4073 * decl.c (gfc_match_entry): Remove erroneous entry result check.
4075 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
4077 * Make-lang.in: Add install-pdf target as copied from
4078 automake v1.10 rules.
4080 2007-03-01 Tobias Burnus <burnus@net-b.de>
4083 * trans-intrinsic.c (gfc_conv_intrinsic_size): Compare pointers.
4085 2007-02-28 Tobias Burnus <burnus@net-b.de>
4086 Paul Thomas <pault@gcc.gnu.org>
4090 * resolve.c (resolve_actual_arglist): Allow by-value
4091 arguments and non-default-kind for %VAL().
4092 * trans-expr.c (conv_arglist_function): Allow
4093 non-default-kind for %VAL().
4095 2007-02-28 Tobias Burnus <burnus@net-b.de>
4098 * primary.c (next_string_char): Correct reading a character
4099 after the delimiter.
4100 (match_string_constant): Print warning message only once.
4102 2007-02-27 Richard Guenther <rguenther@suse.de>
4104 * trans-array.c (structure_alloc_comps): Use correct type
4105 for null pointer constant.
4107 2007-02-26 Brooks Moses <brooks.moses@codesourcery.com>
4109 * gfortran.texi: Standardize title page, remove version number
4110 from copyright page.
4112 2007-02-26 Thomas Koenig <Thomas.Koenig@online.de>
4113 Paul Thomas <pault@gcc.gnu.org>
4116 * trans-intrinsic.c (gfc_conv_intrinsic_size):
4117 If dim is an optional argument, check for its
4118 presence and call size0 or size1, respectively.
4120 2007-02-23 Paul Thomas <pault@gcc.gnu.org>
4123 * resolve.c (has_default_initializer): New function.
4124 (resolve_fl_variable): Call has_default_initializer to determine if
4125 the derived type has a default initializer to its ultimate
4129 2007-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4131 * options.c (set_default_std_flags): New function to consolidate
4133 (gfc_init_options): Use new function.
4134 (gfc_handle_option): Use new function.
4136 2007-02-22 Brooks Moses <brooks.moses@codesourcery.com>
4138 * gfortran.texi (Old-style kind specifications): Document
4139 special handling of old-style kind specifiers for COMPLEX.
4140 * decl.c (gfc_match_old_kind_spec): Documented kind/bytesize
4141 assumptions in comment.
4143 2007-02-21 Bernhard Fischer <aldot@gcc.gnu.org>
4145 * parse.c (next_free): Gooble spaces after OpenMP sentinel.
4147 2007-02-20 Thomas Koenig <Thomas.Koenig@online.de>
4150 * match.c (gfc_match_iterator): Remove conflict between
4151 loop variable and pointer.
4153 2007-02-20 Tobias Burnus <burnus@net-b.de>
4156 * symbol.c (gfc_add_volatile): Allow to set VOLATILE
4157 attribute for host-associated variables.
4158 * gfortran.h (symbol_attribute): Save namespace
4159 where VOLATILE has been set.
4160 * trans-decl.c (gfc_finish_var_decl): Move variable
4161 declaration to the top.
4163 2007-02-20 Tobias Burnus <burnus@net-b.de>
4166 * resolve.c (resolve_symbol): Add character dummy VALUE check.
4168 2007-02-19 Thomas Koenig <Thomas.Koenig@online.de>
4171 * fortran/iresolve.c (gfc_resolve_maxloc): Remove coercion of
4172 argument to default integer.
4173 (gfc_resolve_minloc): Likewise.
4175 2007-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4178 * options.c (gfc_init_options): Relax warning level for obsolescent.
4179 * match.c (match_arithmetic_if): Change to obsolescent from deleted.
4180 (gfc_match_if): Same.
4182 2007-02-18 Roger Sayle <roger@eyesopen.com>
4184 * trans-array.c (gfc_build_constant_array_constructor): When the
4185 shape of the constructor is known, use that to construct the
4187 (gfc_trans_constant_array_constructor): Initialize the "info"
4188 information for all of the dimensions of the array constructor.
4189 (constant_array_constructor_loop_size): New function.
4190 (gfc_trans_array_constructor): Use it to determine whether a
4191 loop is suitable for "constant array constructor" optimization.
4193 * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Use fold_build2
4194 instead of build2, to avoid conditions like "(a != b) != 0".
4196 2007-02-18 Roger Sayle <roger@eyesopen.com>
4197 Paul Thomas <pault@gcc.gnu.org>
4200 * match.c (match_forall_iterator): Use gfc_match_expr instead
4201 of gfc_match_variable to match the iterator variable. Return
4202 MATCH_NO if not a variable. Remove the reset of the symbol's
4205 2007-02-16 Tobias Burnus <burnus@net-b.de>
4208 * trans-decl.c (gfc_generate_function_code): Do not initialize
4209 pointers to derived components.
4211 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
4212 Brooks Moses <brooks.moses@codesourcery.com>
4213 Lee Millward <lee.millward@codesourcery.com>
4215 * trans-expr.c (gfc_conv_power_op): Use build_call_expr.
4216 (gfc_conv_string_tmp): Likewise.
4217 (gfc_conv_concat_op): Likewise.
4218 (gfc_build_compare_string): Likewise.
4219 (gfc_conv_function_call): Use build_call_list instead of build3.
4221 * trans-array.c (gfc_trans_allocate_array_storage): Use
4223 (gfc_grow_array): Likewise.
4224 (gfc_trans_array_ctor_element): Likewise.
4225 (gfc_trans_array_constructor_value): Likewise.
4226 (gfc_array_allocate): Likewise.
4227 (gfc_array_deallocate): Likewise.
4228 (gfc_trans_auto_array_allocation): Likewise.
4229 (gfc_trans_dummy_array_bias): Likewise.
4230 (gfc_conv_array_parameter): Likewise.
4231 (gfc_trans_dealloc_allocated): Likewise.
4232 (gfc_duplicate_allocatable): Likewise.
4234 * trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr.
4235 (gfc_trans_omp_flush): Likewise.
4237 * trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr.
4238 (gfc_trans_pause): Likewise.
4239 (gfc_trans_stop): Likewise.
4240 (gfc_trans_character_select): Likewise.
4241 (gfc_do_allocate): Likewise.
4242 (gfc_trans_assign_need_temp): Likewise.
4243 (gfc_trans_pointer_assign_need_temp): Likewise.
4244 (gfc_trans_forall_1): Likewise.
4245 (gfc_trans_where_2): Likewise.
4246 (gfc_trans_allocate): Likewise.
4247 (gfc_trans_deallocate): Likewise.
4249 * trans.c (gfc_trans_runtime_check): Use build_call_expr.
4251 * trans-io.c (gfc_trans_open): Use build_call_expr.
4252 (gfc_trans_close): Likewise.
4253 (build_filepos): Likewise.
4254 (gfc_trans_inquire): Likewise.
4255 (NML_FIRST_ARG): Delete.
4256 (NML_ADD_ARG): Delete.
4257 (transfer_namelist_element): Use build_call_expr.
4258 (build_dt): Likewise.
4259 (gfc_trans_dt_end): Likewise.
4260 (transfer_expr): Likewise.
4261 (transfer_array-desc): Likewise.
4263 * trans-decl.c (gfc_generate_function_code): Use build_call_expr.
4264 (gfc_generate_constructors): Likewise.
4266 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr.
4267 (gfc_conv_intrinsic_fdate): Likewise.
4268 (gfc_conv_intrinsic_ttynam): Likewise.
4269 (gfc_conv_intrinsic_array_transfer): Likewise.
4270 (gfc_conv_associated): Likewise.
4271 (gfc_conv_intrinsic_si_kind): Likewise.
4272 (gfc_conv_intrinsic_trim): Likewise.
4273 (gfc_conv_intrinsic_repeat: Likewise.
4274 (gfc_conv_intrinsic_iargc): Likewise.
4276 2007-02-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4279 * scanner.c (gfc_next_char_literal): Add check for end of file after
4280 call to advance_line.
4282 2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>
4285 * primary.c (match_logical_constant): Return MATCH_ERROR on invalid
4288 2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>
4290 * misc.c (gfc_typename): Fix potential buffer overflow.
4292 2007-02-13 Paul Thomas <pault@gcc.gnu.org>
4295 * module.c (read_module): Set pointer_info to referenced if the
4296 symbol has no namespace.
4298 2007-02-12 Nick Clifton <nickc@redhat.com>
4300 * lang.opt: Add Warning attribute to warning options.
4302 2007-02-11 Daniel Franke <franke.daniel@gmail.com>
4304 * intrinsic.texi (HOSTNM): Fix typographical error in syntax.
4305 (SLEEP): Added section and documentation.
4307 2007-02-11 Tobias Schlüter <tobi@gcc.gnu.org>
4310 * decl.c (add_init_expr_to_sym): Remove ENUM specific code.
4311 (variable_decl): Likewise. Rewrap comment.
4312 (match_attr_spec): Remove ENUM specific code.
4313 (gfc_match_enum): Fix typo in error message.
4314 (enumerator_decl): New function.
4315 (gfc_match_enumerator_def): Use enumerator_decl instead of
4316 variable_decl. Adapt code accordingly.
4318 2007-02-11 Paul Thomas <pault@gcc.gnu.org>
4321 * module.c (find_symtree_for_symbol): New function to return
4322 a symtree that is not a "unique symtree" given a symbol.
4323 (read_module): Do not automatically set pointer_info to
4324 referenced because this inhibits the generation of a unique
4325 symtree. Recycle the existing symtree if possible by calling
4326 find_symtree_for_symbol.
4329 * decl.c (add_init_expr_to_sym): Make new charlen for an array
4330 constructor initializer.
4332 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
4334 * f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address
4335 and __emutls_register_common.
4336 * openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls.
4337 * trans-common.c (build_common_decl): Don't check have_tls.
4338 * trans-decl.c (gfc_finish_var_decl): Likewise.
4339 * types.def (BT_WORD, BT_FN_PTR_PTR): New.
4340 (BT_FN_VOID_PTR_WORD_WORD_PTR): New.
4342 2007-02-09 Tobias Burnus <burnus@net-b.de>
4345 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc,
4346 gfc_conv_intrinsic_minmaxval): Use HUGE-1 for most negative integer.
4348 2007-02-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4351 * trans-array.c (gfc_trans_create_temp_array): Remove use of the
4352 function argument. Always generate code for negative extent.
4354 * trans-array.h (gfc_trans_create_temp_array): Change prototype.
4355 * trans-expr.c (gfc_conv_function_call): Remove use of last argument
4356 of gfc_trans_create_temp_array.
4357 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Likewise.
4358 * trans-stmt.c (gfc_conv_elemental_dependencies): Likewise.
4360 2007-02-08 Roger Sayle <roger@eyesopen.com>
4362 * trans-stmt.c (gfc_trans_forall_1): Optimize the cases where the
4363 mask expression is a compile-time constant (".true." or ".false.").
4365 2007-02-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4368 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Evaluate
4369 arguments only once. Generate check that NCOPIES argument is not
4372 2007-02-04 Steven G. Kargl <kargl@gcc.gnu.org>
4375 * fortran/invoke.texi: Update documentation.
4376 * fortran/options.c (gfc_post_options): Deal with tabs with -std=f2003
4379 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
4381 * trans-array.c: Fix a comment typo.
4383 2007-02-03 Paul Thomas <pault@gcc.gnu.org>
4386 * array.c (match_array_element_spec): If the length of an array is
4387 negative, adjust the upper limit to make it zero length.
4390 * resolve.c (pure_function, resolve_function): Initialize name to
4391 null to clear up build warnings.
4392 (resolve_fl_variable): Look at components explicitly to check for
4393 default initializer, rather than using gfc_default_initializer.
4395 2007-02-02 Steven G. Kargl <kargl@gcc.gnu.org>
4398 * resolve.c (resolve_generic_f): Check for non-NULL sym.
4400 2007-02-02 Roger Sayle <roger@eyesopen.com>
4402 * trans.c (gfc_build_array_ref): Use STRIP_TYPE_NOPS to eliminate
4403 NON_LVALUE_EXPR nodes and useless type conversions.
4405 2007-02-02 Paul Thomas <pault@gcc.gnu.org>
4409 * trans-expr.c (gfc_conv_aliased_arg): Remove static attribute
4410 from function and make sure that substring lengths are
4412 (is_aliased_array): Remove static attribute.
4413 * trans.c : Add prototypes for gfc_conv_aliased_arg and
4415 * trans-io.c (set_internal_unit): Add the post block to the
4416 arguments of the function. Use is_aliased_array to check if
4417 temporary is needed; if so call gfc_conv_aliased_arg.
4418 (build_dt): Pass the post block to set_internal_unit and
4419 add to the block after all io activiy is done.
4421 2007-02-01 Roger Sayle <roger@eyesopen.com>
4423 * trans-array.c (gfc_conv_expr_descriptor): We don't need to use
4424 a temporary array to pass a constant non-character array constructor.
4425 Generalize the descriptor generation code to handle scalarizer
4426 "info" without an array reference.
4428 2007-02-01 Roger Sayle <roger@eyesopen.com>
4430 * dependency.c (gfc_check_dependency) <EXPR_ARRAY>: Implement
4431 dependency checking for array constructors.
4433 2007-02-01 Roger Sayle <roger@eyesopen.com>
4435 * trans-stmt.c (compute_overall_iter_number): Document function
4436 arguments. Generalize "unconditional forall nest with constant
4437 bounds" optimization to eliminate unconditional inner loops with
4440 2007-01-31 Tobias Burnus <burnus@net-b.de>
4443 * interface.c (compare_actual_formal): Check conformance between
4444 actual and VOLATILE dummy arguments.
4445 * symbol.c (gfc_add_volatile): Allow setting of VOLATILE
4446 multiple times in different scopes.
4447 * decl.c (gfc_match_volatile): Search symbol in host association.
4449 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
4451 * simplify.c, trans-array.c: Fix comment typos.
4453 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4455 * invoke.texi (Code Gen Options): Fix abbreviation typo.
4456 * intrinsic.texi (ACCESS, LSHIFT, RSHIFT): Fix typos.
4458 2007-01-30 Steve Ellcey <sje@cup.hp.com>
4461 * trans-types.c (gfc_get_function_type): Do not add void_type_node
4463 * trans-decl.c (create_function_arglist): Change assert.
4465 2007-01-29 Paul Thomas <pault@gcc.gnu.org>
4468 * module.c (read_module): If a symbol is excluded by an ONLY
4469 clause, check to see if there is a symtree already loaded. If
4470 so, attach the symtree to the pointer_info.
4472 2007-01-28 Thomas Koenig <Thomas.Koenig@online.de>
4475 * gfortran.h: Remove gfc_simplify_init_1.
4476 * arith.h: Remove third argument from gfc_compare_string.
4477 * arith.c (gfc_compare_expression): Remove third argument
4478 from call to gfc_compare_string.
4479 (gfc_compare_string): Remove third argument xcoll_table.
4480 Remove use of xcoll_table.
4481 * misc.c (gfc_init_1): Remove call to gfc_simplify_init_1.
4482 * simplify.c (ascii_table): Remove.
4483 (xascii_table): Likewise.
4484 (gfc_simplify_achar): ICE if extract_int fails. Remove use of
4485 ascii_table. Warn if -Wsurprising and value < 0 or > 127.
4486 (gfc_simplify_char): ICE if extract_int fails. Error if
4487 value < 0 or value > 255.
4488 (gfc_simplify_iachar): Remove use of xascii_table.
4489 Char values outside of 0..255 are an ICE.
4490 (gfc_simplify_lge): Remove use of xascii_table.
4491 (gfc_simplify_lgt): Likewise.
4492 (gfc_simplify_lle): Likewise.
4493 (gfc_simplify_llt): Likewise.
4494 (invert_table): Remove.
4495 (gfc_simplify_init_1): Remove.
4497 2007-01-27 Roger Sayle <roger@eyesopen.com>
4499 * trans-stmt.c (forall_info): Replace the next_nest and outer
4500 fields that previously implemented a doubly-linked list with a
4501 single prev_nest field (singly-linked list).
4502 (gfc_trans_nested_forall_loop): The nested_forall_info argument
4503 now denotes the innermost FORALL in the loop nest.
4504 (compute_overall_iter_number): Use prev_nest instead of next_nest.
4505 (gfc_trans_forall_1): Link/cons the new "info" to the head of the
4506 nested_forall_info linked list. Free the current "info" when done.
4508 2007-01-27 Paul Thomas <pault@gcc.gnu.org>
4511 * trans-expr.c (gfc_conv_operator_assign): New function.
4512 * trans.h : Add prototype for gfc_conv_operator_assign.
4513 * trans-stmt.c (gfc_trans_where_assign): Add a gfc_symbol for
4514 a potential operator assignment subroutine. If it is non-NULL
4515 call gfc_conv_operator_assign instead of the first assignment.
4516 ( gfc_trans_where_2): In the case of an operator assignment,
4517 extract the argument expressions from the code for the
4518 subroutine call and pass the symbol to gfc_trans_where_assign.
4519 resolve.c (resolve_where, gfc_resolve_where_code_in_forall,
4520 gfc_resolve_forall_body): Resolve the subroutine call for
4521 operator assignments.
4523 2007-01-26 Steven Bosscher <stevenb.gcc@gmail.com>
4524 Steven G. Kargl <kargl@gcc.gnu.org>
4527 * fortran/io.c (next_char): Deal with backslash escaped characters.
4528 Issue warnings in non -std=gnu cases.
4529 * fortran/primary.c (next_string_char): Issue warnings in non
4531 2007-01-26 Tobias Burnus <burnus@net-b.de>
4533 * lang-specs.h: Add support for .f03 and .F03 extensions.
4534 * gfortran.texi: Document .f03 extension.
4535 * options.c (form_from_filename): Recognize .f03.
4537 2007-01-25 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4540 * lang.opt (Wall): Remove RejectNegative.
4541 * options.c (gfc_handle_option): Wall can be disabled.
4542 (set_Wall): Add a parameter for disabling Wall.
4544 2007-01-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4547 * scanner.c (load_line): Remove check fot ctrl-z and don't gobble.
4549 2007-01-23 Paul Thomas <pault@gcc.gnu.org>
4552 * match.c (gfc_match_namelist): Add check for assumed size character
4553 in namelist and provide error if found.
4555 2007-01-21 Brooks Moses <brooks.moses@codesourcery.com>
4557 * intrinsic.texi (ACHAR): Added cross-references.
4558 (CHAR): Put cross-references in alphabetical order.
4559 (IACHAR): Added cross-references.
4560 (ICHAR): Added cross-references.
4562 2007-01-20 Brooks Moses <brooks.moses@codesourcery.com>
4564 * intrinsic.texi: Edited all "Syntax" examples to a consistent form.
4565 (MAXVAL): Corrected description of result characteristics.
4567 (UMASK): Added documentation.
4569 2007-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
4571 * openmp.c, matchexp.c, module.c, scanner.c, resolve.c, st.c,
4572 parse.c, primary.c, options.c, misc.c, simplify.c: Next installment
4573 in the massive whitespace patch.
4575 2007-01-20 Roger Sayle <roger@eyesopen.com>
4577 * module.c (mio_array_ref): The dimen_type fields of an array ref
4578 are an enumerated type and can't be read/written directly with a
4579 call to mio_integer. Instead loop over and cast each element.
4581 2007-01-20 Roger Sayle <roger@eyesopen.com>
4583 * dependency.c (gfc_full_array_ref_p): Check that ref->next is NULL,
4584 i.e. that the ARRAY_REF doesn't mention components.
4585 * trans-array.c (gfc_constant_array_constructor_p): Export external
4586 function renamed from constant_array_constructor_p.
4587 (gfc_build_constant_array_constructor): Export.
4588 (gfc_trans_array_constructor): Update call to the renamed function
4589 constant_array_constructor_p.
4590 * trans-array.h (gfc_constant_array_constructor_p): Prototype here.
4591 (gfc_build_constant_array_constructor): Likewise.
4592 * trans-expr.c (gfc_build_memcpy_call): New helper function split
4593 out from gfc_trans_array_copy.
4594 (gfc_trans_array_copy): Use gfc_build_memcpy_call.
4595 (gfc_trans_array_constructor_copy): New function to optimize
4596 assigning an entire array from a constant array constructor.
4597 (gfc_trans_assignment): Call gfc_trans_array_constructor_copy
4600 2007-01-20 Roger Sayle <roger@eyesopen.com>
4602 * trans-intrinsic.c (gfc_conv_intrinsic_sign): New branchless
4603 implementation for the SIGN intrinsic with integral operands.
4604 (gfc_conv_intrinsic_minmax): Fix whitespace.
4606 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4608 * gfortran.h (gfc_options_t): Add flag_allow_leading_underscore.
4609 * lang.opt: Add -fallow-leading-underscore.
4610 * match.c (gfc_match_name): Allow leading underscore in symbol
4611 name if -fallow-leading-underscore is used.
4612 * symbol.c (gfc_get_default_type): Add special case for symbol
4613 names beginning with an underscore.
4614 * trans-decl.c (gfc_get_extern_function_decl,
4615 gfc_build_intrinsic_function_decls): Add _gfortran prefix to
4616 library symbols selected_int_kind, selected_real_kind and
4618 * options.c (gfc_init_options, gfc_handle_option): Handle the
4619 new -fallow-leading-underscore option.
4621 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4624 * options.c (gfc_handle_module_path_options): Path used in -J
4625 option is now added to the module search path.
4627 2007-01-20 Richard Guenther <rguenther@suse.de>
4630 * f95-lang.c (gfc_init_builtin_functions): Provide cbrt and
4631 cexpi builtins if we have TARGET_C99_FUNCTIONS. Provide
4632 sincos builtins if the target has sincos.
4634 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
4636 * intrinsic.texi (MATMUL): Corrected a typo.
4637 (MAX): Separated @var arguments.
4638 (MIN): Separated @var arguments.
4640 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
4642 * intrinsic.texi: general whitespace cleanup.
4643 (menu): Added TIME8, removed UNMASK.
4644 (AINT): Clarified argument requirement.
4645 (ANINT): Clarified argument requirement.
4646 (CEILING): Clarified argument requirement.
4647 (CHAR): Clarified argument requirement.
4648 (CMPLX): Clarified argument requirement.
4649 (DCMPLX): Clarified argument requirement.
4650 (FGET): Line rewrapping.
4651 (FLOOR): Clarified argument requirement.
4652 (GMTIME): Added documentation.
4653 (IAND): Added cross-reference.
4654 (IBCLR): Added cross-reference.
4655 (IBSET): Added cross-reference.
4656 (IEOR): Added cross-reference.
4657 (INT): Collapsed examples, clarified argument requirement.
4658 (IOR): Added cross-references.
4659 (LEN_TRIM): Corrected result kind.
4660 (LINK): Added cross-reference.
4661 (LLT): Removed "documentation pending".
4662 (LOGICAL): Added documentation.
4663 (LSHIFT): Added documentation.
4664 (LTIME): Added documentation.
4665 (MATMUL): Added documentation.
4666 (MAX): Added documentation.
4667 (MAXLOC): Added documentation.
4668 (MAXVAL): Added documentation.
4669 (MERGE): Added documentation.
4670 (MIN): Added documentation.
4671 (MINLOC): Added documentation.
4672 (MINVAL): Added documentation.
4673 (MVBITS): Moved to correct place, added documentation.
4674 (NOT): Added documentation.
4675 (PERROR): Added documentation.
4676 (RAN): Moved to correct place, added documentation.
4677 (REAL): Clarified argument requirement.
4678 (RENAME): Added documentation.
4679 (RSHIFT): Clarified argument requirement.
4680 (SIGN): Corrected table specification.
4681 (SYMLNK): Added documentation.
4682 (SYSTEM): Added documentation.
4683 (TIME): Added documentation.
4684 (TIME8): Added section and documentation.
4685 (UNMASK): Removed erroneous section.
4687 2007-01-18 H.J. Lu <hongjiu.lu@intel.com>
4689 * trans-stmt.c (compute_overall_iter_number): Fix a typo.
4691 2007-01-18 Roger Sayle <roger@eyesopen.com>
4693 * trans-expr.c (copyable_array_p): Consider user derived types without
4694 allocatable components to be copyable.
4696 2007-01-18 Roger Sayle <roger@eyesopen.com>
4698 * trans-stmt.c (compute_overall_iter_number): Enhance to precompute
4699 the number of interations in unconditional FORALL nests with constant
4702 2007-01-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4703 Tobias Burnus <burnus@net-b.de>
4706 * gfortran.h (gfc_option_t): Add flag_dump_core.
4707 * lang.opt: Add -fdump-core option.
4708 * invoke.texi: Document the new options.
4709 * trans-decl.c (gfc_build_builtin_function_decls): Add new
4710 options to the call to set_std.
4711 * options.c (gfc_init_options, gfc_handle_option): Set the
4714 2007-01-17 Paul Thomas <pault@gcc.gnu.org>
4717 * module.c (load_generic_interfaces): Make the marking of the
4718 symbol as ambiguous conditional on the module names being
4720 (write_generic): Ensure that the generic interface has a
4721 non-NULL module field.
4723 2007-01-16 Roger Sayle <roger@eyesopen.com>
4726 * trans-stmt.c (forall_info): Remove pmask field.
4727 (gfc_trans_forall_loop): Remove NVAR argument, instead assume that
4728 NVAR covers all the interation variables in the current forall_info.
4729 Add an extra OUTER parameter, which specified the loop header in
4730 which to place mask index initializations.
4731 (gfc_trans_nested_forall_loop): Remove NEST_FLAG argument.
4732 Change the semantics of MASK_FLAG to only control the mask in the
4734 (compute_overall_iter_number): Optimize the trivial case of a
4735 top-level loop having a constant number of iterations. Update
4736 call to gfc_trans_nested_forall_loop. Calculate the number of
4737 times the inner loop will be executed, not to size of the
4739 (allocate_temp_for_forall_nest_1): Reuse SIZE as BYTESIZE when
4740 sizeof(type) == 1. Tidy up.
4741 (gfc_trans_assign_need_temp): Remove NEST_FLAG argument from calls
4742 to gfc_trans_nested_forall_loop.
4743 (gfc_trans_pointer_assign_need_temp): Likewise.
4744 (gfc_trans_forall_1): Remove unused BYTESIZE, TMPVAR, SIZEVAR and
4745 LENVAR local variables. Split mask allocation into a separate
4746 hunk/pass from mask population. Use allocate_temp_for_forall_nest
4747 to allocate the FORALL mask with the correct size. Update calls
4748 to gfc_trans_nested_forall_loop.
4749 (gfc_evaluate_where_mask): Update call to
4750 gfc_trans_nested_forall_loop.
4751 (gfc_trans_where_2): Likewise.
4753 2007-01-15 Paul Thomas <pault@gcc.gnu.org>
4756 * trans-stmt.c (gfc_trans_call): If it does not have one, get
4757 a backend_decl for an alternate return.
4760 * resolve.c (pure_function): Statement functions are pure. Note
4761 that this will have to recurse to comply fully with F95.
4764 * resolve.c (resolve_function): Only a reference to the final
4765 dimension of an assumed size array is an error in an inquiry
4769 * resolve.c (resolve_function): Make sure that the function
4770 expression has a type.
4772 2007-01-14 Paul Thomas <pault@gcc.gnu.org>
4775 * trans-decl.c (gfc_sym_mangled_function_id): Module, external
4776 symbols must not have the module name prepended.
4778 2007-01-11 Thomas Koenig <Thomas.Koenig@online.de>
4781 * iresolve.c (gfc_resolve_maxloc): If the rank
4782 of the return array is nonzero and we process an
4783 integer array smaller than default kind, coerce
4784 the array to default integer.
4785 * iresolve.c (gfc_resolve_minloc): Likewise.
4787 2007-01-11 Brooks Moses <brooks.moses@codesourcery.com>
4789 * simplify.c: Update copyright to 2007.
4792 2007-01-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4795 * scanner.c (gfc_release_include_path): Free gfc_option.module_dir
4798 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
4800 * simplify.c (gfc_simplify_ibclr): Fix POS comparison.
4801 (gfc_simplify_ibset): Same.
4803 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
4807 * simplify.c (convert_mpz_to_unsigned): New function.
4808 (convert_mpz_to_signed): New function, largely based on
4810 (twos_complement): Removed.
4811 (gfc_simplify_ibclr): Add conversions to and from an
4812 unsigned representation before bit-twiddling.
4813 (gfc_simplify_ibset): Same.
4814 (gfc_simplify_ishftc): Add checks for overly large
4815 constant arguments, only check the third argument if
4816 it's present, carry over high bits into the result as
4817 appropriate, and perform the final conversion back to
4818 a signed representation using the correct sign bit.
4819 (gfc_simplify_not): Removed unnecessary masking.
4821 2007-01-09 Paul Thomas <pault@gcc.gnu.org>
4824 * resolve.c (resolve_code): Use the code->expr character length
4825 directly to set length of llen.
4827 2007-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4830 * lang.opt: Add Wcharacter_truncation option.
4831 * options.c (gfc_init_options): Initialize
4832 gfc_option.warn_character_truncation to zero.
4833 (gfc_handle_option): Add case for OPT_Wcharacter_truncation.
4835 2007-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
4837 * interface.c, intrinsic.c, gfortranspec.c, io.c, f95-lang.c,
4838 iresolve.c, match.c: Update Copyright years. Whitespace.
4840 2007-01-08 Richard Guenther <rguenther@suse.de>
4842 * trans-io.c (transfer_array_desc): Use build_int_cst instead
4845 2007-01-08 Roger Sayle <roger@eyesopen.com>
4847 * trans-array.c (constant_array_constructor_p): New function to
4848 determine whether an array constructor consists only of constant
4849 elements, and if so return it's size.
4850 (gfc_build_constant_array_constructor): Construct a statically
4851 initialized gfortran array for a given EXPR_ARRAY.
4852 (gfc_trans_constant_array_constructor): Efficiently scalarize
4853 a constant array constructor.
4854 (gfc_trans_array_constructor): Tidy up use of CONST_STRING.
4855 Special case scalarization of constant array constructors, all of
4856 whose elements are specified, using constant_array_constructor_p
4857 and gfc_trans_constant_array_constructor.
4858 (gfc_conv_scalarized_array_ref): Check whetger info->offset is zero
4859 before adding it to index, to avoid creating a NON_LVALUE_EXPR.
4861 2007-01-08 Kazu Hirata <kazu@codesourcery.com>
4863 gfortran.texi: Fix typos.
4865 2007-01-07 Steven G. Kargl <kargl@gcc.gnu.org>
4867 * decl.c, dump-parse-tree.c, error.c, data.c, expr.c, dependency.c,
4868 convert.c: Update Copyright dates. Fix whitespace.
4870 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
4872 * data.c (gfc_assign_data_value): Fix whitespace.
4874 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
4876 * trans-array.c (gfc_trans_create_temp_array, gfc_array_init_size):
4877 Commentary typo fix.
4879 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
4882 * match.c (gfc_match_name): Print diagnostics for invalid
4885 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
4887 * array.c: Fix whitespace in comment table.
4889 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
4891 * array.c, bbt.c, check.c: Update copyright years. Whitespace.
4893 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
4895 * arith.c: Update copyright years. Whitespace.
4897 2007-01-05 Roger Sayle <roger@eyesopen.com>
4899 * trans-expr.c (gfc_trans_assignment_1): New subroutine to scalarize
4900 array assignments split out from gfc_trans_assignment.
4901 (gfc_trans_array_copy): New function to implement array to array
4902 copies via calls to __builtin_memcpy.
4903 (copyable_array_p): New helper function to identify an array of
4904 simple/POD types, that may be copied/assigned using memcpy.
4905 (gfc_trans_assignment): Use gfc_trans_array_copy to handle simple
4906 whole array assignments considered suitable by copyable_array_p.
4907 Invoke gfc_trans_assignment_1 to perform the fallback scalarization.
4909 2007-01-05 Roger Sayle <roger@eyesopen.com>
4911 * trans-array.c (gfc_trans_array_constructor_value): Make the
4912 static const "data" array as TREE_READONLY.
4913 * trans-stmt.c (gfc_trans_character_select): Likewise.
4915 2007-01-05 Roger Sayle <roger@eyesopen.com>
4917 * trans-array.c (gfc_conv_loop_setup): Test whether the loop
4918 stride is one, to avoid fold_build2 introducing a useless
4919 NON_LVALUE_EXPR node.
4921 2007-01-05 Tobias Burnus <burnus@net-b.de>
4923 * symbol.c (check_conflict): Fix error message.
4925 2007-01-05 Paul Thomas <pault@gcc.gnu.org>
4928 * decl.c (gfc_in_match_data, gfc_set_in_match_data): New
4929 functions to signal that a DATA statement is being matched.
4930 (gfc_match_data): Call gfc_set_in_match_data on entry and on
4932 * gfortran.h : Add prototypes for above.
4933 * expr.c (check_init_expr): Avoid check on parameter or
4934 variable if gfc_in_match_data is true.
4935 (gfc_match_init_expr): Do not call error on non-reduction of
4936 expression if gfc_in_match_data is true.
4940 * decl.c (gfc_set_constant_character_len): Add boolean arg to
4941 flag array constructor resolution. Warn if string is being
4942 truncated. Standard dependent error if string is padded. Set
4943 new arg to false for all three calls to
4944 gfc_set_constant_character_len.
4945 * match.h : Add boolean arg to prototype for
4946 gfc_set_constant_character_len.
4947 * gfortran.h : Add warn_character_truncation to gfc_options.
4948 * options.c (set_Wall): Set warn_character_truncation if -Wall
4950 * resolve.c (resolve_code): Warn if rhs string in character
4951 assignment has to be truncated.
4952 * array.c (gfc_resolve_character_array_constructor): Set new
4953 argument to true for call to gfc_set_constant_character_len.
4955 2007-01-05 Tobias Burnus <burnus@net-b.de>
4958 * interface.c (compare_parameter_intent): New function.
4959 (check_intents): Support pointer intents.
4960 * symbol.c (check_conflict): Support pointer intents,
4961 better conflict_std message.
4962 * expr.c (gfc_check_assign,gfc_check_pointer_assign):
4963 Support pointer intents.
4964 * resolve.c (resolve_deallocate_expr,resolve_allocate_expr):
4965 Support pointer intents.
4967 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
4970 * check.c (gfc_check_kill_sub): Add checks for non-scalar
4973 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
4975 * intrinsic.texi: Minor cleanup, reflowing overlong
4976 paragraphs, and correcting whitespace.
4978 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
4980 * intrinsic.texi (LBOUND): Add documentation.
4981 (LGE): Add documentation.
4982 (LGT): Add documentation.
4983 (LINK): Add documentation.
4984 (LLE): Add documentation.
4985 (LLT): Add documentation.
4986 (LNBLNK): Add documentation.
4987 (UBOUND): Add documentation.
4988 (UNLINK): Add documentation.
4990 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
4992 * intrinsic.texi (IAND): Clarify argument specifications.
4993 (IBCLR): Add documentation.
4994 (IBITS): Add documentation.
4995 (IBSET): Add documentation.
4996 (IEOR): Add documentation.
4997 (IERRNO): Add documentation.
4998 (INDEX): Add documentation.
4999 (IOR): Add documentation.
5000 (ISHFT): Add documentation.
5001 (ISHFTC): Add documentation.
5002 (KILL): Add documentation.
5003 (LEN_TRIM): Add documentation.
5005 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
5008 * interface.c (compare_actual_formal): check for
5009 alternate returns when iterating over non-present
5012 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
5014 * invoke.texi: Update manpage copyright to include 2007.
5016 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
5018 * gfortran.texi: Update copyright to include 2007.
5019 * intrinsic.texi: Update copyright to include 2007.
5020 * invoke.texi: Update copyright to include 2007.
5022 2007-01-02 Tobias Burnus <burnus@net-b.de>
5023 Jakub Jelinek <jakub@redhat.com>
5026 * scanner.c (open_included_file): Revert patch.
5027 (gfc_open_included_file): Support absolute pathnames.
5028 (gfc_open_intrinsic_module): Support absolute pathnames.
5030 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
5032 * gfortran.texi (GNU Fortran and GCC): Rewrite
5034 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
5036 * gfortran.texi (Introduction): Lower "Part I:
5037 Introduction" to a chapter, renumber Parts II and III to
5039 * intrinsic.texi (Introduction): Rename to "Introduction
5040 to Intrinsics" to avoid conflict with the new chapter.
5042 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
5044 * intrinsic.texi (Introduction): Rewrite first paragraph.
5046 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
5048 * invoke.texi (OpenMP): Added index entry.
5049 * gfortran.texi (title page): Removed erroneous '*'.
5051 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
5053 * gfortran.texi (GFORTRAN_DEFAULT_RECL): Added units
5055 (Extensions): Miscellaneous minor rewriting and copyediting.
5056 (BOZ-literal constants): Renamed from Hexadecimal constants.
5057 (Hollerith constants support): Added explanation and
5058 suggestions for standard-conforming modern equivalents.
5060 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
5062 * intrinsic.texi: Improvements to index entries; change
5063 @findex entries to @cindex entries.
5064 * invoke.texi: Standardize and improve index entries.
5065 * gfortran.texi: Fix @code in one index entry.
5067 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
5069 * invoke.texi: Change @code-type macros to appropriate
5070 variants (@command, @option, etc.)
5071 * gfortran.texi: Same.
5073 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
5075 * intrinsic.texi: Various minor cleanups.
5077 2007-01-02 Steven G. Kargl <kargls@comcast.net>
5079 * trans-intrinsic.c (gfc_conv_intrinsic_ibits): Fix call to
5082 2007-01-02 Tobias Burnus <burnus@net-b.de>
5085 * scanner.c (open_included_file): Support full-path filenames.
5087 2007-01-02 Paul Thomas <pault@gcc.gnu.org>
5090 * interface.c (check_sym_interfaces): Remove call to
5091 resolve_global_procedure.
5092 gfortran.h : Remove prototype for resolve_global_procedure.
5093 resolve.c (resolve_global_procedure): Add static attribute
5094 to function declaration.
5096 2007-01-01 Steven G. Kargl <kargls@comcast.net>
5098 * ChangeLog: Copy to ...
5099 * ChangeLog-2006: here.