1 2005-09-22 Steven G. Kargl <kargls@comcast.net>
4 * interface.c (check_interface1): Fix NULL dereference.
6 2005-09-22 Erik Edelmann <erik.edelmann@iki.fi>
9 * resolve.c (derived_inaccessible): New function.
10 (resolve_transfer): Use it to check for private
13 2005-09-22 Steven G. Kargl <kargls@comcast.net>
16 * intrinsic.c (add_function): Add IMAG, IMAGPART, and REALPART
18 * intrinsic.h: Prototypes for gfc_simplify_realpart and
20 * intrinsic.texi: Document intrinsic procedures.
21 * simplify.c (gfc_simplify_realpart): New function.
22 * irseolve.c (gfc_resolve_realpart): New function.
24 2005-09-21 Erik Edelmann <erik.edelmann@iki.fi>
27 * trans-stmt.c (gfc_trans_deallocate): Check if the
28 object to be deallocated is an array by looking at
29 expr->rank instead of expr->symtree->n.sym->attr.dimension.
31 2005-09-20 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
34 * io.c (resolve_tag): Don't allow non-CHARACTER constants as formats.
35 (match_io): Fix usage of gfc_find_symbol.
37 2005-09-20 Jakub Jelinek <jakub@redhat.com>
40 * primary.c (match_actual_arg): Handle ENTRY the same way
43 2005-09-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
45 * Make-lang.in: Make check-fortran alias for check-gfortran.
47 2005-09-18 Andreas Jaeger <aj@suse.de>
49 * module.c (read_module): Add missed line from last patch.
51 2005-09-18 Erik Edelmann <erik.edelmann@iki.fi>
54 * resolve.c (resolve_symbol): Don't assign default
55 initializer to pointers.
57 2005-09-18 Paul Thomas <pault@gcc.gnu.org>
60 * module.c (read_module): Give symbols from module procedures
61 different true_name entries to those from the module proper.
63 2005-09-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
66 * arith.c (gfc_arith_error): Add translation support for error
68 * array.c (gfc_match_array_ref): Likewise.
69 (gfc_match_array_spec): Likewise.
70 * check.c (must_be): Add msgid convention to third argument.
71 (same_type_check): Add translation support for error message.
72 (rank_check): Likewise.
73 (kind_value_check): Likewise.
74 (gfc_check_associated): Correct typo.
75 (gfc_check_reshape): Add translation support for error message.
76 (gfc_check_spread): Likewise.
77 * error.c (error_printf): Add nocmsgid convention to argument.
78 (gfc_warning, gfc_notify_std, gfc_warning_now, gfc_warning_check)
79 (gfc_error, gfc_error_now): Likewise.
80 (gfc_status): Add cmsgid convention to argument.
81 * expr.c (gfc_extract_int): Add translation support for error
83 (gfc_check_conformance): Add msgid convention to argument.
84 (gfc_check_pointer_assign): Correct tabbing.
85 * gfortran.h: Include intl.h header. Remove prototype for gfc_article.
86 * gfortranspec.c: Include intl.h header.
87 (lang_specific_driver): Add translation support for --version.
88 * io.c (check_format): Add translation support for error message.
89 (format_item_1): Likewise.
90 (data_desc): Likewise.
91 * matchexp.c: Likewise.
92 * misc.c (gfc_article): Remove function.
93 * module.c (bad_module): Use msgid convention. Add translation support
95 (require_atom): Add translation support for error messages.
96 * parse.c (gfc_ascii_statement): Likewise.
97 (gfc_state_name): Likewise.
98 * primary.c (match_boz_constant): Reorganise error messages for
100 * resolve.c (resolve_entries): Likewise.
101 (resolve_operator): Add translation support for error messages.
102 (gfc_resolve_expr): Use msgid convention. Reorganise error messages
104 (resolve_symbol): Add translation support for error messages.
105 * symbol.c (gfc_add_procedure): Remove use of gfc_article function.
106 * trans-const.c (gfc_build_string_const): Use msgid convention.
108 2005-09-16 Paul Brook <paul@codesourcery.com>
111 * dependency.c (transform_sections): Divide by correct value.
114 2005-09-14 Paul Thomas <pault@gcc.gnu.org>
116 PR fortran/21875 Internal Unit Array I/O, NIST
117 * fortran/trans-io.c (gfc_build_io_library_fndecls): Add field for
118 array descriptor to IOPARM structure.
119 * fortran/trans-io.c (set_internal_unit): New function to generate code
120 to store the character (array) and the character length for an internal
122 * fortran/trans-io (build_dt): Use the new function set_internal_unit.
124 2005-09-14 Paul Thomas <pault@gcc.gnu.org>
127 * trans-array.c (gfc_trans_dummy_array_bias): correct the typo
128 which uses dim[i].upper for lbound, rather than dim[i].lower.
130 2005-09-13 Erik Edelmann <erik.edelmann@iki.fi>
133 * trans-expr.c (gfc_trans_arrayfunc_assign): Check value
134 of attr.elemental for specific function instead of generic name.
136 2005-09-13 Richard Sandiford <richard@codesourcery.com>
139 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Move initialization
140 of argse. Remove now-redundant want_pointer assignment.
141 * trans-array.c (gfc_conv_expr_descriptor): When not assigning to
142 a pointer, keep the original bounds of a full array reference.
144 2005-09-13 Richard Sandiford <richard@codesourcery.com>
147 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift)
148 (gfc_resolve_pack, gfc_resolve_reshape, gfc_resolve_spread)
149 (gfc_resolve_transpose, gfc_resolve_unpack): Add "_char" to the name
150 for character-based operations.
151 (gfc_resolve_pack): Remove ATTRIBUTE_UNUSED from array argument.
152 (gfc_resolve_unpack): Copy the whole typespec from the vector.
153 * trans-array.c (gfc_conv_expr_descriptor): In the EXPR_FUNCTION
154 case, get the string length from the scalarization state.
156 2005-09-14 Francois-Xavier Coudert <coudert@clipper.ens.fr>
158 * Make-lang.in: Change targets prefixes from f95 to fortran.
159 * config-lang.in: Change language name to "fortran".
160 * lang.opt: Change language name to "fortran".
161 * options.c: Change CL_F95 to CL_Fortran.
163 2005-09-09 Thomas Koenig <Thomas.Koenig@online.de>
165 gfortran.texi: Document IOSTAT= specifier.
167 2005-09-09 Thomas Koenig <Thomas.Koenig@online.de>
169 * gfortran.h: Add iomsg to gfc_open, gfc_close, gfc_filepos,
170 gfc_inquire and gfc_dt.
171 * dump-parse-tree.c (gfc_show_code_node): Add iomsg
172 for open, close, file positioning, inquire and namelist.
173 * io.c (io_tag): Add tag_iomsg.
174 (resolve_tag): Add standards warning for iomsg.
175 (match_open_element): Add iomsg.
176 (gfc_free_open): Add iomsg.
177 (gfc_resolve_open): Add iomsg.
178 (gfc_free_close): Add iomsg.
179 (match_close_element): Add iomsg.
180 (gfc_resolve_close): Add iomsg.
181 (gfc_free_filepos): Add iomsg.
182 (match_file_element): Add iomsg.
183 (gfc_resolve_filepos): Add iostat and iomsg.
184 (match-dt_element): Add iomsg.
185 (gfc_free_dt): Add iomsg.
186 (gfc_resolve_dt): Add iomsg.
187 (gfc_free_inquire): Add iomsg.
188 (match_inquire_element): Add iomsg.
189 (gfc_resolve_inquire): Add iomsg.
190 * trans_io.c: Add ioparm_iomsg and ioparm_iomsg_len.
191 (gfc_build_io_library_fndecls): Add iomsg as last field.
192 (gfc_trans_open): Add iomsg.
193 (gfc_trans_close): Add iomsg.
194 (build_fileos): Call set_string for iomsg.
195 (gfc_trans_inquire): Add iomsg.
196 (build_dt): Add iomsg.
198 2005-09-09 Richard Sandiford <richard@codesourcery.com>
200 * match.h (gfc_match_equiv_variable): Declare.
202 2005-09-09 Richard Sandiford <richard@codesourcery.com>
205 * Makefile.in (fortran/trans-expr.o): Depend on dependency.h.
206 * dependency.h (gfc_ref_needs_temporary_p): Declare.
207 * dependency.c (gfc_ref_needs_temporary_p): New function.
208 (gfc_check_fncall_dependency): Use it instead of inlined check.
209 By so doing, take advantage of the fact that character substrings
210 within an array reference also need a temporary.
211 * trans.h (GFC_SS_VECTOR): Adjust comment.
212 * trans-array.c (gfc_free_ss): Remove GFC_SS_VECTOR case.
213 (gfc_set_vector_loop_bounds): New function.
214 (gfc_add_loop_ss_code): Call it after evaluating the subscripts of
215 a GFC_SS_SECTION. Deal with the GFC_SS_VECTOR case by evaluating
216 the vector expression and caching its descriptor for use within
218 (gfc_conv_array_index_ref, gfc_conv_vector_array_index): Delete.
219 (gfc_conv_array_index_offset): Handle scalar, vector and range
220 dimensions as separate cases of a switch statement. In the vector
221 case, use the loop variable to calculate a vector index and use the
222 referenced element as the dimension's index. Perform bounds checking
224 (gfc_conv_section_upper_bound): Return null for vector indexes.
225 (gfc_conv_section_startstride): Give vector indexes a start value
226 of 0 and a stride of 1.
227 (gfc_conv_ss_startstride): Adjust for new GFC_SS_VECTOR representation.
228 (gfc_conv_expr_descriptor): Expand comments. Generalize the
229 handling of the !want_pointer && !direct_byref case. Use
230 gfc_ref_needs_temporary_p to decide whether the variable case
232 (gfc_walk_variable_expr): Handle DIMEN_VECTOR by creating a
234 * trans-expr.c: Include dependency.h.
235 (gfc_trans_arrayfunc_assign): Fail if the target needs a temporary.
237 2005-09-09 Richard Sandiford <richard@codesourcery.com>
240 * trans.h (gfc_interface_sym_mapping, gfc_interface_mapping): Moved
242 (gfc_init_interface_mapping, gfc_free_interface_mapping)
243 (gfc_add_interface_mapping, gfc_finish_interface_mapping)
244 (gfc_apply_interface_mapping): Declare.
245 * trans-array.h (gfc_set_loop_bounds_from_array_spec): Declare.
246 (gfc_trans_allocate_temp_array): Add pre and post block arguments.
247 * trans-array.c (gfc_set_loop_bounds_from_array_spec): New function.
248 (gfc_trans_allocate_array_storage): Replace loop argument with
249 separate pre and post blocks.
250 (gfc_trans_allocate_temp_array): Add pre and post block arguments.
251 Update call to gfc_trans_allocate_array_storage.
252 (gfc_trans_array_constructor, gfc_conv_loop_setup): Adjust for new
253 interface to gfc_trans_allocate_temp_array.
254 * trans-expr.c (gfc_interface_sym_mapping, gfc_interface_mapping):
256 (gfc_init_interface_mapping, gfc_free_interface_mapping)
257 (gfc_add_interface_mapping, gfc_finish_interface_mapping)
258 (gfc_apply_interface_mapping): Make extern.
259 (gfc_conv_function_call): Build an interface mapping for array
260 return values too. Call gfc_set_loop_bounds_from_array_spec.
261 Adjust call to gfc_trans_allocate_temp_array so that code is
262 added to SE rather than LOOP.
264 2005-09-09 Richard Sandiford <richard@codesourcery.com>
267 * trans.h (gfor_fndecl_internal_realloc): Declare.
268 (gfor_fndecl_internal_realloc64): Declare.
269 * trans-decl.c (gfor_fndecl_internal_realloc): New variable.
270 (gfor_fndecl_internal_realloc64): New variable.
271 (gfc_build_builtin_function_decls): Initialize them.
272 * trans-array.h (gfc_trans_allocate_temp_array): Add a fourth argument.
273 * trans-array.c (gfc_trans_allocate_array_storage): Add an argument
274 to say whether the array can grow later. Don't allocate the array
275 on the stack if so. Don't call malloc for zero-sized arrays.
276 (gfc_trans_allocate_temp_array): Add a similar argument here.
277 Pass it along to gfc_trans_allocate_array_storage.
278 (gfc_get_iteration_count, gfc_grow_array): New functions.
279 (gfc_iterator_has_dynamic_bounds): New function.
280 (gfc_get_array_constructor_element_size): New function.
281 (gfc_get_array_constructor_size): New function.
282 (gfc_trans_array_ctor_element): Replace pointer argument with
284 (gfc_trans_array_constructor_subarray): Likewise. Take an extra
285 argument to say whether the variable-sized part of the constructor
286 must be allocated using realloc. Grow the array when this
288 (gfc_trans_array_constructor_value): Likewise.
289 (gfc_get_array_cons_size): Delete.
290 (gfc_trans_array_constructor): If the loop bound has not been set,
291 split the allocation into a static part and a dynamic part. Set
292 loop->to to the bounds for static part before allocating the
293 temporary. Adjust call to gfc_trans_array_constructor_value.
294 (gfc_conv_loop_setup): Allow any constructor to determine the
295 loop bounds. Check whether the constructor has a dynamic size
296 and prefer to use something else if so. Expect the loop bound
297 to be set later. Adjust call to gfc_trans_allocate_temp_array.
298 * trans-expr.c (gfc_conv_function_call): Adjust another call here.
300 2005-09-09 Paul Thomas <pault@gcc.gnu.org>
303 * module.c (find_use_name_n): Based on original
304 find_use_name. Either counts number of use names for a
305 given real name or returns use name n.
306 (find_use_name, number_use_names): Interfaces to the
307 function find_use_name_n.
308 (read_module): Add the logic and calls to these functions,
309 so that mutiple reuses of the same real name are loaded.
311 2005-09-09 Paul Thomas <pault@gcc.gnu.org>
318 * gfortran.h: Move definition of BLANK_COMMON_NAME from trans-
319 common.c so that it is accessible to module.c. Add common_head
320 field to gfc_symbol structure. Add field for the equivalence
321 name AND new attr field, in_equivalence.
322 * match.c (gfc_match_common, gfc_match_equivalence): In loops
323 that flag common block equivalences, emit an error if the
324 common blocks are different, using sym->common_head as the
325 common block identifier. Ensure that symbols that are equivalence
326 associated with a common block are marked as being in_common.
327 * module.c (write_blank_common): New.
328 (write_common): Use unmangled common block name.
329 (load_equiv): New function ported from g95.
330 (read_module): Call load_equiv.
331 (write_equiv): New function ported from g95. Correct
332 string referencing for gfc functions. Give module
333 equivalences a unique name.
334 (write_module): Call write_equiv and write_blank_common.
335 * primary.c (match_variable) Old gfc_match_variable, made
336 static and third argument provided to indicate if parent
337 namespace to be visited or not.
338 (gfc_match_variable) New. Interface to match_variable.
339 (gfc_match_equiv_variable) New. Interface to match_variable.
340 * trans-common.c (finish_equivalences): Provide the call
341 to create_common with a gfc_common_header so that
342 module equivalences are made external, rather than local.
343 (find_equivalences): Ensure that all members in common block
344 equivalences are marked as used. This prevents the subsequent
345 call to this function from making local unions.
346 * trans-decl.c (gfc_generate_function_code): Move the call to
347 gfc_generate_contained_functions to after the call to
348 gfc_trans_common so the use-associated, contained common
349 blocks produce the correct references.
350 (gfc_create_module_variable): Return for equivalenced symbols
351 with existing backend declaration.
353 2005-09-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
356 * match.c (gfc_match_common): Remove unnecessary / wrong special
357 cases for end-of-statement.
359 2005-09-08 Janne Blomqvist <jblomqvi@cc.hut.fi>
361 * gfortran.texi: Add section about implemented F2003 features.
363 2005-09-08 Richard Sandiford <richard@codesourcery.com>
366 * trans-array.c (gfc_add_loop_ss_code): Set ss->string_length in
367 the GFC_SS_FUNCTION case too.
368 * trans-expr.c (gfc_conv_function_val): Allow symbols to be bound
369 to function pointers as well as function decls.
370 (gfc_interface_sym_mapping, gfc_interface_mapping): New structures.
371 (gfc_init_interface_mapping, gfc_free_interface_mapping)
372 (gfc_get_interface_mapping_charlen, gfc_get_interface_mapping_array)
373 (gfc_set_interface_mapping_bounds, gfc_add_interface_mapping)
374 (gfc_finish_interface_mapping, gfc_apply_interface_mapping_to_cons)
375 (gfc_apply_interface_mapping_to_ref)
376 (gfc_apply_interface_mapping_to_expr)
377 (gfc_apply_interface_mapping): New functions.
378 (gfc_conv_function_call): Evaluate the arguments before working
379 out where the result should go. Make the null pointer case provide
380 the string length in parmse.string_length. Cope with non-constant
381 string lengths, using the above functions to evaluate such lengths.
382 Use a temporary typespec; don't assign to sym->cl->backend_decl.
383 Don't assign to se->string_length when returning a cached array
386 2005-09-08 Richard Sandiford <richard@codesourcery.com>
389 * trans-array.c (gfc_conv_array_ref): Call gfc_advance_se_ss_chain
390 after handling scalarized references. Make "indexse" inherit from
391 "se" when handling AR_ELEMENTs.
392 (gfc_walk_variable_expr): Add GFC_SS_SCALAR entries for each
393 substring or scalar reference that follows an array section.
394 * trans-expr.c (gfc_conv_variable): When called from within a
395 scalarization loop, start out with "ref" pointing to the scalarized
396 part of the reference. Don't call gfc_advance_se_ss_chain here.
398 2005-09-07 Richard Sandiford <richard@codesourcery.com>
401 * trans-expr.c (gfc_trans_pointer_assignment): Assign to a temporary
402 descriptor if the rhs is not a null pointer or variable.
404 2005-09-07 Thomas Koenig <Thomas.Koenig@online.de>
407 * symbol.c(check_conflict): Add conflict for parameter/save,
409 2005-09-06 Richard Sandiford <richard@codesourcery.com>
412 * simplify.c (gfc_simplify_transpose): Set the result's typespec from
413 the source, not the first element of the return value.
415 2005-09-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
418 * io.c (match_io): Correctly backup if PRINT followed by
419 symbol which is not a namelist. Force blank between PRINT
420 and namelist in free form.
422 2005-08-31 Francois-Xavier Coudert <coudert@clipper.ens.fr>
425 * gfortran.h (gfc_option_t): Add flag_automatic.
426 * invoke.texi: Document the -fno-automatic option.
427 * lang.opt: Add a -fautomatic option.
428 * options.c (gfc_init_options): Default for -fautomatic is on.
429 (gfc_handle_option): Add handling of -fautomatic option.
430 * resolve.c (gfc_resolve): When -fno-automatic is used, mark
431 needed variables as SAVE.
433 2005-08-27 Erik Edelmann <erik.edelmann@iki.fi>
435 * trans-array.c (gfc_trans_deferred_array): Fix comments.
437 2005-08-27 Erik Schnetter <schnetter@aei.mpg.de>
439 * primary.c (match_charkind_name): Fix typo in comment leading to
442 2005-08-25 Erik Edelmann <eedelman@acclab.helsinki.fi>
445 * symbol.c (find_special): Remove.
446 (build_sym, add_init_expr, attr_decl1): Remove calls to
447 find_special in favor of calls to gfc_get_symbol.
449 2005-08-24 Thomas Koenig <Thomas.Koenig@online.de>
452 * gfortran.h (symbol_attribute): Add noreturn to the structure.
453 (gfc_intrinsic_sym): Add noreturn to the structure.
454 * intrinsic.c (make_noreturn): New function.
455 (add_subroutines): Mark subroutines abort and exit as noreturn.
456 (gfc_intrinsic_sub_interface): Copy noreturn attribute from
457 isym to the resolved symbol.
458 * trans-decl.c (gfc_get_extern_function_decl): Set function
459 as VOLATILE (== noreturn) if the noreturn attribute is set.
461 2005-08-21 Steven G. Kargl <kargls@comcast.net>
463 * decl.c: Typo in comment.
465 2005-08-21 Steven G. Kargl <kargls@comcast.net>
467 * array.c: Bump GFC_MAX_AC_EXPAND from 100 to 65535.
469 2005-08-21 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
471 * gfortran.h (gfc_option_t): Remove source field. Add
473 (gfc_new_file): Remove arguments in prototype.
474 (gfc_source_file): Make 'const char *'.
475 * f95-lang.c (gfc_init): Use gfc_source_file instead of
476 gfc_option.source. Call gfc_new_file without arguments.
477 * invoke.texi: Document new options '-fd-lines-as-code' and
478 '-fd-lines-as-comment'.
479 * lang.opt: Add new options. Alphabetize.
480 * options.c (gfc_init_options): Initialize gfc_source_file instead
481 of gfc_option.source. Initialize gfc_option.flag_d_lines.
482 (form_from_filename): Move here from scanner.c. Make
483 'filename' argument 'const'.
484 (gfc_post_options): Set gfc_source_file. Determine source form.
485 Warn if 'd-lines*' are used in free form.
486 * scanner.c (gfc_source_file): Constify.
487 (skip_fixed_comments): Deal with d-lines.
488 (get_file): Constify argument 'name'.
489 (load_file): Constify argument 'filename'.
490 (form_from_filename): Moved to options.c.
491 (gfc_new_file): Remove arguments. Don't initialize
492 gfc_source_file, don't determine source form.
493 * trans-const.c (gfc_init_constants): Use gfc_source_file instead
494 of gfc_option.source.
496 2005-08-19 Steven G. Kargl <kargls@comcast.net>
499 * gfortran.h: Remove PATH_MAX definition.
500 * module.c (write_module, gfc_dump_module): Use alloca to allocate
502 * scanner.c (gfc_release_include_path, form_from_filename): Ditto.
504 2004-08-16 Huang Chun <chunhuang73@hotmail.com>
506 * trans-expr.c (gfc_conv_power_op): Evaluate the expression before
509 2005-08-14 Asher Langton <langton2@llnl.gov>
511 * parse.c (match): Enclose macro in do...while(0) and braces.
513 2005-08-14 Paul Thomas <pault@gcc.gnu.org>
516 * gfortran.texi: Document PRINT namelist.
518 2005-08-14 Paul Thomas <pault@gcc.gnu.org>
521 * io.c (match_io): Add code to implement PRINT namelist.
523 2005-08-14 Canqun Yang <canqun@nudt.edu.cn>
525 * trans-stmt.c (gfc_trans_arithmetic_if): Optimized in case of equal
528 2005-08-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
529 Steven Bosscher <stevenb@suse.de>
532 * gfortran.h: Add is_main_program member to symbol_attribute.
533 * trans-decl: Add a gfor_fndecl_set_std tree.
534 (gfc_build_builtin_function_decls): Create it.
535 (gfc_generate_function_code): Add this call at the beginning of
537 * trans.c (gfc_generate_code): Move main_program and attr.
538 * trans.h: Add declaration for gfor_fndecl_set_std.
540 2005-08-10 Thomas Koenig <Thomas.Koenig@online.de>
543 gfortran.h: Declare new function gfc_resolve_dim_arg.
544 resolve.c: New function gfc_resolve_dim_arg.
545 iresolve.c (gfc_resolve_all): Use gfc_resolve_dim_arg.
546 (gfc_resolve_any): Likewise.
547 (gfc_resolve_count): Likewise.
548 (gfc_resolve_cshift): Likewise. If the kind of shift is less
549 gfc_default_integer_kind, convert it to default integer type.
550 (gfc_resolve_eoshift): Likewise.
551 (gfc_resolve_maxloc): Use gfc_resolve_dim_arg.
552 (gfc_resolve_maxval): Likewise.
553 (gfc_resolve_minloc): Likewise.
554 (gfc_resolve_minval): Likewise.
555 (gfc_resolve_product): Likewise.
556 (gfc_resolve_spread): Likewise.
557 (gfc_resolve_sum): Likewise.
559 2005-08-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
561 * check.c (gfc_check_ttynam_sub, gfc_check_isatty): Add check
562 functions for new intrinsics TTYNAM and ISATTY.
563 * intrinsic.c (add_functions, add_subroutines): Add new
565 * intrinsic.h: Add prototypes for new check and resolve
567 * iresolve.c (gfc_resolve_isatty, gfc_resolve_ttynam_sub): New
568 resolve functions for intrinsics TTYNAM and ISATTY.
569 * gfortran.h (gfc_generic_isym_id): Add symbol for ISATTY.
570 * trans-intrinsic.c: Add case for GFC_ISYM_ISATTY.
572 2005-08-09 Jakub Jelinek <jakub@redhat.com>
574 * scanner.c (preprocessor_line): Don't write beyond the end of flag
577 2005-08-07 Janne Blomqvist <jblomqvi@cc.hut.fi>
580 * dump-parse-tree.c (gfc_show_code_node): Add case for FLUSH.
581 * gfortran.h: Add enums for FLUSH.
582 * io.c (gfc_free_filepos,match_file_element,match_filepos): Modify
583 comment appropriately. (gfc_match_flush): New function.
584 * match.c (gfc_match_if): Add match for flush.
585 * match.h: Add prototype.
586 * parse.c (decode_statement): Add flush to 'f' case.
587 (next_statement): Add case for flush. (gfc_ascii_statement): Likewise.
588 * resolve.c (resolve_code): Add flush case.
589 * st.c (gfc_free_statement): Add flush case.
590 * trans-io.c: Add prototype for flush.
591 (gfc_build_io_library_fndecls): Build fndecl for flush.
592 (gfc_trans_flush): New function.
593 * trans-stmt.h: Add prototype.
594 * trans.c (gfc_trans_code): Add case for flush.
596 2005-08-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
598 * primary.c (match_hollerith_constant): Fix typo.
600 2005-08-06 Kazu Hirata <kazu@codesourcery.com>
602 * decl.c, dump-parse-tree.c, gfortran.texi, intrinsic.texi,
603 invoke.texi, resolve.c, trans-array.c, trans-array.h,
604 trans-common.c, trans-expr.c, trans-io.c, trans.h: Fix
605 comment/doc typos. Follow spelling conventions.
607 2005-08-06 Jakub Jelinek <jakub@redhat.com>
611 * primary.c (match_varspec): If equiv_flag, don't look at sym's
612 attributes, call gfc_match_array_ref up to twice and don't do any
613 substring or component processing.
614 * resolve.c (resolve_equivalence): Transform REF_ARRAY into
615 REF_SUBSTRING or nothing if needed. Check that substrings
616 don't have zero length.
618 2005-08-05 Thomas Koenig <Thomas.Koenig@online.de>
620 * trans-expr.c (gfc_build_builtin_function_decls): Mark
621 stop_numeric and stop_string as non-returning.
623 2005-08-04 Paul Brook <paul@codesourcery.com>
625 * trans-expr.c (gfc_conv_expr, gfc_conv_expr_type): Update comments.
626 (gfc_conv_expr_lhs): Fix assertion.
627 (gfc_conv_expr_val): Merge post block. Set se.expr to new value.
629 2005-08-02 David Edelsohn <edelsohn@gnu.org>
632 * expr.c (simplify_parameter_variable): Do not copy the subobject
633 references if the expression value is a constant.
635 * expr.c (gfc_simplify_expr): Evaluate constant substrings.
637 2005-07-31 Jerry DeLisle <jvdelisle@verizon.net>
639 * intrinsic.texi: Add documentation for exponent, floor, and fnum and
640 fix description of ceiling in index.
642 2005-07-31 Steven Bosscher <stevenb@suse.de>
644 * trans-decl.c (gfc_build_builtin_function_decls): Give the internal
645 malloc functions the 'malloc' attribute. Give runtime_error the
646 'noreturn' attribute.
648 2005-07-31 Steven Bosscher <stevenb@suse.de>
650 * trans-stmt.c (gfc_trans_goto): Jump to the known label instead
651 of the assigned goto variable.
653 2005-07-29 Steven Bosscher <stevenb@suse.de>
655 * trans-types.h (gfc_array_range_type): Add missing GTY decl for this.
657 2005-07-28 Andrew Pinski <pinskia@physics.uc.edu>
659 * fortran/f95-lang.c (language_function): Remove
660 named_labels, shadowed_labels, returns_value, returns_abnormally,
661 warn_about_return_type, and extern_inline fields.
662 (named_labels): Remove variable.
663 (gfc_init_decl_processing): Remove setting of named_labels.
665 2005-07-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
668 * resolve.c (resolve_operator): Improve diagnostic for comparison
669 of logicals with invalid operator.
671 2005-07-25 Jakub Jelinek <jakub@redhat.com>
674 * data.c (gfc_assign_data_value_range): Call
675 create_character_initializer if last_ts is a character type.
677 2005-07-22 Manfred Hollstein <mh@suse.com>
679 * match.c (gfc_match_symbol): Fix uninitialised warnings.
680 * matchexp.c (gfc_match_expr): Likewise.
682 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
684 Make CONSTRUCTOR use VEC to store initializers.
685 * trans-array.c (gfc_build_null_descriptor,
686 gfc_trans_array_constructor_value, gfc_conv_array_initializer):
687 Update to cope with VEC in CONSTRUCTOR_ELTS.
688 * trans-common.c (create_common): Likewise.
689 * trans-expr.c (gfc_conv_structure): Likewise.
690 * trans-stmt.c (gfc_trans_character_select): Use
691 build_constructor_from_list instead of build_constructor.
693 2005-07-19 Paul Thomas <pault@gcc.gnu.org>
696 * resolve.c (resolve_symbol): A symbol with FL_UNKNOWN
697 is matched against interfaces in parent namespaces. If there
698 the symtree is set to point to the interface.
700 2005-07-16 David Edelsohn <edelsohn@gnu.org>
703 * decl.c (do_parm): Adjust character initializer to character length
704 of symbol before assigning.
706 2005-07-14 Steve Ellcey <sje@cup.hp.com>
708 * trans-types.c (MAX_REAL_KINDS): Increase from 4 to 5.
710 2005-07-14 Jakub Jelinek <jakub@redhat.com>
712 * gfortran.h (MAX_ERROR_MESSAGE): Remove.
713 (gfc_error_buf): Add allocated and index fields. Change message
714 field from array to a pointer.
715 * error.c (use_warning_buffer, error_ptr, warning_ptr): Remove.
716 (cur_error_buffer): New variable.
717 (error_char): Use cur_error_buffer->{message,index} instead of
718 {warning,error}_{buffer.message,ptr}. Reallocate message buffer
720 (gfc_warning, gfc_notify_std, gfc_error, gfc_error_now): Setup
721 cur_error_buffer and its index rather than {warning,error}_ptr
722 and use_warning_buffer.
723 (gfc_warning_check, gfc_error_check): Don't print anything if
725 (gfc_push_error): Allocate saved message with xstrdup.
726 (gfc_pop_error): Free saved message with gfc_free.
727 (gfc_free_error): New function.
728 * primary.c (match_complex_constant): Call gfc_free_error if
729 gfc_pop_error will not be called.
730 * match.c (gfc_match_st_function): Likewise.
733 * scanner.c (preprocessor_line): Don't treat flag 3 as the start of a new
734 file. Fix file left but not entered warning.
736 2005-07-14 Feng Wang <fengwang@nudt.edu.cn>
737 Steven G. Kargl <kargls@comcast.net>
739 * array.c (resolve_character_array_constructor): Allocate gfc_charlen
740 for the array and attach to namespace list for automatic deallocation.
742 2005-07-13 Andreas Schwab <schwab@suse.de>
744 * Make-lang.in (fortran/dependency.o): Depend on
745 $(GFORTRAN_TRANS_DEPS).
747 2005-07-11 Jakub Jelinek <jakub@redhat.com>
749 * trans-stmt.c (gfc_trans_forall_loop): Clear maskindex before
751 (gfc_trans_assign_need_temp, gfc_trans_pointer_assign_need_temp,
752 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_2):
753 Don't clear maskindexes here.
755 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
757 * trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN
760 2005-07-08 Jakub Jelinek <jakub@redhat.com>
762 * primary.c (gfc_match_rvalue): Handle ENTRY the same way
765 2005-07-07 Jakub Jelinek <jakub@redhat.com>
767 * scanner.c (load_line): Add pbuflen argument, don't make
768 buflen static. If maxlen == 0 or preprocessor_flag,
769 don't truncate at buflen, but at maxlen. In xrealloc add
770 1 byte at the end for the terminating '\0'. Don't fill
771 with spaces up to buflen, but gfc_option.fixed_line_length.
772 (load_file): Adjust load_line caller. Add line_len variable.
774 * scanner.c (preprocessor_line): Only set current_file->line when errors
775 have not been encountered. Warn and don't crash if a file leave
776 preprocessor line has no corresponding entering line. Formatting.
778 2005-07-07 Steven Bosscher <stevenb@suse.de>
780 * primary.c (match_hollerith_constant): Use int, not unsigned int,
781 for the hollerith length. Fix indentation.
783 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
788 * arith.c (gfc_hollerith2int, gfc_hollerith2real,
789 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
791 (eval_intrinsic): Don't evaluate if Hollerith constant arguments exist.
792 * arith.h (gfc_hollerith2int, gfc_hollerith2real,
793 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
795 * expr.c (free_expr0): Free memery allocated for Hollerith constant.
796 (gfc_copy_expr): Allocate and copy string if Expr is from Hollerith.
797 (gfc_check_assign): Enable conversion from Hollerith to other.
798 * gfortran.h (bt): Add BT_HOLLERITH.
799 (gfc_expr): Add from_H flag.
800 * intrinsic.c (gfc_type_letter): Return 'h' for BT_HOLLERITH.
801 (add_conversions): Add conversions from Hollerith constant to other.
802 (do_simplify): Don't simplify if Hollerith constant arguments exist.
803 * io.c (resolve_tag): Enable array in FORMAT tag under GFC_STD_GNU.
804 * misc.c (gfc_basetype_name): Return "HOLLERITH" for BT_HOLLERITH.
805 (gfc_type_name): Print "HOLLERITH" for BT_HOLLERITH.
806 * primary.c (match_hollerith_constant): New function.
807 (gfc_match_literal_constant): Add match Hollerith before Integer.
808 * simplify.c (gfc_convert_constant): Add conversion from Hollerith
810 * trans-const.c (gfc_conv_constant_to_tree): Use VIEW_CONVERT_EXPR to
811 convert Hollerith constant to tree.
812 * trans-io.c (gfc_convert_array_to_string): Get array's address and
813 length to set string expr.
814 (set_string): Deal with array assigned Hollerith constant and character
816 * gfortran.texi: Document Hollerith constants as extention support.
818 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
821 * trans-array.c (gfc_trans_array_constructor_value): Fix index of data.
823 2005-07-07 Jakub Jelinek <jakub@redhat.com>
825 * decl.c (gfc_match_entry): Allow ENTRY without parentheses
828 2005-07-03 Kazu Hirata <kazu@codesourcery.com>
830 * gfortran.texi, intrinsic.texi: Fix typos.
831 * symbol.c: Fix a comment typo.
833 2005-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
835 * error.c (error_printf, error_print): Use ATTRIBUTE_GCC_GFC.
836 * gfortran.h (ATTRIBUTE_GCC_GFC): New.
837 (gfc_warning, gfc_warning_now, gfc_error, gfc_error_now,
838 gfc_fatal_error, gfc_internal_error, gfc_notify_std): Use
841 2005-07-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
844 * io.c (match_dt_element): Do not allow END tag in PRINT or
847 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
849 * lang.opt: Remove "." from end of help texts.
851 2005-07-01 Jerry DeLisle <jvdelisle@verizon.net>
853 * gfortran.texi: Fix typos and grammar.
854 * invoke.texi: Fix typos and grammar.
855 * intrinsic.texi: Add documentaion for eoshift, epsilon, etime, and
856 exit. Fixed alignment of text for dtime syntax. Fixed a few line
859 2005-06-25 Jakub Jelinek <jakub@redhat.com>
861 * trans-stmt.c (gfc_trans_forall_1): Prefer to use smaller logical
862 type than boolean_type_node.
864 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
866 * all files: Update FSF address in copyright headers.
868 2005-06-24 Jerry DeLisle <jvdelisle@verizon.net>
871 * gfortran.h: Add symbols for new intrinsic functions.
872 * intrinsic.c: Add new functions acosh, asinh, and atanh.
873 * intrinsic.h: Add prototypes for the new functions.
874 * iresolve.c (gfc_resolve_acosh): New function.
875 (gfc_resolve_asinh): New function.
876 (gfc_resolve_atanh): New function.
877 * mathbuiltins.def: Add defines.
878 * simplify.c (gfc_simplify_acosh): New function.
879 (gfc_simplify_asinh): New function.
880 (gfc_simplify_atanh): New function.
882 2005-06-24 Feng Wang <fengwang@nudt.edu.cn>
884 * simplify.c (gfc_simplify_modulo): Don't clear before get result.
886 2005-06-22 Paul Brook <paul@codesourcery.com>
889 * symbol.c (gfc_is_var_automatic): New function.
890 (save_symbol): Use it.
892 2005-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
893 Paul Thomas <pault@gcc.gnu.org>
897 * module.c (mio_namelist): New function. Correct to set
898 namelist_tail and to give error on renaming namelist by use
900 (mio_symbol): Call mio_namelist.
902 2005-06-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
904 * gfortran.h: Add flag_backslash compile-time option.
905 * lang.opt: Add support for -fbackslash option.
906 * options.c: Likewise.
907 * primary.c: Implement behavior for -fno-backslash.
908 * invoke.texi: Add doc for -fbackslash option.
909 * gfortran.texi: Remove mention of -fno-backslash as a
912 2005-06-20 Steven G. Kargl <kargls@comcast.net>
916 * match.c (gfc_match_label): Detect duplicate labels.
919 2005-06-20 Erik Edelmann <erik.edelmann@iki.fi>
921 * intrinsic.c (check_intrinsic_standard): Fix spelling error
922 in a warning message.
924 2005-06-18 Erik Edelman <eedelman@acclab.helsinki.fi>
925 Steven G. Kargl <kargls@comast.net>
928 * primary.c (gfc_match_rvalue): expr_type can be EXPR_CONSTANT
929 for an array; check that sym->as is NULL.
932 2005-06-18 Steven G. Kargl <kargls@comcast.net>
934 * intrinsic.c (gfc_intrinsic_func_interface): Enable errors for generic
935 functions whose simplification routine return FAILURE.
937 2005-06-13 Geoffrey Keating <geoffk@apple.com>
939 * Make-lang.in (fortran.install-man): Doesn't depend on installdirs.
940 (rule for installing f95.1 manpage): Does depend on installdirs.
942 2005-06-13 Jakub Jelinek <jakub@redhat.com>
945 * trans-stmt.c (gfc_trans_forall_loop): Only increment maskindex
946 in the innermost loop.
948 * trans-expr.c (gfc_conv_function_call): Return int instead of
949 void. Use a local variable for has_alternate_specifier and
950 return it. Avoid modification of function type's return value
951 in place, since it may be shared.
952 * trans.h (has_alternate_specifier): Remove.
953 (gfc_conv_function_call): Change return type.
954 * trans-stmt.c (has_alternate_specifier): Remove.
955 (gfc_trans_call): Add a local has_alternate_specifier variable,
956 set it from gfc_conv_function_call return value.
958 2005-06-12 Richard Henderson <rth@redhat.com>
960 * trans-array.c (gfc_conv_descriptor_data_get): Rename from
961 gfc_conv_descriptor_data. Cast the result to the DATAPTR type.
962 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): New.
963 (gfc_trans_allocate_array_storage): Use them.
964 (gfc_array_allocate, gfc_array_deallocate): Likewise.
965 (gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor): Likewise.
966 (gfc_trans_deferred_array): Likewise.
967 * trans-expr.c (gfc_conv_function_call): Likewise.
968 (gfc_trans_subcomponent_assign): Likewise.
969 (gfc_trans_pointer_assignment): Likewise.
970 * trans-intrinsic.c (gfc_conv_allocated): Likewise.
971 * trans-types.c (gfc_array_descriptor_base): New.
972 (gfc_get_element_type): Use GFC_TYPE_ARRAY_DATAPTR_TYPE.
973 (gfc_get_array_descriptor_base): Break out from ...
974 (gfc_get_array_type_bounds): ... here. Create type variants.
975 * trans-array.h (gfc_conv_descriptor_data_get): Declare.
976 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): Declare.
978 2005-06-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
980 * trans-expr.c (gfc_conv_variable): POINTER results don't need f2c
981 calling conventions. Look at sym instead of sym->result.
982 * trans-types.c (gfc_sym_type): Remove workaround for frontend bug.
983 Remove condition which is always false with workaround removed.
984 (gfc_return_by_reference): Always look at sym, never at sym->result.
986 2005-06-11 Steven G. Kargl <kargls@comcast.net>
990 * trans-array.c (gfc_array_deallocate): pstat is new argument
991 (gfc_array_allocate): update gfc_array_deallocate() call.
992 (gfc_trans_deferred_array): ditto.
993 * trans-array.h: update gfc_array_deallocate() prototype.
994 * trans-decl.c (gfc_build_builtin_function_decls): update declaration
995 * trans-stmt.c (gfc_trans_deallocate): Implement STAT= feature.
997 2005-06-07 Jerry DeLisle <jvdelisle@verizon.net>
999 * intrinsic.texi: Add documentation for dcmplx, digits,
1000 dim, idim, ddim, dot_product, dprod, dreal, and dtime.
1002 2005-06-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1005 * trans-array.c (gfc_trans_array_constructor_value): Slightly reorder.
1006 Generate correct exit condition in case of negative steps in
1009 * invoke.texi: Fix description of flags required for compatibility
1012 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1013 Erik Schnetter <schnetter@aei.mpg.de>
1016 * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment,
1017 remove FIXME comment.
1019 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1021 * match.c (match_forall_iterator): Don't immediately give error if '='
1022 is not followed by an expression.
1024 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1025 Erik Edelmann <erik.edelmann@iki.fi>
1027 * array.c (gfc_match_array_constructor): Disallow empty array
1030 2005-06-03 Jerry DeLisle <jvdelisle@verizon.net>
1032 * fortran/intrinsic.texi: Add documentation for
1033 command_argument_count, conjg, dconjg, count,
1034 cpu_time, cshift, date_and_time, dble, dfloat.
1036 2005-06-01 Roger Sayle <roger@eyesopen.com>
1038 * intrinsic.c (add_conv): No longer take a "simplify" argument as
1039 its always gfc_convert_constant, instead take a "standard" argument.
1040 (add_conversions): Change all existing calls of add_conv to pass
1041 GFC_STD_F77 as appropriate. Additionally, if we're allowing GNU
1042 extensions support integer-logical and logical-integer conversions.
1043 (gfc_convert_type_warn): Warn about use the use of these conversions
1044 as a extension when appropriate, i.e. with -pedantic.
1045 * simplify.c (gfc_convert_constant): Add support for integer to
1046 logical and logical to integer conversions, using gfc_int2log and
1048 * arith.c (gfc_log2int, gfc_int2log): New functions.
1049 * arith.h (gfc_log2int, gfc_int2log): Prototype here.
1050 * gfortran.texi: Document this new GNU extension.
1052 2005-06-01 Paul Thomas <pault@gcc.gnu.org>
1054 * fortran/trans-expr.c (gfc_conv_variable): Clean up bracketting.
1055 * fortran/trans-expr.c (gfc_conv_function_call): Insert spaces.
1056 Correct comments and replace convert of integer_one_node with
1059 2005-06-01 Jakub Jelinek <jakub@redhat.com>
1062 * resolve.c (resolve_contained_fntype): Use sym->attr.untyped
1063 to avoid giving error multiple times.
1064 (resolve_entries): Don't error about BT_UNKNOWN here.
1065 (resolve_unknown_f): Capitalize IMPLICIT for consistency.
1066 (resolve_fntype): New function.
1067 (gfc_resolve): Call resolve_fntype.
1069 2005-06-01 Feng Wang <fengwang@nudt.edu.cn>
1072 * fortran/io.c (resolve_tag): Fix error message.
1074 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1076 * fortran/trans-decl.c: Don't include errors.h.
1077 * fortran/Make-lang.in: Updates dependencies.
1079 2005-05-31 Paul Thomas <pault@gcc.gnu.org>
1084 * fortran/trans-array.c (gfc_conv_expr_descriptor): Obtain the
1085 string length from the expression typespec character length value
1086 and set temp_ss->stringlength and backend_decl. Obtain the
1087 tree expression from gfc_conv_expr rather than gfc_conv_expr_val.
1088 Dereference the expression to obtain the character.
1089 * fortran/trans-expr.c (gfc_conv_component_ref): Remove the
1090 dereference of scalar character pointer structure components.
1091 * fortran/trans-expr.c (gfc_trans_subarray_assign): Obtain the
1092 string length for the structure component from the component
1095 2005-05-30 Roger Sayle <roger@eyesopen.com>
1097 * gfortran.h (GFC_STD_LEGACY): New "standard" macro. Reindent.
1098 * options.c (gfc_init_options): By default, allow legacy extensions
1099 but warn about them.
1100 (gfc_post_options): Make -pedantic warn about legacy extensions
1101 even with -std=legacy.
1102 (gfc_handle_option): Make -std=gnu follow the default behaviour
1103 of warning about legacy extensions, but allowing them. Make the
1104 new -std=legacy accept everything and warn about nothing.
1105 * lang.opt (std=legacy): New F95 command line option.
1106 * invoke.texi: Document both -std=f2003 and -std=legacy.
1107 * gfortran.texi: Explain the two types of extensions and document
1108 how they are affected by the various -std= command line options.
1110 2005-05-30 Kazu Hirata <kazu@cs.umass.edu>
1112 * trans-expr.c: Remove trailing ^M.
1114 * trans-expr.c: Fix comment typos.
1116 2005-05-29 Paul Thomas <pault@gcc.gnu.org>
1124 * fortran/trans-array.c (gfc_conv_resolve_dependencies): Add string
1125 length to temp_ss for character pointer array assignments.
1126 * fortran/trans-expr.c (gfc_conv_variable): Correct errors in
1127 dereferencing of characters and character pointers.
1128 * fortran/trans-expr.c (gfc_conv_function_call): Provide string
1129 length as return argument for various kinds of handling of return.
1130 Return a char[]* temporary for character pointer functions and
1131 dereference the temporary upon return.
1133 2005-05-29 Janne Blomqvist <jblomqvi@vipunen.hut.fi>
1134 Steven G. Kargl <kargls@comcast.net>
1137 * io.c (gfc_match_inquire): Implement constraints on UNIT and FILE usage.
1139 2005-05-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1142 * io.c (format_item_1): Add check and extension warning for
1145 2005-05-28 Steven G. Kargl <kargls@comcast.net>
1147 * arith.c (gfc_arith_init_1): Fix off by one problem;
1148 (gfc_check_integer_range): Chop extra bits in subnormal numbers.
1150 2005-05-28 Jerry DeLisle <jvdelisle@verizon.net>
1151 Steven G. Kargl <kargls@comcast.net>
1153 * intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING
1156 2005-05-27 Steven G. Kargl <kargls@comcast.net>
1158 * trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force
1159 like types in comparsion.
1161 2005-05-26 Kazu Hirata <kazu@cs.umass.edu>
1163 * data.c, parse.c, trans-array.c, trans-decl.c,
1164 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
1165 trans.h: Fix comment typos. Follow spelling conventions.
1167 2005-05-22 Roger Sayle <roger@eyesopen.com>
1169 * gfortran.texi: Document some more GNU extensions.
1171 2005-05-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1173 * error.c (gfc_warning): Fix typo in comment.
1175 2005-05-18 Thomas Koenig <Thomas.Koenig@online.de>
1178 * fortran/iresolve.c (gfc_resolve_reshape): Add
1179 gfc_type_letter (BT_COMPLEX) for complex to
1180 to resolved function name.
1182 2005-05-18 Erik Edelmann <erik.edelmann@iki.fi>
1184 * array.c (gfc_match_array_constructor): Support [ ... ]
1185 style array constructors.
1187 2005-05-18 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1189 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_TRUNC
1190 and BUILT_IN_TRUNCF instead of BUILT_IN_FLOOR and BUILT_IN_FLOORF.
1191 * trans-intrinsic.c (build_fix_expr): Change 'op' argument
1192 to correct enum type.
1193 (gfc_conv_intrinsic_aint): Likewise. Clarify comment in front of
1194 function. Add default case to switch, deal with FIX_TRUNC_EXPR
1195 instead of FIX_FLOOR_EXPR.
1197 2005-05-18 Feng Wang <fengwang@nudt.edu.cn>
1200 * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to
1201 build character length.
1203 2005-05-17 Zdenek Dvorak <dvorakz@suse.cz>
1205 * trans-types.c (gfc_array_range_type): New variable.
1206 (gfc_init_types): Initialize gfc_array_range_type.
1207 (gfc_get_array_type_bounds): Use gfc_array_range_type.
1209 2005-05-17 Jakub Jelinek <jakub@redhat.com>
1212 * trans-stmt.c (generate_loop_for_temp_to_lhs): Remove SIZE and COUNT2
1213 arguments. If LSS is gfc_ss_terminator, increment COUNT1 by 1, instead
1214 of incrementing COUNT2 and using COUNT1+COUNT2 increment COUNT1 and use
1216 (generate_loop_for_rhs_to_temp): Likewise.
1217 (compute_overall_iter_number): Add INNER_SIZE_BODY argument.
1218 It non-NULL, add it to body.
1219 (allocate_temp_for_forall_nest_1): New function, split from
1220 allocate_temp_for_forall_nest.
1221 (allocate_temp_for_forall_nest): Add INNER_SIZE_BODY argument,
1222 propagate it down to compute_overall_iter_number. Use
1223 allocate_temp_for_forall_nest_1.
1224 (gfc_trans_assign_need_temp): Remove COUNT2. Call
1225 compute_inner_temp_size into a new stmtblock_t. Adjust calls to
1226 allocate_temp_for_forall_nest, generate_loop_for_rhs_to_temp
1227 and generate_loop_for_temp_to_lhs.
1228 (gfc_trans_pointer_assign_need_temp): Adjust calls to
1229 allocate_temp_for_forall_nest.
1230 (gfc_evaluate_where_mask): Call compute_inner_temp_size into a new
1231 stmtblock_t. Call compute_overall_iter_number just once, then
1232 allocate_temp_for_forall_nest_1 twice with the same size.
1233 Initialize mask indexes if nested_forall_info != NULL.
1234 (gfc_trans_where_2): Initialize mask indexes before calling
1235 gfc_trans_nested_forall_loop.
1237 2005-05-15 Feng Wang <fengwang@nudt.edu.cn>
1238 Jerry DeLisle <jvdelisle@verizon.net>
1241 * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to
1242 resolve ICE on assign of format label.
1243 * trans-io.c (set_string): add fold-convert to properly
1244 handle assigned format label in write.
1246 2005-05-13 Paul Brook <paul@codesourcery.com>
1248 * trans-stmt.c (gfc_trans_forall_1): Fix comment typo.
1250 2005-05-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1252 * trans-types.c (gfc_is_nodesc_array): Remove redundant check.
1254 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1257 * io.c (check_format): Look for literal characters inside
1260 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1262 * resolve.c (resolve_symbol): Copy 'pointer' and 'dimension'
1263 attribute from result symbol to function symbol.
1264 * trans-expr.c (gfc_conv_function_call): Look at sym->attr.dimension
1265 instead of sym->result->attr.dimension.
1267 2005-05-10 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1270 * gfortran.h (gfc_option): Add flag_f2c.
1271 * invoke.texi: Document '-ff2c' command line option. Adapt
1272 documentation for '-fno-second-underscore' and '-fno-underscoring'.
1273 * lang.opt (ff2c): New entry.
1274 * options.c (gfc-init_options): Set default calling convention
1275 to -fno-f2c. Mark -fsecond-underscore unset.
1276 (gfc_post_options): Set -fsecond-underscore if not explicitly set
1278 (handle_options): Set gfc_option.flag_f2c according to requested
1280 * trans-decl.c (gfc_get_extern_function_decl): Use special f2c
1281 intrinsics where necessary.
1282 (gfc_trans_deferred_vars): Change todo error to assertion.
1283 * trans-expr.c (gfc_conv_variable): Dereference access
1284 to hidden result argument.
1285 (gfc_conv_function_call): Add hidden result argument to argument
1286 list if f2c calling conventions requested. Slightly restructure
1287 tests. Convert result of default REAL function to requested type
1288 if f2c calling conventions are used. Dereference COMPLEX result
1290 * trans-types.c (gfc_sym_type): Return double for default REAL
1291 function if f2c cc are used.
1292 (gfc_return_by_reference): Slightly restructure logic. Return
1293 COMPLEX by reference depending on calling conventions.
1294 (gfc_get_function_type): Correctly make hidden result argument a
1295 pass-by-reference argument for COMPLEX. Remove old code which does
1296 this for derived types.
1298 2005-05-09 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1300 * match.c (gfc_match_return): Only require space after keyword when
1301 it is obligatory. Only give stdwarn to after matching is successful.
1302 * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns.
1304 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
1306 * intrinsic.texi: Fix typos.
1308 2005-05-07 Steven G. Kargl <kargls@comcast.net>
1310 * intrinsic.texi: Document ASSOCIATED and ATAN2. Update Bessel function
1311 description to include information about scalar arguments.
1313 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
1315 * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt,
1316 match.h, trans-array.h: Update copyright.
1318 2005-04-29 Tom Tromey <tromey@redhat.com>
1320 * f95-lang.c (poplevel): Updated for change to build_block.
1322 2005-04-29 Jakub Jelinek <jakub@redhat.com>
1326 * trans-expr.c (gfc_conv_variable): Handle return values in functions
1327 with alternate entry points.
1328 * resolve.c (resolve_entries): Remove unnecessary string termination
1329 after snprintf. Set result of entry master.
1330 If all entries have the same type, set entry master's type
1331 to that common type, otherwise set mixed_entry_master attribute.
1332 * trans-types.c (gfc_get_mixed_entry_union): New function.
1333 (gfc_get_function_type): Use it for mixed_entry_master functions.
1334 * gfortran.h (symbol_attribute): Add mixed_entry_master bit.
1335 * decl.c (gfc_match_entry): Set entry->result properly for
1337 * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over
1339 (build_entry_thunks): Handle return values in entry thunks.
1340 Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not
1341 shared between multiple contexts.
1342 (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from
1343 current_function_decl instead of sym->backend_decl. Skip over
1344 entry master's entry id argument. For mixed_entry_master entries or
1345 their results, return a COMPONENT_REF of the fake result.
1346 (gfc_trans_deferred_vars): Don't warn about missing return value if
1347 at least one entry point uses RESULT.
1348 (gfc_generate_function_code): For entry master returning
1349 CHARACTER, copy ts.cl->backend_decl to all entry result syms.
1350 * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return
1351 values optional just because they are in entry master.
1353 2005-04-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1355 * gfortran.h (gfc_namespace): Add seen_implicit_none field,
1356 Tobias forgot this in previous commit.
1358 2005-04-29 Paul Brook <paul@codesourcery.com>
1360 * trans-expr.c (gfc_conv_expr_present): Fix broken assert. Update
1363 2005-04-29 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1365 * gfortran.h (gfc_namespace): Add seen_implicit_none field.
1366 * symbol.c (gfc_set_implicit_none): Give error if there's a previous
1367 IMPLICIT NONE, set seen_implicit_none.
1368 (gfc_merge_new_implicit): Error if there's an IMPLICIT NONE statement.
1370 2005-04-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1372 * gfortran.h (gfc_gsymbol): Make name a const char *.
1373 * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
1376 2005-04-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1379 * resolve.c (resolve_actual_arglist): Issue an error if a statement
1380 functions is used as actual argument.
1382 2005-04-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1385 * interface.c (compare_parameter): Ignore type for EXPR_NULL
1386 only if type is BT_UNKNOWN.
1388 2005-04-25 Paul Brook <paul@codesourcery.com>
1389 Steven G. Kargl <kargls@comcast.net>
1392 * check.c (gfc_check_ichar_iachar): New function.
1393 * instinsic.h (gfc_check_ichar_iachar): Add prototype.
1394 * intrinsic.c (add_functions): Use it.
1395 * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
1396 character expression lengths.
1398 2005-04-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1401 * trans-common.c (translate_common): Cast offset and
1402 common_segment->offset to type int for warning message.
1404 2005-04-23 DJ Delorie <dj@redhat.com>
1406 * trans-decl.c: Adjust warning() callers.
1408 2005-04-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1410 * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as
1411 intermediate representation. Fix typo in comment.
1413 2005-04-21 Steven G. Kargl <kargls@comcast.net>
1415 * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation;
1416 simplify logic; Add a gcc_assert.
1418 2005-04-19 Steven G. Kargl <kargls@comcast.net>
1420 * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
1422 2005-04-19 Arnaud Desitter <arnaud.desitter@ouce.ox.ac.uk>
1423 Steven G. Kargl <kargls@comcast.net>
1425 * invoke.texi: Update -Waliasing description
1427 2005-04-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1430 * resolve.c (resolve_variable): If e->symtree is not set, this
1431 ought to be a FAILURE, and not a segfault.
1433 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
1440 * fortran/trans-io.c (gfc_build_io_library_fndecls): Create
1441 declaration for st_set_nml_var and st_set_nml_var_dim. Remove
1442 declarations of old namelist functions.
1443 (build_dt): Simplified call to transfer_namelist_element.
1444 (nml_get_addr_expr): Generates address expression for start of
1445 object data. New function.
1446 (nml_full_name): Qualified name for derived type components. New
1448 (transfer_namelist_element): Modified for calls to new functions
1449 and improved derived type handling.
1451 2005-04-17 Richard Guenther <rguenth@gcc.gnu.org>
1453 * scanner.c (gfc_next_char_literal): Reset truncation flag
1454 for lines ending in a comment for both fixed and free form.
1455 (load_line): Do not set truncated flag if only truncating
1458 2005-04-15 Richard Guenther <rguenth@gcc.gnu.org>
1461 * gfortran.h (gfc_linebuf): Add truncated field.
1462 * parse.c (next_statement): Handle warning for truncated
1464 * scanner.c (load_line): Return if line was truncated.
1465 No longer warn for truncated lines. Remove unused parameters.
1466 (load_file): Store load_line return value to linebuf.
1467 (gfc_error_recovery): Do not advance line at the end.
1469 2005-04-14 Steven G. Kargl <kargls@comcast.net>
1471 * gfortran.h (gfc_real_info): Add subnormal struct member.
1472 * arith.c (gfc_arith_init_1): Set it.
1473 (gfc_check_real_range): Use it.
1474 * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.).
1476 2005-04-12 Kazu Hirata <kazu@cs.umass.edu>
1478 * simplify.c: Fix a comment typo.
1480 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
1482 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
1484 2005-04-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1486 * simplify.c (gfc_simplify_nearest): Overhaul.
1488 2005-04-10 Kazu Hirata <kazu@cs.umass.edu>
1490 * interface.c: Fix a comment typo.
1492 2005-04-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1494 * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
1497 2005-04-09 Steven G. Kargl <kargls@comcast.net>
1499 * simplify.c (gfc_simplify_anint): Use mpfr_round()
1500 (gfc_simplify_dnint): ditto.
1501 (gfc_simplify_nint): ditto.
1503 2005-04-09 Andrew Pinski <pinskia@physics.uc.edu>
1506 * io.c (check_format): Allow an optional comma
1507 between descriptors.
1509 2005-04-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1511 * match.c (match_arithmetic_if): Remove gfc_ prefix and correct
1512 comment according to GNU coding style.
1513 (gfc_match_if): Remove gfc_ prefix in call to
1514 match_arithmetic_if.
1516 2005-04-08 Diego Novillo <dnovillo@redhat.com>
1518 * match.c (gfc_match_arithmetic_if): Declare static.
1520 2005-04-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1523 * match.c (gfc_match_arithmetic_if): New function to match an
1524 arithmetic IF statement.
1525 (gfc_match_if): Use gfc_match_arithmetic_if to match an
1526 arithmetic IF statement embedded in a simple IF statement.
1528 2005-04-07 Steven G. Kargl <kargls@comcast.net>
1530 * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
1532 2005-04-06 Steven G. Kargl <kargls@comcast.net>
1534 * invoke.texi: Remove documentation of -std=f90
1536 2005-04-06 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1538 * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
1539 non-pointer assignment.
1541 2005-04-05 Feng Wang <fengwang@nudt.edu.cn>
1546 * array.c (resolve_character_array_constructor): New function. Set
1547 constant character array's character length.
1548 (gfc_resolve_array_constructor): Use it.
1549 * decl.c (add_init_expr_to_sym): Set symbol and initializer character
1551 (gfc_set_constant_character_len): New function. Set constant character
1552 expression according the given length.
1553 * match.h (gfc_set_constant_character_len): Add prototype.
1555 2005-04-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1557 * intrinsic.texi: BES?? functions are not in the f95 standard.
1559 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1561 * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
1563 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1565 * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
1566 BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
1568 2005-04-02 Steven G. Kargl <kargls@comcast.net>
1570 * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
1572 2005-04-01 Kazu Hirata <kazu@cs.umass.edu>
1574 * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
1575 trans.h: Fix comment typos.
1577 2005-03-29 Steven G. Kargl <kargls@comcast.net>
1579 * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
1580 flag_default_integer, flag_default_real
1581 * invoke.texi: Update documentation
1582 * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8
1583 fdefault-integer-8, and fdefault-real-8 definitions.
1584 * options.c (gfc_init_options): Set option defaults
1585 (gfc_handle_option): Handle command line options.
1586 * trans-types.c (gfc_init_kinds): Use options.
1588 2005-03-29 Keith Besaw <kbesaw@us.ibm.com>
1590 * f95-lang.c (builtin_function): Process the attrs parameter
1591 and apply the "const" attribute to the builtin if found.
1593 2005-03-27 Steven G. Kargl <kargls@comcast.net>
1595 * intrinsic.texi: Document AIMAG, AINT, ALL
1597 2005-03-26 Steven G. Kargl <kargls@comcast.net>
1599 * arith.c (check_result): Fix illogical logic.
1601 2005-03-26 Canqun Yang <canqun@nudt.edu.cn>
1603 * trans-common.c (create_common): Build RECORD_NODE for common blocks
1604 contain no equivalence objects.
1605 (add_equivalences): New argument saw_equiv.
1606 (trans_common): New local variable saw_equiv.
1607 (finish_equivalences): Add a local variable dummy, Always pass true
1608 for the 3rd parameter to create_common.
1610 2005-03-25 Steven G. Kargl <kargls@comcast.net>
1612 * intrinsic.texi: Fix "make dvi"
1614 2005-03-24 Steven G. Kargl <kargls@comcast.net>
1616 * intrinsic.texi: New file.
1617 * gfortran.texi: Include it; white space change; fix typo.
1619 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
1621 * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
1623 2005-03-23 Steven Bosscher <stevenb@suse.de>
1625 * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
1626 * trans-array.c (gfc_trans_allocate_array_storage,
1627 gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
1628 gfc_conv_array_index_ref, gfc_trans_array_bound_check,
1629 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
1630 gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
1631 gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
1632 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1633 gfc_conv_expr_descriptor): Likewise.
1634 * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
1635 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
1636 * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
1637 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
1638 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1639 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
1640 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
1641 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
1642 gfc_conv_intrinsic_merge, prepare_arg_info,
1643 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
1644 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
1645 gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
1646 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
1647 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
1648 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
1650 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
1651 * trans.c (gfc_add_modify_expr): Likewise.
1653 2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1655 * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
1656 gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
1657 gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
1658 gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
1659 gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
1660 gfc_check_perror): new functions to check newly implemented
1662 * gfortran.h: adding symbols for new intrinsics.
1663 * intrinsic.c (add_functions): adding new intrinsics.
1664 (add_subroutines): adding new intrinsics.
1665 * intrinsic.h: prototype for all checking and resolving
1667 * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
1668 gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
1669 gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
1670 gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
1671 gfc_resolve_kill_sub, gfc_resolve_link_sub,
1672 gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
1673 gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
1674 gfc_resolve_perror): new functions to resolve intrinsics.
1675 * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
1678 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1680 * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
1681 in which the variable is declared.
1684 * resolve.c (was_declared): Also check for dummy attribute.
1686 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1688 * gfortran.h (arith): Remove ARITH_0TO0.
1689 * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
1690 (gfc_arith_power): Remove special casing of zero to integral
1693 2005-03-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1695 * Make-lang.in (fortran-warn): Remove -Wno-error.
1696 (expr.o-warn, resolve.o-warn, simplify.o-warn,
1697 trans-common.o-warn): Specify -Wno-error.
1699 2005-03-17 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1701 * trans-array.c (gfc_trans_static_array_pointer,
1702 get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
1703 comment and formatting typos.
1705 2005-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1707 * invoke.texi: Fix typos.
1709 2005-03-15 Zack Weinberg <zack@codesourcery.com>
1711 * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
1713 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
1715 * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
1716 to zero on label_tree.
1718 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
1721 * io.c (resolve_tag): Add checking on assigned label.
1722 (match_dt_format): Does not set symbol assign attribute.
1723 * match.c (gfc_match_goto):Does not set symbol assign attribute.
1724 * resolve.c (resolve_code): Add checking on assigned label.
1725 * trans-common.c (build_field): Deals with common variable assigned
1727 * trans-stmt.c (gfc_conv_label_variable): New function.
1728 (gfc_trans_label_assign): Use it.
1729 (gfc_trans_goto): Ditto.
1730 * trans-io.c (set_string): Ditto.
1731 * trans.h (gfc_conv_label_variable): Add prototype.
1733 2005-03-14 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1736 * symbol.c (check_conflict): A dummy argument can't be a statement
1739 2005-03-14 Zdenek Dvorak <dvorakz@suse.cz>
1741 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
1742 the argument of the shift to the unsigned type.
1744 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1747 * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
1749 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1752 * resolve.c (gfc_resolve): Check if character lengths are
1753 specification expressions.
1755 2005-03-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1758 * trans-array.c (gfc_stack_space_left): Remove unused variable.
1759 (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
1761 * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
1762 Remove declaration / prototype.
1763 * trans-common.c (build_equiv_decl): Give union a name. Check if
1764 it can be put on the stack.
1765 * trans-decl.c (gfc_stack_space_left): Move function here.
1766 (gfc_build_qualified_array): Fix comment typo.
1767 * trans.h (gfc_put_var_on_stack): Add prototype.
1769 2005-03-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1771 * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
1772 * decl.c, trans.c: Don't use C++ style comments.
1773 * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
1774 ifsrc): Give names to enums and use ENUM_BITFIELD.
1775 (gfc_access): Remove trailing comma.
1777 2005-03-05 Steven G. Kargl <kargls@comcast.net>
1780 * primary.c (match_complex_constant): Mangled complex constant may
1781 be an implied do-loop. Give implied do-loop matcher a chance.
1783 2005-03-05 Steven G. Kargl <kargls@comcast.net>
1786 * resolve.c (compare_shapes): New function.
1787 (resolve_operator): Use it.
1789 2005-03-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1791 * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
1792 type for COMPLEX constants.
1794 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1797 * trans-expr.c (gfc_conv_function_call): Correctly dereference
1798 argument from a pointer function also if it has a result clause.
1800 2005-03-04 Steven G. Kargl <kargls@comcast.net>
1802 * expr.c (gfc_copy_shape_excluding): Change && to ||.
1804 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1806 * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
1809 2005-02-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1813 * simplify.c (gfc_simplify_bound): Rename to ...
1814 (simplify_bound): ... this and overhaul.
1816 2005-02-28 Steven G. Kargl <kargl@gcc.gnu.org>
1818 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
1819 (gfc_conv_intrinsic_function): update function calls
1821 2005-02-27 Steven G. Kargl <kargl@gcc.gnu.org>
1824 * trans-types.c (gfc_max_integer_kind): Declare
1825 (gfc_init_kinds): Initialize it.
1826 * gfortran.h (gfc_max_integer_kind): extern it.
1827 * primary.c (match_boz_constant): Use it; remove gfortran extension
1828 of kind suffixes on BOZ literal constants
1831 2005-02-27 Steven G. Kargl <kargls@comcast.net>
1833 * arith.c (gfc_check_real_range): Remove multiple returns
1834 (check_result): New function.
1835 (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
1836 gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
1839 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1841 * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
1844 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-meunchen.de>
1846 Unrevert previously reverted patch. Adding this fix:
1847 * module.c (find_true_name): Deal with NULL module.
1849 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1851 Revert yesterday's patch:
1852 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1854 * gfortran.h (gfc_component, gfc_actual_arglist, ...
1855 ... argument. Copy string instead of pointing to it.
1857 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1859 * gfortran.h (gfc_get_namespace): Add second argument to prototype.
1860 * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
1862 * module.c (mio_namespace_ref, load_needed): Likewise.
1863 * parse.c (parse_interface, parse_contained): Likewise. Here the
1864 correct second argument matters.
1865 * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
1866 parent's implicit types if this is set.
1867 (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
1868 * trans-common.c (build_common_decl): Likewise.
1870 * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
1872 * symbol.c (gfc_set_default_type): Issue error only once, by setting
1873 and checking 'untyped' attribute.
1875 * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
1876 fields into new struct 'op' inside the 'value' union.
1877 * arith.c (eval_intrinsic): Adapt all users.
1878 * dependency.c (gfc_check_dependency): Likewise.
1879 * dump-parse-tree.c (gfc_show_expr): Likewise.
1880 * expr.c (gfc_get_expr): Don't clear removed fields.
1881 (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
1882 gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
1883 check_intrinsic_op): Adapt to new field names.
1884 * interface.c (gfc_extend_expr): Likewise. Also explicitly
1885 nullify 'esym' and 'isym' fields of new function call.
1886 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
1887 Adapt to renamed structure fields.
1888 * matchexp.c (build_node, match_level_1, match_expr): Likewise.
1889 * module.c (mio_expr): Likewise.
1890 * resolve.c (resolve_operator): Likewise.
1891 (gfc_find_forall_index): Likewise. Only look through operands
1892 if dealing with EXPR_OP
1893 * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
1894 * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
1895 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
1898 * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
1899 'name' a 'const char *'.
1900 (gfc_symbol): Likewise, also for 'module'.
1901 (gfc_symtree): Make 'name' a 'const char *'.
1902 (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
1903 (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
1905 (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
1906 initialize 'SYM->module'.
1907 * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
1908 pointer instead of empty string.
1909 * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
1910 * interface.c (gfc_compare_types): Adapt check to account for possible
1912 (compare_actual_formal): Check for NULL pointer instead of empty
1914 * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
1915 Add 'const' qualifier.
1916 (conv_name): Return a heap allocated string.
1917 (find_conv): Add 'const' qualifier to 'target'.
1918 (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
1919 (make_generic): Check for NULL pointer instead of empty string.
1920 (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
1921 (add_conv): No need to strcpy result from 'conv_name'.
1922 (sort_actual): Check for NULL pointer instead of empty string.
1923 * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
1925 * module.c (compare_true_names): Compare pointers instead of strings
1926 for 'module' member.
1927 (find_true_name): Initialize string fields with gfc_get_string.
1928 (mio_pool_string): New function.
1929 (mio_internal_string): Adapt comment.
1930 (mio_component_ref, mio_component, mio_actual_arg): Use
1931 'mio_pool_string' instead of 'mio_internal_string'.
1932 (mio_symbol_interface): Add 'const' qualifier to string arguments.
1933 Add level of indirection. Use 'mio_pool_string' instead of
1934 'mio_internal_string'.
1935 (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
1936 (write_common, write_symbol): Use 'mio_pool_string' instead of
1937 'mio_internal_string'.
1938 (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
1939 instead of empty string.
1940 (write_operator, write_generic): Pass correct type variable to
1941 'mio_symbol_interface'.
1942 (write_symtree): Use 'mio_pool_string' instead of
1943 'mio_internal_string'.
1944 * primary.c (match_keyword_arg): Adapt check to possible
1945 case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'.
1946 * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
1947 gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
1949 (ambiguous_symbol): Check for NULL pointer instead of empty string.
1950 (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
1952 * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
1953 pointer instead of empty string.
1954 * trans-decl.c (gfc_sym_mangled_identifier,
1955 gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
1956 gfc_get_symbol_decl): Likewise.
1957 * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
1958 argument. Copy string instead of pointing to it.
1960 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
1962 * intrinsic.h, st.c: Update copyright.
1964 2005-02-20 Steven G. Kargl <kargls@comcast.net>
1966 * symbol.c: Typos in comments.
1968 2005-02-20 Steven G. Kargl <kargls@comcast.net>
1970 * expr.c (gfc_type_convert_binary): Typo in comment.
1972 2005-02-19 Steven G. Kargl <kargls@comcast.net>
1974 * check.c (gfc_check_selected_int_kind): New function.
1975 * intrinsic.h: Prototype it.
1976 * intrinsic.c (add_function): Use it.
1977 * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
1978 BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
1980 2005-02-19 Steven G. Kargl <kargls@comcast.net>
1982 * check.c (gfc_check_int): improve checking of optional kind
1983 * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
1985 2005-02-19 Steven G. Kargl <kargls@comcast.net>
1987 * check.c (gfc_check_achar): New function
1988 * intrinsic.h: Prototype it.
1989 * intrinsic.c (add_function): Use it.
1991 2005-02-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1993 * trans-stmt.c (generate_loop_for_temp_to_lhs,
1994 generate_loop_for_rhs_to_temp): Remove if whose condition is
1997 2005-02-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1999 * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
2000 (gfc_use_derived): ... this function.
2002 2005-02-09 Richard Henderson <rth@redhat.com>
2004 * f95-lang.c (gfc_init_builtin_functions): Call
2005 build_common_builtin_nodes; do not define any functions handled
2008 2005-02-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2010 * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
2012 (gfc_is_constant_expr): Check 'ref' to determine if substring
2013 reference is constant.
2014 (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
2015 (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
2017 * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
2019 2005-02-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2021 * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
2022 gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
2023 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
2024 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
2025 gfc_add_procedure): Add argument.
2026 * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
2027 gfc_match_null, match_type_spec, match_attr_spec,
2028 gfc_match_formal_arglist, match_result, gfc_match_function_decl):
2029 Update callers to match.
2030 (gfc_match_entry) : Likewise, fix comment typo.
2031 (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
2032 access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
2033 gfc_match_derived_decl): Update callers.
2034 * interface.c (gfc_match_interface): Likewise.
2035 * match.c (gfc_match_label, gfc_add_flavor,
2036 gfc_match_call, gfc_match_common, gfc_match_block_data,
2037 gfc_match_namelist, gfc_match_module, gfc_match_st_function):
2039 * parse.c (parse_derived, parse_interface, parse_contained),
2040 primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
2041 * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
2042 * symbol.c (check_conflict, check_used): Add new 'name' argument,
2043 use when printing error message.
2044 (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
2045 gfc_add_generic, gfc_add_in_common, gfc_add_data,
2046 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
2047 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
2048 gfc_add_procedure): Add new 'name' argument. Pass along to
2049 check_conflict and check_used.
2050 (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
2051 gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
2052 gfc_add_pure, gfc_add_recursive, gfc_add_intent,
2053 gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
2054 argument in calls to any of the modified functions.
2056 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
2058 * gfortran.texi: Don't give last update date.
2060 2006-01-30 Richard Henderson <rth@redhat.com>
2062 * options.c (gfc_init_options): Zero flag_errno_math.
2064 2005-01-29 Paul Brook <paul@codesourcery.com>
2067 * check.c (real_or_complex_check): New function.
2068 (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
2069 * intrinsic.c (add_functions): Use new check functions.
2070 * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
2073 2005-01-29 Steven G. Kargl <kargls@comcast.net>
2076 * expr.c (gfc_check_assign): Check for conformance of logical operands
2078 2004-01-27 Steven Bosscher <stevenb@suse.de>
2080 * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
2081 TREE_USED for all labels.
2082 (gfc_trans_entry_master_switch): Use it instead of building a
2084 * trans-io.c (add_case): Likewise.
2085 * trans-stmt.c (gfc_trans_integer_select): Likewise.
2087 2004-01-23 Paul Brook <paul@codesourcery.com>
2088 Steven G. Kargl <kargls@comcast.net>
2091 * arith.c (gfc_convert_real): Remove sign handling.
2092 * primary.c (match_digits): Allow whitespace after initial sign.
2093 (match_real_const): Handle signs here. Allow whitespace after
2094 initial sign. Remove dead code.
2095 (match_const_complex_part): Remove.
2096 (match_complex_part): Use match_{real,integer}_const.
2097 (match_complex_constant): Cross-promote integer types.
2099 2005-01-23 James A. Morrison <phython@gcc.gnu.org>
2102 * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
2103 transpose_c8 for complex types.
2105 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
2107 * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
2108 trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
2109 trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
2110 Follow spelling conventions.
2112 2005-01-22 Bud Davis <bdavis9659@comcast.net>
2115 * trans-io.c (gfc_trans_inquire): Added code to support
2118 2005-01-22 Steven G. Kargl <kargls@comcast.net>
2120 * intrinsic.c (make_alias): Add standard argument.
2121 (add_functions): Update make_alias calls.
2123 2005-01-22 Paul Brook <paul@codesourcery.com>
2125 * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
2127 2005-01-22 Paul Brook <paul@codesourcery.com>
2129 * gfortran.h (gfc_check_access): Add prototype.
2130 * match.c (gfc_match_namelist): Remove TODO.
2131 * module.c (check_access): Rename ...
2132 (gfc_check_access): ... to this. Boolify. Update callers.
2133 * resolve.c (resolve_symbol): Check for private objects in public
2136 2005-01-22 Paul Brook <paul@codesourcery.com>
2138 * primary.c (gfc_match_rvalue): Only apply implicit type if variable
2139 does not have an explicit type.
2140 (gfc_match_variable): Resolve implicit derived types in all cases.
2141 Resolve contained function types from their own namespace, not the
2143 * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
2144 checking. Resolve from the contained namespace, not the parent.
2146 2005-01-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2149 * trans-const.c (gfc_conv_constant_to_tree): Give logical
2150 constants the correct type.
2153 * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
2155 (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
2158 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
2160 * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
2161 gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
2162 match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
2163 scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
2164 trans-io.c, trans-stmt.c, trans.c: Update copyright.
2166 2005-01-17 Ira Rosen <irar@il.ibm.com>
2168 * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
2170 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2173 * error.c (error_char): Line-buffer errors / warnings.
2175 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2177 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
2178 unsigned issue. Use build_int_cst instead of converting
2179 integer_zero_node. Remove unnecessary conversion.
2181 * trans-types.c (gfc_get_character_type_len): : Use
2182 gfc_charlen_type_node as basic type for the range field.
2184 * trans-intrinsic.c (build_fixbound_expr,
2185 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
2186 gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
2187 gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
2188 of converting 'integer_zero_node' or 'integer_one_node'
2190 (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
2192 (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
2193 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
2194 'build_int_cst' instead of converting 'integer_zero_node' or
2195 'integer_one_node' respectively.
2197 * trans-intrinsic.c (gfc_conv_intrinsic_index,
2198 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
2199 'gfc'-prefix from local variable, remove dead code, use correct
2200 type when inserting argument.
2202 * trans-intrinsic.c, trans-types.c: Update copyright years.
2204 2005-01-16 Steven G. Kargl <kargls@comcast.net>
2207 * resolve.c (check_case_overlap): Typo in comment.
2208 (validate_case_label_expr): Fix up kinds of case values
2209 (resolve_select): Properly handle kind mismatches.
2211 2004-01-16 Paul Brook <paul@codesourcery.com>
2214 * trans-common.c (translate_common): Remove duplicate function call.
2215 (finish_equivalences): Preserve alignment when biasing offsets.
2217 2005-01-15 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de
2219 * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
2220 ASCII-like character encoding.
2222 2005-01-14 Steven G. Kargl <kargls@comcast.net>
2224 * resolve.c (compare_case): Cleanup.
2226 2005-01-14 Steven G. Kargl <kargls@comcast.net>
2228 * resolve.c (compare_case): Give arguments correct type.
2230 2005-01-13 Kazu Hirata <kazu@cs.umass.edu>
2232 * iresolve.c, trans-common.c, trans-types.c: Fix comment
2235 2005-01-09 Paul Brook <paul@codesourcery.com>
2238 * trans-common.c (current_common, current_offset): Remove.
2239 (create_common): Add head argument.
2240 (align_segment): New function.
2241 (apply_segment_offset): New function.
2242 (translate_common): Merge code from new_segment. Handle alignment.
2243 (new_segment): Remove.
2244 (finish_equivalences): Ensure proper alignment.
2246 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2248 * trans-const.c: Don't include unused math.h.
2250 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
2251 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
2252 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
2253 trailing whitespace.
2254 (prepare_arg_info): Fix formatting, indenting and remove trailing
2256 (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
2257 trailing whitespace.
2259 * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
2260 gfc_constant_result, gfc_range_check, gfc_arith_power,
2261 eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
2262 gfc_real2complex, gfc_complex2int, gfc_complex2real,
2263 gfc_complex2complex): Fix whitespace issues.
2264 * check.c (must_be, type_check, numeric_check, int_or_real_check,
2265 logical_array_check, array_check, scalar_check, nonoptional_check,
2266 variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
2267 gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
2268 gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
2269 gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
2270 gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
2271 gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
2272 gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
2273 gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
2274 gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
2275 gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
2276 gfc_check_lbound, gfc_check_logical, min_max_args,
2277 gfc_check_min_max_integer, gfc_check_min_max_real,
2278 gfc_check_min_max_double, gfc_check_matmul,
2279 gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
2280 gfc_check_pack, gfc_check_precision, gfc_check_radix,
2281 gfc_check_range, gfc_check_real, gfc_check_repeat,
2282 gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
2283 gfc_check_set_exponent): Fix formatting issues.
2284 (gfc_check_size, gfc_check_sign): Alphabetize function order,
2285 remove whitespace-only line.
2286 (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
2287 gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
2288 gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
2289 gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
2290 gfc_check_random_number, gfc_check_random_seed,
2291 gfc_check_second_sub, gfc_check_system_clock,
2292 gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
2293 gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
2294 gfc_check_unlink_sub): Fix formatting issues.
2296 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2298 * gfortran.h: Remove outdated comment. Don't include stdio.h
2301 2005-01-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2303 * gfortranspec.c (lang_specific_driver): Change year to 2005 in
2304 output of 'gfortran --version'.
2306 2005-01-03 Steven G. Kargl <kargls@comcast.net>
2308 * arith.c: Add system.h; remove string.h
2314 * check.c: Remove stdlib.h and stdarg.h
2315 * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
2316 * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
2317 * f95-lang.c: Add system.h; remove stdio.h
2318 * interface.c: Add system.h; remove stdlib.h and string.h
2319 * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
2320 * io.c: Remove string.h
2322 * match.c: Remove stdarg.h and string.h
2323 * misc.c: Update copyright; add system.h; remove stdlib.h,
2324 string.h, and sys/stat.h
2325 * module.c: Add system.h; remove string.h, stdio.h, errno.h,
2326 unistd.h, and time.h
2327 * option.c: Remove string.h and stdlib.h
2329 * scanner.c: Update copyright; add system.h; remove stdlib.h,
2330 stdio.h, string.h, and strings.h
2331 * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
2332 * trans-array.c: Remove stdio.h and gmp.h
2333 * trans-const.c: Ditto
2334 * trans-expr.c: Ditto
2336 * trans-stmt.c: Ditto
2338 * trans-intrinsic.c: Remove stdio.h and string.h
2340 2004-12-29 Steven G. Kargl <kargls@comcast.net>
2342 * gfortran.h (gfc_case): fix typo in comment.
2344 2004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2346 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
2347 logical shift. Call fold. Remove 0-bit shift shortcut.
2348 (gfc_conv_intrinsic_ishftc): Convert first argument to at least
2349 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
2350 result if width(arg 1) < 4 bytes. Call fold.
2353 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
2354 in front of function to match the standard. Correct handling
2357 2004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
2359 * trans-expr.c (gfc_conv_cst_int_power): Only check for
2360 flag_unsafe_math_optimizations if we have a float type.
2362 2004-12-23 Steven G. Kargl <kargls@comcast.net>
2364 * gfortran.texi: Fix typo.
2366 2004-12-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2368 * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
2371 2004-12-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2374 * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
2375 (gfc_match_nullify): Make sure that ')' is in front of the end of
2378 * scanner.c (skip_fixed_comments): Fix typo in comment preceding
2381 2004-12-14 Richard Henderson <rth@redhat.com>
2383 * gfortran.h (gfc_expr.function.name): Make const.
2384 (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
2385 (gfc_get_string): Update prototype.
2386 * iresolve.c: Include tree.h.
2387 (string_node, HASH_SIZE, string_head, hash): Remove.
2388 (gfc_get_string): Use vsnprintf, get_identifier.
2389 (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
2390 * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
2391 (gfc_done_1): Don't call gfc_iresolve_done_1.
2392 * module.c (mio_allocated_string): Take and return const char *,
2393 instead of modifying char**.
2394 (mio_expr): Update to match.
2395 * resolve.c (pure_function): Constify name argument.
2396 (resolve_function): Constify name.
2397 * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
2399 2004-12-12 Richard Henderson <rth@redhat.com>
2401 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
2402 gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
2403 gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
2404 gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
2405 gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
2406 gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
2407 gfc_resolve_unpack: Use PREFIX.
2409 2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2412 * match.c (gfc_match_common): Skip whitespace.
2414 2004-12-12 Steven G. Kargl <kargls@comcast.net>
2417 * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
2418 gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
2419 integer kind check; Issue error for -std=f95 when needed.
2420 * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
2422 * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
2423 Promote arguments to same kind.
2425 2004-12-12 Steven G. Kargl <kargls@comcast.net>
2426 Paul Brook <paul@codesourcery.com>
2429 * resolve.c (gfc_resolve_iterator_expr): New function.
2430 (gfc_resolve_iterator): Use it. Add real_ok argument. Convert
2431 start, end and stride to correct type.
2432 (resolve_code): Pass extra argument.
2433 * array.c (resolve_array_list): Pass extra argument.
2434 * gfortran.h (gfc_resolve): Add prototype.
2435 * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
2436 Handle real type iterators.
2438 2004-12-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2441 * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
2442 same kind as C's 'int'.
2443 (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
2445 2004-12-08 Richard Henderson <rth@redhat.com>
2447 * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
2448 to the output expression.
2449 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
2451 (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
2454 2004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2457 * resolve.c (resolve_code): Impose correct restrictions on
2460 * decl.c (gfc_match_end): Use locus of END when eos is an error.
2462 2004-12-02 Steven G. Kargl <kargls@comcast.net>
2463 Paul Brook <paul@codesourcery.com>
2465 * check.c (gfc_check_flush, gfc_check_fnum): New functions.
2466 (gfc_check_fstat, gfc_check_fstat_sub): New functions.
2467 (gfc_check_stat, gfc_check_stat_sub): New functions.
2468 * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
2469 * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
2470 fstat, and stat to intrinsics symbol tables.
2471 * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
2472 (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
2473 * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
2474 (gfc_resolve_stat, gfc_resolve_flush): New functions.
2475 (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
2476 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
2478 2004-12-02 Steven G. Kargl <kargls@comcast.net>
2480 * intrinsic.c: Fix and add comments, fix function declarations
2481 (OPTIONAL,REQUIRED): New symbols
2482 (add_functions,add_subroutines): Use symbols
2483 (gmp.h): Remove unused include
2485 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
2487 * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
2490 2004-11-24 Steven Bosscher <stevenb@suse.de>
2492 * options.c (gfc_post_options): Don't clear flag_inline_functions.
2494 2004-11-20 Steven G. Kargl <kargls@comcast.net>
2496 * check.c (gfc_check_getcwd_sub): Fix seg fault.
2498 * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
2499 gfc_check_unlink,gfc_check_unlink_sub): New functions
2500 * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
2501 * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
2502 exit to intrinsics symbol tables.
2503 * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
2504 gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
2505 gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
2506 gfc_resolve_unlink_sub): Add and sort prototypes.
2507 * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
2508 gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
2509 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
2511 2004-11-16 Paul Brook <paul@codesourcery.com>
2514 * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
2515 (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
2516 * trans-types.c (gfc_get_dtype): Accept array type rather than element
2518 (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
2519 (gfc_get_array_type_bounds): Ditto.
2520 (gfc_get_derived_type): Recurse into derived type pointers.
2521 * trans-types.h (gfc_get_dtype): Add prototype.
2522 * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
2524 2004-11-15 Paul Brook <paul@codesourcery.com>
2526 * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
2528 2004-11-10 Paul Brook <paul@codesourcery.com>
2531 * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
2532 * trans-io.c (transfer_array_component): Ditto.
2534 2004-11-10 Paul Brook <paul@codesourcery.com>
2536 * invoke.texi: Fix typo.
2538 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
2540 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
2541 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
2542 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
2543 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
2544 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
2546 2004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2549 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
2551 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
2553 * gfortranspec.c: Replace GNU CC with GCC.
2555 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2557 * gfortranspec.c (lang_specific_driver): Change year to 2004.
2559 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2562 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
2565 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2568 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
2569 module procedures as if they were module variables.
2571 2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2576 * module.c (write_symbol1): Set module_name for dummy arguments.
2578 2004-11-02 Paul Brook <paul@codesourcery.com>
2580 * intrinsic.c (check_intrinsic_standard): Include error locus.
2582 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
2583 locus to check_intrinsic_standard.
2585 2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
2588 * gfortran.h: Change GFC_STD_* flags to more appropriate
2589 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
2590 gfc_option_t): Add field for warning about use of nonstandard
2592 * intrinsic.c (add_sym): Add parameter for standard version, check
2593 this against current standard.
2594 (add_sym_0): Pass standard parameter to add_sym.
2595 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
2596 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
2597 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
2598 (make_generic): Add parameter for standard, check this
2599 against currently selected standard.
2600 (add_functions, add_subroutines): Add parameter to tell which
2601 standard an intrinsic belongs to.
2602 (check_intrinsic_standard): New function.
2603 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
2604 (gfc_intrinsic_sub_interface): Ditto.
2605 * lang.opt: Add Wnonstd-intrinsics option.
2606 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
2608 (set_Wall): Add warning about nonstd intrinsics.
2609 (gfc_handle_option): Change to use new GFC_STD_* flags,
2611 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
2613 2004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
2615 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
2617 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2619 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
2621 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2623 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
2626 2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
2628 * check.c (gfc_check_rand): Allow missing optional argument.
2629 (gfc_check_irand): Ditto.
2630 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
2632 2004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
2634 PR fortran/13490, PR fortran/17912
2635 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
2636 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
2637 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
2638 warning when compiling with pedantic.
2639 * gcc/fortran/arith.c: Set minimum integer values to reflect
2640 realities of two's complement signed integers. Added
2643 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
2645 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
2646 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
2649 2004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2651 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
2653 (gfc_generate_function_code): Fix formatting issue.
2655 2004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2657 * module.c: Fix formatting issues.
2659 2004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2661 * module.c (mio_interface_rest): Set where member of interface
2664 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
2667 * options.c (gfc_handle_option): Add break after handing the
2670 2004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
2672 * arith.c: Fix formatting issues.
2674 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2677 * resolve.c (resolve_operator): Use correct operator name in message.
2679 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2681 * primary.c (match_boz_constant): Allow kind parameter suffixes.
2682 Move standard warning further to the front.
2684 2004-10-07 Kazu Hirata <kazu@cs.umass.edu>
2686 * trans-stmt.c: Fix a comment typo.
2688 2004-10-07 Paul Brook <paul@codesourcery.com>
2691 * trans-array.c (gfc_trans_deferred_array): Leave use associated
2694 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2697 * simplify.c (twos_complement): New function.
2698 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
2700 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
2702 2004-10-06 Paul Brook <paul@codesourcery.com>
2704 * trans-stmt.c (gfc_trans_simple_do): New function.
2705 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
2706 loop. Update comments.
2708 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2711 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
2715 * intrinsic.c (add_sym_5): Remove.
2716 (add_subroutines): Add resolution function for MVBITS.
2717 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
2719 * iresolve.c (gfc_resolve_mvbits): New function.
2720 (gfc_resolve_random_number): Remove empty line at end of function.
2722 * trans-const.c (gfc_build_cstring_const): New function.
2723 (gfc_init_cst): Use new function.
2724 * trans-const.h (gfc_build_cstring_const): Add prototype.
2725 * trans-io.c (set_string, set_error_locus): Use new function.
2726 * trans-stmt.c (gfc_trans_goto): Use new function.
2729 * parse.c (accept_statement): Don't treat END DO like END IF and
2731 (parse_do_block): Generate possible END DO label inside END DO
2735 * check.c (gfc_check_system_sub): New function.
2736 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
2737 * intrinsic.c (add_functions): Add 'system'.
2738 (add_subroutines): Add 'system'.
2739 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
2740 Move prototypes to other suborutines.
2741 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
2743 (gfc_resolve_system_clock): Fix formatting of prototype.
2744 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
2746 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
2749 2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
2751 * scanner.c (preprocessor_line): Accept preprocessor lines without
2752 file names. Check file names for closing quotes. Handle escaped
2753 quotes in file names.
2755 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2756 Paul Brook <paul@codesourcery.com>
2758 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
2759 Use gfc_get_expr_charlen.
2760 * trans-expr.c (gfc_get_expr_charlen): New function.
2761 * trans.h (gfc_get_expr_charlen): Add prototype.
2763 2004-10-04 Kazu Hirata <kazu@cs.umass.edu>
2765 * trans-intrinsic.c: Fix a comment typo.
2767 2004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2769 * simplify.c (range_check): Remove blank line at beginning of function.
2770 (gfc_simplify_dint): Same at end of function.
2771 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
2772 (gfc_simplify_bound): Fix indentation.
2773 (gfc_simplify_log10): Simplify calculation.
2774 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
2776 (gfc_simplify_nearest): Same at end of function.
2777 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
2779 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
2780 gfc_simplify_spacing): Simplify calulations.
2782 2004-10-03 Feng Wang <fengwang@nudt.edu.cn>
2784 * trans-intrinsic.c: Fix comments on spacing and rrspacing
2785 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
2787 2004-10-01 Jan Hubicka <jh@suse.cz>
2789 * f95-lang.c (gfc_expand_function): Update call of
2790 tree_rest_of_compilation.
2791 * trans-decl.c (gfc_generate_constructors): Likewise.
2793 2004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2795 * trans-intrinsic.c: Comment fixes.
2797 2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2799 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
2801 2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2803 * trans-types.c (gfc_return_by_reference): Remove superfluous
2806 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
2807 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
2810 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
2811 function to determine return type.
2813 2004-09-20 Jan Hubicka <jh@suse.cz>
2815 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
2817 (gfc_generate_function_code): Likewise.
2819 2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2822 * simplify.c (gfc_simplify_reshape): Set shape of return value
2825 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
2826 Zack Weinberg <zack@codesourcery.com>
2828 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
2829 enumeration constants.
2831 2004-09-17 Paul Brook <paul@codesourcery.com>
2833 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
2834 (gfc_linebuf_header_size): Define.
2835 * scanner.c (load_file): Use it.
2837 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
2839 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
2840 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
2841 resolve.c, scanner.c, trans-array.c, trans-array.h,
2842 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
2843 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
2844 trans.h: Fix comment typos. Follow spelling conventions.
2846 2004-09-16 Victor Leikehman <lei@il.ibm.com>
2849 * trans-io.c (transfer_array_component): New function.
2850 (transfer_expr): For array fields, call transfer_array_component.
2852 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
2854 * gfortran.texi: Fix a typo.
2856 2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
2858 * parse.c (eof_buf): Rename eof to eof_buf.
2859 (unexpected_eof): Same.
2860 (gfc_parse_file): Same.
2862 2004-09-15 Steven G. Kargl <kargls@comcast.net>
2864 * check.c (gfc_check_getcwd_sub): New function.
2865 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
2866 * intrinsic.c (add_functions): Add function definition;
2868 * intrinsic.c (add_subroutines): Add subroutine definitions.
2869 * intrinsic.h: Add prototypes.
2870 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
2872 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
2874 2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2877 * module.c (write_symbol): Don't fill in module name here.
2878 (write_symbol0): Fill in here instead.
2880 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
2882 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
2883 trans-array.c, trans-common.c, trans-expr.c,
2884 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
2885 comment typos. Follow spelling conventions.
2887 2004-09-09 Paul Brook <paul@codesourcery.com>
2889 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
2891 2004-09-08 Paul Brook <paul@codesourcery.com>
2893 * array.c: Don't include assert.h.
2894 * data.c: Don't include assert.h. Replace assert and abort with
2895 gcc_assert and gcc_unreachable.
2896 * dependency.c: Ditto.
2897 * f95-lang.c: Ditto.
2898 * iresolve.c: Ditto.
2900 * simplify.c: Ditto.
2902 * trans-array.c: Ditto.
2903 * trans-common.c: Ditto.
2904 * trans-const.c: Ditto.
2905 * trans-decl.c: Ditto.
2906 * trans-expr.c: Ditto.
2907 * trans-intrinsic.c: Ditto.
2908 * trans-io.c: Ditto.
2909 * trans-stmt.c: Ditto.
2910 * trans-types.c: Ditto.
2913 2004-09-07 Per Bothner <per@bothner.com>
2914 Paul Brook <paul@codesourcery.com>
2916 * error.c (show_locus): Handle mapped locations.
2917 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
2918 * gfortran.h: Include input.h.
2919 (struct gfc_linebuf): Use source_location.
2920 * scanner.c (get_file): Initialize linemap.
2921 (preprocessor_line): Pass extra argument to get_file.
2922 (load_file): Ditto. Setup linemap.
2923 (gfc_new_file): Handle mapped locations.
2924 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
2925 Set decl source locations.
2926 (gfc_trans_common): Set blank common block location.
2927 * trans-decl.c (gfc_set_decl_location): New function.
2928 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
2929 (trans_function_start): Move call to gfc_set_backend_locus..
2930 (build_function_decl): ... to here.
2931 (build_entry_thunks): Set and restore the backend locus.
2932 (gfc_generate_constructors): Remove excess arguments to
2933 init_function_start.
2934 (gfc_generate_block_data): Add comments. Set the decl locus.
2935 * trans-io.c (set_error_locus): Handle mapped locations.
2936 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
2937 (gfc_trans_code): Use SET_EXPR_LOCATION.
2938 (gfc_generate_code): Override the location of the new symbol.
2939 * trans.h (gfc_set_decl_location): Add prototype.
2941 2004-08-31 Paul Brook <paul@codesourcery.com>
2943 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
2945 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2948 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
2951 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2956 * resolve.c (resolve_transfer): New function.
2957 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
2959 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2962 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
2965 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2967 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
2969 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2972 * trans-types.c (gfc_return_by_reference): Remove TODO error,
2973 add comment pointing out possible issue WRT compatibility with g77.
2975 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2977 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
2978 all occurences of 'gfc_strlen_type_node' by
2979 'gfc_charlen_type_node'.
2980 * trans-types.h: Same. Also update comment accordingly.
2982 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2984 * primary.c: Update copyright boilerplate to say GCC.
2985 * f95-lang.c: Change initial comment to say gfortran.
2987 2004-08-31 Paul Brook <paul@codesourcery.com>
2989 * trans-types.h: Add comments.
2990 (intmax_type_node, string_type_node, const_string_type_node): Remove.
2992 2004-08-30 Richard Henderson <rth@redhat.com>
2994 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
2995 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
2996 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
2997 c_long, c_long_long.
2998 (gfc_logical_info): Add c_bool.
2999 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
3000 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
3001 rather than gfc_int[48]_type_node for allocate choice.
3002 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
3003 local copies of some kind type nodes.
3004 (gfc_build_builtin_function_decls): Likewise.
3005 * trans-expr.c (gfc_conv_power_op): Likewise.
3006 * trans-intrinsic.c (gfc_conv_intrinsic_index,
3007 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
3008 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
3009 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
3010 gfc_trans_character_select, gfc_trans_allocate): Likewise.
3011 * trans-io.c (gfc_pint4_type_node): Move into ...
3012 (gfc_build_io_library_fndecls): ... here. Cache local copies of
3013 some kind type nodes.
3014 * trans-types.c (gfc_type_nodes): Remove.
3015 (gfc_character1_type_node, gfc_strlen_type_node): New.
3016 (gfc_integer_types, gfc_logical_types): New.
3017 (gfc_real_types, gfc_complex_types): New.
3018 (gfc_init_kinds): Fill in real mode_precision.
3019 (gfc_build_int_type, gfc_build_real_type): New.
3020 (gfc_build_complex_type, gfc_build_logical_type): New.
3021 (c_size_t_size): New.
3022 (gfc_init_types): Loop over kinds.
3023 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
3024 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
3025 (gfc_get_character_type_len): Likewise.
3026 (gfc_type_for_size): Loop over kinds; use a reduced set of
3027 unsigned type nodes.
3028 (gfc_type_for_mode): Loop over kinds.
3029 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
3030 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
3031 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
3032 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
3033 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
3034 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
3035 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
3036 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
3037 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
3038 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
3039 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
3040 gfc_complex8_type_node, gfc_complex16_type_node,
3041 gfc_logical1_type_node, gfc_logical2_type_node,
3042 gfc_logical4_type_node, gfc_logical8_type_node,
3043 gfc_logical16_type_node, gfc_strlen_kind): Remove.
3044 (gfc_character1_type_node): Turn in to a variable.
3045 (gfc_strlen_type_node): Likewise.
3047 2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3049 * gfortran.h (gfc_namespace): Add new field is_block_data.
3050 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
3051 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
3052 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
3053 * trans.h (gfc_generate_block_data): Add prototype.
3054 * trans-decl.c (gfc_generate_block_data): New function.
3056 2004-08-29 Richard Henderson <rth@redhat.com>
3058 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
3059 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
3060 than two HOST_WIDE_INT.
3062 2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3065 * decl.c (free_variable, free_value, gfc_free_data, var_list,
3066 var_element, top_var_list, match_data_constant, top_val_list,
3067 gfc_match_data): Move here from match.c.
3068 (match_old_style_init): New function.
3069 (variable_decl): Match old-style initialization.
3070 * expr.c (gfc_get_variable_expr): New function.
3071 * gfortran.h (gfc_get_variable_expr): Add prototype.
3072 * gfortran.texi: Start documentation for supported extensions.
3073 * match.c: Remove the functions moved to decl.c.
3074 * match.h (gfc_match_data): Move prototype to under decl.c.
3075 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
3078 2004-08-29 Steven G. Kargl <kargls@comcast.net>
3079 Paul Brook <paul@codesourcery.com>
3081 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
3082 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
3083 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
3084 (build_builtin_fntypes): New function.
3085 (gfc_init_builtin_functions): Use it.
3086 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
3087 and GFC_ISYM_ERF{,C}.
3088 (gfc_c_int_kind): Declare.
3089 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
3090 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
3091 gfc_resolve_g77_math1): Add prototypes.
3092 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
3093 * mathbuiltins.def: Add comment. Change third argument. Use
3094 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
3095 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
3096 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
3097 * trans-types.c (gfc_c_int_kind): Declare.
3098 (gfc_init_kinds): Set it.
3100 2004-08-29 Steven G. Kargl <kargls@comcast.net>
3101 Paul Brook <paul@codesourcery.com>
3103 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
3104 (gfc_check_f, gfc_simplify_f): Add f0.
3105 * intrinsic.c (do_check): Call f0. Flatten.
3106 (add_sym_0): Fix prototype. Set f0.
3107 (add_functions): Add getgid, getgid and getuid.
3108 (resolve_intrinsic): Remove obsolete comment.
3109 (do_simplify): Call f0.
3110 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
3111 gfc_resolve_getuid): Add prototypes.
3112 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
3113 gfc_resolve_getuid): New functions.
3114 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
3117 2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3119 * error.c (gfc_error_init_1): Remove blank line in front of
3120 function body. Add missing blank.
3121 (gfc_buffer_error, error_char, error_string): Remove blank line in
3122 front of function body.
3123 (show_locus): Add comma in comment.
3124 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
3125 gfc_push_error, gfc_pop_error): Remove blank line in front of
3127 (gfc_get_errors): Typo fix in comment in front of function. Remove
3128 blank line in front of function body.
3130 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3132 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
3133 variable declaration of same name.
3134 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
3135 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
3136 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
3137 Replace all calls to gfc_default_*_kind with variable accesses.
3138 * trans-types.c: Same as above.
3139 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
3140 static qualifier. Replace all occurences.
3141 (gfc_default_*_kind): Remove functions.
3143 2004-08-26 Richard Henderson <rth@redhat.com>
3145 * arith.c: Include system.h, not real system headers.
3146 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
3147 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
3148 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
3149 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
3150 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
3151 gfc_index_integer_kind, gfc_default_integer_kind,
3152 gfc_default_real_kind,gfc_default_double_kind,
3153 gfc_default_character_kind, gfc_default_logical_kind,
3154 gfc_default_complex_kind, validate_integer, validate_real,
3155 validate_logical, validate_character,
3156 gfc_validate_kind): Move to trans-types.c.
3157 (gfc_set_model_kind): Use gfc_validate_kind.
3158 (gfc_set_model): Just copy the current precision to default.
3159 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
3160 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
3161 * gfortran.h: Update file commentary.
3162 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
3163 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
3164 gfc_default_double_kind_1, gfc_default_character_kind_1,
3165 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
3166 (gfc_init_kinds): New.
3167 (gfc_init_types): Don't set gfc_index_integer_kind here.
3168 * trans-types.h (gfc_init_kinds): Declare.
3169 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
3171 2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3173 * check.c (gfc_check_atan2): New function.
3174 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
3175 * intrinsic.h (gfc_check_atan2): Add prototype.
3177 2004-08-25 Richard Henderson <rth@redhat.com>
3179 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
3180 false and we don't validate the kind.
3181 (gfc_check_integer_range, gfc_check_real_range): Update to match.
3182 * check.c (kind_check): Likewise.
3183 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
3184 (match_char_spec, match_logical_spec): Likewise.
3185 * gfortran.h (gfc_validate_kind): Likewise.
3186 * options.c (gfc_handle_option): Likewise.
3187 * primary.c (match_integer_constant, match_real_constant,
3188 match_string_constant, match_logical_constant,
3189 match_const_complex_part): Likewise.
3190 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
3191 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
3192 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
3193 gfc_simplify_maxexponent, gfc_simplify_minexponent,
3194 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
3195 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
3196 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
3197 gfc_simplify_tiny): Likewise.
3198 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
3199 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
3200 prepare_arg_info): Likewise.
3202 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3204 * expr.c (gfc_check_assign): Add comment. Add new warning.
3205 * trans-expr.c (gfc_conv_function_call): Correctly dereference
3206 result of pointer valued function when not in pointer assignment.
3208 2004-08-25 Paul Brook <paul@codesourcery.com>
3210 * config-lang.in: Remove dead commented line.
3211 * module.c: Replace g95 with gfortran in comment.
3213 2004-08-25 Paul Brook <paul@codesourcery.com>
3216 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
3218 2004-08-25 Paul Brook <paul@codesourcery.com>
3221 * trans-array.c (gfc_trans_allocate_temp_array): Remove
3222 string_length argument.
3223 (gfc_trans_array_ctor_element): New function.
3224 (gfc_trans_array_constructor_subarray): Use it.
3225 (gfc_trans_array_constructor_value): Ditto. Handle constant
3227 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
3228 (gfc_trans_array_constructor): Use them.
3229 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
3230 (gfc_conv_ss_descriptor): Remember section string length.
3231 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
3232 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
3233 (gfc_conv_expr_descriptor): Ditto.
3234 (gfc_conv_loop_setup): Ditto. Spelling fixes.
3235 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
3236 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
3237 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
3238 (gfc_conv_variable): Set string_length from section.
3239 (gfc_conv_function_call): Remove extra argument.
3240 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
3241 * trans-types.c (gfc_get_character_type_len): New function.
3242 (gfc_get_character_type): Use it.
3243 (gfc_get_dtype): Return zero for internal types.
3244 * trans-types.h (gfc_get_character_type_len): Add prototype.
3245 * trans.h (struct gfc_ss): Move string_length out of union.
3247 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3249 * trans.h (build2_v, build3_v): New macros.
3251 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
3253 * trans-array.c (gfc_conv_descriptor_data,
3254 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
3255 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
3256 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
3257 gfc_trans_allocate_temp_array,
3258 gfc_trans_array_constructor_subarray,
3259 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
3260 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
3261 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
3262 gfc_conv_array_ref, gfc_trans_preloop_setup,
3263 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
3264 gfc_conv_loop_setup, gfc_array_init_size,
3265 gfc_conv_array_initializer, gfc_trans_array_bounds,
3266 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
3267 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
3268 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
3269 of build and build_v as appropriate.
3270 * trans-common.c (create_common): Same.
3271 * trans-decl.c (gfc_trans_auto_character_variable,
3272 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
3273 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
3274 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
3275 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
3276 gfc_conv_expr_op, gfc_conv_function_call,
3277 gfc_trans_structure_assign): Same.
3278 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
3279 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
3280 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
3281 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
3282 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
3283 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
3284 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
3285 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
3286 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
3287 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
3288 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
3289 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
3290 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
3291 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
3292 gfc_conv_intrinsic_iargc): Same.
3293 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
3294 set_flag, add_case, io_result, transfer_namelist_element,
3295 transfer_expr): Same.
3296 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
3297 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
3298 gfc_trans_integer_select, gfc_trans_logical_select,
3299 gfc_trans_character_select, gfc_trans_forall_loop,
3300 gfc_trans_nested_forall_loop, gfc_do_allocate,
3301 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
3302 compute_inner_temp_size, compute_overall_iter_number,
3303 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
3304 gfc_trans_forall_1, gfc_evaluate_where_mask,
3305 gfc_trans_where_assign, gfc_trans_allocate): Same.
3306 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
3307 * trans.c (gfc_add_modify_expr, gfc_finish_block,
3308 gfc_build_array_ref, gfc_build_function_call,
3309 gfc_trans_runtime_check): Same.
3311 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3313 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
3314 build_int_cst to build_int_cst_wide in accordance to Nathan's
3317 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
3319 * trans-array.c (gfc_trans_array_constructor_value): Adjust
3320 build_int_cst calls.
3321 * trans-const.c (gfc_build_string_const, gfc_init_constants,
3322 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
3323 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
3324 gfc_trans_entry_master_switch): Likewise.
3325 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
3326 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
3327 * trans-io.c (add_case, set_error_locus,
3328 transfer_namelist_element, transfer_expr): Likewise.
3329 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
3330 gfc_trans_stop, gfc_trans_character_select): Likewise.
3331 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
3332 * trans.c (gfc_trans_runtime_check): Likewise.
3334 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3336 * trans-decl.c, trans-types.c: Add and remove blank lines as
3339 2004-08-24 Richard Henderson <rth@redhat.com>