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