1 2006-02-03 Steven G. Kargl <kargls@comcast>
2 Paul Thomas <pault@gcc.gnu.org>
4 * resolve.c (resolve_symbol): Default initialization of derived type
5 component reguires the SAVE attribute.
7 2006-02-02 Steven G. Kargl <kargls@comcast>
10 match.c (gfc_match_nullify): Free the list from head not tail.
13 * match.c (match_forall_header): Fix internal error caused by bogus
17 2006-01-31 Thomas Koenig <Thomas.Koenig@online.de>
20 expr.c (gfc_check_conformance): Reorder error message
22 check.c(gfc_check_minloc_maxloc): Call gfc_check_conformance
23 for checking arguments array and mask.
24 (check_reduction): Likewise.
26 2005-01-30 Erik Edelmann <eedelman@gcc.gnu.org>
29 * trans-io.c (set_internal_unit): Check the rank of the
30 expression node itself instead of its symbol.
32 2006-01-29 Paul Thomas <pault@gcc.gnu.org>
38 * interface.c (compare_actual_formal): Error for INTENT(OUT or INOUT)
39 if actual argument is not a variable.
41 2006-01-28 Paul Thomas <pault@gcc.gnu.org>
44 * expr.c (gfc_check_assign, gfc_check_pointer_assign): Emit error if
45 the lvalue is a use associated procedure.
49 * expr.c (gfc_check_pointer_assign): Emit error if lvalue and rvalue
50 character lengths are not the same. Use gfc_dep_compare_expr for the
52 * gfortran.h: Add prototype for gfc_dep_compare_expr.
53 * dependency.h: Remove prototype for gfc_dep_compare_expr.
55 2005-01-27 Paul Thomas <pault@gcc.gnu.org>
58 * resolve.c (resolve_function): Add GFC_ISYM_LOC to the list of
59 generic_ids exempted from assumed size checking.
61 2006-01-27 Jakub Jelinek <jakub@redhat.com>
64 * Make-lang.in (fortran/scanner.o): Depend on toplev.h.
65 * lang.opt (fpreprocessed): New option.
66 * scanner.c: Include toplev.h.
67 (gfc_src_file, gfc_src_preprocessor_lines): New variables.
68 (preprocessor_line): Unescape filename if there were any
70 (load_file): If initial and gfc_src_file is not NULL,
71 use it rather than opening the file. If gfc_src_preprocessor_lines
72 has non-NULL elements, pass it to preprocessor_line.
73 (unescape_filename, gfc_read_orig_filename): New functions.
74 * gfortran.h (gfc_option_t): Add flag_preprocessed.
75 (gfc_read_orig_filename): New prototype.
76 * options.c (gfc_init_options): Clear flag_preprocessed.
77 (gfc_post_options): If flag_preprocessed, call
78 gfc_read_orig_filename.
79 (gfc_handle_option): Handle OPT_fpreprocessed.
80 * lang-specs.h: Pass -fpreprocessed to f951 if preprocessing
83 2005-01-27 Erik Edelmann <eedelman@gcc.gnu.org>
85 * symbol.c (free_old_symbol): Fix confusing comment, and add code
86 to free old_symbol->formal.
88 2005-01-26 Paul Thomas <pault@gcc.gnu.org>
91 * resolve.c (resolve_function): Exclude statement functions from
92 global reference checking.
98 * resolve.c (resolve_function): Declare a gfc_symbol to replace the
99 references through the symtree to the symbol associated with the
100 function expresion. Give error on reference to an assumed character
101 length function is defined in an interface or an external function
102 that is not a dummy argument.
103 (resolve_symbol): Give error if an assumed character length function
104 is array-valued, pointer-valued, pure or recursive. Emit warning
105 that character(*) value functions are obsolescent in F95.
108 * trans-expr.c (gfc_conv_function_call): The above patch to resolve.c
109 prevents any assumed character length function call from getting here
110 except intrinsics such as SPREAD. In this case, ensure that no
111 segfault occurs from referencing non-existent charlen->length->
112 expr_type and provide a backend_decl for the charlen from the charlen
113 of the first actual argument.
115 Cure temp name confusion.
116 * trans-expr.c (gfc_get_interface_mapping_array): Change name of
117 temporary from "parm" to "ifm" to avoid clash with temp coming from
120 2005-01-25 Erik Edelmann <eedelman@gcc.gnu.org>
123 * symbol.c (free_old_symbol): New function.
124 (gfc_commit_symbols): Use it.
125 (gfc_commit_symbol): New function.
126 (gfc_use_derived): Use it.
127 * gfortran.h: Add prototype for gfc_commit_symbol.
128 * intrinsic.c (gfc_find_function): Search in 'conversion'
129 if not found in 'functions'.
130 (gfc_convert_type_warn): Add a symtree to the new
131 expression node, and commit the new symtree->n.sym.
132 * resolve.c (gfc_resolve_index): Make sure typespec is
133 properly initialized.
135 2005-01-23 Paul Thomas <pault@gcc.gnu.org>
138 * decl.c (get_proc_name): Replace subroutine and function attributes
139 in "already defined" test by the formal arglist pointer being non-NULL.
141 Fix regression in testing of admissability of attributes.
142 * symbol.c (gfc_add_attribute): If the current_attr has non-zero
143 intent, do not do the check for a dummy being used.
144 * decl.c (attr_decl1): Add current_attr.intent as the third argument
145 in the call to gfc_add_attribute.
146 * gfortran.h: Add the third argument to the prototype for
149 2006-01-21 Joseph S. Myers <joseph@codesourcery.com>
151 * gfortranspec.c (lang_specific_driver): Update copyright notice
154 2005-01-21 Paul Thomas <pault@gcc.gnu.org>
158 * decl.c (get_proc_name): If there is an existing
159 symbol in the encompassing namespace, call errors
160 if it is a procedure of the same name or the kind
161 field is set, indicating a type declaration.
167 * decl.c (add_global_entry): New function to check
168 for existing global symbol with this name and to
169 create new one if none exists.
170 (gfc_match_entry): Call add_global_entry before
171 matching argument lists for subroutine and function
173 * gfortran.h: Prototype for existing function,
175 * resolve.c (resolve_global_procedure): New function
176 to check global symbols for procedures.
177 (resolve_call, resolve_function): Calls to this
178 new function for non-contained and non-module
180 * match.c (match_common): Add check for existing
181 global symbol, creat one if none exists and emit
182 error if there is a clash.
183 * parse.c (global_used): Remove static and use the
184 gsymbol name rather than the new_block name, so that
185 the function can be called from resolve.c.
186 (parse_block_data, parse_module, add_global_procedure):
187 Improve checks for existing gsymbols. Emit error if
188 already defined or if references were to another type.
192 * trans-expr.c (gfc_conv_aliased_arg): New function called by
193 gfc_conv_function_call that coverts an expression for an aliased
194 component reference to a derived type array into a temporary array
195 of the same type as the component. The temporary is passed as an
196 actual argument for the procedure call and is copied back to the
197 derived type after the call.
198 (is_aliased_array): New function that detects an array reference
199 that is followed by a component reference.
200 (gfc_conv_function_call): Detect an aliased actual argument with
201 is_aliased_array and convert it to a temporary and back again
202 using gfc_conv_aliased_arg.
204 2006-01-19 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
206 * gfortranspec.c: Update copyright years.
208 * trans-array.c: Likewise.
209 * trans-array.h: Likewise.
210 * trans-decl.c: Likewise.
211 * trans-stmt.c: Likewise.
212 * trans-stmt.h: Likewise.
213 * trans-types.c: Likewise.
215 2006-01-18 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
219 * gfortran.h (BBT_HEADER): Move definition up.
220 (gfc_st_label): Add BBT_HEADER, remove 'prev' and 'next'.
221 * io.c (format_asterisk): Adapt initializer.
222 * resolve.c (resolve_branch): Allow FORTRAN 66 cross-block GOTOs
224 (warn_unused_label): Take gfc_st_label label as argument, adapt to
226 (gfc_resolve): Adapt call to warn_unused_label.
227 * symbol.c (compare_st_labels): New function.
228 (gfc_free_st_label, free_st_labels, gfc_get_st_label): Convert to
229 using balanced binary tree.
230 * decl.c (match_char_length, gfc_match_old_kind_spec): Do away
232 (warn_unused_label): Adapt to binary tree.
233 * match.c (gfc_match_small_literal_int): Only set cnt if non-NULL.
234 * primary.c (match_kind_param): Do away with cnt.
236 2006-01-18 Paul Thomas <pault@gcc.gnu.org>
241 * symbol.c (check_conflict): Add pointer valued elemental
242 functions and internal procedures with the external attribute
243 to the list of conflicts.
244 (gfc_add_attribute): New catch-all function to perform the
245 checking of symbol attributes for attribute declaration
247 * decl.c (attr_decl1): Call gfc_add_attribute for each of -
248 (gfc_match_external, gfc_match_intent, gfc_match_intrinsic,
249 gfc_match_pointer, gfc_match_dimension, gfc_match_target):
250 Remove spurious calls to checks in symbol.c. Set the
251 attribute directly and use the call to attr_decl() for
253 * gfortran.h: Add prototype for gfc_add_attribute.
256 * resolve.c (resolve_function): Exclude PRESENT from assumed size
257 argument checking. Replace strcmp's with comparisons with generic
260 2006-01-16 Rafael
\81Ávila de Esp
\81índola <rafael.espindola@gmail.com>
262 * gfortranspec.c (lang_specific_spec_functions): Remove.
264 2006-01-16 Richard Guenther <rguenther@suse.de>
266 * trans-stmt.c (gfc_trans_if_1): Use fold_buildN and build_int_cst.
267 (gfc_trans_arithmetic_if): Likewise.
268 (gfc_trans_simple_do): Likewise.
269 (gfc_trans_do): Likewise.
270 (gfc_trans_do_while): Likewise.
271 (gfc_trans_logical_select): Likewise.
272 (gfc_trans_forall_loop): Likewise.
273 (generate_loop_for_temp_to_lhs): Likewise.
274 (generate_loop_for_rhs_to_temp): Likewise.
275 (gfc_trans_allocate): Likewise.
276 * trans.c (gfc_add_expr_to_block): Do not fold expr again.
278 2006-01-16 Richard Guenther <rguenther@suse.de>
280 * trans-expr.c (gfc_conv_function_call): Use fold_build2.
281 * trans-stmt.c (gfc_trans_goto): Likewise. Use build_int_cst.
282 * trans.c (gfc_trans_runtime_check): Don't fold the condition
285 2006-01-13 Steven G. Kargl <kargls@comcast.net>
288 * symbol.c (gfc_free_st_label): Give variable meaningful name. Remove
289 unneeded parenthesis. Fix-up the head of the list (2 lines gleaned
292 2006-01-13 Diego Novillo <dnovillo@redhat.com>
294 * trans.c (gfc_add_expr_to_block): Do not fold tcc_statement
297 2006-01-11 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
299 * parse.c (next_fixed): Remove superfluous string concatenation.
301 2006-01-11 Bernhard Fischer <rep.nop@aon.at>
304 * scanner.c (load_line): use maxlen to determine the line-length used
305 for padding lines in fixed form.
307 2005-01-11 Paul Thomas <pault@gcc.gnu.org>
310 * trans-types.c (copy_dt_decls_ifequal): Copy backend decl for
313 2006-01-09 Andrew Pinski <pinskia@physics.uc.edu>
316 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Use fold_convert
317 to avoid type mismatch.
319 2006-01-09 Andrew Pinski <pinskia@physics.uc.edu>
322 * trans-decl.c (gfc_generate_function_code): Move the NULLing of
323 current_fake_result_decl down to below generate_local_vars.
325 2006-01-09 Feng Wang <fengwang@nudt.edu.cn>
328 * trans-expr.c (gfc_to_single_character): New function that converts
329 string to single character if its length is 1.
330 (gfc_build_compare_string):New function that compare string and handle
331 single character specially.
332 (gfc_conv_expr_op): Use gfc_build_compare_string.
333 (gfc_trans_string_copy): Use gfc_to_single_character.
334 * trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Use
335 gfc_build_compare_string.
336 * trans.h (gfc_build_compare_string): Add prototype.
338 2006-01-09 Feng Wang <fengwang@nudt.edu.cn>
340 * simplify.c (gfc_simplify_char): Use UCHAR_MAX instead of literal
342 (gfc_simplify_ichar): Get the result from unsinged char and in the
343 range 0 to UCHAR_MAX instead of CHAR_MIN to CHAR_MAX.
345 2005-01-08 Erik Edelmann <eedelman@gcc.gnu.org>
348 * resolve.c (resolve_fntype): Check that PUBLIC functions
349 aren't of PRIVATE type.
351 2005-01-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
353 * decl.c (gfc_match_function_decl): Correctly error out in case of
354 omitted function argument list.
356 2006-01-07 Paul Thomas <pault@gcc.gnu.org>
359 * trans-array.c (gfc_reverse_ss): Remove static attribute.
360 (gfc_walk_elemental_function_args): Replace gfc_expr * argument for
361 the function call with the corresponding gfc_actual_arglist*. Change
363 (gfc_walk_function_expr): Call to gfc_walk_elemental_function_args
364 now requires the actual argument list instead of the expression for
366 * trans-array.h: Modify the prototype for gfc_walk_elemental_function_args
367 and provide a prototype for gfc_reverse_ss.
368 * trans-stmt.h (gfc_trans_call): Add the scalarization code for the case
369 where an elemental subroutine has array valued actual arguments.
375 * resolve.c (check_assumed_size_reference): New function to check for upper
376 bound in assumed size array references.
377 (resolve_assumed_size_actual): New function to do a very restricted scan
378 of actual argument expressions of those procedures for which incomplete
379 assumed size array references are not allowed.
380 (resolve_function, resolve_call): Switch off assumed size checking of
381 actual arguments, except for elemental procedures and intrinsic
382 inquiry functions, in some circumstances.
383 (resolve_variable): Call check_assumed_size_reference.
385 2006-01-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
388 * io.c (next_char_not_space): New function that returns the next
389 character that is not white space.
390 (format_lex): Use the new function to skip whitespace within
393 2006-01-05 Erik Edelmann <eedelman@gcc.gnu.org>
396 * expr.c (gfc_expr_set_symbols_referenced): New function.
397 * gfortran.h: Add a function prototype for it.
398 * resolve.c (resolve_function): Use it for
399 use associated character functions lengths.
400 * expr.c, gfortran.h, resolve.c: Updated copyright years.
402 2006-01-03 Steven G. Kargl <kargls@comcast.net>
405 * resolve.c (resolve_forall_iterators): Check for scalar variables;
406 Check stride is nonzero.
408 2006-01-02 Steven G. Kargl <kargls@comcast.net>
411 * parse.c (next_free): Check for whitespace after the label.
412 * match.c (gfc_match_small_literal_int): Initialize cnt variable.
414 2006-01-01 Steven G. Kargl <kargls@comcast.net>
416 * ChangeLog: Split previous years into ...
417 * ChangeLog-2002: here.
418 * ChangeLog-2003: here.
419 * ChangeLog-2004: here.
420 * ChangeLog-2005: here.