1 2005-08-05 Thomas Koenig <Thomas.Koenig@online.de>
3 * trans-expr.c (gfc_build_builtin_function_decls): Mark
4 stop_numeric and stop_string as non-returning.
6 2005-08-04 Paul Brook <paul@codesourcery.com>
8 * trans-expr.c (gfc_conv_expr, gfc_conv_expr_type): Update comments.
9 (gfc_conv_expr_lhs): Fix assertion.
10 (gfc_conv_expr_val): Merge post block. Set se.expr to new value.
12 2005-08-02 David Edelsohn <edelsohn@gnu.org>
15 * expr.c (simplify_parameter_variable): Do not copy the subobject
16 references if the expression value is a constant.
18 * expr.c (gfc_simplify_expr): Evaluate constant substrings.
20 2005-07-31 Jerry DeLisle <jvdelisle@verizon.net>
22 * intrinsic.texi: Add documentation for exponent, floor, and fnum and
23 fix description of ceiling in index.
25 2005-07-31 Steven Bosscher <stevenb@suse.de>
27 * trans-decl.c (gfc_build_builtin_function_decls): Give the internal
28 malloc functions the 'malloc' attribute. Give runtime_error the
31 2005-07-31 Steven Bosscher <stevenb@suse.de>
33 * trans-stmt.c (gfc_trans_goto): Jump to the known label instead
34 of the assigned goto variable.
36 2005-07-29 Steven Bosscher <stevenb@suse.de>
38 * trans-types.h (gfc_array_range_type): Add missing GTY decl for this.
40 2005-07-28 Andrew Pinski <pinskia@physics.uc.edu>
42 * fortran/f95-lang.c (language_function): Remove
43 named_labels, shadowed_labels, returns_value, returns_abnormally,
44 warn_about_return_type, and extern_inline fields.
45 (named_labels): Remove variable.
46 (gfc_init_decl_processing): Remove setting of named_labels.
48 2005-07-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
51 * resolve.c (resolve_operator): Improve diagnostic for comparison
52 of logicals with invalid operator.
54 2005-07-25 Jakub Jelinek <jakub@redhat.com>
57 * data.c (gfc_assign_data_value_range): Call
58 create_character_initializer if last_ts is a character type.
60 2005-07-22 Manfred Hollstein <mh@suse.com>
62 * match.c (gfc_match_symbol): Fix uninitialised warnings.
63 * matchexp.c (gfc_match_expr): Likewise.
65 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
67 Make CONSTRUCTOR use VEC to store initializers.
68 * trans-array.c (gfc_build_null_descriptor,
69 gfc_trans_array_constructor_value, gfc_conv_array_initializer):
70 Update to cope with VEC in CONSTRUCTOR_ELTS.
71 * trans-common.c (create_common): Likewise.
72 * trans-expr.c (gfc_conv_structure): Likewise.
73 * trans-stmt.c (gfc_trans_character_select): Use
74 build_constructor_from_list instead of build_constructor.
76 2005-07-19 Paul Thomas <pault@gcc.gnu.org>
79 * resolve.c (resolve_symbol): A symbol with FL_UNKNOWN
80 is matched against interfaces in parent namespaces. If there
81 the symtree is set to point to the interface.
83 2005-07-16 David Edelsohn <edelsohn@gnu.org>
86 * decl.c (do_parm): Adjust character initializer to character length
87 of symbol before assigning.
89 2005-07-14 Steve Ellcey <sje@cup.hp.com>
91 * trans-types.c (MAX_REAL_KINDS): Increase from 4 to 5.
93 2005-07-14 Jakub Jelinek <jakub@redhat.com>
95 * gfortran.h (MAX_ERROR_MESSAGE): Remove.
96 (gfc_error_buf): Add allocated and index fields. Change message
97 field from array to a pointer.
98 * error.c (use_warning_buffer, error_ptr, warning_ptr): Remove.
99 (cur_error_buffer): New variable.
100 (error_char): Use cur_error_buffer->{message,index} instead of
101 {warning,error}_{buffer.message,ptr}. Reallocate message buffer
103 (gfc_warning, gfc_notify_std, gfc_error, gfc_error_now): Setup
104 cur_error_buffer and its index rather than {warning,error}_ptr
105 and use_warning_buffer.
106 (gfc_warning_check, gfc_error_check): Don't print anything if
108 (gfc_push_error): Allocate saved message with xstrdup.
109 (gfc_pop_error): Free saved message with gfc_free.
110 (gfc_free_error): New function.
111 * primary.c (match_complex_constant): Call gfc_free_error if
112 gfc_pop_error will not be called.
113 * match.c (gfc_match_st_function): Likewise.
116 * scanner.c (preprocessor_line): Don't treat flag 3 as the start of a new
117 file. Fix file left but not entered warning.
119 2005-07-14 Feng Wang <fengwang@nudt.edu.cn>
120 Steven G. Kargl <kargls@comcast.net>
122 * array.c (resolve_character_array_constructor): Allocate gfc_charlen
123 for the array and attach to namespace list for automatic deallocation.
125 2005-07-13 Andreas Schwab <schwab@suse.de>
127 * Make-lang.in (fortran/dependency.o): Depend on
128 $(GFORTRAN_TRANS_DEPS).
130 2005-07-11 Jakub Jelinek <jakub@redhat.com>
132 * trans-stmt.c (gfc_trans_forall_loop): Clear maskindex before
134 (gfc_trans_assign_need_temp, gfc_trans_pointer_assign_need_temp,
135 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_2):
136 Don't clear maskindexes here.
138 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
140 * trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN
143 2005-07-08 Jakub Jelinek <jakub@redhat.com>
145 * primary.c (gfc_match_rvalue): Handle ENTRY the same way
148 2005-07-07 Jakub Jelinek <jakub@redhat.com>
150 * scanner.c (load_line): Add pbuflen argument, don't make
151 buflen static. If maxlen == 0 or preprocessor_flag,
152 don't truncate at buflen, but at maxlen. In xrealloc add
153 1 byte at the end for the terminating '\0'. Don't fill
154 with spaces up to buflen, but gfc_option.fixed_line_length.
155 (load_file): Adjust load_line caller. Add line_len variable.
157 * scanner.c (preprocessor_line): Only set current_file->line when errors
158 have not been encountered. Warn and don't crash if a file leave
159 preprocessor line has no corresponding entering line. Formatting.
161 2005-07-07 Steven Bosscher <stevenb@suse.de>
163 * primary.c (match_hollerith_constant): Use int, not unsigned int,
164 for the hollerith length. Fix indentation.
166 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
171 * arith.c (gfc_hollerith2int, gfc_hollerith2real,
172 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
174 (eval_intrinsic): Don't evaluate if Hollerith constant arguments exist.
175 * arith.h (gfc_hollerith2int, gfc_hollerith2real,
176 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
178 * expr.c (free_expr0): Free memery allocated for Hollerith constant.
179 (gfc_copy_expr): Allocate and copy string if Expr is from Hollerith.
180 (gfc_check_assign): Enable conversion from Hollerith to other.
181 * gfortran.h (bt): Add BT_HOLLERITH.
182 (gfc_expr): Add from_H flag.
183 * intrinsic.c (gfc_type_letter): Return 'h' for BT_HOLLERITH.
184 (add_conversions): Add conversions from Hollerith constant to other.
185 (do_simplify): Don't simplify if Hollerith constant arguments exist.
186 * io.c (resolve_tag): Enable array in FORMAT tag under GFC_STD_GNU.
187 * misc.c (gfc_basetype_name): Return "HOLLERITH" for BT_HOLLERITH.
188 (gfc_type_name): Print "HOLLERITH" for BT_HOLLERITH.
189 * primary.c (match_hollerith_constant): New function.
190 (gfc_match_literal_constant): Add match Hollerith before Integer.
191 * simplify.c (gfc_convert_constant): Add conversion from Hollerith
193 * trans-const.c (gfc_conv_constant_to_tree): Use VIEW_CONVERT_EXPR to
194 convert Hollerith constant to tree.
195 * trans-io.c (gfc_convert_array_to_string): Get array's address and
196 length to set string expr.
197 (set_string): Deal with array assigned Hollerith constant and character
199 * gfortran.texi: Document Hollerith constants as extention support.
201 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
204 * trans-array.c (gfc_trans_array_constructor_value): Fix index of data.
206 2005-07-07 Jakub Jelinek <jakub@redhat.com>
208 * decl.c (gfc_match_entry): Allow ENTRY without parentheses
211 2005-07-03 Kazu Hirata <kazu@codesourcery.com>
213 * gfortran.texi, intrinsic.texi: Fix typos.
214 * symbol.c: Fix a comment typo.
216 2005-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
218 * error.c (error_printf, error_print): Use ATTRIBUTE_GCC_GFC.
219 * gfortran.h (ATTRIBUTE_GCC_GFC): New.
220 (gfc_warning, gfc_warning_now, gfc_error, gfc_error_now,
221 gfc_fatal_error, gfc_internal_error, gfc_notify_std): Use
224 2005-07-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
227 * io.c (match_dt_element): Do not allow END tag in PRINT or
230 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
232 * lang.opt: Remove "." from end of help texts.
234 2005-07-01 Jerry DeLisle <jvdelisle@verizon.net>
236 * gfortran.texi: Fix typos and grammar.
237 * invoke.texi: Fix typos and grammar.
238 * intrinsic.texi: Add documentaion for eoshift, epsilon, etime, and
239 exit. Fixed alignment of text for dtime syntax. Fixed a few line
242 2005-06-25 Jakub Jelinek <jakub@redhat.com>
244 * trans-stmt.c (gfc_trans_forall_1): Prefer to use smaller logical
245 type than boolean_type_node.
247 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
249 * all files: Update FSF address in copyright headers.
251 2005-06-24 Jerry DeLisle <jvdelisle@verizon.net>
254 * gfortran.h: Add symbols for new intrinsic functions.
255 * intrinsic.c: Add new functions acosh, asinh, and atanh.
256 * intrinsic.h: Add prototypes for the new functions.
257 * iresolve.c (gfc_resolve_acosh): New function.
258 (gfc_resolve_asinh): New function.
259 (gfc_resolve_atanh): New function.
260 * mathbuiltins.def: Add defines.
261 * simplify.c (gfc_simplify_acosh): New function.
262 (gfc_simplify_asinh): New function.
263 (gfc_simplify_atanh): New function.
265 2005-06-24 Feng Wang <fengwang@nudt.edu.cn>
267 * simplify.c (gfc_simplify_modulo): Don't clear before get result.
269 2005-06-22 Paul Brook <paul@codesourcery.com>
272 * symbol.c (gfc_is_var_automatic): New function.
273 (save_symbol): Use it.
275 2005-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
276 Paul Thomas <pault@gcc.gnu.org>
280 * module.c (mio_namelist): New function. Correct to set
281 namelist_tail and to give error on renaming namelist by use
283 (mio_symbol): Call mio_namelist.
285 2005-06-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
287 * gfortran.h: Add flag_backslash compile-time option.
288 * lang.opt: Add support for -fbackslash option.
289 * options.c: Likewise.
290 * primary.c: Implement behavior for -fno-backslash.
291 * invoke.texi: Add doc for -fbackslash option.
292 * gfortran.texi: Remove mention of -fno-backslash as a
295 2005-06-20 Steven G. Kargl <kargls@comcast.net>
299 * match.c (gfc_match_label): Detect duplicate labels.
302 2005-06-20 Erik Edelmann <erik.edelmann@iki.fi>
304 * intrinsic.c (check_intrinsic_standard): Fix spelling error
305 in a warning message.
307 2005-06-18 Erik Edelman <eedelman@acclab.helsinki.fi>
308 Steven G. Kargl <kargls@comast.net>
311 * primary.c (gfc_match_rvalue): expr_type can be EXPR_CONSTANT
312 for an array; check that sym->as is NULL.
315 2005-06-18 Steven G. Kargl <kargls@comcast.net>
317 * intrinsic.c (gfc_intrinsic_func_interface): Enable errors for generic
318 functions whose simplification routine return FAILURE.
320 2005-06-13 Geoffrey Keating <geoffk@apple.com>
322 * Make-lang.in (fortran.install-man): Doesn't depend on installdirs.
323 (rule for installing f95.1 manpage): Does depend on installdirs.
325 2005-06-13 Jakub Jelinek <jakub@redhat.com>
328 * trans-stmt.c (gfc_trans_forall_loop): Only increment maskindex
329 in the innermost loop.
331 * trans-expr.c (gfc_conv_function_call): Return int instead of
332 void. Use a local variable for has_alternate_specifier and
333 return it. Avoid modification of function type's return value
334 in place, since it may be shared.
335 * trans.h (has_alternate_specifier): Remove.
336 (gfc_conv_function_call): Change return type.
337 * trans-stmt.c (has_alternate_specifier): Remove.
338 (gfc_trans_call): Add a local has_alternate_specifier variable,
339 set it from gfc_conv_function_call return value.
341 2005-06-12 Richard Henderson <rth@redhat.com>
343 * trans-array.c (gfc_conv_descriptor_data_get): Rename from
344 gfc_conv_descriptor_data. Cast the result to the DATAPTR type.
345 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): New.
346 (gfc_trans_allocate_array_storage): Use them.
347 (gfc_array_allocate, gfc_array_deallocate): Likewise.
348 (gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor): Likewise.
349 (gfc_trans_deferred_array): Likewise.
350 * trans-expr.c (gfc_conv_function_call): Likewise.
351 (gfc_trans_subcomponent_assign): Likewise.
352 (gfc_trans_pointer_assignment): Likewise.
353 * trans-intrinsic.c (gfc_conv_allocated): Likewise.
354 * trans-types.c (gfc_array_descriptor_base): New.
355 (gfc_get_element_type): Use GFC_TYPE_ARRAY_DATAPTR_TYPE.
356 (gfc_get_array_descriptor_base): Break out from ...
357 (gfc_get_array_type_bounds): ... here. Create type variants.
358 * trans-array.h (gfc_conv_descriptor_data_get): Declare.
359 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): Declare.
361 2005-06-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
363 * trans-expr.c (gfc_conv_variable): POINTER results don't need f2c
364 calling conventions. Look at sym instead of sym->result.
365 * trans-types.c (gfc_sym_type): Remove workaround for frontend bug.
366 Remove condition which is always false with workaround removed.
367 (gfc_return_by_reference): Always look at sym, never at sym->result.
369 2005-06-11 Steven G. Kargl <kargls@comcast.net>
373 * trans-array.c (gfc_array_deallocate): pstat is new argument
374 (gfc_array_allocate): update gfc_array_deallocate() call.
375 (gfc_trans_deferred_array): ditto.
376 * trans-array.h: update gfc_array_deallocate() prototype.
377 * trans-decl.c (gfc_build_builtin_function_decls): update declaration
378 * trans-stmt.c (gfc_trans_deallocate): Implement STAT= feature.
380 2005-06-07 Jerry DeLisle <jvdelisle@verizon.net>
382 * intrinsic.texi: Add documentation for dcmplx, digits,
383 dim, idim, ddim, dot_product, dprod, dreal, and dtime.
385 2005-06-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
388 * trans-array.c (gfc_trans_array_constructor_value): Slightly reorder.
389 Generate correct exit condition in case of negative steps in
392 * invoke.texi: Fix description of flags required for compatibility
395 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
396 Erik Schnetter <schnetter@aei.mpg.de>
399 * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment,
400 remove FIXME comment.
402 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
404 * match.c (match_forall_iterator): Don't immediately give error if '='
405 is not followed by an expression.
407 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
408 Erik Edelmann <erik.edelmann@iki.fi>
410 * array.c (gfc_match_array_constructor): Disallow empty array
413 2005-06-03 Jerry DeLisle <jvdelisle@verizon.net>
415 * fortran/intrinsic.texi: Add documentation for
416 command_argument_count, conjg, dconjg, count,
417 cpu_time, cshift, date_and_time, dble, dfloat.
419 2005-06-01 Roger Sayle <roger@eyesopen.com>
421 * intrinsic.c (add_conv): No longer take a "simplify" argument as
422 its always gfc_convert_constant, instead take a "standard" argument.
423 (add_conversions): Change all existing calls of add_conv to pass
424 GFC_STD_F77 as appropriate. Additionally, if we're allowing GNU
425 extensions support integer-logical and logical-integer conversions.
426 (gfc_convert_type_warn): Warn about use the use of these conversions
427 as a extension when appropriate, i.e. with -pedantic.
428 * simplify.c (gfc_convert_constant): Add support for integer to
429 logical and logical to integer conversions, using gfc_int2log and
431 * arith.c (gfc_log2int, gfc_int2log): New functions.
432 * arith.h (gfc_log2int, gfc_int2log): Prototype here.
433 * gfortran.texi: Document this new GNU extension.
435 2005-06-01 Paul Thomas <pault@gcc.gnu.org>
437 * fortran/trans-expr.c (gfc_conv_variable): Clean up bracketting.
438 * fortran/trans-expr.c (gfc_conv_function_call): Insert spaces.
439 Correct comments and replace convert of integer_one_node with
442 2005-06-01 Jakub Jelinek <jakub@redhat.com>
445 * resolve.c (resolve_contained_fntype): Use sym->attr.untyped
446 to avoid giving error multiple times.
447 (resolve_entries): Don't error about BT_UNKNOWN here.
448 (resolve_unknown_f): Capitalize IMPLICIT for consistency.
449 (resolve_fntype): New function.
450 (gfc_resolve): Call resolve_fntype.
452 2005-06-01 Feng Wang <fengwang@nudt.edu.cn>
455 * fortran/io.c (resolve_tag): Fix error message.
457 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
459 * fortran/trans-decl.c: Don't include errors.h.
460 * fortran/Make-lang.in: Updates dependencies.
462 2005-05-31 Paul Thomas <pault@gcc.gnu.org>
467 * fortran/trans-array.c (gfc_conv_expr_descriptor): Obtain the
468 string length from the expression typespec character length value
469 and set temp_ss->stringlength and backend_decl. Obtain the
470 tree expression from gfc_conv_expr rather than gfc_conv_expr_val.
471 Dereference the expression to obtain the character.
472 * fortran/trans-expr.c (gfc_conv_component_ref): Remove the
473 dereference of scalar character pointer structure components.
474 * fortran/trans-expr.c (gfc_trans_subarray_assign): Obtain the
475 string length for the structure component from the component
478 2005-05-30 Roger Sayle <roger@eyesopen.com>
480 * gfortran.h (GFC_STD_LEGACY): New "standard" macro. Reindent.
481 * options.c (gfc_init_options): By default, allow legacy extensions
483 (gfc_post_options): Make -pedantic warn about legacy extensions
484 even with -std=legacy.
485 (gfc_handle_option): Make -std=gnu follow the default behaviour
486 of warning about legacy extensions, but allowing them. Make the
487 new -std=legacy accept everything and warn about nothing.
488 * lang.opt (std=legacy): New F95 command line option.
489 * invoke.texi: Document both -std=f2003 and -std=legacy.
490 * gfortran.texi: Explain the two types of extensions and document
491 how they are affected by the various -std= command line options.
493 2005-05-30 Kazu Hirata <kazu@cs.umass.edu>
495 * trans-expr.c: Remove trailing ^M.
497 * trans-expr.c: Fix comment typos.
499 2005-05-29 Paul Thomas <pault@gcc.gnu.org>
507 * fortran/trans-array.c (gfc_conv_resolve_dependencies): Add string
508 length to temp_ss for character pointer array assignments.
509 * fortran/trans-expr.c (gfc_conv_variable): Correct errors in
510 dereferencing of characters and character pointers.
511 * fortran/trans-expr.c (gfc_conv_function_call): Provide string
512 length as return argument for various kinds of handling of return.
513 Return a char[]* temporary for character pointer functions and
514 dereference the temporary upon return.
516 2005-05-29 Janne Blomqvist <jblomqvi@vipunen.hut.fi>
517 Steven G. Kargl <kargls@comcast.net>
520 * io.c (gfc_match_inquire): Implement constraints on UNIT and FILE usage.
522 2005-05-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
525 * io.c (format_item_1): Add check and extension warning for
528 2005-05-28 Steven G. Kargl <kargls@comcast.net>
530 * arith.c (gfc_arith_init_1): Fix off by one problem;
531 (gfc_check_integer_range): Chop extra bits in subnormal numbers.
533 2005-05-28 Jerry DeLisle <jvdelisle@verizon.net>
534 Steven G. Kargl <kargls@comcast.net>
536 * intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING
539 2005-05-27 Steven G. Kargl <kargls@comcast.net>
541 * trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force
542 like types in comparsion.
544 2005-05-26 Kazu Hirata <kazu@cs.umass.edu>
546 * data.c, parse.c, trans-array.c, trans-decl.c,
547 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
548 trans.h: Fix comment typos. Follow spelling conventions.
550 2005-05-22 Roger Sayle <roger@eyesopen.com>
552 * gfortran.texi: Document some more GNU extensions.
554 2005-05-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
556 * error.c (gfc_warning): Fix typo in comment.
558 2005-05-18 Thomas Koenig <Thomas.Koenig@online.de>
561 * fortran/iresolve.c (gfc_resolve_reshape): Add
562 gfc_type_letter (BT_COMPLEX) for complex to
563 to resolved function name.
565 2005-05-18 Erik Edelmann <erik.edelmann@iki.fi>
567 * array.c (gfc_match_array_constructor): Support [ ... ]
568 style array constructors.
570 2005-05-18 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
572 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_TRUNC
573 and BUILT_IN_TRUNCF instead of BUILT_IN_FLOOR and BUILT_IN_FLOORF.
574 * trans-intrinsic.c (build_fix_expr): Change 'op' argument
575 to correct enum type.
576 (gfc_conv_intrinsic_aint): Likewise. Clarify comment in front of
577 function. Add default case to switch, deal with FIX_TRUNC_EXPR
578 instead of FIX_FLOOR_EXPR.
580 2005-05-18 Feng Wang <fengwang@nudt.edu.cn>
583 * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to
584 build character length.
586 2005-05-17 Zdenek Dvorak <dvorakz@suse.cz>
588 * trans-types.c (gfc_array_range_type): New variable.
589 (gfc_init_types): Initialize gfc_array_range_type.
590 (gfc_get_array_type_bounds): Use gfc_array_range_type.
592 2005-05-17 Jakub Jelinek <jakub@redhat.com>
595 * trans-stmt.c (generate_loop_for_temp_to_lhs): Remove SIZE and COUNT2
596 arguments. If LSS is gfc_ss_terminator, increment COUNT1 by 1, instead
597 of incrementing COUNT2 and using COUNT1+COUNT2 increment COUNT1 and use
599 (generate_loop_for_rhs_to_temp): Likewise.
600 (compute_overall_iter_number): Add INNER_SIZE_BODY argument.
601 It non-NULL, add it to body.
602 (allocate_temp_for_forall_nest_1): New function, split from
603 allocate_temp_for_forall_nest.
604 (allocate_temp_for_forall_nest): Add INNER_SIZE_BODY argument,
605 propagate it down to compute_overall_iter_number. Use
606 allocate_temp_for_forall_nest_1.
607 (gfc_trans_assign_need_temp): Remove COUNT2. Call
608 compute_inner_temp_size into a new stmtblock_t. Adjust calls to
609 allocate_temp_for_forall_nest, generate_loop_for_rhs_to_temp
610 and generate_loop_for_temp_to_lhs.
611 (gfc_trans_pointer_assign_need_temp): Adjust calls to
612 allocate_temp_for_forall_nest.
613 (gfc_evaluate_where_mask): Call compute_inner_temp_size into a new
614 stmtblock_t. Call compute_overall_iter_number just once, then
615 allocate_temp_for_forall_nest_1 twice with the same size.
616 Initialize mask indexes if nested_forall_info != NULL.
617 (gfc_trans_where_2): Initialize mask indexes before calling
618 gfc_trans_nested_forall_loop.
620 2005-05-15 Feng Wang <fengwang@nudt.edu.cn>
621 Jerry DeLisle <jvdelisle@verizon.net>
624 * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to
625 resolve ICE on assign of format label.
626 * trans-io.c (set_string): add fold-convert to properly
627 handle assigned format label in write.
629 2005-05-13 Paul Brook <paul@codesourcery.com>
631 * trans-stmt.c (gfc_trans_forall_1): Fix comment typo.
633 2005-05-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
635 * trans-types.c (gfc_is_nodesc_array): Remove redundant check.
637 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
640 * io.c (check_format): Look for literal characters inside
643 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
645 * resolve.c (resolve_symbol): Copy 'pointer' and 'dimension'
646 attribute from result symbol to function symbol.
647 * trans-expr.c (gfc_conv_function_call): Look at sym->attr.dimension
648 instead of sym->result->attr.dimension.
650 2005-05-10 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
653 * gfortran.h (gfc_option): Add flag_f2c.
654 * invoke.texi: Document '-ff2c' command line option. Adapt
655 documentation for '-fno-second-underscore' and '-fno-underscoring'.
656 * lang.opt (ff2c): New entry.
657 * options.c (gfc-init_options): Set default calling convention
658 to -fno-f2c. Mark -fsecond-underscore unset.
659 (gfc_post_options): Set -fsecond-underscore if not explicitly set
661 (handle_options): Set gfc_option.flag_f2c according to requested
663 * trans-decl.c (gfc_get_extern_function_decl): Use special f2c
664 intrinsics where necessary.
665 (gfc_trans_deferred_vars): Change todo error to assertion.
666 * trans-expr.c (gfc_conv_variable): Dereference access
667 to hidden result argument.
668 (gfc_conv_function_call): Add hidden result argument to argument
669 list if f2c calling conventions requested. Slightly restructure
670 tests. Convert result of default REAL function to requested type
671 if f2c calling conventions are used. Dereference COMPLEX result
673 * trans-types.c (gfc_sym_type): Return double for default REAL
674 function if f2c cc are used.
675 (gfc_return_by_reference): Slightly restructure logic. Return
676 COMPLEX by reference depending on calling conventions.
677 (gfc_get_function_type): Correctly make hidden result argument a
678 pass-by-reference argument for COMPLEX. Remove old code which does
679 this for derived types.
681 2005-05-09 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
683 * match.c (gfc_match_return): Only require space after keyword when
684 it is obligatory. Only give stdwarn to after matching is successful.
685 * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns.
687 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
689 * intrinsic.texi: Fix typos.
691 2005-05-07 Steven G. Kargl <kargls@comcast.net>
693 * intrinsic.texi: Document ASSOCIATED and ATAN2. Update Bessel function
694 description to include information about scalar arguments.
696 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
698 * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt,
699 match.h, trans-array.h: Update copyright.
701 2005-04-29 Tom Tromey <tromey@redhat.com>
703 * f95-lang.c (poplevel): Updated for change to build_block.
705 2005-04-29 Jakub Jelinek <jakub@redhat.com>
709 * trans-expr.c (gfc_conv_variable): Handle return values in functions
710 with alternate entry points.
711 * resolve.c (resolve_entries): Remove unnecessary string termination
712 after snprintf. Set result of entry master.
713 If all entries have the same type, set entry master's type
714 to that common type, otherwise set mixed_entry_master attribute.
715 * trans-types.c (gfc_get_mixed_entry_union): New function.
716 (gfc_get_function_type): Use it for mixed_entry_master functions.
717 * gfortran.h (symbol_attribute): Add mixed_entry_master bit.
718 * decl.c (gfc_match_entry): Set entry->result properly for
720 * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over
722 (build_entry_thunks): Handle return values in entry thunks.
723 Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not
724 shared between multiple contexts.
725 (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from
726 current_function_decl instead of sym->backend_decl. Skip over
727 entry master's entry id argument. For mixed_entry_master entries or
728 their results, return a COMPONENT_REF of the fake result.
729 (gfc_trans_deferred_vars): Don't warn about missing return value if
730 at least one entry point uses RESULT.
731 (gfc_generate_function_code): For entry master returning
732 CHARACTER, copy ts.cl->backend_decl to all entry result syms.
733 * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return
734 values optional just because they are in entry master.
736 2005-04-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
738 * gfortran.h (gfc_namespace): Add seen_implicit_none field,
739 Tobias forgot this in previous commit.
741 2005-04-29 Paul Brook <paul@codesourcery.com>
743 * trans-expr.c (gfc_conv_expr_present): Fix broken assert. Update
746 2005-04-29 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
748 * gfortran.h (gfc_namespace): Add seen_implicit_none field.
749 * symbol.c (gfc_set_implicit_none): Give error if there's a previous
750 IMPLICIT NONE, set seen_implicit_none.
751 (gfc_merge_new_implicit): Error if there's an IMPLICIT NONE statement.
753 2005-04-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
755 * gfortran.h (gfc_gsymbol): Make name a const char *.
756 * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
759 2005-04-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
762 * resolve.c (resolve_actual_arglist): Issue an error if a statement
763 functions is used as actual argument.
765 2005-04-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
768 * interface.c (compare_parameter): Ignore type for EXPR_NULL
769 only if type is BT_UNKNOWN.
771 2005-04-25 Paul Brook <paul@codesourcery.com>
772 Steven G. Kargl <kargls@comcast.net>
775 * check.c (gfc_check_ichar_iachar): New function.
776 * instinsic.h (gfc_check_ichar_iachar): Add prototype.
777 * intrinsic.c (add_functions): Use it.
778 * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
779 character expression lengths.
781 2005-04-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
784 * trans-common.c (translate_common): Cast offset and
785 common_segment->offset to type int for warning message.
787 2005-04-23 DJ Delorie <dj@redhat.com>
789 * trans-decl.c: Adjust warning() callers.
791 2005-04-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
793 * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as
794 intermediate representation. Fix typo in comment.
796 2005-04-21 Steven G. Kargl <kargls@comcast.net>
798 * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation;
799 simplify logic; Add a gcc_assert.
801 2005-04-19 Steven G. Kargl <kargls@comcast.net>
803 * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
805 2005-04-19 Arnaud Desitter <arnaud.desitter@ouce.ox.ac.uk>
806 Steven G. Kargl <kargls@comcast.net>
808 * invoke.texi: Update -Waliasing description
810 2005-04-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
813 * resolve.c (resolve_variable): If e->symtree is not set, this
814 ought to be a FAILURE, and not a segfault.
816 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
823 * fortran/trans-io.c (gfc_build_io_library_fndecls): Create
824 declaration for st_set_nml_var and st_set_nml_var_dim. Remove
825 declarations of old namelist functions.
826 (build_dt): Simplified call to transfer_namelist_element.
827 (nml_get_addr_expr): Generates address expression for start of
828 object data. New function.
829 (nml_full_name): Qualified name for derived type components. New
831 (transfer_namelist_element): Modified for calls to new functions
832 and improved derived type handling.
834 2005-04-17 Richard Guenther <rguenth@gcc.gnu.org>
836 * scanner.c (gfc_next_char_literal): Reset truncation flag
837 for lines ending in a comment for both fixed and free form.
838 (load_line): Do not set truncated flag if only truncating
841 2005-04-15 Richard Guenther <rguenth@gcc.gnu.org>
844 * gfortran.h (gfc_linebuf): Add truncated field.
845 * parse.c (next_statement): Handle warning for truncated
847 * scanner.c (load_line): Return if line was truncated.
848 No longer warn for truncated lines. Remove unused parameters.
849 (load_file): Store load_line return value to linebuf.
850 (gfc_error_recovery): Do not advance line at the end.
852 2005-04-14 Steven G. Kargl <kargls@comcast.net>
854 * gfortran.h (gfc_real_info): Add subnormal struct member.
855 * arith.c (gfc_arith_init_1): Set it.
856 (gfc_check_real_range): Use it.
857 * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.).
859 2005-04-12 Kazu Hirata <kazu@cs.umass.edu>
861 * simplify.c: Fix a comment typo.
863 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
865 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
867 2005-04-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
869 * simplify.c (gfc_simplify_nearest): Overhaul.
871 2005-04-10 Kazu Hirata <kazu@cs.umass.edu>
873 * interface.c: Fix a comment typo.
875 2005-04-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
877 * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
880 2005-04-09 Steven G. Kargl <kargls@comcast.net>
882 * simplify.c (gfc_simplify_anint): Use mpfr_round()
883 (gfc_simplify_dnint): ditto.
884 (gfc_simplify_nint): ditto.
886 2005-04-09 Andrew Pinski <pinskia@physics.uc.edu>
889 * io.c (check_format): Allow an optional comma
892 2005-04-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
894 * match.c (match_arithmetic_if): Remove gfc_ prefix and correct
895 comment according to GNU coding style.
896 (gfc_match_if): Remove gfc_ prefix in call to
899 2005-04-08 Diego Novillo <dnovillo@redhat.com>
901 * match.c (gfc_match_arithmetic_if): Declare static.
903 2005-04-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
906 * match.c (gfc_match_arithmetic_if): New function to match an
907 arithmetic IF statement.
908 (gfc_match_if): Use gfc_match_arithmetic_if to match an
909 arithmetic IF statement embedded in a simple IF statement.
911 2005-04-07 Steven G. Kargl <kargls@comcast.net>
913 * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
915 2005-04-06 Steven G. Kargl <kargls@comcast.net>
917 * invoke.texi: Remove documentation of -std=f90
919 2005-04-06 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
921 * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
922 non-pointer assignment.
924 2005-04-05 Feng Wang <fengwang@nudt.edu.cn>
929 * array.c (resolve_character_array_constructor): New function. Set
930 constant character array's character length.
931 (gfc_resolve_array_constructor): Use it.
932 * decl.c (add_init_expr_to_sym): Set symbol and initializer character
934 (gfc_set_constant_character_len): New function. Set constant character
935 expression according the given length.
936 * match.h (gfc_set_constant_character_len): Add prototype.
938 2005-04-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
940 * intrinsic.texi: BES?? functions are not in the f95 standard.
942 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
944 * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
946 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
948 * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
949 BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
951 2005-04-02 Steven G. Kargl <kargls@comcast.net>
953 * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
955 2005-04-01 Kazu Hirata <kazu@cs.umass.edu>
957 * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
958 trans.h: Fix comment typos.
960 2005-03-29 Steven G. Kargl <kargls@comcast.net>
962 * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
963 flag_default_integer, flag_default_real
964 * invoke.texi: Update documentation
965 * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8
966 fdefault-integer-8, and fdefault-real-8 definitions.
967 * options.c (gfc_init_options): Set option defaults
968 (gfc_handle_option): Handle command line options.
969 * trans-types.c (gfc_init_kinds): Use options.
971 2005-03-29 Keith Besaw <kbesaw@us.ibm.com>
973 * f95-lang.c (builtin_function): Process the attrs parameter
974 and apply the "const" attribute to the builtin if found.
976 2005-03-27 Steven G. Kargl <kargls@comcast.net>
978 * intrinsic.texi: Document AIMAG, AINT, ALL
980 2005-03-26 Steven G. Kargl <kargls@comcast.net>
982 * arith.c (check_result): Fix illogical logic.
984 2005-03-26 Canqun Yang <canqun@nudt.edu.cn>
986 * trans-common.c (create_common): Build RECORD_NODE for common blocks
987 contain no equivalence objects.
988 (add_equivalences): New argument saw_equiv.
989 (trans_common): New local variable saw_equiv.
990 (finish_equivalences): Add a local variable dummy, Always pass true
991 for the 3rd parameter to create_common.
993 2005-03-25 Steven G. Kargl <kargls@comcast.net>
995 * intrinsic.texi: Fix "make dvi"
997 2005-03-24 Steven G. Kargl <kargls@comcast.net>
999 * intrinsic.texi: New file.
1000 * gfortran.texi: Include it; white space change; fix typo.
1002 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
1004 * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
1006 2005-03-23 Steven Bosscher <stevenb@suse.de>
1008 * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
1009 * trans-array.c (gfc_trans_allocate_array_storage,
1010 gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
1011 gfc_conv_array_index_ref, gfc_trans_array_bound_check,
1012 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
1013 gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
1014 gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
1015 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1016 gfc_conv_expr_descriptor): Likewise.
1017 * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
1018 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
1019 * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
1020 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
1021 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1022 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
1023 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
1024 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
1025 gfc_conv_intrinsic_merge, prepare_arg_info,
1026 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
1027 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
1028 gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
1029 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
1030 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
1031 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
1033 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
1034 * trans.c (gfc_add_modify_expr): Likewise.
1036 2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1038 * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
1039 gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
1040 gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
1041 gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
1042 gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
1043 gfc_check_perror): new functions to check newly implemented
1045 * gfortran.h: adding symbols for new intrinsics.
1046 * intrinsic.c (add_functions): adding new intrinsics.
1047 (add_subroutines): adding new intrinsics.
1048 * intrinsic.h: prototype for all checking and resolving
1050 * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
1051 gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
1052 gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
1053 gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
1054 gfc_resolve_kill_sub, gfc_resolve_link_sub,
1055 gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
1056 gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
1057 gfc_resolve_perror): new functions to resolve intrinsics.
1058 * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
1061 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1063 * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
1064 in which the variable is declared.
1067 * resolve.c (was_declared): Also check for dummy attribute.
1069 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1071 * gfortran.h (arith): Remove ARITH_0TO0.
1072 * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
1073 (gfc_arith_power): Remove special casing of zero to integral
1076 2005-03-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1078 * Make-lang.in (fortran-warn): Remove -Wno-error.
1079 (expr.o-warn, resolve.o-warn, simplify.o-warn,
1080 trans-common.o-warn): Specify -Wno-error.
1082 2005-03-17 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1084 * trans-array.c (gfc_trans_static_array_pointer,
1085 get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
1086 comment and formatting typos.
1088 2005-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1090 * invoke.texi: Fix typos.
1092 2005-03-15 Zack Weinberg <zack@codesourcery.com>
1094 * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
1096 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
1098 * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
1099 to zero on label_tree.
1101 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
1104 * io.c (resolve_tag): Add checking on assigned label.
1105 (match_dt_format): Does not set symbol assign attribute.
1106 * match.c (gfc_match_goto):Does not set symbol assign attribute.
1107 * resolve.c (resolve_code): Add checking on assigned label.
1108 * trans-common.c (build_field): Deals with common variable assigned
1110 * trans-stmt.c (gfc_conv_label_variable): New function.
1111 (gfc_trans_label_assign): Use it.
1112 (gfc_trans_goto): Ditto.
1113 * trans-io.c (set_string): Ditto.
1114 * trans.h (gfc_conv_label_variable): Add prototype.
1116 2005-03-14 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1119 * symbol.c (check_conflict): A dummy argument can't be a statement
1122 2005-03-14 Zdenek Dvorak <dvorakz@suse.cz>
1124 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
1125 the argument of the shift to the unsigned type.
1127 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1130 * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
1132 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1135 * resolve.c (gfc_resolve): Check if character lengths are
1136 specification expressions.
1138 2005-03-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1141 * trans-array.c (gfc_stack_space_left): Remove unused variable.
1142 (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
1144 * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
1145 Remove declaration / prototype.
1146 * trans-common.c (build_equiv_decl): Give union a name. Check if
1147 it can be put on the stack.
1148 * trans-decl.c (gfc_stack_space_left): Move function here.
1149 (gfc_build_qualified_array): Fix comment typo.
1150 * trans.h (gfc_put_var_on_stack): Add prototype.
1152 2005-03-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1154 * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
1155 * decl.c, trans.c: Don't use C++ style comments.
1156 * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
1157 ifsrc): Give names to enums and use ENUM_BITFIELD.
1158 (gfc_access): Remove trailing comma.
1160 2005-03-05 Steven G. Kargl <kargls@comcast.net>
1163 * primary.c (match_complex_constant): Mangled complex constant may
1164 be an implied do-loop. Give implied do-loop matcher a chance.
1166 2005-03-05 Steven G. Kargl <kargls@comcast.net>
1169 * resolve.c (compare_shapes): New function.
1170 (resolve_operator): Use it.
1172 2005-03-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1174 * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
1175 type for COMPLEX constants.
1177 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1180 * trans-expr.c (gfc_conv_function_call): Correctly dereference
1181 argument from a pointer function also if it has a result clause.
1183 2005-03-04 Steven G. Kargl <kargls@comcast.net>
1185 * expr.c (gfc_copy_shape_excluding): Change && to ||.
1187 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1189 * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
1192 2005-02-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1196 * simplify.c (gfc_simplify_bound): Rename to ...
1197 (simplify_bound): ... this and overhaul.
1199 2005-02-28 Steven G. Kargl <kargl@gcc.gnu.org>
1201 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
1202 (gfc_conv_intrinsic_function): update function calls
1204 2005-02-27 Steven G. Kargl <kargl@gcc.gnu.org>
1207 * trans-types.c (gfc_max_integer_kind): Declare
1208 (gfc_init_kinds): Initialize it.
1209 * gfortran.h (gfc_max_integer_kind): extern it.
1210 * primary.c (match_boz_constant): Use it; remove gfortran extension
1211 of kind suffixes on BOZ literal constants
1214 2005-02-27 Steven G. Kargl <kargls@comcast.net>
1216 * arith.c (gfc_check_real_range): Remove multiple returns
1217 (check_result): New function.
1218 (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
1219 gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
1222 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1224 * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
1227 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-meunchen.de>
1229 Unrevert previously reverted patch. Adding this fix:
1230 * module.c (find_true_name): Deal with NULL module.
1232 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1234 Revert yesterday's patch:
1235 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1237 * gfortran.h (gfc_component, gfc_actual_arglist, ...
1238 ... argument. Copy string instead of pointing to it.
1240 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1242 * gfortran.h (gfc_get_namespace): Add second argument to prototype.
1243 * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
1245 * module.c (mio_namespace_ref, load_needed): Likewise.
1246 * parse.c (parse_interface, parse_contained): Likewise. Here the
1247 correct second argument matters.
1248 * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
1249 parent's implicit types if this is set.
1250 (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
1251 * trans-common.c (build_common_decl): Likewise.
1253 * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
1255 * symbol.c (gfc_set_default_type): Issue error only once, by setting
1256 and checking 'untyped' attribute.
1258 * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
1259 fields into new struct 'op' inside the 'value' union.
1260 * arith.c (eval_intrinsic): Adapt all users.
1261 * dependency.c (gfc_check_dependency): Likewise.
1262 * dump-parse-tree.c (gfc_show_expr): Likewise.
1263 * expr.c (gfc_get_expr): Don't clear removed fields.
1264 (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
1265 gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
1266 check_intrinsic_op): Adapt to new field names.
1267 * interface.c (gfc_extend_expr): Likewise. Also explicitly
1268 nullify 'esym' and 'isym' fields of new function call.
1269 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
1270 Adapt to renamed structure fields.
1271 * matchexp.c (build_node, match_level_1, match_expr): Likewise.
1272 * module.c (mio_expr): Likewise.
1273 * resolve.c (resolve_operator): Likewise.
1274 (gfc_find_forall_index): Likewise. Only look through operands
1275 if dealing with EXPR_OP
1276 * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
1277 * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
1278 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
1281 * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
1282 'name' a 'const char *'.
1283 (gfc_symbol): Likewise, also for 'module'.
1284 (gfc_symtree): Make 'name' a 'const char *'.
1285 (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
1286 (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
1288 (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
1289 initialize 'SYM->module'.
1290 * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
1291 pointer instead of empty string.
1292 * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
1293 * interface.c (gfc_compare_types): Adapt check to account for possible
1295 (compare_actual_formal): Check for NULL pointer instead of empty
1297 * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
1298 Add 'const' qualifier.
1299 (conv_name): Return a heap allocated string.
1300 (find_conv): Add 'const' qualifier to 'target'.
1301 (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
1302 (make_generic): Check for NULL pointer instead of empty string.
1303 (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
1304 (add_conv): No need to strcpy result from 'conv_name'.
1305 (sort_actual): Check for NULL pointer instead of empty string.
1306 * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
1308 * module.c (compare_true_names): Compare pointers instead of strings
1309 for 'module' member.
1310 (find_true_name): Initialize string fields with gfc_get_string.
1311 (mio_pool_string): New function.
1312 (mio_internal_string): Adapt comment.
1313 (mio_component_ref, mio_component, mio_actual_arg): Use
1314 'mio_pool_string' instead of 'mio_internal_string'.
1315 (mio_symbol_interface): Add 'const' qualifier to string arguments.
1316 Add level of indirection. Use 'mio_pool_string' instead of
1317 'mio_internal_string'.
1318 (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
1319 (write_common, write_symbol): Use 'mio_pool_string' instead of
1320 'mio_internal_string'.
1321 (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
1322 instead of empty string.
1323 (write_operator, write_generic): Pass correct type variable to
1324 'mio_symbol_interface'.
1325 (write_symtree): Use 'mio_pool_string' instead of
1326 'mio_internal_string'.
1327 * primary.c (match_keyword_arg): Adapt check to possible
1328 case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'.
1329 * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
1330 gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
1332 (ambiguous_symbol): Check for NULL pointer instead of empty string.
1333 (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
1335 * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
1336 pointer instead of empty string.
1337 * trans-decl.c (gfc_sym_mangled_identifier,
1338 gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
1339 gfc_get_symbol_decl): Likewise.
1340 * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
1341 argument. Copy string instead of pointing to it.
1343 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
1345 * intrinsic.h, st.c: Update copyright.
1347 2005-02-20 Steven G. Kargl <kargls@comcast.net>
1349 * symbol.c: Typos in comments.
1351 2005-02-20 Steven G. Kargl <kargls@comcast.net>
1353 * expr.c (gfc_type_convert_binary): Typo in comment.
1355 2005-02-19 Steven G. Kargl <kargls@comcast.net>
1357 * check.c (gfc_check_selected_int_kind): New function.
1358 * intrinsic.h: Prototype it.
1359 * intrinsic.c (add_function): Use it.
1360 * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
1361 BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
1363 2005-02-19 Steven G. Kargl <kargls@comcast.net>
1365 * check.c (gfc_check_int): improve checking of optional kind
1366 * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
1368 2005-02-19 Steven G. Kargl <kargls@comcast.net>
1370 * check.c (gfc_check_achar): New function
1371 * intrinsic.h: Prototype it.
1372 * intrinsic.c (add_function): Use it.
1374 2005-02-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1376 * trans-stmt.c (generate_loop_for_temp_to_lhs,
1377 generate_loop_for_rhs_to_temp): Remove if whose condition is
1380 2005-02-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1382 * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
1383 (gfc_use_derived): ... this function.
1385 2005-02-09 Richard Henderson <rth@redhat.com>
1387 * f95-lang.c (gfc_init_builtin_functions): Call
1388 build_common_builtin_nodes; do not define any functions handled
1391 2005-02-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1393 * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
1395 (gfc_is_constant_expr): Check 'ref' to determine if substring
1396 reference is constant.
1397 (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
1398 (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
1400 * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
1402 2005-02-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1404 * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
1405 gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
1406 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
1407 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
1408 gfc_add_procedure): Add argument.
1409 * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
1410 gfc_match_null, match_type_spec, match_attr_spec,
1411 gfc_match_formal_arglist, match_result, gfc_match_function_decl):
1412 Update callers to match.
1413 (gfc_match_entry) : Likewise, fix comment typo.
1414 (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
1415 access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
1416 gfc_match_derived_decl): Update callers.
1417 * interface.c (gfc_match_interface): Likewise.
1418 * match.c (gfc_match_label, gfc_add_flavor,
1419 gfc_match_call, gfc_match_common, gfc_match_block_data,
1420 gfc_match_namelist, gfc_match_module, gfc_match_st_function):
1422 * parse.c (parse_derived, parse_interface, parse_contained),
1423 primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
1424 * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
1425 * symbol.c (check_conflict, check_used): Add new 'name' argument,
1426 use when printing error message.
1427 (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
1428 gfc_add_generic, gfc_add_in_common, gfc_add_data,
1429 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
1430 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
1431 gfc_add_procedure): Add new 'name' argument. Pass along to
1432 check_conflict and check_used.
1433 (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
1434 gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
1435 gfc_add_pure, gfc_add_recursive, gfc_add_intent,
1436 gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
1437 argument in calls to any of the modified functions.
1439 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
1441 * gfortran.texi: Don't give last update date.
1443 2006-01-30 Richard Henderson <rth@redhat.com>
1445 * options.c (gfc_init_options): Zero flag_errno_math.
1447 2005-01-29 Paul Brook <paul@codesourcery.com>
1450 * check.c (real_or_complex_check): New function.
1451 (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
1452 * intrinsic.c (add_functions): Use new check functions.
1453 * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
1456 2005-01-29 Steven G. Kargl <kargls@comcast.net>
1459 * expr.c (gfc_check_assign): Check for conformance of logical operands
1461 2004-01-27 Steven Bosscher <stevenb@suse.de>
1463 * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
1464 TREE_USED for all labels.
1465 (gfc_trans_entry_master_switch): Use it instead of building a
1467 * trans-io.c (add_case): Likewise.
1468 * trans-stmt.c (gfc_trans_integer_select): Likewise.
1470 2004-01-23 Paul Brook <paul@codesourcery.com>
1471 Steven G. Kargl <kargls@comcast.net>
1474 * arith.c (gfc_convert_real): Remove sign handling.
1475 * primary.c (match_digits): Allow whitespace after initial sign.
1476 (match_real_const): Handle signs here. Allow whitespace after
1477 initial sign. Remove dead code.
1478 (match_const_complex_part): Remove.
1479 (match_complex_part): Use match_{real,integer}_const.
1480 (match_complex_constant): Cross-promote integer types.
1482 2005-01-23 James A. Morrison <phython@gcc.gnu.org>
1485 * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
1486 transpose_c8 for complex types.
1488 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
1490 * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
1491 trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
1492 trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
1493 Follow spelling conventions.
1495 2005-01-22 Bud Davis <bdavis9659@comcast.net>
1498 * trans-io.c (gfc_trans_inquire): Added code to support
1501 2005-01-22 Steven G. Kargl <kargls@comcast.net>
1503 * intrinsic.c (make_alias): Add standard argument.
1504 (add_functions): Update make_alias calls.
1506 2005-01-22 Paul Brook <paul@codesourcery.com>
1508 * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
1510 2005-01-22 Paul Brook <paul@codesourcery.com>
1512 * gfortran.h (gfc_check_access): Add prototype.
1513 * match.c (gfc_match_namelist): Remove TODO.
1514 * module.c (check_access): Rename ...
1515 (gfc_check_access): ... to this. Boolify. Update callers.
1516 * resolve.c (resolve_symbol): Check for private objects in public
1519 2005-01-22 Paul Brook <paul@codesourcery.com>
1521 * primary.c (gfc_match_rvalue): Only apply implicit type if variable
1522 does not have an explicit type.
1523 (gfc_match_variable): Resolve implicit derived types in all cases.
1524 Resolve contained function types from their own namespace, not the
1526 * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
1527 checking. Resolve from the contained namespace, not the parent.
1529 2005-01-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1532 * trans-const.c (gfc_conv_constant_to_tree): Give logical
1533 constants the correct type.
1536 * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
1538 (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
1541 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
1543 * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
1544 gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
1545 match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
1546 scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
1547 trans-io.c, trans-stmt.c, trans.c: Update copyright.
1549 2005-01-17 Ira Rosen <irar@il.ibm.com>
1551 * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
1553 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1556 * error.c (error_char): Line-buffer errors / warnings.
1558 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1560 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
1561 unsigned issue. Use build_int_cst instead of converting
1562 integer_zero_node. Remove unnecessary conversion.
1564 * trans-types.c (gfc_get_character_type_len): : Use
1565 gfc_charlen_type_node as basic type for the range field.
1567 * trans-intrinsic.c (build_fixbound_expr,
1568 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
1569 gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
1570 gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
1571 of converting 'integer_zero_node' or 'integer_one_node'
1573 (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
1575 (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
1576 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
1577 'build_int_cst' instead of converting 'integer_zero_node' or
1578 'integer_one_node' respectively.
1580 * trans-intrinsic.c (gfc_conv_intrinsic_index,
1581 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
1582 'gfc'-prefix from local variable, remove dead code, use correct
1583 type when inserting argument.
1585 * trans-intrinsic.c, trans-types.c: Update copyright years.
1587 2005-01-16 Steven G. Kargl <kargls@comcast.net>
1590 * resolve.c (check_case_overlap): Typo in comment.
1591 (validate_case_label_expr): Fix up kinds of case values
1592 (resolve_select): Properly handle kind mismatches.
1594 2004-01-16 Paul Brook <paul@codesourcery.com>
1597 * trans-common.c (translate_common): Remove duplicate function call.
1598 (finish_equivalences): Preserve alignment when biasing offsets.
1600 2005-01-15 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de
1602 * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
1603 ASCII-like character encoding.
1605 2005-01-14 Steven G. Kargl <kargls@comcast.net>
1607 * resolve.c (compare_case): Cleanup.
1609 2005-01-14 Steven G. Kargl <kargls@comcast.net>
1611 * resolve.c (compare_case): Give arguments correct type.
1613 2005-01-13 Kazu Hirata <kazu@cs.umass.edu>
1615 * iresolve.c, trans-common.c, trans-types.c: Fix comment
1618 2005-01-09 Paul Brook <paul@codesourcery.com>
1621 * trans-common.c (current_common, current_offset): Remove.
1622 (create_common): Add head argument.
1623 (align_segment): New function.
1624 (apply_segment_offset): New function.
1625 (translate_common): Merge code from new_segment. Handle alignment.
1626 (new_segment): Remove.
1627 (finish_equivalences): Ensure proper alignment.
1629 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1631 * trans-const.c: Don't include unused math.h.
1633 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
1634 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
1635 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
1636 trailing whitespace.
1637 (prepare_arg_info): Fix formatting, indenting and remove trailing
1639 (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
1640 trailing whitespace.
1642 * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
1643 gfc_constant_result, gfc_range_check, gfc_arith_power,
1644 eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
1645 gfc_real2complex, gfc_complex2int, gfc_complex2real,
1646 gfc_complex2complex): Fix whitespace issues.
1647 * check.c (must_be, type_check, numeric_check, int_or_real_check,
1648 logical_array_check, array_check, scalar_check, nonoptional_check,
1649 variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
1650 gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
1651 gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
1652 gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
1653 gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
1654 gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
1655 gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
1656 gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
1657 gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
1658 gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
1659 gfc_check_lbound, gfc_check_logical, min_max_args,
1660 gfc_check_min_max_integer, gfc_check_min_max_real,
1661 gfc_check_min_max_double, gfc_check_matmul,
1662 gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
1663 gfc_check_pack, gfc_check_precision, gfc_check_radix,
1664 gfc_check_range, gfc_check_real, gfc_check_repeat,
1665 gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
1666 gfc_check_set_exponent): Fix formatting issues.
1667 (gfc_check_size, gfc_check_sign): Alphabetize function order,
1668 remove whitespace-only line.
1669 (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
1670 gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
1671 gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
1672 gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
1673 gfc_check_random_number, gfc_check_random_seed,
1674 gfc_check_second_sub, gfc_check_system_clock,
1675 gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
1676 gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
1677 gfc_check_unlink_sub): Fix formatting issues.
1679 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1681 * gfortran.h: Remove outdated comment. Don't include stdio.h
1684 2005-01-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1686 * gfortranspec.c (lang_specific_driver): Change year to 2005 in
1687 output of 'gfortran --version'.
1689 2005-01-03 Steven G. Kargl <kargls@comcast.net>
1691 * arith.c: Add system.h; remove string.h
1697 * check.c: Remove stdlib.h and stdarg.h
1698 * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
1699 * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
1700 * f95-lang.c: Add system.h; remove stdio.h
1701 * interface.c: Add system.h; remove stdlib.h and string.h
1702 * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
1703 * io.c: Remove string.h
1705 * match.c: Remove stdarg.h and string.h
1706 * misc.c: Update copyright; add system.h; remove stdlib.h,
1707 string.h, and sys/stat.h
1708 * module.c: Add system.h; remove string.h, stdio.h, errno.h,
1709 unistd.h, and time.h
1710 * option.c: Remove string.h and stdlib.h
1712 * scanner.c: Update copyright; add system.h; remove stdlib.h,
1713 stdio.h, string.h, and strings.h
1714 * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
1715 * trans-array.c: Remove stdio.h and gmp.h
1716 * trans-const.c: Ditto
1717 * trans-expr.c: Ditto
1719 * trans-stmt.c: Ditto
1721 * trans-intrinsic.c: Remove stdio.h and string.h
1723 2004-12-29 Steven G. Kargl <kargls@comcast.net>
1725 * gfortran.h (gfc_case): fix typo in comment.
1727 2004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1729 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
1730 logical shift. Call fold. Remove 0-bit shift shortcut.
1731 (gfc_conv_intrinsic_ishftc): Convert first argument to at least
1732 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
1733 result if width(arg 1) < 4 bytes. Call fold.
1736 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
1737 in front of function to match the standard. Correct handling
1740 2004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
1742 * trans-expr.c (gfc_conv_cst_int_power): Only check for
1743 flag_unsafe_math_optimizations if we have a float type.
1745 2004-12-23 Steven G. Kargl <kargls@comcast.net>
1747 * gfortran.texi: Fix typo.
1749 2004-12-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1751 * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
1754 2004-12-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1757 * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
1758 (gfc_match_nullify): Make sure that ')' is in front of the end of
1761 * scanner.c (skip_fixed_comments): Fix typo in comment preceding
1764 2004-12-14 Richard Henderson <rth@redhat.com>
1766 * gfortran.h (gfc_expr.function.name): Make const.
1767 (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
1768 (gfc_get_string): Update prototype.
1769 * iresolve.c: Include tree.h.
1770 (string_node, HASH_SIZE, string_head, hash): Remove.
1771 (gfc_get_string): Use vsnprintf, get_identifier.
1772 (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
1773 * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
1774 (gfc_done_1): Don't call gfc_iresolve_done_1.
1775 * module.c (mio_allocated_string): Take and return const char *,
1776 instead of modifying char**.
1777 (mio_expr): Update to match.
1778 * resolve.c (pure_function): Constify name argument.
1779 (resolve_function): Constify name.
1780 * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
1782 2004-12-12 Richard Henderson <rth@redhat.com>
1784 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
1785 gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
1786 gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
1787 gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
1788 gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
1789 gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
1790 gfc_resolve_unpack: Use PREFIX.
1792 2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1795 * match.c (gfc_match_common): Skip whitespace.
1797 2004-12-12 Steven G. Kargl <kargls@comcast.net>
1800 * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
1801 gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
1802 integer kind check; Issue error for -std=f95 when needed.
1803 * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
1805 * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
1806 Promote arguments to same kind.
1808 2004-12-12 Steven G. Kargl <kargls@comcast.net>
1809 Paul Brook <paul@codesourcery.com>
1812 * resolve.c (gfc_resolve_iterator_expr): New function.
1813 (gfc_resolve_iterator): Use it. Add real_ok argument. Convert
1814 start, end and stride to correct type.
1815 (resolve_code): Pass extra argument.
1816 * array.c (resolve_array_list): Pass extra argument.
1817 * gfortran.h (gfc_resolve): Add prototype.
1818 * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
1819 Handle real type iterators.
1821 2004-12-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1824 * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
1825 same kind as C's 'int'.
1826 (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
1828 2004-12-08 Richard Henderson <rth@redhat.com>
1830 * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
1831 to the output expression.
1832 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
1834 (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
1837 2004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1840 * resolve.c (resolve_code): Impose correct restrictions on
1843 * decl.c (gfc_match_end): Use locus of END when eos is an error.
1845 2004-12-02 Steven G. Kargl <kargls@comcast.net>
1846 Paul Brook <paul@codesourcery.com>
1848 * check.c (gfc_check_flush, gfc_check_fnum): New functions.
1849 (gfc_check_fstat, gfc_check_fstat_sub): New functions.
1850 (gfc_check_stat, gfc_check_stat_sub): New functions.
1851 * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
1852 * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
1853 fstat, and stat to intrinsics symbol tables.
1854 * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
1855 (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
1856 * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
1857 (gfc_resolve_stat, gfc_resolve_flush): New functions.
1858 (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
1859 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
1861 2004-12-02 Steven G. Kargl <kargls@comcast.net>
1863 * intrinsic.c: Fix and add comments, fix function declarations
1864 (OPTIONAL,REQUIRED): New symbols
1865 (add_functions,add_subroutines): Use symbols
1866 (gmp.h): Remove unused include
1868 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
1870 * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
1873 2004-11-24 Steven Bosscher <stevenb@suse.de>
1875 * options.c (gfc_post_options): Don't clear flag_inline_functions.
1877 2004-11-20 Steven G. Kargl <kargls@comcast.net>
1879 * check.c (gfc_check_getcwd_sub): Fix seg fault.
1881 * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
1882 gfc_check_unlink,gfc_check_unlink_sub): New functions
1883 * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
1884 * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
1885 exit to intrinsics symbol tables.
1886 * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
1887 gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
1888 gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
1889 gfc_resolve_unlink_sub): Add and sort prototypes.
1890 * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
1891 gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
1892 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
1894 2004-11-16 Paul Brook <paul@codesourcery.com>
1897 * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
1898 (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
1899 * trans-types.c (gfc_get_dtype): Accept array type rather than element
1901 (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
1902 (gfc_get_array_type_bounds): Ditto.
1903 (gfc_get_derived_type): Recurse into derived type pointers.
1904 * trans-types.h (gfc_get_dtype): Add prototype.
1905 * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
1907 2004-11-15 Paul Brook <paul@codesourcery.com>
1909 * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
1911 2004-11-10 Paul Brook <paul@codesourcery.com>
1914 * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
1915 * trans-io.c (transfer_array_component): Ditto.
1917 2004-11-10 Paul Brook <paul@codesourcery.com>
1919 * invoke.texi: Fix typo.
1921 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
1923 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
1924 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
1925 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
1926 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
1927 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
1929 2004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1932 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
1934 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
1936 * gfortranspec.c: Replace GNU CC with GCC.
1938 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1940 * gfortranspec.c (lang_specific_driver): Change year to 2004.
1942 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1945 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
1948 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1951 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
1952 module procedures as if they were module variables.
1954 2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1959 * module.c (write_symbol1): Set module_name for dummy arguments.
1961 2004-11-02 Paul Brook <paul@codesourcery.com>
1963 * intrinsic.c (check_intrinsic_standard): Include error locus.
1965 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
1966 locus to check_intrinsic_standard.
1968 2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
1971 * gfortran.h: Change GFC_STD_* flags to more appropriate
1972 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
1973 gfc_option_t): Add field for warning about use of nonstandard
1975 * intrinsic.c (add_sym): Add parameter for standard version, check
1976 this against current standard.
1977 (add_sym_0): Pass standard parameter to add_sym.
1978 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
1979 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
1980 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
1981 (make_generic): Add parameter for standard, check this
1982 against currently selected standard.
1983 (add_functions, add_subroutines): Add parameter to tell which
1984 standard an intrinsic belongs to.
1985 (check_intrinsic_standard): New function.
1986 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
1987 (gfc_intrinsic_sub_interface): Ditto.
1988 * lang.opt: Add Wnonstd-intrinsics option.
1989 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
1991 (set_Wall): Add warning about nonstd intrinsics.
1992 (gfc_handle_option): Change to use new GFC_STD_* flags,
1994 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
1996 2004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
1998 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
2000 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2002 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
2004 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2006 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
2009 2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
2011 * check.c (gfc_check_rand): Allow missing optional argument.
2012 (gfc_check_irand): Ditto.
2013 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
2015 2004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
2017 PR fortran/13490, PR fortran/17912
2018 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
2019 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
2020 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
2021 warning when compiling with pedantic.
2022 * gcc/fortran/arith.c: Set minimum integer values to reflect
2023 realities of two's complement signed integers. Added
2026 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
2028 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
2029 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
2032 2004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2034 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
2036 (gfc_generate_function_code): Fix formatting issue.
2038 2004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2040 * module.c: Fix formatting issues.
2042 2004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2044 * module.c (mio_interface_rest): Set where member of interface
2047 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
2050 * options.c (gfc_handle_option): Add break after handing the
2053 2004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
2055 * arith.c: Fix formatting issues.
2057 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2060 * resolve.c (resolve_operator): Use correct operator name in message.
2062 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2064 * primary.c (match_boz_constant): Allow kind parameter suffixes.
2065 Move standard warning further to the front.
2067 2004-10-07 Kazu Hirata <kazu@cs.umass.edu>
2069 * trans-stmt.c: Fix a comment typo.
2071 2004-10-07 Paul Brook <paul@codesourcery.com>
2074 * trans-array.c (gfc_trans_deferred_array): Leave use associated
2077 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2080 * simplify.c (twos_complement): New function.
2081 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
2083 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
2085 2004-10-06 Paul Brook <paul@codesourcery.com>
2087 * trans-stmt.c (gfc_trans_simple_do): New function.
2088 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
2089 loop. Update comments.
2091 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2094 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
2098 * intrinsic.c (add_sym_5): Remove.
2099 (add_subroutines): Add resolution function for MVBITS.
2100 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
2102 * iresolve.c (gfc_resolve_mvbits): New function.
2103 (gfc_resolve_random_number): Remove empty line at end of function.
2105 * trans-const.c (gfc_build_cstring_const): New function.
2106 (gfc_init_cst): Use new function.
2107 * trans-const.h (gfc_build_cstring_const): Add prototype.
2108 * trans-io.c (set_string, set_error_locus): Use new function.
2109 * trans-stmt.c (gfc_trans_goto): Use new function.
2112 * parse.c (accept_statement): Don't treat END DO like END IF and
2114 (parse_do_block): Generate possible END DO label inside END DO
2118 * check.c (gfc_check_system_sub): New function.
2119 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
2120 * intrinsic.c (add_functions): Add 'system'.
2121 (add_subroutines): Add 'system'.
2122 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
2123 Move prototypes to other suborutines.
2124 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
2126 (gfc_resolve_system_clock): Fix formatting of prototype.
2127 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
2129 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
2132 2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
2134 * scanner.c (preprocessor_line): Accept preprocessor lines without
2135 file names. Check file names for closing quotes. Handle escaped
2136 quotes in file names.
2138 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2139 Paul Brook <paul@codesourcery.com>
2141 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
2142 Use gfc_get_expr_charlen.
2143 * trans-expr.c (gfc_get_expr_charlen): New function.
2144 * trans.h (gfc_get_expr_charlen): Add prototype.
2146 2004-10-04 Kazu Hirata <kazu@cs.umass.edu>
2148 * trans-intrinsic.c: Fix a comment typo.
2150 2004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2152 * simplify.c (range_check): Remove blank line at beginning of function.
2153 (gfc_simplify_dint): Same at end of function.
2154 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
2155 (gfc_simplify_bound): Fix indentation.
2156 (gfc_simplify_log10): Simplify calculation.
2157 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
2159 (gfc_simplify_nearest): Same at end of function.
2160 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
2162 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
2163 gfc_simplify_spacing): Simplify calulations.
2165 2004-10-03 Feng Wang <fengwang@nudt.edu.cn>
2167 * trans-intrinsic.c: Fix comments on spacing and rrspacing
2168 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
2170 2004-10-01 Jan Hubicka <jh@suse.cz>
2172 * f95-lang.c (gfc_expand_function): Update call of
2173 tree_rest_of_compilation.
2174 * trans-decl.c (gfc_generate_constructors): Likewise.
2176 2004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2178 * trans-intrinsic.c: Comment fixes.
2180 2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2182 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
2184 2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2186 * trans-types.c (gfc_return_by_reference): Remove superfluous
2189 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
2190 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
2193 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
2194 function to determine return type.
2196 2004-09-20 Jan Hubicka <jh@suse.cz>
2198 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
2200 (gfc_generate_function_code): Likewise.
2202 2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2205 * simplify.c (gfc_simplify_reshape): Set shape of return value
2208 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
2209 Zack Weinberg <zack@codesourcery.com>
2211 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
2212 enumeration constants.
2214 2004-09-17 Paul Brook <paul@codesourcery.com>
2216 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
2217 (gfc_linebuf_header_size): Define.
2218 * scanner.c (load_file): Use it.
2220 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
2222 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
2223 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
2224 resolve.c, scanner.c, trans-array.c, trans-array.h,
2225 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
2226 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
2227 trans.h: Fix comment typos. Follow spelling conventions.
2229 2004-09-16 Victor Leikehman <lei@il.ibm.com>
2232 * trans-io.c (transfer_array_component): New function.
2233 (transfer_expr): For array fields, call transfer_array_component.
2235 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
2237 * gfortran.texi: Fix a typo.
2239 2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
2241 * parse.c (eof_buf): Rename eof to eof_buf.
2242 (unexpected_eof): Same.
2243 (gfc_parse_file): Same.
2245 2004-09-15 Steven G. Kargl <kargls@comcast.net>
2247 * check.c (gfc_check_getcwd_sub): New function.
2248 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
2249 * intrinsic.c (add_functions): Add function definition;
2251 * intrinsic.c (add_subroutines): Add subroutine definitions.
2252 * intrinsic.h: Add prototypes.
2253 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
2255 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
2257 2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2260 * module.c (write_symbol): Don't fill in module name here.
2261 (write_symbol0): Fill in here instead.
2263 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
2265 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
2266 trans-array.c, trans-common.c, trans-expr.c,
2267 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
2268 comment typos. Follow spelling conventions.
2270 2004-09-09 Paul Brook <paul@codesourcery.com>
2272 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
2274 2004-09-08 Paul Brook <paul@codesourcery.com>
2276 * array.c: Don't include assert.h.
2277 * data.c: Don't include assert.h. Replace assert and abort with
2278 gcc_assert and gcc_unreachable.
2279 * dependency.c: Ditto.
2280 * f95-lang.c: Ditto.
2281 * iresolve.c: Ditto.
2283 * simplify.c: Ditto.
2285 * trans-array.c: Ditto.
2286 * trans-common.c: Ditto.
2287 * trans-const.c: Ditto.
2288 * trans-decl.c: Ditto.
2289 * trans-expr.c: Ditto.
2290 * trans-intrinsic.c: Ditto.
2291 * trans-io.c: Ditto.
2292 * trans-stmt.c: Ditto.
2293 * trans-types.c: Ditto.
2296 2004-09-07 Per Bothner <per@bothner.com>
2297 Paul Brook <paul@codesourcery.com>
2299 * error.c (show_locus): Handle mapped locations.
2300 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
2301 * gfortran.h: Include input.h.
2302 (struct gfc_linebuf): Use source_location.
2303 * scanner.c (get_file): Initialize linemap.
2304 (preprocessor_line): Pass extra argument to get_file.
2305 (load_file): Ditto. Setup linemap.
2306 (gfc_new_file): Handle mapped locations.
2307 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
2308 Set decl source locations.
2309 (gfc_trans_common): Set blank common block location.
2310 * trans-decl.c (gfc_set_decl_location): New function.
2311 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
2312 (trans_function_start): Move call to gfc_set_backend_locus..
2313 (build_function_decl): ... to here.
2314 (build_entry_thunks): Set and restore the backend locus.
2315 (gfc_generate_constructors): Remove excess arguments to
2316 init_function_start.
2317 (gfc_generate_block_data): Add comments. Set the decl locus.
2318 * trans-io.c (set_error_locus): Handle mapped locations.
2319 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
2320 (gfc_trans_code): Use SET_EXPR_LOCATION.
2321 (gfc_generate_code): Override the location of the new symbol.
2322 * trans.h (gfc_set_decl_location): Add prototype.
2324 2004-08-31 Paul Brook <paul@codesourcery.com>
2326 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
2328 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2331 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
2334 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2339 * resolve.c (resolve_transfer): New function.
2340 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
2342 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2345 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
2348 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2350 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
2352 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2355 * trans-types.c (gfc_return_by_reference): Remove TODO error,
2356 add comment pointing out possible issue WRT compatibility with g77.
2358 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2360 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
2361 all occurences of 'gfc_strlen_type_node' by
2362 'gfc_charlen_type_node'.
2363 * trans-types.h: Same. Also update comment accordingly.
2365 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2367 * primary.c: Update copyright boilerplate to say GCC.
2368 * f95-lang.c: Change initial comment to say gfortran.
2370 2004-08-31 Paul Brook <paul@codesourcery.com>
2372 * trans-types.h: Add comments.
2373 (intmax_type_node, string_type_node, const_string_type_node): Remove.
2375 2004-08-30 Richard Henderson <rth@redhat.com>
2377 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
2378 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
2379 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
2380 c_long, c_long_long.
2381 (gfc_logical_info): Add c_bool.
2382 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
2383 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
2384 rather than gfc_int[48]_type_node for allocate choice.
2385 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
2386 local copies of some kind type nodes.
2387 (gfc_build_builtin_function_decls): Likewise.
2388 * trans-expr.c (gfc_conv_power_op): Likewise.
2389 * trans-intrinsic.c (gfc_conv_intrinsic_index,
2390 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
2391 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
2392 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
2393 gfc_trans_character_select, gfc_trans_allocate): Likewise.
2394 * trans-io.c (gfc_pint4_type_node): Move into ...
2395 (gfc_build_io_library_fndecls): ... here. Cache local copies of
2396 some kind type nodes.
2397 * trans-types.c (gfc_type_nodes): Remove.
2398 (gfc_character1_type_node, gfc_strlen_type_node): New.
2399 (gfc_integer_types, gfc_logical_types): New.
2400 (gfc_real_types, gfc_complex_types): New.
2401 (gfc_init_kinds): Fill in real mode_precision.
2402 (gfc_build_int_type, gfc_build_real_type): New.
2403 (gfc_build_complex_type, gfc_build_logical_type): New.
2404 (c_size_t_size): New.
2405 (gfc_init_types): Loop over kinds.
2406 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
2407 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
2408 (gfc_get_character_type_len): Likewise.
2409 (gfc_type_for_size): Loop over kinds; use a reduced set of
2410 unsigned type nodes.
2411 (gfc_type_for_mode): Loop over kinds.
2412 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
2413 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
2414 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
2415 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
2416 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
2417 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
2418 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
2419 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
2420 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
2421 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
2422 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
2423 gfc_complex8_type_node, gfc_complex16_type_node,
2424 gfc_logical1_type_node, gfc_logical2_type_node,
2425 gfc_logical4_type_node, gfc_logical8_type_node,
2426 gfc_logical16_type_node, gfc_strlen_kind): Remove.
2427 (gfc_character1_type_node): Turn in to a variable.
2428 (gfc_strlen_type_node): Likewise.
2430 2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2432 * gfortran.h (gfc_namespace): Add new field is_block_data.
2433 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
2434 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
2435 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
2436 * trans.h (gfc_generate_block_data): Add prototype.
2437 * trans-decl.c (gfc_generate_block_data): New function.
2439 2004-08-29 Richard Henderson <rth@redhat.com>
2441 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
2442 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
2443 than two HOST_WIDE_INT.
2445 2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2448 * decl.c (free_variable, free_value, gfc_free_data, var_list,
2449 var_element, top_var_list, match_data_constant, top_val_list,
2450 gfc_match_data): Move here from match.c.
2451 (match_old_style_init): New function.
2452 (variable_decl): Match old-style initialization.
2453 * expr.c (gfc_get_variable_expr): New function.
2454 * gfortran.h (gfc_get_variable_expr): Add prototype.
2455 * gfortran.texi: Start documentation for supported extensions.
2456 * match.c: Remove the functions moved to decl.c.
2457 * match.h (gfc_match_data): Move prototype to under decl.c.
2458 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
2461 2004-08-29 Steven G. Kargl <kargls@comcast.net>
2462 Paul Brook <paul@codesourcery.com>
2464 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
2465 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
2466 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
2467 (build_builtin_fntypes): New function.
2468 (gfc_init_builtin_functions): Use it.
2469 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
2470 and GFC_ISYM_ERF{,C}.
2471 (gfc_c_int_kind): Declare.
2472 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
2473 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
2474 gfc_resolve_g77_math1): Add prototypes.
2475 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
2476 * mathbuiltins.def: Add comment. Change third argument. Use
2477 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
2478 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
2479 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
2480 * trans-types.c (gfc_c_int_kind): Declare.
2481 (gfc_init_kinds): Set it.
2483 2004-08-29 Steven G. Kargl <kargls@comcast.net>
2484 Paul Brook <paul@codesourcery.com>
2486 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
2487 (gfc_check_f, gfc_simplify_f): Add f0.
2488 * intrinsic.c (do_check): Call f0. Flatten.
2489 (add_sym_0): Fix prototype. Set f0.
2490 (add_functions): Add getgid, getgid and getuid.
2491 (resolve_intrinsic): Remove obsolete comment.
2492 (do_simplify): Call f0.
2493 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
2494 gfc_resolve_getuid): Add prototypes.
2495 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
2496 gfc_resolve_getuid): New functions.
2497 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
2500 2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2502 * error.c (gfc_error_init_1): Remove blank line in front of
2503 function body. Add missing blank.
2504 (gfc_buffer_error, error_char, error_string): Remove blank line in
2505 front of function body.
2506 (show_locus): Add comma in comment.
2507 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
2508 gfc_push_error, gfc_pop_error): Remove blank line in front of
2510 (gfc_get_errors): Typo fix in comment in front of function. Remove
2511 blank line in front of function body.
2513 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2515 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
2516 variable declaration of same name.
2517 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
2518 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
2519 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
2520 Replace all calls to gfc_default_*_kind with variable accesses.
2521 * trans-types.c: Same as above.
2522 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
2523 static qualifier. Replace all occurences.
2524 (gfc_default_*_kind): Remove functions.
2526 2004-08-26 Richard Henderson <rth@redhat.com>
2528 * arith.c: Include system.h, not real system headers.
2529 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
2530 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
2531 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
2532 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
2533 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
2534 gfc_index_integer_kind, gfc_default_integer_kind,
2535 gfc_default_real_kind,gfc_default_double_kind,
2536 gfc_default_character_kind, gfc_default_logical_kind,
2537 gfc_default_complex_kind, validate_integer, validate_real,
2538 validate_logical, validate_character,
2539 gfc_validate_kind): Move to trans-types.c.
2540 (gfc_set_model_kind): Use gfc_validate_kind.
2541 (gfc_set_model): Just copy the current precision to default.
2542 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
2543 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
2544 * gfortran.h: Update file commentary.
2545 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
2546 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
2547 gfc_default_double_kind_1, gfc_default_character_kind_1,
2548 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
2549 (gfc_init_kinds): New.
2550 (gfc_init_types): Don't set gfc_index_integer_kind here.
2551 * trans-types.h (gfc_init_kinds): Declare.
2552 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
2554 2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2556 * check.c (gfc_check_atan2): New function.
2557 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
2558 * intrinsic.h (gfc_check_atan2): Add prototype.
2560 2004-08-25 Richard Henderson <rth@redhat.com>
2562 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
2563 false and we don't validate the kind.
2564 (gfc_check_integer_range, gfc_check_real_range): Update to match.
2565 * check.c (kind_check): Likewise.
2566 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
2567 (match_char_spec, match_logical_spec): Likewise.
2568 * gfortran.h (gfc_validate_kind): Likewise.
2569 * options.c (gfc_handle_option): Likewise.
2570 * primary.c (match_integer_constant, match_real_constant,
2571 match_string_constant, match_logical_constant,
2572 match_const_complex_part): Likewise.
2573 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
2574 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
2575 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
2576 gfc_simplify_maxexponent, gfc_simplify_minexponent,
2577 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
2578 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
2579 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
2580 gfc_simplify_tiny): Likewise.
2581 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
2582 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
2583 prepare_arg_info): Likewise.
2585 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2587 * expr.c (gfc_check_assign): Add comment. Add new warning.
2588 * trans-expr.c (gfc_conv_function_call): Correctly dereference
2589 result of pointer valued function when not in pointer assignment.
2591 2004-08-25 Paul Brook <paul@codesourcery.com>
2593 * config-lang.in: Remove dead commented line.
2594 * module.c: Replace g95 with gfortran in comment.
2596 2004-08-25 Paul Brook <paul@codesourcery.com>
2599 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
2601 2004-08-25 Paul Brook <paul@codesourcery.com>
2604 * trans-array.c (gfc_trans_allocate_temp_array): Remove
2605 string_length argument.
2606 (gfc_trans_array_ctor_element): New function.
2607 (gfc_trans_array_constructor_subarray): Use it.
2608 (gfc_trans_array_constructor_value): Ditto. Handle constant
2610 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
2611 (gfc_trans_array_constructor): Use them.
2612 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
2613 (gfc_conv_ss_descriptor): Remember section string length.
2614 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
2615 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
2616 (gfc_conv_expr_descriptor): Ditto.
2617 (gfc_conv_loop_setup): Ditto. Spelling fixes.
2618 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
2619 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
2620 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
2621 (gfc_conv_variable): Set string_length from section.
2622 (gfc_conv_function_call): Remove extra argument.
2623 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
2624 * trans-types.c (gfc_get_character_type_len): New function.
2625 (gfc_get_character_type): Use it.
2626 (gfc_get_dtype): Return zero for internal types.
2627 * trans-types.h (gfc_get_character_type_len): Add prototype.
2628 * trans.h (struct gfc_ss): Move string_length out of union.
2630 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2632 * trans.h (build2_v, build3_v): New macros.
2634 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
2636 * trans-array.c (gfc_conv_descriptor_data,
2637 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
2638 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
2639 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
2640 gfc_trans_allocate_temp_array,
2641 gfc_trans_array_constructor_subarray,
2642 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
2643 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
2644 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
2645 gfc_conv_array_ref, gfc_trans_preloop_setup,
2646 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
2647 gfc_conv_loop_setup, gfc_array_init_size,
2648 gfc_conv_array_initializer, gfc_trans_array_bounds,
2649 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2650 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
2651 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
2652 of build and build_v as appropriate.
2653 * trans-common.c (create_common): Same.
2654 * trans-decl.c (gfc_trans_auto_character_variable,
2655 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
2656 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
2657 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
2658 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
2659 gfc_conv_expr_op, gfc_conv_function_call,
2660 gfc_trans_structure_assign): Same.
2661 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
2662 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
2663 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
2664 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
2665 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
2666 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
2667 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
2668 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
2669 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
2670 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
2671 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
2672 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
2673 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
2674 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
2675 gfc_conv_intrinsic_iargc): Same.
2676 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
2677 set_flag, add_case, io_result, transfer_namelist_element,
2678 transfer_expr): Same.
2679 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
2680 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
2681 gfc_trans_integer_select, gfc_trans_logical_select,
2682 gfc_trans_character_select, gfc_trans_forall_loop,
2683 gfc_trans_nested_forall_loop, gfc_do_allocate,
2684 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
2685 compute_inner_temp_size, compute_overall_iter_number,
2686 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
2687 gfc_trans_forall_1, gfc_evaluate_where_mask,
2688 gfc_trans_where_assign, gfc_trans_allocate): Same.
2689 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
2690 * trans.c (gfc_add_modify_expr, gfc_finish_block,
2691 gfc_build_array_ref, gfc_build_function_call,
2692 gfc_trans_runtime_check): Same.
2694 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2696 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
2697 build_int_cst to build_int_cst_wide in accordance to Nathan's
2700 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
2702 * trans-array.c (gfc_trans_array_constructor_value): Adjust
2703 build_int_cst calls.
2704 * trans-const.c (gfc_build_string_const, gfc_init_constants,
2705 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
2706 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
2707 gfc_trans_entry_master_switch): Likewise.
2708 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
2709 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
2710 * trans-io.c (add_case, set_error_locus,
2711 transfer_namelist_element, transfer_expr): Likewise.
2712 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
2713 gfc_trans_stop, gfc_trans_character_select): Likewise.
2714 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
2715 * trans.c (gfc_trans_runtime_check): Likewise.
2717 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2719 * trans-decl.c, trans-types.c: Add and remove blank lines as
2722 2004-08-24 Richard Henderson <rth@redhat.com>
2724 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
2726 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2728 * resolve.c (merge_argument_lists): Revert unintentionally
2731 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2733 * trans-decl.c (build_function_decl): Fix spelling in comment.
2734 (build_entry_thunks): Remove code with no function.
2735 (gfc_build_intrinsic_function_decls): Remove empty line.
2737 * resolve.c (resolve_entries): Fix a bunch of comment typos.
2739 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2741 * f95-lang.c (gfc_init_decl_processing): Adjust
2742 build_common_tree_nodes call.
2744 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2746 * trans-types.c: Spelling and formatting fixes.
2748 2004-08-23 Richard Henderson <rth@redhat.com>
2750 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
2751 of going through an intermediate string. Fix 32/64 int/long bug.
2753 2004-08-23 Eric Christopher <echristo@redhat.com>
2755 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
2756 usage. Use build_vector_type_for_mode for vector types.
2758 2004-08-22 Richard Henderson <rth@redhat.com>
2761 * data.c (find_con_by_offset): Search ordered list; handle
2762 elements with repeat counts.
2763 (gfc_assign_data_value_range): New.
2764 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
2765 (gfc_assign_data_value_range): Declare.
2766 * match.c (top_val_list): Extract repeat count into a temporary.
2767 * resolve.c (values): Make left unsigned.
2768 (next_data_value): Don't decrement left.
2769 (check_data_variable): Use gfc_assign_data_value_range.
2771 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2773 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
2775 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2777 * check.c (gfc_check_reduction): Rename to ...
2778 (check_reduction): ... this. Make static. Don't check type of
2780 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
2781 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
2782 SUM to use new check functions.
2783 (check_specific): Change logic to call new functions.
2784 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
2786 (gfc_check_reduction): Remove prototype.
2788 2004-08-20 Paul Brook <paul@codesourcery.com>
2789 Canqun Yang <canqun@nudt.edu.cn>
2792 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
2793 for automatic arrays.
2794 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
2796 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2800 * match.c (match_simple_forall, match_simple_where): Forward-declare.
2801 (gfc_match_if): Order statement list alphabetically, add WHERE and
2802 FORALL, remove double PAUSE.
2803 (gfc_match_simple_where, match_forall_header,
2804 gfc_match_simple_forall): New functions.
2805 (gfc_match_forall): Use match_forall_header.
2807 2004-08-19 Paul Brook <paul@codesourcery.com>
2810 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
2811 * symbol.c (gfc_clear_attr): Use memset.
2813 2004-08-19 Paul Brook <paul@codesourcery.com>
2817 * data.c (assign_substring_data_value): Remove.
2818 (create_character_intializer): New function.
2819 (gfc_assign_data_value): Track the typespec for the current
2820 subobject. Use create_character_intializer.
2822 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
2825 * check.c (gfc_check_reduction): New function.
2826 (gfc_check_minval_maxval): Removed.
2827 (gfc_check_product): Removed.
2828 (gfc_check_sum): Removed.
2829 * intrinsic.h: Add/remove declarations for these.
2830 * gfortran.h: Add field f3red to union gfc_check_f.
2831 * intrinsic.c (add_sym_3red): New function.
2832 (add_functions): Register maxval, minval, product, and sum intrinsics
2833 through add_sym_3red.
2834 (check_specific): Handle f3red union field.
2835 * iresolve.c: Whitespace change.
2837 2004-08-18 Paul Brook <paul@codesourcery.com>
2839 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
2841 2004-08-18 Victor Leikehman <lei@il.ibm.com>
2844 * trans-io.c (transfer_namelist_element): New. Recursively handle
2845 derived-type variables. Pass string lengths.
2846 (build_dt): Code moved to build_namelist, with some
2847 changes and additions.
2848 (gfc_build_io_library_fndecls): Declare the fifth
2849 argument in st_set_nml_var_char -- string_length.
2851 2004-08-17 Paul Brook <paul@codesourcery.com>
2852 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2855 * decl.c (get_proc_name): Update mystery comment.
2856 (gfc_match_entry): Check for errors earlier. Add entry point to list.
2857 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
2858 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
2859 (struct gfc_entry_list): Define.
2860 (gfc_get_entry_list): Define.
2861 (struct gfc_namespace): Add refs and entries.
2862 (enum gfc_exec_op): Add EXEC_ENTRY.
2863 (struct gfc_code): Add ext.entry.
2864 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
2865 (mio_symbol_attribute): Don't save/reture addr->entry.
2866 (mio_namespace_ref): Refcount namespaces.
2867 * parse.c (accept_statement): Handle ST_ENTRY.
2868 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
2869 (parse_contained): Fixup sibling references to entry points
2870 after parsing the procedure body.
2871 * resolve.c (resolve_contained_fntype): New function.
2872 (merge_argument_lists, resolve_entries): New functions.
2873 (resolve_contained_functions): Use them.
2874 (resolve_code): Handle EXEC_ENTRY.
2875 (gfc_resolve): Call resolve_entries.
2876 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
2877 * symbol.c (gfc_get_namespace): Refcount namespaces.
2878 (gfc_free_namespace): Ditto.
2879 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
2880 optional when multiple entry points are present.
2881 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
2882 (gfc_get_extern_function_decl): Add assertion. Fix coment.
2883 (create_function_arglist, trans_function_start, build_entry_thunks):
2885 (gfc_build_function_decl): Rename ...
2886 (build_function_decl): ... to this.
2887 (gfc_create_function_decl): New function.
2888 (gfc_generate_contained_functions): Use it.
2889 (gfc_trans_entry_master_switch): New function.
2890 (gfc_generate_function_code): Use new functions.
2891 * trans-stmt.c (gfc_trans_entry): New function.
2892 * trans-stmt.h (gfc_trans_entry): Add prototype.
2893 * trans-types.c (gfc_get_function_type): Add entry point argument.
2894 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
2895 (gfc_generate_module_code): Call gfc_create_function_decl.
2896 * trans.h (gfc_build_function_decl): Remove.
2897 (gfc_create_function_decl): Add prototype.
2899 2004-08-15 Andrew Pinski <apinski@apple.com>
2902 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
2903 for cabs{,f} and copysign{,f}.
2904 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
2905 (gfor_fndecl_math_cabs): Delete.
2906 (gfor_fndecl_math_sign4): Delete.
2907 (gfor_fndecl_math_sign8): Delete.
2908 (gfc_build_intrinsic_function_decls): Remove the
2909 initializing of cabs{,f} and copysign{,f} functions.
2910 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
2911 instead of the functions definitions.
2912 (gfc_conv_intrinsic_sign): Likewise.
2913 * trans.h (gfor_fndecl_math_cabsf): Delete.
2914 (gfor_fndecl_math_cabs): Delete.
2915 (gfor_fndecl_math_sign4): Delete.
2916 (gfor_fndecl_math_sign8): Delete.
2918 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
2920 * trans-array.c (gfc_trans_array_constructor_value): Use
2922 * trans-const.c (gfc_build_string_const,
2923 gfc_init_constants, gfc_conv_mpz_to_tree,
2924 gfc_conv_constant_to_tree): Likewise.
2925 * trans-decl.c (gfc_get_symbol_decl): Likewise.
2926 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
2927 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
2928 * trans-io.c (add_case, set_error_locus, build_dt,
2929 transfer_expr): Likewise.
2930 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
2931 gfc_trans_stop, gfc_trans_character_select): Likewise.
2932 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
2933 * trans.c (gfc_trans_runtime_check): Likewise.
2935 2004-08-14 Paul Brook <paul@codesourcery.com>
2937 * trans-decl.c (gfc_build_function_decl): Remove dead code.
2939 2004-08-14 Paul Brook <paul@codesourcery.com>
2941 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
2943 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2945 * gfortran.h: Add comments.
2946 * parse.c (parse_contained): Fix comment typo.
2947 * resolve.c (was_declared): Ditto.
2950 2004-08-11 Paul Brook <paul@codeourcery.com>
2953 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
2955 2004-08-10 Richard Henderson <rth@redhat.com>
2957 * f95-lang.c (gfc_init_builtin_functions): Remove
2958 __builtin_stack_alloc, add __builtin_alloca.
2959 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
2960 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
2962 2004-08-10 Paul Brook <paul@codesourcery.com>
2964 * trans-io.c (transfer_expr): Handle pointters.
2966 2004-08-10 Paul Brook <paul@codesourcery.com>
2969 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
2970 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
2971 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
2972 Handle GFC_SS_COMPONENT.
2973 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
2974 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
2976 (gfc_conv_array_initializer): Call specific initializer routines.
2977 * trans-expr.c (gfc_trans_structure_assign): New function.
2978 (gfc_trans_subarray_assign): New function.
2979 (gfc_trans_subcomponent_assign): New fucntion
2980 (gfc_conv_structure): Use them.
2981 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
2982 (gfc_ss): Add shape.
2984 2004-08-08 Victor Leikehman <lei@il.ibm.com>
2986 * simplify.c (gfc_simplify_shape): Bugfix.
2987 * expr.c (gfc_copy_shape_excluding): New function.
2988 * gfortran.h (gfc_get_shape): Bugfix.
2989 (gfc_copy_shape_excluding): Added declaration.
2990 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
2991 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
2992 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
2993 time resolution of shape.
2995 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
2997 * intrinsic.c (add_subroutines): Add getenv and
2998 get_environment_variable. (add_sym_5s): New function.
2999 * intrinsic.h (gfc_resolve_get_environment_variable): Add
3001 * iresolve.c (gfc_resolve_get_environment_variable): New
3004 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
3006 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
3007 __builtin_pow[f] arguments.
3009 2004-08-06 Steven G. Kargl <kargls@comcast.net>
3011 * arith.c: Add #define for model numbers. Remove global GMP variables.
3012 (natural_logarithm,common_logarithm,exponential,sine,
3013 cosine,arctangent,hypercos,hypersine ): Remove.
3014 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
3015 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
3016 gfc_check_real_range, gfc_constant_result, gfc_range_check,
3017 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
3018 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
3019 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
3020 gfc_convert_complex,gfc_int2real,gfc_int2complex,
3021 gfc_real2int,gfc_real2real,gfc_real2complex,
3022 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
3023 to MPFR, use new functions.
3024 * arith.h: Remove extern global variables.
3025 (natural_logarithm,common_logarithm,exponential, sine, cosine,
3026 arctangent,hypercos,hypersine): Remove prototypes.
3027 (arctangent2): Update prototype from GMP to MPFR.
3028 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
3029 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
3030 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
3031 * gfortran.h (GFC_REAL_BITS): Remove.
3032 (arith): Add ARITH_NAN.
3033 Include mpfr.h. Define GFC_RND_MODE.
3034 Rename GCC_GFORTRAN_H GFC_GFC_H.
3035 (gfc_expr): Convert GMP to MPFR.
3036 * module.c: Add arith.h, correct type in comment.
3037 (mio_gmp_real): Convert GMP to MPFR.
3038 (mio_expr): Use gfc_set_model_kind().
3039 * primary.c: Update copyright date with 2004.
3040 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
3041 * simplify.c: Remove global GMP variables
3042 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
3043 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
3044 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
3045 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
3046 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
3047 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
3048 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
3049 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
3050 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
3051 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
3052 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
3053 gfc_simplify_rrspacing,gfc_simplify_scale,
3054 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
3055 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
3056 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
3057 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
3059 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
3060 gfc_conv_mpf_to_tree. Convert it to use MPFR
3061 (gfc_conv_constant_to_tree): Use it.
3062 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
3063 * trans-intrinsic.c: Add arith.h, remove gmp.h
3064 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
3066 2004-08-06 Victor Leikehman <lei@il.ibm.com>
3067 Paul Brook <paul@codesourcery.com>
3069 * trans-array.c (gfc_trans_allocate_array_storage,
3070 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
3071 gfc_conv_loop_setup): For functions, if the shape of the result
3072 is not known in compile-time, generate an empty array descriptor for
3073 the result and let the callee to allocate the memory.
3074 (gfc_trans_dummy_array_bias): Do nothing for pointers.
3075 (gfc_conv_expr_descriptor): Use function return values directly.
3076 * trans-expr.c (gfc_conv_function_call): Always add byref call
3078 (gfc_trans_pointer_assignment): Add comments.
3079 (gfc_trans_arrayfunc_assign): Don't chain on expression.
3081 2004-08-01 Roger Sayle <roger@eyesopen.com>
3083 * options.c (gfc_init_options): Don't warn about the use GNU
3084 extensions by default.
3085 (gfc_post_options): Warn about GNU extensions with -pedantic.
3086 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
3088 2004-07-30 Richard Henderson <rth@redhat.com>
3090 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
3093 2004-07-25 Richard Henderson <rth@redhat.com>
3095 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
3096 and DECL_IGNORED_P on RESULT_DECL.
3097 (gfc_generate_constructors): Likewise.
3099 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3102 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
3104 (ffixed-line-length-80, ffixed-line-length-132): Remove.
3105 * options.c (gfc_handle_options): Deal with changed options.
3106 * scanner.c (load_line): Change second arg to 'char **',
3107 allocate if pointing to NULL. Keep track of buffer's length.
3108 Adapt buffer size to overlong lines. Pad lines to full length
3110 (load_file): Adapt to new interface of load_line.
3112 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
3114 * trans.h (builtin_function): Declare.
3116 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3119 (parts ported from g95)
3120 * parse.h (gfc_state_data): New field do_variable.
3121 (gfc_check_do_variable): Add prototype.
3122 * parse.c (push_state): Initialize field 'do_variable'.
3123 (gfc_check_do_variable): New function.
3124 (parse_do_block): Remember do iterator variable.
3125 (parse_file): Initialize field 'do_variable'.
3126 * match.c (gfc_match_assignment, gfc_match_do,
3127 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
3128 Add previously missing checks.
3129 (gfc_match_return): Reformat error message.
3130 * io.c (match_out_tag): New function.
3131 (match_open_element, match_close_element,
3132 match_file_element, match_dt_element): Call match_out_tag
3133 instead of match_vtag where appropriate.
3134 (match_io_iterator, match_io_element): Add missing check.
3135 (match_io): Reformat error message.
3136 (match_inquire_element): Call match_out_tag where appropriate.
3138 * parse.c (gfc_check_do_variable): Fix error locus.
3140 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3143 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
3144 for every assumed length character dummy argument.
3147 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
3150 * simplify.c (gfc_simplify_bound): Copy the bound expression.
3152 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3155 * trans-array.c gfc_trans_g77_array,
3156 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
3157 for assumed length characters.
3158 (gfc_conv_expr_descriptor): Set se->string_length if dealing
3159 with a character expression.
3160 (gfc_cvonv_array_parameter): Pass string length when passing
3161 character array according to g77 conventions.
3163 2004-07-12 Paul Brook <paul@codesourcery.com>
3165 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
3166 * trans-array.c (gfc_trans_auto_array_allocation): Remove
3167 initialization code.
3168 * trans-common.c (create_common): Use gfc_conv_initializer.
3169 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
3170 * trans-expr.c (gfc_conv_initializer): New function.
3171 (gfc_conv_structure): Use it.
3172 * trans.h (gfc_conv_initializer): Add prototype.
3174 2004-07-11 Paul Brook <paul@codesourcery.com>
3177 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
3179 (parse_contained): Mark contained symbols as referenced.
3181 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3184 * module.c (gfc_dump_module, gfc_use_module): Print locus
3185 when opening of module file fails.
3188 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
3191 * match.c (gfc_match_program): A program name is obligatory.
3192 (gfc_match_return): RETURN in main program is an extension.
3193 (gfc_match_block_data): A space is required before a block data
3197 * primary.c (match_boz_constant): Call gfc_notify_std only if
3198 we actually have a non-standard boz-literal-constant.
3201 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
3202 warning if assigning NULL().
3204 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
3206 * f95-lang.c (set_block): Remove.
3207 (gfc_clear_binding_stack): New.
3208 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
3209 (struct binding_level): Remove block_created_by_back_end.
3210 (clear_binding_level): Likewise.
3211 (poplevel): Don't handle block_created_by_back_end.
3213 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3215 * trans-decl.c (gfc_create_module_variable): Nothing to do if
3216 symbol is in common, because we ...
3217 (gfc_generate_module_vars): Call gfc_trans_common.
3219 2004-07-10 Paul Brook <paul@codesourcery.com>
3221 * trans-array.c (gfc_build_null_descriptor): New function.
3222 (gfc_trans_static_array_pointer): Use it.
3223 * trans-array.h (gfc_build_null_descriptor): Add prototype.
3224 * trans-expr.c (gfc_conv_structure): Handle array pointers.
3226 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3229 * decl.c (gfc_match_save): Use-associated common block
3231 * gfortran.h (gfc_common_head): Add new field 'name'.
3232 Fix typo in comment after #endif.
3233 * match.c (gfc_get_common): Add new argument from_common,
3234 mangle name if flag is set, fill in new field in structure
3236 (match_common): Set new arg in call to gfc_get_common,
3237 use-associated common block doesn't collide.
3238 * match.h (gfc_get_common): Adapt prototype.
3239 * module.c (load_commons): Set new arg in call to
3241 * symbol.c (free_common_tree): New function.
3242 (gfc_free_namespace): Call new function.
3243 * trans-common.c (several functions): Remove argument
3244 'name', use name from gfc_common_head instead.
3246 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3248 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
3249 and RHS match. Return early if the RHS is NULL().
3252 * match.c (match_common): Fix error reporting for used common.
3255 * trans-expr.c (gfc_conv_structure): Handle initialization
3256 of scalar pointer components.
3258 * parse.c (decode_statement): Fix matching of BLOCK DATA.
3260 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
3261 by fix for PR 15481.
3263 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3265 * trans-common.c: Fix whitespace issues, make variable names
3267 (create_common): Additionally, make loop logic more obvious.
3269 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3270 Paul Brook <paul@codesourcery.com>
3273 * trans-common.c (calculate_length): Remove ...
3274 (get_segment_info): Merge into here. Save field type.
3275 (build_field): Use saved type.
3276 (create_common, new_condition, new_segment, finish_equivalences):
3277 Use new get_segment_info.
3278 * trans-types.c: Update comment.
3280 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3283 * moduele.c (mio_symbol): Don't I/O initial values unless
3284 symbol is a parameter.
3286 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3289 * resolve.c (resolve_symbol): Verify that the shape of a
3290 parameter array is not only explicit, but also constant.
3291 * array.c (gfc_is_compile_time_shape): New function.
3292 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
3294 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3300 * module.c (write_symbol, write_symtree): Remove workaround.
3301 * primary.c (match_actual_arglist): Enhance comment.
3302 (gfc_match_rvalue): Handle function call with first argument
3303 a keyword argument correctly.
3304 * resolve.c (resolve_symbol): Change call to
3305 gfc_set_default_type to issue error if no implicit type
3307 * trans-decl.c (gfc_create_module_variable): Remove workaround.
3309 2004-07-08 Paul Brook <paul@codesourcery.com>
3311 * intrinsic.c (add_sym_4s): New function.
3312 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
3314 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
3315 Paul Brook <paul@codesourcery.com>
3319 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
3320 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
3321 * intrinsic.c (add_functions): Identify iargc. Add
3322 command_argument_count.
3323 (add_subroutines): Resolve getarg. Add get_command and
3324 get_command_argument.
3325 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
3326 gfc_resolve_get_command_argument): Add prototypes.
3327 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
3328 gfc_resolve_get_command_argument): New functions.
3329 * trans-decl.c (gfor_fndecl_iargc): New variable.
3330 (gfc_build_intrinsic_function_decls): Set it.
3331 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
3332 (gfc_conv_intrinsic_function): Use it.
3333 * trans.h (gfor_fndecl_iargc): Declare.
3335 2004-07-04 Matthias Klose <doko@debian.org>
3337 * Make-lang.in: Generate and install gfortran man page.
3338 * invoke.texi: Remove extra '@c man end'.
3340 2004-07-04 Richard Henderson <rth@redhat.com>
3342 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
3344 2004-07-04 Paul Brook <paul@codesourcery.com>
3346 * decl.c (gfc_match_implicit_range): Don't use typespec.
3347 (gfc_match_implicit): Handle character selectors.
3348 * gfortran.h (gfc_set_implicit): Remove prototype.
3349 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
3350 * parse.c (accept_statement): Don't call gfc_set_implicit.
3351 * symbol.c (new_ts): Remove.
3352 (gfc_set_implicit_none): Use same loop bounds as other functions.
3353 (gfc_set_implicit): Remove.
3354 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
3355 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
3357 2004-06-30 Richard Henderson <rth@redhat.com>
3359 * match.c (var_element): Remove unused variable.
3361 * trans-decl.c (gfc_generate_function_code): Don't set
3362 x_whole_function_mode_p.
3363 (gfc_generate_constructors): Likewise.
3365 2004-06-30 Richard Henderson <rth@redhat.com>
3367 * trans-decl.c (gfc_generate_function_code): Don't set
3368 immediate_size_expand.
3369 (gfc_generate_constructors): Likewise.
3371 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3374 * decl.c (gfc_match_type_spec): Rename second argument to
3375 'implicit_flag', reverse meaning. Don't match_char_spec if
3376 'implicit_flag' is set. Rename to ...
3377 (match_type_spec): ... this.
3378 (gfc_match_implicit_none, match_implicit_range): Move here
3380 (gfc_match_implicit): Move here from match.c, try to
3381 match_char_len if match_implicit_range doesn't succeed for
3382 CHARACTER implicits. Call renamed fucntion match_type_spec.
3383 (gfc_match_data_decl, match_prefix): Call renamed function
3385 * match.c (gfc_match_implicit_none, match_implicit_range,
3386 gfc_match_implicit): Move to decl.c.
3387 * match.h (gfc_match_implicit_none, gfc_match_implicit):
3388 Move protoypes to section 'decl.c'.
3389 (gfc_match_type_spec): Remove prototype.
3391 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3393 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
3396 2004-06-29 Steven Bosscher <stevenb@suse.de>
3398 Make sure types in assignments are compatible. Mostly mechanical.
3399 * trans-const.h (gfc_index_one_node): New define.
3400 * trans-array.c (gfc_trans_allocate_array_storage,
3401 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
3402 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
3403 gfc_conv_array_ubound, gfc_conv_array_ref,
3404 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
3405 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
3406 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
3407 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
3408 types in assignments, conversions and conditionals for expressions.
3409 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
3410 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
3411 gfc_conv_function_call, gfc_trans_pointer_assignment,
3412 gfc_trans_scalar_assign): Likewise.
3413 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
3414 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
3415 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
3416 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
3417 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
3418 gfc_conv_allocated, gfc_conv_associated,
3419 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
3420 * trans-io.c (set_string): Likewise.
3421 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
3422 gfc_do_allocate, generate_loop_for_temp_to_lhs,
3423 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
3424 compute_overall_iter_number, gfc_trans_assign_need_temp,
3425 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
3426 gfc_evaluate_where_mask, gfc_trans_where_assign,
3427 gfc_trans_where_2): Likewise.
3428 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
3429 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
3431 * trans.c (gfc_add_modify_expr): Add sanity check that types
3432 for the lhs and rhs are the same for scalar assignments.
3434 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3436 * dump-parse-tree.c (show_common): New function.
3437 (gfc_show_namespace): Show commons.
3439 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3440 Andrew Vaught <andyv@firstinter.net>
3444 * decl.c (gfc_match_save): Adapt to new common structures,
3445 don't allow saving USE-associated common.
3446 * dump-parse-tree (gfc_show_attr): (saved_)common are not
3447 symbol attributes any longer.
3448 (gfc_show_symbol): Don't show old-style commons any longer.
3449 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
3451 * gfortran.h (symbol_attribute): Remove common and saved_common
3453 (gfc_symbol): Remove common_head element.
3454 (gfc_common_head): New struct.
3455 (gfc_get_common_head): New macro.
3456 (gfc_symtree): Add field 'common' to union.
3457 (gfc_namespace): Add field 'common_root'; change type of field
3458 'blank_common' to blank_common.
3459 (gfc_add_data): New prototype.
3460 (gfc_traverse_symtree): Expect a symtree as first argument
3461 instead of namespace.
3462 * match.c (gfc_get_common): New function.
3463 (match_common_name): Change to take char * as argument, adapt,
3464 fix bug with empty name.
3465 (gfc_match_common): Adapt to new data structures. Disallow
3466 redeclaration of USE-associated COMMON-block. Fix bug with
3468 (var_element): Adapt to new common structures.
3469 * match.h (gfc_get_common): Declare.
3470 * module.c: Add 2004 to copyright years, add commons to module
3471 file layout description.
3472 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
3473 for removed attributes.
3474 (mio_symbol): Adapt to new way of storing common relations.
3475 (load_commons): New function.
3476 (read_module): Skip common list on first pass, load_commons at
3478 (write_commons): New function.
3479 (write_module): Call write_commons().
3480 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
3481 functions related to removed attributes.
3482 (gfc_add_data): New function.
3483 (gfc_clear_attr): Don't set removed attributes.
3484 (gfc_copy_attr): Don't copy removed attributes.
3485 (traverse_symtree): Remove.
3486 (gfc_traverse_symtree): Don't traverse symbol
3487 tree of the passed namespace, but require a symtree to be passed
3488 instead. Unify with traverse_symtree.
3489 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
3491 (save_symbol): Remove setting of removed attribute.
3492 * trans-common.c (gfc_sym_mangled_common_id): Change to
3493 take 'char *' argument instead of 'gfc_symbol'.
3494 (build_common_decl, new_segment, translate_common): Adapt to new
3495 data structures, add new
3497 (create_common): Adapt to new data structures, add new
3498 argument name. Fix typo in intialization of derived types.
3499 (finish_equivalences): Add second argument in call to
3501 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
3502 (gfc_trans_common): Adapt to new data structures.
3503 * trans-decl.c (gfc_create_module_variables): Remove test for
3506 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3508 * io.c: Add 2004 to copyright years.
3510 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3511 Andrew Vaught <andyv@firstinter.net>
3513 * gfortran.h (gfc_gsymbol): New typedef.
3514 (gfc_gsym_root): New variable.
3515 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
3516 * parse.c (global_used): New function.
3517 (parse_block_data): Check for double empty BLOCK DATA,
3518 use global symbol table.
3519 (parse_module): Use global symbol table.
3520 (add_global_procedure, add_global_program): New functions.
3521 (gfc_parse_file): Use global symbol table.
3522 * symbol.c (gfc_gsym_root): New variable.
3523 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
3526 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3528 * module.c (mio_gmp_real): Correct writing of negative numbers.
3530 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3533 * expr.c (check_intrinsic_op): Allow comparison of characters.
3536 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3537 Andrew Vaught <andyv@firstinter.net>
3539 * decl.c (contained_procedure): New function.
3540 (match_end): Verify correctness of END STATEMENT in
3543 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3544 Andrew Vaught <andyv@firstinter.net>
3547 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
3548 (decode_statement): Enforce required space in free-form.
3550 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3552 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
3553 * trans-array.c (gfc_conv_descriptor_data): Add operand
3555 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
3556 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
3557 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
3558 * trans-common.c (create_common): Likewise.
3559 * trans-expr.c (gfc_conv_component_ref): Likewise.
3560 * trans-io.c (set_parameter_value): Likewise.
3561 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
3562 (transfer_expr): Likewise.
3563 * trans-decl.c (gfc_trans_auto_character_variable):
3564 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
3565 (gfc_gimplify_function): New function.
3566 (gfc_generate_function-code): Properly handle nested functions.
3567 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
3569 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
3572 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
3573 (gfc_resolve_inquire): Resolve the iolength tag. Return
3574 SUCCESS at end of function if no failure has occured.
3575 * resolve.c (resolve_code): Resolve if iolength is encountered.
3576 * trans-io.c: (ioparm_iolength, iocall_iolength,
3577 iocall_iolength_done): New variables.
3578 (last_dt): Add IOLENGTH.
3579 (gfc_build_io_library_fndecls ): Set iolength related variables.
3580 (gfc_trans_iolength): Implement.
3581 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
3583 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
3586 * scanner.c (load_line): Don't truncate preprocessor lines.
3587 Reformat error message.
3588 (preprocessor_line): Issue warning in case of malformed
3591 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3593 * resolve.c (resolve_symbol): Add comment in function body.
3594 (check_data_variable): Change type of mark to ar_type, adapt code
3597 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3599 * array.c (gfc_insert_constructor): Avoid redundant call to
3600 mpz_comp. Add 2004 to copyright years.
3602 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
3604 * trans.h (stmtblock_t): Change has_scope to unsigned int.
3606 2004-06-20 Steven G. Kargl <kargls@comcast.net>
3608 * arith.c (gfc_range_check): correct complex underflow.
3610 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3613 * match.c (match_case_selector): Call gfc_match_init_expr
3614 instead of gfc_match_expr.
3615 * resolve.c (validate_case_label_expr): No need to check for
3616 constant, since it wouldn't have been matched with the fix to
3619 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3622 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
3625 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3628 * trans-deecl.c (generate_local_decl): Do not issue warning for
3629 unused variables if they're use associated.
3631 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3632 Andrew Vaught <andyv@firstinter.net>
3635 * gfortran.h (gfc_check_f): Add new field f3ml.
3636 * check.c (gfc_check_minloc_maxloc): Take argument list instead
3637 of individual arguments, reorder if necessary.
3638 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
3639 * intrinsic.c (add_sym_3ml): New function.
3640 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
3641 (check_specific): Catch special case MINLOC, MAXLOC.
3643 2004-06-14 Paul Brook <paul@codesourcery.com>
3645 * intrinsic.c (add_sym_2s): Use correct function types.
3647 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3649 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
3650 * data.c (gfc_get_section_index): Remove dependency on trans.h.
3652 2004-06-12 Steven G. Kargl <kargls@comcast.net>
3654 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
3655 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
3656 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
3657 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
3658 * trans-intrinsic.c: Use symbols.
3659 * intrinsic.c (add_sym_2s): New function.
3660 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
3661 * intrinsic.h: Function prototypes.
3662 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
3663 gfc_resolve_srand): New functions.
3665 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3668 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
3669 contained procedure.
3671 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3674 * interface.c (compare_parameter, compare_actual_formal): Don't
3675 check types and array shapes for NULL()
3676 * trans-expr.c (conv_function_call): No double indirection for
3679 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
3681 * trans-expr.c (gfc_conv_cst_int_power): Compute
3682 x**(-n) by converting it to (1/x)**n instead of
3685 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3688 * module.c (write_symbol, write_symtree): Don't write symbols
3689 wrongly added to namespace.
3690 * trans-decl.c (gfc_create_module_variable): Don't create a
3691 backend decl for a symbol incorrectly added to namespace.
3693 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3696 * resolve.c (resolve_symbol): Verify that parameter array has an
3697 explicit shape. Fix typos and coding style issues in surrounding
3700 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3703 * gfortran.texi: The documentation doesn't contain infomration on
3704 how to report bugs, and shouldn't, so remove the line which
3707 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3709 * intrinsic.c (sort_actual): Keep track of type of missing
3710 arguments. (Missing from previous commit.)
3712 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3714 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
3715 * interface.c (compare_actual_formal): Keep type of omitted
3717 * trans-expr.c (gfc_conv_function_call): Add string length
3718 argument for omitted string argument.
3720 2004-06-03 Paul Brook <paul@codesourcery.com>
3722 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
3723 lists instead of compound expr chains.
3724 (gfc_trans_code): Annotate statement lists.
3726 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3728 * trans-array.c: Fix spelling in comments.
3730 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3733 * data.c (assign_substring_data_value): New function.
3734 (gfc_assign_data_value): Call the new function if we're dealing
3735 with a substring LHS.
3737 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3740 * gfortran.h (GFC_VERSION): Remove.
3741 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
3744 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3746 * trans-types.c: Fix spelling & layout in comments.
3748 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3751 * trans-const.c (gfc_conv_string_init): Allow variable string
3752 length lower than initialization string length.
3754 2004-05-30 Paul Brook <paul@codesourcery.com>
3757 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
3758 * trans-expr.c (gfc_trans_string_copy): New function.
3759 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
3761 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
3762 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
3763 * trans.h (struct gfc_saved_var): Define.
3764 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
3766 2004-05-30 Steven G. Kargl <kargls@comcast.net>
3768 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
3770 2004-05-29 Steven G. Kargl <kargls@comcast.net>
3772 * simplify.c (gfc_simplify_log): Remove useless line of code.
3774 2004-05-29 Paul Brook <paul@codesourcery.com>
3776 * trans-common.c (find_equivalence): Find multiple rules.
3778 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3780 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
3781 (gfc_current_locus): Declare new global variable.
3782 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
3783 (gfc_current_locus1): Rename ...
3784 (gfc_current_locus): ... to this.
3785 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
3786 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
3787 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
3788 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
3789 and gfc_current_locus(), respectively.
3790 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
3791 match_array_cons_element, gfc_match_array_constructor):
3792 Read/modify gfc_current_locus instead of calling gfc_set_locus()
3793 and gfc_current_locus().
3794 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
3795 match_attr_spec, gfc_match_function_decl, gfc_match_end,
3796 attr_decl1, gfc_match_save): Likewise.
3797 * error.c (error_print, gfc_internal_error): Likewise.
3798 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
3799 * interface.c (gfc_add_interface): Likewise.
3800 * io.c (gfc_match_format, match_dt_format, match_dt_element,
3801 match_io_iterator, match_io): Likewise.
3802 * match.c (gfc_match_space, gfc_match_eos,
3803 gfc_match_small_literal_int, gfc_match_st_label,
3804 gfc_match_strings, gfc_match_name, gfc_match_iterator,
3805 gfc_match_char, gfc_match, gfc_match_assignment,
3806 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
3807 gfc_match_nullify, gfc_match_call, match_implicit_range,
3808 gfc_match_implicit, gfc_match_data, match_case_selector,
3809 gfc_match_case, match_forall_iterator): Likewise.
3810 * matchexp.c (gfc_match_defined_op_name, next_operator,
3811 match_level_1, match_mult_operand, match_ext_mult_operand,
3812 match_add_operand, match_ext_add_operand, match_level_2,
3813 match_level_3, match_level_4, match_and_operand, match_or_operand,
3814 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
3815 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
3816 * parse.c (match_word, decode_statement, next_free, next_fixed,
3817 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
3819 * primary.c (match_digits, match_integer_constant,
3820 match_boz_constant, match_real_constant, match_substring,
3821 next_string_char, match_charkind_name, match_string_constant,
3822 match_logical_constant, match_const_complex_part,
3823 match_complex_constant, match_actual_arg, match_keyword_arg,
3824 gfc_match_actual_arglist, gfc_match_structure_constructor,
3825 gfc_match_rvalue, gfc_match_variable): Likewise.
3826 * st.c (gfc_get_code): Likewise.
3827 * symbol.c (check_conflict, check_used, check_done,
3828 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
3829 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
3830 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
3832 2004-05-26 Roger Sayle <roger@eyesopen.com>
3834 * io.c (format_asterisk): Silence compiler warnings by correcting
3835 the number of elements of a "locus" initializer.
3837 2004-05-25 Roger Sayle <roger@eyesopen.com>
3840 * matchexp.c: Allow unary operators after arithmetic operators
3842 (match_ext_mult_operand, match_ext_add_operand): New functions.
3843 (match_mult_operand): Tweak to call match_ext_mult_operand.
3844 (match_add_operand): Tweak to call match_ext_mult_operand.
3845 (match_level_2): Rearrange to call match_ext_add_operand.
3847 2004-05-25 Paul Brook <paul@codesourcery.com>
3849 * expr.c (check_inquiry): Remove bogus tests.
3851 2004-05-23 Paul Brook <paul@codesourcery.com>
3854 * expr.c (restricted_args): Remove redundant checks/argument.
3855 (external_spec_function): Update to match.
3856 (restricted_intrinsic): Rewrite.
3858 2004-05-23 Paul Brook <paul@codesourcery.com>
3859 Victor Leikehman <lei@haifasphere.co.il>
3861 * gfortran.h (struct gfc_symbol): Add equiv_built.
3862 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
3864 (current_length): Remove.
3865 (add_segments): New function.
3866 (build_equiv_decl): Create initialized common blocks.
3867 (build_common_decl): Always add decl to bindings.
3868 (create_common): Create initializers.
3869 (find_segment_info): Reformat to match coding conventions.
3870 (new_condition): Use add_segments.
3871 (add_condition, find_equivalence, add_equivalences): Move iteration
3872 inside functions. Only process each segment once.
3873 (new_segment, finish_equivalences, translate_common): Simplify.
3875 2004-05-23 Steven G. Kargl <kargls@comcast.net>
3877 * check.c (gfc_check_random_seed): Issue for too many arguments.
3879 2004-05-22 Steven G. Kargl <kargls@comcast.net>
3881 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
3883 2004-05-22 Paul Brook <paul@codesourcery.com>
3885 * dump-parse-tree.c (gfc_show_equiv): New function.
3886 (gfc_show_namespace): Use it.
3888 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
3891 * symbol.c (gfc_add_common): Disable checks to work around other more
3892 fundamental inadequacies.
3894 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3896 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
3898 (gfc_build_function_decl): Likewise.
3900 2004-05-22 Steven G. Kargl <kargls@comcast.net>
3902 * check.c (gfc_check_system_clock): New function.
3903 * intrinsic.c (add_sym_3s): New function.
3904 (add_subroutines): Use it.
3905 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
3907 * iresolve.c (gfc_resolve_system_clock): New function.
3909 2004-05-22 Steven G. Kargl <kargls@comcast.net>
3911 * invoke.texi: Document -Wunderflow and spell check.
3912 * lang.opt: Add Wunderflow.
3913 * gfortran.h (gfc_option_t): Add warn_underflow option.
3914 * options.c (gfc_init_options, set_Wall): Use it.
3915 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
3916 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
3917 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
3918 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
3919 * arith.c (common_logarithm): Fix typo in comment.
3921 2004-05-21 Roger Sayle <roger@eyesopen.com>
3923 * io.c (check_format): As a GNU extension, allow the comma after a
3924 string literal to be optional in a format. Use gfc_notify_std to
3925 issue an error/warning as appropriate.
3927 2004-05-21 Roger Sayle <roger@eyesopen.com>
3929 * io.c (check_format): Use gfc_notify_std to determine whether to
3930 issue an error/warning for omitting the digits from the X format.
3932 2004-05-20 Roger Sayle <roger@eyesopen.com>
3934 * io.c (check_format): Allow the number before the X format to
3935 be optional when not -pedantic.
3937 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
3938 Paul Brook <paul@codesourcery.com>
3940 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
3941 Create decls for __builtin_pow{,f}.
3942 * gfortran.h (PREFIX_LEN): Define.
3943 * trans-decl.c (gfor_fndecl_math_powi): Add.
3944 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
3945 (gfc_build_intrinsic_function_decls): Create decls for powi.
3946 * trans-expr.c (powi_table): Add.
3947 (gfc_conv_integer_power): Remove.
3948 (gfc_conv_powi): New function.
3949 (gfc_conv_cst_int_power): New function.
3950 (gfc_conv_power_op): Use new powi routines.
3951 * trans.h (struct gfc_powdecl_list): Add.
3952 (gfor_fndecl_math_powi): Add.
3953 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
3955 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3957 * trans.c, trans-decl.c: Fix comment typos.
3959 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3961 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
3963 2004-05-18 Steve Kargl <kargls@comcast.net>
3965 * arith.c (gfc_int2complex): Fix incorrect range checking.
3967 2004-05-18 Paul Brook <paul@codesourcery.com>
3970 * decl.c (add_init_expr_to_sym): Remove incorrect check.
3971 (default_initializer): Move to expr.c.
3972 (variable_decl): Don't assign default initializer to variables.
3973 * expr.c (gfc_default_initializer): Move to here.
3974 * gfortran.h (gfc_default_initializer): Add prototype.
3975 * resolve.c (resolve_symbol): Check for illegal initializers.
3976 Assign default initializer.
3978 2004-05-17 Steve Kargl <kargls@comcast.net>
3980 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
3982 2004-05-17 Steve Kargl <kargls@comcast.net>
3984 * arith.c (gfc_real2complex): Range checking wrong part of complex
3987 2004-05-16 Paul Brook <paul@codesourcery.com>
3989 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
3991 2004-05-16 Paul Brook <paul@codesourcery.com>
3993 * arith.c (gfc_range_check): Fix logic error.
3995 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
3997 * arith.c: Fix comment typos.
3999 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4002 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
4003 not initialized in a disallowed fashion.
4004 * match.c (gfc_match_common): Likewise.
4005 (var_element): Verify that variable is not in the blank COMMON,
4006 if it is in a common.
4008 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
4010 * Make-lang.in (f95.generated-manpages): Remove.
4011 (f95.srcextra): New.
4012 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
4013 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
4016 (f95.install-info): Remove.
4017 (install-info): New.
4019 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
4021 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
4023 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4025 * primary.c (match_boz_constant): Use gfc_notify_std() for
4026 issuing a warning or an error.
4028 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4031 * primary.c (match_structure_constructor): Rename ...
4032 (gfc_match_structure_constructor): ... to this. Make non-static.
4033 (gfc_match_rvalue): Call renamed function.
4034 * match.h (gfc_match_structure_constructor): Declare.
4035 * match.c (gfc_match_data_constant): Handle structure
4038 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4042 * gfortran.h (gfc_linebuf): New typedef.
4044 (gfc_file): Revamped, use new gfc_linebuf.
4045 (locus): Revamped, use new types.
4046 (gfc_current_file): Remove.
4047 (gfc_current_form, gfc_source_file): New global variables.
4048 * match.c (gfc_match_space, gfc_match_strings): Use
4049 gfc_current_form to find source form.
4050 * module.c (gfc_dump_module): Use gfc_source_file when printing
4052 * error.c (show_locus, show_loci) Use new data structures to print
4054 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
4056 (file_head, current_file, gfc_current_form, line_head, line_tail,
4057 gfc_current_locus1, gfc_source_file): New global variables.
4058 (gfc_scanner_init1): Set new global variables.
4059 (gfc_scanner_done1): Free new data structures.
4060 (gfc_current_locus): Return pointer to gfc_current_locus1.
4061 (gfc_set_locus): Set gfc_current_locus1.
4062 (gfc_at_eof): Set new variables.
4063 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
4064 to new locus structure.
4065 (gfc_check_include): Remove.
4066 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
4067 (gfc_skip_comments): Use gfc_current_form, find locus with
4069 (gfc_next_char): Use gfc_current_form.
4070 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
4071 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
4073 (get_file): New function.
4074 (preprocessor_line, include_line): New functions.
4075 (load_file): Move down, rewrite to match new data structures.
4076 (gfc_new_file): Rewrite to match new data structures.
4077 * parse.c (next_statement): Remove code which is now useless. Use
4078 gfc_source_form and gfc_source_file where appropriate.
4079 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
4080 when determining locus of frontend code.
4081 * trans-io.c (set_error_locus): Same.
4082 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
4083 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
4085 (all): Add missing initializers.
4087 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4089 * Make-lang.in (trans-common.o): Remove redundant dependency.
4090 (data.c): Replace object file name ...
4091 (data.o): ... by the correct one.
4093 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4095 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
4096 for ranges when dumping array references.
4098 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
4100 * decl.c (variable_decl): Always apply default initializer.
4102 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4105 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
4106 handle zero correctly.
4108 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4110 * match.c (gfc_match): Eliminate dead code.
4112 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4114 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
4115 Detect bad continuation line in fixed form sources.
4117 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4120 * iresolve.c (gfc_resolve_nearest): Add new function.
4121 * intrinsic.h: ... declare it here.
4122 * intrinsic.c (add_functions): ... add it as resolving function
4125 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4128 * match.c (gfc_match_do): Allow infinite loops with
4129 label-do-stmt. Do not enforce space after comma.
4131 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4134 * parse.c (parse_interface): Allow empty INTERFACE, remove
4137 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4139 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
4140 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
4141 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
4142 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
4143 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
4144 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
4145 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
4146 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
4147 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
4148 trans-types.h, trans.c, trans.h: Update copyright years and
4150 * data.c: Likewise, also removed two whitespace-only lines.
4151 * gfortranspec.c, lang.opt: Update copyright years.
4153 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4156 * trans-decl.c (generate_local_decl): Don't warn for unused
4157 variables which are in common blocks.
4159 2004-05-13 Diego Novillo <dnovillo@redhat.com>
4161 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
4162 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
4163 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
4165 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
4168 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
4170 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
4172 * gfortran.texi: Use @table @emph instead of @itemize @emph.
4173 Remove "set DEVELOPMENT".
4174 (Compiling GFORTRAN): Remove.
4176 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4178 * array.c (match_subscript, match_array_ref): Add comments
4179 explaining argument 'init'.
4180 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
4181 trans-expr.c, trans.c: Fix some typos in comments.
4182 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
4183 * primary.c (match_digits, match_integer_constant): Add comment
4184 explaining signflag.
4186 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4189 * primary.c: Include system.h and flags.h, needed for pedantic.
4190 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
4193 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4196 * match.c (match_data_constant): Handle case where
4197 gfc_find_symbol sets sym to NULL
4199 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4201 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
4202 dependency on mathbuiltins.def
4204 2004-04-24 Victor Leikehman <lei@il.ibm.com>
4206 * trans-io.c (transfer_expr): Implemented recursive printing
4209 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
4211 * gfortranspec.c: Do not include multilib.h.
4213 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4215 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
4216 2004 to copyright years.
4217 * trans-expr.c, trans-decl.c: Comment update, we now generate
4218 GENERIC, not SIMPLE. Add 2004 to copyright years.
4220 2004-04-24 Paul Brook <paul@codesourcery.com>
4222 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
4224 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
4227 * arith.c (gfc_arith_divide): Fix complex divide.
4229 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
4231 * gfortranspec.c: Include the target headers.
4233 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
4237 * arith.c (arctangent2): New function.
4238 * arith.h (arctangent2): Add function prototype.
4239 * simplify.c (gfc_simplify_atan2): Use it.
4240 (gfc_simplify_log): Use it.
4242 2004-04-12 Diego Novillo <dnovillo@redhat.com>
4244 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
4245 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
4247 2004-04-11 Bud Davis <bdavis9659@comcast.net>
4250 * trans-io.c (build_dt): Change REC to value.
4252 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
4255 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
4256 the real value when converting mpf to string.
4258 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
4261 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
4264 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
4267 * simplify.c (simplify_min_max): Convert the type of the result.
4269 2004-04-11 Paul Brook <paul@codesourcery.com>
4271 * gfortran.texi: Use full target triplet.
4273 2004-04-11 Paul Brook <paul@codesourcery.com>
4275 * Make-lang.in (GFORTRAN_TEXI): Set it.
4276 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
4277 (fortran/gfortran.info): Ditto.
4278 * gfortran.texi: Major update.
4279 * invoke.texi: New file.
4281 2004-04-10 Paul Brook <paul@codesourcery.com>
4283 * trans-array.c (gfc_trans_allocate_temp_array,
4284 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
4285 * trans-decl.c (gfc_build_dummy_array_decl,
4286 gfc_get_symbol_decl, gfc_build_function_decl,
4287 gfc_create_module_variable): Ditto.
4288 * trans-expr.c (gfc_conv_variable): Ditto.
4289 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
4290 * trans.h (GFC_DECL_STRING): Remove.
4291 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
4292 GFC_DECL_ASSIGN): Renumber flags.
4294 2004-04-05 Paul Brook <paul@codesourcery.com>
4298 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
4300 * gfortran.h (struct gfc_charlen): Add backend_decl.
4301 * trans-array.c (gfc_trans_allocate_temp_array,
4302 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
4303 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
4304 Remove old, broken string handling.
4305 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
4306 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
4307 gfc_trans_deferred_array): Handle character arrays.
4308 * trans-const.c (gfc_conv_const_charlen): New function.
4309 * trans-const.h (gfc_conv_const_charlen): Add prototype.
4310 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
4312 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
4313 (gfc_create_string_length): New function.
4314 (gfc_get_symbol_decl): Create lengths for character variables.
4315 (gfc_get_fake_result_decl): Ditto.
4316 (gfc_build_function_decl): Only set length for assumed length
4317 character arguments.
4318 (gfc_trans_dummy_character): New function.
4319 (gfc_trans_auto_character_variable): Rewrite.
4320 (gfc_trans_deferred_vars): Handle more types of character variable.
4321 (gfc_create_module_variable): String lengths have moved.
4322 (gfc_generate_function_code): Initialize deferred var chain earlier.
4323 * trans-expr.c (gfc_conv_init_string_length): Rename ...
4324 (gfc_trans_init_string_length): ... to this.
4325 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
4326 gfc_conv_function_call): Update to new format for character variables.
4327 (gfc_conv_string_length): Remove.
4328 (gfc_conv_string_parameter): Update assertion.
4329 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
4330 * trans-io.c (set_string): Use new macro names.
4331 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
4332 * trans-types.c (gfc_get_character_type): Use existing length expr.
4333 (gfc_is_nodesc_array): Make public.
4334 (gfc_get_dtype_cst): Rename ...
4335 (gfc_get_dtype): ... to this. Handle unknown size arrays.
4336 (gfc_get_nodesc_array_type): Use new name.
4337 (gfc_sym_type): New character variable code.
4338 (gfc_get_derived_type): Ditto.
4339 (gfc_get_function_type): Evaluate character variable lengths.
4340 * trans-types.h (gfc_strlen_kind): Define.
4341 (gfc_is_nodesc_array): Add prototype.
4342 * trans.h: Update prototypes.
4343 (struct lang_type): Update comments.
4344 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
4345 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
4347 2004-04-04 Paul Brook <paul@codesourcery.com>
4349 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
4350 * options.c (gfc_init.options, gfc_handle_option): Ditto.
4351 * trans-expr.c (gfc_conv_function_call): Ditto.
4352 * trans-types.c (gfc_is_nodesc_array): Ditto
4353 * lang.opt (fg77-calls): Remove.
4355 2004-04-04 Paul Brook <paul@codesourcery.com>
4357 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
4358 (gfc_conv_descriptor_base): Rename ...
4359 (gfc_conv_descriptor_offset): ... to this.
4360 (gfc_trans_allocate_array_storage): Set offset to zero.
4361 (gfc_conv_array_base): Rename ...
4362 (gfc_conv_array_offset): ... to this.
4363 (gfc_conv_array_index_ref): Add offset parameter.
4364 (gfc_conv_array_ref): Include offset.
4365 (gfc_trans_preloop_setup): Use existing offset.
4366 (gfc_trans_allocate_temp_array, gfc_array_allocate,
4367 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
4368 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
4369 gfc_conf_ss_descriptor): Set offset.
4370 * trans-array.h: Rename prototypes.
4371 * trans-const.h (gfc_index_zero_node): Define.
4372 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
4373 * trans-types.c (gfc_get_array_type_bounds): Ditto.
4374 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
4376 2004-03-25 Diego Novillo <dnovillo@redhat.com>
4378 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
4380 2004-03-24 Bud Davis <bdavis9659@comcast.net>
4383 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
4384 before conversion by gmp library call.
4386 2004-03-24 Bud Davis <bdavis9659@comcast.net>
4389 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
4391 2004-02-24 Richard Henderson <rth@redhat.com>
4393 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
4395 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
4397 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
4398 (fortran/gfortran.info): ... to here.
4401 2004-02-16 Richard Henderson <rth@redhat.com>
4403 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
4404 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
4405 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
4406 (gfc_expand_function): Rename from expand_function_body, make static,
4407 don't do anything except invoke tree_rest_of_compilation.
4408 (gfc_be_parse_file): Invoke cgraph.
4409 (gfc_expand_decl): Remove.
4410 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
4411 __builtin_adjust_trampoline.
4412 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
4413 (gfc_finalize): New.
4414 (gfc_generate_function_code): Use it. Lower nested functions.
4415 * trans-expr.c (gfc_conv_function_call): Add static chain operand
4417 * trans.c (gfc_build_function_call): Likewise.
4418 * trans.h (expand_function_body): Remove.
4420 2004-02-15 Victor Leikehman <lei@il.ibm.com>
4423 * trans-decl.c (gfc_build_function_decl) For functions
4424 returning CHARACTER pass an extra length argument,
4425 following g77 calling conventions.
4426 * trans-types.c (gfc_get_function_type) Ditto.
4427 * trans-expr.c (gfc_conv_function_call) Ditto.
4429 2004-02-14 Paul Brook <paul@codesourcery.com>
4431 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
4433 2004-02-12 Paul Brook <paul@nowt.org>
4437 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
4439 * gfortran.texi: Fix typos.
4441 2004-02-07 Bud Davis <bdavis9659@comcast.net>
4444 * intrinsic.c (add_conversions) Use logical conversion instead
4446 * trans-types.c (gfc_get_logical_type) implemented logical*1
4449 2004-01-17 Paul Brook <paul@codesourcery.com>
4451 * lang-specs.h: Remove %<fixed-form.
4453 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
4455 * lang-specs.h: Enable preprocessing of source files
4456 ending in .F, .fpp, .FPP, .F90 and .F95.
4458 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
4461 * lang-specs.h: Enable compilation of files ending
4462 in .f, .for and .FOR.
4464 2004-01-11 Paul Brook <paul@codesourcery.com>
4466 * trans-stmt.c (gfc_trans_if_1): New function.
4467 (gfc_trans_if): Use it.
4469 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
4471 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
4472 (gfc_option_t): Add max_identifier_length.
4473 * lang.opt: Add fmax-identifier-length.
4474 * match.c (parse_name): Use limit.
4475 * options.c (gfc_init_options): Set max_identifier_length.
4476 (gfc_handle_option): Ditto.
4478 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
4480 * intrinsic.c (add_functions): Add resolve function to dcmplx.
4481 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
4482 * iresolve.c (gfc_resolve_dcmplx): New function.
4484 2004-01-10 Paul Brook <paul@codesourcery.com>
4486 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
4487 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
4488 (gfc_return_by_reference): Correct condition.
4489 (gfc_get_function_type): Ditto.
4491 2004-01-10 Paul Brook <paul@codesourcery.com>
4493 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
4496 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
4498 * iresolve.c: Use correct kind.
4500 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
4503 * trans-decl.c (gfc_create_module_variable): Output array valued
4506 2004-01-10 Paul Brook <paul@codesourcery.com>
4508 * resolve.c (resolve_branch): Get error message right way round.
4510 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
4512 * trans-array (gfc_conv_loop_setup): Adjust comment to track
4514 (gfc_array_allocate): Don't count size of element twice.
4516 2004-01-04 Paul Brook <paul@codesourcery.com>
4518 * lang.opt (i8, r8, std=*): Remove RejectNegative.
4520 2004-01-04 Paul Brook <paul@codesourcery.com>
4522 * error.c (gfc_notify_std): New function.
4523 * gfortran.h (gfc_notify_std): Declare.
4524 (GFC_STD_*): Define.
4525 (gfc_option_t): Add warn_std and allow_std.
4526 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
4527 (gfc_intrinsic_func_interface): Use gfc_notify_std.
4528 * check.c (check_rest): Use gfc_notify_std.
4529 * match.c (gfc_match_pause): Ditto.
4530 (gfc_match_assign): Ditto.
4531 (gfc_match_goto): Ditto.
4532 * resolve.c (resolve_branch): Ditto.
4533 * lang.opt: Add std=<foo> and w.
4534 * options.c (gfc_init_options): Set allow_std and warn_std.
4535 (gfc_handle_option): Handle OPT_std_* and OPT_w.
4537 2004-01-01 Paul Brook <paul@codesourcery.com>
4539 * array.c (gfc_append_constructor): Take constructor, not expression.
4540 * data.c (struct gfc_expr_stack): Remove.
4541 (expr_stack): Remove.
4542 (find_con_by_offset): Rename from find_expr_in_con.
4543 (find_con_by_component): Rename from find_component_in_con.
4544 (gfc_get_expr_stack): Remove.
4545 (gfc_assign_data_value): Rewrite.
4546 (gfc_expr_push): Remove.
4547 (gfc_expr_pop): Remove.
4548 (gfc_advance_section): Rename from
4549 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
4550 (gfc_get_section_index): Handle unbounded sections.
4551 * gfortran.h: Update prototypes.
4552 * resolve.c (check_data_variable): Array section maight not be the
4555 2004-01-01 Paul Brook <paul@codesourcery.com>
4558 * resolve.c (resolve_symbol): Allow assumed length function results.
4560 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
4562 * match.c (gfc_match_pause): Fix spelling.
4564 2004-01-01 Steven Bosscher <stevenb@suse.de>
4567 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
4568 reference from the expression.
4570 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
4572 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
4574 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
4575 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
4576 (symbol_attribute):New variable attribute: assign.
4577 * io.c (resolve_tag):Integer variable is allowed.
4578 (match_dt_format): Add ASSIGN statement. Set assign flag.
4579 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
4580 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
4581 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
4582 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
4583 (next_statement): Add ST_LABEL_ASSIGNMENT.
4584 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
4585 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
4586 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
4587 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
4588 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
4589 assign. Put them into the stuct lang_decl.
4590 * trans-io.c (set_string): Add the assign statement.
4591 * trans-stmt.c (gfc_trans_label_assign): New function.
4592 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
4593 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
4594 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
4595 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
4596 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
4597 (GFC_DECL_ASSIGN(node)): New macro to access flag.
4599 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
4602 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
4605 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
4607 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
4608 that arguments to subroutines/functions can't alias themselves, nor global
4611 2003-12-20 Steven Bosscher <stevenb@suse.de>
4613 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
4614 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
4616 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
4618 * primary.c (match_substring): Fix substring bug for start point
4619 or end point is NULL.
4620 * trans-expr.c (gfc_conv_substring): Ditto
4621 * trans-types.c (gfc_sym_type): Get correct type of scalar
4622 character variables.
4623 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
4626 2003-12-10 Richard Henderson <rth@redhat.com>
4628 * options.c (gfc_post_options): Don't ever use rtl inlining.
4630 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
4632 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
4633 * trans-equivalence.c: Remove.
4634 * trans-decl.c (gfc_get_symbol_decl): Update to match.
4635 (gfc_generate_function_code): Ditto.
4636 * trans-array.c (gfc_conv_array_parameter): Ditto.
4637 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
4638 (F95_ADDITIONAL_OBJS): Add stor-layout.o
4639 * trans.h (gfc_trans_equivalence): Remove.
4640 * gfortran.h (struct gfc_equiv): Add used field.
4641 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
4642 equiv_offset fields.
4644 2003-12-05 Richard Henderson <rth@redhat.com>
4646 * trans.c (gfc_build_addr_expr): New.
4647 (gfc_build_indirect_ref, gfc_build_array_ref): New.
4648 * trans.h: Declare them.
4649 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
4650 trans-stmt.c, trans.c (*): Use them.
4652 * f95-lang.c (gfc_post_options): Remove dead prototype.
4653 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
4654 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
4657 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
4659 * io.c (gfc_match_format): Check for missing format label.
4661 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
4664 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
4665 from interfaces in modules.
4667 2003-11-30 Paul Brook <paul@nowt.org>
4669 * trans-array.c (gfc_trans_g77_array): Make non-static.
4670 (gfc_trans_assumed_size): Remove.
4671 (gfc_trans_dummy_array_bias): Explicitly free temporary.
4672 * trans-array.h (gfc_trans_g77_array): Add prototype.
4673 (gfc_trans_assumed_size): Remove.
4674 * trans-decls.c (gfor_fndecl_push_context): Remove.
4675 (gfor_fndecl_pop_context): Remove.
4676 (gfc_build_function)decls): Don't create them.
4677 (gfc_trans_deferred_vars): Update to match. Remove dead code.
4678 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
4680 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
4682 * trans-array.c (gfc_conv_array_parameter): Simplify
4683 array argument passing for array name actual argument.
4684 * trans-expr.c (gfc_conv_function_call): Ditto
4685 * trans-types.c (gfc_is_nodesc_array):Ditto.
4687 2003-11-30 Paul Brook <paul@nowt.org>
4689 * f95-lang.c (gfc_post_options): Move ...
4690 * options.c (gfc_post_options): .. to here. Handle inlining options.
4691 * gfortran.h (gfc_post_options): Add prototype.
4693 2003-11-28 Richard Henderson <rth@redhat.com>
4695 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
4697 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
4699 * trans.h (has_alternate_specifier): New global variable.
4700 * match.c (gfc_match_call): Handle actual arguments associated with
4701 alternate return indicators.
4702 * trans-expr.c (gfc_conv_function_call): Ditto
4703 * trans-stmt.c (gfc_trans_call): Ditto
4704 (gfc_trans_return): Handle return statement with value.
4705 * trans-decl.c (gfc_generate_function_code): Handle functions with
4707 (gfc_get_fake_result_decl): Ditto
4708 * trans-types.c (gfc_get_function_type): Ditto
4709 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
4710 (resolve_formal_arglist): Check asterisk dummy.
4712 2003-11-27 Paul Brook <paul@nowt.org>
4714 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
4715 allocation interface.
4716 (gfc_conv_ array_parameter): Ditto.
4717 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
4718 * trans-array.c: Update prototype.
4719 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
4720 (gfc_trans_auto_character_variable): Use new memory alloc interface.
4721 * trans-expr.c (gfc_conv_string_tmp): Ditto.
4722 (gfc_conv_function_call): Use gfc_conv_string_tmp.
4723 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
4724 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
4725 * trans.h (gfc_ss_info): Remove unused pdata field.
4726 * trans.c (gfc_create_var_np): Change T to V.
4728 2003-11-26 Richard Henderson <rth@redhat.com>
4730 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
4731 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
4732 FRACTION, NEAREST, SET_EXPONENT.
4733 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
4734 Fix GTY marking. Remove unnecessary const's.
4735 (LIBM_FUNCTION): Rename from I_LIB.
4736 (LIBF_FUNCTION): New.
4737 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
4738 conventions. Assume the expr signature is correct. Mark const.
4739 (gfc_conv_intrinsic_exponent): Use library functions.
4740 (gfc_conv_intrinsic_set_exponent): Remove.
4741 (gfc_conv_intrinsic_scale): Remove.
4742 (gfc_conv_intrinsic_nearest): Remove.
4743 (gfc_conv_intrinsic_fraction): Remove.
4744 (gfc_conv_intrinsic_function): Update.
4745 * trans-decl.c (gfor_fndecl_math_exponent4): New.
4746 (gfor_fndecl_math_exponent8): New.
4747 (gfc_build_intrinsic_function_decls): Set them.
4748 * trans.h: Declare them.
4750 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
4752 * trans-common.c (gfc_layout_global_equiv): Locate the error for
4753 underflow COMMON block.
4754 (gfc_trans_one_common): Fix bug for size of COMMON block containing
4755 EQUIVALENCE object. Also fix typo in an error message.
4757 2003-11-25 Diego Novillo <dnovillo@redhat.com>
4759 * Make-lang.in: Add check-gfortran to lang_checks.
4760 (check-f95): Alias for check-gfortran.
4762 2003-11-25 Jason Merrill <jason@redhat.com>
4764 * Make-lang.in (f95.tags): Create TAGS.sub files in each
4765 directory and TAGS files that include them for each front end.
4767 2003-11-24 Paul Brook <paul@nowt.org>
4770 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
4772 2003-11-24 Paul Brook <paul@nowt.org>
4774 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
4776 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
4778 2003-11-24 Paul Brook <paul@nowt.org>
4781 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
4782 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
4784 2003-11-20 Richard Henderson <rth@redhat.com>
4786 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
4787 (gfc_conv_array_base): Likewise.
4788 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
4789 * trans-expr.c (gfc_conv_string_tmp): Likewise.
4790 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
4791 * trans-stmt.c (gfc_trans_character_select): Likewise.
4793 2003-11-13 Paul Brook <paul@nowt.org>
4795 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
4797 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
4799 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
4800 (resolve_equivalence): New function.
4801 (resolve_equivalence_derived): New function.
4803 2003-11-12 Richard Henderson <rth@redhat.com>
4805 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
4806 annotate_all_with_locus.
4808 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
4810 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
4811 * trans-decl.c (gfc_finish_var_decl): Modified.
4813 2003-11-08 Paul Brook <paul@nowt.org>
4816 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
4819 2003-11-06 Paul Brook <paul@nowt.org>
4821 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
4823 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
4825 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
4827 2003-10-27 Anthony Green <green@redhat.com>
4829 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
4830 (f95.stagefeedback): Ditto.
4832 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
4835 * Make-lang.in (f95.stageprofile): Add.
4836 (f95.stagefeedback): Add.
4838 2003-10-23 Richard Henderson <rth@redhat.com>
4840 * f96-lang.c (gfc_gimplify_expr): Remove.
4841 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
4842 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
4844 2003-10-23 Richard Henderson <rth@redhat.com>
4846 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
4848 2003-10-20 Paul Brook <paul@nowt.org>
4850 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
4851 * trans-stmt.c (gfc_trans_do_while): Ditto.
4853 2003-10-17 Paul Brook <paul@nowt.org>
4855 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
4857 2003-10-17 Paul Brook <paul@nowt.org>
4859 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
4861 2003-10-17 Feng Wang <wf_cs@yahoo.com>
4863 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
4864 (gfc_resolve_minloc): Ditto.
4865 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
4866 Return the value after subtracting the lower bound.
4868 2003-10-16 Richard Henderson <rth@redhat.com>
4870 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
4872 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
4874 * lang.c: Remove -M option for now, it's in the way for C.
4876 2003-10-14 Jason Merrill <jason@redhat.com>
4878 * Make-lang.in (f95.tags): New rule.
4880 2003-10-13 Richard Henderson <rth@redhat.com>
4882 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
4884 2003-10-13 Paul Brook <paul@nowt.org>
4886 * trans-decl.c (generate_local_decl): Don't create junk variables.
4888 2003-10-13 Paul Brook <paul@nowt.org>
4890 * resolve.c (resolve_formal_arglist): Use function result decl in
4891 preference to function decl.
4893 2003-10-12 Richard Henderson <rth@redhat.com>
4895 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
4896 TREE_READONLY. Update all callers.
4898 2003-10-12 Feng Wang <wf_cs@yahoo.com>
4900 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
4901 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
4902 (gfc_is_intrinsic_libcall): Add CSHIFT.
4904 2003-10-12 Richard Henderson <rth@redhat.com>
4906 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
4907 (gfc_trans_array_constructor_value): Likewise.
4908 (gfc_conv_array_initializer): Likewise.
4909 * trans-stmt.c (gfc_trans_character_select): Likewise.
4911 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
4913 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
4915 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
4917 * check.c (gfc_check_repeat): Check arguments are scalar.
4918 (gfc_check_trim): New function.
4919 * intrinsic.h (gfc_check_trim): Add prototype.
4920 * intrinsic.c (add_functions): Use it.
4921 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
4923 * trans-decl.c: Ditto.
4924 (gfc_build_intrinsic_fucntion_decls): Set them.
4925 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
4926 (gfc_conv_intrinsic_trim): New function.
4927 (gfc_conv_intrinsic_repeat): New function.
4928 (gfc_conv_intrinsic_function): Use them.
4930 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
4932 * trans-types.c (gfc_sym_type): Handle result variables.
4934 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
4936 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
4937 gfc_get_character_type.
4939 2003-10-11 Feng Wang <wf_cs@yahoo.com>
4941 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
4943 2003-10-11 Paul Brook <paul@nowt.org>
4945 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
4946 (gfc_resolve_dprod): New function.
4947 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
4948 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
4949 (gfc_resolve_dprod): Declare.
4950 * intrinsic.c (add_functions): Use them.
4951 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
4953 2003-10-06 Richard Henderson <rth@redhat.com>
4955 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
4956 * trans-intrinsic.c (call_builtin_clz): Use it.
4958 2003-10-05 Paul Brook <paul@nowt.org>
4960 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
4961 * trans-decl.c (gfc_generate_function_code): Set
4962 cfun->function_end_locus.
4964 2003-09-24 Jason Merrill <jason@redhat.com>
4966 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
4969 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
4970 Paul Brook <paul@nowt.org>
4972 * Make-lang.in (F95_OBJS): Add fortran/data.o.
4973 * array.c (gfc_inser_constructor): New function.
4974 (gfc_get_constructor): New function.
4975 (gfc_free_constructor): Initialize offset and repeat.
4976 (iterator_stack): Remove.
4977 (expand_info): Add offset, component and repeat fields.
4978 (expand_constructor): Set them.
4979 (expand): Set new fields.
4980 (gfc_copy_constructor): Ditto. Avoid recursion.
4981 * gfortran.h: Add prototypes for new functions.
4982 (gfc_constructor): Add offset, component and repeat.
4983 (iteratio_stack): Move to here.
4984 * resolve.c (check_data_variable): Convert data values into variable
4986 (traverse_data_list): Build implicit loop chain.
4987 (gfc_resolve): Ditto.
4988 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
4989 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
4990 * trans-expr.c (gfc_conv_structure): Handle array initializers.
4991 (gfc_conv_expr): Update to match.
4992 * trans.h (gfc_conv_structure): Declare.
4995 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
4997 * trans.h: Add declarations for gfor_fndecl_si_kind and
4998 gfor_fndecl_sr_kind.
4999 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
5000 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
5001 (g95_conv_intrinsic_sr_kind): New function.
5002 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
5005 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
5007 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
5008 instead of _4 and _8 as postfix for libgfortran calls.
5010 2003-09-16 Paul Brook <paul@nowt.org>
5012 * array.c (compare_bounds): New function.
5013 (gfc_compare_array_spec): Use it.
5015 2003-09-14 Paul Brook <paul@nowt.org>
5017 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
5018 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
5020 2003-09-14 Paul Brook <paul@nowt.org>
5022 * check.c (dim_rank_check): Allow assumed bounds if requested.
5023 (gfc_check_lbound): Call it.
5024 (gfc_check_ubound): Ditto.
5025 (gfc_check_size): Change to match.
5026 * simplify.c (gfc_simplify_bound): New function.
5027 (gfc_simplify_lbound): New function.
5028 (gfc_simplify_ubound): New function.
5029 * intrinsic.h: Declare them.
5030 * intrinsic.c (add_functions): Use them.
5032 2003-09-14 Paul Brook <paul@nowt.org>
5034 * io.c (format_lex): Initialize negative_flag.
5035 (check_format): Intialize repeat.
5036 * trans-io.c (gfc_new_nml_name_expr): Declare static.
5037 (gfc_new_var_expr): Ditto.
5039 2003-09-14 Paul Brook <paul@nowt.org>
5041 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
5042 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
5044 2003-09-12 Paul Brook <paul@nowt.org>
5046 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
5048 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
5050 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
5051 for a correct expression.
5053 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
5055 * trans-intrinsic.c (real_compnt_info): New struct.
5056 (prepare_arg_info): New function.
5057 (gfc_conv_intrinsic_set_exponent): New function.
5058 (gfc_conv_intrinsic_scale): New function.
5059 (gfc_conv_intrinsic_nearest): New function.
5060 (gfc_conv_intrinsic_fraction): New function.
5061 (gfc_conv_intrinsic_exponent): New function.
5062 (gfc_conv_intrinsic_spacing): New function.
5063 (gfc_conv_intrinsic_rrspacing): New function.
5064 (gfc_conv_intrinsic_function): Use them.
5066 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
5068 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
5069 build_int_2 changed from (high, low) to (low, high).
5070 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
5071 ioparm_namelist_read_mode, iocall_set_nml_val_int,
5072 iocall_set_nml_val_float, iocall_set_nml_val_char,
5073 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
5074 (gfc_build_io_library_fndecls): Add variable initialization.
5075 (gfc_new_nml_name_expr, get_new_var_expr): New function.
5076 (build_dt): Add namelist support.
5077 * io.c (value): New variable.
5078 (check_format): Support FMT_H now.
5080 2003-09-07 Paul Brook <paul@nowt.org>
5082 * io.c (gfc_resolve_dt): Error if format label is not defined.
5084 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
5086 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
5087 about case_switch's break. The other is about building the condition
5088 statement tree, which judges the argument in the range of the
5089 corresponding integer type.
5090 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
5091 for the large values.
5093 2003-09-05 Paul Brook <paul@nowt.org>
5095 * f95-lang.c (expand_function_body): Gimplify the function.
5097 2003-09-04 Jeff Law <law@redhat.com>
5099 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
5102 2003-09-04 Paul Brook <paul@nowt.org>
5104 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
5105 (gfc_expand_stmt): New function.
5106 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
5107 (expand_function_body): Use tree_rest_of_compilation.
5108 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
5110 2003-09-03 Jeff Law <law@redhat.com>
5112 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
5115 2003-08-30 Paul Brook <paul@nowt.org>
5117 * f95-lang.c (builtin_function): Remove #if 0 code.
5118 (gfc_define_builtin): New function.
5119 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
5120 * mathbuiltins.def: New file.
5121 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
5122 (gfc_intrinsic_map): Use mathbuiltins.def.
5123 (gfc_intrinsic_builtin_t): Remove.
5124 (gfc_build_intrinsic_lib_fndecls): Update.
5125 * trans-types.c (gfc_init_types): Remove redundant initilaization of
5126 signed_size_type_node.
5128 2003-08-29 Paul Brook <paul@nowt.org>
5130 * arith.c (gfc_real_kinds): Use correct minimum exponents.
5132 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
5134 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
5135 (gfc_conv_intrinsic_function): Add MODULO.
5137 2003-08-22 Jason Merrill <jason@redhat.com>
5139 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
5141 2003-08-22 Andreas Jaeger <aj@suse.de>
5143 * Make-lang.in (f95.install-common): Add DESTDIR support.
5144 * (f95.install-info): Likewise.
5145 (f95.uninstall): Likewise.
5147 2003-08-19 Diego Novillo <dnovillo@redhat.com>
5149 * trans-types.c (gfc_init_types): Initialize
5150 signed_size_type_node with size_type_node.
5152 2003-08-18 Paul Brook <paul@nowt.org>
5154 * dependency.c (gfc_dependency): New enum.
5155 (check_another_array_ref): Remove.
5156 (gfc_get_array_from_component): Remove.
5158 (get_range): Remove.
5159 (get_no_of_elements): Use mpz_t, not mpf_t.
5160 (transform_sections): New function.
5161 (gfc_check_range_range): Rename ...
5162 (gfc_check_section_vs_section): ... to this. Use new function.
5163 (gfc_is_inside_range): Rewrite to match.
5164 (gfc_check_element_vs_section): Ditto.
5165 (gfc_check_element_vs_element): Ditto.
5167 (gfc_dep_resolver): Ditto. Remove unused parameter.
5168 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
5169 gfc_check_element_vs_element, gfc_is_inside_range,
5170 gfc_get_array_from_component): Remove prototypes for static functions.
5171 (gfc_dep_resolver): Update prototype.
5172 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
5174 2003-08-15 Paul Brook <paul@nowt.org>
5176 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
5177 return values to parent scope.
5178 (gfc_build_dummy_array_decl): Ditto.
5180 2003-08-14 Paul Brook <paul@nowt.org>
5182 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
5183 size of the type, not the pointer.
5184 * resolve.c (resolve_symbol): Give more accurate error message.
5186 2003-08-10 Paul Brook <paul@nowt.org>
5188 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
5190 2003-08-10 Paul Brook <paul@nowt.org>
5192 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
5195 2003-08-10 Chun Huang <compiler@sohu.com>
5197 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
5198 (resolve_symbol): Ditto.
5199 * trans-expr.c (gfc_conv_statement_function): New function.
5200 (gfc_conv_function_expr): Use it.
5202 2003-08-10 Paul Brook <paul@nowt.org>
5204 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
5205 (walk_function_expr): Set section rank.
5206 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
5208 2003-08-10 Paul Brook <paul@nowt.org>
5210 * intrinsic.c (add_sym): Prefix names with correct string.
5211 (add_sym_0s): New function.
5212 (add_subroutines): Register abort.
5214 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
5216 * gfortran.h: Introduce options to control the mangling.
5217 * lang.opt: Likewise.
5218 * options.c (gfc_init_options): Handle the options.
5219 * trans-common.c (gfc_sym_mangled_common_id): New function.
5220 (gfc_build_common_decl): Call it.
5221 * trans-decl.c (gfc_sym_mangled_function_id): New function.
5222 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
5224 2003-08-09 Paul Brook <paul@nowt.org>
5226 * module.c (mio_symbol): Always ouput a namespace for formal args.
5227 (load_needed): Namespace now belong to their proper symbol.
5228 (gfc_dump_module): Change G95=>GFORTRAN.
5230 2003-08-05 Paul Brook <paul@nowt.org>
5232 * options.c: Force -fg77-calls.
5234 2003-08-02 Paul Brook <paul@nowt.org>
5236 * Makelang.in: Rename G95_* to GFORTRAN_*.
5237 * All sources: Rename G95_* to GFC_*.
5239 2003-08-01 Paul Brook <paul@nowt.org>
5241 * fortran/Make-lang.in: Use GMPLIBS.
5242 * fortran/config-lang.in: Set need_gmp.
5243 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
5245 2003-07-27 Andreas Jaeger <aj@suse.de>
5247 * trans-decl.c (gfc_generate_constructors): Convert prototype to
5249 * trans-const.c (gfc_init_constants): Likewise.
5250 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
5252 * gfortranspec.c: Convert to ISO C90.
5253 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
5255 2003-07-26 Paul Brook <paul@nowt.org>
5257 * lang.opt: Add -fdump-parse-tree.
5258 * options.c (gfc_handle_option): Ditto.
5259 * resolve.c (resolve_forall_iterators): Convert to proper type.
5260 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
5262 2003-07-26 Paul Brook <paul@nowt.org>
5264 * Makefile.in: Add build dependencies on files common with rest of gcc.
5266 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
5268 * trans.h: Declare g95_trans_pointer_assignment.
5269 * trans-expr.c (g95_trans_pointer_assignment): New function.
5270 (g95_trans_pointer_assign): Use it.
5271 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
5272 (g95_trans_pointer_assign_need_temp): New function.
5274 2003-07-26 Paul Brook <paul@nowt.org>
5276 * gfortran.texi: Replace references to g95.
5278 2003-07-26 Paul Brook <paul@nowt.org>
5280 Rename g95_* to gfc_*.
5282 2003-07-25 Paul Brook <paul@nowt.org>
5284 * gfortran.h: Rename from g95.h.
5285 * trans-types.c (boolean_type_node, booelan_true_node,
5286 boolean_false_node): Remove.
5287 * trans-types.h: Ditto.
5289 2003-07-25 Chun Huang <compiler@sohu.com>
5291 * parse.c (accept_statement): Implement BLOCK DATA statement.
5292 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
5295 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
5297 * trans-stmt.c (temporary_list): Define.
5298 (g95_trans_assign_need_temp): New function.
5299 (g95_trans_forall_1): Modified for WHERE.
5300 (g95_trans_where_assign): Modified.
5301 (g95_trans_where_2): Modified.
5302 (g95_evaluate_where_mask): Modified.
5303 (g95_trans_where): Modified.
5304 (g95_get_temp_expr): Removed.
5305 (g95_add_to_where_stmt_list): Removed.
5306 (compute_overall_iter_number): Modified for WHERE.
5307 * trans.h: Remove where_stmt_list.
5309 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5311 * lang.opt: Correct description of options -J and -M.
5313 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
5315 * lang.opt: Move help text to here.
5316 * lang-options.h: Remove.
5318 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5319 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
5320 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
5323 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
5324 Paul Brook <paul@nowt.org>
5326 * check.c (check_rest): Use global pedantic flag.
5327 * io.c (data_desc): Ditto.
5328 * error.c (g95_warning, g95_warning_now): Use global flag.
5329 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
5330 (expand_function_body): Update to new prototypes.
5331 (g95_init): Use new option names.
5332 * g95.h (g95_option_t): Standardize names.
5333 (g95_init_options, g95_handle_option): Update prototypes.
5334 * interface.c: Use new option names.
5341 * simplify.c: Ditto.
5343 * trans-array.c: Ditto.
5344 * trans-expr.c: Ditto.
5345 * trans-types.c: Ditto.
5346 * trans-decl.c: Ditto.
5347 (g95_build_library_function_decl): Remove obsolete VPARAMS.
5349 * options.c (g95_display_help): Remove.
5350 (g95_init_options): Convert to new scheme.
5352 (g95module_option): Ditto, rename from g95_parse_arg.
5353 (g95_handle_module_path_options): New function.
5354 * trans-equivalence.c: Fix error message.
5355 * lang.opt: Corrections.
5357 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
5359 * lang.opt: New file.
5361 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5363 * decl.c (match_attr_spec): Set colon_seen.
5365 2003-07-14 Paul Brook <paul@nowt.org>
5367 * trans-array.c: Update comment.
5368 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
5369 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
5370 minmaxloc,minmaxval): Ditto.
5371 * trans-io.c (g95_trans_transfer): Ditto.
5372 * trans-stmt.c: Remove unneeded prototypes.
5373 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
5374 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
5375 (compute_inner_temp_size): Remove bits of dead code. Add comments.
5376 Don't share loopinfo.
5377 (compute_overall_iter_number): Declare as static.
5378 (allocate_temp_for_forall_nest): Ditto.
5379 (g95_trans_forall_1): Don't pass shared loopinfo.
5380 * trans.c (g95_start_block): Expand comment.
5382 2003-07-12 Paul Brook <paul@nowt.org>
5384 * arith.c (g95_index_integer_kind): Remove unused initializer.
5385 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
5386 index by size of element.
5387 (generate_loop_for_rhs_to_temp): Ditto.
5388 (allocate_temp_for_forall_nest): Use element size, not index size.
5390 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5392 * arith.c (g95_index_integer_kind): Add a TODO.
5393 * simplify.c (g95_simplify_nearest): Add a TODO.
5395 2003-07-09 Chun Huang <compiler@sohu.com>
5397 * trans.h: Add declarations for gfor_fndecl_string_scan and
5398 gfor_fndecl_string_verify.
5399 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
5400 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
5401 (g95_conv_intrinsic_verify): New function.
5402 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
5403 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
5404 of parameter 'BACK=.TRUE.'
5406 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
5408 * trans-stmt.c (iter_info, forall_info): Define.
5409 (g95_trans_forall_block): Remove.
5410 (g95_trans_forall_loop): Use forall info blocks.
5411 (g95_trans_nested_forall_loop): New function.
5412 (g95_do_allocate): Handle things other than logical masks.
5413 (generate_loop_for_temp_to_lhs): New function.
5414 (generate_loop_for_rsh_to_temp): New function.
5415 (compute_inner_temp_size): New function.
5416 (compute_overall_iter_number): New function.
5417 (allocate_temp_for_forall_nest): New function.
5418 (g95_trans_forall): Move body ...
5419 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
5421 2003-07-02 Paul Brook <paul@nowt.org>
5423 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
5424 in correct scope. Change callers to match.
5425 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
5426 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
5428 2003-07-02 Paul Brook <paul@nowt.org>
5430 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
5431 expression shape for all expressions.
5432 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
5434 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5436 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
5437 g95_parse_arg), intrinsic.c (g95_convert_type): support of
5439 * intrinsic.c, g95.h: Add g95_convert_type_warn,
5440 * resolve.c (g95_resolve_index): Call it.
5442 2003-07-02 Paul Brook <paul@nowt.org>
5444 * iresolve.c (g95_resolve_reshape): Set expression shape.
5445 (g95_resolve_shape): Ditto.
5446 * simplify.c (g95_simplify_shape): Move common code outside condition.
5447 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
5449 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5451 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
5454 2003-06-29 Paul Brook <paul@nowt.org>
5456 * array.c (g95_simplify_iterator_var): Don't bother with return value.
5457 * expr.c (find_array_element, find_component_ref): New functions.
5458 (remove_subobject_ref): New function.
5459 (simplify_const_ref): Use them. Rename from simplify_component_ref.
5460 (simplify_ref_chain): New function.
5461 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
5462 (g95_specification_expr): Simplify the expression.
5463 * resolve.c (resolve_operator): Check simplifications return code.
5464 (g95_resolve_expr): Ditto.
5466 2003-06-26 Paul Brook <paul@nowt.org>
5468 * expr.c (simplify_component_ref): New function.
5469 (g95_simplify_expr): Use it.
5470 * resolve.c (resolve_structure_cons): Handle references.
5472 2003-06-25 Paul Brook <paul@nowt.org>
5474 * trans-io.c (build_dt): Handle internal units.
5476 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
5478 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
5479 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
5480 Use g95_array_index_type instead of integer_type_node.
5481 (g95_build_common_decl, g95_set_common_master_type): Use
5482 g95_character1_type_node instead of char_type_node.
5483 * trans-equivalence.c (g95_layout_local_equiv): As above.
5485 2003-06-24 Steven G. Kargl <kargls@attbi.com>
5487 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
5488 remove last remains of -fquiet.
5490 2003-06-22 Paul Brook <paul@nowt.org>
5492 * resolve.c (resolve_operator): Don't fail if we can't simplify.
5493 (g95_resolve_expr): Ditto.
5494 (resolce_code): Mark as static.
5495 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
5496 gimplifer doesn't (yet).
5498 2003-06-20 Paul Brook <paul@nowt.org>
5500 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
5501 * match.c (g95_match_if): Add ST_PAUSE.
5502 (g95_match_stopcode): New function.
5503 (g95_match_pause, g95_match_stop): Use it.
5504 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
5505 (decode_stmt, next_statement, parse_executable): Ditto.
5506 * resolve.c (resolve_code): Ditto.
5507 * st.c (g95_free_statement): Ditto.
5508 * trans-stmt.c (g95_trans_pause): New function.
5509 * trans-stmt.h: Declare it.
5510 * trans.c (g95_trans_code): Use it.
5511 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
5513 (g95_build_builtin_function_decls): Initialize them.
5515 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
5517 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5519 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
5520 match_filepos): Fix error handling.
5522 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5524 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
5525 Add assertions on arguments.
5526 * resolve.c (expression_shape): Remove useless &.
5527 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
5528 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
5529 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
5530 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
5531 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
5532 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
5533 (g95_simplify_not, g95_simplify_scale): Add assertions.
5535 2003-06-15 Paul Brook <paul@nowt.org>
5537 Clean up stuff to work with the ssa optimizers.
5538 * convert.c (convert): Handle BOOLEAN_TYPEs.
5539 * f95-lang.c (g95_truthvalue_conversion): Implement.
5540 * trans-array.c (g95_trans_array_constructor_value): Group multiple
5542 * trans.h (g95_truthvalue_conversion): Declare.
5543 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
5544 * trans-stmt.c (g95_trans_character_select): Don't create array
5545 assignments. Mark labels as indirect jump targets.
5546 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
5547 (g95_get_dtype_cst): Handle LOGICAL types.
5549 2003-06-14 Paul Brook <paul@nowt.org>
5551 * f95-lang.c (g95_gimplify_expr): New function.
5552 * trans-array.c (g95_trans_array_constructor_value): Don't create
5554 (g95_conv_expr_descriptor): Rename simple->gimple.
5555 * trans-expr.c (conv_expr_op): Use proper logical operators.
5556 * trans-intrinsic.c (build_fixbound_expr): New function.
5557 (build_fix_expr): Ditto.
5558 (g95_conv_intinsic_aint): Use them. Use builtin functions.
5559 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
5561 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5563 * array.c (g95_compare_array_spec): Remove unreachable code.
5564 * expr.c (g95_copy_expr): Likewise.
5565 * intrinsic.c (g95_convert_type): Likewise.
5566 * misc.c (g95_code2string): Likewise.
5567 * simplify.c (g95_simplify_ishft, g95_simplify_real,
5568 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
5569 * trans-stmt.c (g95_trans_select): Likewise.
5570 * primary.c (extend_ref): Add an assertion.
5571 * simplify.c (g95_convert_constant): Add const.
5572 * intrinsic.h: Remove g95_check_x_ni.
5573 * f95-lang.c (g95_finish): Call g95_release_include_path.
5575 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5577 * resolve.c (resolve_contained_functions): Fix typo introduced on
5580 2003-06-09 Paul Brook <paul@nowt.org>
5582 * g95.h: Include system.h not hwint.h.
5583 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
5584 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
5586 2003-06-09 Paul Brook <paul@nowt.org>
5588 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
5589 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
5590 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
5591 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
5592 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
5594 * trans.h (g95_trans_equivalence, g95_trans_common,
5595 g95_add_decl_to_function): Declare.
5596 * trans-common.c, trans-equivalence.c: New files.
5598 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
5600 * intrinsic.c (g95_intrinsic_extension): Remove.
5601 (add_functions): Substitute g95_check_x for g95_check_x_ni
5603 (g95_init_expr_extensions): New function.
5604 (g95_intrinsic_func_interface): Use it.
5605 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
5606 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
5607 g95_check_precision, g95_check_present, g95_check_radix,
5608 g95_check_range, g95_check_selected_real_kind): Do not set
5609 g95_intrinsic_extension.
5610 (g95_check_x_ni): Remove now duplicate of g95_check_x.
5612 * expr.c (check_inquiry): Add FIXME, fixup some code style.
5614 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5616 * g95.h (ref_type): Name this type explicitly.
5617 * module.c (MIO_NAME): Add specialisations of mio_name.
5618 (mio_symbol_attribute, mio_typespec, mio_array_ref,
5619 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
5620 (ab_attribute): Name this type explicitly.
5621 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
5623 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
5625 * trans-intrinsic.c (g95_conv_allocated): New function.
5626 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
5628 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
5630 * f95-lang.c: Don't include g95-support.h
5631 (g95_mark_addressable): Add prototype.
5632 (g95_init_decl_processing): Remove C front end hack.
5633 * f95-tree.c: Remove file.
5634 * support.c: Remove file.
5635 * g95-support.h: Remove file.
5636 * trans-types.c (g95_init_types): Set up boolean
5637 type related tree nodes.
5638 * Make-lang.in: Remove rules for dead files and
5639 dependencies on them.
5641 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
5643 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
5644 C front end dependency. Also, convert.c does not depend on
5645 g95-support.h anymore.
5646 * convert.c: Don't include c-common.h and g95-support.h
5647 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
5648 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
5649 stmts_are_full_exprs_p, current_stmt_tree,
5650 current_scope_stmt_stack): Remove.
5651 * g95-support.h (unsigned_conversion_warning): Kill proto.
5652 (boolean_type_node, boolean_true_node, boolean_false_node):
5653 Don't define here. Instead, make then true tree nodes in
5655 * support.c (c_global_trees): Die, C front end, die!!!
5656 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
5657 uintmax_type_node, string_type_node and const_string_type_node.
5658 (decl_constant_value, overflow_warning): Make static functions.
5659 They are in death row too, though.
5660 (default_conversion, c_expand_asm_operands): Remove.
5661 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
5662 trans.c: Don't include c-common.h.
5663 * trans-types.c (boolean_type_node, boolean_true_node,
5664 boolean_false_node): Make them real tree nodes.
5665 * trans-types.h (intmax_type_node, string_type_node,
5666 const_string_type_node): Hack to work around C dependencies
5667 in builtin-types.def.
5669 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5671 * decl.c (decl_types): Add some iterators-like sentinels.
5672 * decl.c (match_attr_spec): Use them.
5673 Use "decl_types" instead of "int".
5674 Add cast in call to g95_match_strings.
5675 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
5677 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
5678 (g95_interface_info): Use "g95_intrinsic_op".
5679 * dump-parse-tree.c (g95_show_namespace): Use them.
5680 * interface.c (g95_check_interfaces): Use them.
5681 * module.c (read_module, write_module): Use them.
5682 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
5683 Use "g95_intrinsic_op".
5684 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
5685 Add a default case in switch statement.
5686 * intrinsic.h (g95_generic_isym_id): Moved to...
5687 * g95.h (g95_generic_isym_id): here.
5688 (g95_intrinsic_sym): Use "g95_generic_isym_id".
5689 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
5690 * trans-intrinsic.c (g95_intrinsic_map_t,
5691 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
5692 * match.c (g95_match_intrinsic_op): Add cast in call to
5695 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
5697 * support.c (skip_evaluation, warn_conversion, lvalue_p,
5698 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
5699 constant_fits_type_p, convert_and_check,
5700 unsigned_conversion_warning): Remove these ugly remnants
5701 we inherited from the C front end.
5702 (function_types_compatible): Remove '#if 0'-edcode.
5703 (build_modify_expr): Likewise.
5704 (convert_for_assignment): Don't use the deceased functions.
5705 The parameter fundecl is now unused.
5706 (decl_constant_value): Always just return decl. In fact
5707 this function is not used at present, but it might be in
5708 the future, when we start using the tree inliner.
5709 (overflow_warning, default_conversion, c_expand_asm_operands):
5710 Abort when these are called, they are part of the C type
5711 checking implementation and therefore poison to Fortran.
5713 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
5715 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
5716 c-pretty-print.o and c-dump.o. Add a comment on why we
5717 depend on c-semantics.c.
5718 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
5719 Don't use the C front end tree dumper hook to dump the
5720 language specific tree representation -- we don't have
5721 one. So instead, inherit the default langhook.
5723 2003-06-02 Paul Brook <paul@nowt.org>
5725 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
5727 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5729 * check.c (g95_check_associated): Use proper types. Remove
5730 extraneous argument in call to g95_error().
5732 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
5734 * resolve.c (resolve_operator): Make logical operands convert to the
5735 type with higher kind.
5737 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
5739 * check.c (g95_check_associated): Make sure both pointer and target has
5740 the same type and rank. Null pointer or array section with vector
5741 subscript as target are not allowed.
5742 * trans.h: Declare gfor_fndecl_associated.
5743 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
5744 gfor_fndecl_associated.
5745 * trans-intrinsic.c (g95_conv_associated): New function.
5746 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
5748 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
5750 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
5751 according to POINTER itself rather than TARGET.
5752 (g95_conv_expr_descriptor): Make lbound start at 1.
5753 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
5755 2003-06-01 Paul Brook <paul@nowt.org>
5757 * expr.c (g95_type_convert_binary): Make it match the standard.
5758 * g95.texi: Remove dead link.
5760 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
5762 * g95.texi: Cleanup somewhat in preparation for inclusion
5765 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5766 Canqun Yang <canqun@yahoo.com.cn>
5768 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
5770 (g95_find_forall_index): Return proper value.
5771 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
5772 compare the return value from g95_find_forall_index.
5774 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5775 * g95.h, io.c (g95_st_label): Remove "length".
5776 (g95_symtree): Remove "link".
5777 (g95_case): Remove "code".
5778 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
5779 g95_convert_real): Make an argument pointer to const.
5780 * decl.c (colon_seen): Add a TODO.
5781 * interface.c (g95_compare_types): Fix typo.
5782 * interface.c (compare_interfaces): Preserve value of "p".
5783 * intrinsic.c (sort_actual): Remove "i".
5784 * match.c (g95_match_assign): Proper type in call to g95_match().
5785 * parse.c (next_free): Avoid duplicate call due to macro.
5786 * parse.c (check_statement_label): wrong type in call to g95_error.
5787 * primary.c (match_real_constant): Add a TODO.
5788 * resolve.c (resolve_select): Remove useless conditional.
5789 * simplify.c (g95_simplify_repeat): Proper assignment to
5790 "value.character.string".
5791 * simplify.c (g95_simplify_reshape): Wrong variable in call to
5794 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
5796 * trans-stmt.c: Remove unnecessary include file defaults.h.
5798 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
5800 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
5802 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
5803 actual variables used as FORALL indexes.
5805 2003-05-15 Paul Brook <paul@nowt.org>
5807 * trans-array.c (g95_trans_static_array_pointer): Use
5809 (g95_trans_deferred_array): Initialize static array pointers.
5810 * trans-expr.c (g95_conv_function_call): Use formal arglist to
5811 correctly pass POINTER and absent CHARACTER arguments.
5813 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
5815 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
5816 (g95_resolve_forall_body): Resolve FORALL body.
5817 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
5818 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
5819 (g95_find_forall_index): Check whether the FORALL index appears in
5820 the expression or not.
5821 (resolve_code): Modified.
5823 2003-05-14 Paul Brook <paul@nowt.org>
5825 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
5827 2003-05-13 Paul Brook <paul@nowt.org>
5829 * trans-types.c (g95_max_array_element_size): Now a tree node.
5830 (g95_init_types): Work out max size properly.
5831 (g95_get_dtype_cst): Modify to match.
5833 2003-05-11 Paul Brook <paul@nowt.org>
5835 * trans-io.c (add_case): Create a label decl for case labels.
5837 2003-05-11 Paul Brook <paul@nowt.org>
5839 * arith.c (g95_integer_index_kind): New variable.
5840 * f95-lang.c (g95_init): Move frontend initialization here ...
5841 (g95_post_options): ... from here.
5842 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
5843 * intrinsic.c (add_functions): Use index kinds.
5844 * iresolve.c: Convert to index_kind where needed.
5845 * resolve.c (g95_resolve_index): Make public, use index_kind.
5846 (resolve_array_ref): Adjust to match.
5847 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
5848 * trans-stmt.c: Ditto.
5849 * trans-types.c: Ditto.
5850 * trans-types.h (g95_array_index_kind): Remove declaration.
5851 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
5853 2003-05-07 Paul Brook <paul@nowt.org>
5855 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
5856 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
5859 2003-05-07 Paul Brook <paul@nowt.org>
5861 * trans-array.c (trans_static_array_pointer,
5862 g95_trans_array_constructor_value, g95_conv_array_initializer,
5863 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
5864 (g95_add_loop_ss_code): Convert subscripts to the correct type.
5865 * trans-stmt.c (g95_trans_character_select): Ditto.
5866 * trans-types.c (g95_init_types): Ditto.
5868 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
5870 * f95-lang.c (expand_function_body): Use input_line, not lineno.
5871 * trans-decl.c (g95_generate_function_code,
5872 g95_generate_constructors): Likewise.
5873 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
5874 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
5877 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
5878 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
5879 with components point to the DERIVED type itself, and two DERIVED
5880 type with components point to each other.
5881 * trans-expr.c (g95_conv_componet_ref): Modified
5883 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
5884 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
5886 (g95_trans_pointer_assign): Implement Nullify.
5888 2003-05-01 Paul Brook <paul@nowt.org>
5890 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
5891 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
5893 2003-05-01 Paul Brook <paul@nowr.org>
5895 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
5896 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
5899 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
5901 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
5904 2003-04-28 Paul Brook <paul@nowt.org>
5906 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
5907 as their kind suggests.
5908 (g95_resolve_reshape): Ditto.
5910 2003-04-28 Chun Huang <compiler@sohu.com>
5912 * trans-expr.c (g95_conv_substring_expr): New function.
5913 (g95_conv_expr): Use it.
5915 2003-04-28 Paul Brook <paul@nowt.org>
5917 * iresolve.c (g95_resolve_transpose): Make it match the
5919 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
5921 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
5923 * trans-types.c (g95_add_field_to_struct): New function to
5924 add a field to a UNION_TYPE or RECORD_TYPE.
5925 * trans-types.h (g95_add_field_to_struct): Prototype.
5926 (g95_get_derived_type): Use g95_add_field_to_struct to add
5928 * trans-io.c (g95_add_field): Remove.
5929 (ADD_FIELD): Use new g95_add_field_to_struct function.
5930 (ADD_STRING): Likewise.
5931 * trans-stmt.c (g95_trans_select): Likewise.
5932 (g95_add_field): Remove duplicated function.
5934 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
5936 Port implementation for CHARACTER SELECT from Andy's tree.
5937 * trans-stmt.c (g95_trans_character_select): Implement character
5938 select. (g95_add_field): New function.
5939 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
5940 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
5941 * g95.h (struct g95_case): Add field 'int n'.
5942 * trans.h: Declare 'gfor_fndecl_select_string'.
5944 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
5946 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
5947 (g95_insert_bbd): Die on duplicates.
5948 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
5950 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
5952 * g95.texi: Require GMP 4.0 -- like we actually
5953 do. Explain the testsuite and what-goes-where.
5954 Don't use undefined texinfo symbol. Break very
5955 long line. Remove finished item from the list
5958 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
5960 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
5963 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
5965 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
5966 (g95_trans_forall_body): New function.
5968 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
5970 * resolve.c (resove_where): New function.
5971 (resolve_where_shape): New function.
5972 (resolve_code): Add call to 'resolve_where'
5973 * trans-stmt.c (g95_trans_where): Modified.
5974 (g95_trans_where_2): New function.
5975 (g95_trans_where_assign): New function.
5976 (g95_evaluate_where_mask): New function.
5977 (g95_add_to_stmt_list): New function.
5978 (g95_get_temp_expr): New function.
5979 * trans.h (where_stmt_list): New structure.
5981 2003-04-10 Paul Brook <paul@nowt.org>
5983 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
5984 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
5986 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
5988 Update after mainline -> tree-ssa-branch merge.
5989 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
5991 (g95_init): Update for new lang_hooks definition.
5992 (g95_post_options): New langhook.
5993 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
5994 * scanner.c (g95_new_file): Comment update.
5996 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5998 * g95.h, lang-options.h: Add -Wimplicit-interface.
5999 * options.c (g95_init_options, g95_parse_arg): Set it.
6000 * interface.c (check_intents): Warn about call with implicit
6002 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
6005 2003-04-05 Paul Brook <paul@nowt.org>
6007 * iresolve.c (g95_resolve_spread): Don't resole based on type.
6008 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
6010 2003-03-29 Paul Brook <paul@nowt.org>
6012 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
6013 (g95_resolve_unpack): Ditto.
6014 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
6015 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
6016 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
6018 2003-03-25 Paul Brook <paul@nowt.org>
6020 * arith.c (g95_unary_user, g95_user): Remove dead functions.
6022 * array.c (g95_free_array_ref): Ditto.
6024 * symbol.c (g95_use_derived_tree): Ditto.
6025 * intrinsic.c (add_functions): Use simplification for SCALE.
6026 * primary.c (g95_match_rvalue): Test sym, not symtree.
6028 2003-03-25 Paul Brook <paul@nowt.org>
6030 * trans-decl.c (build_function_decl): Add parameter before it gets
6031 turned into a constant.
6032 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
6033 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
6034 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
6036 2003-03-22 Paul Brook <paul@nowt.org>
6038 * trans-array.c (g95_conv_array_initializer): Allow scalar
6040 * trans-decl.c (g95_finish_var_decl): Result variables are not
6042 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
6043 (g95_conv_intrinsic_function): Use it.
6044 * trans-types.h (g95_type_spec): Remove dead declaration.
6046 2003-03-21 Paul Brook <paul@nowt.org>
6048 * trans-decl.c (g95_build_function_decl): Mark string parameters.
6050 2003-03-20 Paul Brook <paul@nowt.org>
6052 * trans-decl.c (g95_build_function_decl): Put character length
6053 parameters at the end of the function declaration.
6054 * trans-expr.c (g95_conv_function_call): Ditto.
6055 * trans-types.c (g95_get_function_type): Ditto.
6057 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6059 * resolve.c (resolve_formal_arglist): Don't impose intent for
6060 procedure arguments of pure functions.
6061 (resolve_select): Remove redundant assignment.
6063 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6065 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
6067 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
6068 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
6070 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
6072 * symbol.c (g95_add_type): Fix typo in comment.
6075 2003-03-16 Paul Brook <paul@nowt.org>
6077 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
6078 * expr.c (g95_build_call): Remove.
6079 * f95-lang.c (puchdecl_top_level): New function.
6080 * g95.h (g95_code): Store resolved symbol, not just the name.
6081 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
6082 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
6083 (g95_get_intrinsic_sub_symbol): New function.
6084 * iresolve.c (g95_resolve_cpu_time): Use it.
6085 (g95_resolve_random_number): Ditto.
6086 * resolve.c: Set code->resolved_sym instead of code->sub_name.
6087 * trans-decl.c (g95_get_extern_function_decl): Give external decls
6088 the correct DECL_CONTEXT. Add global symbold to the global scope.
6089 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
6092 2003-03-16 Paul Brook <paul@nowt.org>
6094 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
6095 * options.c (g95_parse_arg): Ditto.
6096 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
6097 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
6098 for the procedure, not the parameter.
6099 * trans-array.c (g95_trans_g77_array): New function.
6100 (g95_trans_assumed_size): Use it.
6101 (g95_trans_dummy_array_bias): Ditto.
6102 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
6103 (g95_conv_expr_descriptor): ... to here. Update callers.
6104 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
6105 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
6106 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
6107 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
6108 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
6109 (g95_sym_type): Ditto.
6111 2003-03-15 Paul Brook <paul@nowt.org>
6113 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
6115 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
6117 2003-03-14 Paul Brook <paul@nowt.org>
6119 * trans-array.c (g95_array_is_packed): Remove.
6120 (g95_conv_array_base): Correctly handle all descriptorless cases.
6121 (g95_conv_array_stride): Use descriptorless strides.
6122 (g95_trans_dummy_array_bias): Don't always repack the array.
6123 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
6125 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
6126 dummy and non-dummy arrays...
6127 (g95_sym_type, g95_get_derived_type): ... like these.
6128 (g95_get_array_type_bounds): Allow discontiguous arrays.
6130 2003-03-12 Paul Brook <paul@nowt.org>
6132 * array.c (g95_resolve_array_spec): Fix comment.
6133 * g95.h (symbol_attributes): New flag always_explicit.
6134 * resolve.c (resolve_formal_arglist): Set it always_explicit.
6135 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
6136 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
6137 (g95_trans_array_bounds): Allow assumed shape arrays.
6138 (g95_trans_repack_array): Remove.
6139 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
6140 * trans-decl.c (g95_build_qualified_array): Only ignore absent
6141 bounds for assumed size arrays.
6142 (g95_build_dummy_array_decl): Use descriptorless arrays.
6143 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
6144 (g95_trans_pointer_assign): Fix typo.
6145 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
6147 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
6148 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
6149 Also modify callers.
6150 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
6152 2003-03-08 Paul Brook <paul@nowt.org>
6154 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
6155 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
6156 * resolve.c (compare_spec_to_ref): Allow full array sections.
6158 2003-03-08 Paul Brook <paul@nowt.org>
6160 * expr.c (g95_simplify_expr): Also simplify array index and
6161 substring expressions.
6162 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
6163 * trans-array.c (g95_trans_array_bounds): New function.
6164 (g95_trans_auto_array_allocation): Use it.
6165 (g95_trans_assumed_size): Rewrite.
6166 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
6167 (gfor_fndecl_repack): Remove.
6168 (g95_build_qualified_array): Handle absent upper bounds.
6169 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
6170 (g95_get_symbol_decl): Update.
6171 (g95_build_intrinsic_function_decls): Initialize new decls.
6172 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
6173 (gfor_fndecl_repack): Remove.
6174 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
6175 * trans-types.c: (g95_build_array_type): Merge duplicated code..
6176 (g95_get_nodesc_array_type): Handle absent bounds.
6177 * trans-types.h (g95_get_nodesc_array_type): Declare.
6179 2003-03-04 Paul Brook <paul@nowt.org>
6181 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
6184 2003-03-02 Paul Brook <paul@nowt.org>
6186 * options.c (g95_init_options): Drfault to 1.
6187 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
6188 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
6189 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
6190 Handle non-constant size automatic arrays.
6191 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
6192 generic bound functions.
6193 (g95_trans_auto_array_allocation): Don't create a descriptor.
6194 (g95_trans_assumed_size): New function (broken).
6195 (g95_trans_dummy_array_bias): Remove unused var.
6196 * trans-array.h (g95_trans_assumed_size): Declare.
6197 * trans-decl.c (create_index_var): New fuction.
6198 (g95_build_qualified_array): New function.
6199 (g95_get_symbol_decl): Use it.
6200 (g95_trans_deferred_vars): Handle assumed shape seperately.
6201 * trans-types.c (get_element_type): Handle heap allocated arrays.
6202 (g95_is_nodesc_array): Include non-const size arrays.
6203 (g95_get_nodesc_array_type): Ditto.
6205 2003-02-23 Paul Brook <paul@nowt.org>
6207 * trans-array.c (g95_array_init_size): Should use stride, not size of
6210 2003-02-18 Paul Brook <paul@nowt.org>
6212 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
6213 after intrinsic function check.
6215 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6217 * io.c (match_io): Fix missing return value and remove useless
6219 * match.c (g95_match): Remove useless assignment.
6220 * module.c (parse_string): Remove useless post increment.
6221 * simplify.c (g95_simplify_verify): Remove useless assignment.
6223 2003-02-15 Paul Brook <paul@nowt.org>
6225 * expr.c (restricted_intrinsic): Handle bad values gracefully.
6226 * g95.h (symbol_attribute): Add referenced member.
6227 (g95_symbol): Add dummy_order member.
6228 (g95_set_sym_referenced): Declare.
6229 * match.c (g95_match_assignment, g95_match_call): Use it
6230 * primary.c (match_actual_arg, g95_match_rvalue,
6231 g95_match_variable): Ditto.
6232 * symbol.c (next_dummy_order): New variable.
6233 (g95_set_sym_referenced): New function.
6234 (check_done): New function.
6235 (g95_add_*): Use it.
6236 * trans-decl.c: Make formatting conform to GCC standards.
6237 (g95_defer_symbol_init): Add dummy variables in the right order.
6238 (g95_get_symbol_decl): Only accept referenced variables.
6239 (g95_create_module_variable): Module variables are always required.
6240 (generatr_local_decls): New function.
6241 (generate_local_vars): New function.
6242 (g95_generate_function_code): Use it.
6244 2003-02-13 Paul Brook <paul@nowt.org>
6246 * trans-decl.c (g95_conv_struct_cons): Remove.
6247 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
6248 * trans-expr.c (g95_conv_structure): New function.
6249 (g95_conv_expr): Use it.
6251 2003-02-09 Paul Brook <paul@nowt.org>
6253 * trans-array.c (g95_array_init_size): Don't evaluate the linit
6254 expressions multiple times.
6255 (g95_trans_auto_arry_allocation): Use pointer not tmp.
6257 2003-02-08 Paul Brook <paul@nowt.org>
6259 * module.c (mio_symtree_ref): Declare as static.
6260 (mio_expr): Remove dead code.
6261 (read_module): Set the symtree link for fixups.
6262 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
6263 (build_round_expr): ... to this.
6264 (g95_conv_intrinsic_aint): New function.
6265 (g95_conv_intrinsic_function): Use it.
6267 2003-02-08 Paul Brook <paul@nowt.org>
6269 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
6270 offset after modificaton, not the increment expression.
6271 * dependency.c: Kill excess whitespace.
6273 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
6275 * dependency.h: Remove some function declarations.
6276 * dependency.c (get_no_of_elements): Change this function not to
6278 * other: Add comments for all modified functions.
6280 2003-02-06 Paul Brook <paul@nowt.org>
6282 * g95spec.c (lang_specific_functions): Fix initializer warning.
6283 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
6284 for structure type names.
6285 * trans-decl.c (g95_cons_structure_cons): New function.
6286 (g95_get_symbol_decl): Use it.
6287 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
6290 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6292 * resolve.c (compare_cases): Add const to casts.
6294 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6296 * g95.h (g95_check_f): Change a1 to f1m.
6297 * intrinsic.c (add_sym_1m, check_specific,
6298 g95_intrinsic_func_interface): Use it.
6300 * module.c (init_pi_tree): Remove useless cast.
6301 (fp2): Fix argument type.
6303 * parse.c (parse_select_block): Add comment.
6305 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
6307 * lang-options.h: Fix warning involving C90 concatenated
6310 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6311 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6313 * io.c (format_asterisk): Complete initializer to kill warning.
6314 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
6315 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
6316 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
6317 new defines to complete initializers. Kills all warnings.
6319 * Make-lang.in: Comment cleanup.
6321 2003-02-05 Paul Brook <paul@nowt.org>
6323 * array.c (g95_free_constructor): Handle NULL expressions.
6324 * resolve.c (resolve_structure_cons): Ditto.
6325 * decl.c (g95_match_null): New Function.
6326 (variable_decl): Use it.
6327 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
6328 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
6329 * trans-types.c (g95_set_decl_attributes): Remove empty function.
6331 2003-02-05 Paul Brook <paul@nowt.org>
6333 * trans.h (build1_v): New macro.
6334 (build_v): Remove pointless and incorrect prototype.
6335 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
6336 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
6338 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
6340 * Make-lang.in (F95_OBJS): Remove one more dead file.
6342 2003-02-01 Paul Brook <paul@nowt.org>
6344 * lang-specs.h: Don't pass -ffixed-form to the linker.
6345 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
6347 2003-02-01 Paul Brook <paul@nowt.org>
6349 * Make-lang.in (F95_OBJS): Remove dead files.
6350 * trans-array.c (g95_array_init_size): Do the right thing when
6352 * trans-decl.c (g95_generate_function_code): Initialize deffered
6353 symbol list before translating contained subroutines.
6354 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
6355 scalar invariant values here...
6356 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
6357 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
6359 2003-01-29 Paul Brook <paul@nowt.org>
6361 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
6362 (g95_walk_elemental_function_args): Reverse chains before adding.
6363 (g95_reverse_ss): Move about a bit.
6364 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
6367 2003-01-28 Paul Brook <paul@nowt.org>
6369 * intrinsic.c (resolve_intrinsic): Use correct union member.
6370 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
6372 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
6373 use associated variables.
6374 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
6375 * trans-expr.c (g95_conv_expr_present): ... to here.
6376 * trans.h: Declare it.
6377 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
6379 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6381 * array.c (expand_iterator): Suppress useless assignment.
6382 * decl.c (match_char_spec): Ditto.
6383 * io.c (match_io_iterator): Ditto.
6384 * primary.c (match_real_constant): Ditto.
6385 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
6386 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
6387 * matchexp.c (match_add_operand, match_level_5): Likewise.
6388 * module.c (parse_atom, find_enum): Likewise.
6389 * resolve.c: move #include <string.h>
6390 (resolve_select): Fix serious typo.
6392 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
6394 * Make-lang.in: Don't build with broken tree-ssa-pre.
6396 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
6398 * resolve.c (resolve_index): Add a TODO.
6399 * symbol.c: Remove useless "#include <ctype.h>".
6401 2003-01-27 Paul Brook <paul@nowt.org>
6403 * check.c (check_rest): Allow different type kinds as an extension.
6404 * g95.h (g95_resolve_f): Add f1m.
6405 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
6406 * intrinsic.h: Chenge prototypes for MIN and MAX.
6407 * iresolve.c (g95_resolve_minmax): New function.
6408 (g95_resolve_min, g95_resolve_max): Use it.
6409 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
6411 (g95_conv_intrinsic_present): Fix logic.
6413 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
6415 * g95.h (g95_case): Don't be a tree, be a double linked list.
6416 * match.c (match_case_selector): Remove redundant semantics check.
6417 Clean up a few goto's to make it a tiny little bit faster.
6418 * resolve.c (case_tree): Die.
6419 (compare_cases): Accept and compare unbounded cases too.
6420 (check_case_overlap): Don't build a tree. Instead, merge-sort the
6421 whole list of g95_cases passed from resolve_select.
6422 (sane_logical_select): Die.
6423 (check_case_expr): Return FAILURE if a CASE label is of the wrong
6425 (resolve_select): Fixup case expression for computed GOTOs, put it
6426 in expr, not expr2, for easier handing in the parse tree dumper and
6427 the code generator. Rewrite the rest of the function: Kill
6428 unreachable case labels and unreachable case blocks.
6429 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
6430 an EXEC_SELECT, not case2 anymore.
6431 * trans-const.c (g95_conv_constant_to_tree): New function.
6432 (g95_conv_constant): Use it.
6433 * trans-const.h: Declare prototype for the new function.
6434 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
6435 g95_trans_character_select): New static functions.
6436 (g95_trans_select): Rewrite.
6438 2003-01-26 Paul Brook <paul@nowt.org>
6440 * intrinsic.c (add_fnctions): Properly add dreal.
6441 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
6442 (g95_conv_intrinsic_function): Use it.
6443 * trans-io.c (build_dt): Abort on internal files (unimplemented).
6445 2003-01-26 Paul Brook <paul@nowt.org>
6447 Widespread changes to the handling of symbols in expressions. These
6448 are now linked via g95_symtree nodes.
6449 * parse.c (g95_fixup_sibling symbols): New function.
6450 (parse_contained): Use it.
6451 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
6452 contained procedure that has bee correctly fixed up.
6453 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
6455 2003-01-24 Paul Brook <paul@nowt.org>
6457 * trans-array.c (g95_walk_expr): Function result attributes are in
6459 * trans-expr.c (g95_conv_function_call,
6460 g95_trans_arrayfunc_assign): Ditto.
6461 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
6463 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
6465 * expr.c (check_restricted): Fix error message.
6466 * symbol.c (free_st_labels): Plug memleak.
6468 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
6470 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
6471 reduce_binary_aa, reduce_binary, eval_intrinsic,
6472 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
6473 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
6474 for typesafe intrinsics helper functions.
6475 (g95_intrinsic_sym): Use them.
6476 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
6477 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
6478 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
6479 check_specific, g95_intrinsic_func_interface,
6480 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
6482 * trans-decl.c (g95_get_extern_function_decl): Likewise.
6483 * Make-lang.in: Don't disable warnings for strict prototypes
6484 any longer, everything is typesafe now.
6486 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
6488 * bbt.c (duplicate_node): Make static.
6489 * module.c (module_name): Make static.
6490 * scanner.c (include_dirs): Make static.
6492 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
6494 Hard coded _gfor_'s should not show up anymore.
6495 * g95.h (PREFIX): New macro.
6496 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
6498 (g95_resolve_random_number): Likewise.
6499 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
6500 * trans-io.c: Remove 'prefix' macro. Replace all uses with
6501 the new PREFIX macro from g95.h.
6503 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
6505 The troubles of forking... Andy implemented this just now too.
6506 Let's stick to that and keep the trees close.
6507 * g95.h (g95_st_label): 'format' member is now a g95_expr.
6508 * io.c: Revert previous changes.
6509 (g95_match_format): Match the format string as a character
6511 * match.h (g95_statement_label): Declare external.
6512 * parse.c: Revert previous changes.
6513 * symbol.c (g95_free_st_label): Free a g95_expr instead
6515 * trans-io.c: Revert previous changes.
6516 (build_dt): Use set_string to set the format string.
6518 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
6520 * io.c (format_string): Make non-static.
6521 (g95_match_format): Remember the format string.
6522 (terminate_io): Add I/O termination for empty I/O lists.
6523 * match.h: Declare external format_string.
6524 * parse.c (check_statement_label): Attack the format string
6525 to a format label for FORMAT statements.
6526 * trans-io.c (g95_add_field): Define prefix macro. Replace
6527 all uses of PREFIX define with a use of this macro.
6528 (build_dt): Implement formatted I/O for format labels.
6530 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
6532 * lang-options.h: Kill "-std=F".
6533 * options.c: Remove unimplemented "-std=F". Modify
6535 * misc.c (g95_terminal_width): New function.
6536 * error.c (g95_error_init_1): Use g95_terminal_width.
6537 * g95.h: Add prototype for g95_terminal_width, remove
6540 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
6542 * Make-lang.in: Fix typo.
6544 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
6546 * g95.h (struct g95_case): Remove unused cruft, new member
6547 'where' to keep track of the locus of the default case.
6548 * match.c (g95_match_case): Add locus to the current case.
6549 (match_case_selector): Likewise.
6550 * parse.c (parse_select_block): Move semantics check for
6551 multiple DEFAULT cases out of here to...
6552 * resolve.c (check_case_overlap): ...here. Return sooner
6554 (check_case_expr): Take two g95_cases now, use to sure the
6555 expression kinds are the same.
6556 (resolve_select): Cleanup.
6558 2003-01-18 Paul Brook <paul@nowt.org>
6560 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
6561 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
6563 (g95_get_extern_function_decl): Put decls in the correct context.
6565 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
6567 * trans-io.c: Port changes from Andy to set ERR flag.
6569 2003-01-17 Paul Brook <paul@nowt.org>
6571 * trans-array.c: Add various comments.
6572 (g95_ss_terminator): Declare as const.
6573 (g95_walk_expr): Remove first parameter and update all callers.
6574 (g95_walk_op_expr): Initialize scalar SS properly.
6575 * trans-array.h (g95_walk_expr): Update prototype.
6576 * trans-expr.c: Update for new g95_walk_expr.
6577 * trans-intrinsic.c: Ditto.
6578 * trans-io.c: Ditto.
6579 * trans.h: Various comments for SS chains.
6581 2003-01-17 Paul Brook <paul@nowt.org>
6583 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
6585 * intrinsic.c (add_functions): Use them.
6586 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
6587 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
6589 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
6591 Fallout of a small merge conflict:
6592 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
6594 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
6596 * initrinsic.c: New add_sym_* functions for strong typing.
6597 (add_conv): Make prototype strict.
6598 * dump-parse-tree.c, dependency.c: Include config.h
6599 * resolve.c, trans-io.c: Fix typos.
6601 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
6603 * dump-parse-tree.c (g95_show_code_node): Show the
6604 condition for a computed GOTO that was transformed
6605 to a SELECT CASE construct.
6606 * resolve.c (check_case_overlap): Revert previous switch
6607 to treaps, it was too slow and didn't catch all trouble.
6608 (resolve_symbol): Be more flexible about module procedures.
6609 * symbol.c (check_conflict): Point to relevant section in
6610 the standard for dubious conflict. Allow procedure
6611 dummy arguments to be optional again.
6612 * trans-io (add_field): Rename to g95_add_field. Change
6614 * trans-stmt (trans_select): Handle unbounded cases for
6615 integer SELECT CASE constructs. Fix/add more comment.
6617 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
6619 * g95.h: Uses GCC's function attribute macros.
6620 * error.c, module.c, parse.c, g95.h: More function attributes.
6622 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
6624 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
6625 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
6628 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
6630 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
6632 * trans.c (g95_trans_code): Use annotate_all_with_file_line
6633 instead of nowdead wrap_all_with_wfl.
6635 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
6637 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
6638 before generating code, so we can still see it even if the code
6639 generation phase dies.
6641 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
6643 * decl.c (build_sym): Split out initialization expression parts...
6644 (add_init_expr_to_sym): ...to here.
6645 (variable_decl): Add the symbol following an attribute list to the
6646 symbol tree before parsing the optional initialization expression
6647 if the symbol is not of a derived type.
6648 * primary.c (g95_match_rvalue): Don't assume a symbol always has
6649 a value if it is a PARAMETER.
6651 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
6653 * misc.c: Don't #include <mcheck.h>
6654 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
6655 ever was a glibc bug, then either this was never reported to
6656 glibc people, or it has been fixed for so long that there's
6657 no information you can find about it, anywhere.
6659 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
6662 * module.c (attr_bits, bt_types, array_spec_types):
6663 Switch 'const' and 'static'.
6664 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
6666 GNU'ify source code:
6667 * trans-io.c: Numerous fixes, one fixed warning and a few
6668 TODO markers so that we don't forget about them.
6670 2003-01-13 Paul Brook <paul@nowt.org>
6672 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
6673 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
6675 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
6676 * match.c (g95_match_stop): Fix dumb == -> != error.
6678 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
6680 * dump-parse-tree.c (show_indent): Add line breaks. This
6681 whole dumping process needs cleanups.
6682 * f95-lang.c (g95_mark_addressable): Fix prototype to match
6683 the langhook. Fix 'return's accordingly.
6684 * g95-support.h: Adjust prototype.
6685 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
6686 * lang-options.h: Add '-fsyntax-only'.
6687 * options.c (g95_init_options): Init 'no_backend'.
6688 (g95_parse_arg): Deal with '-fsyntax-only'.
6689 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
6692 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
6694 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
6695 arguments. Also make sure that if a symbol is marked INTRINSIC,
6696 an intrinsic with the symbol's name actually exists.
6697 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
6698 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
6699 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
6701 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
6703 * resolve.c (resolve_contained_functions): Fix condition, don't
6704 throw internal_error if a child namespace has no name. Apparently
6705 this can be the case?
6707 2003-01-11 Paul Brook <paul@nowt.org>
6709 Port changes from Andy's tree:
6710 * g95.h (g95_code): Add stop_code.
6711 * match.c (g95_match_stop): Detter syntax checking.
6712 * resolve.c (resolve_generic_f0): Return match type.
6713 (resolve_generic_f): Remove dead/duplicated code.
6714 (resolve_specific_f): Ditto.
6715 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
6716 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
6717 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
6719 2003-01-11 Paul Brook <paul@nowt.org>
6721 * trans-array.c: Various documentation/comment changes.
6722 * trans-stmt.c: Ditto.
6725 2003-01-10 Paul Brook <paul@nowt.org>
6727 * options.c/h: Add -fdump-parse-tree as alias of -v.
6729 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6731 * dump-parse-tree.c (g95_show_namespace): Fixed another
6732 typo. Sorry, it's Friday...
6734 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6737 * trans-array.c, trans-array.h, trans.c, trans-const.c,
6738 trans-const.h, trans-decl.c, trans-expr.c, trans.h
6739 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
6740 trans-types.c: Fix bogus copyright years, add 2003.
6741 * trans-types.h: Give copyright header.
6743 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6745 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
6746 * expr.c, options.c, scanner.c: Add some more 'const' markers.
6747 * intrinsic.c: Some constant strings moved to read-only memory.
6748 * io.c (format_asterisk): Move to...
6751 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6753 * dump-parse-tree.c (g95_show_namespace): Dump implicit
6754 types for ranges instead of per-letter. Indent the
6755 'CONTAINS' just like everything else.
6756 * resolve.c (resolve_contained_functions): Clarify comment.
6757 Explain non-obvious conditional expression. Improve
6758 diagnostics if tyoe cannot be resolved.
6759 Port semi-fix from Andy's tree:
6760 (was_declared): Move up before first use.
6761 (generic_sym, specific_sym): New functions. Code moved
6762 out if procedure_kind.
6763 (procedure_kind): Simplify using new functions.
6764 (resolve_generic_f): Make sure the functions we find in
6765 a parent namespace is generic.
6766 (resolve_specific_f): Ditto for specific functions.
6768 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6770 * trans-stmt.c, trans.c: Fix some code style issues. Add
6771 some more comment (but still not enough!).
6773 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6775 * symbol.c (flavors, procedures, intents, acces_types,
6776 access_types, ifsrc_types): Make const.
6777 * misc.c (g95_string2code): Make 'm' param 'const'.
6778 * module.c (find_enum, write_atom, mio_name): Make
6780 (attr_bits, bt_types, array_spec_types, array_ref_types,
6781 ref_types, expr_types): Make const.
6782 * g95.h: Adjust external decls.
6784 2003-01-09 Paul Brook <paul@nowt.org>
6786 * Testsuite: Add a load of new cases.
6788 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
6790 * Make-file.in: Add dependency on back end header files;
6791 a parallel build should work now.
6792 * f95-lang-c (lang_identifier): Remove bogus comment.
6793 (g95_be_parse_file): Fix prototype.
6794 (g95_init): Make static.
6795 (g95_finish): Make static.
6796 * error.c (g95_syntax_error): Kill. Make define in...
6797 * g95.h (g95_syntax_error): Define.
6798 (g95.options): Make 'source' member 'const'.
6799 * interface.c (g95_match_interface): Explain
6800 hard-to-read condition.
6801 (g95_match_end_interface): Ditto.
6802 * trans_const.c (g95_build_string_const): Make 's' parameter
6804 * trans_const.h: Adjust protoype accordingly.
6805 * trans-decl.c: Include tree-dump.h
6806 (g95_generate_function_code): Build fixes for recent changes
6807 in the tree-ssa branch.
6809 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
6811 * format.c: Kill, move code from here...
6813 * Make-lang.in: Adjust.
6816 * BUGS: Mention where to submit bugs. Move old content...
6817 * TODO: ...to here. New file.
6819 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
6820 Fix most warnings, and suppress the ones we can't fix for now.
6821 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
6822 these warnings just clutter the screen and there's not much
6823 we can do about them for now anyway.
6824 * check.c, iresolve.c: Mark unused function parameters.
6825 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
6826 they should be resolved before they get here.
6827 * error.c: Remove unused FILE *status_out.
6828 * f95-lang.c (g95_init): Remove bogus cast.
6829 * Many files: Make things 'const' where required.
6830 * g95.h: Fix prototypes for all modified functions above.
6831 (g95_options): Remove 'object' member.
6833 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
6835 * Make-file.in: Cleanup bogus targets. Add more comment.
6836 * lang-options.h: New option '-w'.
6837 * g95.h: add no_options field to struct g95_options.
6838 * options.c (g95_init_options): Default no_warnings to off.
6839 (g95_parse_arg): Recognise the '-w' switch and its alias,
6841 * error.c (g95_warning, g95_warning_now): Don't emit warning if
6842 no_warning option is set.
6843 * iresolve.c (g95_resolve_shape): Fix warning.
6845 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
6847 * primary.c (g95_next_string_char): Rename next_string_char, and
6848 make static. Adjust callers accordingly.
6849 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
6850 callers accordingly.
6851 * g95.h: Split out all g95_match* functions to...
6852 * match.h: ...here. New file.
6853 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
6854 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
6856 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
6858 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
6859 g95_merge_new_implicit): New functions.
6860 (g95_match_implicit_none, g95_match_implicit): Move from here...
6861 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
6862 Modify to use the new functions in symbol.c.
6863 * g95.h: Add and move prototypes.
6865 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6867 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
6868 node compare function.
6869 (g95_insert_bbt): Likewise.
6870 (g95_insert_bbt_with_overlap): Likewise.
6871 (g95_delete_bbt): Likewise.
6872 (delete_treap): Likewise. Also fix a potential bug when calling it.
6873 * module.c (compare_pointers): Change proto to compare_fn.
6874 (compare_integers): Likewise.
6875 (compare_true_names): Likewise.
6876 (find_true_name): Adjust call to compare_true_names to match proto.
6877 (require_atom, write_atom, mio_name): Fix 'const' warnings.
6878 (init_pi_tree): Make compare a compare_fn instead of (int *).
6879 * resolve.c (compare_cases): Change proto to compare_fn.
6880 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
6881 it static, and rename to compare_symtree.
6882 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
6884 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
6885 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
6887 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6888 * Make-lang.in: Fix spaces/tabs issues from previous patch.
6889 * patch.options: Blow away Paul's checkin mistake :-)
6890 * io.c (terminate_io): Fix memory leak (Arnaud).
6892 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6894 * Make-lang.in: Teach about building DVI, info manual.
6895 * g95.texi: New file.
6897 2003-01-02 Paul Brook <paul@nowt.org>
6899 * trans-array.c (g95_reverse_ss): Make static and don't use.
6900 (g95_conv_ss_descriptor): Don't use g95_loopinfo
6901 (g95_conv_array_parameters): Modify for pointer assignments.
6902 (g95_walk_subexpr): New function.
6903 (g95_walk_expr*): Use it.
6904 * trans-array.h (g95_reverse_ss): Remove prototype.
6905 * trans-expr.c (g95_trans_pointer_assign): Implement.
6906 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
6907 * trans-intrinsic.c: Sync with scalarizer changes.
6908 * trans-io.c: Ditto.
6910 2002-12-29 Paul Brook <paul@nowt.org>
6912 * trans-array.c: Document calling convention for arrays.
6914 2002-12-19 Paul Brook <paul@nowt.org>
6916 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
6917 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
6918 optional parameters for some intrinsics.
6919 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
6920 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
6921 optional parameters.
6922 * trans.h (g95_se): Add ignore_optional flag.
6924 2002-12-15 Paul Brook <paul@nowt.org>
6926 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
6927 * trans-decl.c (g95_generate_function_code): Use TDI_original.
6929 2002-12-14 Paul Brook <paul@nowt.org>
6931 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
6933 2002-12-12 Paul Brook <paul@nowt.org>
6935 * trans-array.c (g95_trans_array_constructor_subarray): Fully
6936 initialize the scalarizer.
6937 (various): Update to new format of g95_expr->value.constructor.
6939 2002-12-08 Paul Brook <paul@nowt.org>
6941 * trans-array.c (g95_put_offset_into_var): New function.
6942 (g95_trans_array_constructor_subarray): New function.
6943 (g95_trans_array_constructor_value): Use it.
6944 (g95_array_cons_size): Don't abort() on array components.
6946 2002-12-08 Paul Brook <paul@nowt.org>
6948 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
6949 * support.c: Update #includes.
6950 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
6951 * trans-array.c: Update #includes.
6953 * trans-const.c: Ditto.
6954 * trans-io.c: Ditto.
6955 * trans-types.c: Ditto.
6956 (g95_init_types): Set size_type_node.
6957 * trans-decl.c: Update #includes.
6958 (gfor_fndecl_adjust{l,r}): Declare and initialize.
6959 * trans-stmt.c: Update #includes.
6960 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
6961 (g95_trans_select): Fix check for unbounded ranges.
6962 * trans-expr.c: Update #includes.
6963 (g95_conv_string_tmp): New function.
6964 (g95_conv_concat_op): Use it.
6965 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
6966 * Trans-intrisic.c: Update #includes.
6967 (g95_conv_intrinsic_strcmp): New function.
6968 (g95_conv_intrinsic_adjust): Ditto.
6969 (g95_conv_intrinsic_function: Use them.
6971 2002-11-30 Paul Brook <paul@nowt.org>
6973 * trans-array.c (g95_walk_function_expr): Handle non-array return by
6975 * trans-dec.c (g95_build_function_decl): Handle character return
6977 (g95_get_fake_result_decl): Ditto.
6978 (g95_trans_deferred_vars): Ditto.
6979 * trans-expr.c (g95_conv_function_call): Ditto.
6980 (g95_trans_arrayfunc_assign) Limit to array valued functions.
6981 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
6982 (g95_conv_intrinsic_function): Use it.
6983 * trans-types.c (g95_sym_type): Handle functions returning strings.
6984 (g95_return_by_reference): Ditto.
6985 (g95_get_function_type): Ditto.
6987 2002-11-18 Paul Brook <paul@nowt.org>
6989 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
6990 requires a temporary.
6991 (g95_trans_select): Handle computed gotos.
6992 * trans-types.c (g95_build_array_type): Warn about non-functional
6993 assumed shape arrays.
6994 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
6996 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
6997 (g95_conv_intrinsic_int): New function.
6998 (g95_conv_intrinsic_mod): New function.
6999 (g95_conv_intrinsic_ichar): New function.
7000 (g95_conv_intrinsic_function): Use them.
7001 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
7003 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
7005 * trans-types.c (g95_build_array_type): Assumed
7006 sized arrays can have rank > 1.
7007 * trans.c (g95_trans_code): Remove erroneous
7008 warning about CONTINUE.
7009 * trans-expr.c (g95_conv_variable): Remove
7012 2002-11-15 Paul Brook <paul@nowt.org>
7014 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
7016 2002-10-31 Paul Brook <paul@nowt.org>
7018 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
7019 * trans-expr.c (g95_conv_component_ref): Handle character string
7021 (g95_conv_string_parameter): Ditto.
7022 * trans-types.c (g95_get_derived_type): Add length decl to caracter
7025 2002-10-10 Paul Brook <paul@nowt.org>
7027 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
7028 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
7030 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
7031 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
7032 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
7033 * trans-types.c (pvoid_type_node): Declare and initialize.
7034 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
7035 (g95_array_allocate): Fix when base==data.
7036 (g95_conv_array_parameter): Correctly handle reduced rank sections.
7037 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
7039 2002-10-09 Paul Brook <paul@nowt.org>
7041 * (g95_conv_expr_reference): Handle character strings correctly.
7043 2002-10-07 Paul Brook <paul@nowt.org>
7045 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
7047 * trans-array.c (g95_build_array_initializer): Remove.
7048 (g95_conv_array_initializer): New Function.
7049 (g95_trans_auto_arry_allocation): Cleanup.
7050 (g95_trans_init_character_array): Remove.
7051 * g95spec.c: Link in libgforbegin.
7052 * trans.c (g95_generate_code): Rename main function to MAIN__.
7053 (g95_create_var): New function.
7054 (g95_create_var_np): New function.
7055 (g95_evaluate_now): New function.
7056 (g95_start_block): New function.
7057 (g95_finish_block): New function.
7058 (g95_add_expr_to_block): New function.
7059 (g95_add_block_to_block): New function.
7060 * trans-expr.c (g95_conv_componen_ref): New function.
7061 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
7062 (F95_OBJS): Add dependency.o.
7063 * f95-lang.c (g95_is_simple_stmt): Remove.
7064 * f95-tree.c (mark_not_simple): New function.
7065 (unshare_all_trees): New function.
7066 (create_tmp_var, create_tmp_alias_var): Remove.
7067 * support.c (declare_tmp_vars, tree_last_decl): Remove.
7068 * trans*: Convert to new IR using GENERIC trees. Don't bother about
7069 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
7071 2002-10-01 Paul Brook <paul@nowt.org>
7073 * trans-array.c: Add support for descriptorless arrays.
7074 (g95_conv_array_data): New function.
7075 (g95_conv_array_base): New function.
7076 * trans-array.h: Declare these here.
7077 * trans-decl.c(g95_create_mopdule_variable): Perform variable
7078 initialization and creation here.
7079 (g95_create_module_vars): Instead of here.
7080 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
7081 * trans-intrinsic.c: Ditto.
7082 * trans-types.c (g95_is_nodesc_array): New function.
7083 (g95_get_nodesc_array_type): New function.
7084 (g95_sym_type, g95_get_derived_type): Use them.
7085 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
7087 2002-09-28 Paul Brook <paul@nowt.org>
7089 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
7090 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
7093 2002-09-24 Paul Brook <paul@nowt.org>
7095 * f95-lang.c (listify): Remove declaration.
7096 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
7098 * f95-tree.c (get_name): New function.
7099 * trans.c (module_namespace): Remove.
7100 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
7101 * trans-types.c: Ditto.
7103 2002-09-19 Paul Brook <paul@nowt.org>
7105 * trans-array.c (g95_get_array_cons_size): New Function.
7106 (g95_con_ss_startstride): Handle Array constructors.
7107 (g95_conv_loop_setup): Ditto.
7108 (g95_conv_array_parameter): Ditto.
7109 * tras-decl.c (g95_finish_var_decl): Make initializes variables
7112 2002-09-19 Paul Brook <paul@nowt.org>
7114 * trans.c (g95_simple_fold_tmp): Detect variables inside
7116 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
7118 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
7120 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
7122 2002-09-14 Paul Brook <paul@nowt.org>
7124 * trans.c (g95_create_module_variable): Move to trans-decl.c.
7125 * trans-const.c (g95_conv_string_init): New Function.
7126 * trans-const.h: Declare it.
7127 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
7128 variables. Don't bail on intrinsic symbols.
7129 (get_extern_function_decl): Handle specific intrinsic functions.
7130 * trans-types.c (g95_sym_type): Dummy functions don't return
7132 * trans-array.c (g95_build_array_initializer): New Function.
7133 (g95_trans_auto_array_allocation): Build initializer for static decls.
7134 Don't use mpz_addmul, it's GMP4 only.
7136 2002-09-12 Paul Brook <paul@nowt.org>
7138 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
7139 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
7140 assembler names for module procedures.
7142 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
7144 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
7147 2002-09-10 Paul Brook <paul@nowt.org>
7149 * trans-array.c: Change format of G95_SS_TEMP strictures.
7150 (g95_check_fncall_dependancy): New function.
7151 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
7153 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
7155 (g95_build_function_decl): Don't assume result arrays are packed.
7156 (g95_trans-deferred-vars): Handle array result variables.
7157 (g95_generate_fuction_code): Clear saved_function_decls.
7158 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
7160 (g95_trans_arrayfunc_assign): New function.
7161 (g95_trans_assignment): Use it.
7162 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
7163 (g95_se): Add direct_byref.
7164 * trans-types.c: Use sym->result rather than sym where appropriate.
7165 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
7166 Update other functions to use this.
7167 (g95_is_intrinsic_libcall): New function.
7168 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
7169 (g95_walk_intrinsic_function): Ditto.
7171 2002-09-08 Paul Brook <paul@nowt.org>
7173 * trans-types.c: Change rank field to dtype field in array descriptor.
7174 * trans-array.c: Implement filling of dtype array descriptor field.
7175 * trans-intrinsic.c: Fix broken LEN intrinsic.
7177 2002-09-07 Paul Brook <paul@nowt.org>
7179 * trans-intrinsic.c: Remove outdated todo intrinsic list.
7180 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
7181 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
7183 2002-09-06 Paul Brook <paul@nowt.org>
7185 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
7186 (gt-f95-trans-types.h): Add dependancy information.
7187 * config-lang.in (gtfiles): Add trans-types.c
7188 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
7189 back to top-level code.
7190 * trans-array.c, trans-types.c: Change format of array descriptor.
7191 (g95_conv_descriptor_dimension): New function.
7192 * trans-types.h (g95_conv_descriptor_rank): define.
7193 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
7196 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
7198 * trans-array.c, trans-types.c: Add rank information to descriptor.
7200 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
7202 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
7204 2002-09-04 Paul Brook <paul@nowt.org>
7206 * f95-lang.c (g95_create_decls): New function.
7207 (g95_init): Move initialization of external decls to above, and call
7208 from g95_be_parse_file.
7209 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
7210 * trans-types.c (g95_init_types): Always name integer and char types.
7211 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
7213 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
7215 * Make-lang.in: Add options.c to F95_PARSER_OBJS
7217 2002-09-02 Paul Brook <paul@nowt.org>
7219 * g95_generate_code: Clear the attr for __fortran_main.
7220 * trans-types.c (g95_finish_type): New function.
7221 * g95_init_io_state_type: Use g95_finish_type.
7222 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
7224 2002-09-01 Paul Brook <paul@nowt.org>
7226 * README.backend: Warn about the dangers of extra config.h files.
7227 Remove obsolete libgfor stuff.
7228 * config-lang.in: Add target-libgfor dependancy.
7229 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
7231 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
7233 * g95_conv_mpz_to_tree: Free storage pointed to by q,
7236 2002-08-30 Paul Brook <paul@nowt.org>
7238 * trans-intrinsic.c (g95_conv_intrinsic_function,
7239 g95_walk_intrinsic_function): Added ANY and ALL.
7240 (g95_conv_intrinsic_anyall): New function.
7241 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in