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