1 2005-09-09 Thomas Koenig <Thomas.Koenig@online.de>
3 gfortran.texi: Document IOSTAT= specifier.
5 2005-09-09 Thomas Koenig <Thomas.Koenig@online.de>
7 * gfortran.h: Add iomsg to gfc_open, gfc_close, gfc_filepos,
8 gfc_inquire and gfc_dt.
9 * dump-parse-tree.c (gfc_show_code_node): Add iomsg
10 for open, close, file positioning, inquire and namelist.
11 * io.c (io_tag): Add tag_iomsg.
12 (resolve_tag): Add standards warning for iomsg.
13 (match_open_element): Add iomsg.
14 (gfc_free_open): Add iomsg.
15 (gfc_resolve_open): Add iomsg.
16 (gfc_free_close): Add iomsg.
17 (match_close_element): Add iomsg.
18 (gfc_resolve_close): Add iomsg.
19 (gfc_free_filepos): Add iomsg.
20 (match_file_element): Add iomsg.
21 (gfc_resolve_filepos): Add iostat and iomsg.
22 (match-dt_element): Add iomsg.
23 (gfc_free_dt): Add iomsg.
24 (gfc_resolve_dt): Add iomsg.
25 (gfc_free_inquire): Add iomsg.
26 (match_inquire_element): Add iomsg.
27 (gfc_resolve_inquire): Add iomsg.
28 * trans_io.c: Add ioparm_iomsg and ioparm_iomsg_len.
29 (gfc_build_io_library_fndecls): Add iomsg as last field.
30 (gfc_trans_open): Add iomsg.
31 (gfc_trans_close): Add iomsg.
32 (build_fileos): Call set_string for iomsg.
33 (gfc_trans_inquire): Add iomsg.
34 (build_dt): Add iomsg.
36 2005-09-09 Richard Sandiford <richard@codesourcery.com>
38 * match.h (gfc_match_equiv_variable): Declare.
40 2005-09-09 Richard Sandiford <richard@codesourcery.com>
43 * Makefile.in (fortran/trans-expr.o): Depend on dependency.h.
44 * dependency.h (gfc_ref_needs_temporary_p): Declare.
45 * dependency.c (gfc_ref_needs_temporary_p): New function.
46 (gfc_check_fncall_dependency): Use it instead of inlined check.
47 By so doing, take advantage of the fact that character substrings
48 within an array reference also need a temporary.
49 * trans.h (GFC_SS_VECTOR): Adjust comment.
50 * trans-array.c (gfc_free_ss): Remove GFC_SS_VECTOR case.
51 (gfc_set_vector_loop_bounds): New function.
52 (gfc_add_loop_ss_code): Call it after evaluating the subscripts of
53 a GFC_SS_SECTION. Deal with the GFC_SS_VECTOR case by evaluating
54 the vector expression and caching its descriptor for use within
56 (gfc_conv_array_index_ref, gfc_conv_vector_array_index): Delete.
57 (gfc_conv_array_index_offset): Handle scalar, vector and range
58 dimensions as separate cases of a switch statement. In the vector
59 case, use the loop variable to calculate a vector index and use the
60 referenced element as the dimension's index. Perform bounds checking
62 (gfc_conv_section_upper_bound): Return null for vector indexes.
63 (gfc_conv_section_startstride): Give vector indexes a start value
64 of 0 and a stride of 1.
65 (gfc_conv_ss_startstride): Adjust for new GFC_SS_VECTOR representation.
66 (gfc_conv_expr_descriptor): Expand comments. Generalize the
67 handling of the !want_pointer && !direct_byref case. Use
68 gfc_ref_needs_temporary_p to decide whether the variable case
70 (gfc_walk_variable_expr): Handle DIMEN_VECTOR by creating a
72 * trans-expr.c: Include dependency.h.
73 (gfc_trans_arrayfunc_assign): Fail if the target needs a temporary.
75 2005-09-09 Richard Sandiford <richard@codesourcery.com>
78 * trans.h (gfc_interface_sym_mapping, gfc_interface_mapping): Moved
80 (gfc_init_interface_mapping, gfc_free_interface_mapping)
81 (gfc_add_interface_mapping, gfc_finish_interface_mapping)
82 (gfc_apply_interface_mapping): Declare.
83 * trans-array.h (gfc_set_loop_bounds_from_array_spec): Declare.
84 (gfc_trans_allocate_temp_array): Add pre and post block arguments.
85 * trans-array.c (gfc_set_loop_bounds_from_array_spec): New function.
86 (gfc_trans_allocate_array_storage): Replace loop argument with
87 separate pre and post blocks.
88 (gfc_trans_allocate_temp_array): Add pre and post block arguments.
89 Update call to gfc_trans_allocate_array_storage.
90 (gfc_trans_array_constructor, gfc_conv_loop_setup): Adjust for new
91 interface to gfc_trans_allocate_temp_array.
92 * trans-expr.c (gfc_interface_sym_mapping, gfc_interface_mapping):
94 (gfc_init_interface_mapping, gfc_free_interface_mapping)
95 (gfc_add_interface_mapping, gfc_finish_interface_mapping)
96 (gfc_apply_interface_mapping): Make extern.
97 (gfc_conv_function_call): Build an interface mapping for array
98 return values too. Call gfc_set_loop_bounds_from_array_spec.
99 Adjust call to gfc_trans_allocate_temp_array so that code is
100 added to SE rather than LOOP.
102 2005-09-09 Richard Sandiford <richard@codesourcery.com>
105 * trans.h (gfor_fndecl_internal_realloc): Declare.
106 (gfor_fndecl_internal_realloc64): Declare.
107 * trans-decl.c (gfor_fndecl_internal_realloc): New variable.
108 (gfor_fndecl_internal_realloc64): New variable.
109 (gfc_build_builtin_function_decls): Initialize them.
110 * trans-array.h (gfc_trans_allocate_temp_array): Add a fourth argument.
111 * trans-array.c (gfc_trans_allocate_array_storage): Add an argument
112 to say whether the array can grow later. Don't allocate the array
113 on the stack if so. Don't call malloc for zero-sized arrays.
114 (gfc_trans_allocate_temp_array): Add a similar argument here.
115 Pass it along to gfc_trans_allocate_array_storage.
116 (gfc_get_iteration_count, gfc_grow_array): New functions.
117 (gfc_iterator_has_dynamic_bounds): New function.
118 (gfc_get_array_constructor_element_size): New function.
119 (gfc_get_array_constructor_size): New function.
120 (gfc_trans_array_ctor_element): Replace pointer argument with
122 (gfc_trans_array_constructor_subarray): Likewise. Take an extra
123 argument to say whether the variable-sized part of the constructor
124 must be allocated using realloc. Grow the array when this
126 (gfc_trans_array_constructor_value): Likewise.
127 (gfc_get_array_cons_size): Delete.
128 (gfc_trans_array_constructor): If the loop bound has not been set,
129 split the allocation into a static part and a dynamic part. Set
130 loop->to to the bounds for static part before allocating the
131 temporary. Adjust call to gfc_trans_array_constructor_value.
132 (gfc_conv_loop_setup): Allow any constructor to determine the
133 loop bounds. Check whether the constructor has a dynamic size
134 and prefer to use something else if so. Expect the loop bound
135 to be set later. Adjust call to gfc_trans_allocate_temp_array.
136 * trans-expr.c (gfc_conv_function_call): Adjust another call here.
138 2005-09-09 Paul Thomas <pault@gcc.gnu.org>
141 * module.c (find_use_name_n): Based on original
142 find_use_name. Either counts number of use names for a
143 given real name or returns use name n.
144 (find_use_name, number_use_names): Interfaces to the
145 function find_use_name_n.
146 (read_module): Add the logic and calls to these functions,
147 so that mutiple reuses of the same real name are loaded.
149 2005-09-09 Paul Thomas <pault@gcc.gnu.org>
156 * gfortran.h: Move definition of BLANK_COMMON_NAME from trans-
157 common.c so that it is accessible to module.c. Add common_head
158 field to gfc_symbol structure. Add field for the equivalence
159 name AND new attr field, in_equivalence.
160 * match.c (gfc_match_common, gfc_match_equivalence): In loops
161 that flag common block equivalences, emit an error if the
162 common blocks are different, using sym->common_head as the
163 common block identifier. Ensure that symbols that are equivalence
164 associated with a common block are marked as being in_common.
165 * module.c (write_blank_common): New.
166 (write_common): Use unmangled common block name.
167 (load_equiv): New function ported from g95.
168 (read_module): Call load_equiv.
169 (write_equiv): New function ported from g95. Correct
170 string referencing for gfc functions. Give module
171 equivalences a unique name.
172 (write_module): Call write_equiv and write_blank_common.
173 * primary.c (match_variable) Old gfc_match_variable, made
174 static and third argument provided to indicate if parent
175 namespace to be visited or not.
176 (gfc_match_variable) New. Interface to match_variable.
177 (gfc_match_equiv_variable) New. Interface to match_variable.
178 * trans-common.c (finish_equivalences): Provide the call
179 to create_common with a gfc_common_header so that
180 module equivalences are made external, rather than local.
181 (find_equivalences): Ensure that all members in common block
182 equivalences are marked as used. This prevents the subsequent
183 call to this function from making local unions.
184 * trans-decl.c (gfc_generate_function_code): Move the call to
185 gfc_generate_contained_functions to after the call to
186 gfc_trans_common so the use-associated, contained common
187 blocks produce the correct references.
188 (gfc_create_module_variable): Return for equivalenced symbols
189 with existing backend declaration.
191 2005-09-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
194 * match.c (gfc_match_common): Remove unnecessary / wrong special
195 cases for end-of-statement.
197 2005-09-08 Janne Blomqvist <jblomqvi@cc.hut.fi>
199 * gfortran.texi: Add section about implemented F2003 features.
201 2005-09-08 Richard Sandiford <richard@codesourcery.com>
204 * trans-array.c (gfc_add_loop_ss_code): Set ss->string_length in
205 the GFC_SS_FUNCTION case too.
206 * trans-expr.c (gfc_conv_function_val): Allow symbols to be bound
207 to function pointers as well as function decls.
208 (gfc_interface_sym_mapping, gfc_interface_mapping): New structures.
209 (gfc_init_interface_mapping, gfc_free_interface_mapping)
210 (gfc_get_interface_mapping_charlen, gfc_get_interface_mapping_array)
211 (gfc_set_interface_mapping_bounds, gfc_add_interface_mapping)
212 (gfc_finish_interface_mapping, gfc_apply_interface_mapping_to_cons)
213 (gfc_apply_interface_mapping_to_ref)
214 (gfc_apply_interface_mapping_to_expr)
215 (gfc_apply_interface_mapping): New functions.
216 (gfc_conv_function_call): Evaluate the arguments before working
217 out where the result should go. Make the null pointer case provide
218 the string length in parmse.string_length. Cope with non-constant
219 string lengths, using the above functions to evaluate such lengths.
220 Use a temporary typespec; don't assign to sym->cl->backend_decl.
221 Don't assign to se->string_length when returning a cached array
224 2005-09-08 Richard Sandiford <richard@codesourcery.com>
227 * trans-array.c (gfc_conv_array_ref): Call gfc_advance_se_ss_chain
228 after handling scalarized references. Make "indexse" inherit from
229 "se" when handling AR_ELEMENTs.
230 (gfc_walk_variable_expr): Add GFC_SS_SCALAR entries for each
231 substring or scalar reference that follows an array section.
232 * trans-expr.c (gfc_conv_variable): When called from within a
233 scalarization loop, start out with "ref" pointing to the scalarized
234 part of the reference. Don't call gfc_advance_se_ss_chain here.
236 2005-09-07 Richard Sandiford <richard@codesourcery.com>
239 * trans-expr.c (gfc_trans_pointer_assignment): Assign to a temporary
240 descriptor if the rhs is not a null pointer or variable.
242 2005-09-07 Thomas Koenig <Thomas.Koenig@online.de>
245 * symbol.c(check_conflict): Add conflict for parameter/save,
247 2005-09-06 Richard Sandiford <richard@codesourcery.com>
250 * simplify.c (gfc_simplify_transpose): Set the result's typespec from
251 the source, not the first element of the return value.
253 2005-09-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
256 * io.c (match_io): Correctly backup if PRINT followed by
257 symbol which is not a namelist. Force blank between PRINT
258 and namelist in free form.
260 2005-08-31 Francois-Xavier Coudert <coudert@clipper.ens.fr>
263 * gfortran.h (gfc_option_t): Add flag_automatic.
264 * invoke.texi: Document the -fno-automatic option.
265 * lang.opt: Add a -fautomatic option.
266 * options.c (gfc_init_options): Default for -fautomatic is on.
267 (gfc_handle_option): Add handling of -fautomatic option.
268 * resolve.c (gfc_resolve): When -fno-automatic is used, mark
269 needed variables as SAVE.
271 2005-08-27 Erik Edelmann <erik.edelmann@iki.fi>
273 * trans-array.c (gfc_trans_deferred_array): Fix comments.
275 2005-08-27 Erik Schnetter <schnetter@aei.mpg.de>
277 * primary.c (match_charkind_name): Fix typo in comment leading to
280 2005-08-25 Erik Edelmann <eedelman@acclab.helsinki.fi>
283 * symbol.c (find_special): Remove.
284 (build_sym, add_init_expr, attr_decl1): Remove calls to
285 find_special in favor of calls to gfc_get_symbol.
287 2005-08-24 Thomas Koenig <Thomas.Koenig@online.de>
290 * gfortran.h (symbol_attribute): Add noreturn to the structure.
291 (gfc_intrinsic_sym): Add noreturn to the structure.
292 * intrinsic.c (make_noreturn): New function.
293 (add_subroutines): Mark subroutines abort and exit as noreturn.
294 (gfc_intrinsic_sub_interface): Copy noreturn attribute from
295 isym to the resolved symbol.
296 * trans-decl.c (gfc_get_extern_function_decl): Set function
297 as VOLATILE (== noreturn) if the noreturn attribute is set.
299 2005-08-21 Steven G. Kargl <kargls@comcast.net>
301 * decl.c: Typo in comment.
303 2005-08-21 Steven G. Kargl <kargls@comcast.net>
305 * array.c: Bump GFC_MAX_AC_EXPAND from 100 to 65535.
307 2005-08-21 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
309 * gfortran.h (gfc_option_t): Remove source field. Add
311 (gfc_new_file): Remove arguments in prototype.
312 (gfc_source_file): Make 'const char *'.
313 * f95-lang.c (gfc_init): Use gfc_source_file instead of
314 gfc_option.source. Call gfc_new_file without arguments.
315 * invoke.texi: Document new options '-fd-lines-as-code' and
316 '-fd-lines-as-comment'.
317 * lang.opt: Add new options. Alphabetize.
318 * options.c (gfc_init_options): Initialize gfc_source_file instead
319 of gfc_option.source. Initialize gfc_option.flag_d_lines.
320 (form_from_filename): Move here from scanner.c. Make
321 'filename' argument 'const'.
322 (gfc_post_options): Set gfc_source_file. Determine source form.
323 Warn if 'd-lines*' are used in free form.
324 * scanner.c (gfc_source_file): Constify.
325 (skip_fixed_comments): Deal with d-lines.
326 (get_file): Constify argument 'name'.
327 (load_file): Constify argument 'filename'.
328 (form_from_filename): Moved to options.c.
329 (gfc_new_file): Remove arguments. Don't initialize
330 gfc_source_file, don't determine source form.
331 * trans-const.c (gfc_init_constants): Use gfc_source_file instead
332 of gfc_option.source.
334 2005-08-19 Steven G. Kargl <kargls@comcast.net>
337 * gfortran.h: Remove PATH_MAX definition.
338 * module.c (write_module, gfc_dump_module): Use alloca to allocate
340 * scanner.c (gfc_release_include_path, form_from_filename): Ditto.
342 2004-08-16 Huang Chun <chunhuang73@hotmail.com>
344 * trans-expr.c (gfc_conv_power_op): Evaluate the expression before
347 2005-08-14 Asher Langton <langton2@llnl.gov>
349 * parse.c (match): Enclose macro in do...while(0) and braces.
351 2005-08-14 Paul Thomas <pault@gcc.gnu.org>
354 * gfortran.texi: Document PRINT namelist.
356 2005-08-14 Paul Thomas <pault@gcc.gnu.org>
359 * io.c (match_io): Add code to implement PRINT namelist.
361 2005-08-14 Canqun Yang <canqun@nudt.edu.cn>
363 * trans-stmt.c (gfc_trans_arithmetic_if): Optimized in case of equal
366 2005-08-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
367 Steven Bosscher <stevenb@suse.de>
370 * gfortran.h: Add is_main_program member to symbol_attribute.
371 * trans-decl: Add a gfor_fndecl_set_std tree.
372 (gfc_build_builtin_function_decls): Create it.
373 (gfc_generate_function_code): Add this call at the beginning of
375 * trans.c (gfc_generate_code): Move main_program and attr.
376 * trans.h: Add declaration for gfor_fndecl_set_std.
378 2005-08-10 Thomas Koenig <Thomas.Koenig@online.de>
381 gfortran.h: Declare new function gfc_resolve_dim_arg.
382 resolve.c: New function gfc_resolve_dim_arg.
383 iresolve.c (gfc_resolve_all): Use gfc_resolve_dim_arg.
384 (gfc_resolve_any): Likewise.
385 (gfc_resolve_count): Likewise.
386 (gfc_resolve_cshift): Likewise. If the kind of shift is less
387 gfc_default_integer_kind, convert it to default integer type.
388 (gfc_resolve_eoshift): Likewise.
389 (gfc_resolve_maxloc): Use gfc_resolve_dim_arg.
390 (gfc_resolve_maxval): Likewise.
391 (gfc_resolve_minloc): Likewise.
392 (gfc_resolve_minval): Likewise.
393 (gfc_resolve_product): Likewise.
394 (gfc_resolve_spread): Likewise.
395 (gfc_resolve_sum): Likewise.
397 2005-08-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
399 * check.c (gfc_check_ttynam_sub, gfc_check_isatty): Add check
400 functions for new intrinsics TTYNAM and ISATTY.
401 * intrinsic.c (add_functions, add_subroutines): Add new
403 * intrinsic.h: Add prototypes for new check and resolve
405 * iresolve.c (gfc_resolve_isatty, gfc_resolve_ttynam_sub): New
406 resolve functions for intrinsics TTYNAM and ISATTY.
407 * gfortran.h (gfc_generic_isym_id): Add symbol for ISATTY.
408 * trans-intrinsic.c: Add case for GFC_ISYM_ISATTY.
410 2005-08-09 Jakub Jelinek <jakub@redhat.com>
412 * scanner.c (preprocessor_line): Don't write beyond the end of flag
415 2005-08-07 Janne Blomqvist <jblomqvi@cc.hut.fi>
418 * dump-parse-tree.c (gfc_show_code_node): Add case for FLUSH.
419 * gfortran.h: Add enums for FLUSH.
420 * io.c (gfc_free_filepos,match_file_element,match_filepos): Modify
421 comment appropriately. (gfc_match_flush): New function.
422 * match.c (gfc_match_if): Add match for flush.
423 * match.h: Add prototype.
424 * parse.c (decode_statement): Add flush to 'f' case.
425 (next_statement): Add case for flush. (gfc_ascii_statement): Likewise.
426 * resolve.c (resolve_code): Add flush case.
427 * st.c (gfc_free_statement): Add flush case.
428 * trans-io.c: Add prototype for flush.
429 (gfc_build_io_library_fndecls): Build fndecl for flush.
430 (gfc_trans_flush): New function.
431 * trans-stmt.h: Add prototype.
432 * trans.c (gfc_trans_code): Add case for flush.
434 2005-08-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
436 * primary.c (match_hollerith_constant): Fix typo.
438 2005-08-06 Kazu Hirata <kazu@codesourcery.com>
440 * decl.c, dump-parse-tree.c, gfortran.texi, intrinsic.texi,
441 invoke.texi, resolve.c, trans-array.c, trans-array.h,
442 trans-common.c, trans-expr.c, trans-io.c, trans.h: Fix
443 comment/doc typos. Follow spelling conventions.
445 2005-08-06 Jakub Jelinek <jakub@redhat.com>
449 * primary.c (match_varspec): If equiv_flag, don't look at sym's
450 attributes, call gfc_match_array_ref up to twice and don't do any
451 substring or component processing.
452 * resolve.c (resolve_equivalence): Transform REF_ARRAY into
453 REF_SUBSTRING or nothing if needed. Check that substrings
454 don't have zero length.
456 2005-08-05 Thomas Koenig <Thomas.Koenig@online.de>
458 * trans-expr.c (gfc_build_builtin_function_decls): Mark
459 stop_numeric and stop_string as non-returning.
461 2005-08-04 Paul Brook <paul@codesourcery.com>
463 * trans-expr.c (gfc_conv_expr, gfc_conv_expr_type): Update comments.
464 (gfc_conv_expr_lhs): Fix assertion.
465 (gfc_conv_expr_val): Merge post block. Set se.expr to new value.
467 2005-08-02 David Edelsohn <edelsohn@gnu.org>
470 * expr.c (simplify_parameter_variable): Do not copy the subobject
471 references if the expression value is a constant.
473 * expr.c (gfc_simplify_expr): Evaluate constant substrings.
475 2005-07-31 Jerry DeLisle <jvdelisle@verizon.net>
477 * intrinsic.texi: Add documentation for exponent, floor, and fnum and
478 fix description of ceiling in index.
480 2005-07-31 Steven Bosscher <stevenb@suse.de>
482 * trans-decl.c (gfc_build_builtin_function_decls): Give the internal
483 malloc functions the 'malloc' attribute. Give runtime_error the
484 'noreturn' attribute.
486 2005-07-31 Steven Bosscher <stevenb@suse.de>
488 * trans-stmt.c (gfc_trans_goto): Jump to the known label instead
489 of the assigned goto variable.
491 2005-07-29 Steven Bosscher <stevenb@suse.de>
493 * trans-types.h (gfc_array_range_type): Add missing GTY decl for this.
495 2005-07-28 Andrew Pinski <pinskia@physics.uc.edu>
497 * fortran/f95-lang.c (language_function): Remove
498 named_labels, shadowed_labels, returns_value, returns_abnormally,
499 warn_about_return_type, and extern_inline fields.
500 (named_labels): Remove variable.
501 (gfc_init_decl_processing): Remove setting of named_labels.
503 2005-07-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
506 * resolve.c (resolve_operator): Improve diagnostic for comparison
507 of logicals with invalid operator.
509 2005-07-25 Jakub Jelinek <jakub@redhat.com>
512 * data.c (gfc_assign_data_value_range): Call
513 create_character_initializer if last_ts is a character type.
515 2005-07-22 Manfred Hollstein <mh@suse.com>
517 * match.c (gfc_match_symbol): Fix uninitialised warnings.
518 * matchexp.c (gfc_match_expr): Likewise.
520 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
522 Make CONSTRUCTOR use VEC to store initializers.
523 * trans-array.c (gfc_build_null_descriptor,
524 gfc_trans_array_constructor_value, gfc_conv_array_initializer):
525 Update to cope with VEC in CONSTRUCTOR_ELTS.
526 * trans-common.c (create_common): Likewise.
527 * trans-expr.c (gfc_conv_structure): Likewise.
528 * trans-stmt.c (gfc_trans_character_select): Use
529 build_constructor_from_list instead of build_constructor.
531 2005-07-19 Paul Thomas <pault@gcc.gnu.org>
534 * resolve.c (resolve_symbol): A symbol with FL_UNKNOWN
535 is matched against interfaces in parent namespaces. If there
536 the symtree is set to point to the interface.
538 2005-07-16 David Edelsohn <edelsohn@gnu.org>
541 * decl.c (do_parm): Adjust character initializer to character length
542 of symbol before assigning.
544 2005-07-14 Steve Ellcey <sje@cup.hp.com>
546 * trans-types.c (MAX_REAL_KINDS): Increase from 4 to 5.
548 2005-07-14 Jakub Jelinek <jakub@redhat.com>
550 * gfortran.h (MAX_ERROR_MESSAGE): Remove.
551 (gfc_error_buf): Add allocated and index fields. Change message
552 field from array to a pointer.
553 * error.c (use_warning_buffer, error_ptr, warning_ptr): Remove.
554 (cur_error_buffer): New variable.
555 (error_char): Use cur_error_buffer->{message,index} instead of
556 {warning,error}_{buffer.message,ptr}. Reallocate message buffer
558 (gfc_warning, gfc_notify_std, gfc_error, gfc_error_now): Setup
559 cur_error_buffer and its index rather than {warning,error}_ptr
560 and use_warning_buffer.
561 (gfc_warning_check, gfc_error_check): Don't print anything if
563 (gfc_push_error): Allocate saved message with xstrdup.
564 (gfc_pop_error): Free saved message with gfc_free.
565 (gfc_free_error): New function.
566 * primary.c (match_complex_constant): Call gfc_free_error if
567 gfc_pop_error will not be called.
568 * match.c (gfc_match_st_function): Likewise.
571 * scanner.c (preprocessor_line): Don't treat flag 3 as the start of a new
572 file. Fix file left but not entered warning.
574 2005-07-14 Feng Wang <fengwang@nudt.edu.cn>
575 Steven G. Kargl <kargls@comcast.net>
577 * array.c (resolve_character_array_constructor): Allocate gfc_charlen
578 for the array and attach to namespace list for automatic deallocation.
580 2005-07-13 Andreas Schwab <schwab@suse.de>
582 * Make-lang.in (fortran/dependency.o): Depend on
583 $(GFORTRAN_TRANS_DEPS).
585 2005-07-11 Jakub Jelinek <jakub@redhat.com>
587 * trans-stmt.c (gfc_trans_forall_loop): Clear maskindex before
589 (gfc_trans_assign_need_temp, gfc_trans_pointer_assign_need_temp,
590 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_2):
591 Don't clear maskindexes here.
593 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
595 * trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN
598 2005-07-08 Jakub Jelinek <jakub@redhat.com>
600 * primary.c (gfc_match_rvalue): Handle ENTRY the same way
603 2005-07-07 Jakub Jelinek <jakub@redhat.com>
605 * scanner.c (load_line): Add pbuflen argument, don't make
606 buflen static. If maxlen == 0 or preprocessor_flag,
607 don't truncate at buflen, but at maxlen. In xrealloc add
608 1 byte at the end for the terminating '\0'. Don't fill
609 with spaces up to buflen, but gfc_option.fixed_line_length.
610 (load_file): Adjust load_line caller. Add line_len variable.
612 * scanner.c (preprocessor_line): Only set current_file->line when errors
613 have not been encountered. Warn and don't crash if a file leave
614 preprocessor line has no corresponding entering line. Formatting.
616 2005-07-07 Steven Bosscher <stevenb@suse.de>
618 * primary.c (match_hollerith_constant): Use int, not unsigned int,
619 for the hollerith length. Fix indentation.
621 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
626 * arith.c (gfc_hollerith2int, gfc_hollerith2real,
627 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
629 (eval_intrinsic): Don't evaluate if Hollerith constant arguments exist.
630 * arith.h (gfc_hollerith2int, gfc_hollerith2real,
631 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
633 * expr.c (free_expr0): Free memery allocated for Hollerith constant.
634 (gfc_copy_expr): Allocate and copy string if Expr is from Hollerith.
635 (gfc_check_assign): Enable conversion from Hollerith to other.
636 * gfortran.h (bt): Add BT_HOLLERITH.
637 (gfc_expr): Add from_H flag.
638 * intrinsic.c (gfc_type_letter): Return 'h' for BT_HOLLERITH.
639 (add_conversions): Add conversions from Hollerith constant to other.
640 (do_simplify): Don't simplify if Hollerith constant arguments exist.
641 * io.c (resolve_tag): Enable array in FORMAT tag under GFC_STD_GNU.
642 * misc.c (gfc_basetype_name): Return "HOLLERITH" for BT_HOLLERITH.
643 (gfc_type_name): Print "HOLLERITH" for BT_HOLLERITH.
644 * primary.c (match_hollerith_constant): New function.
645 (gfc_match_literal_constant): Add match Hollerith before Integer.
646 * simplify.c (gfc_convert_constant): Add conversion from Hollerith
648 * trans-const.c (gfc_conv_constant_to_tree): Use VIEW_CONVERT_EXPR to
649 convert Hollerith constant to tree.
650 * trans-io.c (gfc_convert_array_to_string): Get array's address and
651 length to set string expr.
652 (set_string): Deal with array assigned Hollerith constant and character
654 * gfortran.texi: Document Hollerith constants as extention support.
656 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
659 * trans-array.c (gfc_trans_array_constructor_value): Fix index of data.
661 2005-07-07 Jakub Jelinek <jakub@redhat.com>
663 * decl.c (gfc_match_entry): Allow ENTRY without parentheses
666 2005-07-03 Kazu Hirata <kazu@codesourcery.com>
668 * gfortran.texi, intrinsic.texi: Fix typos.
669 * symbol.c: Fix a comment typo.
671 2005-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
673 * error.c (error_printf, error_print): Use ATTRIBUTE_GCC_GFC.
674 * gfortran.h (ATTRIBUTE_GCC_GFC): New.
675 (gfc_warning, gfc_warning_now, gfc_error, gfc_error_now,
676 gfc_fatal_error, gfc_internal_error, gfc_notify_std): Use
679 2005-07-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
682 * io.c (match_dt_element): Do not allow END tag in PRINT or
685 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
687 * lang.opt: Remove "." from end of help texts.
689 2005-07-01 Jerry DeLisle <jvdelisle@verizon.net>
691 * gfortran.texi: Fix typos and grammar.
692 * invoke.texi: Fix typos and grammar.
693 * intrinsic.texi: Add documentaion for eoshift, epsilon, etime, and
694 exit. Fixed alignment of text for dtime syntax. Fixed a few line
697 2005-06-25 Jakub Jelinek <jakub@redhat.com>
699 * trans-stmt.c (gfc_trans_forall_1): Prefer to use smaller logical
700 type than boolean_type_node.
702 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
704 * all files: Update FSF address in copyright headers.
706 2005-06-24 Jerry DeLisle <jvdelisle@verizon.net>
709 * gfortran.h: Add symbols for new intrinsic functions.
710 * intrinsic.c: Add new functions acosh, asinh, and atanh.
711 * intrinsic.h: Add prototypes for the new functions.
712 * iresolve.c (gfc_resolve_acosh): New function.
713 (gfc_resolve_asinh): New function.
714 (gfc_resolve_atanh): New function.
715 * mathbuiltins.def: Add defines.
716 * simplify.c (gfc_simplify_acosh): New function.
717 (gfc_simplify_asinh): New function.
718 (gfc_simplify_atanh): New function.
720 2005-06-24 Feng Wang <fengwang@nudt.edu.cn>
722 * simplify.c (gfc_simplify_modulo): Don't clear before get result.
724 2005-06-22 Paul Brook <paul@codesourcery.com>
727 * symbol.c (gfc_is_var_automatic): New function.
728 (save_symbol): Use it.
730 2005-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
731 Paul Thomas <pault@gcc.gnu.org>
735 * module.c (mio_namelist): New function. Correct to set
736 namelist_tail and to give error on renaming namelist by use
738 (mio_symbol): Call mio_namelist.
740 2005-06-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
742 * gfortran.h: Add flag_backslash compile-time option.
743 * lang.opt: Add support for -fbackslash option.
744 * options.c: Likewise.
745 * primary.c: Implement behavior for -fno-backslash.
746 * invoke.texi: Add doc for -fbackslash option.
747 * gfortran.texi: Remove mention of -fno-backslash as a
750 2005-06-20 Steven G. Kargl <kargls@comcast.net>
754 * match.c (gfc_match_label): Detect duplicate labels.
757 2005-06-20 Erik Edelmann <erik.edelmann@iki.fi>
759 * intrinsic.c (check_intrinsic_standard): Fix spelling error
760 in a warning message.
762 2005-06-18 Erik Edelman <eedelman@acclab.helsinki.fi>
763 Steven G. Kargl <kargls@comast.net>
766 * primary.c (gfc_match_rvalue): expr_type can be EXPR_CONSTANT
767 for an array; check that sym->as is NULL.
770 2005-06-18 Steven G. Kargl <kargls@comcast.net>
772 * intrinsic.c (gfc_intrinsic_func_interface): Enable errors for generic
773 functions whose simplification routine return FAILURE.
775 2005-06-13 Geoffrey Keating <geoffk@apple.com>
777 * Make-lang.in (fortran.install-man): Doesn't depend on installdirs.
778 (rule for installing f95.1 manpage): Does depend on installdirs.
780 2005-06-13 Jakub Jelinek <jakub@redhat.com>
783 * trans-stmt.c (gfc_trans_forall_loop): Only increment maskindex
784 in the innermost loop.
786 * trans-expr.c (gfc_conv_function_call): Return int instead of
787 void. Use a local variable for has_alternate_specifier and
788 return it. Avoid modification of function type's return value
789 in place, since it may be shared.
790 * trans.h (has_alternate_specifier): Remove.
791 (gfc_conv_function_call): Change return type.
792 * trans-stmt.c (has_alternate_specifier): Remove.
793 (gfc_trans_call): Add a local has_alternate_specifier variable,
794 set it from gfc_conv_function_call return value.
796 2005-06-12 Richard Henderson <rth@redhat.com>
798 * trans-array.c (gfc_conv_descriptor_data_get): Rename from
799 gfc_conv_descriptor_data. Cast the result to the DATAPTR type.
800 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): New.
801 (gfc_trans_allocate_array_storage): Use them.
802 (gfc_array_allocate, gfc_array_deallocate): Likewise.
803 (gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor): Likewise.
804 (gfc_trans_deferred_array): Likewise.
805 * trans-expr.c (gfc_conv_function_call): Likewise.
806 (gfc_trans_subcomponent_assign): Likewise.
807 (gfc_trans_pointer_assignment): Likewise.
808 * trans-intrinsic.c (gfc_conv_allocated): Likewise.
809 * trans-types.c (gfc_array_descriptor_base): New.
810 (gfc_get_element_type): Use GFC_TYPE_ARRAY_DATAPTR_TYPE.
811 (gfc_get_array_descriptor_base): Break out from ...
812 (gfc_get_array_type_bounds): ... here. Create type variants.
813 * trans-array.h (gfc_conv_descriptor_data_get): Declare.
814 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): Declare.
816 2005-06-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
818 * trans-expr.c (gfc_conv_variable): POINTER results don't need f2c
819 calling conventions. Look at sym instead of sym->result.
820 * trans-types.c (gfc_sym_type): Remove workaround for frontend bug.
821 Remove condition which is always false with workaround removed.
822 (gfc_return_by_reference): Always look at sym, never at sym->result.
824 2005-06-11 Steven G. Kargl <kargls@comcast.net>
828 * trans-array.c (gfc_array_deallocate): pstat is new argument
829 (gfc_array_allocate): update gfc_array_deallocate() call.
830 (gfc_trans_deferred_array): ditto.
831 * trans-array.h: update gfc_array_deallocate() prototype.
832 * trans-decl.c (gfc_build_builtin_function_decls): update declaration
833 * trans-stmt.c (gfc_trans_deallocate): Implement STAT= feature.
835 2005-06-07 Jerry DeLisle <jvdelisle@verizon.net>
837 * intrinsic.texi: Add documentation for dcmplx, digits,
838 dim, idim, ddim, dot_product, dprod, dreal, and dtime.
840 2005-06-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
843 * trans-array.c (gfc_trans_array_constructor_value): Slightly reorder.
844 Generate correct exit condition in case of negative steps in
847 * invoke.texi: Fix description of flags required for compatibility
850 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
851 Erik Schnetter <schnetter@aei.mpg.de>
854 * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment,
855 remove FIXME comment.
857 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
859 * match.c (match_forall_iterator): Don't immediately give error if '='
860 is not followed by an expression.
862 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
863 Erik Edelmann <erik.edelmann@iki.fi>
865 * array.c (gfc_match_array_constructor): Disallow empty array
868 2005-06-03 Jerry DeLisle <jvdelisle@verizon.net>
870 * fortran/intrinsic.texi: Add documentation for
871 command_argument_count, conjg, dconjg, count,
872 cpu_time, cshift, date_and_time, dble, dfloat.
874 2005-06-01 Roger Sayle <roger@eyesopen.com>
876 * intrinsic.c (add_conv): No longer take a "simplify" argument as
877 its always gfc_convert_constant, instead take a "standard" argument.
878 (add_conversions): Change all existing calls of add_conv to pass
879 GFC_STD_F77 as appropriate. Additionally, if we're allowing GNU
880 extensions support integer-logical and logical-integer conversions.
881 (gfc_convert_type_warn): Warn about use the use of these conversions
882 as a extension when appropriate, i.e. with -pedantic.
883 * simplify.c (gfc_convert_constant): Add support for integer to
884 logical and logical to integer conversions, using gfc_int2log and
886 * arith.c (gfc_log2int, gfc_int2log): New functions.
887 * arith.h (gfc_log2int, gfc_int2log): Prototype here.
888 * gfortran.texi: Document this new GNU extension.
890 2005-06-01 Paul Thomas <pault@gcc.gnu.org>
892 * fortran/trans-expr.c (gfc_conv_variable): Clean up bracketting.
893 * fortran/trans-expr.c (gfc_conv_function_call): Insert spaces.
894 Correct comments and replace convert of integer_one_node with
897 2005-06-01 Jakub Jelinek <jakub@redhat.com>
900 * resolve.c (resolve_contained_fntype): Use sym->attr.untyped
901 to avoid giving error multiple times.
902 (resolve_entries): Don't error about BT_UNKNOWN here.
903 (resolve_unknown_f): Capitalize IMPLICIT for consistency.
904 (resolve_fntype): New function.
905 (gfc_resolve): Call resolve_fntype.
907 2005-06-01 Feng Wang <fengwang@nudt.edu.cn>
910 * fortran/io.c (resolve_tag): Fix error message.
912 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
914 * fortran/trans-decl.c: Don't include errors.h.
915 * fortran/Make-lang.in: Updates dependencies.
917 2005-05-31 Paul Thomas <pault@gcc.gnu.org>
922 * fortran/trans-array.c (gfc_conv_expr_descriptor): Obtain the
923 string length from the expression typespec character length value
924 and set temp_ss->stringlength and backend_decl. Obtain the
925 tree expression from gfc_conv_expr rather than gfc_conv_expr_val.
926 Dereference the expression to obtain the character.
927 * fortran/trans-expr.c (gfc_conv_component_ref): Remove the
928 dereference of scalar character pointer structure components.
929 * fortran/trans-expr.c (gfc_trans_subarray_assign): Obtain the
930 string length for the structure component from the component
933 2005-05-30 Roger Sayle <roger@eyesopen.com>
935 * gfortran.h (GFC_STD_LEGACY): New "standard" macro. Reindent.
936 * options.c (gfc_init_options): By default, allow legacy extensions
938 (gfc_post_options): Make -pedantic warn about legacy extensions
939 even with -std=legacy.
940 (gfc_handle_option): Make -std=gnu follow the default behaviour
941 of warning about legacy extensions, but allowing them. Make the
942 new -std=legacy accept everything and warn about nothing.
943 * lang.opt (std=legacy): New F95 command line option.
944 * invoke.texi: Document both -std=f2003 and -std=legacy.
945 * gfortran.texi: Explain the two types of extensions and document
946 how they are affected by the various -std= command line options.
948 2005-05-30 Kazu Hirata <kazu@cs.umass.edu>
950 * trans-expr.c: Remove trailing ^M.
952 * trans-expr.c: Fix comment typos.
954 2005-05-29 Paul Thomas <pault@gcc.gnu.org>
962 * fortran/trans-array.c (gfc_conv_resolve_dependencies): Add string
963 length to temp_ss for character pointer array assignments.
964 * fortran/trans-expr.c (gfc_conv_variable): Correct errors in
965 dereferencing of characters and character pointers.
966 * fortran/trans-expr.c (gfc_conv_function_call): Provide string
967 length as return argument for various kinds of handling of return.
968 Return a char[]* temporary for character pointer functions and
969 dereference the temporary upon return.
971 2005-05-29 Janne Blomqvist <jblomqvi@vipunen.hut.fi>
972 Steven G. Kargl <kargls@comcast.net>
975 * io.c (gfc_match_inquire): Implement constraints on UNIT and FILE usage.
977 2005-05-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
980 * io.c (format_item_1): Add check and extension warning for
983 2005-05-28 Steven G. Kargl <kargls@comcast.net>
985 * arith.c (gfc_arith_init_1): Fix off by one problem;
986 (gfc_check_integer_range): Chop extra bits in subnormal numbers.
988 2005-05-28 Jerry DeLisle <jvdelisle@verizon.net>
989 Steven G. Kargl <kargls@comcast.net>
991 * intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING
994 2005-05-27 Steven G. Kargl <kargls@comcast.net>
996 * trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force
997 like types in comparsion.
999 2005-05-26 Kazu Hirata <kazu@cs.umass.edu>
1001 * data.c, parse.c, trans-array.c, trans-decl.c,
1002 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
1003 trans.h: Fix comment typos. Follow spelling conventions.
1005 2005-05-22 Roger Sayle <roger@eyesopen.com>
1007 * gfortran.texi: Document some more GNU extensions.
1009 2005-05-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1011 * error.c (gfc_warning): Fix typo in comment.
1013 2005-05-18 Thomas Koenig <Thomas.Koenig@online.de>
1016 * fortran/iresolve.c (gfc_resolve_reshape): Add
1017 gfc_type_letter (BT_COMPLEX) for complex to
1018 to resolved function name.
1020 2005-05-18 Erik Edelmann <erik.edelmann@iki.fi>
1022 * array.c (gfc_match_array_constructor): Support [ ... ]
1023 style array constructors.
1025 2005-05-18 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1027 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_TRUNC
1028 and BUILT_IN_TRUNCF instead of BUILT_IN_FLOOR and BUILT_IN_FLOORF.
1029 * trans-intrinsic.c (build_fix_expr): Change 'op' argument
1030 to correct enum type.
1031 (gfc_conv_intrinsic_aint): Likewise. Clarify comment in front of
1032 function. Add default case to switch, deal with FIX_TRUNC_EXPR
1033 instead of FIX_FLOOR_EXPR.
1035 2005-05-18 Feng Wang <fengwang@nudt.edu.cn>
1038 * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to
1039 build character length.
1041 2005-05-17 Zdenek Dvorak <dvorakz@suse.cz>
1043 * trans-types.c (gfc_array_range_type): New variable.
1044 (gfc_init_types): Initialize gfc_array_range_type.
1045 (gfc_get_array_type_bounds): Use gfc_array_range_type.
1047 2005-05-17 Jakub Jelinek <jakub@redhat.com>
1050 * trans-stmt.c (generate_loop_for_temp_to_lhs): Remove SIZE and COUNT2
1051 arguments. If LSS is gfc_ss_terminator, increment COUNT1 by 1, instead
1052 of incrementing COUNT2 and using COUNT1+COUNT2 increment COUNT1 and use
1054 (generate_loop_for_rhs_to_temp): Likewise.
1055 (compute_overall_iter_number): Add INNER_SIZE_BODY argument.
1056 It non-NULL, add it to body.
1057 (allocate_temp_for_forall_nest_1): New function, split from
1058 allocate_temp_for_forall_nest.
1059 (allocate_temp_for_forall_nest): Add INNER_SIZE_BODY argument,
1060 propagate it down to compute_overall_iter_number. Use
1061 allocate_temp_for_forall_nest_1.
1062 (gfc_trans_assign_need_temp): Remove COUNT2. Call
1063 compute_inner_temp_size into a new stmtblock_t. Adjust calls to
1064 allocate_temp_for_forall_nest, generate_loop_for_rhs_to_temp
1065 and generate_loop_for_temp_to_lhs.
1066 (gfc_trans_pointer_assign_need_temp): Adjust calls to
1067 allocate_temp_for_forall_nest.
1068 (gfc_evaluate_where_mask): Call compute_inner_temp_size into a new
1069 stmtblock_t. Call compute_overall_iter_number just once, then
1070 allocate_temp_for_forall_nest_1 twice with the same size.
1071 Initialize mask indexes if nested_forall_info != NULL.
1072 (gfc_trans_where_2): Initialize mask indexes before calling
1073 gfc_trans_nested_forall_loop.
1075 2005-05-15 Feng Wang <fengwang@nudt.edu.cn>
1076 Jerry DeLisle <jvdelisle@verizon.net>
1079 * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to
1080 resolve ICE on assign of format label.
1081 * trans-io.c (set_string): add fold-convert to properly
1082 handle assigned format label in write.
1084 2005-05-13 Paul Brook <paul@codesourcery.com>
1086 * trans-stmt.c (gfc_trans_forall_1): Fix comment typo.
1088 2005-05-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1090 * trans-types.c (gfc_is_nodesc_array): Remove redundant check.
1092 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1095 * io.c (check_format): Look for literal characters inside
1098 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1100 * resolve.c (resolve_symbol): Copy 'pointer' and 'dimension'
1101 attribute from result symbol to function symbol.
1102 * trans-expr.c (gfc_conv_function_call): Look at sym->attr.dimension
1103 instead of sym->result->attr.dimension.
1105 2005-05-10 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1108 * gfortran.h (gfc_option): Add flag_f2c.
1109 * invoke.texi: Document '-ff2c' command line option. Adapt
1110 documentation for '-fno-second-underscore' and '-fno-underscoring'.
1111 * lang.opt (ff2c): New entry.
1112 * options.c (gfc-init_options): Set default calling convention
1113 to -fno-f2c. Mark -fsecond-underscore unset.
1114 (gfc_post_options): Set -fsecond-underscore if not explicitly set
1116 (handle_options): Set gfc_option.flag_f2c according to requested
1118 * trans-decl.c (gfc_get_extern_function_decl): Use special f2c
1119 intrinsics where necessary.
1120 (gfc_trans_deferred_vars): Change todo error to assertion.
1121 * trans-expr.c (gfc_conv_variable): Dereference access
1122 to hidden result argument.
1123 (gfc_conv_function_call): Add hidden result argument to argument
1124 list if f2c calling conventions requested. Slightly restructure
1125 tests. Convert result of default REAL function to requested type
1126 if f2c calling conventions are used. Dereference COMPLEX result
1128 * trans-types.c (gfc_sym_type): Return double for default REAL
1129 function if f2c cc are used.
1130 (gfc_return_by_reference): Slightly restructure logic. Return
1131 COMPLEX by reference depending on calling conventions.
1132 (gfc_get_function_type): Correctly make hidden result argument a
1133 pass-by-reference argument for COMPLEX. Remove old code which does
1134 this for derived types.
1136 2005-05-09 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1138 * match.c (gfc_match_return): Only require space after keyword when
1139 it is obligatory. Only give stdwarn to after matching is successful.
1140 * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns.
1142 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
1144 * intrinsic.texi: Fix typos.
1146 2005-05-07 Steven G. Kargl <kargls@comcast.net>
1148 * intrinsic.texi: Document ASSOCIATED and ATAN2. Update Bessel function
1149 description to include information about scalar arguments.
1151 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
1153 * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt,
1154 match.h, trans-array.h: Update copyright.
1156 2005-04-29 Tom Tromey <tromey@redhat.com>
1158 * f95-lang.c (poplevel): Updated for change to build_block.
1160 2005-04-29 Jakub Jelinek <jakub@redhat.com>
1164 * trans-expr.c (gfc_conv_variable): Handle return values in functions
1165 with alternate entry points.
1166 * resolve.c (resolve_entries): Remove unnecessary string termination
1167 after snprintf. Set result of entry master.
1168 If all entries have the same type, set entry master's type
1169 to that common type, otherwise set mixed_entry_master attribute.
1170 * trans-types.c (gfc_get_mixed_entry_union): New function.
1171 (gfc_get_function_type): Use it for mixed_entry_master functions.
1172 * gfortran.h (symbol_attribute): Add mixed_entry_master bit.
1173 * decl.c (gfc_match_entry): Set entry->result properly for
1175 * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over
1177 (build_entry_thunks): Handle return values in entry thunks.
1178 Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not
1179 shared between multiple contexts.
1180 (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from
1181 current_function_decl instead of sym->backend_decl. Skip over
1182 entry master's entry id argument. For mixed_entry_master entries or
1183 their results, return a COMPONENT_REF of the fake result.
1184 (gfc_trans_deferred_vars): Don't warn about missing return value if
1185 at least one entry point uses RESULT.
1186 (gfc_generate_function_code): For entry master returning
1187 CHARACTER, copy ts.cl->backend_decl to all entry result syms.
1188 * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return
1189 values optional just because they are in entry master.
1191 2005-04-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1193 * gfortran.h (gfc_namespace): Add seen_implicit_none field,
1194 Tobias forgot this in previous commit.
1196 2005-04-29 Paul Brook <paul@codesourcery.com>
1198 * trans-expr.c (gfc_conv_expr_present): Fix broken assert. Update
1201 2005-04-29 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1203 * gfortran.h (gfc_namespace): Add seen_implicit_none field.
1204 * symbol.c (gfc_set_implicit_none): Give error if there's a previous
1205 IMPLICIT NONE, set seen_implicit_none.
1206 (gfc_merge_new_implicit): Error if there's an IMPLICIT NONE statement.
1208 2005-04-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1210 * gfortran.h (gfc_gsymbol): Make name a const char *.
1211 * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
1214 2005-04-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1217 * resolve.c (resolve_actual_arglist): Issue an error if a statement
1218 functions is used as actual argument.
1220 2005-04-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1223 * interface.c (compare_parameter): Ignore type for EXPR_NULL
1224 only if type is BT_UNKNOWN.
1226 2005-04-25 Paul Brook <paul@codesourcery.com>
1227 Steven G. Kargl <kargls@comcast.net>
1230 * check.c (gfc_check_ichar_iachar): New function.
1231 * instinsic.h (gfc_check_ichar_iachar): Add prototype.
1232 * intrinsic.c (add_functions): Use it.
1233 * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
1234 character expression lengths.
1236 2005-04-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1239 * trans-common.c (translate_common): Cast offset and
1240 common_segment->offset to type int for warning message.
1242 2005-04-23 DJ Delorie <dj@redhat.com>
1244 * trans-decl.c: Adjust warning() callers.
1246 2005-04-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1248 * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as
1249 intermediate representation. Fix typo in comment.
1251 2005-04-21 Steven G. Kargl <kargls@comcast.net>
1253 * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation;
1254 simplify logic; Add a gcc_assert.
1256 2005-04-19 Steven G. Kargl <kargls@comcast.net>
1258 * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
1260 2005-04-19 Arnaud Desitter <arnaud.desitter@ouce.ox.ac.uk>
1261 Steven G. Kargl <kargls@comcast.net>
1263 * invoke.texi: Update -Waliasing description
1265 2005-04-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1268 * resolve.c (resolve_variable): If e->symtree is not set, this
1269 ought to be a FAILURE, and not a segfault.
1271 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
1278 * fortran/trans-io.c (gfc_build_io_library_fndecls): Create
1279 declaration for st_set_nml_var and st_set_nml_var_dim. Remove
1280 declarations of old namelist functions.
1281 (build_dt): Simplified call to transfer_namelist_element.
1282 (nml_get_addr_expr): Generates address expression for start of
1283 object data. New function.
1284 (nml_full_name): Qualified name for derived type components. New
1286 (transfer_namelist_element): Modified for calls to new functions
1287 and improved derived type handling.
1289 2005-04-17 Richard Guenther <rguenth@gcc.gnu.org>
1291 * scanner.c (gfc_next_char_literal): Reset truncation flag
1292 for lines ending in a comment for both fixed and free form.
1293 (load_line): Do not set truncated flag if only truncating
1296 2005-04-15 Richard Guenther <rguenth@gcc.gnu.org>
1299 * gfortran.h (gfc_linebuf): Add truncated field.
1300 * parse.c (next_statement): Handle warning for truncated
1302 * scanner.c (load_line): Return if line was truncated.
1303 No longer warn for truncated lines. Remove unused parameters.
1304 (load_file): Store load_line return value to linebuf.
1305 (gfc_error_recovery): Do not advance line at the end.
1307 2005-04-14 Steven G. Kargl <kargls@comcast.net>
1309 * gfortran.h (gfc_real_info): Add subnormal struct member.
1310 * arith.c (gfc_arith_init_1): Set it.
1311 (gfc_check_real_range): Use it.
1312 * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.).
1314 2005-04-12 Kazu Hirata <kazu@cs.umass.edu>
1316 * simplify.c: Fix a comment typo.
1318 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
1320 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
1322 2005-04-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1324 * simplify.c (gfc_simplify_nearest): Overhaul.
1326 2005-04-10 Kazu Hirata <kazu@cs.umass.edu>
1328 * interface.c: Fix a comment typo.
1330 2005-04-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1332 * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
1335 2005-04-09 Steven G. Kargl <kargls@comcast.net>
1337 * simplify.c (gfc_simplify_anint): Use mpfr_round()
1338 (gfc_simplify_dnint): ditto.
1339 (gfc_simplify_nint): ditto.
1341 2005-04-09 Andrew Pinski <pinskia@physics.uc.edu>
1344 * io.c (check_format): Allow an optional comma
1345 between descriptors.
1347 2005-04-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1349 * match.c (match_arithmetic_if): Remove gfc_ prefix and correct
1350 comment according to GNU coding style.
1351 (gfc_match_if): Remove gfc_ prefix in call to
1352 match_arithmetic_if.
1354 2005-04-08 Diego Novillo <dnovillo@redhat.com>
1356 * match.c (gfc_match_arithmetic_if): Declare static.
1358 2005-04-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1361 * match.c (gfc_match_arithmetic_if): New function to match an
1362 arithmetic IF statement.
1363 (gfc_match_if): Use gfc_match_arithmetic_if to match an
1364 arithmetic IF statement embedded in a simple IF statement.
1366 2005-04-07 Steven G. Kargl <kargls@comcast.net>
1368 * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
1370 2005-04-06 Steven G. Kargl <kargls@comcast.net>
1372 * invoke.texi: Remove documentation of -std=f90
1374 2005-04-06 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1376 * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
1377 non-pointer assignment.
1379 2005-04-05 Feng Wang <fengwang@nudt.edu.cn>
1384 * array.c (resolve_character_array_constructor): New function. Set
1385 constant character array's character length.
1386 (gfc_resolve_array_constructor): Use it.
1387 * decl.c (add_init_expr_to_sym): Set symbol and initializer character
1389 (gfc_set_constant_character_len): New function. Set constant character
1390 expression according the given length.
1391 * match.h (gfc_set_constant_character_len): Add prototype.
1393 2005-04-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1395 * intrinsic.texi: BES?? functions are not in the f95 standard.
1397 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1399 * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
1401 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1403 * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
1404 BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
1406 2005-04-02 Steven G. Kargl <kargls@comcast.net>
1408 * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
1410 2005-04-01 Kazu Hirata <kazu@cs.umass.edu>
1412 * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
1413 trans.h: Fix comment typos.
1415 2005-03-29 Steven G. Kargl <kargls@comcast.net>
1417 * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
1418 flag_default_integer, flag_default_real
1419 * invoke.texi: Update documentation
1420 * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8
1421 fdefault-integer-8, and fdefault-real-8 definitions.
1422 * options.c (gfc_init_options): Set option defaults
1423 (gfc_handle_option): Handle command line options.
1424 * trans-types.c (gfc_init_kinds): Use options.
1426 2005-03-29 Keith Besaw <kbesaw@us.ibm.com>
1428 * f95-lang.c (builtin_function): Process the attrs parameter
1429 and apply the "const" attribute to the builtin if found.
1431 2005-03-27 Steven G. Kargl <kargls@comcast.net>
1433 * intrinsic.texi: Document AIMAG, AINT, ALL
1435 2005-03-26 Steven G. Kargl <kargls@comcast.net>
1437 * arith.c (check_result): Fix illogical logic.
1439 2005-03-26 Canqun Yang <canqun@nudt.edu.cn>
1441 * trans-common.c (create_common): Build RECORD_NODE for common blocks
1442 contain no equivalence objects.
1443 (add_equivalences): New argument saw_equiv.
1444 (trans_common): New local variable saw_equiv.
1445 (finish_equivalences): Add a local variable dummy, Always pass true
1446 for the 3rd parameter to create_common.
1448 2005-03-25 Steven G. Kargl <kargls@comcast.net>
1450 * intrinsic.texi: Fix "make dvi"
1452 2005-03-24 Steven G. Kargl <kargls@comcast.net>
1454 * intrinsic.texi: New file.
1455 * gfortran.texi: Include it; white space change; fix typo.
1457 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
1459 * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
1461 2005-03-23 Steven Bosscher <stevenb@suse.de>
1463 * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
1464 * trans-array.c (gfc_trans_allocate_array_storage,
1465 gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
1466 gfc_conv_array_index_ref, gfc_trans_array_bound_check,
1467 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
1468 gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
1469 gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
1470 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1471 gfc_conv_expr_descriptor): Likewise.
1472 * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
1473 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
1474 * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
1475 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
1476 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1477 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
1478 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
1479 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
1480 gfc_conv_intrinsic_merge, prepare_arg_info,
1481 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
1482 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
1483 gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
1484 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
1485 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
1486 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
1488 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
1489 * trans.c (gfc_add_modify_expr): Likewise.
1491 2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1493 * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
1494 gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
1495 gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
1496 gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
1497 gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
1498 gfc_check_perror): new functions to check newly implemented
1500 * gfortran.h: adding symbols for new intrinsics.
1501 * intrinsic.c (add_functions): adding new intrinsics.
1502 (add_subroutines): adding new intrinsics.
1503 * intrinsic.h: prototype for all checking and resolving
1505 * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
1506 gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
1507 gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
1508 gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
1509 gfc_resolve_kill_sub, gfc_resolve_link_sub,
1510 gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
1511 gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
1512 gfc_resolve_perror): new functions to resolve intrinsics.
1513 * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
1516 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1518 * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
1519 in which the variable is declared.
1522 * resolve.c (was_declared): Also check for dummy attribute.
1524 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1526 * gfortran.h (arith): Remove ARITH_0TO0.
1527 * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
1528 (gfc_arith_power): Remove special casing of zero to integral
1531 2005-03-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1533 * Make-lang.in (fortran-warn): Remove -Wno-error.
1534 (expr.o-warn, resolve.o-warn, simplify.o-warn,
1535 trans-common.o-warn): Specify -Wno-error.
1537 2005-03-17 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1539 * trans-array.c (gfc_trans_static_array_pointer,
1540 get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
1541 comment and formatting typos.
1543 2005-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1545 * invoke.texi: Fix typos.
1547 2005-03-15 Zack Weinberg <zack@codesourcery.com>
1549 * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
1551 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
1553 * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
1554 to zero on label_tree.
1556 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
1559 * io.c (resolve_tag): Add checking on assigned label.
1560 (match_dt_format): Does not set symbol assign attribute.
1561 * match.c (gfc_match_goto):Does not set symbol assign attribute.
1562 * resolve.c (resolve_code): Add checking on assigned label.
1563 * trans-common.c (build_field): Deals with common variable assigned
1565 * trans-stmt.c (gfc_conv_label_variable): New function.
1566 (gfc_trans_label_assign): Use it.
1567 (gfc_trans_goto): Ditto.
1568 * trans-io.c (set_string): Ditto.
1569 * trans.h (gfc_conv_label_variable): Add prototype.
1571 2005-03-14 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1574 * symbol.c (check_conflict): A dummy argument can't be a statement
1577 2005-03-14 Zdenek Dvorak <dvorakz@suse.cz>
1579 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
1580 the argument of the shift to the unsigned type.
1582 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1585 * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
1587 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1590 * resolve.c (gfc_resolve): Check if character lengths are
1591 specification expressions.
1593 2005-03-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1596 * trans-array.c (gfc_stack_space_left): Remove unused variable.
1597 (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
1599 * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
1600 Remove declaration / prototype.
1601 * trans-common.c (build_equiv_decl): Give union a name. Check if
1602 it can be put on the stack.
1603 * trans-decl.c (gfc_stack_space_left): Move function here.
1604 (gfc_build_qualified_array): Fix comment typo.
1605 * trans.h (gfc_put_var_on_stack): Add prototype.
1607 2005-03-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1609 * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
1610 * decl.c, trans.c: Don't use C++ style comments.
1611 * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
1612 ifsrc): Give names to enums and use ENUM_BITFIELD.
1613 (gfc_access): Remove trailing comma.
1615 2005-03-05 Steven G. Kargl <kargls@comcast.net>
1618 * primary.c (match_complex_constant): Mangled complex constant may
1619 be an implied do-loop. Give implied do-loop matcher a chance.
1621 2005-03-05 Steven G. Kargl <kargls@comcast.net>
1624 * resolve.c (compare_shapes): New function.
1625 (resolve_operator): Use it.
1627 2005-03-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1629 * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
1630 type for COMPLEX constants.
1632 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1635 * trans-expr.c (gfc_conv_function_call): Correctly dereference
1636 argument from a pointer function also if it has a result clause.
1638 2005-03-04 Steven G. Kargl <kargls@comcast.net>
1640 * expr.c (gfc_copy_shape_excluding): Change && to ||.
1642 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1644 * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
1647 2005-02-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1651 * simplify.c (gfc_simplify_bound): Rename to ...
1652 (simplify_bound): ... this and overhaul.
1654 2005-02-28 Steven G. Kargl <kargl@gcc.gnu.org>
1656 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
1657 (gfc_conv_intrinsic_function): update function calls
1659 2005-02-27 Steven G. Kargl <kargl@gcc.gnu.org>
1662 * trans-types.c (gfc_max_integer_kind): Declare
1663 (gfc_init_kinds): Initialize it.
1664 * gfortran.h (gfc_max_integer_kind): extern it.
1665 * primary.c (match_boz_constant): Use it; remove gfortran extension
1666 of kind suffixes on BOZ literal constants
1669 2005-02-27 Steven G. Kargl <kargls@comcast.net>
1671 * arith.c (gfc_check_real_range): Remove multiple returns
1672 (check_result): New function.
1673 (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
1674 gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
1677 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1679 * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
1682 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-meunchen.de>
1684 Unrevert previously reverted patch. Adding this fix:
1685 * module.c (find_true_name): Deal with NULL module.
1687 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1689 Revert yesterday's patch:
1690 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1692 * gfortran.h (gfc_component, gfc_actual_arglist, ...
1693 ... argument. Copy string instead of pointing to it.
1695 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1697 * gfortran.h (gfc_get_namespace): Add second argument to prototype.
1698 * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
1700 * module.c (mio_namespace_ref, load_needed): Likewise.
1701 * parse.c (parse_interface, parse_contained): Likewise. Here the
1702 correct second argument matters.
1703 * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
1704 parent's implicit types if this is set.
1705 (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
1706 * trans-common.c (build_common_decl): Likewise.
1708 * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
1710 * symbol.c (gfc_set_default_type): Issue error only once, by setting
1711 and checking 'untyped' attribute.
1713 * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
1714 fields into new struct 'op' inside the 'value' union.
1715 * arith.c (eval_intrinsic): Adapt all users.
1716 * dependency.c (gfc_check_dependency): Likewise.
1717 * dump-parse-tree.c (gfc_show_expr): Likewise.
1718 * expr.c (gfc_get_expr): Don't clear removed fields.
1719 (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
1720 gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
1721 check_intrinsic_op): Adapt to new field names.
1722 * interface.c (gfc_extend_expr): Likewise. Also explicitly
1723 nullify 'esym' and 'isym' fields of new function call.
1724 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
1725 Adapt to renamed structure fields.
1726 * matchexp.c (build_node, match_level_1, match_expr): Likewise.
1727 * module.c (mio_expr): Likewise.
1728 * resolve.c (resolve_operator): Likewise.
1729 (gfc_find_forall_index): Likewise. Only look through operands
1730 if dealing with EXPR_OP
1731 * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
1732 * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
1733 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
1736 * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
1737 'name' a 'const char *'.
1738 (gfc_symbol): Likewise, also for 'module'.
1739 (gfc_symtree): Make 'name' a 'const char *'.
1740 (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
1741 (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
1743 (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
1744 initialize 'SYM->module'.
1745 * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
1746 pointer instead of empty string.
1747 * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
1748 * interface.c (gfc_compare_types): Adapt check to account for possible
1750 (compare_actual_formal): Check for NULL pointer instead of empty
1752 * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
1753 Add 'const' qualifier.
1754 (conv_name): Return a heap allocated string.
1755 (find_conv): Add 'const' qualifier to 'target'.
1756 (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
1757 (make_generic): Check for NULL pointer instead of empty string.
1758 (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
1759 (add_conv): No need to strcpy result from 'conv_name'.
1760 (sort_actual): Check for NULL pointer instead of empty string.
1761 * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
1763 * module.c (compare_true_names): Compare pointers instead of strings
1764 for 'module' member.
1765 (find_true_name): Initialize string fields with gfc_get_string.
1766 (mio_pool_string): New function.
1767 (mio_internal_string): Adapt comment.
1768 (mio_component_ref, mio_component, mio_actual_arg): Use
1769 'mio_pool_string' instead of 'mio_internal_string'.
1770 (mio_symbol_interface): Add 'const' qualifier to string arguments.
1771 Add level of indirection. Use 'mio_pool_string' instead of
1772 'mio_internal_string'.
1773 (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
1774 (write_common, write_symbol): Use 'mio_pool_string' instead of
1775 'mio_internal_string'.
1776 (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
1777 instead of empty string.
1778 (write_operator, write_generic): Pass correct type variable to
1779 'mio_symbol_interface'.
1780 (write_symtree): Use 'mio_pool_string' instead of
1781 'mio_internal_string'.
1782 * primary.c (match_keyword_arg): Adapt check to possible
1783 case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'.
1784 * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
1785 gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
1787 (ambiguous_symbol): Check for NULL pointer instead of empty string.
1788 (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
1790 * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
1791 pointer instead of empty string.
1792 * trans-decl.c (gfc_sym_mangled_identifier,
1793 gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
1794 gfc_get_symbol_decl): Likewise.
1795 * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
1796 argument. Copy string instead of pointing to it.
1798 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
1800 * intrinsic.h, st.c: Update copyright.
1802 2005-02-20 Steven G. Kargl <kargls@comcast.net>
1804 * symbol.c: Typos in comments.
1806 2005-02-20 Steven G. Kargl <kargls@comcast.net>
1808 * expr.c (gfc_type_convert_binary): Typo in comment.
1810 2005-02-19 Steven G. Kargl <kargls@comcast.net>
1812 * check.c (gfc_check_selected_int_kind): New function.
1813 * intrinsic.h: Prototype it.
1814 * intrinsic.c (add_function): Use it.
1815 * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
1816 BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
1818 2005-02-19 Steven G. Kargl <kargls@comcast.net>
1820 * check.c (gfc_check_int): improve checking of optional kind
1821 * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
1823 2005-02-19 Steven G. Kargl <kargls@comcast.net>
1825 * check.c (gfc_check_achar): New function
1826 * intrinsic.h: Prototype it.
1827 * intrinsic.c (add_function): Use it.
1829 2005-02-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1831 * trans-stmt.c (generate_loop_for_temp_to_lhs,
1832 generate_loop_for_rhs_to_temp): Remove if whose condition is
1835 2005-02-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1837 * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
1838 (gfc_use_derived): ... this function.
1840 2005-02-09 Richard Henderson <rth@redhat.com>
1842 * f95-lang.c (gfc_init_builtin_functions): Call
1843 build_common_builtin_nodes; do not define any functions handled
1846 2005-02-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1848 * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
1850 (gfc_is_constant_expr): Check 'ref' to determine if substring
1851 reference is constant.
1852 (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
1853 (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
1855 * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
1857 2005-02-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1859 * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
1860 gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
1861 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
1862 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
1863 gfc_add_procedure): Add argument.
1864 * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
1865 gfc_match_null, match_type_spec, match_attr_spec,
1866 gfc_match_formal_arglist, match_result, gfc_match_function_decl):
1867 Update callers to match.
1868 (gfc_match_entry) : Likewise, fix comment typo.
1869 (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
1870 access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
1871 gfc_match_derived_decl): Update callers.
1872 * interface.c (gfc_match_interface): Likewise.
1873 * match.c (gfc_match_label, gfc_add_flavor,
1874 gfc_match_call, gfc_match_common, gfc_match_block_data,
1875 gfc_match_namelist, gfc_match_module, gfc_match_st_function):
1877 * parse.c (parse_derived, parse_interface, parse_contained),
1878 primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
1879 * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
1880 * symbol.c (check_conflict, check_used): Add new 'name' argument,
1881 use when printing error message.
1882 (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
1883 gfc_add_generic, gfc_add_in_common, gfc_add_data,
1884 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
1885 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
1886 gfc_add_procedure): Add new 'name' argument. Pass along to
1887 check_conflict and check_used.
1888 (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
1889 gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
1890 gfc_add_pure, gfc_add_recursive, gfc_add_intent,
1891 gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
1892 argument in calls to any of the modified functions.
1894 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
1896 * gfortran.texi: Don't give last update date.
1898 2006-01-30 Richard Henderson <rth@redhat.com>
1900 * options.c (gfc_init_options): Zero flag_errno_math.
1902 2005-01-29 Paul Brook <paul@codesourcery.com>
1905 * check.c (real_or_complex_check): New function.
1906 (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
1907 * intrinsic.c (add_functions): Use new check functions.
1908 * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
1911 2005-01-29 Steven G. Kargl <kargls@comcast.net>
1914 * expr.c (gfc_check_assign): Check for conformance of logical operands
1916 2004-01-27 Steven Bosscher <stevenb@suse.de>
1918 * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
1919 TREE_USED for all labels.
1920 (gfc_trans_entry_master_switch): Use it instead of building a
1922 * trans-io.c (add_case): Likewise.
1923 * trans-stmt.c (gfc_trans_integer_select): Likewise.
1925 2004-01-23 Paul Brook <paul@codesourcery.com>
1926 Steven G. Kargl <kargls@comcast.net>
1929 * arith.c (gfc_convert_real): Remove sign handling.
1930 * primary.c (match_digits): Allow whitespace after initial sign.
1931 (match_real_const): Handle signs here. Allow whitespace after
1932 initial sign. Remove dead code.
1933 (match_const_complex_part): Remove.
1934 (match_complex_part): Use match_{real,integer}_const.
1935 (match_complex_constant): Cross-promote integer types.
1937 2005-01-23 James A. Morrison <phython@gcc.gnu.org>
1940 * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
1941 transpose_c8 for complex types.
1943 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
1945 * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
1946 trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
1947 trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
1948 Follow spelling conventions.
1950 2005-01-22 Bud Davis <bdavis9659@comcast.net>
1953 * trans-io.c (gfc_trans_inquire): Added code to support
1956 2005-01-22 Steven G. Kargl <kargls@comcast.net>
1958 * intrinsic.c (make_alias): Add standard argument.
1959 (add_functions): Update make_alias calls.
1961 2005-01-22 Paul Brook <paul@codesourcery.com>
1963 * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
1965 2005-01-22 Paul Brook <paul@codesourcery.com>
1967 * gfortran.h (gfc_check_access): Add prototype.
1968 * match.c (gfc_match_namelist): Remove TODO.
1969 * module.c (check_access): Rename ...
1970 (gfc_check_access): ... to this. Boolify. Update callers.
1971 * resolve.c (resolve_symbol): Check for private objects in public
1974 2005-01-22 Paul Brook <paul@codesourcery.com>
1976 * primary.c (gfc_match_rvalue): Only apply implicit type if variable
1977 does not have an explicit type.
1978 (gfc_match_variable): Resolve implicit derived types in all cases.
1979 Resolve contained function types from their own namespace, not the
1981 * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
1982 checking. Resolve from the contained namespace, not the parent.
1984 2005-01-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1987 * trans-const.c (gfc_conv_constant_to_tree): Give logical
1988 constants the correct type.
1991 * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
1993 (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
1996 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
1998 * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
1999 gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
2000 match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
2001 scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
2002 trans-io.c, trans-stmt.c, trans.c: Update copyright.
2004 2005-01-17 Ira Rosen <irar@il.ibm.com>
2006 * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
2008 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2011 * error.c (error_char): Line-buffer errors / warnings.
2013 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2015 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
2016 unsigned issue. Use build_int_cst instead of converting
2017 integer_zero_node. Remove unnecessary conversion.
2019 * trans-types.c (gfc_get_character_type_len): : Use
2020 gfc_charlen_type_node as basic type for the range field.
2022 * trans-intrinsic.c (build_fixbound_expr,
2023 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
2024 gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
2025 gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
2026 of converting 'integer_zero_node' or 'integer_one_node'
2028 (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
2030 (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
2031 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
2032 'build_int_cst' instead of converting 'integer_zero_node' or
2033 'integer_one_node' respectively.
2035 * trans-intrinsic.c (gfc_conv_intrinsic_index,
2036 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
2037 'gfc'-prefix from local variable, remove dead code, use correct
2038 type when inserting argument.
2040 * trans-intrinsic.c, trans-types.c: Update copyright years.
2042 2005-01-16 Steven G. Kargl <kargls@comcast.net>
2045 * resolve.c (check_case_overlap): Typo in comment.
2046 (validate_case_label_expr): Fix up kinds of case values
2047 (resolve_select): Properly handle kind mismatches.
2049 2004-01-16 Paul Brook <paul@codesourcery.com>
2052 * trans-common.c (translate_common): Remove duplicate function call.
2053 (finish_equivalences): Preserve alignment when biasing offsets.
2055 2005-01-15 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de
2057 * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
2058 ASCII-like character encoding.
2060 2005-01-14 Steven G. Kargl <kargls@comcast.net>
2062 * resolve.c (compare_case): Cleanup.
2064 2005-01-14 Steven G. Kargl <kargls@comcast.net>
2066 * resolve.c (compare_case): Give arguments correct type.
2068 2005-01-13 Kazu Hirata <kazu@cs.umass.edu>
2070 * iresolve.c, trans-common.c, trans-types.c: Fix comment
2073 2005-01-09 Paul Brook <paul@codesourcery.com>
2076 * trans-common.c (current_common, current_offset): Remove.
2077 (create_common): Add head argument.
2078 (align_segment): New function.
2079 (apply_segment_offset): New function.
2080 (translate_common): Merge code from new_segment. Handle alignment.
2081 (new_segment): Remove.
2082 (finish_equivalences): Ensure proper alignment.
2084 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2086 * trans-const.c: Don't include unused math.h.
2088 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
2089 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
2090 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
2091 trailing whitespace.
2092 (prepare_arg_info): Fix formatting, indenting and remove trailing
2094 (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
2095 trailing whitespace.
2097 * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
2098 gfc_constant_result, gfc_range_check, gfc_arith_power,
2099 eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
2100 gfc_real2complex, gfc_complex2int, gfc_complex2real,
2101 gfc_complex2complex): Fix whitespace issues.
2102 * check.c (must_be, type_check, numeric_check, int_or_real_check,
2103 logical_array_check, array_check, scalar_check, nonoptional_check,
2104 variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
2105 gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
2106 gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
2107 gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
2108 gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
2109 gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
2110 gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
2111 gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
2112 gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
2113 gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
2114 gfc_check_lbound, gfc_check_logical, min_max_args,
2115 gfc_check_min_max_integer, gfc_check_min_max_real,
2116 gfc_check_min_max_double, gfc_check_matmul,
2117 gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
2118 gfc_check_pack, gfc_check_precision, gfc_check_radix,
2119 gfc_check_range, gfc_check_real, gfc_check_repeat,
2120 gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
2121 gfc_check_set_exponent): Fix formatting issues.
2122 (gfc_check_size, gfc_check_sign): Alphabetize function order,
2123 remove whitespace-only line.
2124 (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
2125 gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
2126 gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
2127 gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
2128 gfc_check_random_number, gfc_check_random_seed,
2129 gfc_check_second_sub, gfc_check_system_clock,
2130 gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
2131 gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
2132 gfc_check_unlink_sub): Fix formatting issues.
2134 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2136 * gfortran.h: Remove outdated comment. Don't include stdio.h
2139 2005-01-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2141 * gfortranspec.c (lang_specific_driver): Change year to 2005 in
2142 output of 'gfortran --version'.
2144 2005-01-03 Steven G. Kargl <kargls@comcast.net>
2146 * arith.c: Add system.h; remove string.h
2152 * check.c: Remove stdlib.h and stdarg.h
2153 * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
2154 * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
2155 * f95-lang.c: Add system.h; remove stdio.h
2156 * interface.c: Add system.h; remove stdlib.h and string.h
2157 * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
2158 * io.c: Remove string.h
2160 * match.c: Remove stdarg.h and string.h
2161 * misc.c: Update copyright; add system.h; remove stdlib.h,
2162 string.h, and sys/stat.h
2163 * module.c: Add system.h; remove string.h, stdio.h, errno.h,
2164 unistd.h, and time.h
2165 * option.c: Remove string.h and stdlib.h
2167 * scanner.c: Update copyright; add system.h; remove stdlib.h,
2168 stdio.h, string.h, and strings.h
2169 * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
2170 * trans-array.c: Remove stdio.h and gmp.h
2171 * trans-const.c: Ditto
2172 * trans-expr.c: Ditto
2174 * trans-stmt.c: Ditto
2176 * trans-intrinsic.c: Remove stdio.h and string.h
2178 2004-12-29 Steven G. Kargl <kargls@comcast.net>
2180 * gfortran.h (gfc_case): fix typo in comment.
2182 2004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2184 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
2185 logical shift. Call fold. Remove 0-bit shift shortcut.
2186 (gfc_conv_intrinsic_ishftc): Convert first argument to at least
2187 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
2188 result if width(arg 1) < 4 bytes. Call fold.
2191 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
2192 in front of function to match the standard. Correct handling
2195 2004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
2197 * trans-expr.c (gfc_conv_cst_int_power): Only check for
2198 flag_unsafe_math_optimizations if we have a float type.
2200 2004-12-23 Steven G. Kargl <kargls@comcast.net>
2202 * gfortran.texi: Fix typo.
2204 2004-12-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2206 * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
2209 2004-12-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2212 * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
2213 (gfc_match_nullify): Make sure that ')' is in front of the end of
2216 * scanner.c (skip_fixed_comments): Fix typo in comment preceding
2219 2004-12-14 Richard Henderson <rth@redhat.com>
2221 * gfortran.h (gfc_expr.function.name): Make const.
2222 (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
2223 (gfc_get_string): Update prototype.
2224 * iresolve.c: Include tree.h.
2225 (string_node, HASH_SIZE, string_head, hash): Remove.
2226 (gfc_get_string): Use vsnprintf, get_identifier.
2227 (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
2228 * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
2229 (gfc_done_1): Don't call gfc_iresolve_done_1.
2230 * module.c (mio_allocated_string): Take and return const char *,
2231 instead of modifying char**.
2232 (mio_expr): Update to match.
2233 * resolve.c (pure_function): Constify name argument.
2234 (resolve_function): Constify name.
2235 * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
2237 2004-12-12 Richard Henderson <rth@redhat.com>
2239 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
2240 gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
2241 gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
2242 gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
2243 gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
2244 gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
2245 gfc_resolve_unpack: Use PREFIX.
2247 2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2250 * match.c (gfc_match_common): Skip whitespace.
2252 2004-12-12 Steven G. Kargl <kargls@comcast.net>
2255 * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
2256 gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
2257 integer kind check; Issue error for -std=f95 when needed.
2258 * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
2260 * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
2261 Promote arguments to same kind.
2263 2004-12-12 Steven G. Kargl <kargls@comcast.net>
2264 Paul Brook <paul@codesourcery.com>
2267 * resolve.c (gfc_resolve_iterator_expr): New function.
2268 (gfc_resolve_iterator): Use it. Add real_ok argument. Convert
2269 start, end and stride to correct type.
2270 (resolve_code): Pass extra argument.
2271 * array.c (resolve_array_list): Pass extra argument.
2272 * gfortran.h (gfc_resolve): Add prototype.
2273 * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
2274 Handle real type iterators.
2276 2004-12-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2279 * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
2280 same kind as C's 'int'.
2281 (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
2283 2004-12-08 Richard Henderson <rth@redhat.com>
2285 * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
2286 to the output expression.
2287 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
2289 (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
2292 2004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2295 * resolve.c (resolve_code): Impose correct restrictions on
2298 * decl.c (gfc_match_end): Use locus of END when eos is an error.
2300 2004-12-02 Steven G. Kargl <kargls@comcast.net>
2301 Paul Brook <paul@codesourcery.com>
2303 * check.c (gfc_check_flush, gfc_check_fnum): New functions.
2304 (gfc_check_fstat, gfc_check_fstat_sub): New functions.
2305 (gfc_check_stat, gfc_check_stat_sub): New functions.
2306 * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
2307 * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
2308 fstat, and stat to intrinsics symbol tables.
2309 * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
2310 (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
2311 * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
2312 (gfc_resolve_stat, gfc_resolve_flush): New functions.
2313 (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
2314 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
2316 2004-12-02 Steven G. Kargl <kargls@comcast.net>
2318 * intrinsic.c: Fix and add comments, fix function declarations
2319 (OPTIONAL,REQUIRED): New symbols
2320 (add_functions,add_subroutines): Use symbols
2321 (gmp.h): Remove unused include
2323 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
2325 * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
2328 2004-11-24 Steven Bosscher <stevenb@suse.de>
2330 * options.c (gfc_post_options): Don't clear flag_inline_functions.
2332 2004-11-20 Steven G. Kargl <kargls@comcast.net>
2334 * check.c (gfc_check_getcwd_sub): Fix seg fault.
2336 * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
2337 gfc_check_unlink,gfc_check_unlink_sub): New functions
2338 * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
2339 * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
2340 exit to intrinsics symbol tables.
2341 * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
2342 gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
2343 gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
2344 gfc_resolve_unlink_sub): Add and sort prototypes.
2345 * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
2346 gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
2347 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
2349 2004-11-16 Paul Brook <paul@codesourcery.com>
2352 * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
2353 (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
2354 * trans-types.c (gfc_get_dtype): Accept array type rather than element
2356 (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
2357 (gfc_get_array_type_bounds): Ditto.
2358 (gfc_get_derived_type): Recurse into derived type pointers.
2359 * trans-types.h (gfc_get_dtype): Add prototype.
2360 * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
2362 2004-11-15 Paul Brook <paul@codesourcery.com>
2364 * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
2366 2004-11-10 Paul Brook <paul@codesourcery.com>
2369 * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
2370 * trans-io.c (transfer_array_component): Ditto.
2372 2004-11-10 Paul Brook <paul@codesourcery.com>
2374 * invoke.texi: Fix typo.
2376 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
2378 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
2379 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
2380 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
2381 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
2382 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
2384 2004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2387 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
2389 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
2391 * gfortranspec.c: Replace GNU CC with GCC.
2393 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2395 * gfortranspec.c (lang_specific_driver): Change year to 2004.
2397 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2400 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
2403 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2406 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
2407 module procedures as if they were module variables.
2409 2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2414 * module.c (write_symbol1): Set module_name for dummy arguments.
2416 2004-11-02 Paul Brook <paul@codesourcery.com>
2418 * intrinsic.c (check_intrinsic_standard): Include error locus.
2420 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
2421 locus to check_intrinsic_standard.
2423 2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
2426 * gfortran.h: Change GFC_STD_* flags to more appropriate
2427 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
2428 gfc_option_t): Add field for warning about use of nonstandard
2430 * intrinsic.c (add_sym): Add parameter for standard version, check
2431 this against current standard.
2432 (add_sym_0): Pass standard parameter to add_sym.
2433 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
2434 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
2435 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
2436 (make_generic): Add parameter for standard, check this
2437 against currently selected standard.
2438 (add_functions, add_subroutines): Add parameter to tell which
2439 standard an intrinsic belongs to.
2440 (check_intrinsic_standard): New function.
2441 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
2442 (gfc_intrinsic_sub_interface): Ditto.
2443 * lang.opt: Add Wnonstd-intrinsics option.
2444 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
2446 (set_Wall): Add warning about nonstd intrinsics.
2447 (gfc_handle_option): Change to use new GFC_STD_* flags,
2449 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
2451 2004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
2453 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
2455 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2457 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
2459 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2461 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
2464 2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
2466 * check.c (gfc_check_rand): Allow missing optional argument.
2467 (gfc_check_irand): Ditto.
2468 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
2470 2004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
2472 PR fortran/13490, PR fortran/17912
2473 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
2474 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
2475 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
2476 warning when compiling with pedantic.
2477 * gcc/fortran/arith.c: Set minimum integer values to reflect
2478 realities of two's complement signed integers. Added
2481 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
2483 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
2484 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
2487 2004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2489 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
2491 (gfc_generate_function_code): Fix formatting issue.
2493 2004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2495 * module.c: Fix formatting issues.
2497 2004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2499 * module.c (mio_interface_rest): Set where member of interface
2502 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
2505 * options.c (gfc_handle_option): Add break after handing the
2508 2004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
2510 * arith.c: Fix formatting issues.
2512 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2515 * resolve.c (resolve_operator): Use correct operator name in message.
2517 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2519 * primary.c (match_boz_constant): Allow kind parameter suffixes.
2520 Move standard warning further to the front.
2522 2004-10-07 Kazu Hirata <kazu@cs.umass.edu>
2524 * trans-stmt.c: Fix a comment typo.
2526 2004-10-07 Paul Brook <paul@codesourcery.com>
2529 * trans-array.c (gfc_trans_deferred_array): Leave use associated
2532 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2535 * simplify.c (twos_complement): New function.
2536 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
2538 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
2540 2004-10-06 Paul Brook <paul@codesourcery.com>
2542 * trans-stmt.c (gfc_trans_simple_do): New function.
2543 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
2544 loop. Update comments.
2546 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2549 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
2553 * intrinsic.c (add_sym_5): Remove.
2554 (add_subroutines): Add resolution function for MVBITS.
2555 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
2557 * iresolve.c (gfc_resolve_mvbits): New function.
2558 (gfc_resolve_random_number): Remove empty line at end of function.
2560 * trans-const.c (gfc_build_cstring_const): New function.
2561 (gfc_init_cst): Use new function.
2562 * trans-const.h (gfc_build_cstring_const): Add prototype.
2563 * trans-io.c (set_string, set_error_locus): Use new function.
2564 * trans-stmt.c (gfc_trans_goto): Use new function.
2567 * parse.c (accept_statement): Don't treat END DO like END IF and
2569 (parse_do_block): Generate possible END DO label inside END DO
2573 * check.c (gfc_check_system_sub): New function.
2574 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
2575 * intrinsic.c (add_functions): Add 'system'.
2576 (add_subroutines): Add 'system'.
2577 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
2578 Move prototypes to other suborutines.
2579 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
2581 (gfc_resolve_system_clock): Fix formatting of prototype.
2582 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
2584 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
2587 2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
2589 * scanner.c (preprocessor_line): Accept preprocessor lines without
2590 file names. Check file names for closing quotes. Handle escaped
2591 quotes in file names.
2593 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2594 Paul Brook <paul@codesourcery.com>
2596 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
2597 Use gfc_get_expr_charlen.
2598 * trans-expr.c (gfc_get_expr_charlen): New function.
2599 * trans.h (gfc_get_expr_charlen): Add prototype.
2601 2004-10-04 Kazu Hirata <kazu@cs.umass.edu>
2603 * trans-intrinsic.c: Fix a comment typo.
2605 2004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2607 * simplify.c (range_check): Remove blank line at beginning of function.
2608 (gfc_simplify_dint): Same at end of function.
2609 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
2610 (gfc_simplify_bound): Fix indentation.
2611 (gfc_simplify_log10): Simplify calculation.
2612 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
2614 (gfc_simplify_nearest): Same at end of function.
2615 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
2617 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
2618 gfc_simplify_spacing): Simplify calulations.
2620 2004-10-03 Feng Wang <fengwang@nudt.edu.cn>
2622 * trans-intrinsic.c: Fix comments on spacing and rrspacing
2623 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
2625 2004-10-01 Jan Hubicka <jh@suse.cz>
2627 * f95-lang.c (gfc_expand_function): Update call of
2628 tree_rest_of_compilation.
2629 * trans-decl.c (gfc_generate_constructors): Likewise.
2631 2004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2633 * trans-intrinsic.c: Comment fixes.
2635 2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2637 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
2639 2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2641 * trans-types.c (gfc_return_by_reference): Remove superfluous
2644 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
2645 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
2648 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
2649 function to determine return type.
2651 2004-09-20 Jan Hubicka <jh@suse.cz>
2653 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
2655 (gfc_generate_function_code): Likewise.
2657 2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2660 * simplify.c (gfc_simplify_reshape): Set shape of return value
2663 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
2664 Zack Weinberg <zack@codesourcery.com>
2666 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
2667 enumeration constants.
2669 2004-09-17 Paul Brook <paul@codesourcery.com>
2671 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
2672 (gfc_linebuf_header_size): Define.
2673 * scanner.c (load_file): Use it.
2675 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
2677 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
2678 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
2679 resolve.c, scanner.c, trans-array.c, trans-array.h,
2680 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
2681 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
2682 trans.h: Fix comment typos. Follow spelling conventions.
2684 2004-09-16 Victor Leikehman <lei@il.ibm.com>
2687 * trans-io.c (transfer_array_component): New function.
2688 (transfer_expr): For array fields, call transfer_array_component.
2690 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
2692 * gfortran.texi: Fix a typo.
2694 2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
2696 * parse.c (eof_buf): Rename eof to eof_buf.
2697 (unexpected_eof): Same.
2698 (gfc_parse_file): Same.
2700 2004-09-15 Steven G. Kargl <kargls@comcast.net>
2702 * check.c (gfc_check_getcwd_sub): New function.
2703 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
2704 * intrinsic.c (add_functions): Add function definition;
2706 * intrinsic.c (add_subroutines): Add subroutine definitions.
2707 * intrinsic.h: Add prototypes.
2708 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
2710 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
2712 2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2715 * module.c (write_symbol): Don't fill in module name here.
2716 (write_symbol0): Fill in here instead.
2718 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
2720 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
2721 trans-array.c, trans-common.c, trans-expr.c,
2722 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
2723 comment typos. Follow spelling conventions.
2725 2004-09-09 Paul Brook <paul@codesourcery.com>
2727 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
2729 2004-09-08 Paul Brook <paul@codesourcery.com>
2731 * array.c: Don't include assert.h.
2732 * data.c: Don't include assert.h. Replace assert and abort with
2733 gcc_assert and gcc_unreachable.
2734 * dependency.c: Ditto.
2735 * f95-lang.c: Ditto.
2736 * iresolve.c: Ditto.
2738 * simplify.c: Ditto.
2740 * trans-array.c: Ditto.
2741 * trans-common.c: Ditto.
2742 * trans-const.c: Ditto.
2743 * trans-decl.c: Ditto.
2744 * trans-expr.c: Ditto.
2745 * trans-intrinsic.c: Ditto.
2746 * trans-io.c: Ditto.
2747 * trans-stmt.c: Ditto.
2748 * trans-types.c: Ditto.
2751 2004-09-07 Per Bothner <per@bothner.com>
2752 Paul Brook <paul@codesourcery.com>
2754 * error.c (show_locus): Handle mapped locations.
2755 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
2756 * gfortran.h: Include input.h.
2757 (struct gfc_linebuf): Use source_location.
2758 * scanner.c (get_file): Initialize linemap.
2759 (preprocessor_line): Pass extra argument to get_file.
2760 (load_file): Ditto. Setup linemap.
2761 (gfc_new_file): Handle mapped locations.
2762 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
2763 Set decl source locations.
2764 (gfc_trans_common): Set blank common block location.
2765 * trans-decl.c (gfc_set_decl_location): New function.
2766 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
2767 (trans_function_start): Move call to gfc_set_backend_locus..
2768 (build_function_decl): ... to here.
2769 (build_entry_thunks): Set and restore the backend locus.
2770 (gfc_generate_constructors): Remove excess arguments to
2771 init_function_start.
2772 (gfc_generate_block_data): Add comments. Set the decl locus.
2773 * trans-io.c (set_error_locus): Handle mapped locations.
2774 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
2775 (gfc_trans_code): Use SET_EXPR_LOCATION.
2776 (gfc_generate_code): Override the location of the new symbol.
2777 * trans.h (gfc_set_decl_location): Add prototype.
2779 2004-08-31 Paul Brook <paul@codesourcery.com>
2781 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
2783 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2786 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
2789 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2794 * resolve.c (resolve_transfer): New function.
2795 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
2797 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2800 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
2803 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2805 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
2807 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2810 * trans-types.c (gfc_return_by_reference): Remove TODO error,
2811 add comment pointing out possible issue WRT compatibility with g77.
2813 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2815 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
2816 all occurences of 'gfc_strlen_type_node' by
2817 'gfc_charlen_type_node'.
2818 * trans-types.h: Same. Also update comment accordingly.
2820 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2822 * primary.c: Update copyright boilerplate to say GCC.
2823 * f95-lang.c: Change initial comment to say gfortran.
2825 2004-08-31 Paul Brook <paul@codesourcery.com>
2827 * trans-types.h: Add comments.
2828 (intmax_type_node, string_type_node, const_string_type_node): Remove.
2830 2004-08-30 Richard Henderson <rth@redhat.com>
2832 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
2833 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
2834 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
2835 c_long, c_long_long.
2836 (gfc_logical_info): Add c_bool.
2837 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
2838 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
2839 rather than gfc_int[48]_type_node for allocate choice.
2840 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
2841 local copies of some kind type nodes.
2842 (gfc_build_builtin_function_decls): Likewise.
2843 * trans-expr.c (gfc_conv_power_op): Likewise.
2844 * trans-intrinsic.c (gfc_conv_intrinsic_index,
2845 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
2846 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
2847 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
2848 gfc_trans_character_select, gfc_trans_allocate): Likewise.
2849 * trans-io.c (gfc_pint4_type_node): Move into ...
2850 (gfc_build_io_library_fndecls): ... here. Cache local copies of
2851 some kind type nodes.
2852 * trans-types.c (gfc_type_nodes): Remove.
2853 (gfc_character1_type_node, gfc_strlen_type_node): New.
2854 (gfc_integer_types, gfc_logical_types): New.
2855 (gfc_real_types, gfc_complex_types): New.
2856 (gfc_init_kinds): Fill in real mode_precision.
2857 (gfc_build_int_type, gfc_build_real_type): New.
2858 (gfc_build_complex_type, gfc_build_logical_type): New.
2859 (c_size_t_size): New.
2860 (gfc_init_types): Loop over kinds.
2861 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
2862 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
2863 (gfc_get_character_type_len): Likewise.
2864 (gfc_type_for_size): Loop over kinds; use a reduced set of
2865 unsigned type nodes.
2866 (gfc_type_for_mode): Loop over kinds.
2867 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
2868 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
2869 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
2870 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
2871 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
2872 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
2873 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
2874 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
2875 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
2876 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
2877 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
2878 gfc_complex8_type_node, gfc_complex16_type_node,
2879 gfc_logical1_type_node, gfc_logical2_type_node,
2880 gfc_logical4_type_node, gfc_logical8_type_node,
2881 gfc_logical16_type_node, gfc_strlen_kind): Remove.
2882 (gfc_character1_type_node): Turn in to a variable.
2883 (gfc_strlen_type_node): Likewise.
2885 2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2887 * gfortran.h (gfc_namespace): Add new field is_block_data.
2888 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
2889 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
2890 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
2891 * trans.h (gfc_generate_block_data): Add prototype.
2892 * trans-decl.c (gfc_generate_block_data): New function.
2894 2004-08-29 Richard Henderson <rth@redhat.com>
2896 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
2897 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
2898 than two HOST_WIDE_INT.
2900 2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2903 * decl.c (free_variable, free_value, gfc_free_data, var_list,
2904 var_element, top_var_list, match_data_constant, top_val_list,
2905 gfc_match_data): Move here from match.c.
2906 (match_old_style_init): New function.
2907 (variable_decl): Match old-style initialization.
2908 * expr.c (gfc_get_variable_expr): New function.
2909 * gfortran.h (gfc_get_variable_expr): Add prototype.
2910 * gfortran.texi: Start documentation for supported extensions.
2911 * match.c: Remove the functions moved to decl.c.
2912 * match.h (gfc_match_data): Move prototype to under decl.c.
2913 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
2916 2004-08-29 Steven G. Kargl <kargls@comcast.net>
2917 Paul Brook <paul@codesourcery.com>
2919 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
2920 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
2921 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
2922 (build_builtin_fntypes): New function.
2923 (gfc_init_builtin_functions): Use it.
2924 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
2925 and GFC_ISYM_ERF{,C}.
2926 (gfc_c_int_kind): Declare.
2927 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
2928 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
2929 gfc_resolve_g77_math1): Add prototypes.
2930 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
2931 * mathbuiltins.def: Add comment. Change third argument. Use
2932 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
2933 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
2934 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
2935 * trans-types.c (gfc_c_int_kind): Declare.
2936 (gfc_init_kinds): Set it.
2938 2004-08-29 Steven G. Kargl <kargls@comcast.net>
2939 Paul Brook <paul@codesourcery.com>
2941 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
2942 (gfc_check_f, gfc_simplify_f): Add f0.
2943 * intrinsic.c (do_check): Call f0. Flatten.
2944 (add_sym_0): Fix prototype. Set f0.
2945 (add_functions): Add getgid, getgid and getuid.
2946 (resolve_intrinsic): Remove obsolete comment.
2947 (do_simplify): Call f0.
2948 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
2949 gfc_resolve_getuid): Add prototypes.
2950 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
2951 gfc_resolve_getuid): New functions.
2952 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
2955 2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2957 * error.c (gfc_error_init_1): Remove blank line in front of
2958 function body. Add missing blank.
2959 (gfc_buffer_error, error_char, error_string): Remove blank line in
2960 front of function body.
2961 (show_locus): Add comma in comment.
2962 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
2963 gfc_push_error, gfc_pop_error): Remove blank line in front of
2965 (gfc_get_errors): Typo fix in comment in front of function. Remove
2966 blank line in front of function body.
2968 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2970 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
2971 variable declaration of same name.
2972 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
2973 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
2974 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
2975 Replace all calls to gfc_default_*_kind with variable accesses.
2976 * trans-types.c: Same as above.
2977 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
2978 static qualifier. Replace all occurences.
2979 (gfc_default_*_kind): Remove functions.
2981 2004-08-26 Richard Henderson <rth@redhat.com>
2983 * arith.c: Include system.h, not real system headers.
2984 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
2985 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
2986 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
2987 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
2988 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
2989 gfc_index_integer_kind, gfc_default_integer_kind,
2990 gfc_default_real_kind,gfc_default_double_kind,
2991 gfc_default_character_kind, gfc_default_logical_kind,
2992 gfc_default_complex_kind, validate_integer, validate_real,
2993 validate_logical, validate_character,
2994 gfc_validate_kind): Move to trans-types.c.
2995 (gfc_set_model_kind): Use gfc_validate_kind.
2996 (gfc_set_model): Just copy the current precision to default.
2997 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
2998 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
2999 * gfortran.h: Update file commentary.
3000 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
3001 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
3002 gfc_default_double_kind_1, gfc_default_character_kind_1,
3003 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
3004 (gfc_init_kinds): New.
3005 (gfc_init_types): Don't set gfc_index_integer_kind here.
3006 * trans-types.h (gfc_init_kinds): Declare.
3007 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
3009 2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3011 * check.c (gfc_check_atan2): New function.
3012 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
3013 * intrinsic.h (gfc_check_atan2): Add prototype.
3015 2004-08-25 Richard Henderson <rth@redhat.com>
3017 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
3018 false and we don't validate the kind.
3019 (gfc_check_integer_range, gfc_check_real_range): Update to match.
3020 * check.c (kind_check): Likewise.
3021 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
3022 (match_char_spec, match_logical_spec): Likewise.
3023 * gfortran.h (gfc_validate_kind): Likewise.
3024 * options.c (gfc_handle_option): Likewise.
3025 * primary.c (match_integer_constant, match_real_constant,
3026 match_string_constant, match_logical_constant,
3027 match_const_complex_part): Likewise.
3028 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
3029 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
3030 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
3031 gfc_simplify_maxexponent, gfc_simplify_minexponent,
3032 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
3033 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
3034 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
3035 gfc_simplify_tiny): Likewise.
3036 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
3037 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
3038 prepare_arg_info): Likewise.
3040 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3042 * expr.c (gfc_check_assign): Add comment. Add new warning.
3043 * trans-expr.c (gfc_conv_function_call): Correctly dereference
3044 result of pointer valued function when not in pointer assignment.
3046 2004-08-25 Paul Brook <paul@codesourcery.com>
3048 * config-lang.in: Remove dead commented line.
3049 * module.c: Replace g95 with gfortran in comment.
3051 2004-08-25 Paul Brook <paul@codesourcery.com>
3054 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
3056 2004-08-25 Paul Brook <paul@codesourcery.com>
3059 * trans-array.c (gfc_trans_allocate_temp_array): Remove
3060 string_length argument.
3061 (gfc_trans_array_ctor_element): New function.
3062 (gfc_trans_array_constructor_subarray): Use it.
3063 (gfc_trans_array_constructor_value): Ditto. Handle constant
3065 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
3066 (gfc_trans_array_constructor): Use them.
3067 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
3068 (gfc_conv_ss_descriptor): Remember section string length.
3069 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
3070 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
3071 (gfc_conv_expr_descriptor): Ditto.
3072 (gfc_conv_loop_setup): Ditto. Spelling fixes.
3073 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
3074 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
3075 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
3076 (gfc_conv_variable): Set string_length from section.
3077 (gfc_conv_function_call): Remove extra argument.
3078 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
3079 * trans-types.c (gfc_get_character_type_len): New function.
3080 (gfc_get_character_type): Use it.
3081 (gfc_get_dtype): Return zero for internal types.
3082 * trans-types.h (gfc_get_character_type_len): Add prototype.
3083 * trans.h (struct gfc_ss): Move string_length out of union.
3085 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3087 * trans.h (build2_v, build3_v): New macros.
3089 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
3091 * trans-array.c (gfc_conv_descriptor_data,
3092 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
3093 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
3094 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
3095 gfc_trans_allocate_temp_array,
3096 gfc_trans_array_constructor_subarray,
3097 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
3098 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
3099 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
3100 gfc_conv_array_ref, gfc_trans_preloop_setup,
3101 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
3102 gfc_conv_loop_setup, gfc_array_init_size,
3103 gfc_conv_array_initializer, gfc_trans_array_bounds,
3104 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
3105 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
3106 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
3107 of build and build_v as appropriate.
3108 * trans-common.c (create_common): Same.
3109 * trans-decl.c (gfc_trans_auto_character_variable,
3110 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
3111 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
3112 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
3113 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
3114 gfc_conv_expr_op, gfc_conv_function_call,
3115 gfc_trans_structure_assign): Same.
3116 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
3117 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
3118 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
3119 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
3120 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
3121 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
3122 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
3123 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
3124 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
3125 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
3126 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
3127 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
3128 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
3129 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
3130 gfc_conv_intrinsic_iargc): Same.
3131 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
3132 set_flag, add_case, io_result, transfer_namelist_element,
3133 transfer_expr): Same.
3134 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
3135 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
3136 gfc_trans_integer_select, gfc_trans_logical_select,
3137 gfc_trans_character_select, gfc_trans_forall_loop,
3138 gfc_trans_nested_forall_loop, gfc_do_allocate,
3139 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
3140 compute_inner_temp_size, compute_overall_iter_number,
3141 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
3142 gfc_trans_forall_1, gfc_evaluate_where_mask,
3143 gfc_trans_where_assign, gfc_trans_allocate): Same.
3144 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
3145 * trans.c (gfc_add_modify_expr, gfc_finish_block,
3146 gfc_build_array_ref, gfc_build_function_call,
3147 gfc_trans_runtime_check): Same.
3149 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3151 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
3152 build_int_cst to build_int_cst_wide in accordance to Nathan's
3155 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
3157 * trans-array.c (gfc_trans_array_constructor_value): Adjust
3158 build_int_cst calls.
3159 * trans-const.c (gfc_build_string_const, gfc_init_constants,
3160 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
3161 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
3162 gfc_trans_entry_master_switch): Likewise.
3163 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
3164 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
3165 * trans-io.c (add_case, set_error_locus,
3166 transfer_namelist_element, transfer_expr): Likewise.
3167 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
3168 gfc_trans_stop, gfc_trans_character_select): Likewise.
3169 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
3170 * trans.c (gfc_trans_runtime_check): Likewise.
3172 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3174 * trans-decl.c, trans-types.c: Add and remove blank lines as
3177 2004-08-24 Richard Henderson <rth@redhat.com>
3179 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
3181 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3183 * resolve.c (merge_argument_lists): Revert unintentionally
3186 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3188 * trans-decl.c (build_function_decl): Fix spelling in comment.
3189 (build_entry_thunks): Remove code with no function.
3190 (gfc_build_intrinsic_function_decls): Remove empty line.
3192 * resolve.c (resolve_entries): Fix a bunch of comment typos.
3194 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3196 * f95-lang.c (gfc_init_decl_processing): Adjust
3197 build_common_tree_nodes call.
3199 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3201 * trans-types.c: Spelling and formatting fixes.
3203 2004-08-23 Richard Henderson <rth@redhat.com>
3205 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
3206 of going through an intermediate string. Fix 32/64 int/long bug.
3208 2004-08-23 Eric Christopher <echristo@redhat.com>
3210 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
3211 usage. Use build_vector_type_for_mode for vector types.
3213 2004-08-22 Richard Henderson <rth@redhat.com>
3216 * data.c (find_con_by_offset): Search ordered list; handle
3217 elements with repeat counts.
3218 (gfc_assign_data_value_range): New.
3219 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
3220 (gfc_assign_data_value_range): Declare.
3221 * match.c (top_val_list): Extract repeat count into a temporary.
3222 * resolve.c (values): Make left unsigned.
3223 (next_data_value): Don't decrement left.
3224 (check_data_variable): Use gfc_assign_data_value_range.
3226 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3228 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
3230 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3232 * check.c (gfc_check_reduction): Rename to ...
3233 (check_reduction): ... this. Make static. Don't check type of
3235 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
3236 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
3237 SUM to use new check functions.
3238 (check_specific): Change logic to call new functions.
3239 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
3241 (gfc_check_reduction): Remove prototype.
3243 2004-08-20 Paul Brook <paul@codesourcery.com>
3244 Canqun Yang <canqun@nudt.edu.cn>
3247 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
3248 for automatic arrays.
3249 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
3251 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3255 * match.c (match_simple_forall, match_simple_where): Forward-declare.
3256 (gfc_match_if): Order statement list alphabetically, add WHERE and
3257 FORALL, remove double PAUSE.
3258 (gfc_match_simple_where, match_forall_header,
3259 gfc_match_simple_forall): New functions.
3260 (gfc_match_forall): Use match_forall_header.
3262 2004-08-19 Paul Brook <paul@codesourcery.com>
3265 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
3266 * symbol.c (gfc_clear_attr): Use memset.
3268 2004-08-19 Paul Brook <paul@codesourcery.com>
3272 * data.c (assign_substring_data_value): Remove.
3273 (create_character_intializer): New function.
3274 (gfc_assign_data_value): Track the typespec for the current
3275 subobject. Use create_character_intializer.
3277 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
3280 * check.c (gfc_check_reduction): New function.
3281 (gfc_check_minval_maxval): Removed.
3282 (gfc_check_product): Removed.
3283 (gfc_check_sum): Removed.
3284 * intrinsic.h: Add/remove declarations for these.
3285 * gfortran.h: Add field f3red to union gfc_check_f.
3286 * intrinsic.c (add_sym_3red): New function.
3287 (add_functions): Register maxval, minval, product, and sum intrinsics
3288 through add_sym_3red.
3289 (check_specific): Handle f3red union field.
3290 * iresolve.c: Whitespace change.
3292 2004-08-18 Paul Brook <paul@codesourcery.com>
3294 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
3296 2004-08-18 Victor Leikehman <lei@il.ibm.com>
3299 * trans-io.c (transfer_namelist_element): New. Recursively handle
3300 derived-type variables. Pass string lengths.
3301 (build_dt): Code moved to build_namelist, with some
3302 changes and additions.
3303 (gfc_build_io_library_fndecls): Declare the fifth
3304 argument in st_set_nml_var_char -- string_length.
3306 2004-08-17 Paul Brook <paul@codesourcery.com>
3307 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3310 * decl.c (get_proc_name): Update mystery comment.
3311 (gfc_match_entry): Check for errors earlier. Add entry point to list.
3312 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
3313 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
3314 (struct gfc_entry_list): Define.
3315 (gfc_get_entry_list): Define.
3316 (struct gfc_namespace): Add refs and entries.
3317 (enum gfc_exec_op): Add EXEC_ENTRY.
3318 (struct gfc_code): Add ext.entry.
3319 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
3320 (mio_symbol_attribute): Don't save/reture addr->entry.
3321 (mio_namespace_ref): Refcount namespaces.
3322 * parse.c (accept_statement): Handle ST_ENTRY.
3323 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
3324 (parse_contained): Fixup sibling references to entry points
3325 after parsing the procedure body.
3326 * resolve.c (resolve_contained_fntype): New function.
3327 (merge_argument_lists, resolve_entries): New functions.
3328 (resolve_contained_functions): Use them.
3329 (resolve_code): Handle EXEC_ENTRY.
3330 (gfc_resolve): Call resolve_entries.
3331 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
3332 * symbol.c (gfc_get_namespace): Refcount namespaces.
3333 (gfc_free_namespace): Ditto.
3334 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
3335 optional when multiple entry points are present.
3336 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
3337 (gfc_get_extern_function_decl): Add assertion. Fix coment.
3338 (create_function_arglist, trans_function_start, build_entry_thunks):
3340 (gfc_build_function_decl): Rename ...
3341 (build_function_decl): ... to this.
3342 (gfc_create_function_decl): New function.
3343 (gfc_generate_contained_functions): Use it.
3344 (gfc_trans_entry_master_switch): New function.
3345 (gfc_generate_function_code): Use new functions.
3346 * trans-stmt.c (gfc_trans_entry): New function.
3347 * trans-stmt.h (gfc_trans_entry): Add prototype.
3348 * trans-types.c (gfc_get_function_type): Add entry point argument.
3349 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
3350 (gfc_generate_module_code): Call gfc_create_function_decl.
3351 * trans.h (gfc_build_function_decl): Remove.
3352 (gfc_create_function_decl): Add prototype.
3354 2004-08-15 Andrew Pinski <apinski@apple.com>
3357 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
3358 for cabs{,f} and copysign{,f}.
3359 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
3360 (gfor_fndecl_math_cabs): Delete.
3361 (gfor_fndecl_math_sign4): Delete.
3362 (gfor_fndecl_math_sign8): Delete.
3363 (gfc_build_intrinsic_function_decls): Remove the
3364 initializing of cabs{,f} and copysign{,f} functions.
3365 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
3366 instead of the functions definitions.
3367 (gfc_conv_intrinsic_sign): Likewise.
3368 * trans.h (gfor_fndecl_math_cabsf): Delete.
3369 (gfor_fndecl_math_cabs): Delete.
3370 (gfor_fndecl_math_sign4): Delete.
3371 (gfor_fndecl_math_sign8): Delete.
3373 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
3375 * trans-array.c (gfc_trans_array_constructor_value): Use
3377 * trans-const.c (gfc_build_string_const,
3378 gfc_init_constants, gfc_conv_mpz_to_tree,
3379 gfc_conv_constant_to_tree): Likewise.
3380 * trans-decl.c (gfc_get_symbol_decl): Likewise.
3381 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
3382 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
3383 * trans-io.c (add_case, set_error_locus, build_dt,
3384 transfer_expr): Likewise.
3385 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
3386 gfc_trans_stop, gfc_trans_character_select): Likewise.
3387 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
3388 * trans.c (gfc_trans_runtime_check): Likewise.
3390 2004-08-14 Paul Brook <paul@codesourcery.com>
3392 * trans-decl.c (gfc_build_function_decl): Remove dead code.
3394 2004-08-14 Paul Brook <paul@codesourcery.com>
3396 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
3398 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3400 * gfortran.h: Add comments.
3401 * parse.c (parse_contained): Fix comment typo.
3402 * resolve.c (was_declared): Ditto.
3405 2004-08-11 Paul Brook <paul@codeourcery.com>
3408 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
3410 2004-08-10 Richard Henderson <rth@redhat.com>
3412 * f95-lang.c (gfc_init_builtin_functions): Remove
3413 __builtin_stack_alloc, add __builtin_alloca.
3414 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
3415 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
3417 2004-08-10 Paul Brook <paul@codesourcery.com>
3419 * trans-io.c (transfer_expr): Handle pointters.
3421 2004-08-10 Paul Brook <paul@codesourcery.com>
3424 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
3425 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
3426 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
3427 Handle GFC_SS_COMPONENT.
3428 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
3429 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
3431 (gfc_conv_array_initializer): Call specific initializer routines.
3432 * trans-expr.c (gfc_trans_structure_assign): New function.
3433 (gfc_trans_subarray_assign): New function.
3434 (gfc_trans_subcomponent_assign): New fucntion
3435 (gfc_conv_structure): Use them.
3436 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
3437 (gfc_ss): Add shape.
3439 2004-08-08 Victor Leikehman <lei@il.ibm.com>
3441 * simplify.c (gfc_simplify_shape): Bugfix.
3442 * expr.c (gfc_copy_shape_excluding): New function.
3443 * gfortran.h (gfc_get_shape): Bugfix.
3444 (gfc_copy_shape_excluding): Added declaration.
3445 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
3446 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
3447 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
3448 time resolution of shape.
3450 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
3452 * intrinsic.c (add_subroutines): Add getenv and
3453 get_environment_variable. (add_sym_5s): New function.
3454 * intrinsic.h (gfc_resolve_get_environment_variable): Add
3456 * iresolve.c (gfc_resolve_get_environment_variable): New
3459 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
3461 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
3462 __builtin_pow[f] arguments.
3464 2004-08-06 Steven G. Kargl <kargls@comcast.net>
3466 * arith.c: Add #define for model numbers. Remove global GMP variables.
3467 (natural_logarithm,common_logarithm,exponential,sine,
3468 cosine,arctangent,hypercos,hypersine ): Remove.
3469 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
3470 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
3471 gfc_check_real_range, gfc_constant_result, gfc_range_check,
3472 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
3473 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
3474 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
3475 gfc_convert_complex,gfc_int2real,gfc_int2complex,
3476 gfc_real2int,gfc_real2real,gfc_real2complex,
3477 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
3478 to MPFR, use new functions.
3479 * arith.h: Remove extern global variables.
3480 (natural_logarithm,common_logarithm,exponential, sine, cosine,
3481 arctangent,hypercos,hypersine): Remove prototypes.
3482 (arctangent2): Update prototype from GMP to MPFR.
3483 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
3484 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
3485 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
3486 * gfortran.h (GFC_REAL_BITS): Remove.
3487 (arith): Add ARITH_NAN.
3488 Include mpfr.h. Define GFC_RND_MODE.
3489 Rename GCC_GFORTRAN_H GFC_GFC_H.
3490 (gfc_expr): Convert GMP to MPFR.
3491 * module.c: Add arith.h, correct type in comment.
3492 (mio_gmp_real): Convert GMP to MPFR.
3493 (mio_expr): Use gfc_set_model_kind().
3494 * primary.c: Update copyright date with 2004.
3495 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
3496 * simplify.c: Remove global GMP variables
3497 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
3498 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
3499 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
3500 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
3501 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
3502 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
3503 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
3504 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
3505 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
3506 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
3507 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
3508 gfc_simplify_rrspacing,gfc_simplify_scale,
3509 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
3510 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
3511 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
3512 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
3514 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
3515 gfc_conv_mpf_to_tree. Convert it to use MPFR
3516 (gfc_conv_constant_to_tree): Use it.
3517 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
3518 * trans-intrinsic.c: Add arith.h, remove gmp.h
3519 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
3521 2004-08-06 Victor Leikehman <lei@il.ibm.com>
3522 Paul Brook <paul@codesourcery.com>
3524 * trans-array.c (gfc_trans_allocate_array_storage,
3525 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
3526 gfc_conv_loop_setup): For functions, if the shape of the result
3527 is not known in compile-time, generate an empty array descriptor for
3528 the result and let the callee to allocate the memory.
3529 (gfc_trans_dummy_array_bias): Do nothing for pointers.
3530 (gfc_conv_expr_descriptor): Use function return values directly.
3531 * trans-expr.c (gfc_conv_function_call): Always add byref call
3533 (gfc_trans_pointer_assignment): Add comments.
3534 (gfc_trans_arrayfunc_assign): Don't chain on expression.
3536 2004-08-01 Roger Sayle <roger@eyesopen.com>
3538 * options.c (gfc_init_options): Don't warn about the use GNU
3539 extensions by default.
3540 (gfc_post_options): Warn about GNU extensions with -pedantic.
3541 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
3543 2004-07-30 Richard Henderson <rth@redhat.com>
3545 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
3548 2004-07-25 Richard Henderson <rth@redhat.com>
3550 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
3551 and DECL_IGNORED_P on RESULT_DECL.
3552 (gfc_generate_constructors): Likewise.
3554 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3557 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
3559 (ffixed-line-length-80, ffixed-line-length-132): Remove.
3560 * options.c (gfc_handle_options): Deal with changed options.
3561 * scanner.c (load_line): Change second arg to 'char **',
3562 allocate if pointing to NULL. Keep track of buffer's length.
3563 Adapt buffer size to overlong lines. Pad lines to full length
3565 (load_file): Adapt to new interface of load_line.
3567 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
3569 * trans.h (builtin_function): Declare.
3571 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3574 (parts ported from g95)
3575 * parse.h (gfc_state_data): New field do_variable.
3576 (gfc_check_do_variable): Add prototype.
3577 * parse.c (push_state): Initialize field 'do_variable'.
3578 (gfc_check_do_variable): New function.
3579 (parse_do_block): Remember do iterator variable.
3580 (parse_file): Initialize field 'do_variable'.
3581 * match.c (gfc_match_assignment, gfc_match_do,
3582 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
3583 Add previously missing checks.
3584 (gfc_match_return): Reformat error message.
3585 * io.c (match_out_tag): New function.
3586 (match_open_element, match_close_element,
3587 match_file_element, match_dt_element): Call match_out_tag
3588 instead of match_vtag where appropriate.
3589 (match_io_iterator, match_io_element): Add missing check.
3590 (match_io): Reformat error message.
3591 (match_inquire_element): Call match_out_tag where appropriate.
3593 * parse.c (gfc_check_do_variable): Fix error locus.
3595 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3598 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
3599 for every assumed length character dummy argument.
3602 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
3605 * simplify.c (gfc_simplify_bound): Copy the bound expression.
3607 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3610 * trans-array.c gfc_trans_g77_array,
3611 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
3612 for assumed length characters.
3613 (gfc_conv_expr_descriptor): Set se->string_length if dealing
3614 with a character expression.
3615 (gfc_cvonv_array_parameter): Pass string length when passing
3616 character array according to g77 conventions.
3618 2004-07-12 Paul Brook <paul@codesourcery.com>
3620 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
3621 * trans-array.c (gfc_trans_auto_array_allocation): Remove
3622 initialization code.
3623 * trans-common.c (create_common): Use gfc_conv_initializer.
3624 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
3625 * trans-expr.c (gfc_conv_initializer): New function.
3626 (gfc_conv_structure): Use it.
3627 * trans.h (gfc_conv_initializer): Add prototype.
3629 2004-07-11 Paul Brook <paul@codesourcery.com>
3632 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
3634 (parse_contained): Mark contained symbols as referenced.
3636 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3639 * module.c (gfc_dump_module, gfc_use_module): Print locus
3640 when opening of module file fails.
3643 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
3646 * match.c (gfc_match_program): A program name is obligatory.
3647 (gfc_match_return): RETURN in main program is an extension.
3648 (gfc_match_block_data): A space is required before a block data
3652 * primary.c (match_boz_constant): Call gfc_notify_std only if
3653 we actually have a non-standard boz-literal-constant.
3656 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
3657 warning if assigning NULL().
3659 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
3661 * f95-lang.c (set_block): Remove.
3662 (gfc_clear_binding_stack): New.
3663 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
3664 (struct binding_level): Remove block_created_by_back_end.
3665 (clear_binding_level): Likewise.
3666 (poplevel): Don't handle block_created_by_back_end.
3668 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3670 * trans-decl.c (gfc_create_module_variable): Nothing to do if
3671 symbol is in common, because we ...
3672 (gfc_generate_module_vars): Call gfc_trans_common.
3674 2004-07-10 Paul Brook <paul@codesourcery.com>
3676 * trans-array.c (gfc_build_null_descriptor): New function.
3677 (gfc_trans_static_array_pointer): Use it.
3678 * trans-array.h (gfc_build_null_descriptor): Add prototype.
3679 * trans-expr.c (gfc_conv_structure): Handle array pointers.
3681 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3684 * decl.c (gfc_match_save): Use-associated common block
3686 * gfortran.h (gfc_common_head): Add new field 'name'.
3687 Fix typo in comment after #endif.
3688 * match.c (gfc_get_common): Add new argument from_common,
3689 mangle name if flag is set, fill in new field in structure
3691 (match_common): Set new arg in call to gfc_get_common,
3692 use-associated common block doesn't collide.
3693 * match.h (gfc_get_common): Adapt prototype.
3694 * module.c (load_commons): Set new arg in call to
3696 * symbol.c (free_common_tree): New function.
3697 (gfc_free_namespace): Call new function.
3698 * trans-common.c (several functions): Remove argument
3699 'name', use name from gfc_common_head instead.
3701 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3703 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
3704 and RHS match. Return early if the RHS is NULL().
3707 * match.c (match_common): Fix error reporting for used common.
3710 * trans-expr.c (gfc_conv_structure): Handle initialization
3711 of scalar pointer components.
3713 * parse.c (decode_statement): Fix matching of BLOCK DATA.
3715 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
3716 by fix for PR 15481.
3718 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3720 * trans-common.c: Fix whitespace issues, make variable names
3722 (create_common): Additionally, make loop logic more obvious.
3724 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3725 Paul Brook <paul@codesourcery.com>
3728 * trans-common.c (calculate_length): Remove ...
3729 (get_segment_info): Merge into here. Save field type.
3730 (build_field): Use saved type.
3731 (create_common, new_condition, new_segment, finish_equivalences):
3732 Use new get_segment_info.
3733 * trans-types.c: Update comment.
3735 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3738 * moduele.c (mio_symbol): Don't I/O initial values unless
3739 symbol is a parameter.
3741 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3744 * resolve.c (resolve_symbol): Verify that the shape of a
3745 parameter array is not only explicit, but also constant.
3746 * array.c (gfc_is_compile_time_shape): New function.
3747 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
3749 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3755 * module.c (write_symbol, write_symtree): Remove workaround.
3756 * primary.c (match_actual_arglist): Enhance comment.
3757 (gfc_match_rvalue): Handle function call with first argument
3758 a keyword argument correctly.
3759 * resolve.c (resolve_symbol): Change call to
3760 gfc_set_default_type to issue error if no implicit type
3762 * trans-decl.c (gfc_create_module_variable): Remove workaround.
3764 2004-07-08 Paul Brook <paul@codesourcery.com>
3766 * intrinsic.c (add_sym_4s): New function.
3767 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
3769 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
3770 Paul Brook <paul@codesourcery.com>
3774 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
3775 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
3776 * intrinsic.c (add_functions): Identify iargc. Add
3777 command_argument_count.
3778 (add_subroutines): Resolve getarg. Add get_command and
3779 get_command_argument.
3780 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
3781 gfc_resolve_get_command_argument): Add prototypes.
3782 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
3783 gfc_resolve_get_command_argument): New functions.
3784 * trans-decl.c (gfor_fndecl_iargc): New variable.
3785 (gfc_build_intrinsic_function_decls): Set it.
3786 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
3787 (gfc_conv_intrinsic_function): Use it.
3788 * trans.h (gfor_fndecl_iargc): Declare.
3790 2004-07-04 Matthias Klose <doko@debian.org>
3792 * Make-lang.in: Generate and install gfortran man page.
3793 * invoke.texi: Remove extra '@c man end'.
3795 2004-07-04 Richard Henderson <rth@redhat.com>
3797 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
3799 2004-07-04 Paul Brook <paul@codesourcery.com>
3801 * decl.c (gfc_match_implicit_range): Don't use typespec.
3802 (gfc_match_implicit): Handle character selectors.
3803 * gfortran.h (gfc_set_implicit): Remove prototype.
3804 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
3805 * parse.c (accept_statement): Don't call gfc_set_implicit.
3806 * symbol.c (new_ts): Remove.
3807 (gfc_set_implicit_none): Use same loop bounds as other functions.
3808 (gfc_set_implicit): Remove.
3809 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
3810 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
3812 2004-06-30 Richard Henderson <rth@redhat.com>
3814 * match.c (var_element): Remove unused variable.
3816 * trans-decl.c (gfc_generate_function_code): Don't set
3817 x_whole_function_mode_p.
3818 (gfc_generate_constructors): Likewise.
3820 2004-06-30 Richard Henderson <rth@redhat.com>
3822 * trans-decl.c (gfc_generate_function_code): Don't set
3823 immediate_size_expand.
3824 (gfc_generate_constructors): Likewise.
3826 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3829 * decl.c (gfc_match_type_spec): Rename second argument to
3830 'implicit_flag', reverse meaning. Don't match_char_spec if
3831 'implicit_flag' is set. Rename to ...
3832 (match_type_spec): ... this.
3833 (gfc_match_implicit_none, match_implicit_range): Move here
3835 (gfc_match_implicit): Move here from match.c, try to
3836 match_char_len if match_implicit_range doesn't succeed for
3837 CHARACTER implicits. Call renamed fucntion match_type_spec.
3838 (gfc_match_data_decl, match_prefix): Call renamed function
3840 * match.c (gfc_match_implicit_none, match_implicit_range,
3841 gfc_match_implicit): Move to decl.c.
3842 * match.h (gfc_match_implicit_none, gfc_match_implicit):
3843 Move protoypes to section 'decl.c'.
3844 (gfc_match_type_spec): Remove prototype.
3846 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3848 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
3851 2004-06-29 Steven Bosscher <stevenb@suse.de>
3853 Make sure types in assignments are compatible. Mostly mechanical.
3854 * trans-const.h (gfc_index_one_node): New define.
3855 * trans-array.c (gfc_trans_allocate_array_storage,
3856 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
3857 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
3858 gfc_conv_array_ubound, gfc_conv_array_ref,
3859 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
3860 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
3861 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
3862 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
3863 types in assignments, conversions and conditionals for expressions.
3864 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
3865 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
3866 gfc_conv_function_call, gfc_trans_pointer_assignment,
3867 gfc_trans_scalar_assign): Likewise.
3868 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
3869 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
3870 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
3871 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
3872 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
3873 gfc_conv_allocated, gfc_conv_associated,
3874 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
3875 * trans-io.c (set_string): Likewise.
3876 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
3877 gfc_do_allocate, generate_loop_for_temp_to_lhs,
3878 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
3879 compute_overall_iter_number, gfc_trans_assign_need_temp,
3880 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
3881 gfc_evaluate_where_mask, gfc_trans_where_assign,
3882 gfc_trans_where_2): Likewise.
3883 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
3884 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
3886 * trans.c (gfc_add_modify_expr): Add sanity check that types
3887 for the lhs and rhs are the same for scalar assignments.
3889 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3891 * dump-parse-tree.c (show_common): New function.
3892 (gfc_show_namespace): Show commons.
3894 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3895 Andrew Vaught <andyv@firstinter.net>
3899 * decl.c (gfc_match_save): Adapt to new common structures,
3900 don't allow saving USE-associated common.
3901 * dump-parse-tree (gfc_show_attr): (saved_)common are not
3902 symbol attributes any longer.
3903 (gfc_show_symbol): Don't show old-style commons any longer.
3904 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
3906 * gfortran.h (symbol_attribute): Remove common and saved_common
3908 (gfc_symbol): Remove common_head element.
3909 (gfc_common_head): New struct.
3910 (gfc_get_common_head): New macro.
3911 (gfc_symtree): Add field 'common' to union.
3912 (gfc_namespace): Add field 'common_root'; change type of field
3913 'blank_common' to blank_common.
3914 (gfc_add_data): New prototype.
3915 (gfc_traverse_symtree): Expect a symtree as first argument
3916 instead of namespace.
3917 * match.c (gfc_get_common): New function.
3918 (match_common_name): Change to take char * as argument, adapt,
3919 fix bug with empty name.
3920 (gfc_match_common): Adapt to new data structures. Disallow
3921 redeclaration of USE-associated COMMON-block. Fix bug with
3923 (var_element): Adapt to new common structures.
3924 * match.h (gfc_get_common): Declare.
3925 * module.c: Add 2004 to copyright years, add commons to module
3926 file layout description.
3927 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
3928 for removed attributes.
3929 (mio_symbol): Adapt to new way of storing common relations.
3930 (load_commons): New function.
3931 (read_module): Skip common list on first pass, load_commons at
3933 (write_commons): New function.
3934 (write_module): Call write_commons().
3935 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
3936 functions related to removed attributes.
3937 (gfc_add_data): New function.
3938 (gfc_clear_attr): Don't set removed attributes.
3939 (gfc_copy_attr): Don't copy removed attributes.
3940 (traverse_symtree): Remove.
3941 (gfc_traverse_symtree): Don't traverse symbol
3942 tree of the passed namespace, but require a symtree to be passed
3943 instead. Unify with traverse_symtree.
3944 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
3946 (save_symbol): Remove setting of removed attribute.
3947 * trans-common.c (gfc_sym_mangled_common_id): Change to
3948 take 'char *' argument instead of 'gfc_symbol'.
3949 (build_common_decl, new_segment, translate_common): Adapt to new
3950 data structures, add new
3952 (create_common): Adapt to new data structures, add new
3953 argument name. Fix typo in intialization of derived types.
3954 (finish_equivalences): Add second argument in call to
3956 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
3957 (gfc_trans_common): Adapt to new data structures.
3958 * trans-decl.c (gfc_create_module_variables): Remove test for
3961 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3963 * io.c: Add 2004 to copyright years.
3965 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3966 Andrew Vaught <andyv@firstinter.net>
3968 * gfortran.h (gfc_gsymbol): New typedef.
3969 (gfc_gsym_root): New variable.
3970 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
3971 * parse.c (global_used): New function.
3972 (parse_block_data): Check for double empty BLOCK DATA,
3973 use global symbol table.
3974 (parse_module): Use global symbol table.
3975 (add_global_procedure, add_global_program): New functions.
3976 (gfc_parse_file): Use global symbol table.
3977 * symbol.c (gfc_gsym_root): New variable.
3978 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
3981 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3983 * module.c (mio_gmp_real): Correct writing of negative numbers.
3985 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3988 * expr.c (check_intrinsic_op): Allow comparison of characters.
3991 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3992 Andrew Vaught <andyv@firstinter.net>
3994 * decl.c (contained_procedure): New function.
3995 (match_end): Verify correctness of END STATEMENT in
3998 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3999 Andrew Vaught <andyv@firstinter.net>
4002 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
4003 (decode_statement): Enforce required space in free-form.
4005 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4007 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
4008 * trans-array.c (gfc_conv_descriptor_data): Add operand
4010 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
4011 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
4012 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
4013 * trans-common.c (create_common): Likewise.
4014 * trans-expr.c (gfc_conv_component_ref): Likewise.
4015 * trans-io.c (set_parameter_value): Likewise.
4016 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
4017 (transfer_expr): Likewise.
4018 * trans-decl.c (gfc_trans_auto_character_variable):
4019 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
4020 (gfc_gimplify_function): New function.
4021 (gfc_generate_function-code): Properly handle nested functions.
4022 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
4024 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
4027 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
4028 (gfc_resolve_inquire): Resolve the iolength tag. Return
4029 SUCCESS at end of function if no failure has occured.
4030 * resolve.c (resolve_code): Resolve if iolength is encountered.
4031 * trans-io.c: (ioparm_iolength, iocall_iolength,
4032 iocall_iolength_done): New variables.
4033 (last_dt): Add IOLENGTH.
4034 (gfc_build_io_library_fndecls ): Set iolength related variables.
4035 (gfc_trans_iolength): Implement.
4036 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
4038 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
4041 * scanner.c (load_line): Don't truncate preprocessor lines.
4042 Reformat error message.
4043 (preprocessor_line): Issue warning in case of malformed
4046 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4048 * resolve.c (resolve_symbol): Add comment in function body.
4049 (check_data_variable): Change type of mark to ar_type, adapt code
4052 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4054 * array.c (gfc_insert_constructor): Avoid redundant call to
4055 mpz_comp. Add 2004 to copyright years.
4057 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
4059 * trans.h (stmtblock_t): Change has_scope to unsigned int.
4061 2004-06-20 Steven G. Kargl <kargls@comcast.net>
4063 * arith.c (gfc_range_check): correct complex underflow.
4065 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4068 * match.c (match_case_selector): Call gfc_match_init_expr
4069 instead of gfc_match_expr.
4070 * resolve.c (validate_case_label_expr): No need to check for
4071 constant, since it wouldn't have been matched with the fix to
4074 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4077 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
4080 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4083 * trans-deecl.c (generate_local_decl): Do not issue warning for
4084 unused variables if they're use associated.
4086 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4087 Andrew Vaught <andyv@firstinter.net>
4090 * gfortran.h (gfc_check_f): Add new field f3ml.
4091 * check.c (gfc_check_minloc_maxloc): Take argument list instead
4092 of individual arguments, reorder if necessary.
4093 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
4094 * intrinsic.c (add_sym_3ml): New function.
4095 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
4096 (check_specific): Catch special case MINLOC, MAXLOC.
4098 2004-06-14 Paul Brook <paul@codesourcery.com>
4100 * intrinsic.c (add_sym_2s): Use correct function types.
4102 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4104 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
4105 * data.c (gfc_get_section_index): Remove dependency on trans.h.
4107 2004-06-12 Steven G. Kargl <kargls@comcast.net>
4109 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
4110 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
4111 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
4112 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
4113 * trans-intrinsic.c: Use symbols.
4114 * intrinsic.c (add_sym_2s): New function.
4115 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
4116 * intrinsic.h: Function prototypes.
4117 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
4118 gfc_resolve_srand): New functions.
4120 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4123 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
4124 contained procedure.
4126 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4129 * interface.c (compare_parameter, compare_actual_formal): Don't
4130 check types and array shapes for NULL()
4131 * trans-expr.c (conv_function_call): No double indirection for
4134 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
4136 * trans-expr.c (gfc_conv_cst_int_power): Compute
4137 x**(-n) by converting it to (1/x)**n instead of
4140 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4143 * module.c (write_symbol, write_symtree): Don't write symbols
4144 wrongly added to namespace.
4145 * trans-decl.c (gfc_create_module_variable): Don't create a
4146 backend decl for a symbol incorrectly added to namespace.
4148 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4151 * resolve.c (resolve_symbol): Verify that parameter array has an
4152 explicit shape. Fix typos and coding style issues in surrounding
4155 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4158 * gfortran.texi: The documentation doesn't contain infomration on
4159 how to report bugs, and shouldn't, so remove the line which
4162 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4164 * intrinsic.c (sort_actual): Keep track of type of missing
4165 arguments. (Missing from previous commit.)
4167 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4169 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
4170 * interface.c (compare_actual_formal): Keep type of omitted
4172 * trans-expr.c (gfc_conv_function_call): Add string length
4173 argument for omitted string argument.
4175 2004-06-03 Paul Brook <paul@codesourcery.com>
4177 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
4178 lists instead of compound expr chains.
4179 (gfc_trans_code): Annotate statement lists.
4181 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4183 * trans-array.c: Fix spelling in comments.
4185 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4188 * data.c (assign_substring_data_value): New function.
4189 (gfc_assign_data_value): Call the new function if we're dealing
4190 with a substring LHS.
4192 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4195 * gfortran.h (GFC_VERSION): Remove.
4196 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
4199 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4201 * trans-types.c: Fix spelling & layout in comments.
4203 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4206 * trans-const.c (gfc_conv_string_init): Allow variable string
4207 length lower than initialization string length.
4209 2004-05-30 Paul Brook <paul@codesourcery.com>
4212 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
4213 * trans-expr.c (gfc_trans_string_copy): New function.
4214 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
4216 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
4217 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
4218 * trans.h (struct gfc_saved_var): Define.
4219 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
4221 2004-05-30 Steven G. Kargl <kargls@comcast.net>
4223 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
4225 2004-05-29 Steven G. Kargl <kargls@comcast.net>
4227 * simplify.c (gfc_simplify_log): Remove useless line of code.
4229 2004-05-29 Paul Brook <paul@codesourcery.com>
4231 * trans-common.c (find_equivalence): Find multiple rules.
4233 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4235 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
4236 (gfc_current_locus): Declare new global variable.
4237 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
4238 (gfc_current_locus1): Rename ...
4239 (gfc_current_locus): ... to this.
4240 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
4241 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
4242 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
4243 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
4244 and gfc_current_locus(), respectively.
4245 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
4246 match_array_cons_element, gfc_match_array_constructor):
4247 Read/modify gfc_current_locus instead of calling gfc_set_locus()
4248 and gfc_current_locus().
4249 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
4250 match_attr_spec, gfc_match_function_decl, gfc_match_end,
4251 attr_decl1, gfc_match_save): Likewise.
4252 * error.c (error_print, gfc_internal_error): Likewise.
4253 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
4254 * interface.c (gfc_add_interface): Likewise.
4255 * io.c (gfc_match_format, match_dt_format, match_dt_element,
4256 match_io_iterator, match_io): Likewise.
4257 * match.c (gfc_match_space, gfc_match_eos,
4258 gfc_match_small_literal_int, gfc_match_st_label,
4259 gfc_match_strings, gfc_match_name, gfc_match_iterator,
4260 gfc_match_char, gfc_match, gfc_match_assignment,
4261 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
4262 gfc_match_nullify, gfc_match_call, match_implicit_range,
4263 gfc_match_implicit, gfc_match_data, match_case_selector,
4264 gfc_match_case, match_forall_iterator): Likewise.
4265 * matchexp.c (gfc_match_defined_op_name, next_operator,
4266 match_level_1, match_mult_operand, match_ext_mult_operand,
4267 match_add_operand, match_ext_add_operand, match_level_2,
4268 match_level_3, match_level_4, match_and_operand, match_or_operand,
4269 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
4270 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
4271 * parse.c (match_word, decode_statement, next_free, next_fixed,
4272 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
4274 * primary.c (match_digits, match_integer_constant,
4275 match_boz_constant, match_real_constant, match_substring,
4276 next_string_char, match_charkind_name, match_string_constant,
4277 match_logical_constant, match_const_complex_part,
4278 match_complex_constant, match_actual_arg, match_keyword_arg,
4279 gfc_match_actual_arglist, gfc_match_structure_constructor,
4280 gfc_match_rvalue, gfc_match_variable): Likewise.
4281 * st.c (gfc_get_code): Likewise.
4282 * symbol.c (check_conflict, check_used, check_done,
4283 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
4284 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
4285 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
4287 2004-05-26 Roger Sayle <roger@eyesopen.com>
4289 * io.c (format_asterisk): Silence compiler warnings by correcting
4290 the number of elements of a "locus" initializer.
4292 2004-05-25 Roger Sayle <roger@eyesopen.com>
4295 * matchexp.c: Allow unary operators after arithmetic operators
4297 (match_ext_mult_operand, match_ext_add_operand): New functions.
4298 (match_mult_operand): Tweak to call match_ext_mult_operand.
4299 (match_add_operand): Tweak to call match_ext_mult_operand.
4300 (match_level_2): Rearrange to call match_ext_add_operand.
4302 2004-05-25 Paul Brook <paul@codesourcery.com>
4304 * expr.c (check_inquiry): Remove bogus tests.
4306 2004-05-23 Paul Brook <paul@codesourcery.com>
4309 * expr.c (restricted_args): Remove redundant checks/argument.
4310 (external_spec_function): Update to match.
4311 (restricted_intrinsic): Rewrite.
4313 2004-05-23 Paul Brook <paul@codesourcery.com>
4314 Victor Leikehman <lei@haifasphere.co.il>
4316 * gfortran.h (struct gfc_symbol): Add equiv_built.
4317 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
4319 (current_length): Remove.
4320 (add_segments): New function.
4321 (build_equiv_decl): Create initialized common blocks.
4322 (build_common_decl): Always add decl to bindings.
4323 (create_common): Create initializers.
4324 (find_segment_info): Reformat to match coding conventions.
4325 (new_condition): Use add_segments.
4326 (add_condition, find_equivalence, add_equivalences): Move iteration
4327 inside functions. Only process each segment once.
4328 (new_segment, finish_equivalences, translate_common): Simplify.
4330 2004-05-23 Steven G. Kargl <kargls@comcast.net>
4332 * check.c (gfc_check_random_seed): Issue for too many arguments.
4334 2004-05-22 Steven G. Kargl <kargls@comcast.net>
4336 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
4338 2004-05-22 Paul Brook <paul@codesourcery.com>
4340 * dump-parse-tree.c (gfc_show_equiv): New function.
4341 (gfc_show_namespace): Use it.
4343 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
4346 * symbol.c (gfc_add_common): Disable checks to work around other more
4347 fundamental inadequacies.
4349 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4351 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
4353 (gfc_build_function_decl): Likewise.
4355 2004-05-22 Steven G. Kargl <kargls@comcast.net>
4357 * check.c (gfc_check_system_clock): New function.
4358 * intrinsic.c (add_sym_3s): New function.
4359 (add_subroutines): Use it.
4360 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
4362 * iresolve.c (gfc_resolve_system_clock): New function.
4364 2004-05-22 Steven G. Kargl <kargls@comcast.net>
4366 * invoke.texi: Document -Wunderflow and spell check.
4367 * lang.opt: Add Wunderflow.
4368 * gfortran.h (gfc_option_t): Add warn_underflow option.
4369 * options.c (gfc_init_options, set_Wall): Use it.
4370 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
4371 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
4372 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
4373 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
4374 * arith.c (common_logarithm): Fix typo in comment.
4376 2004-05-21 Roger Sayle <roger@eyesopen.com>
4378 * io.c (check_format): As a GNU extension, allow the comma after a
4379 string literal to be optional in a format. Use gfc_notify_std to
4380 issue an error/warning as appropriate.
4382 2004-05-21 Roger Sayle <roger@eyesopen.com>
4384 * io.c (check_format): Use gfc_notify_std to determine whether to
4385 issue an error/warning for omitting the digits from the X format.
4387 2004-05-20 Roger Sayle <roger@eyesopen.com>
4389 * io.c (check_format): Allow the number before the X format to
4390 be optional when not -pedantic.
4392 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
4393 Paul Brook <paul@codesourcery.com>
4395 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
4396 Create decls for __builtin_pow{,f}.
4397 * gfortran.h (PREFIX_LEN): Define.
4398 * trans-decl.c (gfor_fndecl_math_powi): Add.
4399 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
4400 (gfc_build_intrinsic_function_decls): Create decls for powi.
4401 * trans-expr.c (powi_table): Add.
4402 (gfc_conv_integer_power): Remove.
4403 (gfc_conv_powi): New function.
4404 (gfc_conv_cst_int_power): New function.
4405 (gfc_conv_power_op): Use new powi routines.
4406 * trans.h (struct gfc_powdecl_list): Add.
4407 (gfor_fndecl_math_powi): Add.
4408 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
4410 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4412 * trans.c, trans-decl.c: Fix comment typos.
4414 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4416 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
4418 2004-05-18 Steve Kargl <kargls@comcast.net>
4420 * arith.c (gfc_int2complex): Fix incorrect range checking.
4422 2004-05-18 Paul Brook <paul@codesourcery.com>
4425 * decl.c (add_init_expr_to_sym): Remove incorrect check.
4426 (default_initializer): Move to expr.c.
4427 (variable_decl): Don't assign default initializer to variables.
4428 * expr.c (gfc_default_initializer): Move to here.
4429 * gfortran.h (gfc_default_initializer): Add prototype.
4430 * resolve.c (resolve_symbol): Check for illegal initializers.
4431 Assign default initializer.
4433 2004-05-17 Steve Kargl <kargls@comcast.net>
4435 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
4437 2004-05-17 Steve Kargl <kargls@comcast.net>
4439 * arith.c (gfc_real2complex): Range checking wrong part of complex
4442 2004-05-16 Paul Brook <paul@codesourcery.com>
4444 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
4446 2004-05-16 Paul Brook <paul@codesourcery.com>
4448 * arith.c (gfc_range_check): Fix logic error.
4450 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
4452 * arith.c: Fix comment typos.
4454 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4457 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
4458 not initialized in a disallowed fashion.
4459 * match.c (gfc_match_common): Likewise.
4460 (var_element): Verify that variable is not in the blank COMMON,
4461 if it is in a common.
4463 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
4465 * Make-lang.in (f95.generated-manpages): Remove.
4466 (f95.srcextra): New.
4467 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
4468 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
4471 (f95.install-info): Remove.
4472 (install-info): New.
4474 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
4476 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
4478 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4480 * primary.c (match_boz_constant): Use gfc_notify_std() for
4481 issuing a warning or an error.
4483 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4486 * primary.c (match_structure_constructor): Rename ...
4487 (gfc_match_structure_constructor): ... to this. Make non-static.
4488 (gfc_match_rvalue): Call renamed function.
4489 * match.h (gfc_match_structure_constructor): Declare.
4490 * match.c (gfc_match_data_constant): Handle structure
4493 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4497 * gfortran.h (gfc_linebuf): New typedef.
4499 (gfc_file): Revamped, use new gfc_linebuf.
4500 (locus): Revamped, use new types.
4501 (gfc_current_file): Remove.
4502 (gfc_current_form, gfc_source_file): New global variables.
4503 * match.c (gfc_match_space, gfc_match_strings): Use
4504 gfc_current_form to find source form.
4505 * module.c (gfc_dump_module): Use gfc_source_file when printing
4507 * error.c (show_locus, show_loci) Use new data structures to print
4509 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
4511 (file_head, current_file, gfc_current_form, line_head, line_tail,
4512 gfc_current_locus1, gfc_source_file): New global variables.
4513 (gfc_scanner_init1): Set new global variables.
4514 (gfc_scanner_done1): Free new data structures.
4515 (gfc_current_locus): Return pointer to gfc_current_locus1.
4516 (gfc_set_locus): Set gfc_current_locus1.
4517 (gfc_at_eof): Set new variables.
4518 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
4519 to new locus structure.
4520 (gfc_check_include): Remove.
4521 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
4522 (gfc_skip_comments): Use gfc_current_form, find locus with
4524 (gfc_next_char): Use gfc_current_form.
4525 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
4526 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
4528 (get_file): New function.
4529 (preprocessor_line, include_line): New functions.
4530 (load_file): Move down, rewrite to match new data structures.
4531 (gfc_new_file): Rewrite to match new data structures.
4532 * parse.c (next_statement): Remove code which is now useless. Use
4533 gfc_source_form and gfc_source_file where appropriate.
4534 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
4535 when determining locus of frontend code.
4536 * trans-io.c (set_error_locus): Same.
4537 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
4538 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
4540 (all): Add missing initializers.
4542 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4544 * Make-lang.in (trans-common.o): Remove redundant dependency.
4545 (data.c): Replace object file name ...
4546 (data.o): ... by the correct one.
4548 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4550 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
4551 for ranges when dumping array references.
4553 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
4555 * decl.c (variable_decl): Always apply default initializer.
4557 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4560 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
4561 handle zero correctly.
4563 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4565 * match.c (gfc_match): Eliminate dead code.
4567 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4569 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
4570 Detect bad continuation line in fixed form sources.
4572 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4575 * iresolve.c (gfc_resolve_nearest): Add new function.
4576 * intrinsic.h: ... declare it here.
4577 * intrinsic.c (add_functions): ... add it as resolving function
4580 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4583 * match.c (gfc_match_do): Allow infinite loops with
4584 label-do-stmt. Do not enforce space after comma.
4586 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4589 * parse.c (parse_interface): Allow empty INTERFACE, remove
4592 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4594 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
4595 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
4596 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
4597 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
4598 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
4599 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
4600 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
4601 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
4602 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
4603 trans-types.h, trans.c, trans.h: Update copyright years and
4605 * data.c: Likewise, also removed two whitespace-only lines.
4606 * gfortranspec.c, lang.opt: Update copyright years.
4608 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4611 * trans-decl.c (generate_local_decl): Don't warn for unused
4612 variables which are in common blocks.
4614 2004-05-13 Diego Novillo <dnovillo@redhat.com>
4616 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
4617 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
4618 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
4620 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
4623 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
4625 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
4627 * gfortran.texi: Use @table @emph instead of @itemize @emph.
4628 Remove "set DEVELOPMENT".
4629 (Compiling GFORTRAN): Remove.
4631 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4633 * array.c (match_subscript, match_array_ref): Add comments
4634 explaining argument 'init'.
4635 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
4636 trans-expr.c, trans.c: Fix some typos in comments.
4637 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
4638 * primary.c (match_digits, match_integer_constant): Add comment
4639 explaining signflag.
4641 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4644 * primary.c: Include system.h and flags.h, needed for pedantic.
4645 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
4648 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4651 * match.c (match_data_constant): Handle case where
4652 gfc_find_symbol sets sym to NULL
4654 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4656 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
4657 dependency on mathbuiltins.def
4659 2004-04-24 Victor Leikehman <lei@il.ibm.com>
4661 * trans-io.c (transfer_expr): Implemented recursive printing
4664 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
4666 * gfortranspec.c: Do not include multilib.h.
4668 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4670 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
4671 2004 to copyright years.
4672 * trans-expr.c, trans-decl.c: Comment update, we now generate
4673 GENERIC, not SIMPLE. Add 2004 to copyright years.
4675 2004-04-24 Paul Brook <paul@codesourcery.com>
4677 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
4679 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
4682 * arith.c (gfc_arith_divide): Fix complex divide.
4684 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
4686 * gfortranspec.c: Include the target headers.
4688 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
4692 * arith.c (arctangent2): New function.
4693 * arith.h (arctangent2): Add function prototype.
4694 * simplify.c (gfc_simplify_atan2): Use it.
4695 (gfc_simplify_log): Use it.
4697 2004-04-12 Diego Novillo <dnovillo@redhat.com>
4699 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
4700 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
4702 2004-04-11 Bud Davis <bdavis9659@comcast.net>
4705 * trans-io.c (build_dt): Change REC to value.
4707 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
4710 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
4711 the real value when converting mpf to string.
4713 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
4716 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
4719 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
4722 * simplify.c (simplify_min_max): Convert the type of the result.
4724 2004-04-11 Paul Brook <paul@codesourcery.com>
4726 * gfortran.texi: Use full target triplet.
4728 2004-04-11 Paul Brook <paul@codesourcery.com>
4730 * Make-lang.in (GFORTRAN_TEXI): Set it.
4731 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
4732 (fortran/gfortran.info): Ditto.
4733 * gfortran.texi: Major update.
4734 * invoke.texi: New file.
4736 2004-04-10 Paul Brook <paul@codesourcery.com>
4738 * trans-array.c (gfc_trans_allocate_temp_array,
4739 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
4740 * trans-decl.c (gfc_build_dummy_array_decl,
4741 gfc_get_symbol_decl, gfc_build_function_decl,
4742 gfc_create_module_variable): Ditto.
4743 * trans-expr.c (gfc_conv_variable): Ditto.
4744 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
4745 * trans.h (GFC_DECL_STRING): Remove.
4746 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
4747 GFC_DECL_ASSIGN): Renumber flags.
4749 2004-04-05 Paul Brook <paul@codesourcery.com>
4753 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
4755 * gfortran.h (struct gfc_charlen): Add backend_decl.
4756 * trans-array.c (gfc_trans_allocate_temp_array,
4757 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
4758 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
4759 Remove old, broken string handling.
4760 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
4761 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
4762 gfc_trans_deferred_array): Handle character arrays.
4763 * trans-const.c (gfc_conv_const_charlen): New function.
4764 * trans-const.h (gfc_conv_const_charlen): Add prototype.
4765 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
4767 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
4768 (gfc_create_string_length): New function.
4769 (gfc_get_symbol_decl): Create lengths for character variables.
4770 (gfc_get_fake_result_decl): Ditto.
4771 (gfc_build_function_decl): Only set length for assumed length
4772 character arguments.
4773 (gfc_trans_dummy_character): New function.
4774 (gfc_trans_auto_character_variable): Rewrite.
4775 (gfc_trans_deferred_vars): Handle more types of character variable.
4776 (gfc_create_module_variable): String lengths have moved.
4777 (gfc_generate_function_code): Initialize deferred var chain earlier.
4778 * trans-expr.c (gfc_conv_init_string_length): Rename ...
4779 (gfc_trans_init_string_length): ... to this.
4780 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
4781 gfc_conv_function_call): Update to new format for character variables.
4782 (gfc_conv_string_length): Remove.
4783 (gfc_conv_string_parameter): Update assertion.
4784 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
4785 * trans-io.c (set_string): Use new macro names.
4786 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
4787 * trans-types.c (gfc_get_character_type): Use existing length expr.
4788 (gfc_is_nodesc_array): Make public.
4789 (gfc_get_dtype_cst): Rename ...
4790 (gfc_get_dtype): ... to this. Handle unknown size arrays.
4791 (gfc_get_nodesc_array_type): Use new name.
4792 (gfc_sym_type): New character variable code.
4793 (gfc_get_derived_type): Ditto.
4794 (gfc_get_function_type): Evaluate character variable lengths.
4795 * trans-types.h (gfc_strlen_kind): Define.
4796 (gfc_is_nodesc_array): Add prototype.
4797 * trans.h: Update prototypes.
4798 (struct lang_type): Update comments.
4799 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
4800 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
4802 2004-04-04 Paul Brook <paul@codesourcery.com>
4804 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
4805 * options.c (gfc_init.options, gfc_handle_option): Ditto.
4806 * trans-expr.c (gfc_conv_function_call): Ditto.
4807 * trans-types.c (gfc_is_nodesc_array): Ditto
4808 * lang.opt (fg77-calls): Remove.
4810 2004-04-04 Paul Brook <paul@codesourcery.com>
4812 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
4813 (gfc_conv_descriptor_base): Rename ...
4814 (gfc_conv_descriptor_offset): ... to this.
4815 (gfc_trans_allocate_array_storage): Set offset to zero.
4816 (gfc_conv_array_base): Rename ...
4817 (gfc_conv_array_offset): ... to this.
4818 (gfc_conv_array_index_ref): Add offset parameter.
4819 (gfc_conv_array_ref): Include offset.
4820 (gfc_trans_preloop_setup): Use existing offset.
4821 (gfc_trans_allocate_temp_array, gfc_array_allocate,
4822 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
4823 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
4824 gfc_conf_ss_descriptor): Set offset.
4825 * trans-array.h: Rename prototypes.
4826 * trans-const.h (gfc_index_zero_node): Define.
4827 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
4828 * trans-types.c (gfc_get_array_type_bounds): Ditto.
4829 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
4831 2004-03-25 Diego Novillo <dnovillo@redhat.com>
4833 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
4835 2004-03-24 Bud Davis <bdavis9659@comcast.net>
4838 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
4839 before conversion by gmp library call.
4841 2004-03-24 Bud Davis <bdavis9659@comcast.net>
4844 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
4846 2004-02-24 Richard Henderson <rth@redhat.com>
4848 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
4850 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
4852 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
4853 (fortran/gfortran.info): ... to here.
4856 2004-02-16 Richard Henderson <rth@redhat.com>
4858 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
4859 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
4860 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
4861 (gfc_expand_function): Rename from expand_function_body, make static,
4862 don't do anything except invoke tree_rest_of_compilation.
4863 (gfc_be_parse_file): Invoke cgraph.
4864 (gfc_expand_decl): Remove.
4865 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
4866 __builtin_adjust_trampoline.
4867 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
4868 (gfc_finalize): New.
4869 (gfc_generate_function_code): Use it. Lower nested functions.
4870 * trans-expr.c (gfc_conv_function_call): Add static chain operand
4872 * trans.c (gfc_build_function_call): Likewise.
4873 * trans.h (expand_function_body): Remove.
4875 2004-02-15 Victor Leikehman <lei@il.ibm.com>
4878 * trans-decl.c (gfc_build_function_decl) For functions
4879 returning CHARACTER pass an extra length argument,
4880 following g77 calling conventions.
4881 * trans-types.c (gfc_get_function_type) Ditto.
4882 * trans-expr.c (gfc_conv_function_call) Ditto.
4884 2004-02-14 Paul Brook <paul@codesourcery.com>
4886 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
4888 2004-02-12 Paul Brook <paul@nowt.org>
4892 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
4894 * gfortran.texi: Fix typos.
4896 2004-02-07 Bud Davis <bdavis9659@comcast.net>
4899 * intrinsic.c (add_conversions) Use logical conversion instead
4901 * trans-types.c (gfc_get_logical_type) implemented logical*1
4904 2004-01-17 Paul Brook <paul@codesourcery.com>
4906 * lang-specs.h: Remove %<fixed-form.
4908 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
4910 * lang-specs.h: Enable preprocessing of source files
4911 ending in .F, .fpp, .FPP, .F90 and .F95.
4913 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
4916 * lang-specs.h: Enable compilation of files ending
4917 in .f, .for and .FOR.
4919 2004-01-11 Paul Brook <paul@codesourcery.com>
4921 * trans-stmt.c (gfc_trans_if_1): New function.
4922 (gfc_trans_if): Use it.
4924 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
4926 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
4927 (gfc_option_t): Add max_identifier_length.
4928 * lang.opt: Add fmax-identifier-length.
4929 * match.c (parse_name): Use limit.
4930 * options.c (gfc_init_options): Set max_identifier_length.
4931 (gfc_handle_option): Ditto.
4933 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
4935 * intrinsic.c (add_functions): Add resolve function to dcmplx.
4936 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
4937 * iresolve.c (gfc_resolve_dcmplx): New function.
4939 2004-01-10 Paul Brook <paul@codesourcery.com>
4941 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
4942 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
4943 (gfc_return_by_reference): Correct condition.
4944 (gfc_get_function_type): Ditto.
4946 2004-01-10 Paul Brook <paul@codesourcery.com>
4948 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
4951 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
4953 * iresolve.c: Use correct kind.
4955 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
4958 * trans-decl.c (gfc_create_module_variable): Output array valued
4961 2004-01-10 Paul Brook <paul@codesourcery.com>
4963 * resolve.c (resolve_branch): Get error message right way round.
4965 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
4967 * trans-array (gfc_conv_loop_setup): Adjust comment to track
4969 (gfc_array_allocate): Don't count size of element twice.
4971 2004-01-04 Paul Brook <paul@codesourcery.com>
4973 * lang.opt (i8, r8, std=*): Remove RejectNegative.
4975 2004-01-04 Paul Brook <paul@codesourcery.com>
4977 * error.c (gfc_notify_std): New function.
4978 * gfortran.h (gfc_notify_std): Declare.
4979 (GFC_STD_*): Define.
4980 (gfc_option_t): Add warn_std and allow_std.
4981 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
4982 (gfc_intrinsic_func_interface): Use gfc_notify_std.
4983 * check.c (check_rest): Use gfc_notify_std.
4984 * match.c (gfc_match_pause): Ditto.
4985 (gfc_match_assign): Ditto.
4986 (gfc_match_goto): Ditto.
4987 * resolve.c (resolve_branch): Ditto.
4988 * lang.opt: Add std=<foo> and w.
4989 * options.c (gfc_init_options): Set allow_std and warn_std.
4990 (gfc_handle_option): Handle OPT_std_* and OPT_w.
4992 2004-01-01 Paul Brook <paul@codesourcery.com>
4994 * array.c (gfc_append_constructor): Take constructor, not expression.
4995 * data.c (struct gfc_expr_stack): Remove.
4996 (expr_stack): Remove.
4997 (find_con_by_offset): Rename from find_expr_in_con.
4998 (find_con_by_component): Rename from find_component_in_con.
4999 (gfc_get_expr_stack): Remove.
5000 (gfc_assign_data_value): Rewrite.
5001 (gfc_expr_push): Remove.
5002 (gfc_expr_pop): Remove.
5003 (gfc_advance_section): Rename from
5004 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
5005 (gfc_get_section_index): Handle unbounded sections.
5006 * gfortran.h: Update prototypes.
5007 * resolve.c (check_data_variable): Array section maight not be the
5010 2004-01-01 Paul Brook <paul@codesourcery.com>
5013 * resolve.c (resolve_symbol): Allow assumed length function results.
5015 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
5017 * match.c (gfc_match_pause): Fix spelling.
5019 2004-01-01 Steven Bosscher <stevenb@suse.de>
5022 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
5023 reference from the expression.
5025 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
5027 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
5029 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
5030 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
5031 (symbol_attribute):New variable attribute: assign.
5032 * io.c (resolve_tag):Integer variable is allowed.
5033 (match_dt_format): Add ASSIGN statement. Set assign flag.
5034 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
5035 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
5036 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
5037 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
5038 (next_statement): Add ST_LABEL_ASSIGNMENT.
5039 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
5040 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
5041 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
5042 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
5043 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
5044 assign. Put them into the stuct lang_decl.
5045 * trans-io.c (set_string): Add the assign statement.
5046 * trans-stmt.c (gfc_trans_label_assign): New function.
5047 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
5048 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
5049 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
5050 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
5051 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
5052 (GFC_DECL_ASSIGN(node)): New macro to access flag.
5054 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
5057 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
5060 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
5062 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
5063 that arguments to subroutines/functions can't alias themselves, nor global
5066 2003-12-20 Steven Bosscher <stevenb@suse.de>
5068 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
5069 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
5071 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
5073 * primary.c (match_substring): Fix substring bug for start point
5074 or end point is NULL.
5075 * trans-expr.c (gfc_conv_substring): Ditto
5076 * trans-types.c (gfc_sym_type): Get correct type of scalar
5077 character variables.
5078 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
5081 2003-12-10 Richard Henderson <rth@redhat.com>
5083 * options.c (gfc_post_options): Don't ever use rtl inlining.
5085 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
5087 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
5088 * trans-equivalence.c: Remove.
5089 * trans-decl.c (gfc_get_symbol_decl): Update to match.
5090 (gfc_generate_function_code): Ditto.
5091 * trans-array.c (gfc_conv_array_parameter): Ditto.
5092 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
5093 (F95_ADDITIONAL_OBJS): Add stor-layout.o
5094 * trans.h (gfc_trans_equivalence): Remove.
5095 * gfortran.h (struct gfc_equiv): Add used field.
5096 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
5097 equiv_offset fields.
5099 2003-12-05 Richard Henderson <rth@redhat.com>
5101 * trans.c (gfc_build_addr_expr): New.
5102 (gfc_build_indirect_ref, gfc_build_array_ref): New.
5103 * trans.h: Declare them.
5104 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
5105 trans-stmt.c, trans.c (*): Use them.
5107 * f95-lang.c (gfc_post_options): Remove dead prototype.
5108 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
5109 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
5112 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
5114 * io.c (gfc_match_format): Check for missing format label.
5116 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
5119 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
5120 from interfaces in modules.
5122 2003-11-30 Paul Brook <paul@nowt.org>
5124 * trans-array.c (gfc_trans_g77_array): Make non-static.
5125 (gfc_trans_assumed_size): Remove.
5126 (gfc_trans_dummy_array_bias): Explicitly free temporary.
5127 * trans-array.h (gfc_trans_g77_array): Add prototype.
5128 (gfc_trans_assumed_size): Remove.
5129 * trans-decls.c (gfor_fndecl_push_context): Remove.
5130 (gfor_fndecl_pop_context): Remove.
5131 (gfc_build_function)decls): Don't create them.
5132 (gfc_trans_deferred_vars): Update to match. Remove dead code.
5133 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
5135 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
5137 * trans-array.c (gfc_conv_array_parameter): Simplify
5138 array argument passing for array name actual argument.
5139 * trans-expr.c (gfc_conv_function_call): Ditto
5140 * trans-types.c (gfc_is_nodesc_array):Ditto.
5142 2003-11-30 Paul Brook <paul@nowt.org>
5144 * f95-lang.c (gfc_post_options): Move ...
5145 * options.c (gfc_post_options): .. to here. Handle inlining options.
5146 * gfortran.h (gfc_post_options): Add prototype.
5148 2003-11-28 Richard Henderson <rth@redhat.com>
5150 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
5152 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
5154 * trans.h (has_alternate_specifier): New global variable.
5155 * match.c (gfc_match_call): Handle actual arguments associated with
5156 alternate return indicators.
5157 * trans-expr.c (gfc_conv_function_call): Ditto
5158 * trans-stmt.c (gfc_trans_call): Ditto
5159 (gfc_trans_return): Handle return statement with value.
5160 * trans-decl.c (gfc_generate_function_code): Handle functions with
5162 (gfc_get_fake_result_decl): Ditto
5163 * trans-types.c (gfc_get_function_type): Ditto
5164 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
5165 (resolve_formal_arglist): Check asterisk dummy.
5167 2003-11-27 Paul Brook <paul@nowt.org>
5169 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
5170 allocation interface.
5171 (gfc_conv_ array_parameter): Ditto.
5172 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
5173 * trans-array.c: Update prototype.
5174 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
5175 (gfc_trans_auto_character_variable): Use new memory alloc interface.
5176 * trans-expr.c (gfc_conv_string_tmp): Ditto.
5177 (gfc_conv_function_call): Use gfc_conv_string_tmp.
5178 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
5179 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
5180 * trans.h (gfc_ss_info): Remove unused pdata field.
5181 * trans.c (gfc_create_var_np): Change T to V.
5183 2003-11-26 Richard Henderson <rth@redhat.com>
5185 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
5186 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
5187 FRACTION, NEAREST, SET_EXPONENT.
5188 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
5189 Fix GTY marking. Remove unnecessary const's.
5190 (LIBM_FUNCTION): Rename from I_LIB.
5191 (LIBF_FUNCTION): New.
5192 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
5193 conventions. Assume the expr signature is correct. Mark const.
5194 (gfc_conv_intrinsic_exponent): Use library functions.
5195 (gfc_conv_intrinsic_set_exponent): Remove.
5196 (gfc_conv_intrinsic_scale): Remove.
5197 (gfc_conv_intrinsic_nearest): Remove.
5198 (gfc_conv_intrinsic_fraction): Remove.
5199 (gfc_conv_intrinsic_function): Update.
5200 * trans-decl.c (gfor_fndecl_math_exponent4): New.
5201 (gfor_fndecl_math_exponent8): New.
5202 (gfc_build_intrinsic_function_decls): Set them.
5203 * trans.h: Declare them.
5205 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
5207 * trans-common.c (gfc_layout_global_equiv): Locate the error for
5208 underflow COMMON block.
5209 (gfc_trans_one_common): Fix bug for size of COMMON block containing
5210 EQUIVALENCE object. Also fix typo in an error message.
5212 2003-11-25 Diego Novillo <dnovillo@redhat.com>
5214 * Make-lang.in: Add check-gfortran to lang_checks.
5215 (check-f95): Alias for check-gfortran.
5217 2003-11-25 Jason Merrill <jason@redhat.com>
5219 * Make-lang.in (f95.tags): Create TAGS.sub files in each
5220 directory and TAGS files that include them for each front end.
5222 2003-11-24 Paul Brook <paul@nowt.org>
5225 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
5227 2003-11-24 Paul Brook <paul@nowt.org>
5229 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
5231 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
5233 2003-11-24 Paul Brook <paul@nowt.org>
5236 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
5237 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
5239 2003-11-20 Richard Henderson <rth@redhat.com>
5241 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
5242 (gfc_conv_array_base): Likewise.
5243 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
5244 * trans-expr.c (gfc_conv_string_tmp): Likewise.
5245 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
5246 * trans-stmt.c (gfc_trans_character_select): Likewise.
5248 2003-11-13 Paul Brook <paul@nowt.org>
5250 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
5252 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
5254 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
5255 (resolve_equivalence): New function.
5256 (resolve_equivalence_derived): New function.
5258 2003-11-12 Richard Henderson <rth@redhat.com>
5260 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
5261 annotate_all_with_locus.
5263 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
5265 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
5266 * trans-decl.c (gfc_finish_var_decl): Modified.
5268 2003-11-08 Paul Brook <paul@nowt.org>
5271 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
5274 2003-11-06 Paul Brook <paul@nowt.org>
5276 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
5278 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
5280 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
5282 2003-10-27 Anthony Green <green@redhat.com>
5284 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
5285 (f95.stagefeedback): Ditto.
5287 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
5290 * Make-lang.in (f95.stageprofile): Add.
5291 (f95.stagefeedback): Add.
5293 2003-10-23 Richard Henderson <rth@redhat.com>
5295 * f96-lang.c (gfc_gimplify_expr): Remove.
5296 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
5297 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
5299 2003-10-23 Richard Henderson <rth@redhat.com>
5301 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
5303 2003-10-20 Paul Brook <paul@nowt.org>
5305 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
5306 * trans-stmt.c (gfc_trans_do_while): Ditto.
5308 2003-10-17 Paul Brook <paul@nowt.org>
5310 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
5312 2003-10-17 Paul Brook <paul@nowt.org>
5314 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
5316 2003-10-17 Feng Wang <wf_cs@yahoo.com>
5318 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
5319 (gfc_resolve_minloc): Ditto.
5320 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
5321 Return the value after subtracting the lower bound.
5323 2003-10-16 Richard Henderson <rth@redhat.com>
5325 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
5327 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
5329 * lang.c: Remove -M option for now, it's in the way for C.
5331 2003-10-14 Jason Merrill <jason@redhat.com>
5333 * Make-lang.in (f95.tags): New rule.
5335 2003-10-13 Richard Henderson <rth@redhat.com>
5337 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
5339 2003-10-13 Paul Brook <paul@nowt.org>
5341 * trans-decl.c (generate_local_decl): Don't create junk variables.
5343 2003-10-13 Paul Brook <paul@nowt.org>
5345 * resolve.c (resolve_formal_arglist): Use function result decl in
5346 preference to function decl.
5348 2003-10-12 Richard Henderson <rth@redhat.com>
5350 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
5351 TREE_READONLY. Update all callers.
5353 2003-10-12 Feng Wang <wf_cs@yahoo.com>
5355 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
5356 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
5357 (gfc_is_intrinsic_libcall): Add CSHIFT.
5359 2003-10-12 Richard Henderson <rth@redhat.com>
5361 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
5362 (gfc_trans_array_constructor_value): Likewise.
5363 (gfc_conv_array_initializer): Likewise.
5364 * trans-stmt.c (gfc_trans_character_select): Likewise.
5366 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
5368 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
5370 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
5372 * check.c (gfc_check_repeat): Check arguments are scalar.
5373 (gfc_check_trim): New function.
5374 * intrinsic.h (gfc_check_trim): Add prototype.
5375 * intrinsic.c (add_functions): Use it.
5376 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
5378 * trans-decl.c: Ditto.
5379 (gfc_build_intrinsic_fucntion_decls): Set them.
5380 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
5381 (gfc_conv_intrinsic_trim): New function.
5382 (gfc_conv_intrinsic_repeat): New function.
5383 (gfc_conv_intrinsic_function): Use them.
5385 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
5387 * trans-types.c (gfc_sym_type): Handle result variables.
5389 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
5391 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
5392 gfc_get_character_type.
5394 2003-10-11 Feng Wang <wf_cs@yahoo.com>
5396 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
5398 2003-10-11 Paul Brook <paul@nowt.org>
5400 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
5401 (gfc_resolve_dprod): New function.
5402 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
5403 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
5404 (gfc_resolve_dprod): Declare.
5405 * intrinsic.c (add_functions): Use them.
5406 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
5408 2003-10-06 Richard Henderson <rth@redhat.com>
5410 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
5411 * trans-intrinsic.c (call_builtin_clz): Use it.
5413 2003-10-05 Paul Brook <paul@nowt.org>
5415 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
5416 * trans-decl.c (gfc_generate_function_code): Set
5417 cfun->function_end_locus.
5419 2003-09-24 Jason Merrill <jason@redhat.com>
5421 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
5424 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
5425 Paul Brook <paul@nowt.org>
5427 * Make-lang.in (F95_OBJS): Add fortran/data.o.
5428 * array.c (gfc_inser_constructor): New function.
5429 (gfc_get_constructor): New function.
5430 (gfc_free_constructor): Initialize offset and repeat.
5431 (iterator_stack): Remove.
5432 (expand_info): Add offset, component and repeat fields.
5433 (expand_constructor): Set them.
5434 (expand): Set new fields.
5435 (gfc_copy_constructor): Ditto. Avoid recursion.
5436 * gfortran.h: Add prototypes for new functions.
5437 (gfc_constructor): Add offset, component and repeat.
5438 (iteratio_stack): Move to here.
5439 * resolve.c (check_data_variable): Convert data values into variable
5441 (traverse_data_list): Build implicit loop chain.
5442 (gfc_resolve): Ditto.
5443 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
5444 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
5445 * trans-expr.c (gfc_conv_structure): Handle array initializers.
5446 (gfc_conv_expr): Update to match.
5447 * trans.h (gfc_conv_structure): Declare.
5450 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
5452 * trans.h: Add declarations for gfor_fndecl_si_kind and
5453 gfor_fndecl_sr_kind.
5454 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
5455 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
5456 (g95_conv_intrinsic_sr_kind): New function.
5457 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
5460 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
5462 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
5463 instead of _4 and _8 as postfix for libgfortran calls.
5465 2003-09-16 Paul Brook <paul@nowt.org>
5467 * array.c (compare_bounds): New function.
5468 (gfc_compare_array_spec): Use it.
5470 2003-09-14 Paul Brook <paul@nowt.org>
5472 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
5473 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
5475 2003-09-14 Paul Brook <paul@nowt.org>
5477 * check.c (dim_rank_check): Allow assumed bounds if requested.
5478 (gfc_check_lbound): Call it.
5479 (gfc_check_ubound): Ditto.
5480 (gfc_check_size): Change to match.
5481 * simplify.c (gfc_simplify_bound): New function.
5482 (gfc_simplify_lbound): New function.
5483 (gfc_simplify_ubound): New function.
5484 * intrinsic.h: Declare them.
5485 * intrinsic.c (add_functions): Use them.
5487 2003-09-14 Paul Brook <paul@nowt.org>
5489 * io.c (format_lex): Initialize negative_flag.
5490 (check_format): Intialize repeat.
5491 * trans-io.c (gfc_new_nml_name_expr): Declare static.
5492 (gfc_new_var_expr): Ditto.
5494 2003-09-14 Paul Brook <paul@nowt.org>
5496 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
5497 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
5499 2003-09-12 Paul Brook <paul@nowt.org>
5501 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
5503 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
5505 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
5506 for a correct expression.
5508 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
5510 * trans-intrinsic.c (real_compnt_info): New struct.
5511 (prepare_arg_info): New function.
5512 (gfc_conv_intrinsic_set_exponent): New function.
5513 (gfc_conv_intrinsic_scale): New function.
5514 (gfc_conv_intrinsic_nearest): New function.
5515 (gfc_conv_intrinsic_fraction): New function.
5516 (gfc_conv_intrinsic_exponent): New function.
5517 (gfc_conv_intrinsic_spacing): New function.
5518 (gfc_conv_intrinsic_rrspacing): New function.
5519 (gfc_conv_intrinsic_function): Use them.
5521 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
5523 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
5524 build_int_2 changed from (high, low) to (low, high).
5525 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
5526 ioparm_namelist_read_mode, iocall_set_nml_val_int,
5527 iocall_set_nml_val_float, iocall_set_nml_val_char,
5528 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
5529 (gfc_build_io_library_fndecls): Add variable initialization.
5530 (gfc_new_nml_name_expr, get_new_var_expr): New function.
5531 (build_dt): Add namelist support.
5532 * io.c (value): New variable.
5533 (check_format): Support FMT_H now.
5535 2003-09-07 Paul Brook <paul@nowt.org>
5537 * io.c (gfc_resolve_dt): Error if format label is not defined.
5539 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
5541 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
5542 about case_switch's break. The other is about building the condition
5543 statement tree, which judges the argument in the range of the
5544 corresponding integer type.
5545 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
5546 for the large values.
5548 2003-09-05 Paul Brook <paul@nowt.org>
5550 * f95-lang.c (expand_function_body): Gimplify the function.
5552 2003-09-04 Jeff Law <law@redhat.com>
5554 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
5557 2003-09-04 Paul Brook <paul@nowt.org>
5559 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
5560 (gfc_expand_stmt): New function.
5561 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
5562 (expand_function_body): Use tree_rest_of_compilation.
5563 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
5565 2003-09-03 Jeff Law <law@redhat.com>
5567 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
5570 2003-08-30 Paul Brook <paul@nowt.org>
5572 * f95-lang.c (builtin_function): Remove #if 0 code.
5573 (gfc_define_builtin): New function.
5574 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
5575 * mathbuiltins.def: New file.
5576 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
5577 (gfc_intrinsic_map): Use mathbuiltins.def.
5578 (gfc_intrinsic_builtin_t): Remove.
5579 (gfc_build_intrinsic_lib_fndecls): Update.
5580 * trans-types.c (gfc_init_types): Remove redundant initilaization of
5581 signed_size_type_node.
5583 2003-08-29 Paul Brook <paul@nowt.org>
5585 * arith.c (gfc_real_kinds): Use correct minimum exponents.
5587 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
5589 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
5590 (gfc_conv_intrinsic_function): Add MODULO.
5592 2003-08-22 Jason Merrill <jason@redhat.com>
5594 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
5596 2003-08-22 Andreas Jaeger <aj@suse.de>
5598 * Make-lang.in (f95.install-common): Add DESTDIR support.
5599 * (f95.install-info): Likewise.
5600 (f95.uninstall): Likewise.
5602 2003-08-19 Diego Novillo <dnovillo@redhat.com>
5604 * trans-types.c (gfc_init_types): Initialize
5605 signed_size_type_node with size_type_node.
5607 2003-08-18 Paul Brook <paul@nowt.org>
5609 * dependency.c (gfc_dependency): New enum.
5610 (check_another_array_ref): Remove.
5611 (gfc_get_array_from_component): Remove.
5613 (get_range): Remove.
5614 (get_no_of_elements): Use mpz_t, not mpf_t.
5615 (transform_sections): New function.
5616 (gfc_check_range_range): Rename ...
5617 (gfc_check_section_vs_section): ... to this. Use new function.
5618 (gfc_is_inside_range): Rewrite to match.
5619 (gfc_check_element_vs_section): Ditto.
5620 (gfc_check_element_vs_element): Ditto.
5622 (gfc_dep_resolver): Ditto. Remove unused parameter.
5623 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
5624 gfc_check_element_vs_element, gfc_is_inside_range,
5625 gfc_get_array_from_component): Remove prototypes for static functions.
5626 (gfc_dep_resolver): Update prototype.
5627 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
5629 2003-08-15 Paul Brook <paul@nowt.org>
5631 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
5632 return values to parent scope.
5633 (gfc_build_dummy_array_decl): Ditto.
5635 2003-08-14 Paul Brook <paul@nowt.org>
5637 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
5638 size of the type, not the pointer.
5639 * resolve.c (resolve_symbol): Give more accurate error message.
5641 2003-08-10 Paul Brook <paul@nowt.org>
5643 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
5645 2003-08-10 Paul Brook <paul@nowt.org>
5647 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
5650 2003-08-10 Chun Huang <compiler@sohu.com>
5652 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
5653 (resolve_symbol): Ditto.
5654 * trans-expr.c (gfc_conv_statement_function): New function.
5655 (gfc_conv_function_expr): Use it.
5657 2003-08-10 Paul Brook <paul@nowt.org>
5659 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
5660 (walk_function_expr): Set section rank.
5661 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
5663 2003-08-10 Paul Brook <paul@nowt.org>
5665 * intrinsic.c (add_sym): Prefix names with correct string.
5666 (add_sym_0s): New function.
5667 (add_subroutines): Register abort.
5669 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
5671 * gfortran.h: Introduce options to control the mangling.
5672 * lang.opt: Likewise.
5673 * options.c (gfc_init_options): Handle the options.
5674 * trans-common.c (gfc_sym_mangled_common_id): New function.
5675 (gfc_build_common_decl): Call it.
5676 * trans-decl.c (gfc_sym_mangled_function_id): New function.
5677 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
5679 2003-08-09 Paul Brook <paul@nowt.org>
5681 * module.c (mio_symbol): Always ouput a namespace for formal args.
5682 (load_needed): Namespace now belong to their proper symbol.
5683 (gfc_dump_module): Change G95=>GFORTRAN.
5685 2003-08-05 Paul Brook <paul@nowt.org>
5687 * options.c: Force -fg77-calls.
5689 2003-08-02 Paul Brook <paul@nowt.org>
5691 * Makelang.in: Rename G95_* to GFORTRAN_*.
5692 * All sources: Rename G95_* to GFC_*.
5694 2003-08-01 Paul Brook <paul@nowt.org>
5696 * fortran/Make-lang.in: Use GMPLIBS.
5697 * fortran/config-lang.in: Set need_gmp.
5698 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
5700 2003-07-27 Andreas Jaeger <aj@suse.de>
5702 * trans-decl.c (gfc_generate_constructors): Convert prototype to
5704 * trans-const.c (gfc_init_constants): Likewise.
5705 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
5707 * gfortranspec.c: Convert to ISO C90.
5708 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
5710 2003-07-26 Paul Brook <paul@nowt.org>
5712 * lang.opt: Add -fdump-parse-tree.
5713 * options.c (gfc_handle_option): Ditto.
5714 * resolve.c (resolve_forall_iterators): Convert to proper type.
5715 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
5717 2003-07-26 Paul Brook <paul@nowt.org>
5719 * Makefile.in: Add build dependencies on files common with rest of gcc.
5721 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
5723 * trans.h: Declare g95_trans_pointer_assignment.
5724 * trans-expr.c (g95_trans_pointer_assignment): New function.
5725 (g95_trans_pointer_assign): Use it.
5726 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
5727 (g95_trans_pointer_assign_need_temp): New function.
5729 2003-07-26 Paul Brook <paul@nowt.org>
5731 * gfortran.texi: Replace references to g95.
5733 2003-07-26 Paul Brook <paul@nowt.org>
5735 Rename g95_* to gfc_*.
5737 2003-07-25 Paul Brook <paul@nowt.org>
5739 * gfortran.h: Rename from g95.h.
5740 * trans-types.c (boolean_type_node, booelan_true_node,
5741 boolean_false_node): Remove.
5742 * trans-types.h: Ditto.
5744 2003-07-25 Chun Huang <compiler@sohu.com>
5746 * parse.c (accept_statement): Implement BLOCK DATA statement.
5747 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
5750 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
5752 * trans-stmt.c (temporary_list): Define.
5753 (g95_trans_assign_need_temp): New function.
5754 (g95_trans_forall_1): Modified for WHERE.
5755 (g95_trans_where_assign): Modified.
5756 (g95_trans_where_2): Modified.
5757 (g95_evaluate_where_mask): Modified.
5758 (g95_trans_where): Modified.
5759 (g95_get_temp_expr): Removed.
5760 (g95_add_to_where_stmt_list): Removed.
5761 (compute_overall_iter_number): Modified for WHERE.
5762 * trans.h: Remove where_stmt_list.
5764 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5766 * lang.opt: Correct description of options -J and -M.
5768 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
5770 * lang.opt: Move help text to here.
5771 * lang-options.h: Remove.
5773 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5774 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
5775 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
5778 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
5779 Paul Brook <paul@nowt.org>
5781 * check.c (check_rest): Use global pedantic flag.
5782 * io.c (data_desc): Ditto.
5783 * error.c (g95_warning, g95_warning_now): Use global flag.
5784 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
5785 (expand_function_body): Update to new prototypes.
5786 (g95_init): Use new option names.
5787 * g95.h (g95_option_t): Standardize names.
5788 (g95_init_options, g95_handle_option): Update prototypes.
5789 * interface.c: Use new option names.
5796 * simplify.c: Ditto.
5798 * trans-array.c: Ditto.
5799 * trans-expr.c: Ditto.
5800 * trans-types.c: Ditto.
5801 * trans-decl.c: Ditto.
5802 (g95_build_library_function_decl): Remove obsolete VPARAMS.
5804 * options.c (g95_display_help): Remove.
5805 (g95_init_options): Convert to new scheme.
5807 (g95module_option): Ditto, rename from g95_parse_arg.
5808 (g95_handle_module_path_options): New function.
5809 * trans-equivalence.c: Fix error message.
5810 * lang.opt: Corrections.
5812 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
5814 * lang.opt: New file.
5816 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5818 * decl.c (match_attr_spec): Set colon_seen.
5820 2003-07-14 Paul Brook <paul@nowt.org>
5822 * trans-array.c: Update comment.
5823 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
5824 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
5825 minmaxloc,minmaxval): Ditto.
5826 * trans-io.c (g95_trans_transfer): Ditto.
5827 * trans-stmt.c: Remove unneeded prototypes.
5828 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
5829 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
5830 (compute_inner_temp_size): Remove bits of dead code. Add comments.
5831 Don't share loopinfo.
5832 (compute_overall_iter_number): Declare as static.
5833 (allocate_temp_for_forall_nest): Ditto.
5834 (g95_trans_forall_1): Don't pass shared loopinfo.
5835 * trans.c (g95_start_block): Expand comment.
5837 2003-07-12 Paul Brook <paul@nowt.org>
5839 * arith.c (g95_index_integer_kind): Remove unused initializer.
5840 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
5841 index by size of element.
5842 (generate_loop_for_rhs_to_temp): Ditto.
5843 (allocate_temp_for_forall_nest): Use element size, not index size.
5845 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5847 * arith.c (g95_index_integer_kind): Add a TODO.
5848 * simplify.c (g95_simplify_nearest): Add a TODO.
5850 2003-07-09 Chun Huang <compiler@sohu.com>
5852 * trans.h: Add declarations for gfor_fndecl_string_scan and
5853 gfor_fndecl_string_verify.
5854 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
5855 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
5856 (g95_conv_intrinsic_verify): New function.
5857 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
5858 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
5859 of parameter 'BACK=.TRUE.'
5861 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
5863 * trans-stmt.c (iter_info, forall_info): Define.
5864 (g95_trans_forall_block): Remove.
5865 (g95_trans_forall_loop): Use forall info blocks.
5866 (g95_trans_nested_forall_loop): New function.
5867 (g95_do_allocate): Handle things other than logical masks.
5868 (generate_loop_for_temp_to_lhs): New function.
5869 (generate_loop_for_rsh_to_temp): New function.
5870 (compute_inner_temp_size): New function.
5871 (compute_overall_iter_number): New function.
5872 (allocate_temp_for_forall_nest): New function.
5873 (g95_trans_forall): Move body ...
5874 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
5876 2003-07-02 Paul Brook <paul@nowt.org>
5878 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
5879 in correct scope. Change callers to match.
5880 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
5881 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
5883 2003-07-02 Paul Brook <paul@nowt.org>
5885 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
5886 expression shape for all expressions.
5887 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
5889 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5891 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
5892 g95_parse_arg), intrinsic.c (g95_convert_type): support of
5894 * intrinsic.c, g95.h: Add g95_convert_type_warn,
5895 * resolve.c (g95_resolve_index): Call it.
5897 2003-07-02 Paul Brook <paul@nowt.org>
5899 * iresolve.c (g95_resolve_reshape): Set expression shape.
5900 (g95_resolve_shape): Ditto.
5901 * simplify.c (g95_simplify_shape): Move common code outside condition.
5902 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
5904 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5906 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
5909 2003-06-29 Paul Brook <paul@nowt.org>
5911 * array.c (g95_simplify_iterator_var): Don't bother with return value.
5912 * expr.c (find_array_element, find_component_ref): New functions.
5913 (remove_subobject_ref): New function.
5914 (simplify_const_ref): Use them. Rename from simplify_component_ref.
5915 (simplify_ref_chain): New function.
5916 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
5917 (g95_specification_expr): Simplify the expression.
5918 * resolve.c (resolve_operator): Check simplifications return code.
5919 (g95_resolve_expr): Ditto.
5921 2003-06-26 Paul Brook <paul@nowt.org>
5923 * expr.c (simplify_component_ref): New function.
5924 (g95_simplify_expr): Use it.
5925 * resolve.c (resolve_structure_cons): Handle references.
5927 2003-06-25 Paul Brook <paul@nowt.org>
5929 * trans-io.c (build_dt): Handle internal units.
5931 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
5933 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
5934 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
5935 Use g95_array_index_type instead of integer_type_node.
5936 (g95_build_common_decl, g95_set_common_master_type): Use
5937 g95_character1_type_node instead of char_type_node.
5938 * trans-equivalence.c (g95_layout_local_equiv): As above.
5940 2003-06-24 Steven G. Kargl <kargls@attbi.com>
5942 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
5943 remove last remains of -fquiet.
5945 2003-06-22 Paul Brook <paul@nowt.org>
5947 * resolve.c (resolve_operator): Don't fail if we can't simplify.
5948 (g95_resolve_expr): Ditto.
5949 (resolce_code): Mark as static.
5950 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
5951 gimplifer doesn't (yet).
5953 2003-06-20 Paul Brook <paul@nowt.org>
5955 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
5956 * match.c (g95_match_if): Add ST_PAUSE.
5957 (g95_match_stopcode): New function.
5958 (g95_match_pause, g95_match_stop): Use it.
5959 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
5960 (decode_stmt, next_statement, parse_executable): Ditto.
5961 * resolve.c (resolve_code): Ditto.
5962 * st.c (g95_free_statement): Ditto.
5963 * trans-stmt.c (g95_trans_pause): New function.
5964 * trans-stmt.h: Declare it.
5965 * trans.c (g95_trans_code): Use it.
5966 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
5968 (g95_build_builtin_function_decls): Initialize them.
5970 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
5972 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5974 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
5975 match_filepos): Fix error handling.
5977 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5979 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
5980 Add assertions on arguments.
5981 * resolve.c (expression_shape): Remove useless &.
5982 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
5983 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
5984 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
5985 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
5986 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
5987 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
5988 (g95_simplify_not, g95_simplify_scale): Add assertions.
5990 2003-06-15 Paul Brook <paul@nowt.org>
5992 Clean up stuff to work with the ssa optimizers.
5993 * convert.c (convert): Handle BOOLEAN_TYPEs.
5994 * f95-lang.c (g95_truthvalue_conversion): Implement.
5995 * trans-array.c (g95_trans_array_constructor_value): Group multiple
5997 * trans.h (g95_truthvalue_conversion): Declare.
5998 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
5999 * trans-stmt.c (g95_trans_character_select): Don't create array
6000 assignments. Mark labels as indirect jump targets.
6001 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
6002 (g95_get_dtype_cst): Handle LOGICAL types.
6004 2003-06-14 Paul Brook <paul@nowt.org>
6006 * f95-lang.c (g95_gimplify_expr): New function.
6007 * trans-array.c (g95_trans_array_constructor_value): Don't create
6009 (g95_conv_expr_descriptor): Rename simple->gimple.
6010 * trans-expr.c (conv_expr_op): Use proper logical operators.
6011 * trans-intrinsic.c (build_fixbound_expr): New function.
6012 (build_fix_expr): Ditto.
6013 (g95_conv_intinsic_aint): Use them. Use builtin functions.
6014 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
6016 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6018 * array.c (g95_compare_array_spec): Remove unreachable code.
6019 * expr.c (g95_copy_expr): Likewise.
6020 * intrinsic.c (g95_convert_type): Likewise.
6021 * misc.c (g95_code2string): Likewise.
6022 * simplify.c (g95_simplify_ishft, g95_simplify_real,
6023 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
6024 * trans-stmt.c (g95_trans_select): Likewise.
6025 * primary.c (extend_ref): Add an assertion.
6026 * simplify.c (g95_convert_constant): Add const.
6027 * intrinsic.h: Remove g95_check_x_ni.
6028 * f95-lang.c (g95_finish): Call g95_release_include_path.
6030 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6032 * resolve.c (resolve_contained_functions): Fix typo introduced on
6035 2003-06-09 Paul Brook <paul@nowt.org>
6037 * g95.h: Include system.h not hwint.h.
6038 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
6039 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
6041 2003-06-09 Paul Brook <paul@nowt.org>
6043 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
6044 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
6045 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
6046 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
6047 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
6049 * trans.h (g95_trans_equivalence, g95_trans_common,
6050 g95_add_decl_to_function): Declare.
6051 * trans-common.c, trans-equivalence.c: New files.
6053 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
6055 * intrinsic.c (g95_intrinsic_extension): Remove.
6056 (add_functions): Substitute g95_check_x for g95_check_x_ni
6058 (g95_init_expr_extensions): New function.
6059 (g95_intrinsic_func_interface): Use it.
6060 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
6061 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
6062 g95_check_precision, g95_check_present, g95_check_radix,
6063 g95_check_range, g95_check_selected_real_kind): Do not set
6064 g95_intrinsic_extension.
6065 (g95_check_x_ni): Remove now duplicate of g95_check_x.
6067 * expr.c (check_inquiry): Add FIXME, fixup some code style.
6069 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6071 * g95.h (ref_type): Name this type explicitly.
6072 * module.c (MIO_NAME): Add specialisations of mio_name.
6073 (mio_symbol_attribute, mio_typespec, mio_array_ref,
6074 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
6075 (ab_attribute): Name this type explicitly.
6076 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
6078 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
6080 * trans-intrinsic.c (g95_conv_allocated): New function.
6081 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
6083 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
6085 * f95-lang.c: Don't include g95-support.h
6086 (g95_mark_addressable): Add prototype.
6087 (g95_init_decl_processing): Remove C front end hack.
6088 * f95-tree.c: Remove file.
6089 * support.c: Remove file.
6090 * g95-support.h: Remove file.
6091 * trans-types.c (g95_init_types): Set up boolean
6092 type related tree nodes.
6093 * Make-lang.in: Remove rules for dead files and
6094 dependencies on them.
6096 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
6098 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
6099 C front end dependency. Also, convert.c does not depend on
6100 g95-support.h anymore.
6101 * convert.c: Don't include c-common.h and g95-support.h
6102 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
6103 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
6104 stmts_are_full_exprs_p, current_stmt_tree,
6105 current_scope_stmt_stack): Remove.
6106 * g95-support.h (unsigned_conversion_warning): Kill proto.
6107 (boolean_type_node, boolean_true_node, boolean_false_node):
6108 Don't define here. Instead, make then true tree nodes in
6110 * support.c (c_global_trees): Die, C front end, die!!!
6111 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
6112 uintmax_type_node, string_type_node and const_string_type_node.
6113 (decl_constant_value, overflow_warning): Make static functions.
6114 They are in death row too, though.
6115 (default_conversion, c_expand_asm_operands): Remove.
6116 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
6117 trans.c: Don't include c-common.h.
6118 * trans-types.c (boolean_type_node, boolean_true_node,
6119 boolean_false_node): Make them real tree nodes.
6120 * trans-types.h (intmax_type_node, string_type_node,
6121 const_string_type_node): Hack to work around C dependencies
6122 in builtin-types.def.
6124 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6126 * decl.c (decl_types): Add some iterators-like sentinels.
6127 * decl.c (match_attr_spec): Use them.
6128 Use "decl_types" instead of "int".
6129 Add cast in call to g95_match_strings.
6130 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
6132 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
6133 (g95_interface_info): Use "g95_intrinsic_op".
6134 * dump-parse-tree.c (g95_show_namespace): Use them.
6135 * interface.c (g95_check_interfaces): Use them.
6136 * module.c (read_module, write_module): Use them.
6137 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
6138 Use "g95_intrinsic_op".
6139 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
6140 Add a default case in switch statement.
6141 * intrinsic.h (g95_generic_isym_id): Moved to...
6142 * g95.h (g95_generic_isym_id): here.
6143 (g95_intrinsic_sym): Use "g95_generic_isym_id".
6144 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
6145 * trans-intrinsic.c (g95_intrinsic_map_t,
6146 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
6147 * match.c (g95_match_intrinsic_op): Add cast in call to
6150 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
6152 * support.c (skip_evaluation, warn_conversion, lvalue_p,
6153 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
6154 constant_fits_type_p, convert_and_check,
6155 unsigned_conversion_warning): Remove these ugly remnants
6156 we inherited from the C front end.
6157 (function_types_compatible): Remove '#if 0'-edcode.
6158 (build_modify_expr): Likewise.
6159 (convert_for_assignment): Don't use the deceased functions.
6160 The parameter fundecl is now unused.
6161 (decl_constant_value): Always just return decl. In fact
6162 this function is not used at present, but it might be in
6163 the future, when we start using the tree inliner.
6164 (overflow_warning, default_conversion, c_expand_asm_operands):
6165 Abort when these are called, they are part of the C type
6166 checking implementation and therefore poison to Fortran.
6168 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
6170 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
6171 c-pretty-print.o and c-dump.o. Add a comment on why we
6172 depend on c-semantics.c.
6173 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
6174 Don't use the C front end tree dumper hook to dump the
6175 language specific tree representation -- we don't have
6176 one. So instead, inherit the default langhook.
6178 2003-06-02 Paul Brook <paul@nowt.org>
6180 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
6182 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6184 * check.c (g95_check_associated): Use proper types. Remove
6185 extraneous argument in call to g95_error().
6187 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
6189 * resolve.c (resolve_operator): Make logical operands convert to the
6190 type with higher kind.
6192 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
6194 * check.c (g95_check_associated): Make sure both pointer and target has
6195 the same type and rank. Null pointer or array section with vector
6196 subscript as target are not allowed.
6197 * trans.h: Declare gfor_fndecl_associated.
6198 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
6199 gfor_fndecl_associated.
6200 * trans-intrinsic.c (g95_conv_associated): New function.
6201 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
6203 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
6205 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
6206 according to POINTER itself rather than TARGET.
6207 (g95_conv_expr_descriptor): Make lbound start at 1.
6208 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
6210 2003-06-01 Paul Brook <paul@nowt.org>
6212 * expr.c (g95_type_convert_binary): Make it match the standard.
6213 * g95.texi: Remove dead link.
6215 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
6217 * g95.texi: Cleanup somewhat in preparation for inclusion
6220 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6221 Canqun Yang <canqun@yahoo.com.cn>
6223 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
6225 (g95_find_forall_index): Return proper value.
6226 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
6227 compare the return value from g95_find_forall_index.
6229 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6230 * g95.h, io.c (g95_st_label): Remove "length".
6231 (g95_symtree): Remove "link".
6232 (g95_case): Remove "code".
6233 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
6234 g95_convert_real): Make an argument pointer to const.
6235 * decl.c (colon_seen): Add a TODO.
6236 * interface.c (g95_compare_types): Fix typo.
6237 * interface.c (compare_interfaces): Preserve value of "p".
6238 * intrinsic.c (sort_actual): Remove "i".
6239 * match.c (g95_match_assign): Proper type in call to g95_match().
6240 * parse.c (next_free): Avoid duplicate call due to macro.
6241 * parse.c (check_statement_label): wrong type in call to g95_error.
6242 * primary.c (match_real_constant): Add a TODO.
6243 * resolve.c (resolve_select): Remove useless conditional.
6244 * simplify.c (g95_simplify_repeat): Proper assignment to
6245 "value.character.string".
6246 * simplify.c (g95_simplify_reshape): Wrong variable in call to
6249 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
6251 * trans-stmt.c: Remove unnecessary include file defaults.h.
6253 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
6255 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
6257 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
6258 actual variables used as FORALL indexes.
6260 2003-05-15 Paul Brook <paul@nowt.org>
6262 * trans-array.c (g95_trans_static_array_pointer): Use
6264 (g95_trans_deferred_array): Initialize static array pointers.
6265 * trans-expr.c (g95_conv_function_call): Use formal arglist to
6266 correctly pass POINTER and absent CHARACTER arguments.
6268 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
6270 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
6271 (g95_resolve_forall_body): Resolve FORALL body.
6272 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
6273 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
6274 (g95_find_forall_index): Check whether the FORALL index appears in
6275 the expression or not.
6276 (resolve_code): Modified.
6278 2003-05-14 Paul Brook <paul@nowt.org>
6280 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
6282 2003-05-13 Paul Brook <paul@nowt.org>
6284 * trans-types.c (g95_max_array_element_size): Now a tree node.
6285 (g95_init_types): Work out max size properly.
6286 (g95_get_dtype_cst): Modify to match.
6288 2003-05-11 Paul Brook <paul@nowt.org>
6290 * trans-io.c (add_case): Create a label decl for case labels.
6292 2003-05-11 Paul Brook <paul@nowt.org>
6294 * arith.c (g95_integer_index_kind): New variable.
6295 * f95-lang.c (g95_init): Move frontend initialization here ...
6296 (g95_post_options): ... from here.
6297 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
6298 * intrinsic.c (add_functions): Use index kinds.
6299 * iresolve.c: Convert to index_kind where needed.
6300 * resolve.c (g95_resolve_index): Make public, use index_kind.
6301 (resolve_array_ref): Adjust to match.
6302 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
6303 * trans-stmt.c: Ditto.
6304 * trans-types.c: Ditto.
6305 * trans-types.h (g95_array_index_kind): Remove declaration.
6306 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
6308 2003-05-07 Paul Brook <paul@nowt.org>
6310 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
6311 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
6314 2003-05-07 Paul Brook <paul@nowt.org>
6316 * trans-array.c (trans_static_array_pointer,
6317 g95_trans_array_constructor_value, g95_conv_array_initializer,
6318 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
6319 (g95_add_loop_ss_code): Convert subscripts to the correct type.
6320 * trans-stmt.c (g95_trans_character_select): Ditto.
6321 * trans-types.c (g95_init_types): Ditto.
6323 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
6325 * f95-lang.c (expand_function_body): Use input_line, not lineno.
6326 * trans-decl.c (g95_generate_function_code,
6327 g95_generate_constructors): Likewise.
6328 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
6329 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
6332 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
6333 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
6334 with components point to the DERIVED type itself, and two DERIVED
6335 type with components point to each other.
6336 * trans-expr.c (g95_conv_componet_ref): Modified
6338 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
6339 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
6341 (g95_trans_pointer_assign): Implement Nullify.
6343 2003-05-01 Paul Brook <paul@nowt.org>
6345 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
6346 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
6348 2003-05-01 Paul Brook <paul@nowr.org>
6350 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
6351 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
6354 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
6356 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
6359 2003-04-28 Paul Brook <paul@nowt.org>
6361 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
6362 as their kind suggests.
6363 (g95_resolve_reshape): Ditto.
6365 2003-04-28 Chun Huang <compiler@sohu.com>
6367 * trans-expr.c (g95_conv_substring_expr): New function.
6368 (g95_conv_expr): Use it.
6370 2003-04-28 Paul Brook <paul@nowt.org>
6372 * iresolve.c (g95_resolve_transpose): Make it match the
6374 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
6376 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
6378 * trans-types.c (g95_add_field_to_struct): New function to
6379 add a field to a UNION_TYPE or RECORD_TYPE.
6380 * trans-types.h (g95_add_field_to_struct): Prototype.
6381 (g95_get_derived_type): Use g95_add_field_to_struct to add
6383 * trans-io.c (g95_add_field): Remove.
6384 (ADD_FIELD): Use new g95_add_field_to_struct function.
6385 (ADD_STRING): Likewise.
6386 * trans-stmt.c (g95_trans_select): Likewise.
6387 (g95_add_field): Remove duplicated function.
6389 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
6391 Port implementation for CHARACTER SELECT from Andy's tree.
6392 * trans-stmt.c (g95_trans_character_select): Implement character
6393 select. (g95_add_field): New function.
6394 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
6395 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
6396 * g95.h (struct g95_case): Add field 'int n'.
6397 * trans.h: Declare 'gfor_fndecl_select_string'.
6399 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
6401 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
6402 (g95_insert_bbd): Die on duplicates.
6403 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
6405 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
6407 * g95.texi: Require GMP 4.0 -- like we actually
6408 do. Explain the testsuite and what-goes-where.
6409 Don't use undefined texinfo symbol. Break very
6410 long line. Remove finished item from the list
6413 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
6415 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
6418 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
6420 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
6421 (g95_trans_forall_body): New function.
6423 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
6425 * resolve.c (resove_where): New function.
6426 (resolve_where_shape): New function.
6427 (resolve_code): Add call to 'resolve_where'
6428 * trans-stmt.c (g95_trans_where): Modified.
6429 (g95_trans_where_2): New function.
6430 (g95_trans_where_assign): New function.
6431 (g95_evaluate_where_mask): New function.
6432 (g95_add_to_stmt_list): New function.
6433 (g95_get_temp_expr): New function.
6434 * trans.h (where_stmt_list): New structure.
6436 2003-04-10 Paul Brook <paul@nowt.org>
6438 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
6439 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
6441 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
6443 Update after mainline -> tree-ssa-branch merge.
6444 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
6446 (g95_init): Update for new lang_hooks definition.
6447 (g95_post_options): New langhook.
6448 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
6449 * scanner.c (g95_new_file): Comment update.
6451 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6453 * g95.h, lang-options.h: Add -Wimplicit-interface.
6454 * options.c (g95_init_options, g95_parse_arg): Set it.
6455 * interface.c (check_intents): Warn about call with implicit
6457 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
6460 2003-04-05 Paul Brook <paul@nowt.org>
6462 * iresolve.c (g95_resolve_spread): Don't resole based on type.
6463 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
6465 2003-03-29 Paul Brook <paul@nowt.org>
6467 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
6468 (g95_resolve_unpack): Ditto.
6469 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
6470 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
6471 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
6473 2003-03-25 Paul Brook <paul@nowt.org>
6475 * arith.c (g95_unary_user, g95_user): Remove dead functions.
6477 * array.c (g95_free_array_ref): Ditto.
6479 * symbol.c (g95_use_derived_tree): Ditto.
6480 * intrinsic.c (add_functions): Use simplification for SCALE.
6481 * primary.c (g95_match_rvalue): Test sym, not symtree.
6483 2003-03-25 Paul Brook <paul@nowt.org>
6485 * trans-decl.c (build_function_decl): Add parameter before it gets
6486 turned into a constant.
6487 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
6488 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
6489 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
6491 2003-03-22 Paul Brook <paul@nowt.org>
6493 * trans-array.c (g95_conv_array_initializer): Allow scalar
6495 * trans-decl.c (g95_finish_var_decl): Result variables are not
6497 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
6498 (g95_conv_intrinsic_function): Use it.
6499 * trans-types.h (g95_type_spec): Remove dead declaration.
6501 2003-03-21 Paul Brook <paul@nowt.org>
6503 * trans-decl.c (g95_build_function_decl): Mark string parameters.
6505 2003-03-20 Paul Brook <paul@nowt.org>
6507 * trans-decl.c (g95_build_function_decl): Put character length
6508 parameters at the end of the function declaration.
6509 * trans-expr.c (g95_conv_function_call): Ditto.
6510 * trans-types.c (g95_get_function_type): Ditto.
6512 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6514 * resolve.c (resolve_formal_arglist): Don't impose intent for
6515 procedure arguments of pure functions.
6516 (resolve_select): Remove redundant assignment.
6518 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6520 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
6522 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
6523 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
6525 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
6527 * symbol.c (g95_add_type): Fix typo in comment.
6530 2003-03-16 Paul Brook <paul@nowt.org>
6532 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
6533 * expr.c (g95_build_call): Remove.
6534 * f95-lang.c (puchdecl_top_level): New function.
6535 * g95.h (g95_code): Store resolved symbol, not just the name.
6536 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
6537 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
6538 (g95_get_intrinsic_sub_symbol): New function.
6539 * iresolve.c (g95_resolve_cpu_time): Use it.
6540 (g95_resolve_random_number): Ditto.
6541 * resolve.c: Set code->resolved_sym instead of code->sub_name.
6542 * trans-decl.c (g95_get_extern_function_decl): Give external decls
6543 the correct DECL_CONTEXT. Add global symbold to the global scope.
6544 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
6547 2003-03-16 Paul Brook <paul@nowt.org>
6549 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
6550 * options.c (g95_parse_arg): Ditto.
6551 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
6552 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
6553 for the procedure, not the parameter.
6554 * trans-array.c (g95_trans_g77_array): New function.
6555 (g95_trans_assumed_size): Use it.
6556 (g95_trans_dummy_array_bias): Ditto.
6557 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
6558 (g95_conv_expr_descriptor): ... to here. Update callers.
6559 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
6560 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
6561 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
6562 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
6563 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
6564 (g95_sym_type): Ditto.
6566 2003-03-15 Paul Brook <paul@nowt.org>
6568 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
6570 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
6572 2003-03-14 Paul Brook <paul@nowt.org>
6574 * trans-array.c (g95_array_is_packed): Remove.
6575 (g95_conv_array_base): Correctly handle all descriptorless cases.
6576 (g95_conv_array_stride): Use descriptorless strides.
6577 (g95_trans_dummy_array_bias): Don't always repack the array.
6578 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
6580 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
6581 dummy and non-dummy arrays...
6582 (g95_sym_type, g95_get_derived_type): ... like these.
6583 (g95_get_array_type_bounds): Allow discontiguous arrays.
6585 2003-03-12 Paul Brook <paul@nowt.org>
6587 * array.c (g95_resolve_array_spec): Fix comment.
6588 * g95.h (symbol_attributes): New flag always_explicit.
6589 * resolve.c (resolve_formal_arglist): Set it always_explicit.
6590 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
6591 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
6592 (g95_trans_array_bounds): Allow assumed shape arrays.
6593 (g95_trans_repack_array): Remove.
6594 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
6595 * trans-decl.c (g95_build_qualified_array): Only ignore absent
6596 bounds for assumed size arrays.
6597 (g95_build_dummy_array_decl): Use descriptorless arrays.
6598 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
6599 (g95_trans_pointer_assign): Fix typo.
6600 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
6602 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
6603 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
6604 Also modify callers.
6605 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
6607 2003-03-08 Paul Brook <paul@nowt.org>
6609 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
6610 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
6611 * resolve.c (compare_spec_to_ref): Allow full array sections.
6613 2003-03-08 Paul Brook <paul@nowt.org>
6615 * expr.c (g95_simplify_expr): Also simplify array index and
6616 substring expressions.
6617 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
6618 * trans-array.c (g95_trans_array_bounds): New function.
6619 (g95_trans_auto_array_allocation): Use it.
6620 (g95_trans_assumed_size): Rewrite.
6621 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
6622 (gfor_fndecl_repack): Remove.
6623 (g95_build_qualified_array): Handle absent upper bounds.
6624 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
6625 (g95_get_symbol_decl): Update.
6626 (g95_build_intrinsic_function_decls): Initialize new decls.
6627 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
6628 (gfor_fndecl_repack): Remove.
6629 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
6630 * trans-types.c: (g95_build_array_type): Merge duplicated code..
6631 (g95_get_nodesc_array_type): Handle absent bounds.
6632 * trans-types.h (g95_get_nodesc_array_type): Declare.
6634 2003-03-04 Paul Brook <paul@nowt.org>
6636 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
6639 2003-03-02 Paul Brook <paul@nowt.org>
6641 * options.c (g95_init_options): Drfault to 1.
6642 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
6643 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
6644 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
6645 Handle non-constant size automatic arrays.
6646 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
6647 generic bound functions.
6648 (g95_trans_auto_array_allocation): Don't create a descriptor.
6649 (g95_trans_assumed_size): New function (broken).
6650 (g95_trans_dummy_array_bias): Remove unused var.
6651 * trans-array.h (g95_trans_assumed_size): Declare.
6652 * trans-decl.c (create_index_var): New fuction.
6653 (g95_build_qualified_array): New function.
6654 (g95_get_symbol_decl): Use it.
6655 (g95_trans_deferred_vars): Handle assumed shape seperately.
6656 * trans-types.c (get_element_type): Handle heap allocated arrays.
6657 (g95_is_nodesc_array): Include non-const size arrays.
6658 (g95_get_nodesc_array_type): Ditto.
6660 2003-02-23 Paul Brook <paul@nowt.org>
6662 * trans-array.c (g95_array_init_size): Should use stride, not size of
6665 2003-02-18 Paul Brook <paul@nowt.org>
6667 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
6668 after intrinsic function check.
6670 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6672 * io.c (match_io): Fix missing return value and remove useless
6674 * match.c (g95_match): Remove useless assignment.
6675 * module.c (parse_string): Remove useless post increment.
6676 * simplify.c (g95_simplify_verify): Remove useless assignment.
6678 2003-02-15 Paul Brook <paul@nowt.org>
6680 * expr.c (restricted_intrinsic): Handle bad values gracefully.
6681 * g95.h (symbol_attribute): Add referenced member.
6682 (g95_symbol): Add dummy_order member.
6683 (g95_set_sym_referenced): Declare.
6684 * match.c (g95_match_assignment, g95_match_call): Use it
6685 * primary.c (match_actual_arg, g95_match_rvalue,
6686 g95_match_variable): Ditto.
6687 * symbol.c (next_dummy_order): New variable.
6688 (g95_set_sym_referenced): New function.
6689 (check_done): New function.
6690 (g95_add_*): Use it.
6691 * trans-decl.c: Make formatting conform to GCC standards.
6692 (g95_defer_symbol_init): Add dummy variables in the right order.
6693 (g95_get_symbol_decl): Only accept referenced variables.
6694 (g95_create_module_variable): Module variables are always required.
6695 (generatr_local_decls): New function.
6696 (generate_local_vars): New function.
6697 (g95_generate_function_code): Use it.
6699 2003-02-13 Paul Brook <paul@nowt.org>
6701 * trans-decl.c (g95_conv_struct_cons): Remove.
6702 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
6703 * trans-expr.c (g95_conv_structure): New function.
6704 (g95_conv_expr): Use it.
6706 2003-02-09 Paul Brook <paul@nowt.org>
6708 * trans-array.c (g95_array_init_size): Don't evaluate the linit
6709 expressions multiple times.
6710 (g95_trans_auto_arry_allocation): Use pointer not tmp.
6712 2003-02-08 Paul Brook <paul@nowt.org>
6714 * module.c (mio_symtree_ref): Declare as static.
6715 (mio_expr): Remove dead code.
6716 (read_module): Set the symtree link for fixups.
6717 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
6718 (build_round_expr): ... to this.
6719 (g95_conv_intrinsic_aint): New function.
6720 (g95_conv_intrinsic_function): Use it.
6722 2003-02-08 Paul Brook <paul@nowt.org>
6724 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
6725 offset after modificaton, not the increment expression.
6726 * dependency.c: Kill excess whitespace.
6728 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
6730 * dependency.h: Remove some function declarations.
6731 * dependency.c (get_no_of_elements): Change this function not to
6733 * other: Add comments for all modified functions.
6735 2003-02-06 Paul Brook <paul@nowt.org>
6737 * g95spec.c (lang_specific_functions): Fix initializer warning.
6738 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
6739 for structure type names.
6740 * trans-decl.c (g95_cons_structure_cons): New function.
6741 (g95_get_symbol_decl): Use it.
6742 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
6745 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6747 * resolve.c (compare_cases): Add const to casts.
6749 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6751 * g95.h (g95_check_f): Change a1 to f1m.
6752 * intrinsic.c (add_sym_1m, check_specific,
6753 g95_intrinsic_func_interface): Use it.
6755 * module.c (init_pi_tree): Remove useless cast.
6756 (fp2): Fix argument type.
6758 * parse.c (parse_select_block): Add comment.
6760 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
6762 * lang-options.h: Fix warning involving C90 concatenated
6765 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6766 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6768 * io.c (format_asterisk): Complete initializer to kill warning.
6769 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
6770 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
6771 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
6772 new defines to complete initializers. Kills all warnings.
6774 * Make-lang.in: Comment cleanup.
6776 2003-02-05 Paul Brook <paul@nowt.org>
6778 * array.c (g95_free_constructor): Handle NULL expressions.
6779 * resolve.c (resolve_structure_cons): Ditto.
6780 * decl.c (g95_match_null): New Function.
6781 (variable_decl): Use it.
6782 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
6783 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
6784 * trans-types.c (g95_set_decl_attributes): Remove empty function.
6786 2003-02-05 Paul Brook <paul@nowt.org>
6788 * trans.h (build1_v): New macro.
6789 (build_v): Remove pointless and incorrect prototype.
6790 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
6791 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
6793 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
6795 * Make-lang.in (F95_OBJS): Remove one more dead file.
6797 2003-02-01 Paul Brook <paul@nowt.org>
6799 * lang-specs.h: Don't pass -ffixed-form to the linker.
6800 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
6802 2003-02-01 Paul Brook <paul@nowt.org>
6804 * Make-lang.in (F95_OBJS): Remove dead files.
6805 * trans-array.c (g95_array_init_size): Do the right thing when
6807 * trans-decl.c (g95_generate_function_code): Initialize deffered
6808 symbol list before translating contained subroutines.
6809 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
6810 scalar invariant values here...
6811 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
6812 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
6814 2003-01-29 Paul Brook <paul@nowt.org>
6816 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
6817 (g95_walk_elemental_function_args): Reverse chains before adding.
6818 (g95_reverse_ss): Move about a bit.
6819 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
6822 2003-01-28 Paul Brook <paul@nowt.org>
6824 * intrinsic.c (resolve_intrinsic): Use correct union member.
6825 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
6827 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
6828 use associated variables.
6829 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
6830 * trans-expr.c (g95_conv_expr_present): ... to here.
6831 * trans.h: Declare it.
6832 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
6834 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6836 * array.c (expand_iterator): Suppress useless assignment.
6837 * decl.c (match_char_spec): Ditto.
6838 * io.c (match_io_iterator): Ditto.
6839 * primary.c (match_real_constant): Ditto.
6840 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
6841 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
6842 * matchexp.c (match_add_operand, match_level_5): Likewise.
6843 * module.c (parse_atom, find_enum): Likewise.
6844 * resolve.c: move #include <string.h>
6845 (resolve_select): Fix serious typo.
6847 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
6849 * Make-lang.in: Don't build with broken tree-ssa-pre.
6851 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
6853 * resolve.c (resolve_index): Add a TODO.
6854 * symbol.c: Remove useless "#include <ctype.h>".
6856 2003-01-27 Paul Brook <paul@nowt.org>
6858 * check.c (check_rest): Allow different type kinds as an extension.
6859 * g95.h (g95_resolve_f): Add f1m.
6860 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
6861 * intrinsic.h: Chenge prototypes for MIN and MAX.
6862 * iresolve.c (g95_resolve_minmax): New function.
6863 (g95_resolve_min, g95_resolve_max): Use it.
6864 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
6866 (g95_conv_intrinsic_present): Fix logic.
6868 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
6870 * g95.h (g95_case): Don't be a tree, be a double linked list.
6871 * match.c (match_case_selector): Remove redundant semantics check.
6872 Clean up a few goto's to make it a tiny little bit faster.
6873 * resolve.c (case_tree): Die.
6874 (compare_cases): Accept and compare unbounded cases too.
6875 (check_case_overlap): Don't build a tree. Instead, merge-sort the
6876 whole list of g95_cases passed from resolve_select.
6877 (sane_logical_select): Die.
6878 (check_case_expr): Return FAILURE if a CASE label is of the wrong
6880 (resolve_select): Fixup case expression for computed GOTOs, put it
6881 in expr, not expr2, for easier handing in the parse tree dumper and
6882 the code generator. Rewrite the rest of the function: Kill
6883 unreachable case labels and unreachable case blocks.
6884 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
6885 an EXEC_SELECT, not case2 anymore.
6886 * trans-const.c (g95_conv_constant_to_tree): New function.
6887 (g95_conv_constant): Use it.
6888 * trans-const.h: Declare prototype for the new function.
6889 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
6890 g95_trans_character_select): New static functions.
6891 (g95_trans_select): Rewrite.
6893 2003-01-26 Paul Brook <paul@nowt.org>
6895 * intrinsic.c (add_fnctions): Properly add dreal.
6896 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
6897 (g95_conv_intrinsic_function): Use it.
6898 * trans-io.c (build_dt): Abort on internal files (unimplemented).
6900 2003-01-26 Paul Brook <paul@nowt.org>
6902 Widespread changes to the handling of symbols in expressions. These
6903 are now linked via g95_symtree nodes.
6904 * parse.c (g95_fixup_sibling symbols): New function.
6905 (parse_contained): Use it.
6906 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
6907 contained procedure that has bee correctly fixed up.
6908 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
6910 2003-01-24 Paul Brook <paul@nowt.org>
6912 * trans-array.c (g95_walk_expr): Function result attributes are in
6914 * trans-expr.c (g95_conv_function_call,
6915 g95_trans_arrayfunc_assign): Ditto.
6916 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
6918 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
6920 * expr.c (check_restricted): Fix error message.
6921 * symbol.c (free_st_labels): Plug memleak.
6923 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
6925 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
6926 reduce_binary_aa, reduce_binary, eval_intrinsic,
6927 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
6928 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
6929 for typesafe intrinsics helper functions.
6930 (g95_intrinsic_sym): Use them.
6931 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
6932 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
6933 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
6934 check_specific, g95_intrinsic_func_interface,
6935 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
6937 * trans-decl.c (g95_get_extern_function_decl): Likewise.
6938 * Make-lang.in: Don't disable warnings for strict prototypes
6939 any longer, everything is typesafe now.
6941 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
6943 * bbt.c (duplicate_node): Make static.
6944 * module.c (module_name): Make static.
6945 * scanner.c (include_dirs): Make static.
6947 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
6949 Hard coded _gfor_'s should not show up anymore.
6950 * g95.h (PREFIX): New macro.
6951 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
6953 (g95_resolve_random_number): Likewise.
6954 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
6955 * trans-io.c: Remove 'prefix' macro. Replace all uses with
6956 the new PREFIX macro from g95.h.
6958 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
6960 The troubles of forking... Andy implemented this just now too.
6961 Let's stick to that and keep the trees close.
6962 * g95.h (g95_st_label): 'format' member is now a g95_expr.
6963 * io.c: Revert previous changes.
6964 (g95_match_format): Match the format string as a character
6966 * match.h (g95_statement_label): Declare external.
6967 * parse.c: Revert previous changes.
6968 * symbol.c (g95_free_st_label): Free a g95_expr instead
6970 * trans-io.c: Revert previous changes.
6971 (build_dt): Use set_string to set the format string.
6973 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
6975 * io.c (format_string): Make non-static.
6976 (g95_match_format): Remember the format string.
6977 (terminate_io): Add I/O termination for empty I/O lists.
6978 * match.h: Declare external format_string.
6979 * parse.c (check_statement_label): Attack the format string
6980 to a format label for FORMAT statements.
6981 * trans-io.c (g95_add_field): Define prefix macro. Replace
6982 all uses of PREFIX define with a use of this macro.
6983 (build_dt): Implement formatted I/O for format labels.
6985 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
6987 * lang-options.h: Kill "-std=F".
6988 * options.c: Remove unimplemented "-std=F". Modify
6990 * misc.c (g95_terminal_width): New function.
6991 * error.c (g95_error_init_1): Use g95_terminal_width.
6992 * g95.h: Add prototype for g95_terminal_width, remove
6995 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
6997 * Make-lang.in: Fix typo.
6999 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
7001 * g95.h (struct g95_case): Remove unused cruft, new member
7002 'where' to keep track of the locus of the default case.
7003 * match.c (g95_match_case): Add locus to the current case.
7004 (match_case_selector): Likewise.
7005 * parse.c (parse_select_block): Move semantics check for
7006 multiple DEFAULT cases out of here to...
7007 * resolve.c (check_case_overlap): ...here. Return sooner
7009 (check_case_expr): Take two g95_cases now, use to sure the
7010 expression kinds are the same.
7011 (resolve_select): Cleanup.
7013 2003-01-18 Paul Brook <paul@nowt.org>
7015 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
7016 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
7018 (g95_get_extern_function_decl): Put decls in the correct context.
7020 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
7022 * trans-io.c: Port changes from Andy to set ERR flag.
7024 2003-01-17 Paul Brook <paul@nowt.org>
7026 * trans-array.c: Add various comments.
7027 (g95_ss_terminator): Declare as const.
7028 (g95_walk_expr): Remove first parameter and update all callers.
7029 (g95_walk_op_expr): Initialize scalar SS properly.
7030 * trans-array.h (g95_walk_expr): Update prototype.
7031 * trans-expr.c: Update for new g95_walk_expr.
7032 * trans-intrinsic.c: Ditto.
7033 * trans-io.c: Ditto.
7034 * trans.h: Various comments for SS chains.
7036 2003-01-17 Paul Brook <paul@nowt.org>
7038 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
7040 * intrinsic.c (add_functions): Use them.
7041 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
7042 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
7044 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7046 Fallout of a small merge conflict:
7047 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
7049 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7051 * initrinsic.c: New add_sym_* functions for strong typing.
7052 (add_conv): Make prototype strict.
7053 * dump-parse-tree.c, dependency.c: Include config.h
7054 * resolve.c, trans-io.c: Fix typos.
7056 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7058 * dump-parse-tree.c (g95_show_code_node): Show the
7059 condition for a computed GOTO that was transformed
7060 to a SELECT CASE construct.
7061 * resolve.c (check_case_overlap): Revert previous switch
7062 to treaps, it was too slow and didn't catch all trouble.
7063 (resolve_symbol): Be more flexible about module procedures.
7064 * symbol.c (check_conflict): Point to relevant section in
7065 the standard for dubious conflict. Allow procedure
7066 dummy arguments to be optional again.
7067 * trans-io (add_field): Rename to g95_add_field. Change
7069 * trans-stmt (trans_select): Handle unbounded cases for
7070 integer SELECT CASE constructs. Fix/add more comment.
7072 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7074 * g95.h: Uses GCC's function attribute macros.
7075 * error.c, module.c, parse.c, g95.h: More function attributes.
7077 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
7079 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
7080 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
7083 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
7085 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
7087 * trans.c (g95_trans_code): Use annotate_all_with_file_line
7088 instead of nowdead wrap_all_with_wfl.
7090 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7092 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
7093 before generating code, so we can still see it even if the code
7094 generation phase dies.
7096 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7098 * decl.c (build_sym): Split out initialization expression parts...
7099 (add_init_expr_to_sym): ...to here.
7100 (variable_decl): Add the symbol following an attribute list to the
7101 symbol tree before parsing the optional initialization expression
7102 if the symbol is not of a derived type.
7103 * primary.c (g95_match_rvalue): Don't assume a symbol always has
7104 a value if it is a PARAMETER.
7106 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7108 * misc.c: Don't #include <mcheck.h>
7109 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
7110 ever was a glibc bug, then either this was never reported to
7111 glibc people, or it has been fixed for so long that there's
7112 no information you can find about it, anywhere.
7114 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7117 * module.c (attr_bits, bt_types, array_spec_types):
7118 Switch 'const' and 'static'.
7119 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
7121 GNU'ify source code:
7122 * trans-io.c: Numerous fixes, one fixed warning and a few
7123 TODO markers so that we don't forget about them.
7125 2003-01-13 Paul Brook <paul@nowt.org>
7127 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
7128 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
7130 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
7131 * match.c (g95_match_stop): Fix dumb == -> != error.
7133 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
7135 * dump-parse-tree.c (show_indent): Add line breaks. This
7136 whole dumping process needs cleanups.
7137 * f95-lang.c (g95_mark_addressable): Fix prototype to match
7138 the langhook. Fix 'return's accordingly.
7139 * g95-support.h: Adjust prototype.
7140 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
7141 * lang-options.h: Add '-fsyntax-only'.
7142 * options.c (g95_init_options): Init 'no_backend'.
7143 (g95_parse_arg): Deal with '-fsyntax-only'.
7144 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
7147 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
7149 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
7150 arguments. Also make sure that if a symbol is marked INTRINSIC,
7151 an intrinsic with the symbol's name actually exists.
7152 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
7153 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
7154 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
7156 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
7158 * resolve.c (resolve_contained_functions): Fix condition, don't
7159 throw internal_error if a child namespace has no name. Apparently
7160 this can be the case?
7162 2003-01-11 Paul Brook <paul@nowt.org>
7164 Port changes from Andy's tree:
7165 * g95.h (g95_code): Add stop_code.
7166 * match.c (g95_match_stop): Detter syntax checking.
7167 * resolve.c (resolve_generic_f0): Return match type.
7168 (resolve_generic_f): Remove dead/duplicated code.
7169 (resolve_specific_f): Ditto.
7170 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
7171 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
7172 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
7174 2003-01-11 Paul Brook <paul@nowt.org>
7176 * trans-array.c: Various documentation/comment changes.
7177 * trans-stmt.c: Ditto.
7180 2003-01-10 Paul Brook <paul@nowt.org>
7182 * options.c/h: Add -fdump-parse-tree as alias of -v.
7184 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7186 * dump-parse-tree.c (g95_show_namespace): Fixed another
7187 typo. Sorry, it's Friday...
7189 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7192 * trans-array.c, trans-array.h, trans.c, trans-const.c,
7193 trans-const.h, trans-decl.c, trans-expr.c, trans.h
7194 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
7195 trans-types.c: Fix bogus copyright years, add 2003.
7196 * trans-types.h: Give copyright header.
7198 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7200 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
7201 * expr.c, options.c, scanner.c: Add some more 'const' markers.
7202 * intrinsic.c: Some constant strings moved to read-only memory.
7203 * io.c (format_asterisk): Move to...
7206 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7208 * dump-parse-tree.c (g95_show_namespace): Dump implicit
7209 types for ranges instead of per-letter. Indent the
7210 'CONTAINS' just like everything else.
7211 * resolve.c (resolve_contained_functions): Clarify comment.
7212 Explain non-obvious conditional expression. Improve
7213 diagnostics if tyoe cannot be resolved.
7214 Port semi-fix from Andy's tree:
7215 (was_declared): Move up before first use.
7216 (generic_sym, specific_sym): New functions. Code moved
7217 out if procedure_kind.
7218 (procedure_kind): Simplify using new functions.
7219 (resolve_generic_f): Make sure the functions we find in
7220 a parent namespace is generic.
7221 (resolve_specific_f): Ditto for specific functions.
7223 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7225 * trans-stmt.c, trans.c: Fix some code style issues. Add
7226 some more comment (but still not enough!).
7228 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7230 * symbol.c (flavors, procedures, intents, acces_types,
7231 access_types, ifsrc_types): Make const.
7232 * misc.c (g95_string2code): Make 'm' param 'const'.
7233 * module.c (find_enum, write_atom, mio_name): Make
7235 (attr_bits, bt_types, array_spec_types, array_ref_types,
7236 ref_types, expr_types): Make const.
7237 * g95.h: Adjust external decls.
7239 2003-01-09 Paul Brook <paul@nowt.org>
7241 * Testsuite: Add a load of new cases.
7243 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
7245 * Make-file.in: Add dependency on back end header files;
7246 a parallel build should work now.
7247 * f95-lang-c (lang_identifier): Remove bogus comment.
7248 (g95_be_parse_file): Fix prototype.
7249 (g95_init): Make static.
7250 (g95_finish): Make static.
7251 * error.c (g95_syntax_error): Kill. Make define in...
7252 * g95.h (g95_syntax_error): Define.
7253 (g95.options): Make 'source' member 'const'.
7254 * interface.c (g95_match_interface): Explain
7255 hard-to-read condition.
7256 (g95_match_end_interface): Ditto.
7257 * trans_const.c (g95_build_string_const): Make 's' parameter
7259 * trans_const.h: Adjust protoype accordingly.
7260 * trans-decl.c: Include tree-dump.h
7261 (g95_generate_function_code): Build fixes for recent changes
7262 in the tree-ssa branch.
7264 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
7266 * format.c: Kill, move code from here...
7268 * Make-lang.in: Adjust.
7271 * BUGS: Mention where to submit bugs. Move old content...
7272 * TODO: ...to here. New file.
7274 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
7275 Fix most warnings, and suppress the ones we can't fix for now.
7276 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
7277 these warnings just clutter the screen and there's not much
7278 we can do about them for now anyway.
7279 * check.c, iresolve.c: Mark unused function parameters.
7280 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
7281 they should be resolved before they get here.
7282 * error.c: Remove unused FILE *status_out.
7283 * f95-lang.c (g95_init): Remove bogus cast.
7284 * Many files: Make things 'const' where required.
7285 * g95.h: Fix prototypes for all modified functions above.
7286 (g95_options): Remove 'object' member.
7288 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
7290 * Make-file.in: Cleanup bogus targets. Add more comment.
7291 * lang-options.h: New option '-w'.
7292 * g95.h: add no_options field to struct g95_options.
7293 * options.c (g95_init_options): Default no_warnings to off.
7294 (g95_parse_arg): Recognise the '-w' switch and its alias,
7296 * error.c (g95_warning, g95_warning_now): Don't emit warning if
7297 no_warning option is set.
7298 * iresolve.c (g95_resolve_shape): Fix warning.
7300 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
7302 * primary.c (g95_next_string_char): Rename next_string_char, and
7303 make static. Adjust callers accordingly.
7304 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
7305 callers accordingly.
7306 * g95.h: Split out all g95_match* functions to...
7307 * match.h: ...here. New file.
7308 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
7309 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
7311 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
7313 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
7314 g95_merge_new_implicit): New functions.
7315 (g95_match_implicit_none, g95_match_implicit): Move from here...
7316 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
7317 Modify to use the new functions in symbol.c.
7318 * g95.h: Add and move prototypes.
7320 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
7322 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
7323 node compare function.
7324 (g95_insert_bbt): Likewise.
7325 (g95_insert_bbt_with_overlap): Likewise.
7326 (g95_delete_bbt): Likewise.
7327 (delete_treap): Likewise. Also fix a potential bug when calling it.
7328 * module.c (compare_pointers): Change proto to compare_fn.
7329 (compare_integers): Likewise.
7330 (compare_true_names): Likewise.
7331 (find_true_name): Adjust call to compare_true_names to match proto.
7332 (require_atom, write_atom, mio_name): Fix 'const' warnings.
7333 (init_pi_tree): Make compare a compare_fn instead of (int *).
7334 * resolve.c (compare_cases): Change proto to compare_fn.
7335 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
7336 it static, and rename to compare_symtree.
7337 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
7339 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
7340 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
7342 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
7343 * Make-lang.in: Fix spaces/tabs issues from previous patch.
7344 * patch.options: Blow away Paul's checkin mistake :-)
7345 * io.c (terminate_io): Fix memory leak (Arnaud).
7347 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
7349 * Make-lang.in: Teach about building DVI, info manual.
7350 * g95.texi: New file.
7352 2003-01-02 Paul Brook <paul@nowt.org>
7354 * trans-array.c (g95_reverse_ss): Make static and don't use.
7355 (g95_conv_ss_descriptor): Don't use g95_loopinfo
7356 (g95_conv_array_parameters): Modify for pointer assignments.
7357 (g95_walk_subexpr): New function.
7358 (g95_walk_expr*): Use it.
7359 * trans-array.h (g95_reverse_ss): Remove prototype.
7360 * trans-expr.c (g95_trans_pointer_assign): Implement.
7361 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
7362 * trans-intrinsic.c: Sync with scalarizer changes.
7363 * trans-io.c: Ditto.
7365 2002-12-29 Paul Brook <paul@nowt.org>
7367 * trans-array.c: Document calling convention for arrays.
7369 2002-12-19 Paul Brook <paul@nowt.org>
7371 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
7372 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
7373 optional parameters for some intrinsics.
7374 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
7375 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
7376 optional parameters.
7377 * trans.h (g95_se): Add ignore_optional flag.
7379 2002-12-15 Paul Brook <paul@nowt.org>
7381 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
7382 * trans-decl.c (g95_generate_function_code): Use TDI_original.
7384 2002-12-14 Paul Brook <paul@nowt.org>
7386 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
7388 2002-12-12 Paul Brook <paul@nowt.org>
7390 * trans-array.c (g95_trans_array_constructor_subarray): Fully
7391 initialize the scalarizer.
7392 (various): Update to new format of g95_expr->value.constructor.
7394 2002-12-08 Paul Brook <paul@nowt.org>
7396 * trans-array.c (g95_put_offset_into_var): New function.
7397 (g95_trans_array_constructor_subarray): New function.
7398 (g95_trans_array_constructor_value): Use it.
7399 (g95_array_cons_size): Don't abort() on array components.
7401 2002-12-08 Paul Brook <paul@nowt.org>
7403 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
7404 * support.c: Update #includes.
7405 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
7406 * trans-array.c: Update #includes.
7408 * trans-const.c: Ditto.
7409 * trans-io.c: Ditto.
7410 * trans-types.c: Ditto.
7411 (g95_init_types): Set size_type_node.
7412 * trans-decl.c: Update #includes.
7413 (gfor_fndecl_adjust{l,r}): Declare and initialize.
7414 * trans-stmt.c: Update #includes.
7415 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
7416 (g95_trans_select): Fix check for unbounded ranges.
7417 * trans-expr.c: Update #includes.
7418 (g95_conv_string_tmp): New function.
7419 (g95_conv_concat_op): Use it.
7420 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
7421 * Trans-intrisic.c: Update #includes.
7422 (g95_conv_intrinsic_strcmp): New function.
7423 (g95_conv_intrinsic_adjust): Ditto.
7424 (g95_conv_intrinsic_function: Use them.
7426 2002-11-30 Paul Brook <paul@nowt.org>
7428 * trans-array.c (g95_walk_function_expr): Handle non-array return by
7430 * trans-dec.c (g95_build_function_decl): Handle character return
7432 (g95_get_fake_result_decl): Ditto.
7433 (g95_trans_deferred_vars): Ditto.
7434 * trans-expr.c (g95_conv_function_call): Ditto.
7435 (g95_trans_arrayfunc_assign) Limit to array valued functions.
7436 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
7437 (g95_conv_intrinsic_function): Use it.
7438 * trans-types.c (g95_sym_type): Handle functions returning strings.
7439 (g95_return_by_reference): Ditto.
7440 (g95_get_function_type): Ditto.
7442 2002-11-18 Paul Brook <paul@nowt.org>
7444 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
7445 requires a temporary.
7446 (g95_trans_select): Handle computed gotos.
7447 * trans-types.c (g95_build_array_type): Warn about non-functional
7448 assumed shape arrays.
7449 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
7451 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
7452 (g95_conv_intrinsic_int): New function.
7453 (g95_conv_intrinsic_mod): New function.
7454 (g95_conv_intrinsic_ichar): New function.
7455 (g95_conv_intrinsic_function): Use them.
7456 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
7458 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
7460 * trans-types.c (g95_build_array_type): Assumed
7461 sized arrays can have rank > 1.
7462 * trans.c (g95_trans_code): Remove erroneous
7463 warning about CONTINUE.
7464 * trans-expr.c (g95_conv_variable): Remove
7467 2002-11-15 Paul Brook <paul@nowt.org>
7469 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
7471 2002-10-31 Paul Brook <paul@nowt.org>
7473 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
7474 * trans-expr.c (g95_conv_component_ref): Handle character string
7476 (g95_conv_string_parameter): Ditto.
7477 * trans-types.c (g95_get_derived_type): Add length decl to caracter
7480 2002-10-10 Paul Brook <paul@nowt.org>
7482 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
7483 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
7485 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
7486 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
7487 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
7488 * trans-types.c (pvoid_type_node): Declare and initialize.
7489 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
7490 (g95_array_allocate): Fix when base==data.
7491 (g95_conv_array_parameter): Correctly handle reduced rank sections.
7492 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
7494 2002-10-09 Paul Brook <paul@nowt.org>
7496 * (g95_conv_expr_reference): Handle character strings correctly.
7498 2002-10-07 Paul Brook <paul@nowt.org>
7500 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
7502 * trans-array.c (g95_build_array_initializer): Remove.
7503 (g95_conv_array_initializer): New Function.
7504 (g95_trans_auto_arry_allocation): Cleanup.
7505 (g95_trans_init_character_array): Remove.
7506 * g95spec.c: Link in libgforbegin.
7507 * trans.c (g95_generate_code): Rename main function to MAIN__.
7508 (g95_create_var): New function.
7509 (g95_create_var_np): New function.
7510 (g95_evaluate_now): New function.
7511 (g95_start_block): New function.
7512 (g95_finish_block): New function.
7513 (g95_add_expr_to_block): New function.
7514 (g95_add_block_to_block): New function.
7515 * trans-expr.c (g95_conv_componen_ref): New function.
7516 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
7517 (F95_OBJS): Add dependency.o.
7518 * f95-lang.c (g95_is_simple_stmt): Remove.
7519 * f95-tree.c (mark_not_simple): New function.
7520 (unshare_all_trees): New function.
7521 (create_tmp_var, create_tmp_alias_var): Remove.
7522 * support.c (declare_tmp_vars, tree_last_decl): Remove.
7523 * trans*: Convert to new IR using GENERIC trees. Don't bother about
7524 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
7526 2002-10-01 Paul Brook <paul@nowt.org>
7528 * trans-array.c: Add support for descriptorless arrays.
7529 (g95_conv_array_data): New function.
7530 (g95_conv_array_base): New function.
7531 * trans-array.h: Declare these here.
7532 * trans-decl.c(g95_create_mopdule_variable): Perform variable
7533 initialization and creation here.
7534 (g95_create_module_vars): Instead of here.
7535 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
7536 * trans-intrinsic.c: Ditto.
7537 * trans-types.c (g95_is_nodesc_array): New function.
7538 (g95_get_nodesc_array_type): New function.
7539 (g95_sym_type, g95_get_derived_type): Use them.
7540 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
7542 2002-09-28 Paul Brook <paul@nowt.org>
7544 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
7545 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
7548 2002-09-24 Paul Brook <paul@nowt.org>
7550 * f95-lang.c (listify): Remove declaration.
7551 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
7553 * f95-tree.c (get_name): New function.
7554 * trans.c (module_namespace): Remove.
7555 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
7556 * trans-types.c: Ditto.
7558 2002-09-19 Paul Brook <paul@nowt.org>
7560 * trans-array.c (g95_get_array_cons_size): New Function.
7561 (g95_con_ss_startstride): Handle Array constructors.
7562 (g95_conv_loop_setup): Ditto.
7563 (g95_conv_array_parameter): Ditto.
7564 * tras-decl.c (g95_finish_var_decl): Make initializes variables
7567 2002-09-19 Paul Brook <paul@nowt.org>
7569 * trans.c (g95_simple_fold_tmp): Detect variables inside
7571 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
7573 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
7575 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
7577 2002-09-14 Paul Brook <paul@nowt.org>
7579 * trans.c (g95_create_module_variable): Move to trans-decl.c.
7580 * trans-const.c (g95_conv_string_init): New Function.
7581 * trans-const.h: Declare it.
7582 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
7583 variables. Don't bail on intrinsic symbols.
7584 (get_extern_function_decl): Handle specific intrinsic functions.
7585 * trans-types.c (g95_sym_type): Dummy functions don't return
7587 * trans-array.c (g95_build_array_initializer): New Function.
7588 (g95_trans_auto_array_allocation): Build initializer for static decls.
7589 Don't use mpz_addmul, it's GMP4 only.
7591 2002-09-12 Paul Brook <paul@nowt.org>
7593 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
7594 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
7595 assembler names for module procedures.
7597 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
7599 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
7602 2002-09-10 Paul Brook <paul@nowt.org>
7604 * trans-array.c: Change format of G95_SS_TEMP strictures.
7605 (g95_check_fncall_dependancy): New function.
7606 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
7608 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
7610 (g95_build_function_decl): Don't assume result arrays are packed.
7611 (g95_trans-deferred-vars): Handle array result variables.
7612 (g95_generate_fuction_code): Clear saved_function_decls.
7613 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
7615 (g95_trans_arrayfunc_assign): New function.
7616 (g95_trans_assignment): Use it.
7617 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
7618 (g95_se): Add direct_byref.
7619 * trans-types.c: Use sym->result rather than sym where appropriate.
7620 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
7621 Update other functions to use this.
7622 (g95_is_intrinsic_libcall): New function.
7623 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
7624 (g95_walk_intrinsic_function): Ditto.
7626 2002-09-08 Paul Brook <paul@nowt.org>
7628 * trans-types.c: Change rank field to dtype field in array descriptor.
7629 * trans-array.c: Implement filling of dtype array descriptor field.
7630 * trans-intrinsic.c: Fix broken LEN intrinsic.
7632 2002-09-07 Paul Brook <paul@nowt.org>
7634 * trans-intrinsic.c: Remove outdated todo intrinsic list.
7635 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
7636 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
7638 2002-09-06 Paul Brook <paul@nowt.org>
7640 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
7641 (gt-f95-trans-types.h): Add dependancy information.
7642 * config-lang.in (gtfiles): Add trans-types.c
7643 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
7644 back to top-level code.
7645 * trans-array.c, trans-types.c: Change format of array descriptor.
7646 (g95_conv_descriptor_dimension): New function.
7647 * trans-types.h (g95_conv_descriptor_rank): define.
7648 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
7651 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
7653 * trans-array.c, trans-types.c: Add rank information to descriptor.
7655 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
7657 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
7659 2002-09-04 Paul Brook <paul@nowt.org>
7661 * f95-lang.c (g95_create_decls): New function.
7662 (g95_init): Move initialization of external decls to above, and call
7663 from g95_be_parse_file.
7664 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
7665 * trans-types.c (g95_init_types): Always name integer and char types.
7666 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
7668 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
7670 * Make-lang.in: Add options.c to F95_PARSER_OBJS
7672 2002-09-02 Paul Brook <paul@nowt.org>
7674 * g95_generate_code: Clear the attr for __fortran_main.
7675 * trans-types.c (g95_finish_type): New function.
7676 * g95_init_io_state_type: Use g95_finish_type.
7677 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
7679 2002-09-01 Paul Brook <paul@nowt.org>
7681 * README.backend: Warn about the dangers of extra config.h files.
7682 Remove obsolete libgfor stuff.
7683 * config-lang.in: Add target-libgfor dependancy.
7684 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
7686 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
7688 * g95_conv_mpz_to_tree: Free storage pointed to by q,
7691 2002-08-30 Paul Brook <paul@nowt.org>
7693 * trans-intrinsic.c (g95_conv_intrinsic_function,
7694 g95_walk_intrinsic_function): Added ANY and ALL.
7695 (g95_conv_intrinsic_anyall): New function.
7696 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in