1 2009-03-30 Steven G. Kargl <kargls@comcast.net>
4 * trans-stmt.c(gfc_trans_allocate): Add translation of ERRMSG.
5 (gfc_trans_deallocate): Add translation of ERRMSG. Remove stale
6 comments. Minor whitespace cleanup.
7 * resolve.c(is_scalar_expr_ptr): Whitespace cleanup.
8 (resolve_deallocate_expr (gfc_expr *e): Update error message.
9 (resolve_allocate_expr): Remove dead code. Update error message.
10 Move error checking to ...
11 (resolve_allocate_deallocate): ... here. Add additional error
12 checking for STAT, ERRMSG, and allocate-objects.
13 * match.c(gfc_match_allocate,gfc_match_deallocate): Parse ERRMSG.
14 Check for redundant uses of STAT and ERRMSG. Reword error message
15 and add checking for pointer, allocatable, and proc_pointer attributes.
17 2009-03-30 Paul Thomas <pault@gcc.gnu.org>
22 * symbol.c : Add gfc_global_ns_list.
23 * decl.c (add_global_entry): Set the namespace ('ns') field.
24 * gfortran.h : Add the resolved field to gfc_namespace. Add the
25 namespace ('ns') field to gfc_gsymbol. Add flag_whole_file to
26 gfc_option_t. Add the prototype for gfc_free_dt_list.
27 * lang.opt : Add the whole-file option.
28 * invoke.texi : Document the whole-file option.
29 * resolve.c (resolve_global_procedure): If the fwhole-file
30 option is set, reorder gsymbols to ensure that translation is
31 in the right order. Resolve the gsymbol's namespace if that
32 has not occurred and then check interfaces.
33 (resolve_function): Move call to resolve_global_procedure.
34 (resolve_call): The same.
35 (resolve_codes): Store the current labels_obstack.
36 (gfc_resolve) : Return if the namespace is already resolved.
37 trans-decl.c (gfc_get_extern_function_decl): If the whole_file
38 option is selected, use the backend_decl of a gsymbol, if it is
40 parse.c (add_global_procedure, add_global_program): If the flag
41 whole-file is set, add the namespace to the gsymbol.
42 (gfc_parse_file): On -fwhole-file, put procedure namespaces on
43 the global namespace list. Rearrange to do resolution of all
44 the procedures in a file, followed by their translation.
45 * options.c (gfc_init_options): Add -fwhole-file.
46 (gfc_handle_option): The same.
48 2009-03-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
50 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_HUGE_VAL
51 family of intrinsics instead of BUILT_IN_INF family.
52 * trans-intrinsics.c (gfc_conv_intrinsic_nearest): Use
53 BUILT_IN_HUGE_VAL instead of BUILT_IN_INF.
55 2009-03-30 Jakub Jelinek <jakub@redhat.com>
57 * trans-types.c (gfc_sym_type, gfc_return_by_reference): For
58 sym->attr.result check sym->ns->proc_name->attr.is_bind_c.
60 2009-03-30 Joseph Myers <joseph@codesourcery.com>
62 PR rtl-optimization/323
63 * options.c (gfc_post_options): Set
64 flag_excess_precision_cmdline. Give an error for
65 -fexcess-precision=standard for processors where the option is
68 2009-03-29 Joseph Myers <joseph@codesourcery.com>
71 * cpp.c (cb_cpp_error): New.
72 (gfc_cpp_post_options): Don't set cpp_option->inhibit_warnings.
73 Don't check cpp_errors (cpp_in).
74 (gfc_cpp_init_0): Set cb->error.
76 2009-03-29 Steven G. Kargl <kargl@gcc.gnu.org>
79 * gfortran.h: Add ARITH_PROHIBIT to arith enum.
80 expr.c (gfc_match_init_expr): Add global variable init_flag to
81 flag matching an initialization expression.
82 (check_intrinsic_op): Move no longer reachable error message to ...
83 * arith.c (arith_power): ... here. Remove gfc_ prefix in
84 gfc_arith_power. Use init_flag. Allow constant folding of x**y
85 when y is REAL or COMPLEX.
86 (eval_intrinsic): Remove restriction that y in x**y must be INTEGER
88 * gfc_power: Update gfc_arith_power to arith_power
90 2009-03-29 Daniel Kraft <d@domob.eu>
93 * gfortran.h (struct gfc_typebound_proc): Added new flag `deferred' and
94 added a comment explaining DEFERRED binding handling.
95 * decl.c (match_binding_attributes): Really match DEFERRED attribute.
96 (match_procedure_in_type): Really match PROCEDURE(interface) syntax
97 and do some validity checks for DEFERRED and this construct.
98 * module.c (binding_overriding): New string constant for DEFERRED.
99 (mio_typebound_proc): Module-IO DEFERRED flag.
100 * resolve.c (check_typebound_override): Ensure that a non-DEFERRED
101 binding is not overridden by a DEFERRED one.
102 (resolve_typebound_procedure): Allow abstract interfaces as targets
103 for DEFERRED bindings.
104 (ensure_not_abstract_walker), (ensure_not_abstract): New methods.
105 (resolve_fl_derived): Use new `ensure_not_abstract' method for
106 non-ABSTRACT types extending ABSTRACT ones to ensure each DEFERRED
107 binding is overridden.
108 (check_typebound_baseobject): New method.
109 (resolve_compcall), (resolve_typebound_call): Check base-object of
110 the type-bound procedure call.
111 * gfc-internals.texi (Type-bound procedures): Document a little bit
112 about internal handling of DEFERRED bindings.
114 2008-03-29 Tobias Schlüter <tobi@gcc.gnu.org>
117 * gfortran.h (gfc_st_label): Fix comment.
118 (gfc_exec_op): Add statement code EXEC_END_BLOCK for end of block.
119 * parse.c (accept_statement): Use EXEC_END_BLOCK for END IF and
120 END SELECT with labels.
121 (check_do_closure): Fix formatting.
122 (parse_do_block): Fix typo in error message.
123 * resolve.c (code_stack): Remove tail member. Update comment to
124 new use of reachable_labels.
125 (reachable_labels): Rename to ...
126 (find_reachable_labels): ... this. Overhaul. Update preceding
128 (resolve_branch): Fix comment preceding function. Rewrite.
129 (resolve_code): Update call to find_reachable_labels. Add code to
130 deal with EXEC_END_BLOCK.
131 * st.c (gfc_free_statement): Add code to deal with EXEC_END_BLOCK.
132 Add 2009 to copyright years.
133 * trans.c (gfc_trans_code): Likewise on both counts.
135 2009-03-28 Tobias Burnus <burnus@net-b.de>
138 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do):
139 Add GFC_RTCHECK_DO support.
140 * option.c (gfc_handle_runtime_check_option): Enable GFC_RTCHECK_DO.
141 * invoke.texi (-fcheck): Document "do" option.
143 2009-03-28 Paul Thomas <pault@gcc.gnu.org>
146 * trans-array.c (get_elemental_fcn_charlen): Remove.
147 (get_array_charlen): New function to replace previous.
149 2009-03-28 Paul Thomas <pault@gcc.gnu.org>
152 * parse.c (parse_derived): Do not break on finding pointer,
153 allocatable or private components.
155 2009-03-28 Tobias Burnus <burnus@net-b.de>
158 * option.c (gfc_handle_runtime_check_option): Enable recursion check.
159 * trans-decl.c (gfc_generate_function_code): Add recursion check.
160 * invoke.texi (-fcheck): Add recursive option.
162 2009-03-28 Tobias Burnus <burnus@net-b.de>
165 * resolve.c (gfc_resolve_iterator): Add zero-loop warning.
167 2009-03-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
168 Paul Thomas <pault@gcc.gnu.org>
169 Tobias Burnus <burnus@net-b.de>
171 * gfortran.h (gfc_option_t): Add rtcheck.
172 * lang.opt: New option -fcheck.
173 * libgfortran.h: Add GFC_RTCHECK_* constants.
174 * invoke.texi: Document -fcheck.
175 * options.c (gfc_handle_runtime_check_option): New function.
176 (gfc_init_options,gfc_post_options,gfc_handle_option):
179 2009-03-27 Richard Guenther <rguenther@suse.de>
181 * trans-array.c (gfc_conv_descriptor_data_addr): Use
182 gfc_build_addr_expr instead of build_fold_addr_expr.
183 (gfc_trans_allocate_array_storage, gfc_trans_array_constructor_value,
184 gfc_trans_constant_array_constructor, gfc_conv_array_data,
185 gfc_conv_expr_descriptor, gfc_conv_array_parameter): Likewise.
186 * trans-expr.c (gfc_conv_missing_dummy, gfc_conv_variable,
187 gfc_conv_function_val, gfc_conv_operator_assign,
188 gfc_conv_subref_array_arg, gfc_conv_function_call,
189 gfc_conv_expr_reference, gfc_trans_scalar_assign): Likewise.
190 * trans-intrinsic.c (gfc_conv_intrinsic_exponent,
191 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
192 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax_char,
193 gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_spacing,
194 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_set_exponent,
195 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
196 gfc_conv_intrinsic_si_kind, gfc_conv_intrinsic_trim): Likewise.
197 * trans-io.c (gfc_trans_io_runtime_check, set_parameter_ref,
198 gfc_convert_array_to_string, gfc_trans_open, gfc_trans_close,
199 build_filepos, gfc_trans_inquire, gfc_trans_wait,
200 nml_get_addr_expr, transfer_namelist_element, build_dt,
201 gfc_trans_dt_end, transfer_array_component, transfer_expr,
202 transfer_array_desc, gfc_trans_transfer): Likewise.
203 * trans-stmt.c (gfc_trans_allocate, gfc_trans_deallocate): Likewise.
204 * trans.c (gfc_build_addr_expr): Mark the base of the address
207 2009-03-27 Tobias Burnus <burnus@net-b.de>
209 * gfortran.h (enum init_local_real.): Add GFC_INIT_REAL_SNAN.
210 (gfc_expr): Add is_snan.
211 * trans-const.c (gfc_conv_mpfr_to_tree): Support SNaN.
212 (gfc_conv_constant_to_tree): Update call to gfc_conv_mpfr_to_tree.
213 * trans-const.h (gfc_conv_mpfr_to_tree): Update prototype.
214 * resolve.c (build_default_init_expr): Update call.
215 * target-memory.c (encode_float): Ditto.
216 * trans-intrinsic.c (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod,
218 2009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
220 * lang.opt: Unify help texts for -I, -Wconversion, -d, -fopenmp,
223 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
225 * simplify.c (gfc_simplify_transfer): Zero-initialize the
228 2009-02-27 Tobias Burnus <burnus@net-b.de>
231 * module.c (read_md5_from_module_file): Add missing quote.
233 2009-02-27 Tobias Burnus <burnus@net-b.de>
236 * module.c (read_md5_from_module_file): Include mod version
239 2009-02-26 Paul Thomas <pault@gcc.gnu.org>
242 * interface.c (compare_type_rank_if): Return 1 if the symbols
243 are the same and deal with external procedures where one is
244 identified to be a function or subroutine by usage but the
247 2009-02-26 Paul Thomas <pault@gcc.gnu.org>
250 * trans-array.c (gfc_conv_array_initializer): Convert all
251 expressions rather than ICEing.
253 2009-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
256 * array.c (ref_dimen_size): Rename to gfc_ref_dimen_size,
257 make global. Change function name in error messages.
258 (ref_size): Change ref_dimen_size to gfc_ref_dimen_size.
259 (gfc_array_ref_shape): Likewise.
260 * gfortran.h: Add prototype for gfc_ref_dimen_size.
261 * simplify.c (simplify_bound_dim): Add ref argument.
262 If the reference isn't a full array, return one for
263 the lower bound and the extent for the upper bound.
264 (simplify_bound): For array sections, take as from the
265 argument. Add reference to all to simplify_bound_dim.
267 2009-02-19 Daniel Franke <franke.daniel@gmail.com>
269 * scanner.c (load_line): At end of line, skip '\r' without setting
272 2009-02-18 Daniel Kraft <d@domob.eu>
274 * gfortran.texi: New chapter about compiler characteristics.
275 (Compiler Characteristics): Document KIND type parameters here.
277 2009-02-18 Tobias Burnus <burnus@net-b.de>
279 * intrinsic.texi (MALLOC): Make example more portable.
281 2009-02-13 Mikael Morin <mikael.morin@tele2.fr>
284 * module.c (gfc_dump_module,gfc_use_module): Add module
287 2009-02-13 Paul Thomas <pault@gcc.gnu.org>
291 * trans-expr.c (gfc_conv_function_val): Stabilize Cray-pointer
292 function references to ensure that a valid expression is used.
293 (gfc_conv_function_call): Pass Cray pointers to procedures.
295 2009-02-03 Jakub Jelinek <jakub@redhat.com>
297 * gfortranspec.c (lang_specific_driver): Update copyright notice
300 2009-01-28 Paul Thomas <pault@gcc.gnu.org>
304 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use the array
305 descriptor ubound for UBOUND, when the array lbound == 1.
307 2009-01-27 Daniel Kraft <d@domob.eu>
310 * trans-stmt.c (gfc_conv_elemental_dependencies): Create temporary
311 for the real type needed to make it work for subcomponent-references.
313 2009-01-21 Daniel Kraft <d@domob.eu>
315 * trans-stmt.c (gfc_conv_elemental_dependencies): Cleaned up comment.
317 2009-01-20 Paul Thomas <pault@gcc.gnu.org>
320 * resolve.c (check_host_association): Remove the matching to
321 correct an incorrect host association and use manipulation of
322 the expression instead.
324 2009-01-20 Tobias Burnus <burnus@net-b.de>
326 * invoke.texi (RANGE): RANGE also takes INTEGER arguments.
328 2009-01-19 Mikael Morin <mikael.morin@tele2.fr>
331 * simplify.c (simplify_bound): Don't use array specification
332 if variable or component has subsequent references.
334 2009-01-17 Paul Thomas <pault@gcc.gnu.org>
337 * module.c (write_common_0): Add argument 'this_module' and
338 check that non-use associated common blocks are written first.
339 (write_common): Call write_common_0 twice, once with true and
342 2009-01-17 Paul Thomas <pault@gcc.gnu.org>
345 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Has
346 been absorbed into gfc_conv_intrinsic_transfer. All
347 references to it in trans-intrinsic.c have been changed
348 accordingly. PR fixed by using a temporary for scalar
349 character transfer, when the source is shorter than the
352 2009-01-17 Paul Thomas <pault@gcc.gnu.org>
355 * module.c (write_common_0): Revert patch of 2009-01-05.
357 2009-01-16 Janus Weil <janus@gcc.gnu.org>
360 * expr.c (gfc_check_pointer_assign): Allow use-associated procedure
362 * trans-decl.c (get_proc_pointer_decl,gfc_create_module_variable):
363 Enable procedure pointers as module variables.
365 2009-01-14 Steven G. Kargl <kargl@gcc.gnu.org>
367 * ChangeLog-2007: Clean out svn merge droppings.
369 2009-01-10 Paul Thomas <pault@gcc.gnu.org>
372 * target-memory.c (encode_derived): Encode NULL.
374 2009-01-10 Paul Thomas <pault@gcc.gnu.org>
377 * resolve.c (check_host_association): Use the symtree name to
378 search for a potential contained procedure, since this is the
379 name by which it would be referenced.
381 2009-01-06 Thomas Koenig <tkoenig@gcc.gnu.org>
384 * interface.c (gfc_procedure_use): Don't warn about functions
386 * symbol.c (generate_isocbinding_symbol): Mark c_loc and
389 2009-01-05 Paul Thomas <pault@gcc.gnu.org>
392 * module.c (write_common_0): Use the name of the symtree rather
393 than the common block, to determine if the common has been
396 2009-01-05 Daniel Franke <franke.daniel@gmail.com>
399 * check.c (gfc_check_random_seed): Added size check for GET
400 dummy argument, reworded error messages to follow common pattern.
402 2009-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
405 * trans-types.c (gfc_get_derived_type): Check for the
406 presence of derived->ns->proc_name before
407 accessing derived->ns->proc_name->attr.flavor .
408 * resolve.c (resolve_symbol): Likewise.
410 2009-01-05 Paul Thomas <pault@gcc.gnu.org>
413 * gfortran.h : Add bit to gfc_expr 'user_operator'
414 * interface.c (gfc_extend_expr): Set the above if the operator
415 is substituted by a function.
416 * resolve.c (check_host_association): Return if above is set.
418 2009-01-04 Mikael Morin <mikael.morin@tele2.fr>
421 * ChangeLog-2008: Fix function name.
424 * dependency.c (gfc_check_argument_var_dependency):
425 Move the check for pointerness inside the if block
426 so that it doesn't affect the return value.
429 * trans-stmt.c (gfc_trans_call):
430 Add the dependency code after the loop bounds calculation one.
432 2009-01-04 Daniel Franke <franke.daniel@gmail.com>
434 * intrinsic.c (do_simplify): Removed already implemented TODO.
436 2009-01-04 Daniel Franke <franke.daniel@gmail.com>
439 * simplify.c (gfc_simplify_merge): New.
440 * intrinsic.h (gfc_simplify_merge): New prototype.
441 * intrinsic.c (add_functions): Added simplification for MERGE.
443 2009-01-04 Mikael Morin <mikael.morin@tele2.fr>
446 * gfortran.h (gfc_is_data_pointer): Added prototype
447 * resolve.c (gfc_iso_c_func_interface):
448 Use gfc_is_data_pointer to test for pointer attribute.
449 * dependency.c (gfc_is_data_pointer):
450 Support pointer-returning functions.
452 2009-01-03 Daniel Franke <franke.daniel@gmail.com>
454 * symbol.c (save_symbol): Don't SAVE function results.
456 2009-01-03 Paul Thomas <pault@gcc.gnu.org>
459 * resolve.c (resolve_call): When searching for proper host
460 association, use symtree rather than symbol. For everything
461 except generic subroutines, substitute the symtree in the call
462 rather than the symbol.