1 2009-04-08 Janne Blomqvist <jb@gcc.gnu.org>
4 * invoke.texi (fdollar-ok): Fix typo.
6 2009-04-08 Daniel Franke <franke.daniel@gmail.com>
9 * invoke.texi (fdollar-ok): Clarify limitations.
11 2009-04-08 Paul Thomas <pault@gcc.gnu.org>
14 * trans-array.c (gfc_trans_deferred_array): Return if this
17 2009-04-07 Janus Weil <janus@gcc.gnu.org>
20 * trans-decl.c (gfc_get_symbol_decl): Correctly set decl location for
21 procedure pointer decls.
23 2009-04-07 Janus Weil <janus@gcc.gnu.org>
26 * expr.c (gfc_check_pointer_assign): Enable interface check for
28 * gfortran.h: Add copy_formal_args_intr.
29 * interface.c (gfc_compare_interfaces): Call gfc_compare_intr_interfaces
30 if second argument is an intrinsic.
31 (compare_intr_interfaces): Correctly set attr.function, attr.subroutine
33 (compare_parameter): Call gfc_compare_interfaces also for intrinsics.
34 * resolve.c (resolve_specific_f0,resolve_specific_s0): Don't resolve
35 intrinsic interfaces here. Must happen earlier.
36 (resolve_symbol): Resolution of intrinsic interfaces moved here from
37 resolve_specific_..., and formal args are now copied from intrinsic
39 * symbol.c (copy_formal_args_intr): New function to copy the formal
40 arguments from an intinsic procedure.
42 2009-04-06 Paul Thomas <pault@gcc.gnu.org>
45 * dependency.c (ref_same_as_full_array): New function.
46 (gfc_dep_resolver): Call it.
48 2009-04-06 Janus Weil <janus@gcc.gnu.org>
51 * decl.c (match_procedure_decl): Fix double declaration problems with
53 * symbol.c (gfc_add_type): Ditto.
55 2009-04-06 Paul Thomas <pault@gcc.gnu.org>
58 * trans-array.c (gfc_conv_array_ref): If the symbol has the
59 temporary attribute use the array_spec for the bounds.
60 * gfortran.h : Add the temporary field to the structure
62 * trans-stmt.c (forall_make_variable_temp): Set the symbol's
65 2009-04-05 Daniel Franke <franke.daniel@gmail.com>
68 * trans-array.c (gfc_trans_array_constructor_value): Shadow
69 implied do-loop variable to avoid spurious middle-end warnings.
71 2009-04-04 Tobias Burnus <burnus@net-b.de>
74 * trans-decl.c (gfc_generate_function_code): Move recursive
75 check to the right position.
77 2009-04-04 Paul Thomas <pault@gcc.gnu.org>
80 * trans-common.c (translate_common): Do not offset the whole
83 2009-04-03 Tobias Burnus <burnus@net-b.de>
86 * resolve.c (resolve_common_vars): Add FL_VARIABLE to symbol
87 if it is not a procedure pointer.
88 * primary.c (match_actual_arg): Ditto.
90 2009-03-31 Joseph Myers <joseph@codesourcery.com>
93 * cpp.c (cb_cpp_error): Handle CPP_DL_FATAL.
95 2009-03-30 Steven G. Kargl <kargls@comcast.net>
98 * trans-stmt.c(gfc_trans_allocate): Add translation of ERRMSG.
99 (gfc_trans_deallocate): Add translation of ERRMSG. Remove stale
100 comments. Minor whitespace cleanup.
101 * resolve.c(is_scalar_expr_ptr): Whitespace cleanup.
102 (resolve_deallocate_expr (gfc_expr *e): Update error message.
103 (resolve_allocate_expr): Remove dead code. Update error message.
104 Move error checking to ...
105 (resolve_allocate_deallocate): ... here. Add additional error
106 checking for STAT, ERRMSG, and allocate-objects.
107 * match.c(gfc_match_allocate,gfc_match_deallocate): Parse ERRMSG.
108 Check for redundant uses of STAT and ERRMSG. Reword error message
109 and add checking for pointer, allocatable, and proc_pointer attributes.
111 2009-03-30 Paul Thomas <pault@gcc.gnu.org>
116 * symbol.c : Add gfc_global_ns_list.
117 * decl.c (add_global_entry): Set the namespace ('ns') field.
118 * gfortran.h : Add the resolved field to gfc_namespace. Add the
119 namespace ('ns') field to gfc_gsymbol. Add flag_whole_file to
120 gfc_option_t. Add the prototype for gfc_free_dt_list.
121 * lang.opt : Add the whole-file option.
122 * invoke.texi : Document the whole-file option.
123 * resolve.c (resolve_global_procedure): If the fwhole-file
124 option is set, reorder gsymbols to ensure that translation is
125 in the right order. Resolve the gsymbol's namespace if that
126 has not occurred and then check interfaces.
127 (resolve_function): Move call to resolve_global_procedure.
128 (resolve_call): The same.
129 (resolve_codes): Store the current labels_obstack.
130 (gfc_resolve) : Return if the namespace is already resolved.
131 trans-decl.c (gfc_get_extern_function_decl): If the whole_file
132 option is selected, use the backend_decl of a gsymbol, if it is
134 parse.c (add_global_procedure, add_global_program): If the flag
135 whole-file is set, add the namespace to the gsymbol.
136 (gfc_parse_file): On -fwhole-file, put procedure namespaces on
137 the global namespace list. Rearrange to do resolution of all
138 the procedures in a file, followed by their translation.
139 * options.c (gfc_init_options): Add -fwhole-file.
140 (gfc_handle_option): The same.
142 2009-03-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
144 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_HUGE_VAL
145 family of intrinsics instead of BUILT_IN_INF family.
146 * trans-intrinsics.c (gfc_conv_intrinsic_nearest): Use
147 BUILT_IN_HUGE_VAL instead of BUILT_IN_INF.
149 2009-03-30 Jakub Jelinek <jakub@redhat.com>
151 * trans-types.c (gfc_sym_type, gfc_return_by_reference): For
152 sym->attr.result check sym->ns->proc_name->attr.is_bind_c.
154 2009-03-30 Joseph Myers <joseph@codesourcery.com>
156 PR rtl-optimization/323
157 * options.c (gfc_post_options): Set
158 flag_excess_precision_cmdline. Give an error for
159 -fexcess-precision=standard for processors where the option is
162 2009-03-29 Joseph Myers <joseph@codesourcery.com>
164 PR preprocessor/34695
165 * cpp.c (cb_cpp_error): New.
166 (gfc_cpp_post_options): Don't set cpp_option->inhibit_warnings.
167 Don't check cpp_errors (cpp_in).
168 (gfc_cpp_init_0): Set cb->error.
170 2009-03-29 Steven G. Kargl <kargl@gcc.gnu.org>
173 * gfortran.h: Add ARITH_PROHIBIT to arith enum.
174 expr.c (gfc_match_init_expr): Add global variable init_flag to
175 flag matching an initialization expression.
176 (check_intrinsic_op): Move no longer reachable error message to ...
177 * arith.c (arith_power): ... here. Remove gfc_ prefix in
178 gfc_arith_power. Use init_flag. Allow constant folding of x**y
179 when y is REAL or COMPLEX.
180 (eval_intrinsic): Remove restriction that y in x**y must be INTEGER
181 for constant folding.
182 * gfc_power: Update gfc_arith_power to arith_power
184 2009-03-29 Daniel Kraft <d@domob.eu>
187 * gfortran.h (struct gfc_typebound_proc): Added new flag `deferred' and
188 added a comment explaining DEFERRED binding handling.
189 * decl.c (match_binding_attributes): Really match DEFERRED attribute.
190 (match_procedure_in_type): Really match PROCEDURE(interface) syntax
191 and do some validity checks for DEFERRED and this construct.
192 * module.c (binding_overriding): New string constant for DEFERRED.
193 (mio_typebound_proc): Module-IO DEFERRED flag.
194 * resolve.c (check_typebound_override): Ensure that a non-DEFERRED
195 binding is not overridden by a DEFERRED one.
196 (resolve_typebound_procedure): Allow abstract interfaces as targets
197 for DEFERRED bindings.
198 (ensure_not_abstract_walker), (ensure_not_abstract): New methods.
199 (resolve_fl_derived): Use new `ensure_not_abstract' method for
200 non-ABSTRACT types extending ABSTRACT ones to ensure each DEFERRED
201 binding is overridden.
202 (check_typebound_baseobject): New method.
203 (resolve_compcall), (resolve_typebound_call): Check base-object of
204 the type-bound procedure call.
205 * gfc-internals.texi (Type-bound procedures): Document a little bit
206 about internal handling of DEFERRED bindings.
208 2008-03-29 Tobias Schlüter <tobi@gcc.gnu.org>
211 * gfortran.h (gfc_st_label): Fix comment.
212 (gfc_exec_op): Add statement code EXEC_END_BLOCK for end of block.
213 * parse.c (accept_statement): Use EXEC_END_BLOCK for END IF and
214 END SELECT with labels.
215 (check_do_closure): Fix formatting.
216 (parse_do_block): Fix typo in error message.
217 * resolve.c (code_stack): Remove tail member. Update comment to
218 new use of reachable_labels.
219 (reachable_labels): Rename to ...
220 (find_reachable_labels): ... this. Overhaul. Update preceding
222 (resolve_branch): Fix comment preceding function. Rewrite.
223 (resolve_code): Update call to find_reachable_labels. Add code to
224 deal with EXEC_END_BLOCK.
225 * st.c (gfc_free_statement): Add code to deal with EXEC_END_BLOCK.
226 Add 2009 to copyright years.
227 * trans.c (gfc_trans_code): Likewise on both counts.
229 2009-03-31 Paul Thomas <pault@gcc.gnu.org>
232 * expr.c (gfc_check_assign): Allow pointer components when
236 * resolve.c (check_data_variable): Treat pointer arrays with
239 2009-03-31 Paul Thomas <pault@gcc.gnu.org>
242 * trans-expr.c (gfc_trans_assignment_1): Ensure temporaries
243 have a string_length.
245 2009-03-28 Tobias Burnus <burnus@net-b.de>
248 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do):
249 Add GFC_RTCHECK_DO support.
250 * option.c (gfc_handle_runtime_check_option): Enable GFC_RTCHECK_DO.
251 * invoke.texi (-fcheck): Document "do" option.
253 2009-03-28 Paul Thomas <pault@gcc.gnu.org>
256 * trans-array.c (get_elemental_fcn_charlen): Remove.
257 (get_array_charlen): New function to replace previous.
259 2009-03-28 Paul Thomas <pault@gcc.gnu.org>
262 * parse.c (parse_derived): Do not break on finding pointer,
263 allocatable or private components.
265 2009-03-28 Tobias Burnus <burnus@net-b.de>
268 * option.c (gfc_handle_runtime_check_option): Enable recursion check.
269 * trans-decl.c (gfc_generate_function_code): Add recursion check.
270 * invoke.texi (-fcheck): Add recursive option.
272 2009-03-28 Tobias Burnus <burnus@net-b.de>
275 * resolve.c (gfc_resolve_iterator): Add zero-loop warning.
277 2009-03-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
278 Paul Thomas <pault@gcc.gnu.org>
279 Tobias Burnus <burnus@net-b.de>
281 * gfortran.h (gfc_option_t): Add rtcheck.
282 * lang.opt: New option -fcheck.
283 * libgfortran.h: Add GFC_RTCHECK_* constants.
284 * invoke.texi: Document -fcheck.
285 * options.c (gfc_handle_runtime_check_option): New function.
286 (gfc_init_options,gfc_post_options,gfc_handle_option):
289 2009-03-27 Richard Guenther <rguenther@suse.de>
291 * trans-array.c (gfc_conv_descriptor_data_addr): Use
292 gfc_build_addr_expr instead of build_fold_addr_expr.
293 (gfc_trans_allocate_array_storage, gfc_trans_array_constructor_value,
294 gfc_trans_constant_array_constructor, gfc_conv_array_data,
295 gfc_conv_expr_descriptor, gfc_conv_array_parameter): Likewise.
296 * trans-expr.c (gfc_conv_missing_dummy, gfc_conv_variable,
297 gfc_conv_function_val, gfc_conv_operator_assign,
298 gfc_conv_subref_array_arg, gfc_conv_function_call,
299 gfc_conv_expr_reference, gfc_trans_scalar_assign): Likewise.
300 * trans-intrinsic.c (gfc_conv_intrinsic_exponent,
301 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
302 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax_char,
303 gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_spacing,
304 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_set_exponent,
305 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
306 gfc_conv_intrinsic_si_kind, gfc_conv_intrinsic_trim): Likewise.
307 * trans-io.c (gfc_trans_io_runtime_check, set_parameter_ref,
308 gfc_convert_array_to_string, gfc_trans_open, gfc_trans_close,
309 build_filepos, gfc_trans_inquire, gfc_trans_wait,
310 nml_get_addr_expr, transfer_namelist_element, build_dt,
311 gfc_trans_dt_end, transfer_array_component, transfer_expr,
312 transfer_array_desc, gfc_trans_transfer): Likewise.
313 * trans-stmt.c (gfc_trans_allocate, gfc_trans_deallocate): Likewise.
314 * trans.c (gfc_build_addr_expr): Mark the base of the address
317 2009-03-27 Tobias Burnus <burnus@net-b.de>
319 * gfortran.h (enum init_local_real.): Add GFC_INIT_REAL_SNAN.
320 (gfc_expr): Add is_snan.
321 * trans-const.c (gfc_conv_mpfr_to_tree): Support SNaN.
322 (gfc_conv_constant_to_tree): Update call to gfc_conv_mpfr_to_tree.
323 * trans-const.h (gfc_conv_mpfr_to_tree): Update prototype.
324 * resolve.c (build_default_init_expr): Update call.
325 * target-memory.c (encode_float): Ditto.
326 * trans-intrinsic.c (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod,
328 2009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
330 * lang.opt: Unify help texts for -I, -Wconversion, -d, -fopenmp,
333 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
335 * simplify.c (gfc_simplify_transfer): Zero-initialize the
338 2009-02-27 Tobias Burnus <burnus@net-b.de>
341 * module.c (read_md5_from_module_file): Add missing quote.
343 2009-02-27 Tobias Burnus <burnus@net-b.de>
346 * module.c (read_md5_from_module_file): Include mod version
349 2009-02-26 Paul Thomas <pault@gcc.gnu.org>
352 * interface.c (compare_type_rank_if): Return 1 if the symbols
353 are the same and deal with external procedures where one is
354 identified to be a function or subroutine by usage but the
357 2009-02-26 Paul Thomas <pault@gcc.gnu.org>
360 * trans-array.c (gfc_conv_array_initializer): Convert all
361 expressions rather than ICEing.
363 2009-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
366 * array.c (ref_dimen_size): Rename to gfc_ref_dimen_size,
367 make global. Change function name in error messages.
368 (ref_size): Change ref_dimen_size to gfc_ref_dimen_size.
369 (gfc_array_ref_shape): Likewise.
370 * gfortran.h: Add prototype for gfc_ref_dimen_size.
371 * simplify.c (simplify_bound_dim): Add ref argument.
372 If the reference isn't a full array, return one for
373 the lower bound and the extent for the upper bound.
374 (simplify_bound): For array sections, take as from the
375 argument. Add reference to all to simplify_bound_dim.
377 2009-02-19 Daniel Franke <franke.daniel@gmail.com>
379 * scanner.c (load_line): At end of line, skip '\r' without setting
382 2009-02-18 Daniel Kraft <d@domob.eu>
384 * gfortran.texi: New chapter about compiler characteristics.
385 (Compiler Characteristics): Document KIND type parameters here.
387 2009-02-18 Tobias Burnus <burnus@net-b.de>
389 * intrinsic.texi (MALLOC): Make example more portable.
391 2009-02-13 Mikael Morin <mikael.morin@tele2.fr>
394 * module.c (gfc_dump_module,gfc_use_module): Add module
397 2009-02-13 Paul Thomas <pault@gcc.gnu.org>
401 * trans-expr.c (gfc_conv_function_val): Stabilize Cray-pointer
402 function references to ensure that a valid expression is used.
403 (gfc_conv_function_call): Pass Cray pointers to procedures.
405 2009-02-03 Jakub Jelinek <jakub@redhat.com>
407 * gfortranspec.c (lang_specific_driver): Update copyright notice
410 2009-01-28 Paul Thomas <pault@gcc.gnu.org>
414 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use the array
415 descriptor ubound for UBOUND, when the array lbound == 1.
417 2009-01-27 Daniel Kraft <d@domob.eu>
420 * trans-stmt.c (gfc_conv_elemental_dependencies): Create temporary
421 for the real type needed to make it work for subcomponent-references.
423 2009-01-21 Daniel Kraft <d@domob.eu>
425 * trans-stmt.c (gfc_conv_elemental_dependencies): Cleaned up comment.
427 2009-01-20 Paul Thomas <pault@gcc.gnu.org>
430 * resolve.c (check_host_association): Remove the matching to
431 correct an incorrect host association and use manipulation of
432 the expression instead.
434 2009-01-20 Tobias Burnus <burnus@net-b.de>
436 * invoke.texi (RANGE): RANGE also takes INTEGER arguments.
438 2009-01-19 Mikael Morin <mikael.morin@tele2.fr>
441 * simplify.c (simplify_bound): Don't use array specification
442 if variable or component has subsequent references.
444 2009-01-17 Paul Thomas <pault@gcc.gnu.org>
447 * module.c (write_common_0): Add argument 'this_module' and
448 check that non-use associated common blocks are written first.
449 (write_common): Call write_common_0 twice, once with true and
452 2009-01-17 Paul Thomas <pault@gcc.gnu.org>
455 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Has
456 been absorbed into gfc_conv_intrinsic_transfer. All
457 references to it in trans-intrinsic.c have been changed
458 accordingly. PR fixed by using a temporary for scalar
459 character transfer, when the source is shorter than the
462 2009-01-17 Paul Thomas <pault@gcc.gnu.org>
465 * module.c (write_common_0): Revert patch of 2009-01-05.
467 2009-01-16 Janus Weil <janus@gcc.gnu.org>
470 * expr.c (gfc_check_pointer_assign): Allow use-associated procedure
472 * trans-decl.c (get_proc_pointer_decl,gfc_create_module_variable):
473 Enable procedure pointers as module variables.
475 2009-01-14 Steven G. Kargl <kargl@gcc.gnu.org>
477 * ChangeLog-2007: Clean out svn merge droppings.
479 2009-01-10 Paul Thomas <pault@gcc.gnu.org>
482 * target-memory.c (encode_derived): Encode NULL.
484 2009-01-10 Paul Thomas <pault@gcc.gnu.org>
487 * resolve.c (check_host_association): Use the symtree name to
488 search for a potential contained procedure, since this is the
489 name by which it would be referenced.
491 2009-01-06 Thomas Koenig <tkoenig@gcc.gnu.org>
494 * interface.c (gfc_procedure_use): Don't warn about functions
496 * symbol.c (generate_isocbinding_symbol): Mark c_loc and
499 2009-01-05 Paul Thomas <pault@gcc.gnu.org>
502 * module.c (write_common_0): Use the name of the symtree rather
503 than the common block, to determine if the common has been
506 2009-01-05 Daniel Franke <franke.daniel@gmail.com>
509 * check.c (gfc_check_random_seed): Added size check for GET
510 dummy argument, reworded error messages to follow common pattern.
512 2009-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
515 * trans-types.c (gfc_get_derived_type): Check for the
516 presence of derived->ns->proc_name before
517 accessing derived->ns->proc_name->attr.flavor .
518 * resolve.c (resolve_symbol): Likewise.
520 2009-01-05 Paul Thomas <pault@gcc.gnu.org>
523 * gfortran.h : Add bit to gfc_expr 'user_operator'
524 * interface.c (gfc_extend_expr): Set the above if the operator
525 is substituted by a function.
526 * resolve.c (check_host_association): Return if above is set.
528 2009-01-04 Mikael Morin <mikael.morin@tele2.fr>
531 * ChangeLog-2008: Fix function name.
534 * dependency.c (gfc_check_argument_var_dependency):
535 Move the check for pointerness inside the if block
536 so that it doesn't affect the return value.
539 * trans-stmt.c (gfc_trans_call):
540 Add the dependency code after the loop bounds calculation one.
542 2009-01-04 Daniel Franke <franke.daniel@gmail.com>
544 * intrinsic.c (do_simplify): Removed already implemented TODO.
546 2009-01-04 Daniel Franke <franke.daniel@gmail.com>
549 * simplify.c (gfc_simplify_merge): New.
550 * intrinsic.h (gfc_simplify_merge): New prototype.
551 * intrinsic.c (add_functions): Added simplification for MERGE.
553 2009-01-04 Mikael Morin <mikael.morin@tele2.fr>
556 * gfortran.h (gfc_is_data_pointer): Added prototype
557 * resolve.c (gfc_iso_c_func_interface):
558 Use gfc_is_data_pointer to test for pointer attribute.
559 * dependency.c (gfc_is_data_pointer):
560 Support pointer-returning functions.
562 2009-01-03 Daniel Franke <franke.daniel@gmail.com>
564 * symbol.c (save_symbol): Don't SAVE function results.
566 2009-01-03 Paul Thomas <pault@gcc.gnu.org>
569 * resolve.c (resolve_call): When searching for proper host
570 association, use symtree rather than symbol. For everything
571 except generic subroutines, substitute the symtree in the call
572 rather than the symbol.