1 2005-08-14 Paul Thomas <pault@gcc.gnu.org>
4 * io.c (match_io): Add code to implement PRINT namelist.
6 2005-08-14 Canqun Yang <canqun@nudt.edu.cn>
8 * trans-stmt.c (gfc_trans_arithmetic_if): Optimized in case of equal
11 2005-09-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
12 Steven Bosscher <stevenb@suse.de>
15 * gfortran.h: Add is_main_program member to symbol_attribute.
16 * trans-decl: Add a gfor_fndecl_set_std tree.
17 (gfc_build_builtin_function_decls): Create it.
18 (gfc_generate_function_code): Add this call at the beginning of
20 * trans.c (gfc_generate_code): Move main_program and attr.
21 * trans.h: Add declaration for gfor_fndecl_set_std.
23 2005-08-10 Thomas Koenig <Thomas.Koenig@online.de>
26 gfortran.h: Declare new function gfc_resolve_dim_arg.
27 resolve.c: New function gfc_resolve_dim_arg.
28 iresolve.c (gfc_resolve_all): Use gfc_resolve_dim_arg.
29 (gfc_resolve_any): Likewise.
30 (gfc_resolve_count): Likewise.
31 (gfc_resolve_cshift): Likewise. If the kind of shift is less
32 gfc_default_integer_kind, convert it to default integer type.
33 (gfc_resolve_eoshift): Likewise.
34 (gfc_resolve_maxloc): Use gfc_resolve_dim_arg.
35 (gfc_resolve_maxval): Likewise.
36 (gfc_resolve_minloc): Likewise.
37 (gfc_resolve_minval): Likewise.
38 (gfc_resolve_product): Likewise.
39 (gfc_resolve_spread): Likewise.
40 (gfc_resolve_sum): Likewise.
42 2005-08-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
44 * check.c (gfc_check_ttynam_sub, gfc_check_isatty): Add check
45 functions for new intrinsics TTYNAM and ISATTY.
46 * intrinsic.c (add_functions, add_subroutines): Add new
48 * intrinsic.h: Add prototypes for new check and resolve
50 * iresolve.c (gfc_resolve_isatty, gfc_resolve_ttynam_sub): New
51 resolve functions for intrinsics TTYNAM and ISATTY.
52 * gfortran.h (gfc_generic_isym_id): Add symbol for ISATTY.
53 * trans-intrinsic.c: Add case for GFC_ISYM_ISATTY.
55 2005-08-09 Jakub Jelinek <jakub@redhat.com>
57 * scanner.c (preprocessor_line): Don't write beyond the end of flag
60 2005-08-07 Janne Blomqvist <jblomqvi@cc.hut.fi>
63 * dump-parse-tree.c (gfc_show_code_node): Add case for FLUSH.
64 * gfortran.h: Add enums for FLUSH.
65 * io.c (gfc_free_filepos,match_file_element,match_filepos): Modify
66 comment appropriately. (gfc_match_flush): New function.
67 * match.c (gfc_match_if): Add match for flush.
68 * match.h: Add prototype.
69 * parse.c (decode_statement): Add flush to 'f' case.
70 (next_statement): Add case for flush. (gfc_ascii_statement): Likewise.
71 * resolve.c (resolve_code): Add flush case.
72 * st.c (gfc_free_statement): Add flush case.
73 * trans-io.c: Add prototype for flush.
74 (gfc_build_io_library_fndecls): Build fndecl for flush.
75 (gfc_trans_flush): New function.
76 * trans-stmt.h: Add prototype.
77 * trans.c (gfc_trans_code): Add case for flush.
79 2005-08-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
81 * primary.c (match_hollerith_constant): Fix typo.
83 2005-08-06 Kazu Hirata <kazu@codesourcery.com>
85 * decl.c, dump-parse-tree.c, gfortran.texi, intrinsic.texi,
86 invoke.texi, resolve.c, trans-array.c, trans-array.h,
87 trans-common.c, trans-expr.c, trans-io.c, trans.h: Fix
88 comment/doc typos. Follow spelling conventions.
90 2005-08-06 Jakub Jelinek <jakub@redhat.com>
94 * primary.c (match_varspec): If equiv_flag, don't look at sym's
95 attributes, call gfc_match_array_ref up to twice and don't do any
96 substring or component processing.
97 * resolve.c (resolve_equivalence): Transform REF_ARRAY into
98 REF_SUBSTRING or nothing if needed. Check that substrings
99 don't have zero length.
101 2005-08-05 Thomas Koenig <Thomas.Koenig@online.de>
103 * trans-expr.c (gfc_build_builtin_function_decls): Mark
104 stop_numeric and stop_string as non-returning.
106 2005-08-04 Paul Brook <paul@codesourcery.com>
108 * trans-expr.c (gfc_conv_expr, gfc_conv_expr_type): Update comments.
109 (gfc_conv_expr_lhs): Fix assertion.
110 (gfc_conv_expr_val): Merge post block. Set se.expr to new value.
112 2005-08-02 David Edelsohn <edelsohn@gnu.org>
115 * expr.c (simplify_parameter_variable): Do not copy the subobject
116 references if the expression value is a constant.
118 * expr.c (gfc_simplify_expr): Evaluate constant substrings.
120 2005-07-31 Jerry DeLisle <jvdelisle@verizon.net>
122 * intrinsic.texi: Add documentation for exponent, floor, and fnum and
123 fix description of ceiling in index.
125 2005-07-31 Steven Bosscher <stevenb@suse.de>
127 * trans-decl.c (gfc_build_builtin_function_decls): Give the internal
128 malloc functions the 'malloc' attribute. Give runtime_error the
129 'noreturn' attribute.
131 2005-07-31 Steven Bosscher <stevenb@suse.de>
133 * trans-stmt.c (gfc_trans_goto): Jump to the known label instead
134 of the assigned goto variable.
136 2005-07-29 Steven Bosscher <stevenb@suse.de>
138 * trans-types.h (gfc_array_range_type): Add missing GTY decl for this.
140 2005-07-28 Andrew Pinski <pinskia@physics.uc.edu>
142 * fortran/f95-lang.c (language_function): Remove
143 named_labels, shadowed_labels, returns_value, returns_abnormally,
144 warn_about_return_type, and extern_inline fields.
145 (named_labels): Remove variable.
146 (gfc_init_decl_processing): Remove setting of named_labels.
148 2005-07-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
151 * resolve.c (resolve_operator): Improve diagnostic for comparison
152 of logicals with invalid operator.
154 2005-07-25 Jakub Jelinek <jakub@redhat.com>
157 * data.c (gfc_assign_data_value_range): Call
158 create_character_initializer if last_ts is a character type.
160 2005-07-22 Manfred Hollstein <mh@suse.com>
162 * match.c (gfc_match_symbol): Fix uninitialised warnings.
163 * matchexp.c (gfc_match_expr): Likewise.
165 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
167 Make CONSTRUCTOR use VEC to store initializers.
168 * trans-array.c (gfc_build_null_descriptor,
169 gfc_trans_array_constructor_value, gfc_conv_array_initializer):
170 Update to cope with VEC in CONSTRUCTOR_ELTS.
171 * trans-common.c (create_common): Likewise.
172 * trans-expr.c (gfc_conv_structure): Likewise.
173 * trans-stmt.c (gfc_trans_character_select): Use
174 build_constructor_from_list instead of build_constructor.
176 2005-07-19 Paul Thomas <pault@gcc.gnu.org>
179 * resolve.c (resolve_symbol): A symbol with FL_UNKNOWN
180 is matched against interfaces in parent namespaces. If there
181 the symtree is set to point to the interface.
183 2005-07-16 David Edelsohn <edelsohn@gnu.org>
186 * decl.c (do_parm): Adjust character initializer to character length
187 of symbol before assigning.
189 2005-07-14 Steve Ellcey <sje@cup.hp.com>
191 * trans-types.c (MAX_REAL_KINDS): Increase from 4 to 5.
193 2005-07-14 Jakub Jelinek <jakub@redhat.com>
195 * gfortran.h (MAX_ERROR_MESSAGE): Remove.
196 (gfc_error_buf): Add allocated and index fields. Change message
197 field from array to a pointer.
198 * error.c (use_warning_buffer, error_ptr, warning_ptr): Remove.
199 (cur_error_buffer): New variable.
200 (error_char): Use cur_error_buffer->{message,index} instead of
201 {warning,error}_{buffer.message,ptr}. Reallocate message buffer
203 (gfc_warning, gfc_notify_std, gfc_error, gfc_error_now): Setup
204 cur_error_buffer and its index rather than {warning,error}_ptr
205 and use_warning_buffer.
206 (gfc_warning_check, gfc_error_check): Don't print anything if
208 (gfc_push_error): Allocate saved message with xstrdup.
209 (gfc_pop_error): Free saved message with gfc_free.
210 (gfc_free_error): New function.
211 * primary.c (match_complex_constant): Call gfc_free_error if
212 gfc_pop_error will not be called.
213 * match.c (gfc_match_st_function): Likewise.
216 * scanner.c (preprocessor_line): Don't treat flag 3 as the start of a new
217 file. Fix file left but not entered warning.
219 2005-07-14 Feng Wang <fengwang@nudt.edu.cn>
220 Steven G. Kargl <kargls@comcast.net>
222 * array.c (resolve_character_array_constructor): Allocate gfc_charlen
223 for the array and attach to namespace list for automatic deallocation.
225 2005-07-13 Andreas Schwab <schwab@suse.de>
227 * Make-lang.in (fortran/dependency.o): Depend on
228 $(GFORTRAN_TRANS_DEPS).
230 2005-07-11 Jakub Jelinek <jakub@redhat.com>
232 * trans-stmt.c (gfc_trans_forall_loop): Clear maskindex before
234 (gfc_trans_assign_need_temp, gfc_trans_pointer_assign_need_temp,
235 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_2):
236 Don't clear maskindexes here.
238 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
240 * trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN
243 2005-07-08 Jakub Jelinek <jakub@redhat.com>
245 * primary.c (gfc_match_rvalue): Handle ENTRY the same way
248 2005-07-07 Jakub Jelinek <jakub@redhat.com>
250 * scanner.c (load_line): Add pbuflen argument, don't make
251 buflen static. If maxlen == 0 or preprocessor_flag,
252 don't truncate at buflen, but at maxlen. In xrealloc add
253 1 byte at the end for the terminating '\0'. Don't fill
254 with spaces up to buflen, but gfc_option.fixed_line_length.
255 (load_file): Adjust load_line caller. Add line_len variable.
257 * scanner.c (preprocessor_line): Only set current_file->line when errors
258 have not been encountered. Warn and don't crash if a file leave
259 preprocessor line has no corresponding entering line. Formatting.
261 2005-07-07 Steven Bosscher <stevenb@suse.de>
263 * primary.c (match_hollerith_constant): Use int, not unsigned int,
264 for the hollerith length. Fix indentation.
266 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
271 * arith.c (gfc_hollerith2int, gfc_hollerith2real,
272 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
274 (eval_intrinsic): Don't evaluate if Hollerith constant arguments exist.
275 * arith.h (gfc_hollerith2int, gfc_hollerith2real,
276 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
278 * expr.c (free_expr0): Free memery allocated for Hollerith constant.
279 (gfc_copy_expr): Allocate and copy string if Expr is from Hollerith.
280 (gfc_check_assign): Enable conversion from Hollerith to other.
281 * gfortran.h (bt): Add BT_HOLLERITH.
282 (gfc_expr): Add from_H flag.
283 * intrinsic.c (gfc_type_letter): Return 'h' for BT_HOLLERITH.
284 (add_conversions): Add conversions from Hollerith constant to other.
285 (do_simplify): Don't simplify if Hollerith constant arguments exist.
286 * io.c (resolve_tag): Enable array in FORMAT tag under GFC_STD_GNU.
287 * misc.c (gfc_basetype_name): Return "HOLLERITH" for BT_HOLLERITH.
288 (gfc_type_name): Print "HOLLERITH" for BT_HOLLERITH.
289 * primary.c (match_hollerith_constant): New function.
290 (gfc_match_literal_constant): Add match Hollerith before Integer.
291 * simplify.c (gfc_convert_constant): Add conversion from Hollerith
293 * trans-const.c (gfc_conv_constant_to_tree): Use VIEW_CONVERT_EXPR to
294 convert Hollerith constant to tree.
295 * trans-io.c (gfc_convert_array_to_string): Get array's address and
296 length to set string expr.
297 (set_string): Deal with array assigned Hollerith constant and character
299 * gfortran.texi: Document Hollerith constants as extention support.
301 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
304 * trans-array.c (gfc_trans_array_constructor_value): Fix index of data.
306 2005-07-07 Jakub Jelinek <jakub@redhat.com>
308 * decl.c (gfc_match_entry): Allow ENTRY without parentheses
311 2005-07-03 Kazu Hirata <kazu@codesourcery.com>
313 * gfortran.texi, intrinsic.texi: Fix typos.
314 * symbol.c: Fix a comment typo.
316 2005-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
318 * error.c (error_printf, error_print): Use ATTRIBUTE_GCC_GFC.
319 * gfortran.h (ATTRIBUTE_GCC_GFC): New.
320 (gfc_warning, gfc_warning_now, gfc_error, gfc_error_now,
321 gfc_fatal_error, gfc_internal_error, gfc_notify_std): Use
324 2005-07-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
327 * io.c (match_dt_element): Do not allow END tag in PRINT or
330 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
332 * lang.opt: Remove "." from end of help texts.
334 2005-07-01 Jerry DeLisle <jvdelisle@verizon.net>
336 * gfortran.texi: Fix typos and grammar.
337 * invoke.texi: Fix typos and grammar.
338 * intrinsic.texi: Add documentaion for eoshift, epsilon, etime, and
339 exit. Fixed alignment of text for dtime syntax. Fixed a few line
342 2005-06-25 Jakub Jelinek <jakub@redhat.com>
344 * trans-stmt.c (gfc_trans_forall_1): Prefer to use smaller logical
345 type than boolean_type_node.
347 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
349 * all files: Update FSF address in copyright headers.
351 2005-06-24 Jerry DeLisle <jvdelisle@verizon.net>
354 * gfortran.h: Add symbols for new intrinsic functions.
355 * intrinsic.c: Add new functions acosh, asinh, and atanh.
356 * intrinsic.h: Add prototypes for the new functions.
357 * iresolve.c (gfc_resolve_acosh): New function.
358 (gfc_resolve_asinh): New function.
359 (gfc_resolve_atanh): New function.
360 * mathbuiltins.def: Add defines.
361 * simplify.c (gfc_simplify_acosh): New function.
362 (gfc_simplify_asinh): New function.
363 (gfc_simplify_atanh): New function.
365 2005-06-24 Feng Wang <fengwang@nudt.edu.cn>
367 * simplify.c (gfc_simplify_modulo): Don't clear before get result.
369 2005-06-22 Paul Brook <paul@codesourcery.com>
372 * symbol.c (gfc_is_var_automatic): New function.
373 (save_symbol): Use it.
375 2005-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
376 Paul Thomas <pault@gcc.gnu.org>
380 * module.c (mio_namelist): New function. Correct to set
381 namelist_tail and to give error on renaming namelist by use
383 (mio_symbol): Call mio_namelist.
385 2005-06-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
387 * gfortran.h: Add flag_backslash compile-time option.
388 * lang.opt: Add support for -fbackslash option.
389 * options.c: Likewise.
390 * primary.c: Implement behavior for -fno-backslash.
391 * invoke.texi: Add doc for -fbackslash option.
392 * gfortran.texi: Remove mention of -fno-backslash as a
395 2005-06-20 Steven G. Kargl <kargls@comcast.net>
399 * match.c (gfc_match_label): Detect duplicate labels.
402 2005-06-20 Erik Edelmann <erik.edelmann@iki.fi>
404 * intrinsic.c (check_intrinsic_standard): Fix spelling error
405 in a warning message.
407 2005-06-18 Erik Edelman <eedelman@acclab.helsinki.fi>
408 Steven G. Kargl <kargls@comast.net>
411 * primary.c (gfc_match_rvalue): expr_type can be EXPR_CONSTANT
412 for an array; check that sym->as is NULL.
415 2005-06-18 Steven G. Kargl <kargls@comcast.net>
417 * intrinsic.c (gfc_intrinsic_func_interface): Enable errors for generic
418 functions whose simplification routine return FAILURE.
420 2005-06-13 Geoffrey Keating <geoffk@apple.com>
422 * Make-lang.in (fortran.install-man): Doesn't depend on installdirs.
423 (rule for installing f95.1 manpage): Does depend on installdirs.
425 2005-06-13 Jakub Jelinek <jakub@redhat.com>
428 * trans-stmt.c (gfc_trans_forall_loop): Only increment maskindex
429 in the innermost loop.
431 * trans-expr.c (gfc_conv_function_call): Return int instead of
432 void. Use a local variable for has_alternate_specifier and
433 return it. Avoid modification of function type's return value
434 in place, since it may be shared.
435 * trans.h (has_alternate_specifier): Remove.
436 (gfc_conv_function_call): Change return type.
437 * trans-stmt.c (has_alternate_specifier): Remove.
438 (gfc_trans_call): Add a local has_alternate_specifier variable,
439 set it from gfc_conv_function_call return value.
441 2005-06-12 Richard Henderson <rth@redhat.com>
443 * trans-array.c (gfc_conv_descriptor_data_get): Rename from
444 gfc_conv_descriptor_data. Cast the result to the DATAPTR type.
445 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): New.
446 (gfc_trans_allocate_array_storage): Use them.
447 (gfc_array_allocate, gfc_array_deallocate): Likewise.
448 (gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor): Likewise.
449 (gfc_trans_deferred_array): Likewise.
450 * trans-expr.c (gfc_conv_function_call): Likewise.
451 (gfc_trans_subcomponent_assign): Likewise.
452 (gfc_trans_pointer_assignment): Likewise.
453 * trans-intrinsic.c (gfc_conv_allocated): Likewise.
454 * trans-types.c (gfc_array_descriptor_base): New.
455 (gfc_get_element_type): Use GFC_TYPE_ARRAY_DATAPTR_TYPE.
456 (gfc_get_array_descriptor_base): Break out from ...
457 (gfc_get_array_type_bounds): ... here. Create type variants.
458 * trans-array.h (gfc_conv_descriptor_data_get): Declare.
459 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): Declare.
461 2005-06-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
463 * trans-expr.c (gfc_conv_variable): POINTER results don't need f2c
464 calling conventions. Look at sym instead of sym->result.
465 * trans-types.c (gfc_sym_type): Remove workaround for frontend bug.
466 Remove condition which is always false with workaround removed.
467 (gfc_return_by_reference): Always look at sym, never at sym->result.
469 2005-06-11 Steven G. Kargl <kargls@comcast.net>
473 * trans-array.c (gfc_array_deallocate): pstat is new argument
474 (gfc_array_allocate): update gfc_array_deallocate() call.
475 (gfc_trans_deferred_array): ditto.
476 * trans-array.h: update gfc_array_deallocate() prototype.
477 * trans-decl.c (gfc_build_builtin_function_decls): update declaration
478 * trans-stmt.c (gfc_trans_deallocate): Implement STAT= feature.
480 2005-06-07 Jerry DeLisle <jvdelisle@verizon.net>
482 * intrinsic.texi: Add documentation for dcmplx, digits,
483 dim, idim, ddim, dot_product, dprod, dreal, and dtime.
485 2005-06-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
488 * trans-array.c (gfc_trans_array_constructor_value): Slightly reorder.
489 Generate correct exit condition in case of negative steps in
492 * invoke.texi: Fix description of flags required for compatibility
495 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
496 Erik Schnetter <schnetter@aei.mpg.de>
499 * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment,
500 remove FIXME comment.
502 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
504 * match.c (match_forall_iterator): Don't immediately give error if '='
505 is not followed by an expression.
507 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
508 Erik Edelmann <erik.edelmann@iki.fi>
510 * array.c (gfc_match_array_constructor): Disallow empty array
513 2005-06-03 Jerry DeLisle <jvdelisle@verizon.net>
515 * fortran/intrinsic.texi: Add documentation for
516 command_argument_count, conjg, dconjg, count,
517 cpu_time, cshift, date_and_time, dble, dfloat.
519 2005-06-01 Roger Sayle <roger@eyesopen.com>
521 * intrinsic.c (add_conv): No longer take a "simplify" argument as
522 its always gfc_convert_constant, instead take a "standard" argument.
523 (add_conversions): Change all existing calls of add_conv to pass
524 GFC_STD_F77 as appropriate. Additionally, if we're allowing GNU
525 extensions support integer-logical and logical-integer conversions.
526 (gfc_convert_type_warn): Warn about use the use of these conversions
527 as a extension when appropriate, i.e. with -pedantic.
528 * simplify.c (gfc_convert_constant): Add support for integer to
529 logical and logical to integer conversions, using gfc_int2log and
531 * arith.c (gfc_log2int, gfc_int2log): New functions.
532 * arith.h (gfc_log2int, gfc_int2log): Prototype here.
533 * gfortran.texi: Document this new GNU extension.
535 2005-06-01 Paul Thomas <pault@gcc.gnu.org>
537 * fortran/trans-expr.c (gfc_conv_variable): Clean up bracketting.
538 * fortran/trans-expr.c (gfc_conv_function_call): Insert spaces.
539 Correct comments and replace convert of integer_one_node with
542 2005-06-01 Jakub Jelinek <jakub@redhat.com>
545 * resolve.c (resolve_contained_fntype): Use sym->attr.untyped
546 to avoid giving error multiple times.
547 (resolve_entries): Don't error about BT_UNKNOWN here.
548 (resolve_unknown_f): Capitalize IMPLICIT for consistency.
549 (resolve_fntype): New function.
550 (gfc_resolve): Call resolve_fntype.
552 2005-06-01 Feng Wang <fengwang@nudt.edu.cn>
555 * fortran/io.c (resolve_tag): Fix error message.
557 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
559 * fortran/trans-decl.c: Don't include errors.h.
560 * fortran/Make-lang.in: Updates dependencies.
562 2005-05-31 Paul Thomas <pault@gcc.gnu.org>
567 * fortran/trans-array.c (gfc_conv_expr_descriptor): Obtain the
568 string length from the expression typespec character length value
569 and set temp_ss->stringlength and backend_decl. Obtain the
570 tree expression from gfc_conv_expr rather than gfc_conv_expr_val.
571 Dereference the expression to obtain the character.
572 * fortran/trans-expr.c (gfc_conv_component_ref): Remove the
573 dereference of scalar character pointer structure components.
574 * fortran/trans-expr.c (gfc_trans_subarray_assign): Obtain the
575 string length for the structure component from the component
578 2005-05-30 Roger Sayle <roger@eyesopen.com>
580 * gfortran.h (GFC_STD_LEGACY): New "standard" macro. Reindent.
581 * options.c (gfc_init_options): By default, allow legacy extensions
583 (gfc_post_options): Make -pedantic warn about legacy extensions
584 even with -std=legacy.
585 (gfc_handle_option): Make -std=gnu follow the default behaviour
586 of warning about legacy extensions, but allowing them. Make the
587 new -std=legacy accept everything and warn about nothing.
588 * lang.opt (std=legacy): New F95 command line option.
589 * invoke.texi: Document both -std=f2003 and -std=legacy.
590 * gfortran.texi: Explain the two types of extensions and document
591 how they are affected by the various -std= command line options.
593 2005-05-30 Kazu Hirata <kazu@cs.umass.edu>
595 * trans-expr.c: Remove trailing ^M.
597 * trans-expr.c: Fix comment typos.
599 2005-05-29 Paul Thomas <pault@gcc.gnu.org>
607 * fortran/trans-array.c (gfc_conv_resolve_dependencies): Add string
608 length to temp_ss for character pointer array assignments.
609 * fortran/trans-expr.c (gfc_conv_variable): Correct errors in
610 dereferencing of characters and character pointers.
611 * fortran/trans-expr.c (gfc_conv_function_call): Provide string
612 length as return argument for various kinds of handling of return.
613 Return a char[]* temporary for character pointer functions and
614 dereference the temporary upon return.
616 2005-05-29 Janne Blomqvist <jblomqvi@vipunen.hut.fi>
617 Steven G. Kargl <kargls@comcast.net>
620 * io.c (gfc_match_inquire): Implement constraints on UNIT and FILE usage.
622 2005-05-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
625 * io.c (format_item_1): Add check and extension warning for
628 2005-05-28 Steven G. Kargl <kargls@comcast.net>
630 * arith.c (gfc_arith_init_1): Fix off by one problem;
631 (gfc_check_integer_range): Chop extra bits in subnormal numbers.
633 2005-05-28 Jerry DeLisle <jvdelisle@verizon.net>
634 Steven G. Kargl <kargls@comcast.net>
636 * intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING
639 2005-05-27 Steven G. Kargl <kargls@comcast.net>
641 * trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force
642 like types in comparsion.
644 2005-05-26 Kazu Hirata <kazu@cs.umass.edu>
646 * data.c, parse.c, trans-array.c, trans-decl.c,
647 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
648 trans.h: Fix comment typos. Follow spelling conventions.
650 2005-05-22 Roger Sayle <roger@eyesopen.com>
652 * gfortran.texi: Document some more GNU extensions.
654 2005-05-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
656 * error.c (gfc_warning): Fix typo in comment.
658 2005-05-18 Thomas Koenig <Thomas.Koenig@online.de>
661 * fortran/iresolve.c (gfc_resolve_reshape): Add
662 gfc_type_letter (BT_COMPLEX) for complex to
663 to resolved function name.
665 2005-05-18 Erik Edelmann <erik.edelmann@iki.fi>
667 * array.c (gfc_match_array_constructor): Support [ ... ]
668 style array constructors.
670 2005-05-18 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
672 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_TRUNC
673 and BUILT_IN_TRUNCF instead of BUILT_IN_FLOOR and BUILT_IN_FLOORF.
674 * trans-intrinsic.c (build_fix_expr): Change 'op' argument
675 to correct enum type.
676 (gfc_conv_intrinsic_aint): Likewise. Clarify comment in front of
677 function. Add default case to switch, deal with FIX_TRUNC_EXPR
678 instead of FIX_FLOOR_EXPR.
680 2005-05-18 Feng Wang <fengwang@nudt.edu.cn>
683 * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to
684 build character length.
686 2005-05-17 Zdenek Dvorak <dvorakz@suse.cz>
688 * trans-types.c (gfc_array_range_type): New variable.
689 (gfc_init_types): Initialize gfc_array_range_type.
690 (gfc_get_array_type_bounds): Use gfc_array_range_type.
692 2005-05-17 Jakub Jelinek <jakub@redhat.com>
695 * trans-stmt.c (generate_loop_for_temp_to_lhs): Remove SIZE and COUNT2
696 arguments. If LSS is gfc_ss_terminator, increment COUNT1 by 1, instead
697 of incrementing COUNT2 and using COUNT1+COUNT2 increment COUNT1 and use
699 (generate_loop_for_rhs_to_temp): Likewise.
700 (compute_overall_iter_number): Add INNER_SIZE_BODY argument.
701 It non-NULL, add it to body.
702 (allocate_temp_for_forall_nest_1): New function, split from
703 allocate_temp_for_forall_nest.
704 (allocate_temp_for_forall_nest): Add INNER_SIZE_BODY argument,
705 propagate it down to compute_overall_iter_number. Use
706 allocate_temp_for_forall_nest_1.
707 (gfc_trans_assign_need_temp): Remove COUNT2. Call
708 compute_inner_temp_size into a new stmtblock_t. Adjust calls to
709 allocate_temp_for_forall_nest, generate_loop_for_rhs_to_temp
710 and generate_loop_for_temp_to_lhs.
711 (gfc_trans_pointer_assign_need_temp): Adjust calls to
712 allocate_temp_for_forall_nest.
713 (gfc_evaluate_where_mask): Call compute_inner_temp_size into a new
714 stmtblock_t. Call compute_overall_iter_number just once, then
715 allocate_temp_for_forall_nest_1 twice with the same size.
716 Initialize mask indexes if nested_forall_info != NULL.
717 (gfc_trans_where_2): Initialize mask indexes before calling
718 gfc_trans_nested_forall_loop.
720 2005-05-15 Feng Wang <fengwang@nudt.edu.cn>
721 Jerry DeLisle <jvdelisle@verizon.net>
724 * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to
725 resolve ICE on assign of format label.
726 * trans-io.c (set_string): add fold-convert to properly
727 handle assigned format label in write.
729 2005-05-13 Paul Brook <paul@codesourcery.com>
731 * trans-stmt.c (gfc_trans_forall_1): Fix comment typo.
733 2005-05-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
735 * trans-types.c (gfc_is_nodesc_array): Remove redundant check.
737 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
740 * io.c (check_format): Look for literal characters inside
743 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
745 * resolve.c (resolve_symbol): Copy 'pointer' and 'dimension'
746 attribute from result symbol to function symbol.
747 * trans-expr.c (gfc_conv_function_call): Look at sym->attr.dimension
748 instead of sym->result->attr.dimension.
750 2005-05-10 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
753 * gfortran.h (gfc_option): Add flag_f2c.
754 * invoke.texi: Document '-ff2c' command line option. Adapt
755 documentation for '-fno-second-underscore' and '-fno-underscoring'.
756 * lang.opt (ff2c): New entry.
757 * options.c (gfc-init_options): Set default calling convention
758 to -fno-f2c. Mark -fsecond-underscore unset.
759 (gfc_post_options): Set -fsecond-underscore if not explicitly set
761 (handle_options): Set gfc_option.flag_f2c according to requested
763 * trans-decl.c (gfc_get_extern_function_decl): Use special f2c
764 intrinsics where necessary.
765 (gfc_trans_deferred_vars): Change todo error to assertion.
766 * trans-expr.c (gfc_conv_variable): Dereference access
767 to hidden result argument.
768 (gfc_conv_function_call): Add hidden result argument to argument
769 list if f2c calling conventions requested. Slightly restructure
770 tests. Convert result of default REAL function to requested type
771 if f2c calling conventions are used. Dereference COMPLEX result
773 * trans-types.c (gfc_sym_type): Return double for default REAL
774 function if f2c cc are used.
775 (gfc_return_by_reference): Slightly restructure logic. Return
776 COMPLEX by reference depending on calling conventions.
777 (gfc_get_function_type): Correctly make hidden result argument a
778 pass-by-reference argument for COMPLEX. Remove old code which does
779 this for derived types.
781 2005-05-09 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
783 * match.c (gfc_match_return): Only require space after keyword when
784 it is obligatory. Only give stdwarn to after matching is successful.
785 * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns.
787 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
789 * intrinsic.texi: Fix typos.
791 2005-05-07 Steven G. Kargl <kargls@comcast.net>
793 * intrinsic.texi: Document ASSOCIATED and ATAN2. Update Bessel function
794 description to include information about scalar arguments.
796 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
798 * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt,
799 match.h, trans-array.h: Update copyright.
801 2005-04-29 Tom Tromey <tromey@redhat.com>
803 * f95-lang.c (poplevel): Updated for change to build_block.
805 2005-04-29 Jakub Jelinek <jakub@redhat.com>
809 * trans-expr.c (gfc_conv_variable): Handle return values in functions
810 with alternate entry points.
811 * resolve.c (resolve_entries): Remove unnecessary string termination
812 after snprintf. Set result of entry master.
813 If all entries have the same type, set entry master's type
814 to that common type, otherwise set mixed_entry_master attribute.
815 * trans-types.c (gfc_get_mixed_entry_union): New function.
816 (gfc_get_function_type): Use it for mixed_entry_master functions.
817 * gfortran.h (symbol_attribute): Add mixed_entry_master bit.
818 * decl.c (gfc_match_entry): Set entry->result properly for
820 * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over
822 (build_entry_thunks): Handle return values in entry thunks.
823 Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not
824 shared between multiple contexts.
825 (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from
826 current_function_decl instead of sym->backend_decl. Skip over
827 entry master's entry id argument. For mixed_entry_master entries or
828 their results, return a COMPONENT_REF of the fake result.
829 (gfc_trans_deferred_vars): Don't warn about missing return value if
830 at least one entry point uses RESULT.
831 (gfc_generate_function_code): For entry master returning
832 CHARACTER, copy ts.cl->backend_decl to all entry result syms.
833 * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return
834 values optional just because they are in entry master.
836 2005-04-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
838 * gfortran.h (gfc_namespace): Add seen_implicit_none field,
839 Tobias forgot this in previous commit.
841 2005-04-29 Paul Brook <paul@codesourcery.com>
843 * trans-expr.c (gfc_conv_expr_present): Fix broken assert. Update
846 2005-04-29 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
848 * gfortran.h (gfc_namespace): Add seen_implicit_none field.
849 * symbol.c (gfc_set_implicit_none): Give error if there's a previous
850 IMPLICIT NONE, set seen_implicit_none.
851 (gfc_merge_new_implicit): Error if there's an IMPLICIT NONE statement.
853 2005-04-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
855 * gfortran.h (gfc_gsymbol): Make name a const char *.
856 * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
859 2005-04-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
862 * resolve.c (resolve_actual_arglist): Issue an error if a statement
863 functions is used as actual argument.
865 2005-04-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
868 * interface.c (compare_parameter): Ignore type for EXPR_NULL
869 only if type is BT_UNKNOWN.
871 2005-04-25 Paul Brook <paul@codesourcery.com>
872 Steven G. Kargl <kargls@comcast.net>
875 * check.c (gfc_check_ichar_iachar): New function.
876 * instinsic.h (gfc_check_ichar_iachar): Add prototype.
877 * intrinsic.c (add_functions): Use it.
878 * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
879 character expression lengths.
881 2005-04-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
884 * trans-common.c (translate_common): Cast offset and
885 common_segment->offset to type int for warning message.
887 2005-04-23 DJ Delorie <dj@redhat.com>
889 * trans-decl.c: Adjust warning() callers.
891 2005-04-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
893 * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as
894 intermediate representation. Fix typo in comment.
896 2005-04-21 Steven G. Kargl <kargls@comcast.net>
898 * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation;
899 simplify logic; Add a gcc_assert.
901 2005-04-19 Steven G. Kargl <kargls@comcast.net>
903 * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
905 2005-04-19 Arnaud Desitter <arnaud.desitter@ouce.ox.ac.uk>
906 Steven G. Kargl <kargls@comcast.net>
908 * invoke.texi: Update -Waliasing description
910 2005-04-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
913 * resolve.c (resolve_variable): If e->symtree is not set, this
914 ought to be a FAILURE, and not a segfault.
916 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
923 * fortran/trans-io.c (gfc_build_io_library_fndecls): Create
924 declaration for st_set_nml_var and st_set_nml_var_dim. Remove
925 declarations of old namelist functions.
926 (build_dt): Simplified call to transfer_namelist_element.
927 (nml_get_addr_expr): Generates address expression for start of
928 object data. New function.
929 (nml_full_name): Qualified name for derived type components. New
931 (transfer_namelist_element): Modified for calls to new functions
932 and improved derived type handling.
934 2005-04-17 Richard Guenther <rguenth@gcc.gnu.org>
936 * scanner.c (gfc_next_char_literal): Reset truncation flag
937 for lines ending in a comment for both fixed and free form.
938 (load_line): Do not set truncated flag if only truncating
941 2005-04-15 Richard Guenther <rguenth@gcc.gnu.org>
944 * gfortran.h (gfc_linebuf): Add truncated field.
945 * parse.c (next_statement): Handle warning for truncated
947 * scanner.c (load_line): Return if line was truncated.
948 No longer warn for truncated lines. Remove unused parameters.
949 (load_file): Store load_line return value to linebuf.
950 (gfc_error_recovery): Do not advance line at the end.
952 2005-04-14 Steven G. Kargl <kargls@comcast.net>
954 * gfortran.h (gfc_real_info): Add subnormal struct member.
955 * arith.c (gfc_arith_init_1): Set it.
956 (gfc_check_real_range): Use it.
957 * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.).
959 2005-04-12 Kazu Hirata <kazu@cs.umass.edu>
961 * simplify.c: Fix a comment typo.
963 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
965 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
967 2005-04-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
969 * simplify.c (gfc_simplify_nearest): Overhaul.
971 2005-04-10 Kazu Hirata <kazu@cs.umass.edu>
973 * interface.c: Fix a comment typo.
975 2005-04-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
977 * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
980 2005-04-09 Steven G. Kargl <kargls@comcast.net>
982 * simplify.c (gfc_simplify_anint): Use mpfr_round()
983 (gfc_simplify_dnint): ditto.
984 (gfc_simplify_nint): ditto.
986 2005-04-09 Andrew Pinski <pinskia@physics.uc.edu>
989 * io.c (check_format): Allow an optional comma
992 2005-04-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
994 * match.c (match_arithmetic_if): Remove gfc_ prefix and correct
995 comment according to GNU coding style.
996 (gfc_match_if): Remove gfc_ prefix in call to
999 2005-04-08 Diego Novillo <dnovillo@redhat.com>
1001 * match.c (gfc_match_arithmetic_if): Declare static.
1003 2005-04-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1006 * match.c (gfc_match_arithmetic_if): New function to match an
1007 arithmetic IF statement.
1008 (gfc_match_if): Use gfc_match_arithmetic_if to match an
1009 arithmetic IF statement embedded in a simple IF statement.
1011 2005-04-07 Steven G. Kargl <kargls@comcast.net>
1013 * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
1015 2005-04-06 Steven G. Kargl <kargls@comcast.net>
1017 * invoke.texi: Remove documentation of -std=f90
1019 2005-04-06 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1021 * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
1022 non-pointer assignment.
1024 2005-04-05 Feng Wang <fengwang@nudt.edu.cn>
1029 * array.c (resolve_character_array_constructor): New function. Set
1030 constant character array's character length.
1031 (gfc_resolve_array_constructor): Use it.
1032 * decl.c (add_init_expr_to_sym): Set symbol and initializer character
1034 (gfc_set_constant_character_len): New function. Set constant character
1035 expression according the given length.
1036 * match.h (gfc_set_constant_character_len): Add prototype.
1038 2005-04-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1040 * intrinsic.texi: BES?? functions are not in the f95 standard.
1042 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1044 * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
1046 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1048 * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
1049 BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
1051 2005-04-02 Steven G. Kargl <kargls@comcast.net>
1053 * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
1055 2005-04-01 Kazu Hirata <kazu@cs.umass.edu>
1057 * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
1058 trans.h: Fix comment typos.
1060 2005-03-29 Steven G. Kargl <kargls@comcast.net>
1062 * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
1063 flag_default_integer, flag_default_real
1064 * invoke.texi: Update documentation
1065 * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8
1066 fdefault-integer-8, and fdefault-real-8 definitions.
1067 * options.c (gfc_init_options): Set option defaults
1068 (gfc_handle_option): Handle command line options.
1069 * trans-types.c (gfc_init_kinds): Use options.
1071 2005-03-29 Keith Besaw <kbesaw@us.ibm.com>
1073 * f95-lang.c (builtin_function): Process the attrs parameter
1074 and apply the "const" attribute to the builtin if found.
1076 2005-03-27 Steven G. Kargl <kargls@comcast.net>
1078 * intrinsic.texi: Document AIMAG, AINT, ALL
1080 2005-03-26 Steven G. Kargl <kargls@comcast.net>
1082 * arith.c (check_result): Fix illogical logic.
1084 2005-03-26 Canqun Yang <canqun@nudt.edu.cn>
1086 * trans-common.c (create_common): Build RECORD_NODE for common blocks
1087 contain no equivalence objects.
1088 (add_equivalences): New argument saw_equiv.
1089 (trans_common): New local variable saw_equiv.
1090 (finish_equivalences): Add a local variable dummy, Always pass true
1091 for the 3rd parameter to create_common.
1093 2005-03-25 Steven G. Kargl <kargls@comcast.net>
1095 * intrinsic.texi: Fix "make dvi"
1097 2005-03-24 Steven G. Kargl <kargls@comcast.net>
1099 * intrinsic.texi: New file.
1100 * gfortran.texi: Include it; white space change; fix typo.
1102 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
1104 * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
1106 2005-03-23 Steven Bosscher <stevenb@suse.de>
1108 * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
1109 * trans-array.c (gfc_trans_allocate_array_storage,
1110 gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
1111 gfc_conv_array_index_ref, gfc_trans_array_bound_check,
1112 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
1113 gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
1114 gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
1115 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1116 gfc_conv_expr_descriptor): Likewise.
1117 * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
1118 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
1119 * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
1120 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
1121 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1122 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
1123 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
1124 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
1125 gfc_conv_intrinsic_merge, prepare_arg_info,
1126 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
1127 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
1128 gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
1129 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
1130 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
1131 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
1133 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
1134 * trans.c (gfc_add_modify_expr): Likewise.
1136 2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1138 * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
1139 gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
1140 gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
1141 gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
1142 gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
1143 gfc_check_perror): new functions to check newly implemented
1145 * gfortran.h: adding symbols for new intrinsics.
1146 * intrinsic.c (add_functions): adding new intrinsics.
1147 (add_subroutines): adding new intrinsics.
1148 * intrinsic.h: prototype for all checking and resolving
1150 * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
1151 gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
1152 gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
1153 gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
1154 gfc_resolve_kill_sub, gfc_resolve_link_sub,
1155 gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
1156 gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
1157 gfc_resolve_perror): new functions to resolve intrinsics.
1158 * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
1161 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1163 * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
1164 in which the variable is declared.
1167 * resolve.c (was_declared): Also check for dummy attribute.
1169 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1171 * gfortran.h (arith): Remove ARITH_0TO0.
1172 * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
1173 (gfc_arith_power): Remove special casing of zero to integral
1176 2005-03-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1178 * Make-lang.in (fortran-warn): Remove -Wno-error.
1179 (expr.o-warn, resolve.o-warn, simplify.o-warn,
1180 trans-common.o-warn): Specify -Wno-error.
1182 2005-03-17 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1184 * trans-array.c (gfc_trans_static_array_pointer,
1185 get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
1186 comment and formatting typos.
1188 2005-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1190 * invoke.texi: Fix typos.
1192 2005-03-15 Zack Weinberg <zack@codesourcery.com>
1194 * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
1196 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
1198 * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
1199 to zero on label_tree.
1201 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
1204 * io.c (resolve_tag): Add checking on assigned label.
1205 (match_dt_format): Does not set symbol assign attribute.
1206 * match.c (gfc_match_goto):Does not set symbol assign attribute.
1207 * resolve.c (resolve_code): Add checking on assigned label.
1208 * trans-common.c (build_field): Deals with common variable assigned
1210 * trans-stmt.c (gfc_conv_label_variable): New function.
1211 (gfc_trans_label_assign): Use it.
1212 (gfc_trans_goto): Ditto.
1213 * trans-io.c (set_string): Ditto.
1214 * trans.h (gfc_conv_label_variable): Add prototype.
1216 2005-03-14 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1219 * symbol.c (check_conflict): A dummy argument can't be a statement
1222 2005-03-14 Zdenek Dvorak <dvorakz@suse.cz>
1224 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
1225 the argument of the shift to the unsigned type.
1227 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1230 * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
1232 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1235 * resolve.c (gfc_resolve): Check if character lengths are
1236 specification expressions.
1238 2005-03-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1241 * trans-array.c (gfc_stack_space_left): Remove unused variable.
1242 (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
1244 * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
1245 Remove declaration / prototype.
1246 * trans-common.c (build_equiv_decl): Give union a name. Check if
1247 it can be put on the stack.
1248 * trans-decl.c (gfc_stack_space_left): Move function here.
1249 (gfc_build_qualified_array): Fix comment typo.
1250 * trans.h (gfc_put_var_on_stack): Add prototype.
1252 2005-03-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1254 * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
1255 * decl.c, trans.c: Don't use C++ style comments.
1256 * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
1257 ifsrc): Give names to enums and use ENUM_BITFIELD.
1258 (gfc_access): Remove trailing comma.
1260 2005-03-05 Steven G. Kargl <kargls@comcast.net>
1263 * primary.c (match_complex_constant): Mangled complex constant may
1264 be an implied do-loop. Give implied do-loop matcher a chance.
1266 2005-03-05 Steven G. Kargl <kargls@comcast.net>
1269 * resolve.c (compare_shapes): New function.
1270 (resolve_operator): Use it.
1272 2005-03-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1274 * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
1275 type for COMPLEX constants.
1277 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1280 * trans-expr.c (gfc_conv_function_call): Correctly dereference
1281 argument from a pointer function also if it has a result clause.
1283 2005-03-04 Steven G. Kargl <kargls@comcast.net>
1285 * expr.c (gfc_copy_shape_excluding): Change && to ||.
1287 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1289 * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
1292 2005-02-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1296 * simplify.c (gfc_simplify_bound): Rename to ...
1297 (simplify_bound): ... this and overhaul.
1299 2005-02-28 Steven G. Kargl <kargl@gcc.gnu.org>
1301 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
1302 (gfc_conv_intrinsic_function): update function calls
1304 2005-02-27 Steven G. Kargl <kargl@gcc.gnu.org>
1307 * trans-types.c (gfc_max_integer_kind): Declare
1308 (gfc_init_kinds): Initialize it.
1309 * gfortran.h (gfc_max_integer_kind): extern it.
1310 * primary.c (match_boz_constant): Use it; remove gfortran extension
1311 of kind suffixes on BOZ literal constants
1314 2005-02-27 Steven G. Kargl <kargls@comcast.net>
1316 * arith.c (gfc_check_real_range): Remove multiple returns
1317 (check_result): New function.
1318 (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
1319 gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
1322 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1324 * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
1327 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-meunchen.de>
1329 Unrevert previously reverted patch. Adding this fix:
1330 * module.c (find_true_name): Deal with NULL module.
1332 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1334 Revert yesterday's patch:
1335 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1337 * gfortran.h (gfc_component, gfc_actual_arglist, ...
1338 ... argument. Copy string instead of pointing to it.
1340 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1342 * gfortran.h (gfc_get_namespace): Add second argument to prototype.
1343 * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
1345 * module.c (mio_namespace_ref, load_needed): Likewise.
1346 * parse.c (parse_interface, parse_contained): Likewise. Here the
1347 correct second argument matters.
1348 * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
1349 parent's implicit types if this is set.
1350 (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
1351 * trans-common.c (build_common_decl): Likewise.
1353 * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
1355 * symbol.c (gfc_set_default_type): Issue error only once, by setting
1356 and checking 'untyped' attribute.
1358 * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
1359 fields into new struct 'op' inside the 'value' union.
1360 * arith.c (eval_intrinsic): Adapt all users.
1361 * dependency.c (gfc_check_dependency): Likewise.
1362 * dump-parse-tree.c (gfc_show_expr): Likewise.
1363 * expr.c (gfc_get_expr): Don't clear removed fields.
1364 (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
1365 gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
1366 check_intrinsic_op): Adapt to new field names.
1367 * interface.c (gfc_extend_expr): Likewise. Also explicitly
1368 nullify 'esym' and 'isym' fields of new function call.
1369 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
1370 Adapt to renamed structure fields.
1371 * matchexp.c (build_node, match_level_1, match_expr): Likewise.
1372 * module.c (mio_expr): Likewise.
1373 * resolve.c (resolve_operator): Likewise.
1374 (gfc_find_forall_index): Likewise. Only look through operands
1375 if dealing with EXPR_OP
1376 * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
1377 * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
1378 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
1381 * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
1382 'name' a 'const char *'.
1383 (gfc_symbol): Likewise, also for 'module'.
1384 (gfc_symtree): Make 'name' a 'const char *'.
1385 (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
1386 (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
1388 (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
1389 initialize 'SYM->module'.
1390 * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
1391 pointer instead of empty string.
1392 * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
1393 * interface.c (gfc_compare_types): Adapt check to account for possible
1395 (compare_actual_formal): Check for NULL pointer instead of empty
1397 * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
1398 Add 'const' qualifier.
1399 (conv_name): Return a heap allocated string.
1400 (find_conv): Add 'const' qualifier to 'target'.
1401 (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
1402 (make_generic): Check for NULL pointer instead of empty string.
1403 (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
1404 (add_conv): No need to strcpy result from 'conv_name'.
1405 (sort_actual): Check for NULL pointer instead of empty string.
1406 * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
1408 * module.c (compare_true_names): Compare pointers instead of strings
1409 for 'module' member.
1410 (find_true_name): Initialize string fields with gfc_get_string.
1411 (mio_pool_string): New function.
1412 (mio_internal_string): Adapt comment.
1413 (mio_component_ref, mio_component, mio_actual_arg): Use
1414 'mio_pool_string' instead of 'mio_internal_string'.
1415 (mio_symbol_interface): Add 'const' qualifier to string arguments.
1416 Add level of indirection. Use 'mio_pool_string' instead of
1417 'mio_internal_string'.
1418 (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
1419 (write_common, write_symbol): Use 'mio_pool_string' instead of
1420 'mio_internal_string'.
1421 (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
1422 instead of empty string.
1423 (write_operator, write_generic): Pass correct type variable to
1424 'mio_symbol_interface'.
1425 (write_symtree): Use 'mio_pool_string' instead of
1426 'mio_internal_string'.
1427 * primary.c (match_keyword_arg): Adapt check to possible
1428 case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'.
1429 * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
1430 gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
1432 (ambiguous_symbol): Check for NULL pointer instead of empty string.
1433 (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
1435 * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
1436 pointer instead of empty string.
1437 * trans-decl.c (gfc_sym_mangled_identifier,
1438 gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
1439 gfc_get_symbol_decl): Likewise.
1440 * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
1441 argument. Copy string instead of pointing to it.
1443 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
1445 * intrinsic.h, st.c: Update copyright.
1447 2005-02-20 Steven G. Kargl <kargls@comcast.net>
1449 * symbol.c: Typos in comments.
1451 2005-02-20 Steven G. Kargl <kargls@comcast.net>
1453 * expr.c (gfc_type_convert_binary): Typo in comment.
1455 2005-02-19 Steven G. Kargl <kargls@comcast.net>
1457 * check.c (gfc_check_selected_int_kind): New function.
1458 * intrinsic.h: Prototype it.
1459 * intrinsic.c (add_function): Use it.
1460 * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
1461 BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
1463 2005-02-19 Steven G. Kargl <kargls@comcast.net>
1465 * check.c (gfc_check_int): improve checking of optional kind
1466 * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
1468 2005-02-19 Steven G. Kargl <kargls@comcast.net>
1470 * check.c (gfc_check_achar): New function
1471 * intrinsic.h: Prototype it.
1472 * intrinsic.c (add_function): Use it.
1474 2005-02-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1476 * trans-stmt.c (generate_loop_for_temp_to_lhs,
1477 generate_loop_for_rhs_to_temp): Remove if whose condition is
1480 2005-02-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1482 * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
1483 (gfc_use_derived): ... this function.
1485 2005-02-09 Richard Henderson <rth@redhat.com>
1487 * f95-lang.c (gfc_init_builtin_functions): Call
1488 build_common_builtin_nodes; do not define any functions handled
1491 2005-02-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1493 * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
1495 (gfc_is_constant_expr): Check 'ref' to determine if substring
1496 reference is constant.
1497 (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
1498 (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
1500 * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
1502 2005-02-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1504 * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
1505 gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
1506 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
1507 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
1508 gfc_add_procedure): Add argument.
1509 * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
1510 gfc_match_null, match_type_spec, match_attr_spec,
1511 gfc_match_formal_arglist, match_result, gfc_match_function_decl):
1512 Update callers to match.
1513 (gfc_match_entry) : Likewise, fix comment typo.
1514 (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
1515 access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
1516 gfc_match_derived_decl): Update callers.
1517 * interface.c (gfc_match_interface): Likewise.
1518 * match.c (gfc_match_label, gfc_add_flavor,
1519 gfc_match_call, gfc_match_common, gfc_match_block_data,
1520 gfc_match_namelist, gfc_match_module, gfc_match_st_function):
1522 * parse.c (parse_derived, parse_interface, parse_contained),
1523 primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
1524 * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
1525 * symbol.c (check_conflict, check_used): Add new 'name' argument,
1526 use when printing error message.
1527 (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
1528 gfc_add_generic, gfc_add_in_common, gfc_add_data,
1529 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
1530 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
1531 gfc_add_procedure): Add new 'name' argument. Pass along to
1532 check_conflict and check_used.
1533 (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
1534 gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
1535 gfc_add_pure, gfc_add_recursive, gfc_add_intent,
1536 gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
1537 argument in calls to any of the modified functions.
1539 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
1541 * gfortran.texi: Don't give last update date.
1543 2006-01-30 Richard Henderson <rth@redhat.com>
1545 * options.c (gfc_init_options): Zero flag_errno_math.
1547 2005-01-29 Paul Brook <paul@codesourcery.com>
1550 * check.c (real_or_complex_check): New function.
1551 (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
1552 * intrinsic.c (add_functions): Use new check functions.
1553 * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
1556 2005-01-29 Steven G. Kargl <kargls@comcast.net>
1559 * expr.c (gfc_check_assign): Check for conformance of logical operands
1561 2004-01-27 Steven Bosscher <stevenb@suse.de>
1563 * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
1564 TREE_USED for all labels.
1565 (gfc_trans_entry_master_switch): Use it instead of building a
1567 * trans-io.c (add_case): Likewise.
1568 * trans-stmt.c (gfc_trans_integer_select): Likewise.
1570 2004-01-23 Paul Brook <paul@codesourcery.com>
1571 Steven G. Kargl <kargls@comcast.net>
1574 * arith.c (gfc_convert_real): Remove sign handling.
1575 * primary.c (match_digits): Allow whitespace after initial sign.
1576 (match_real_const): Handle signs here. Allow whitespace after
1577 initial sign. Remove dead code.
1578 (match_const_complex_part): Remove.
1579 (match_complex_part): Use match_{real,integer}_const.
1580 (match_complex_constant): Cross-promote integer types.
1582 2005-01-23 James A. Morrison <phython@gcc.gnu.org>
1585 * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
1586 transpose_c8 for complex types.
1588 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
1590 * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
1591 trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
1592 trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
1593 Follow spelling conventions.
1595 2005-01-22 Bud Davis <bdavis9659@comcast.net>
1598 * trans-io.c (gfc_trans_inquire): Added code to support
1601 2005-01-22 Steven G. Kargl <kargls@comcast.net>
1603 * intrinsic.c (make_alias): Add standard argument.
1604 (add_functions): Update make_alias calls.
1606 2005-01-22 Paul Brook <paul@codesourcery.com>
1608 * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
1610 2005-01-22 Paul Brook <paul@codesourcery.com>
1612 * gfortran.h (gfc_check_access): Add prototype.
1613 * match.c (gfc_match_namelist): Remove TODO.
1614 * module.c (check_access): Rename ...
1615 (gfc_check_access): ... to this. Boolify. Update callers.
1616 * resolve.c (resolve_symbol): Check for private objects in public
1619 2005-01-22 Paul Brook <paul@codesourcery.com>
1621 * primary.c (gfc_match_rvalue): Only apply implicit type if variable
1622 does not have an explicit type.
1623 (gfc_match_variable): Resolve implicit derived types in all cases.
1624 Resolve contained function types from their own namespace, not the
1626 * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
1627 checking. Resolve from the contained namespace, not the parent.
1629 2005-01-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1632 * trans-const.c (gfc_conv_constant_to_tree): Give logical
1633 constants the correct type.
1636 * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
1638 (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
1641 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
1643 * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
1644 gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
1645 match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
1646 scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
1647 trans-io.c, trans-stmt.c, trans.c: Update copyright.
1649 2005-01-17 Ira Rosen <irar@il.ibm.com>
1651 * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
1653 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1656 * error.c (error_char): Line-buffer errors / warnings.
1658 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1660 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
1661 unsigned issue. Use build_int_cst instead of converting
1662 integer_zero_node. Remove unnecessary conversion.
1664 * trans-types.c (gfc_get_character_type_len): : Use
1665 gfc_charlen_type_node as basic type for the range field.
1667 * trans-intrinsic.c (build_fixbound_expr,
1668 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
1669 gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
1670 gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
1671 of converting 'integer_zero_node' or 'integer_one_node'
1673 (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
1675 (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
1676 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
1677 'build_int_cst' instead of converting 'integer_zero_node' or
1678 'integer_one_node' respectively.
1680 * trans-intrinsic.c (gfc_conv_intrinsic_index,
1681 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
1682 'gfc'-prefix from local variable, remove dead code, use correct
1683 type when inserting argument.
1685 * trans-intrinsic.c, trans-types.c: Update copyright years.
1687 2005-01-16 Steven G. Kargl <kargls@comcast.net>
1690 * resolve.c (check_case_overlap): Typo in comment.
1691 (validate_case_label_expr): Fix up kinds of case values
1692 (resolve_select): Properly handle kind mismatches.
1694 2004-01-16 Paul Brook <paul@codesourcery.com>
1697 * trans-common.c (translate_common): Remove duplicate function call.
1698 (finish_equivalences): Preserve alignment when biasing offsets.
1700 2005-01-15 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de
1702 * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
1703 ASCII-like character encoding.
1705 2005-01-14 Steven G. Kargl <kargls@comcast.net>
1707 * resolve.c (compare_case): Cleanup.
1709 2005-01-14 Steven G. Kargl <kargls@comcast.net>
1711 * resolve.c (compare_case): Give arguments correct type.
1713 2005-01-13 Kazu Hirata <kazu@cs.umass.edu>
1715 * iresolve.c, trans-common.c, trans-types.c: Fix comment
1718 2005-01-09 Paul Brook <paul@codesourcery.com>
1721 * trans-common.c (current_common, current_offset): Remove.
1722 (create_common): Add head argument.
1723 (align_segment): New function.
1724 (apply_segment_offset): New function.
1725 (translate_common): Merge code from new_segment. Handle alignment.
1726 (new_segment): Remove.
1727 (finish_equivalences): Ensure proper alignment.
1729 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1731 * trans-const.c: Don't include unused math.h.
1733 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
1734 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
1735 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
1736 trailing whitespace.
1737 (prepare_arg_info): Fix formatting, indenting and remove trailing
1739 (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
1740 trailing whitespace.
1742 * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
1743 gfc_constant_result, gfc_range_check, gfc_arith_power,
1744 eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
1745 gfc_real2complex, gfc_complex2int, gfc_complex2real,
1746 gfc_complex2complex): Fix whitespace issues.
1747 * check.c (must_be, type_check, numeric_check, int_or_real_check,
1748 logical_array_check, array_check, scalar_check, nonoptional_check,
1749 variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
1750 gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
1751 gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
1752 gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
1753 gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
1754 gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
1755 gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
1756 gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
1757 gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
1758 gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
1759 gfc_check_lbound, gfc_check_logical, min_max_args,
1760 gfc_check_min_max_integer, gfc_check_min_max_real,
1761 gfc_check_min_max_double, gfc_check_matmul,
1762 gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
1763 gfc_check_pack, gfc_check_precision, gfc_check_radix,
1764 gfc_check_range, gfc_check_real, gfc_check_repeat,
1765 gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
1766 gfc_check_set_exponent): Fix formatting issues.
1767 (gfc_check_size, gfc_check_sign): Alphabetize function order,
1768 remove whitespace-only line.
1769 (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
1770 gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
1771 gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
1772 gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
1773 gfc_check_random_number, gfc_check_random_seed,
1774 gfc_check_second_sub, gfc_check_system_clock,
1775 gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
1776 gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
1777 gfc_check_unlink_sub): Fix formatting issues.
1779 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1781 * gfortran.h: Remove outdated comment. Don't include stdio.h
1784 2005-01-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1786 * gfortranspec.c (lang_specific_driver): Change year to 2005 in
1787 output of 'gfortran --version'.
1789 2005-01-03 Steven G. Kargl <kargls@comcast.net>
1791 * arith.c: Add system.h; remove string.h
1797 * check.c: Remove stdlib.h and stdarg.h
1798 * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
1799 * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
1800 * f95-lang.c: Add system.h; remove stdio.h
1801 * interface.c: Add system.h; remove stdlib.h and string.h
1802 * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
1803 * io.c: Remove string.h
1805 * match.c: Remove stdarg.h and string.h
1806 * misc.c: Update copyright; add system.h; remove stdlib.h,
1807 string.h, and sys/stat.h
1808 * module.c: Add system.h; remove string.h, stdio.h, errno.h,
1809 unistd.h, and time.h
1810 * option.c: Remove string.h and stdlib.h
1812 * scanner.c: Update copyright; add system.h; remove stdlib.h,
1813 stdio.h, string.h, and strings.h
1814 * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
1815 * trans-array.c: Remove stdio.h and gmp.h
1816 * trans-const.c: Ditto
1817 * trans-expr.c: Ditto
1819 * trans-stmt.c: Ditto
1821 * trans-intrinsic.c: Remove stdio.h and string.h
1823 2004-12-29 Steven G. Kargl <kargls@comcast.net>
1825 * gfortran.h (gfc_case): fix typo in comment.
1827 2004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1829 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
1830 logical shift. Call fold. Remove 0-bit shift shortcut.
1831 (gfc_conv_intrinsic_ishftc): Convert first argument to at least
1832 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
1833 result if width(arg 1) < 4 bytes. Call fold.
1836 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
1837 in front of function to match the standard. Correct handling
1840 2004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
1842 * trans-expr.c (gfc_conv_cst_int_power): Only check for
1843 flag_unsafe_math_optimizations if we have a float type.
1845 2004-12-23 Steven G. Kargl <kargls@comcast.net>
1847 * gfortran.texi: Fix typo.
1849 2004-12-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1851 * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
1854 2004-12-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1857 * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
1858 (gfc_match_nullify): Make sure that ')' is in front of the end of
1861 * scanner.c (skip_fixed_comments): Fix typo in comment preceding
1864 2004-12-14 Richard Henderson <rth@redhat.com>
1866 * gfortran.h (gfc_expr.function.name): Make const.
1867 (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
1868 (gfc_get_string): Update prototype.
1869 * iresolve.c: Include tree.h.
1870 (string_node, HASH_SIZE, string_head, hash): Remove.
1871 (gfc_get_string): Use vsnprintf, get_identifier.
1872 (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
1873 * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
1874 (gfc_done_1): Don't call gfc_iresolve_done_1.
1875 * module.c (mio_allocated_string): Take and return const char *,
1876 instead of modifying char**.
1877 (mio_expr): Update to match.
1878 * resolve.c (pure_function): Constify name argument.
1879 (resolve_function): Constify name.
1880 * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
1882 2004-12-12 Richard Henderson <rth@redhat.com>
1884 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
1885 gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
1886 gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
1887 gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
1888 gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
1889 gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
1890 gfc_resolve_unpack: Use PREFIX.
1892 2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1895 * match.c (gfc_match_common): Skip whitespace.
1897 2004-12-12 Steven G. Kargl <kargls@comcast.net>
1900 * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
1901 gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
1902 integer kind check; Issue error for -std=f95 when needed.
1903 * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
1905 * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
1906 Promote arguments to same kind.
1908 2004-12-12 Steven G. Kargl <kargls@comcast.net>
1909 Paul Brook <paul@codesourcery.com>
1912 * resolve.c (gfc_resolve_iterator_expr): New function.
1913 (gfc_resolve_iterator): Use it. Add real_ok argument. Convert
1914 start, end and stride to correct type.
1915 (resolve_code): Pass extra argument.
1916 * array.c (resolve_array_list): Pass extra argument.
1917 * gfortran.h (gfc_resolve): Add prototype.
1918 * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
1919 Handle real type iterators.
1921 2004-12-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1924 * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
1925 same kind as C's 'int'.
1926 (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
1928 2004-12-08 Richard Henderson <rth@redhat.com>
1930 * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
1931 to the output expression.
1932 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
1934 (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
1937 2004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1940 * resolve.c (resolve_code): Impose correct restrictions on
1943 * decl.c (gfc_match_end): Use locus of END when eos is an error.
1945 2004-12-02 Steven G. Kargl <kargls@comcast.net>
1946 Paul Brook <paul@codesourcery.com>
1948 * check.c (gfc_check_flush, gfc_check_fnum): New functions.
1949 (gfc_check_fstat, gfc_check_fstat_sub): New functions.
1950 (gfc_check_stat, gfc_check_stat_sub): New functions.
1951 * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
1952 * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
1953 fstat, and stat to intrinsics symbol tables.
1954 * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
1955 (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
1956 * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
1957 (gfc_resolve_stat, gfc_resolve_flush): New functions.
1958 (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
1959 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
1961 2004-12-02 Steven G. Kargl <kargls@comcast.net>
1963 * intrinsic.c: Fix and add comments, fix function declarations
1964 (OPTIONAL,REQUIRED): New symbols
1965 (add_functions,add_subroutines): Use symbols
1966 (gmp.h): Remove unused include
1968 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
1970 * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
1973 2004-11-24 Steven Bosscher <stevenb@suse.de>
1975 * options.c (gfc_post_options): Don't clear flag_inline_functions.
1977 2004-11-20 Steven G. Kargl <kargls@comcast.net>
1979 * check.c (gfc_check_getcwd_sub): Fix seg fault.
1981 * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
1982 gfc_check_unlink,gfc_check_unlink_sub): New functions
1983 * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
1984 * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
1985 exit to intrinsics symbol tables.
1986 * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
1987 gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
1988 gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
1989 gfc_resolve_unlink_sub): Add and sort prototypes.
1990 * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
1991 gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
1992 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
1994 2004-11-16 Paul Brook <paul@codesourcery.com>
1997 * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
1998 (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
1999 * trans-types.c (gfc_get_dtype): Accept array type rather than element
2001 (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
2002 (gfc_get_array_type_bounds): Ditto.
2003 (gfc_get_derived_type): Recurse into derived type pointers.
2004 * trans-types.h (gfc_get_dtype): Add prototype.
2005 * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
2007 2004-11-15 Paul Brook <paul@codesourcery.com>
2009 * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
2011 2004-11-10 Paul Brook <paul@codesourcery.com>
2014 * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
2015 * trans-io.c (transfer_array_component): Ditto.
2017 2004-11-10 Paul Brook <paul@codesourcery.com>
2019 * invoke.texi: Fix typo.
2021 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
2023 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
2024 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
2025 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
2026 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
2027 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
2029 2004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2032 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
2034 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
2036 * gfortranspec.c: Replace GNU CC with GCC.
2038 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2040 * gfortranspec.c (lang_specific_driver): Change year to 2004.
2042 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2045 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
2048 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2051 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
2052 module procedures as if they were module variables.
2054 2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2059 * module.c (write_symbol1): Set module_name for dummy arguments.
2061 2004-11-02 Paul Brook <paul@codesourcery.com>
2063 * intrinsic.c (check_intrinsic_standard): Include error locus.
2065 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
2066 locus to check_intrinsic_standard.
2068 2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
2071 * gfortran.h: Change GFC_STD_* flags to more appropriate
2072 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
2073 gfc_option_t): Add field for warning about use of nonstandard
2075 * intrinsic.c (add_sym): Add parameter for standard version, check
2076 this against current standard.
2077 (add_sym_0): Pass standard parameter to add_sym.
2078 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
2079 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
2080 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
2081 (make_generic): Add parameter for standard, check this
2082 against currently selected standard.
2083 (add_functions, add_subroutines): Add parameter to tell which
2084 standard an intrinsic belongs to.
2085 (check_intrinsic_standard): New function.
2086 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
2087 (gfc_intrinsic_sub_interface): Ditto.
2088 * lang.opt: Add Wnonstd-intrinsics option.
2089 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
2091 (set_Wall): Add warning about nonstd intrinsics.
2092 (gfc_handle_option): Change to use new GFC_STD_* flags,
2094 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
2096 2004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
2098 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
2100 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2102 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
2104 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2106 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
2109 2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
2111 * check.c (gfc_check_rand): Allow missing optional argument.
2112 (gfc_check_irand): Ditto.
2113 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
2115 2004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
2117 PR fortran/13490, PR fortran/17912
2118 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
2119 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
2120 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
2121 warning when compiling with pedantic.
2122 * gcc/fortran/arith.c: Set minimum integer values to reflect
2123 realities of two's complement signed integers. Added
2126 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
2128 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
2129 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
2132 2004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2134 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
2136 (gfc_generate_function_code): Fix formatting issue.
2138 2004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2140 * module.c: Fix formatting issues.
2142 2004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2144 * module.c (mio_interface_rest): Set where member of interface
2147 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
2150 * options.c (gfc_handle_option): Add break after handing the
2153 2004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
2155 * arith.c: Fix formatting issues.
2157 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2160 * resolve.c (resolve_operator): Use correct operator name in message.
2162 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2164 * primary.c (match_boz_constant): Allow kind parameter suffixes.
2165 Move standard warning further to the front.
2167 2004-10-07 Kazu Hirata <kazu@cs.umass.edu>
2169 * trans-stmt.c: Fix a comment typo.
2171 2004-10-07 Paul Brook <paul@codesourcery.com>
2174 * trans-array.c (gfc_trans_deferred_array): Leave use associated
2177 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2180 * simplify.c (twos_complement): New function.
2181 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
2183 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
2185 2004-10-06 Paul Brook <paul@codesourcery.com>
2187 * trans-stmt.c (gfc_trans_simple_do): New function.
2188 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
2189 loop. Update comments.
2191 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2194 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
2198 * intrinsic.c (add_sym_5): Remove.
2199 (add_subroutines): Add resolution function for MVBITS.
2200 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
2202 * iresolve.c (gfc_resolve_mvbits): New function.
2203 (gfc_resolve_random_number): Remove empty line at end of function.
2205 * trans-const.c (gfc_build_cstring_const): New function.
2206 (gfc_init_cst): Use new function.
2207 * trans-const.h (gfc_build_cstring_const): Add prototype.
2208 * trans-io.c (set_string, set_error_locus): Use new function.
2209 * trans-stmt.c (gfc_trans_goto): Use new function.
2212 * parse.c (accept_statement): Don't treat END DO like END IF and
2214 (parse_do_block): Generate possible END DO label inside END DO
2218 * check.c (gfc_check_system_sub): New function.
2219 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
2220 * intrinsic.c (add_functions): Add 'system'.
2221 (add_subroutines): Add 'system'.
2222 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
2223 Move prototypes to other suborutines.
2224 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
2226 (gfc_resolve_system_clock): Fix formatting of prototype.
2227 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
2229 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
2232 2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
2234 * scanner.c (preprocessor_line): Accept preprocessor lines without
2235 file names. Check file names for closing quotes. Handle escaped
2236 quotes in file names.
2238 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2239 Paul Brook <paul@codesourcery.com>
2241 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
2242 Use gfc_get_expr_charlen.
2243 * trans-expr.c (gfc_get_expr_charlen): New function.
2244 * trans.h (gfc_get_expr_charlen): Add prototype.
2246 2004-10-04 Kazu Hirata <kazu@cs.umass.edu>
2248 * trans-intrinsic.c: Fix a comment typo.
2250 2004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2252 * simplify.c (range_check): Remove blank line at beginning of function.
2253 (gfc_simplify_dint): Same at end of function.
2254 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
2255 (gfc_simplify_bound): Fix indentation.
2256 (gfc_simplify_log10): Simplify calculation.
2257 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
2259 (gfc_simplify_nearest): Same at end of function.
2260 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
2262 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
2263 gfc_simplify_spacing): Simplify calulations.
2265 2004-10-03 Feng Wang <fengwang@nudt.edu.cn>
2267 * trans-intrinsic.c: Fix comments on spacing and rrspacing
2268 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
2270 2004-10-01 Jan Hubicka <jh@suse.cz>
2272 * f95-lang.c (gfc_expand_function): Update call of
2273 tree_rest_of_compilation.
2274 * trans-decl.c (gfc_generate_constructors): Likewise.
2276 2004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2278 * trans-intrinsic.c: Comment fixes.
2280 2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2282 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
2284 2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2286 * trans-types.c (gfc_return_by_reference): Remove superfluous
2289 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
2290 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
2293 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
2294 function to determine return type.
2296 2004-09-20 Jan Hubicka <jh@suse.cz>
2298 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
2300 (gfc_generate_function_code): Likewise.
2302 2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2305 * simplify.c (gfc_simplify_reshape): Set shape of return value
2308 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
2309 Zack Weinberg <zack@codesourcery.com>
2311 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
2312 enumeration constants.
2314 2004-09-17 Paul Brook <paul@codesourcery.com>
2316 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
2317 (gfc_linebuf_header_size): Define.
2318 * scanner.c (load_file): Use it.
2320 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
2322 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
2323 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
2324 resolve.c, scanner.c, trans-array.c, trans-array.h,
2325 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
2326 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
2327 trans.h: Fix comment typos. Follow spelling conventions.
2329 2004-09-16 Victor Leikehman <lei@il.ibm.com>
2332 * trans-io.c (transfer_array_component): New function.
2333 (transfer_expr): For array fields, call transfer_array_component.
2335 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
2337 * gfortran.texi: Fix a typo.
2339 2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
2341 * parse.c (eof_buf): Rename eof to eof_buf.
2342 (unexpected_eof): Same.
2343 (gfc_parse_file): Same.
2345 2004-09-15 Steven G. Kargl <kargls@comcast.net>
2347 * check.c (gfc_check_getcwd_sub): New function.
2348 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
2349 * intrinsic.c (add_functions): Add function definition;
2351 * intrinsic.c (add_subroutines): Add subroutine definitions.
2352 * intrinsic.h: Add prototypes.
2353 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
2355 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
2357 2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2360 * module.c (write_symbol): Don't fill in module name here.
2361 (write_symbol0): Fill in here instead.
2363 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
2365 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
2366 trans-array.c, trans-common.c, trans-expr.c,
2367 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
2368 comment typos. Follow spelling conventions.
2370 2004-09-09 Paul Brook <paul@codesourcery.com>
2372 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
2374 2004-09-08 Paul Brook <paul@codesourcery.com>
2376 * array.c: Don't include assert.h.
2377 * data.c: Don't include assert.h. Replace assert and abort with
2378 gcc_assert and gcc_unreachable.
2379 * dependency.c: Ditto.
2380 * f95-lang.c: Ditto.
2381 * iresolve.c: Ditto.
2383 * simplify.c: Ditto.
2385 * trans-array.c: Ditto.
2386 * trans-common.c: Ditto.
2387 * trans-const.c: Ditto.
2388 * trans-decl.c: Ditto.
2389 * trans-expr.c: Ditto.
2390 * trans-intrinsic.c: Ditto.
2391 * trans-io.c: Ditto.
2392 * trans-stmt.c: Ditto.
2393 * trans-types.c: Ditto.
2396 2004-09-07 Per Bothner <per@bothner.com>
2397 Paul Brook <paul@codesourcery.com>
2399 * error.c (show_locus): Handle mapped locations.
2400 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
2401 * gfortran.h: Include input.h.
2402 (struct gfc_linebuf): Use source_location.
2403 * scanner.c (get_file): Initialize linemap.
2404 (preprocessor_line): Pass extra argument to get_file.
2405 (load_file): Ditto. Setup linemap.
2406 (gfc_new_file): Handle mapped locations.
2407 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
2408 Set decl source locations.
2409 (gfc_trans_common): Set blank common block location.
2410 * trans-decl.c (gfc_set_decl_location): New function.
2411 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
2412 (trans_function_start): Move call to gfc_set_backend_locus..
2413 (build_function_decl): ... to here.
2414 (build_entry_thunks): Set and restore the backend locus.
2415 (gfc_generate_constructors): Remove excess arguments to
2416 init_function_start.
2417 (gfc_generate_block_data): Add comments. Set the decl locus.
2418 * trans-io.c (set_error_locus): Handle mapped locations.
2419 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
2420 (gfc_trans_code): Use SET_EXPR_LOCATION.
2421 (gfc_generate_code): Override the location of the new symbol.
2422 * trans.h (gfc_set_decl_location): Add prototype.
2424 2004-08-31 Paul Brook <paul@codesourcery.com>
2426 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
2428 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2431 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
2434 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2439 * resolve.c (resolve_transfer): New function.
2440 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
2442 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2445 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
2448 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2450 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
2452 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2455 * trans-types.c (gfc_return_by_reference): Remove TODO error,
2456 add comment pointing out possible issue WRT compatibility with g77.
2458 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2460 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
2461 all occurences of 'gfc_strlen_type_node' by
2462 'gfc_charlen_type_node'.
2463 * trans-types.h: Same. Also update comment accordingly.
2465 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2467 * primary.c: Update copyright boilerplate to say GCC.
2468 * f95-lang.c: Change initial comment to say gfortran.
2470 2004-08-31 Paul Brook <paul@codesourcery.com>
2472 * trans-types.h: Add comments.
2473 (intmax_type_node, string_type_node, const_string_type_node): Remove.
2475 2004-08-30 Richard Henderson <rth@redhat.com>
2477 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
2478 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
2479 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
2480 c_long, c_long_long.
2481 (gfc_logical_info): Add c_bool.
2482 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
2483 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
2484 rather than gfc_int[48]_type_node for allocate choice.
2485 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
2486 local copies of some kind type nodes.
2487 (gfc_build_builtin_function_decls): Likewise.
2488 * trans-expr.c (gfc_conv_power_op): Likewise.
2489 * trans-intrinsic.c (gfc_conv_intrinsic_index,
2490 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
2491 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
2492 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
2493 gfc_trans_character_select, gfc_trans_allocate): Likewise.
2494 * trans-io.c (gfc_pint4_type_node): Move into ...
2495 (gfc_build_io_library_fndecls): ... here. Cache local copies of
2496 some kind type nodes.
2497 * trans-types.c (gfc_type_nodes): Remove.
2498 (gfc_character1_type_node, gfc_strlen_type_node): New.
2499 (gfc_integer_types, gfc_logical_types): New.
2500 (gfc_real_types, gfc_complex_types): New.
2501 (gfc_init_kinds): Fill in real mode_precision.
2502 (gfc_build_int_type, gfc_build_real_type): New.
2503 (gfc_build_complex_type, gfc_build_logical_type): New.
2504 (c_size_t_size): New.
2505 (gfc_init_types): Loop over kinds.
2506 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
2507 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
2508 (gfc_get_character_type_len): Likewise.
2509 (gfc_type_for_size): Loop over kinds; use a reduced set of
2510 unsigned type nodes.
2511 (gfc_type_for_mode): Loop over kinds.
2512 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
2513 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
2514 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
2515 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
2516 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
2517 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
2518 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
2519 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
2520 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
2521 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
2522 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
2523 gfc_complex8_type_node, gfc_complex16_type_node,
2524 gfc_logical1_type_node, gfc_logical2_type_node,
2525 gfc_logical4_type_node, gfc_logical8_type_node,
2526 gfc_logical16_type_node, gfc_strlen_kind): Remove.
2527 (gfc_character1_type_node): Turn in to a variable.
2528 (gfc_strlen_type_node): Likewise.
2530 2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2532 * gfortran.h (gfc_namespace): Add new field is_block_data.
2533 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
2534 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
2535 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
2536 * trans.h (gfc_generate_block_data): Add prototype.
2537 * trans-decl.c (gfc_generate_block_data): New function.
2539 2004-08-29 Richard Henderson <rth@redhat.com>
2541 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
2542 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
2543 than two HOST_WIDE_INT.
2545 2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2548 * decl.c (free_variable, free_value, gfc_free_data, var_list,
2549 var_element, top_var_list, match_data_constant, top_val_list,
2550 gfc_match_data): Move here from match.c.
2551 (match_old_style_init): New function.
2552 (variable_decl): Match old-style initialization.
2553 * expr.c (gfc_get_variable_expr): New function.
2554 * gfortran.h (gfc_get_variable_expr): Add prototype.
2555 * gfortran.texi: Start documentation for supported extensions.
2556 * match.c: Remove the functions moved to decl.c.
2557 * match.h (gfc_match_data): Move prototype to under decl.c.
2558 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
2561 2004-08-29 Steven G. Kargl <kargls@comcast.net>
2562 Paul Brook <paul@codesourcery.com>
2564 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
2565 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
2566 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
2567 (build_builtin_fntypes): New function.
2568 (gfc_init_builtin_functions): Use it.
2569 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
2570 and GFC_ISYM_ERF{,C}.
2571 (gfc_c_int_kind): Declare.
2572 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
2573 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
2574 gfc_resolve_g77_math1): Add prototypes.
2575 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
2576 * mathbuiltins.def: Add comment. Change third argument. Use
2577 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
2578 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
2579 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
2580 * trans-types.c (gfc_c_int_kind): Declare.
2581 (gfc_init_kinds): Set it.
2583 2004-08-29 Steven G. Kargl <kargls@comcast.net>
2584 Paul Brook <paul@codesourcery.com>
2586 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
2587 (gfc_check_f, gfc_simplify_f): Add f0.
2588 * intrinsic.c (do_check): Call f0. Flatten.
2589 (add_sym_0): Fix prototype. Set f0.
2590 (add_functions): Add getgid, getgid and getuid.
2591 (resolve_intrinsic): Remove obsolete comment.
2592 (do_simplify): Call f0.
2593 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
2594 gfc_resolve_getuid): Add prototypes.
2595 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
2596 gfc_resolve_getuid): New functions.
2597 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
2600 2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2602 * error.c (gfc_error_init_1): Remove blank line in front of
2603 function body. Add missing blank.
2604 (gfc_buffer_error, error_char, error_string): Remove blank line in
2605 front of function body.
2606 (show_locus): Add comma in comment.
2607 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
2608 gfc_push_error, gfc_pop_error): Remove blank line in front of
2610 (gfc_get_errors): Typo fix in comment in front of function. Remove
2611 blank line in front of function body.
2613 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2615 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
2616 variable declaration of same name.
2617 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
2618 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
2619 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
2620 Replace all calls to gfc_default_*_kind with variable accesses.
2621 * trans-types.c: Same as above.
2622 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
2623 static qualifier. Replace all occurences.
2624 (gfc_default_*_kind): Remove functions.
2626 2004-08-26 Richard Henderson <rth@redhat.com>
2628 * arith.c: Include system.h, not real system headers.
2629 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
2630 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
2631 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
2632 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
2633 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
2634 gfc_index_integer_kind, gfc_default_integer_kind,
2635 gfc_default_real_kind,gfc_default_double_kind,
2636 gfc_default_character_kind, gfc_default_logical_kind,
2637 gfc_default_complex_kind, validate_integer, validate_real,
2638 validate_logical, validate_character,
2639 gfc_validate_kind): Move to trans-types.c.
2640 (gfc_set_model_kind): Use gfc_validate_kind.
2641 (gfc_set_model): Just copy the current precision to default.
2642 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
2643 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
2644 * gfortran.h: Update file commentary.
2645 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
2646 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
2647 gfc_default_double_kind_1, gfc_default_character_kind_1,
2648 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
2649 (gfc_init_kinds): New.
2650 (gfc_init_types): Don't set gfc_index_integer_kind here.
2651 * trans-types.h (gfc_init_kinds): Declare.
2652 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
2654 2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2656 * check.c (gfc_check_atan2): New function.
2657 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
2658 * intrinsic.h (gfc_check_atan2): Add prototype.
2660 2004-08-25 Richard Henderson <rth@redhat.com>
2662 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
2663 false and we don't validate the kind.
2664 (gfc_check_integer_range, gfc_check_real_range): Update to match.
2665 * check.c (kind_check): Likewise.
2666 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
2667 (match_char_spec, match_logical_spec): Likewise.
2668 * gfortran.h (gfc_validate_kind): Likewise.
2669 * options.c (gfc_handle_option): Likewise.
2670 * primary.c (match_integer_constant, match_real_constant,
2671 match_string_constant, match_logical_constant,
2672 match_const_complex_part): Likewise.
2673 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
2674 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
2675 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
2676 gfc_simplify_maxexponent, gfc_simplify_minexponent,
2677 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
2678 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
2679 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
2680 gfc_simplify_tiny): Likewise.
2681 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
2682 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
2683 prepare_arg_info): Likewise.
2685 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2687 * expr.c (gfc_check_assign): Add comment. Add new warning.
2688 * trans-expr.c (gfc_conv_function_call): Correctly dereference
2689 result of pointer valued function when not in pointer assignment.
2691 2004-08-25 Paul Brook <paul@codesourcery.com>
2693 * config-lang.in: Remove dead commented line.
2694 * module.c: Replace g95 with gfortran in comment.
2696 2004-08-25 Paul Brook <paul@codesourcery.com>
2699 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
2701 2004-08-25 Paul Brook <paul@codesourcery.com>
2704 * trans-array.c (gfc_trans_allocate_temp_array): Remove
2705 string_length argument.
2706 (gfc_trans_array_ctor_element): New function.
2707 (gfc_trans_array_constructor_subarray): Use it.
2708 (gfc_trans_array_constructor_value): Ditto. Handle constant
2710 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
2711 (gfc_trans_array_constructor): Use them.
2712 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
2713 (gfc_conv_ss_descriptor): Remember section string length.
2714 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
2715 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
2716 (gfc_conv_expr_descriptor): Ditto.
2717 (gfc_conv_loop_setup): Ditto. Spelling fixes.
2718 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
2719 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
2720 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
2721 (gfc_conv_variable): Set string_length from section.
2722 (gfc_conv_function_call): Remove extra argument.
2723 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
2724 * trans-types.c (gfc_get_character_type_len): New function.
2725 (gfc_get_character_type): Use it.
2726 (gfc_get_dtype): Return zero for internal types.
2727 * trans-types.h (gfc_get_character_type_len): Add prototype.
2728 * trans.h (struct gfc_ss): Move string_length out of union.
2730 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2732 * trans.h (build2_v, build3_v): New macros.
2734 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
2736 * trans-array.c (gfc_conv_descriptor_data,
2737 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
2738 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
2739 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
2740 gfc_trans_allocate_temp_array,
2741 gfc_trans_array_constructor_subarray,
2742 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
2743 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
2744 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
2745 gfc_conv_array_ref, gfc_trans_preloop_setup,
2746 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
2747 gfc_conv_loop_setup, gfc_array_init_size,
2748 gfc_conv_array_initializer, gfc_trans_array_bounds,
2749 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2750 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
2751 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
2752 of build and build_v as appropriate.
2753 * trans-common.c (create_common): Same.
2754 * trans-decl.c (gfc_trans_auto_character_variable,
2755 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
2756 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
2757 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
2758 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
2759 gfc_conv_expr_op, gfc_conv_function_call,
2760 gfc_trans_structure_assign): Same.
2761 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
2762 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
2763 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
2764 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
2765 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
2766 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
2767 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
2768 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
2769 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
2770 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
2771 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
2772 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
2773 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
2774 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
2775 gfc_conv_intrinsic_iargc): Same.
2776 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
2777 set_flag, add_case, io_result, transfer_namelist_element,
2778 transfer_expr): Same.
2779 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
2780 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
2781 gfc_trans_integer_select, gfc_trans_logical_select,
2782 gfc_trans_character_select, gfc_trans_forall_loop,
2783 gfc_trans_nested_forall_loop, gfc_do_allocate,
2784 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
2785 compute_inner_temp_size, compute_overall_iter_number,
2786 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
2787 gfc_trans_forall_1, gfc_evaluate_where_mask,
2788 gfc_trans_where_assign, gfc_trans_allocate): Same.
2789 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
2790 * trans.c (gfc_add_modify_expr, gfc_finish_block,
2791 gfc_build_array_ref, gfc_build_function_call,
2792 gfc_trans_runtime_check): Same.
2794 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2796 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
2797 build_int_cst to build_int_cst_wide in accordance to Nathan's
2800 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
2802 * trans-array.c (gfc_trans_array_constructor_value): Adjust
2803 build_int_cst calls.
2804 * trans-const.c (gfc_build_string_const, gfc_init_constants,
2805 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
2806 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
2807 gfc_trans_entry_master_switch): Likewise.
2808 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
2809 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
2810 * trans-io.c (add_case, set_error_locus,
2811 transfer_namelist_element, transfer_expr): Likewise.
2812 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
2813 gfc_trans_stop, gfc_trans_character_select): Likewise.
2814 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
2815 * trans.c (gfc_trans_runtime_check): Likewise.
2817 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2819 * trans-decl.c, trans-types.c: Add and remove blank lines as
2822 2004-08-24 Richard Henderson <rth@redhat.com>
2824 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
2826 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2828 * resolve.c (merge_argument_lists): Revert unintentionally
2831 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2833 * trans-decl.c (build_function_decl): Fix spelling in comment.
2834 (build_entry_thunks): Remove code with no function.
2835 (gfc_build_intrinsic_function_decls): Remove empty line.
2837 * resolve.c (resolve_entries): Fix a bunch of comment typos.
2839 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2841 * f95-lang.c (gfc_init_decl_processing): Adjust
2842 build_common_tree_nodes call.
2844 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2846 * trans-types.c: Spelling and formatting fixes.
2848 2004-08-23 Richard Henderson <rth@redhat.com>
2850 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
2851 of going through an intermediate string. Fix 32/64 int/long bug.
2853 2004-08-23 Eric Christopher <echristo@redhat.com>
2855 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
2856 usage. Use build_vector_type_for_mode for vector types.
2858 2004-08-22 Richard Henderson <rth@redhat.com>
2861 * data.c (find_con_by_offset): Search ordered list; handle
2862 elements with repeat counts.
2863 (gfc_assign_data_value_range): New.
2864 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
2865 (gfc_assign_data_value_range): Declare.
2866 * match.c (top_val_list): Extract repeat count into a temporary.
2867 * resolve.c (values): Make left unsigned.
2868 (next_data_value): Don't decrement left.
2869 (check_data_variable): Use gfc_assign_data_value_range.
2871 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2873 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
2875 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2877 * check.c (gfc_check_reduction): Rename to ...
2878 (check_reduction): ... this. Make static. Don't check type of
2880 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
2881 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
2882 SUM to use new check functions.
2883 (check_specific): Change logic to call new functions.
2884 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
2886 (gfc_check_reduction): Remove prototype.
2888 2004-08-20 Paul Brook <paul@codesourcery.com>
2889 Canqun Yang <canqun@nudt.edu.cn>
2892 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
2893 for automatic arrays.
2894 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
2896 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2900 * match.c (match_simple_forall, match_simple_where): Forward-declare.
2901 (gfc_match_if): Order statement list alphabetically, add WHERE and
2902 FORALL, remove double PAUSE.
2903 (gfc_match_simple_where, match_forall_header,
2904 gfc_match_simple_forall): New functions.
2905 (gfc_match_forall): Use match_forall_header.
2907 2004-08-19 Paul Brook <paul@codesourcery.com>
2910 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
2911 * symbol.c (gfc_clear_attr): Use memset.
2913 2004-08-19 Paul Brook <paul@codesourcery.com>
2917 * data.c (assign_substring_data_value): Remove.
2918 (create_character_intializer): New function.
2919 (gfc_assign_data_value): Track the typespec for the current
2920 subobject. Use create_character_intializer.
2922 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
2925 * check.c (gfc_check_reduction): New function.
2926 (gfc_check_minval_maxval): Removed.
2927 (gfc_check_product): Removed.
2928 (gfc_check_sum): Removed.
2929 * intrinsic.h: Add/remove declarations for these.
2930 * gfortran.h: Add field f3red to union gfc_check_f.
2931 * intrinsic.c (add_sym_3red): New function.
2932 (add_functions): Register maxval, minval, product, and sum intrinsics
2933 through add_sym_3red.
2934 (check_specific): Handle f3red union field.
2935 * iresolve.c: Whitespace change.
2937 2004-08-18 Paul Brook <paul@codesourcery.com>
2939 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
2941 2004-08-18 Victor Leikehman <lei@il.ibm.com>
2944 * trans-io.c (transfer_namelist_element): New. Recursively handle
2945 derived-type variables. Pass string lengths.
2946 (build_dt): Code moved to build_namelist, with some
2947 changes and additions.
2948 (gfc_build_io_library_fndecls): Declare the fifth
2949 argument in st_set_nml_var_char -- string_length.
2951 2004-08-17 Paul Brook <paul@codesourcery.com>
2952 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2955 * decl.c (get_proc_name): Update mystery comment.
2956 (gfc_match_entry): Check for errors earlier. Add entry point to list.
2957 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
2958 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
2959 (struct gfc_entry_list): Define.
2960 (gfc_get_entry_list): Define.
2961 (struct gfc_namespace): Add refs and entries.
2962 (enum gfc_exec_op): Add EXEC_ENTRY.
2963 (struct gfc_code): Add ext.entry.
2964 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
2965 (mio_symbol_attribute): Don't save/reture addr->entry.
2966 (mio_namespace_ref): Refcount namespaces.
2967 * parse.c (accept_statement): Handle ST_ENTRY.
2968 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
2969 (parse_contained): Fixup sibling references to entry points
2970 after parsing the procedure body.
2971 * resolve.c (resolve_contained_fntype): New function.
2972 (merge_argument_lists, resolve_entries): New functions.
2973 (resolve_contained_functions): Use them.
2974 (resolve_code): Handle EXEC_ENTRY.
2975 (gfc_resolve): Call resolve_entries.
2976 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
2977 * symbol.c (gfc_get_namespace): Refcount namespaces.
2978 (gfc_free_namespace): Ditto.
2979 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
2980 optional when multiple entry points are present.
2981 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
2982 (gfc_get_extern_function_decl): Add assertion. Fix coment.
2983 (create_function_arglist, trans_function_start, build_entry_thunks):
2985 (gfc_build_function_decl): Rename ...
2986 (build_function_decl): ... to this.
2987 (gfc_create_function_decl): New function.
2988 (gfc_generate_contained_functions): Use it.
2989 (gfc_trans_entry_master_switch): New function.
2990 (gfc_generate_function_code): Use new functions.
2991 * trans-stmt.c (gfc_trans_entry): New function.
2992 * trans-stmt.h (gfc_trans_entry): Add prototype.
2993 * trans-types.c (gfc_get_function_type): Add entry point argument.
2994 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
2995 (gfc_generate_module_code): Call gfc_create_function_decl.
2996 * trans.h (gfc_build_function_decl): Remove.
2997 (gfc_create_function_decl): Add prototype.
2999 2004-08-15 Andrew Pinski <apinski@apple.com>
3002 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
3003 for cabs{,f} and copysign{,f}.
3004 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
3005 (gfor_fndecl_math_cabs): Delete.
3006 (gfor_fndecl_math_sign4): Delete.
3007 (gfor_fndecl_math_sign8): Delete.
3008 (gfc_build_intrinsic_function_decls): Remove the
3009 initializing of cabs{,f} and copysign{,f} functions.
3010 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
3011 instead of the functions definitions.
3012 (gfc_conv_intrinsic_sign): Likewise.
3013 * trans.h (gfor_fndecl_math_cabsf): Delete.
3014 (gfor_fndecl_math_cabs): Delete.
3015 (gfor_fndecl_math_sign4): Delete.
3016 (gfor_fndecl_math_sign8): Delete.
3018 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
3020 * trans-array.c (gfc_trans_array_constructor_value): Use
3022 * trans-const.c (gfc_build_string_const,
3023 gfc_init_constants, gfc_conv_mpz_to_tree,
3024 gfc_conv_constant_to_tree): Likewise.
3025 * trans-decl.c (gfc_get_symbol_decl): Likewise.
3026 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
3027 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
3028 * trans-io.c (add_case, set_error_locus, build_dt,
3029 transfer_expr): Likewise.
3030 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
3031 gfc_trans_stop, gfc_trans_character_select): Likewise.
3032 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
3033 * trans.c (gfc_trans_runtime_check): Likewise.
3035 2004-08-14 Paul Brook <paul@codesourcery.com>
3037 * trans-decl.c (gfc_build_function_decl): Remove dead code.
3039 2004-08-14 Paul Brook <paul@codesourcery.com>
3041 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
3043 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3045 * gfortran.h: Add comments.
3046 * parse.c (parse_contained): Fix comment typo.
3047 * resolve.c (was_declared): Ditto.
3050 2004-08-11 Paul Brook <paul@codeourcery.com>
3053 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
3055 2004-08-10 Richard Henderson <rth@redhat.com>
3057 * f95-lang.c (gfc_init_builtin_functions): Remove
3058 __builtin_stack_alloc, add __builtin_alloca.
3059 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
3060 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
3062 2004-08-10 Paul Brook <paul@codesourcery.com>
3064 * trans-io.c (transfer_expr): Handle pointters.
3066 2004-08-10 Paul Brook <paul@codesourcery.com>
3069 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
3070 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
3071 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
3072 Handle GFC_SS_COMPONENT.
3073 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
3074 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
3076 (gfc_conv_array_initializer): Call specific initializer routines.
3077 * trans-expr.c (gfc_trans_structure_assign): New function.
3078 (gfc_trans_subarray_assign): New function.
3079 (gfc_trans_subcomponent_assign): New fucntion
3080 (gfc_conv_structure): Use them.
3081 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
3082 (gfc_ss): Add shape.
3084 2004-08-08 Victor Leikehman <lei@il.ibm.com>
3086 * simplify.c (gfc_simplify_shape): Bugfix.
3087 * expr.c (gfc_copy_shape_excluding): New function.
3088 * gfortran.h (gfc_get_shape): Bugfix.
3089 (gfc_copy_shape_excluding): Added declaration.
3090 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
3091 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
3092 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
3093 time resolution of shape.
3095 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
3097 * intrinsic.c (add_subroutines): Add getenv and
3098 get_environment_variable. (add_sym_5s): New function.
3099 * intrinsic.h (gfc_resolve_get_environment_variable): Add
3101 * iresolve.c (gfc_resolve_get_environment_variable): New
3104 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
3106 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
3107 __builtin_pow[f] arguments.
3109 2004-08-06 Steven G. Kargl <kargls@comcast.net>
3111 * arith.c: Add #define for model numbers. Remove global GMP variables.
3112 (natural_logarithm,common_logarithm,exponential,sine,
3113 cosine,arctangent,hypercos,hypersine ): Remove.
3114 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
3115 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
3116 gfc_check_real_range, gfc_constant_result, gfc_range_check,
3117 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
3118 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
3119 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
3120 gfc_convert_complex,gfc_int2real,gfc_int2complex,
3121 gfc_real2int,gfc_real2real,gfc_real2complex,
3122 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
3123 to MPFR, use new functions.
3124 * arith.h: Remove extern global variables.
3125 (natural_logarithm,common_logarithm,exponential, sine, cosine,
3126 arctangent,hypercos,hypersine): Remove prototypes.
3127 (arctangent2): Update prototype from GMP to MPFR.
3128 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
3129 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
3130 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
3131 * gfortran.h (GFC_REAL_BITS): Remove.
3132 (arith): Add ARITH_NAN.
3133 Include mpfr.h. Define GFC_RND_MODE.
3134 Rename GCC_GFORTRAN_H GFC_GFC_H.
3135 (gfc_expr): Convert GMP to MPFR.
3136 * module.c: Add arith.h, correct type in comment.
3137 (mio_gmp_real): Convert GMP to MPFR.
3138 (mio_expr): Use gfc_set_model_kind().
3139 * primary.c: Update copyright date with 2004.
3140 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
3141 * simplify.c: Remove global GMP variables
3142 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
3143 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
3144 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
3145 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
3146 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
3147 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
3148 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
3149 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
3150 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
3151 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
3152 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
3153 gfc_simplify_rrspacing,gfc_simplify_scale,
3154 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
3155 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
3156 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
3157 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
3159 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
3160 gfc_conv_mpf_to_tree. Convert it to use MPFR
3161 (gfc_conv_constant_to_tree): Use it.
3162 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
3163 * trans-intrinsic.c: Add arith.h, remove gmp.h
3164 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
3166 2004-08-06 Victor Leikehman <lei@il.ibm.com>
3167 Paul Brook <paul@codesourcery.com>
3169 * trans-array.c (gfc_trans_allocate_array_storage,
3170 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
3171 gfc_conv_loop_setup): For functions, if the shape of the result
3172 is not known in compile-time, generate an empty array descriptor for
3173 the result and let the callee to allocate the memory.
3174 (gfc_trans_dummy_array_bias): Do nothing for pointers.
3175 (gfc_conv_expr_descriptor): Use function return values directly.
3176 * trans-expr.c (gfc_conv_function_call): Always add byref call
3178 (gfc_trans_pointer_assignment): Add comments.
3179 (gfc_trans_arrayfunc_assign): Don't chain on expression.
3181 2004-08-01 Roger Sayle <roger@eyesopen.com>
3183 * options.c (gfc_init_options): Don't warn about the use GNU
3184 extensions by default.
3185 (gfc_post_options): Warn about GNU extensions with -pedantic.
3186 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
3188 2004-07-30 Richard Henderson <rth@redhat.com>
3190 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
3193 2004-07-25 Richard Henderson <rth@redhat.com>
3195 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
3196 and DECL_IGNORED_P on RESULT_DECL.
3197 (gfc_generate_constructors): Likewise.
3199 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3202 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
3204 (ffixed-line-length-80, ffixed-line-length-132): Remove.
3205 * options.c (gfc_handle_options): Deal with changed options.
3206 * scanner.c (load_line): Change second arg to 'char **',
3207 allocate if pointing to NULL. Keep track of buffer's length.
3208 Adapt buffer size to overlong lines. Pad lines to full length
3210 (load_file): Adapt to new interface of load_line.
3212 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
3214 * trans.h (builtin_function): Declare.
3216 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3219 (parts ported from g95)
3220 * parse.h (gfc_state_data): New field do_variable.
3221 (gfc_check_do_variable): Add prototype.
3222 * parse.c (push_state): Initialize field 'do_variable'.
3223 (gfc_check_do_variable): New function.
3224 (parse_do_block): Remember do iterator variable.
3225 (parse_file): Initialize field 'do_variable'.
3226 * match.c (gfc_match_assignment, gfc_match_do,
3227 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
3228 Add previously missing checks.
3229 (gfc_match_return): Reformat error message.
3230 * io.c (match_out_tag): New function.
3231 (match_open_element, match_close_element,
3232 match_file_element, match_dt_element): Call match_out_tag
3233 instead of match_vtag where appropriate.
3234 (match_io_iterator, match_io_element): Add missing check.
3235 (match_io): Reformat error message.
3236 (match_inquire_element): Call match_out_tag where appropriate.
3238 * parse.c (gfc_check_do_variable): Fix error locus.
3240 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3243 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
3244 for every assumed length character dummy argument.
3247 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
3250 * simplify.c (gfc_simplify_bound): Copy the bound expression.
3252 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3255 * trans-array.c gfc_trans_g77_array,
3256 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
3257 for assumed length characters.
3258 (gfc_conv_expr_descriptor): Set se->string_length if dealing
3259 with a character expression.
3260 (gfc_cvonv_array_parameter): Pass string length when passing
3261 character array according to g77 conventions.
3263 2004-07-12 Paul Brook <paul@codesourcery.com>
3265 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
3266 * trans-array.c (gfc_trans_auto_array_allocation): Remove
3267 initialization code.
3268 * trans-common.c (create_common): Use gfc_conv_initializer.
3269 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
3270 * trans-expr.c (gfc_conv_initializer): New function.
3271 (gfc_conv_structure): Use it.
3272 * trans.h (gfc_conv_initializer): Add prototype.
3274 2004-07-11 Paul Brook <paul@codesourcery.com>
3277 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
3279 (parse_contained): Mark contained symbols as referenced.
3281 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3284 * module.c (gfc_dump_module, gfc_use_module): Print locus
3285 when opening of module file fails.
3288 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
3291 * match.c (gfc_match_program): A program name is obligatory.
3292 (gfc_match_return): RETURN in main program is an extension.
3293 (gfc_match_block_data): A space is required before a block data
3297 * primary.c (match_boz_constant): Call gfc_notify_std only if
3298 we actually have a non-standard boz-literal-constant.
3301 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
3302 warning if assigning NULL().
3304 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
3306 * f95-lang.c (set_block): Remove.
3307 (gfc_clear_binding_stack): New.
3308 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
3309 (struct binding_level): Remove block_created_by_back_end.
3310 (clear_binding_level): Likewise.
3311 (poplevel): Don't handle block_created_by_back_end.
3313 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3315 * trans-decl.c (gfc_create_module_variable): Nothing to do if
3316 symbol is in common, because we ...
3317 (gfc_generate_module_vars): Call gfc_trans_common.
3319 2004-07-10 Paul Brook <paul@codesourcery.com>
3321 * trans-array.c (gfc_build_null_descriptor): New function.
3322 (gfc_trans_static_array_pointer): Use it.
3323 * trans-array.h (gfc_build_null_descriptor): Add prototype.
3324 * trans-expr.c (gfc_conv_structure): Handle array pointers.
3326 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3329 * decl.c (gfc_match_save): Use-associated common block
3331 * gfortran.h (gfc_common_head): Add new field 'name'.
3332 Fix typo in comment after #endif.
3333 * match.c (gfc_get_common): Add new argument from_common,
3334 mangle name if flag is set, fill in new field in structure
3336 (match_common): Set new arg in call to gfc_get_common,
3337 use-associated common block doesn't collide.
3338 * match.h (gfc_get_common): Adapt prototype.
3339 * module.c (load_commons): Set new arg in call to
3341 * symbol.c (free_common_tree): New function.
3342 (gfc_free_namespace): Call new function.
3343 * trans-common.c (several functions): Remove argument
3344 'name', use name from gfc_common_head instead.
3346 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3348 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
3349 and RHS match. Return early if the RHS is NULL().
3352 * match.c (match_common): Fix error reporting for used common.
3355 * trans-expr.c (gfc_conv_structure): Handle initialization
3356 of scalar pointer components.
3358 * parse.c (decode_statement): Fix matching of BLOCK DATA.
3360 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
3361 by fix for PR 15481.
3363 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3365 * trans-common.c: Fix whitespace issues, make variable names
3367 (create_common): Additionally, make loop logic more obvious.
3369 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3370 Paul Brook <paul@codesourcery.com>
3373 * trans-common.c (calculate_length): Remove ...
3374 (get_segment_info): Merge into here. Save field type.
3375 (build_field): Use saved type.
3376 (create_common, new_condition, new_segment, finish_equivalences):
3377 Use new get_segment_info.
3378 * trans-types.c: Update comment.
3380 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3383 * moduele.c (mio_symbol): Don't I/O initial values unless
3384 symbol is a parameter.
3386 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3389 * resolve.c (resolve_symbol): Verify that the shape of a
3390 parameter array is not only explicit, but also constant.
3391 * array.c (gfc_is_compile_time_shape): New function.
3392 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
3394 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3400 * module.c (write_symbol, write_symtree): Remove workaround.
3401 * primary.c (match_actual_arglist): Enhance comment.
3402 (gfc_match_rvalue): Handle function call with first argument
3403 a keyword argument correctly.
3404 * resolve.c (resolve_symbol): Change call to
3405 gfc_set_default_type to issue error if no implicit type
3407 * trans-decl.c (gfc_create_module_variable): Remove workaround.
3409 2004-07-08 Paul Brook <paul@codesourcery.com>
3411 * intrinsic.c (add_sym_4s): New function.
3412 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
3414 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
3415 Paul Brook <paul@codesourcery.com>
3419 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
3420 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
3421 * intrinsic.c (add_functions): Identify iargc. Add
3422 command_argument_count.
3423 (add_subroutines): Resolve getarg. Add get_command and
3424 get_command_argument.
3425 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
3426 gfc_resolve_get_command_argument): Add prototypes.
3427 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
3428 gfc_resolve_get_command_argument): New functions.
3429 * trans-decl.c (gfor_fndecl_iargc): New variable.
3430 (gfc_build_intrinsic_function_decls): Set it.
3431 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
3432 (gfc_conv_intrinsic_function): Use it.
3433 * trans.h (gfor_fndecl_iargc): Declare.
3435 2004-07-04 Matthias Klose <doko@debian.org>
3437 * Make-lang.in: Generate and install gfortran man page.
3438 * invoke.texi: Remove extra '@c man end'.
3440 2004-07-04 Richard Henderson <rth@redhat.com>
3442 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
3444 2004-07-04 Paul Brook <paul@codesourcery.com>
3446 * decl.c (gfc_match_implicit_range): Don't use typespec.
3447 (gfc_match_implicit): Handle character selectors.
3448 * gfortran.h (gfc_set_implicit): Remove prototype.
3449 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
3450 * parse.c (accept_statement): Don't call gfc_set_implicit.
3451 * symbol.c (new_ts): Remove.
3452 (gfc_set_implicit_none): Use same loop bounds as other functions.
3453 (gfc_set_implicit): Remove.
3454 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
3455 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
3457 2004-06-30 Richard Henderson <rth@redhat.com>
3459 * match.c (var_element): Remove unused variable.
3461 * trans-decl.c (gfc_generate_function_code): Don't set
3462 x_whole_function_mode_p.
3463 (gfc_generate_constructors): Likewise.
3465 2004-06-30 Richard Henderson <rth@redhat.com>
3467 * trans-decl.c (gfc_generate_function_code): Don't set
3468 immediate_size_expand.
3469 (gfc_generate_constructors): Likewise.
3471 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3474 * decl.c (gfc_match_type_spec): Rename second argument to
3475 'implicit_flag', reverse meaning. Don't match_char_spec if
3476 'implicit_flag' is set. Rename to ...
3477 (match_type_spec): ... this.
3478 (gfc_match_implicit_none, match_implicit_range): Move here
3480 (gfc_match_implicit): Move here from match.c, try to
3481 match_char_len if match_implicit_range doesn't succeed for
3482 CHARACTER implicits. Call renamed fucntion match_type_spec.
3483 (gfc_match_data_decl, match_prefix): Call renamed function
3485 * match.c (gfc_match_implicit_none, match_implicit_range,
3486 gfc_match_implicit): Move to decl.c.
3487 * match.h (gfc_match_implicit_none, gfc_match_implicit):
3488 Move protoypes to section 'decl.c'.
3489 (gfc_match_type_spec): Remove prototype.
3491 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3493 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
3496 2004-06-29 Steven Bosscher <stevenb@suse.de>
3498 Make sure types in assignments are compatible. Mostly mechanical.
3499 * trans-const.h (gfc_index_one_node): New define.
3500 * trans-array.c (gfc_trans_allocate_array_storage,
3501 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
3502 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
3503 gfc_conv_array_ubound, gfc_conv_array_ref,
3504 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
3505 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
3506 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
3507 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
3508 types in assignments, conversions and conditionals for expressions.
3509 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
3510 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
3511 gfc_conv_function_call, gfc_trans_pointer_assignment,
3512 gfc_trans_scalar_assign): Likewise.
3513 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
3514 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
3515 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
3516 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
3517 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
3518 gfc_conv_allocated, gfc_conv_associated,
3519 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
3520 * trans-io.c (set_string): Likewise.
3521 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
3522 gfc_do_allocate, generate_loop_for_temp_to_lhs,
3523 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
3524 compute_overall_iter_number, gfc_trans_assign_need_temp,
3525 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
3526 gfc_evaluate_where_mask, gfc_trans_where_assign,
3527 gfc_trans_where_2): Likewise.
3528 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
3529 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
3531 * trans.c (gfc_add_modify_expr): Add sanity check that types
3532 for the lhs and rhs are the same for scalar assignments.
3534 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3536 * dump-parse-tree.c (show_common): New function.
3537 (gfc_show_namespace): Show commons.
3539 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3540 Andrew Vaught <andyv@firstinter.net>
3544 * decl.c (gfc_match_save): Adapt to new common structures,
3545 don't allow saving USE-associated common.
3546 * dump-parse-tree (gfc_show_attr): (saved_)common are not
3547 symbol attributes any longer.
3548 (gfc_show_symbol): Don't show old-style commons any longer.
3549 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
3551 * gfortran.h (symbol_attribute): Remove common and saved_common
3553 (gfc_symbol): Remove common_head element.
3554 (gfc_common_head): New struct.
3555 (gfc_get_common_head): New macro.
3556 (gfc_symtree): Add field 'common' to union.
3557 (gfc_namespace): Add field 'common_root'; change type of field
3558 'blank_common' to blank_common.
3559 (gfc_add_data): New prototype.
3560 (gfc_traverse_symtree): Expect a symtree as first argument
3561 instead of namespace.
3562 * match.c (gfc_get_common): New function.
3563 (match_common_name): Change to take char * as argument, adapt,
3564 fix bug with empty name.
3565 (gfc_match_common): Adapt to new data structures. Disallow
3566 redeclaration of USE-associated COMMON-block. Fix bug with
3568 (var_element): Adapt to new common structures.
3569 * match.h (gfc_get_common): Declare.
3570 * module.c: Add 2004 to copyright years, add commons to module
3571 file layout description.
3572 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
3573 for removed attributes.
3574 (mio_symbol): Adapt to new way of storing common relations.
3575 (load_commons): New function.
3576 (read_module): Skip common list on first pass, load_commons at
3578 (write_commons): New function.
3579 (write_module): Call write_commons().
3580 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
3581 functions related to removed attributes.
3582 (gfc_add_data): New function.
3583 (gfc_clear_attr): Don't set removed attributes.
3584 (gfc_copy_attr): Don't copy removed attributes.
3585 (traverse_symtree): Remove.
3586 (gfc_traverse_symtree): Don't traverse symbol
3587 tree of the passed namespace, but require a symtree to be passed
3588 instead. Unify with traverse_symtree.
3589 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
3591 (save_symbol): Remove setting of removed attribute.
3592 * trans-common.c (gfc_sym_mangled_common_id): Change to
3593 take 'char *' argument instead of 'gfc_symbol'.
3594 (build_common_decl, new_segment, translate_common): Adapt to new
3595 data structures, add new
3597 (create_common): Adapt to new data structures, add new
3598 argument name. Fix typo in intialization of derived types.
3599 (finish_equivalences): Add second argument in call to
3601 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
3602 (gfc_trans_common): Adapt to new data structures.
3603 * trans-decl.c (gfc_create_module_variables): Remove test for
3606 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3608 * io.c: Add 2004 to copyright years.
3610 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3611 Andrew Vaught <andyv@firstinter.net>
3613 * gfortran.h (gfc_gsymbol): New typedef.
3614 (gfc_gsym_root): New variable.
3615 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
3616 * parse.c (global_used): New function.
3617 (parse_block_data): Check for double empty BLOCK DATA,
3618 use global symbol table.
3619 (parse_module): Use global symbol table.
3620 (add_global_procedure, add_global_program): New functions.
3621 (gfc_parse_file): Use global symbol table.
3622 * symbol.c (gfc_gsym_root): New variable.
3623 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
3626 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3628 * module.c (mio_gmp_real): Correct writing of negative numbers.
3630 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3633 * expr.c (check_intrinsic_op): Allow comparison of characters.
3636 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3637 Andrew Vaught <andyv@firstinter.net>
3639 * decl.c (contained_procedure): New function.
3640 (match_end): Verify correctness of END STATEMENT in
3643 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3644 Andrew Vaught <andyv@firstinter.net>
3647 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
3648 (decode_statement): Enforce required space in free-form.
3650 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3652 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
3653 * trans-array.c (gfc_conv_descriptor_data): Add operand
3655 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
3656 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
3657 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
3658 * trans-common.c (create_common): Likewise.
3659 * trans-expr.c (gfc_conv_component_ref): Likewise.
3660 * trans-io.c (set_parameter_value): Likewise.
3661 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
3662 (transfer_expr): Likewise.
3663 * trans-decl.c (gfc_trans_auto_character_variable):
3664 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
3665 (gfc_gimplify_function): New function.
3666 (gfc_generate_function-code): Properly handle nested functions.
3667 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
3669 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
3672 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
3673 (gfc_resolve_inquire): Resolve the iolength tag. Return
3674 SUCCESS at end of function if no failure has occured.
3675 * resolve.c (resolve_code): Resolve if iolength is encountered.
3676 * trans-io.c: (ioparm_iolength, iocall_iolength,
3677 iocall_iolength_done): New variables.
3678 (last_dt): Add IOLENGTH.
3679 (gfc_build_io_library_fndecls ): Set iolength related variables.
3680 (gfc_trans_iolength): Implement.
3681 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
3683 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
3686 * scanner.c (load_line): Don't truncate preprocessor lines.
3687 Reformat error message.
3688 (preprocessor_line): Issue warning in case of malformed
3691 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3693 * resolve.c (resolve_symbol): Add comment in function body.
3694 (check_data_variable): Change type of mark to ar_type, adapt code
3697 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3699 * array.c (gfc_insert_constructor): Avoid redundant call to
3700 mpz_comp. Add 2004 to copyright years.
3702 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
3704 * trans.h (stmtblock_t): Change has_scope to unsigned int.
3706 2004-06-20 Steven G. Kargl <kargls@comcast.net>
3708 * arith.c (gfc_range_check): correct complex underflow.
3710 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3713 * match.c (match_case_selector): Call gfc_match_init_expr
3714 instead of gfc_match_expr.
3715 * resolve.c (validate_case_label_expr): No need to check for
3716 constant, since it wouldn't have been matched with the fix to
3719 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3722 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
3725 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3728 * trans-deecl.c (generate_local_decl): Do not issue warning for
3729 unused variables if they're use associated.
3731 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3732 Andrew Vaught <andyv@firstinter.net>
3735 * gfortran.h (gfc_check_f): Add new field f3ml.
3736 * check.c (gfc_check_minloc_maxloc): Take argument list instead
3737 of individual arguments, reorder if necessary.
3738 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
3739 * intrinsic.c (add_sym_3ml): New function.
3740 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
3741 (check_specific): Catch special case MINLOC, MAXLOC.
3743 2004-06-14 Paul Brook <paul@codesourcery.com>
3745 * intrinsic.c (add_sym_2s): Use correct function types.
3747 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3749 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
3750 * data.c (gfc_get_section_index): Remove dependency on trans.h.
3752 2004-06-12 Steven G. Kargl <kargls@comcast.net>
3754 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
3755 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
3756 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
3757 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
3758 * trans-intrinsic.c: Use symbols.
3759 * intrinsic.c (add_sym_2s): New function.
3760 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
3761 * intrinsic.h: Function prototypes.
3762 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
3763 gfc_resolve_srand): New functions.
3765 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3768 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
3769 contained procedure.
3771 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3774 * interface.c (compare_parameter, compare_actual_formal): Don't
3775 check types and array shapes for NULL()
3776 * trans-expr.c (conv_function_call): No double indirection for
3779 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
3781 * trans-expr.c (gfc_conv_cst_int_power): Compute
3782 x**(-n) by converting it to (1/x)**n instead of
3785 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3788 * module.c (write_symbol, write_symtree): Don't write symbols
3789 wrongly added to namespace.
3790 * trans-decl.c (gfc_create_module_variable): Don't create a
3791 backend decl for a symbol incorrectly added to namespace.
3793 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3796 * resolve.c (resolve_symbol): Verify that parameter array has an
3797 explicit shape. Fix typos and coding style issues in surrounding
3800 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3803 * gfortran.texi: The documentation doesn't contain infomration on
3804 how to report bugs, and shouldn't, so remove the line which
3807 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3809 * intrinsic.c (sort_actual): Keep track of type of missing
3810 arguments. (Missing from previous commit.)
3812 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3814 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
3815 * interface.c (compare_actual_formal): Keep type of omitted
3817 * trans-expr.c (gfc_conv_function_call): Add string length
3818 argument for omitted string argument.
3820 2004-06-03 Paul Brook <paul@codesourcery.com>
3822 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
3823 lists instead of compound expr chains.
3824 (gfc_trans_code): Annotate statement lists.
3826 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3828 * trans-array.c: Fix spelling in comments.
3830 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3833 * data.c (assign_substring_data_value): New function.
3834 (gfc_assign_data_value): Call the new function if we're dealing
3835 with a substring LHS.
3837 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3840 * gfortran.h (GFC_VERSION): Remove.
3841 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
3844 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3846 * trans-types.c: Fix spelling & layout in comments.
3848 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3851 * trans-const.c (gfc_conv_string_init): Allow variable string
3852 length lower than initialization string length.
3854 2004-05-30 Paul Brook <paul@codesourcery.com>
3857 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
3858 * trans-expr.c (gfc_trans_string_copy): New function.
3859 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
3861 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
3862 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
3863 * trans.h (struct gfc_saved_var): Define.
3864 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
3866 2004-05-30 Steven G. Kargl <kargls@comcast.net>
3868 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
3870 2004-05-29 Steven G. Kargl <kargls@comcast.net>
3872 * simplify.c (gfc_simplify_log): Remove useless line of code.
3874 2004-05-29 Paul Brook <paul@codesourcery.com>
3876 * trans-common.c (find_equivalence): Find multiple rules.
3878 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3880 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
3881 (gfc_current_locus): Declare new global variable.
3882 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
3883 (gfc_current_locus1): Rename ...
3884 (gfc_current_locus): ... to this.
3885 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
3886 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
3887 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
3888 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
3889 and gfc_current_locus(), respectively.
3890 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
3891 match_array_cons_element, gfc_match_array_constructor):
3892 Read/modify gfc_current_locus instead of calling gfc_set_locus()
3893 and gfc_current_locus().
3894 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
3895 match_attr_spec, gfc_match_function_decl, gfc_match_end,
3896 attr_decl1, gfc_match_save): Likewise.
3897 * error.c (error_print, gfc_internal_error): Likewise.
3898 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
3899 * interface.c (gfc_add_interface): Likewise.
3900 * io.c (gfc_match_format, match_dt_format, match_dt_element,
3901 match_io_iterator, match_io): Likewise.
3902 * match.c (gfc_match_space, gfc_match_eos,
3903 gfc_match_small_literal_int, gfc_match_st_label,
3904 gfc_match_strings, gfc_match_name, gfc_match_iterator,
3905 gfc_match_char, gfc_match, gfc_match_assignment,
3906 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
3907 gfc_match_nullify, gfc_match_call, match_implicit_range,
3908 gfc_match_implicit, gfc_match_data, match_case_selector,
3909 gfc_match_case, match_forall_iterator): Likewise.
3910 * matchexp.c (gfc_match_defined_op_name, next_operator,
3911 match_level_1, match_mult_operand, match_ext_mult_operand,
3912 match_add_operand, match_ext_add_operand, match_level_2,
3913 match_level_3, match_level_4, match_and_operand, match_or_operand,
3914 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
3915 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
3916 * parse.c (match_word, decode_statement, next_free, next_fixed,
3917 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
3919 * primary.c (match_digits, match_integer_constant,
3920 match_boz_constant, match_real_constant, match_substring,
3921 next_string_char, match_charkind_name, match_string_constant,
3922 match_logical_constant, match_const_complex_part,
3923 match_complex_constant, match_actual_arg, match_keyword_arg,
3924 gfc_match_actual_arglist, gfc_match_structure_constructor,
3925 gfc_match_rvalue, gfc_match_variable): Likewise.
3926 * st.c (gfc_get_code): Likewise.
3927 * symbol.c (check_conflict, check_used, check_done,
3928 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
3929 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
3930 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
3932 2004-05-26 Roger Sayle <roger@eyesopen.com>
3934 * io.c (format_asterisk): Silence compiler warnings by correcting
3935 the number of elements of a "locus" initializer.
3937 2004-05-25 Roger Sayle <roger@eyesopen.com>
3940 * matchexp.c: Allow unary operators after arithmetic operators
3942 (match_ext_mult_operand, match_ext_add_operand): New functions.
3943 (match_mult_operand): Tweak to call match_ext_mult_operand.
3944 (match_add_operand): Tweak to call match_ext_mult_operand.
3945 (match_level_2): Rearrange to call match_ext_add_operand.
3947 2004-05-25 Paul Brook <paul@codesourcery.com>
3949 * expr.c (check_inquiry): Remove bogus tests.
3951 2004-05-23 Paul Brook <paul@codesourcery.com>
3954 * expr.c (restricted_args): Remove redundant checks/argument.
3955 (external_spec_function): Update to match.
3956 (restricted_intrinsic): Rewrite.
3958 2004-05-23 Paul Brook <paul@codesourcery.com>
3959 Victor Leikehman <lei@haifasphere.co.il>
3961 * gfortran.h (struct gfc_symbol): Add equiv_built.
3962 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
3964 (current_length): Remove.
3965 (add_segments): New function.
3966 (build_equiv_decl): Create initialized common blocks.
3967 (build_common_decl): Always add decl to bindings.
3968 (create_common): Create initializers.
3969 (find_segment_info): Reformat to match coding conventions.
3970 (new_condition): Use add_segments.
3971 (add_condition, find_equivalence, add_equivalences): Move iteration
3972 inside functions. Only process each segment once.
3973 (new_segment, finish_equivalences, translate_common): Simplify.
3975 2004-05-23 Steven G. Kargl <kargls@comcast.net>
3977 * check.c (gfc_check_random_seed): Issue for too many arguments.
3979 2004-05-22 Steven G. Kargl <kargls@comcast.net>
3981 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
3983 2004-05-22 Paul Brook <paul@codesourcery.com>
3985 * dump-parse-tree.c (gfc_show_equiv): New function.
3986 (gfc_show_namespace): Use it.
3988 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
3991 * symbol.c (gfc_add_common): Disable checks to work around other more
3992 fundamental inadequacies.
3994 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3996 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
3998 (gfc_build_function_decl): Likewise.
4000 2004-05-22 Steven G. Kargl <kargls@comcast.net>
4002 * check.c (gfc_check_system_clock): New function.
4003 * intrinsic.c (add_sym_3s): New function.
4004 (add_subroutines): Use it.
4005 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
4007 * iresolve.c (gfc_resolve_system_clock): New function.
4009 2004-05-22 Steven G. Kargl <kargls@comcast.net>
4011 * invoke.texi: Document -Wunderflow and spell check.
4012 * lang.opt: Add Wunderflow.
4013 * gfortran.h (gfc_option_t): Add warn_underflow option.
4014 * options.c (gfc_init_options, set_Wall): Use it.
4015 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
4016 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
4017 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
4018 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
4019 * arith.c (common_logarithm): Fix typo in comment.
4021 2004-05-21 Roger Sayle <roger@eyesopen.com>
4023 * io.c (check_format): As a GNU extension, allow the comma after a
4024 string literal to be optional in a format. Use gfc_notify_std to
4025 issue an error/warning as appropriate.
4027 2004-05-21 Roger Sayle <roger@eyesopen.com>
4029 * io.c (check_format): Use gfc_notify_std to determine whether to
4030 issue an error/warning for omitting the digits from the X format.
4032 2004-05-20 Roger Sayle <roger@eyesopen.com>
4034 * io.c (check_format): Allow the number before the X format to
4035 be optional when not -pedantic.
4037 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
4038 Paul Brook <paul@codesourcery.com>
4040 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
4041 Create decls for __builtin_pow{,f}.
4042 * gfortran.h (PREFIX_LEN): Define.
4043 * trans-decl.c (gfor_fndecl_math_powi): Add.
4044 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
4045 (gfc_build_intrinsic_function_decls): Create decls for powi.
4046 * trans-expr.c (powi_table): Add.
4047 (gfc_conv_integer_power): Remove.
4048 (gfc_conv_powi): New function.
4049 (gfc_conv_cst_int_power): New function.
4050 (gfc_conv_power_op): Use new powi routines.
4051 * trans.h (struct gfc_powdecl_list): Add.
4052 (gfor_fndecl_math_powi): Add.
4053 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
4055 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4057 * trans.c, trans-decl.c: Fix comment typos.
4059 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4061 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
4063 2004-05-18 Steve Kargl <kargls@comcast.net>
4065 * arith.c (gfc_int2complex): Fix incorrect range checking.
4067 2004-05-18 Paul Brook <paul@codesourcery.com>
4070 * decl.c (add_init_expr_to_sym): Remove incorrect check.
4071 (default_initializer): Move to expr.c.
4072 (variable_decl): Don't assign default initializer to variables.
4073 * expr.c (gfc_default_initializer): Move to here.
4074 * gfortran.h (gfc_default_initializer): Add prototype.
4075 * resolve.c (resolve_symbol): Check for illegal initializers.
4076 Assign default initializer.
4078 2004-05-17 Steve Kargl <kargls@comcast.net>
4080 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
4082 2004-05-17 Steve Kargl <kargls@comcast.net>
4084 * arith.c (gfc_real2complex): Range checking wrong part of complex
4087 2004-05-16 Paul Brook <paul@codesourcery.com>
4089 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
4091 2004-05-16 Paul Brook <paul@codesourcery.com>
4093 * arith.c (gfc_range_check): Fix logic error.
4095 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
4097 * arith.c: Fix comment typos.
4099 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4102 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
4103 not initialized in a disallowed fashion.
4104 * match.c (gfc_match_common): Likewise.
4105 (var_element): Verify that variable is not in the blank COMMON,
4106 if it is in a common.
4108 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
4110 * Make-lang.in (f95.generated-manpages): Remove.
4111 (f95.srcextra): New.
4112 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
4113 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
4116 (f95.install-info): Remove.
4117 (install-info): New.
4119 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
4121 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
4123 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4125 * primary.c (match_boz_constant): Use gfc_notify_std() for
4126 issuing a warning or an error.
4128 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4131 * primary.c (match_structure_constructor): Rename ...
4132 (gfc_match_structure_constructor): ... to this. Make non-static.
4133 (gfc_match_rvalue): Call renamed function.
4134 * match.h (gfc_match_structure_constructor): Declare.
4135 * match.c (gfc_match_data_constant): Handle structure
4138 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4142 * gfortran.h (gfc_linebuf): New typedef.
4144 (gfc_file): Revamped, use new gfc_linebuf.
4145 (locus): Revamped, use new types.
4146 (gfc_current_file): Remove.
4147 (gfc_current_form, gfc_source_file): New global variables.
4148 * match.c (gfc_match_space, gfc_match_strings): Use
4149 gfc_current_form to find source form.
4150 * module.c (gfc_dump_module): Use gfc_source_file when printing
4152 * error.c (show_locus, show_loci) Use new data structures to print
4154 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
4156 (file_head, current_file, gfc_current_form, line_head, line_tail,
4157 gfc_current_locus1, gfc_source_file): New global variables.
4158 (gfc_scanner_init1): Set new global variables.
4159 (gfc_scanner_done1): Free new data structures.
4160 (gfc_current_locus): Return pointer to gfc_current_locus1.
4161 (gfc_set_locus): Set gfc_current_locus1.
4162 (gfc_at_eof): Set new variables.
4163 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
4164 to new locus structure.
4165 (gfc_check_include): Remove.
4166 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
4167 (gfc_skip_comments): Use gfc_current_form, find locus with
4169 (gfc_next_char): Use gfc_current_form.
4170 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
4171 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
4173 (get_file): New function.
4174 (preprocessor_line, include_line): New functions.
4175 (load_file): Move down, rewrite to match new data structures.
4176 (gfc_new_file): Rewrite to match new data structures.
4177 * parse.c (next_statement): Remove code which is now useless. Use
4178 gfc_source_form and gfc_source_file where appropriate.
4179 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
4180 when determining locus of frontend code.
4181 * trans-io.c (set_error_locus): Same.
4182 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
4183 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
4185 (all): Add missing initializers.
4187 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4189 * Make-lang.in (trans-common.o): Remove redundant dependency.
4190 (data.c): Replace object file name ...
4191 (data.o): ... by the correct one.
4193 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4195 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
4196 for ranges when dumping array references.
4198 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
4200 * decl.c (variable_decl): Always apply default initializer.
4202 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4205 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
4206 handle zero correctly.
4208 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4210 * match.c (gfc_match): Eliminate dead code.
4212 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4214 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
4215 Detect bad continuation line in fixed form sources.
4217 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4220 * iresolve.c (gfc_resolve_nearest): Add new function.
4221 * intrinsic.h: ... declare it here.
4222 * intrinsic.c (add_functions): ... add it as resolving function
4225 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4228 * match.c (gfc_match_do): Allow infinite loops with
4229 label-do-stmt. Do not enforce space after comma.
4231 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4234 * parse.c (parse_interface): Allow empty INTERFACE, remove
4237 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4239 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
4240 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
4241 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
4242 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
4243 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
4244 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
4245 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
4246 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
4247 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
4248 trans-types.h, trans.c, trans.h: Update copyright years and
4250 * data.c: Likewise, also removed two whitespace-only lines.
4251 * gfortranspec.c, lang.opt: Update copyright years.
4253 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4256 * trans-decl.c (generate_local_decl): Don't warn for unused
4257 variables which are in common blocks.
4259 2004-05-13 Diego Novillo <dnovillo@redhat.com>
4261 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
4262 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
4263 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
4265 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
4268 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
4270 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
4272 * gfortran.texi: Use @table @emph instead of @itemize @emph.
4273 Remove "set DEVELOPMENT".
4274 (Compiling GFORTRAN): Remove.
4276 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4278 * array.c (match_subscript, match_array_ref): Add comments
4279 explaining argument 'init'.
4280 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
4281 trans-expr.c, trans.c: Fix some typos in comments.
4282 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
4283 * primary.c (match_digits, match_integer_constant): Add comment
4284 explaining signflag.
4286 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4289 * primary.c: Include system.h and flags.h, needed for pedantic.
4290 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
4293 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4296 * match.c (match_data_constant): Handle case where
4297 gfc_find_symbol sets sym to NULL
4299 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4301 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
4302 dependency on mathbuiltins.def
4304 2004-04-24 Victor Leikehman <lei@il.ibm.com>
4306 * trans-io.c (transfer_expr): Implemented recursive printing
4309 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
4311 * gfortranspec.c: Do not include multilib.h.
4313 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4315 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
4316 2004 to copyright years.
4317 * trans-expr.c, trans-decl.c: Comment update, we now generate
4318 GENERIC, not SIMPLE. Add 2004 to copyright years.
4320 2004-04-24 Paul Brook <paul@codesourcery.com>
4322 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
4324 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
4327 * arith.c (gfc_arith_divide): Fix complex divide.
4329 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
4331 * gfortranspec.c: Include the target headers.
4333 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
4337 * arith.c (arctangent2): New function.
4338 * arith.h (arctangent2): Add function prototype.
4339 * simplify.c (gfc_simplify_atan2): Use it.
4340 (gfc_simplify_log): Use it.
4342 2004-04-12 Diego Novillo <dnovillo@redhat.com>
4344 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
4345 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
4347 2004-04-11 Bud Davis <bdavis9659@comcast.net>
4350 * trans-io.c (build_dt): Change REC to value.
4352 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
4355 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
4356 the real value when converting mpf to string.
4358 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
4361 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
4364 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
4367 * simplify.c (simplify_min_max): Convert the type of the result.
4369 2004-04-11 Paul Brook <paul@codesourcery.com>
4371 * gfortran.texi: Use full target triplet.
4373 2004-04-11 Paul Brook <paul@codesourcery.com>
4375 * Make-lang.in (GFORTRAN_TEXI): Set it.
4376 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
4377 (fortran/gfortran.info): Ditto.
4378 * gfortran.texi: Major update.
4379 * invoke.texi: New file.
4381 2004-04-10 Paul Brook <paul@codesourcery.com>
4383 * trans-array.c (gfc_trans_allocate_temp_array,
4384 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
4385 * trans-decl.c (gfc_build_dummy_array_decl,
4386 gfc_get_symbol_decl, gfc_build_function_decl,
4387 gfc_create_module_variable): Ditto.
4388 * trans-expr.c (gfc_conv_variable): Ditto.
4389 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
4390 * trans.h (GFC_DECL_STRING): Remove.
4391 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
4392 GFC_DECL_ASSIGN): Renumber flags.
4394 2004-04-05 Paul Brook <paul@codesourcery.com>
4398 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
4400 * gfortran.h (struct gfc_charlen): Add backend_decl.
4401 * trans-array.c (gfc_trans_allocate_temp_array,
4402 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
4403 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
4404 Remove old, broken string handling.
4405 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
4406 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
4407 gfc_trans_deferred_array): Handle character arrays.
4408 * trans-const.c (gfc_conv_const_charlen): New function.
4409 * trans-const.h (gfc_conv_const_charlen): Add prototype.
4410 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
4412 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
4413 (gfc_create_string_length): New function.
4414 (gfc_get_symbol_decl): Create lengths for character variables.
4415 (gfc_get_fake_result_decl): Ditto.
4416 (gfc_build_function_decl): Only set length for assumed length
4417 character arguments.
4418 (gfc_trans_dummy_character): New function.
4419 (gfc_trans_auto_character_variable): Rewrite.
4420 (gfc_trans_deferred_vars): Handle more types of character variable.
4421 (gfc_create_module_variable): String lengths have moved.
4422 (gfc_generate_function_code): Initialize deferred var chain earlier.
4423 * trans-expr.c (gfc_conv_init_string_length): Rename ...
4424 (gfc_trans_init_string_length): ... to this.
4425 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
4426 gfc_conv_function_call): Update to new format for character variables.
4427 (gfc_conv_string_length): Remove.
4428 (gfc_conv_string_parameter): Update assertion.
4429 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
4430 * trans-io.c (set_string): Use new macro names.
4431 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
4432 * trans-types.c (gfc_get_character_type): Use existing length expr.
4433 (gfc_is_nodesc_array): Make public.
4434 (gfc_get_dtype_cst): Rename ...
4435 (gfc_get_dtype): ... to this. Handle unknown size arrays.
4436 (gfc_get_nodesc_array_type): Use new name.
4437 (gfc_sym_type): New character variable code.
4438 (gfc_get_derived_type): Ditto.
4439 (gfc_get_function_type): Evaluate character variable lengths.
4440 * trans-types.h (gfc_strlen_kind): Define.
4441 (gfc_is_nodesc_array): Add prototype.
4442 * trans.h: Update prototypes.
4443 (struct lang_type): Update comments.
4444 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
4445 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
4447 2004-04-04 Paul Brook <paul@codesourcery.com>
4449 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
4450 * options.c (gfc_init.options, gfc_handle_option): Ditto.
4451 * trans-expr.c (gfc_conv_function_call): Ditto.
4452 * trans-types.c (gfc_is_nodesc_array): Ditto
4453 * lang.opt (fg77-calls): Remove.
4455 2004-04-04 Paul Brook <paul@codesourcery.com>
4457 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
4458 (gfc_conv_descriptor_base): Rename ...
4459 (gfc_conv_descriptor_offset): ... to this.
4460 (gfc_trans_allocate_array_storage): Set offset to zero.
4461 (gfc_conv_array_base): Rename ...
4462 (gfc_conv_array_offset): ... to this.
4463 (gfc_conv_array_index_ref): Add offset parameter.
4464 (gfc_conv_array_ref): Include offset.
4465 (gfc_trans_preloop_setup): Use existing offset.
4466 (gfc_trans_allocate_temp_array, gfc_array_allocate,
4467 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
4468 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
4469 gfc_conf_ss_descriptor): Set offset.
4470 * trans-array.h: Rename prototypes.
4471 * trans-const.h (gfc_index_zero_node): Define.
4472 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
4473 * trans-types.c (gfc_get_array_type_bounds): Ditto.
4474 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
4476 2004-03-25 Diego Novillo <dnovillo@redhat.com>
4478 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
4480 2004-03-24 Bud Davis <bdavis9659@comcast.net>
4483 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
4484 before conversion by gmp library call.
4486 2004-03-24 Bud Davis <bdavis9659@comcast.net>
4489 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
4491 2004-02-24 Richard Henderson <rth@redhat.com>
4493 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
4495 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
4497 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
4498 (fortran/gfortran.info): ... to here.
4501 2004-02-16 Richard Henderson <rth@redhat.com>
4503 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
4504 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
4505 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
4506 (gfc_expand_function): Rename from expand_function_body, make static,
4507 don't do anything except invoke tree_rest_of_compilation.
4508 (gfc_be_parse_file): Invoke cgraph.
4509 (gfc_expand_decl): Remove.
4510 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
4511 __builtin_adjust_trampoline.
4512 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
4513 (gfc_finalize): New.
4514 (gfc_generate_function_code): Use it. Lower nested functions.
4515 * trans-expr.c (gfc_conv_function_call): Add static chain operand
4517 * trans.c (gfc_build_function_call): Likewise.
4518 * trans.h (expand_function_body): Remove.
4520 2004-02-15 Victor Leikehman <lei@il.ibm.com>
4523 * trans-decl.c (gfc_build_function_decl) For functions
4524 returning CHARACTER pass an extra length argument,
4525 following g77 calling conventions.
4526 * trans-types.c (gfc_get_function_type) Ditto.
4527 * trans-expr.c (gfc_conv_function_call) Ditto.
4529 2004-02-14 Paul Brook <paul@codesourcery.com>
4531 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
4533 2004-02-12 Paul Brook <paul@nowt.org>
4537 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
4539 * gfortran.texi: Fix typos.
4541 2004-02-07 Bud Davis <bdavis9659@comcast.net>
4544 * intrinsic.c (add_conversions) Use logical conversion instead
4546 * trans-types.c (gfc_get_logical_type) implemented logical*1
4549 2004-01-17 Paul Brook <paul@codesourcery.com>
4551 * lang-specs.h: Remove %<fixed-form.
4553 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
4555 * lang-specs.h: Enable preprocessing of source files
4556 ending in .F, .fpp, .FPP, .F90 and .F95.
4558 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
4561 * lang-specs.h: Enable compilation of files ending
4562 in .f, .for and .FOR.
4564 2004-01-11 Paul Brook <paul@codesourcery.com>
4566 * trans-stmt.c (gfc_trans_if_1): New function.
4567 (gfc_trans_if): Use it.
4569 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
4571 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
4572 (gfc_option_t): Add max_identifier_length.
4573 * lang.opt: Add fmax-identifier-length.
4574 * match.c (parse_name): Use limit.
4575 * options.c (gfc_init_options): Set max_identifier_length.
4576 (gfc_handle_option): Ditto.
4578 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
4580 * intrinsic.c (add_functions): Add resolve function to dcmplx.
4581 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
4582 * iresolve.c (gfc_resolve_dcmplx): New function.
4584 2004-01-10 Paul Brook <paul@codesourcery.com>
4586 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
4587 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
4588 (gfc_return_by_reference): Correct condition.
4589 (gfc_get_function_type): Ditto.
4591 2004-01-10 Paul Brook <paul@codesourcery.com>
4593 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
4596 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
4598 * iresolve.c: Use correct kind.
4600 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
4603 * trans-decl.c (gfc_create_module_variable): Output array valued
4606 2004-01-10 Paul Brook <paul@codesourcery.com>
4608 * resolve.c (resolve_branch): Get error message right way round.
4610 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
4612 * trans-array (gfc_conv_loop_setup): Adjust comment to track
4614 (gfc_array_allocate): Don't count size of element twice.
4616 2004-01-04 Paul Brook <paul@codesourcery.com>
4618 * lang.opt (i8, r8, std=*): Remove RejectNegative.
4620 2004-01-04 Paul Brook <paul@codesourcery.com>
4622 * error.c (gfc_notify_std): New function.
4623 * gfortran.h (gfc_notify_std): Declare.
4624 (GFC_STD_*): Define.
4625 (gfc_option_t): Add warn_std and allow_std.
4626 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
4627 (gfc_intrinsic_func_interface): Use gfc_notify_std.
4628 * check.c (check_rest): Use gfc_notify_std.
4629 * match.c (gfc_match_pause): Ditto.
4630 (gfc_match_assign): Ditto.
4631 (gfc_match_goto): Ditto.
4632 * resolve.c (resolve_branch): Ditto.
4633 * lang.opt: Add std=<foo> and w.
4634 * options.c (gfc_init_options): Set allow_std and warn_std.
4635 (gfc_handle_option): Handle OPT_std_* and OPT_w.
4637 2004-01-01 Paul Brook <paul@codesourcery.com>
4639 * array.c (gfc_append_constructor): Take constructor, not expression.
4640 * data.c (struct gfc_expr_stack): Remove.
4641 (expr_stack): Remove.
4642 (find_con_by_offset): Rename from find_expr_in_con.
4643 (find_con_by_component): Rename from find_component_in_con.
4644 (gfc_get_expr_stack): Remove.
4645 (gfc_assign_data_value): Rewrite.
4646 (gfc_expr_push): Remove.
4647 (gfc_expr_pop): Remove.
4648 (gfc_advance_section): Rename from
4649 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
4650 (gfc_get_section_index): Handle unbounded sections.
4651 * gfortran.h: Update prototypes.
4652 * resolve.c (check_data_variable): Array section maight not be the
4655 2004-01-01 Paul Brook <paul@codesourcery.com>
4658 * resolve.c (resolve_symbol): Allow assumed length function results.
4660 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
4662 * match.c (gfc_match_pause): Fix spelling.
4664 2004-01-01 Steven Bosscher <stevenb@suse.de>
4667 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
4668 reference from the expression.
4670 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
4672 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
4674 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
4675 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
4676 (symbol_attribute):New variable attribute: assign.
4677 * io.c (resolve_tag):Integer variable is allowed.
4678 (match_dt_format): Add ASSIGN statement. Set assign flag.
4679 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
4680 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
4681 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
4682 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
4683 (next_statement): Add ST_LABEL_ASSIGNMENT.
4684 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
4685 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
4686 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
4687 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
4688 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
4689 assign. Put them into the stuct lang_decl.
4690 * trans-io.c (set_string): Add the assign statement.
4691 * trans-stmt.c (gfc_trans_label_assign): New function.
4692 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
4693 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
4694 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
4695 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
4696 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
4697 (GFC_DECL_ASSIGN(node)): New macro to access flag.
4699 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
4702 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
4705 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
4707 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
4708 that arguments to subroutines/functions can't alias themselves, nor global
4711 2003-12-20 Steven Bosscher <stevenb@suse.de>
4713 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
4714 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
4716 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
4718 * primary.c (match_substring): Fix substring bug for start point
4719 or end point is NULL.
4720 * trans-expr.c (gfc_conv_substring): Ditto
4721 * trans-types.c (gfc_sym_type): Get correct type of scalar
4722 character variables.
4723 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
4726 2003-12-10 Richard Henderson <rth@redhat.com>
4728 * options.c (gfc_post_options): Don't ever use rtl inlining.
4730 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
4732 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
4733 * trans-equivalence.c: Remove.
4734 * trans-decl.c (gfc_get_symbol_decl): Update to match.
4735 (gfc_generate_function_code): Ditto.
4736 * trans-array.c (gfc_conv_array_parameter): Ditto.
4737 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
4738 (F95_ADDITIONAL_OBJS): Add stor-layout.o
4739 * trans.h (gfc_trans_equivalence): Remove.
4740 * gfortran.h (struct gfc_equiv): Add used field.
4741 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
4742 equiv_offset fields.
4744 2003-12-05 Richard Henderson <rth@redhat.com>
4746 * trans.c (gfc_build_addr_expr): New.
4747 (gfc_build_indirect_ref, gfc_build_array_ref): New.
4748 * trans.h: Declare them.
4749 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
4750 trans-stmt.c, trans.c (*): Use them.
4752 * f95-lang.c (gfc_post_options): Remove dead prototype.
4753 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
4754 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
4757 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
4759 * io.c (gfc_match_format): Check for missing format label.
4761 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
4764 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
4765 from interfaces in modules.
4767 2003-11-30 Paul Brook <paul@nowt.org>
4769 * trans-array.c (gfc_trans_g77_array): Make non-static.
4770 (gfc_trans_assumed_size): Remove.
4771 (gfc_trans_dummy_array_bias): Explicitly free temporary.
4772 * trans-array.h (gfc_trans_g77_array): Add prototype.
4773 (gfc_trans_assumed_size): Remove.
4774 * trans-decls.c (gfor_fndecl_push_context): Remove.
4775 (gfor_fndecl_pop_context): Remove.
4776 (gfc_build_function)decls): Don't create them.
4777 (gfc_trans_deferred_vars): Update to match. Remove dead code.
4778 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
4780 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
4782 * trans-array.c (gfc_conv_array_parameter): Simplify
4783 array argument passing for array name actual argument.
4784 * trans-expr.c (gfc_conv_function_call): Ditto
4785 * trans-types.c (gfc_is_nodesc_array):Ditto.
4787 2003-11-30 Paul Brook <paul@nowt.org>
4789 * f95-lang.c (gfc_post_options): Move ...
4790 * options.c (gfc_post_options): .. to here. Handle inlining options.
4791 * gfortran.h (gfc_post_options): Add prototype.
4793 2003-11-28 Richard Henderson <rth@redhat.com>
4795 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
4797 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
4799 * trans.h (has_alternate_specifier): New global variable.
4800 * match.c (gfc_match_call): Handle actual arguments associated with
4801 alternate return indicators.
4802 * trans-expr.c (gfc_conv_function_call): Ditto
4803 * trans-stmt.c (gfc_trans_call): Ditto
4804 (gfc_trans_return): Handle return statement with value.
4805 * trans-decl.c (gfc_generate_function_code): Handle functions with
4807 (gfc_get_fake_result_decl): Ditto
4808 * trans-types.c (gfc_get_function_type): Ditto
4809 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
4810 (resolve_formal_arglist): Check asterisk dummy.
4812 2003-11-27 Paul Brook <paul@nowt.org>
4814 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
4815 allocation interface.
4816 (gfc_conv_ array_parameter): Ditto.
4817 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
4818 * trans-array.c: Update prototype.
4819 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
4820 (gfc_trans_auto_character_variable): Use new memory alloc interface.
4821 * trans-expr.c (gfc_conv_string_tmp): Ditto.
4822 (gfc_conv_function_call): Use gfc_conv_string_tmp.
4823 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
4824 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
4825 * trans.h (gfc_ss_info): Remove unused pdata field.
4826 * trans.c (gfc_create_var_np): Change T to V.
4828 2003-11-26 Richard Henderson <rth@redhat.com>
4830 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
4831 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
4832 FRACTION, NEAREST, SET_EXPONENT.
4833 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
4834 Fix GTY marking. Remove unnecessary const's.
4835 (LIBM_FUNCTION): Rename from I_LIB.
4836 (LIBF_FUNCTION): New.
4837 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
4838 conventions. Assume the expr signature is correct. Mark const.
4839 (gfc_conv_intrinsic_exponent): Use library functions.
4840 (gfc_conv_intrinsic_set_exponent): Remove.
4841 (gfc_conv_intrinsic_scale): Remove.
4842 (gfc_conv_intrinsic_nearest): Remove.
4843 (gfc_conv_intrinsic_fraction): Remove.
4844 (gfc_conv_intrinsic_function): Update.
4845 * trans-decl.c (gfor_fndecl_math_exponent4): New.
4846 (gfor_fndecl_math_exponent8): New.
4847 (gfc_build_intrinsic_function_decls): Set them.
4848 * trans.h: Declare them.
4850 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
4852 * trans-common.c (gfc_layout_global_equiv): Locate the error for
4853 underflow COMMON block.
4854 (gfc_trans_one_common): Fix bug for size of COMMON block containing
4855 EQUIVALENCE object. Also fix typo in an error message.
4857 2003-11-25 Diego Novillo <dnovillo@redhat.com>
4859 * Make-lang.in: Add check-gfortran to lang_checks.
4860 (check-f95): Alias for check-gfortran.
4862 2003-11-25 Jason Merrill <jason@redhat.com>
4864 * Make-lang.in (f95.tags): Create TAGS.sub files in each
4865 directory and TAGS files that include them for each front end.
4867 2003-11-24 Paul Brook <paul@nowt.org>
4870 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
4872 2003-11-24 Paul Brook <paul@nowt.org>
4874 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
4876 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
4878 2003-11-24 Paul Brook <paul@nowt.org>
4881 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
4882 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
4884 2003-11-20 Richard Henderson <rth@redhat.com>
4886 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
4887 (gfc_conv_array_base): Likewise.
4888 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
4889 * trans-expr.c (gfc_conv_string_tmp): Likewise.
4890 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
4891 * trans-stmt.c (gfc_trans_character_select): Likewise.
4893 2003-11-13 Paul Brook <paul@nowt.org>
4895 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
4897 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
4899 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
4900 (resolve_equivalence): New function.
4901 (resolve_equivalence_derived): New function.
4903 2003-11-12 Richard Henderson <rth@redhat.com>
4905 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
4906 annotate_all_with_locus.
4908 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
4910 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
4911 * trans-decl.c (gfc_finish_var_decl): Modified.
4913 2003-11-08 Paul Brook <paul@nowt.org>
4916 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
4919 2003-11-06 Paul Brook <paul@nowt.org>
4921 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
4923 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
4925 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
4927 2003-10-27 Anthony Green <green@redhat.com>
4929 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
4930 (f95.stagefeedback): Ditto.
4932 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
4935 * Make-lang.in (f95.stageprofile): Add.
4936 (f95.stagefeedback): Add.
4938 2003-10-23 Richard Henderson <rth@redhat.com>
4940 * f96-lang.c (gfc_gimplify_expr): Remove.
4941 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
4942 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
4944 2003-10-23 Richard Henderson <rth@redhat.com>
4946 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
4948 2003-10-20 Paul Brook <paul@nowt.org>
4950 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
4951 * trans-stmt.c (gfc_trans_do_while): Ditto.
4953 2003-10-17 Paul Brook <paul@nowt.org>
4955 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
4957 2003-10-17 Paul Brook <paul@nowt.org>
4959 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
4961 2003-10-17 Feng Wang <wf_cs@yahoo.com>
4963 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
4964 (gfc_resolve_minloc): Ditto.
4965 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
4966 Return the value after subtracting the lower bound.
4968 2003-10-16 Richard Henderson <rth@redhat.com>
4970 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
4972 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
4974 * lang.c: Remove -M option for now, it's in the way for C.
4976 2003-10-14 Jason Merrill <jason@redhat.com>
4978 * Make-lang.in (f95.tags): New rule.
4980 2003-10-13 Richard Henderson <rth@redhat.com>
4982 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
4984 2003-10-13 Paul Brook <paul@nowt.org>
4986 * trans-decl.c (generate_local_decl): Don't create junk variables.
4988 2003-10-13 Paul Brook <paul@nowt.org>
4990 * resolve.c (resolve_formal_arglist): Use function result decl in
4991 preference to function decl.
4993 2003-10-12 Richard Henderson <rth@redhat.com>
4995 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
4996 TREE_READONLY. Update all callers.
4998 2003-10-12 Feng Wang <wf_cs@yahoo.com>
5000 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
5001 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
5002 (gfc_is_intrinsic_libcall): Add CSHIFT.
5004 2003-10-12 Richard Henderson <rth@redhat.com>
5006 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
5007 (gfc_trans_array_constructor_value): Likewise.
5008 (gfc_conv_array_initializer): Likewise.
5009 * trans-stmt.c (gfc_trans_character_select): Likewise.
5011 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
5013 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
5015 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
5017 * check.c (gfc_check_repeat): Check arguments are scalar.
5018 (gfc_check_trim): New function.
5019 * intrinsic.h (gfc_check_trim): Add prototype.
5020 * intrinsic.c (add_functions): Use it.
5021 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
5023 * trans-decl.c: Ditto.
5024 (gfc_build_intrinsic_fucntion_decls): Set them.
5025 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
5026 (gfc_conv_intrinsic_trim): New function.
5027 (gfc_conv_intrinsic_repeat): New function.
5028 (gfc_conv_intrinsic_function): Use them.
5030 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
5032 * trans-types.c (gfc_sym_type): Handle result variables.
5034 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
5036 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
5037 gfc_get_character_type.
5039 2003-10-11 Feng Wang <wf_cs@yahoo.com>
5041 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
5043 2003-10-11 Paul Brook <paul@nowt.org>
5045 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
5046 (gfc_resolve_dprod): New function.
5047 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
5048 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
5049 (gfc_resolve_dprod): Declare.
5050 * intrinsic.c (add_functions): Use them.
5051 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
5053 2003-10-06 Richard Henderson <rth@redhat.com>
5055 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
5056 * trans-intrinsic.c (call_builtin_clz): Use it.
5058 2003-10-05 Paul Brook <paul@nowt.org>
5060 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
5061 * trans-decl.c (gfc_generate_function_code): Set
5062 cfun->function_end_locus.
5064 2003-09-24 Jason Merrill <jason@redhat.com>
5066 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
5069 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
5070 Paul Brook <paul@nowt.org>
5072 * Make-lang.in (F95_OBJS): Add fortran/data.o.
5073 * array.c (gfc_inser_constructor): New function.
5074 (gfc_get_constructor): New function.
5075 (gfc_free_constructor): Initialize offset and repeat.
5076 (iterator_stack): Remove.
5077 (expand_info): Add offset, component and repeat fields.
5078 (expand_constructor): Set them.
5079 (expand): Set new fields.
5080 (gfc_copy_constructor): Ditto. Avoid recursion.
5081 * gfortran.h: Add prototypes for new functions.
5082 (gfc_constructor): Add offset, component and repeat.
5083 (iteratio_stack): Move to here.
5084 * resolve.c (check_data_variable): Convert data values into variable
5086 (traverse_data_list): Build implicit loop chain.
5087 (gfc_resolve): Ditto.
5088 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
5089 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
5090 * trans-expr.c (gfc_conv_structure): Handle array initializers.
5091 (gfc_conv_expr): Update to match.
5092 * trans.h (gfc_conv_structure): Declare.
5095 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
5097 * trans.h: Add declarations for gfor_fndecl_si_kind and
5098 gfor_fndecl_sr_kind.
5099 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
5100 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
5101 (g95_conv_intrinsic_sr_kind): New function.
5102 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
5105 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
5107 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
5108 instead of _4 and _8 as postfix for libgfortran calls.
5110 2003-09-16 Paul Brook <paul@nowt.org>
5112 * array.c (compare_bounds): New function.
5113 (gfc_compare_array_spec): Use it.
5115 2003-09-14 Paul Brook <paul@nowt.org>
5117 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
5118 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
5120 2003-09-14 Paul Brook <paul@nowt.org>
5122 * check.c (dim_rank_check): Allow assumed bounds if requested.
5123 (gfc_check_lbound): Call it.
5124 (gfc_check_ubound): Ditto.
5125 (gfc_check_size): Change to match.
5126 * simplify.c (gfc_simplify_bound): New function.
5127 (gfc_simplify_lbound): New function.
5128 (gfc_simplify_ubound): New function.
5129 * intrinsic.h: Declare them.
5130 * intrinsic.c (add_functions): Use them.
5132 2003-09-14 Paul Brook <paul@nowt.org>
5134 * io.c (format_lex): Initialize negative_flag.
5135 (check_format): Intialize repeat.
5136 * trans-io.c (gfc_new_nml_name_expr): Declare static.
5137 (gfc_new_var_expr): Ditto.
5139 2003-09-14 Paul Brook <paul@nowt.org>
5141 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
5142 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
5144 2003-09-12 Paul Brook <paul@nowt.org>
5146 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
5148 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
5150 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
5151 for a correct expression.
5153 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
5155 * trans-intrinsic.c (real_compnt_info): New struct.
5156 (prepare_arg_info): New function.
5157 (gfc_conv_intrinsic_set_exponent): New function.
5158 (gfc_conv_intrinsic_scale): New function.
5159 (gfc_conv_intrinsic_nearest): New function.
5160 (gfc_conv_intrinsic_fraction): New function.
5161 (gfc_conv_intrinsic_exponent): New function.
5162 (gfc_conv_intrinsic_spacing): New function.
5163 (gfc_conv_intrinsic_rrspacing): New function.
5164 (gfc_conv_intrinsic_function): Use them.
5166 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
5168 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
5169 build_int_2 changed from (high, low) to (low, high).
5170 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
5171 ioparm_namelist_read_mode, iocall_set_nml_val_int,
5172 iocall_set_nml_val_float, iocall_set_nml_val_char,
5173 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
5174 (gfc_build_io_library_fndecls): Add variable initialization.
5175 (gfc_new_nml_name_expr, get_new_var_expr): New function.
5176 (build_dt): Add namelist support.
5177 * io.c (value): New variable.
5178 (check_format): Support FMT_H now.
5180 2003-09-07 Paul Brook <paul@nowt.org>
5182 * io.c (gfc_resolve_dt): Error if format label is not defined.
5184 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
5186 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
5187 about case_switch's break. The other is about building the condition
5188 statement tree, which judges the argument in the range of the
5189 corresponding integer type.
5190 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
5191 for the large values.
5193 2003-09-05 Paul Brook <paul@nowt.org>
5195 * f95-lang.c (expand_function_body): Gimplify the function.
5197 2003-09-04 Jeff Law <law@redhat.com>
5199 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
5202 2003-09-04 Paul Brook <paul@nowt.org>
5204 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
5205 (gfc_expand_stmt): New function.
5206 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
5207 (expand_function_body): Use tree_rest_of_compilation.
5208 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
5210 2003-09-03 Jeff Law <law@redhat.com>
5212 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
5215 2003-08-30 Paul Brook <paul@nowt.org>
5217 * f95-lang.c (builtin_function): Remove #if 0 code.
5218 (gfc_define_builtin): New function.
5219 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
5220 * mathbuiltins.def: New file.
5221 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
5222 (gfc_intrinsic_map): Use mathbuiltins.def.
5223 (gfc_intrinsic_builtin_t): Remove.
5224 (gfc_build_intrinsic_lib_fndecls): Update.
5225 * trans-types.c (gfc_init_types): Remove redundant initilaization of
5226 signed_size_type_node.
5228 2003-08-29 Paul Brook <paul@nowt.org>
5230 * arith.c (gfc_real_kinds): Use correct minimum exponents.
5232 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
5234 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
5235 (gfc_conv_intrinsic_function): Add MODULO.
5237 2003-08-22 Jason Merrill <jason@redhat.com>
5239 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
5241 2003-08-22 Andreas Jaeger <aj@suse.de>
5243 * Make-lang.in (f95.install-common): Add DESTDIR support.
5244 * (f95.install-info): Likewise.
5245 (f95.uninstall): Likewise.
5247 2003-08-19 Diego Novillo <dnovillo@redhat.com>
5249 * trans-types.c (gfc_init_types): Initialize
5250 signed_size_type_node with size_type_node.
5252 2003-08-18 Paul Brook <paul@nowt.org>
5254 * dependency.c (gfc_dependency): New enum.
5255 (check_another_array_ref): Remove.
5256 (gfc_get_array_from_component): Remove.
5258 (get_range): Remove.
5259 (get_no_of_elements): Use mpz_t, not mpf_t.
5260 (transform_sections): New function.
5261 (gfc_check_range_range): Rename ...
5262 (gfc_check_section_vs_section): ... to this. Use new function.
5263 (gfc_is_inside_range): Rewrite to match.
5264 (gfc_check_element_vs_section): Ditto.
5265 (gfc_check_element_vs_element): Ditto.
5267 (gfc_dep_resolver): Ditto. Remove unused parameter.
5268 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
5269 gfc_check_element_vs_element, gfc_is_inside_range,
5270 gfc_get_array_from_component): Remove prototypes for static functions.
5271 (gfc_dep_resolver): Update prototype.
5272 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
5274 2003-08-15 Paul Brook <paul@nowt.org>
5276 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
5277 return values to parent scope.
5278 (gfc_build_dummy_array_decl): Ditto.
5280 2003-08-14 Paul Brook <paul@nowt.org>
5282 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
5283 size of the type, not the pointer.
5284 * resolve.c (resolve_symbol): Give more accurate error message.
5286 2003-08-10 Paul Brook <paul@nowt.org>
5288 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
5290 2003-08-10 Paul Brook <paul@nowt.org>
5292 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
5295 2003-08-10 Chun Huang <compiler@sohu.com>
5297 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
5298 (resolve_symbol): Ditto.
5299 * trans-expr.c (gfc_conv_statement_function): New function.
5300 (gfc_conv_function_expr): Use it.
5302 2003-08-10 Paul Brook <paul@nowt.org>
5304 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
5305 (walk_function_expr): Set section rank.
5306 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
5308 2003-08-10 Paul Brook <paul@nowt.org>
5310 * intrinsic.c (add_sym): Prefix names with correct string.
5311 (add_sym_0s): New function.
5312 (add_subroutines): Register abort.
5314 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
5316 * gfortran.h: Introduce options to control the mangling.
5317 * lang.opt: Likewise.
5318 * options.c (gfc_init_options): Handle the options.
5319 * trans-common.c (gfc_sym_mangled_common_id): New function.
5320 (gfc_build_common_decl): Call it.
5321 * trans-decl.c (gfc_sym_mangled_function_id): New function.
5322 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
5324 2003-08-09 Paul Brook <paul@nowt.org>
5326 * module.c (mio_symbol): Always ouput a namespace for formal args.
5327 (load_needed): Namespace now belong to their proper symbol.
5328 (gfc_dump_module): Change G95=>GFORTRAN.
5330 2003-08-05 Paul Brook <paul@nowt.org>
5332 * options.c: Force -fg77-calls.
5334 2003-08-02 Paul Brook <paul@nowt.org>
5336 * Makelang.in: Rename G95_* to GFORTRAN_*.
5337 * All sources: Rename G95_* to GFC_*.
5339 2003-08-01 Paul Brook <paul@nowt.org>
5341 * fortran/Make-lang.in: Use GMPLIBS.
5342 * fortran/config-lang.in: Set need_gmp.
5343 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
5345 2003-07-27 Andreas Jaeger <aj@suse.de>
5347 * trans-decl.c (gfc_generate_constructors): Convert prototype to
5349 * trans-const.c (gfc_init_constants): Likewise.
5350 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
5352 * gfortranspec.c: Convert to ISO C90.
5353 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
5355 2003-07-26 Paul Brook <paul@nowt.org>
5357 * lang.opt: Add -fdump-parse-tree.
5358 * options.c (gfc_handle_option): Ditto.
5359 * resolve.c (resolve_forall_iterators): Convert to proper type.
5360 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
5362 2003-07-26 Paul Brook <paul@nowt.org>
5364 * Makefile.in: Add build dependencies on files common with rest of gcc.
5366 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
5368 * trans.h: Declare g95_trans_pointer_assignment.
5369 * trans-expr.c (g95_trans_pointer_assignment): New function.
5370 (g95_trans_pointer_assign): Use it.
5371 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
5372 (g95_trans_pointer_assign_need_temp): New function.
5374 2003-07-26 Paul Brook <paul@nowt.org>
5376 * gfortran.texi: Replace references to g95.
5378 2003-07-26 Paul Brook <paul@nowt.org>
5380 Rename g95_* to gfc_*.
5382 2003-07-25 Paul Brook <paul@nowt.org>
5384 * gfortran.h: Rename from g95.h.
5385 * trans-types.c (boolean_type_node, booelan_true_node,
5386 boolean_false_node): Remove.
5387 * trans-types.h: Ditto.
5389 2003-07-25 Chun Huang <compiler@sohu.com>
5391 * parse.c (accept_statement): Implement BLOCK DATA statement.
5392 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
5395 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
5397 * trans-stmt.c (temporary_list): Define.
5398 (g95_trans_assign_need_temp): New function.
5399 (g95_trans_forall_1): Modified for WHERE.
5400 (g95_trans_where_assign): Modified.
5401 (g95_trans_where_2): Modified.
5402 (g95_evaluate_where_mask): Modified.
5403 (g95_trans_where): Modified.
5404 (g95_get_temp_expr): Removed.
5405 (g95_add_to_where_stmt_list): Removed.
5406 (compute_overall_iter_number): Modified for WHERE.
5407 * trans.h: Remove where_stmt_list.
5409 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5411 * lang.opt: Correct description of options -J and -M.
5413 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
5415 * lang.opt: Move help text to here.
5416 * lang-options.h: Remove.
5418 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5419 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
5420 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
5423 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
5424 Paul Brook <paul@nowt.org>
5426 * check.c (check_rest): Use global pedantic flag.
5427 * io.c (data_desc): Ditto.
5428 * error.c (g95_warning, g95_warning_now): Use global flag.
5429 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
5430 (expand_function_body): Update to new prototypes.
5431 (g95_init): Use new option names.
5432 * g95.h (g95_option_t): Standardize names.
5433 (g95_init_options, g95_handle_option): Update prototypes.
5434 * interface.c: Use new option names.
5441 * simplify.c: Ditto.
5443 * trans-array.c: Ditto.
5444 * trans-expr.c: Ditto.
5445 * trans-types.c: Ditto.
5446 * trans-decl.c: Ditto.
5447 (g95_build_library_function_decl): Remove obsolete VPARAMS.
5449 * options.c (g95_display_help): Remove.
5450 (g95_init_options): Convert to new scheme.
5452 (g95module_option): Ditto, rename from g95_parse_arg.
5453 (g95_handle_module_path_options): New function.
5454 * trans-equivalence.c: Fix error message.
5455 * lang.opt: Corrections.
5457 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
5459 * lang.opt: New file.
5461 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5463 * decl.c (match_attr_spec): Set colon_seen.
5465 2003-07-14 Paul Brook <paul@nowt.org>
5467 * trans-array.c: Update comment.
5468 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
5469 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
5470 minmaxloc,minmaxval): Ditto.
5471 * trans-io.c (g95_trans_transfer): Ditto.
5472 * trans-stmt.c: Remove unneeded prototypes.
5473 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
5474 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
5475 (compute_inner_temp_size): Remove bits of dead code. Add comments.
5476 Don't share loopinfo.
5477 (compute_overall_iter_number): Declare as static.
5478 (allocate_temp_for_forall_nest): Ditto.
5479 (g95_trans_forall_1): Don't pass shared loopinfo.
5480 * trans.c (g95_start_block): Expand comment.
5482 2003-07-12 Paul Brook <paul@nowt.org>
5484 * arith.c (g95_index_integer_kind): Remove unused initializer.
5485 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
5486 index by size of element.
5487 (generate_loop_for_rhs_to_temp): Ditto.
5488 (allocate_temp_for_forall_nest): Use element size, not index size.
5490 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5492 * arith.c (g95_index_integer_kind): Add a TODO.
5493 * simplify.c (g95_simplify_nearest): Add a TODO.
5495 2003-07-09 Chun Huang <compiler@sohu.com>
5497 * trans.h: Add declarations for gfor_fndecl_string_scan and
5498 gfor_fndecl_string_verify.
5499 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
5500 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
5501 (g95_conv_intrinsic_verify): New function.
5502 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
5503 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
5504 of parameter 'BACK=.TRUE.'
5506 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
5508 * trans-stmt.c (iter_info, forall_info): Define.
5509 (g95_trans_forall_block): Remove.
5510 (g95_trans_forall_loop): Use forall info blocks.
5511 (g95_trans_nested_forall_loop): New function.
5512 (g95_do_allocate): Handle things other than logical masks.
5513 (generate_loop_for_temp_to_lhs): New function.
5514 (generate_loop_for_rsh_to_temp): New function.
5515 (compute_inner_temp_size): New function.
5516 (compute_overall_iter_number): New function.
5517 (allocate_temp_for_forall_nest): New function.
5518 (g95_trans_forall): Move body ...
5519 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
5521 2003-07-02 Paul Brook <paul@nowt.org>
5523 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
5524 in correct scope. Change callers to match.
5525 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
5526 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
5528 2003-07-02 Paul Brook <paul@nowt.org>
5530 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
5531 expression shape for all expressions.
5532 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
5534 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5536 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
5537 g95_parse_arg), intrinsic.c (g95_convert_type): support of
5539 * intrinsic.c, g95.h: Add g95_convert_type_warn,
5540 * resolve.c (g95_resolve_index): Call it.
5542 2003-07-02 Paul Brook <paul@nowt.org>
5544 * iresolve.c (g95_resolve_reshape): Set expression shape.
5545 (g95_resolve_shape): Ditto.
5546 * simplify.c (g95_simplify_shape): Move common code outside condition.
5547 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
5549 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5551 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
5554 2003-06-29 Paul Brook <paul@nowt.org>
5556 * array.c (g95_simplify_iterator_var): Don't bother with return value.
5557 * expr.c (find_array_element, find_component_ref): New functions.
5558 (remove_subobject_ref): New function.
5559 (simplify_const_ref): Use them. Rename from simplify_component_ref.
5560 (simplify_ref_chain): New function.
5561 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
5562 (g95_specification_expr): Simplify the expression.
5563 * resolve.c (resolve_operator): Check simplifications return code.
5564 (g95_resolve_expr): Ditto.
5566 2003-06-26 Paul Brook <paul@nowt.org>
5568 * expr.c (simplify_component_ref): New function.
5569 (g95_simplify_expr): Use it.
5570 * resolve.c (resolve_structure_cons): Handle references.
5572 2003-06-25 Paul Brook <paul@nowt.org>
5574 * trans-io.c (build_dt): Handle internal units.
5576 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
5578 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
5579 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
5580 Use g95_array_index_type instead of integer_type_node.
5581 (g95_build_common_decl, g95_set_common_master_type): Use
5582 g95_character1_type_node instead of char_type_node.
5583 * trans-equivalence.c (g95_layout_local_equiv): As above.
5585 2003-06-24 Steven G. Kargl <kargls@attbi.com>
5587 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
5588 remove last remains of -fquiet.
5590 2003-06-22 Paul Brook <paul@nowt.org>
5592 * resolve.c (resolve_operator): Don't fail if we can't simplify.
5593 (g95_resolve_expr): Ditto.
5594 (resolce_code): Mark as static.
5595 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
5596 gimplifer doesn't (yet).
5598 2003-06-20 Paul Brook <paul@nowt.org>
5600 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
5601 * match.c (g95_match_if): Add ST_PAUSE.
5602 (g95_match_stopcode): New function.
5603 (g95_match_pause, g95_match_stop): Use it.
5604 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
5605 (decode_stmt, next_statement, parse_executable): Ditto.
5606 * resolve.c (resolve_code): Ditto.
5607 * st.c (g95_free_statement): Ditto.
5608 * trans-stmt.c (g95_trans_pause): New function.
5609 * trans-stmt.h: Declare it.
5610 * trans.c (g95_trans_code): Use it.
5611 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
5613 (g95_build_builtin_function_decls): Initialize them.
5615 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
5617 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5619 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
5620 match_filepos): Fix error handling.
5622 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5624 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
5625 Add assertions on arguments.
5626 * resolve.c (expression_shape): Remove useless &.
5627 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
5628 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
5629 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
5630 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
5631 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
5632 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
5633 (g95_simplify_not, g95_simplify_scale): Add assertions.
5635 2003-06-15 Paul Brook <paul@nowt.org>
5637 Clean up stuff to work with the ssa optimizers.
5638 * convert.c (convert): Handle BOOLEAN_TYPEs.
5639 * f95-lang.c (g95_truthvalue_conversion): Implement.
5640 * trans-array.c (g95_trans_array_constructor_value): Group multiple
5642 * trans.h (g95_truthvalue_conversion): Declare.
5643 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
5644 * trans-stmt.c (g95_trans_character_select): Don't create array
5645 assignments. Mark labels as indirect jump targets.
5646 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
5647 (g95_get_dtype_cst): Handle LOGICAL types.
5649 2003-06-14 Paul Brook <paul@nowt.org>
5651 * f95-lang.c (g95_gimplify_expr): New function.
5652 * trans-array.c (g95_trans_array_constructor_value): Don't create
5654 (g95_conv_expr_descriptor): Rename simple->gimple.
5655 * trans-expr.c (conv_expr_op): Use proper logical operators.
5656 * trans-intrinsic.c (build_fixbound_expr): New function.
5657 (build_fix_expr): Ditto.
5658 (g95_conv_intinsic_aint): Use them. Use builtin functions.
5659 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
5661 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5663 * array.c (g95_compare_array_spec): Remove unreachable code.
5664 * expr.c (g95_copy_expr): Likewise.
5665 * intrinsic.c (g95_convert_type): Likewise.
5666 * misc.c (g95_code2string): Likewise.
5667 * simplify.c (g95_simplify_ishft, g95_simplify_real,
5668 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
5669 * trans-stmt.c (g95_trans_select): Likewise.
5670 * primary.c (extend_ref): Add an assertion.
5671 * simplify.c (g95_convert_constant): Add const.
5672 * intrinsic.h: Remove g95_check_x_ni.
5673 * f95-lang.c (g95_finish): Call g95_release_include_path.
5675 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5677 * resolve.c (resolve_contained_functions): Fix typo introduced on
5680 2003-06-09 Paul Brook <paul@nowt.org>
5682 * g95.h: Include system.h not hwint.h.
5683 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
5684 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
5686 2003-06-09 Paul Brook <paul@nowt.org>
5688 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
5689 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
5690 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
5691 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
5692 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
5694 * trans.h (g95_trans_equivalence, g95_trans_common,
5695 g95_add_decl_to_function): Declare.
5696 * trans-common.c, trans-equivalence.c: New files.
5698 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
5700 * intrinsic.c (g95_intrinsic_extension): Remove.
5701 (add_functions): Substitute g95_check_x for g95_check_x_ni
5703 (g95_init_expr_extensions): New function.
5704 (g95_intrinsic_func_interface): Use it.
5705 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
5706 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
5707 g95_check_precision, g95_check_present, g95_check_radix,
5708 g95_check_range, g95_check_selected_real_kind): Do not set
5709 g95_intrinsic_extension.
5710 (g95_check_x_ni): Remove now duplicate of g95_check_x.
5712 * expr.c (check_inquiry): Add FIXME, fixup some code style.
5714 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5716 * g95.h (ref_type): Name this type explicitly.
5717 * module.c (MIO_NAME): Add specialisations of mio_name.
5718 (mio_symbol_attribute, mio_typespec, mio_array_ref,
5719 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
5720 (ab_attribute): Name this type explicitly.
5721 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
5723 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
5725 * trans-intrinsic.c (g95_conv_allocated): New function.
5726 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
5728 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
5730 * f95-lang.c: Don't include g95-support.h
5731 (g95_mark_addressable): Add prototype.
5732 (g95_init_decl_processing): Remove C front end hack.
5733 * f95-tree.c: Remove file.
5734 * support.c: Remove file.
5735 * g95-support.h: Remove file.
5736 * trans-types.c (g95_init_types): Set up boolean
5737 type related tree nodes.
5738 * Make-lang.in: Remove rules for dead files and
5739 dependencies on them.
5741 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
5743 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
5744 C front end dependency. Also, convert.c does not depend on
5745 g95-support.h anymore.
5746 * convert.c: Don't include c-common.h and g95-support.h
5747 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
5748 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
5749 stmts_are_full_exprs_p, current_stmt_tree,
5750 current_scope_stmt_stack): Remove.
5751 * g95-support.h (unsigned_conversion_warning): Kill proto.
5752 (boolean_type_node, boolean_true_node, boolean_false_node):
5753 Don't define here. Instead, make then true tree nodes in
5755 * support.c (c_global_trees): Die, C front end, die!!!
5756 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
5757 uintmax_type_node, string_type_node and const_string_type_node.
5758 (decl_constant_value, overflow_warning): Make static functions.
5759 They are in death row too, though.
5760 (default_conversion, c_expand_asm_operands): Remove.
5761 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
5762 trans.c: Don't include c-common.h.
5763 * trans-types.c (boolean_type_node, boolean_true_node,
5764 boolean_false_node): Make them real tree nodes.
5765 * trans-types.h (intmax_type_node, string_type_node,
5766 const_string_type_node): Hack to work around C dependencies
5767 in builtin-types.def.
5769 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5771 * decl.c (decl_types): Add some iterators-like sentinels.
5772 * decl.c (match_attr_spec): Use them.
5773 Use "decl_types" instead of "int".
5774 Add cast in call to g95_match_strings.
5775 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
5777 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
5778 (g95_interface_info): Use "g95_intrinsic_op".
5779 * dump-parse-tree.c (g95_show_namespace): Use them.
5780 * interface.c (g95_check_interfaces): Use them.
5781 * module.c (read_module, write_module): Use them.
5782 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
5783 Use "g95_intrinsic_op".
5784 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
5785 Add a default case in switch statement.
5786 * intrinsic.h (g95_generic_isym_id): Moved to...
5787 * g95.h (g95_generic_isym_id): here.
5788 (g95_intrinsic_sym): Use "g95_generic_isym_id".
5789 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
5790 * trans-intrinsic.c (g95_intrinsic_map_t,
5791 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
5792 * match.c (g95_match_intrinsic_op): Add cast in call to
5795 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
5797 * support.c (skip_evaluation, warn_conversion, lvalue_p,
5798 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
5799 constant_fits_type_p, convert_and_check,
5800 unsigned_conversion_warning): Remove these ugly remnants
5801 we inherited from the C front end.
5802 (function_types_compatible): Remove '#if 0'-edcode.
5803 (build_modify_expr): Likewise.
5804 (convert_for_assignment): Don't use the deceased functions.
5805 The parameter fundecl is now unused.
5806 (decl_constant_value): Always just return decl. In fact
5807 this function is not used at present, but it might be in
5808 the future, when we start using the tree inliner.
5809 (overflow_warning, default_conversion, c_expand_asm_operands):
5810 Abort when these are called, they are part of the C type
5811 checking implementation and therefore poison to Fortran.
5813 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
5815 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
5816 c-pretty-print.o and c-dump.o. Add a comment on why we
5817 depend on c-semantics.c.
5818 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
5819 Don't use the C front end tree dumper hook to dump the
5820 language specific tree representation -- we don't have
5821 one. So instead, inherit the default langhook.
5823 2003-06-02 Paul Brook <paul@nowt.org>
5825 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
5827 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5829 * check.c (g95_check_associated): Use proper types. Remove
5830 extraneous argument in call to g95_error().
5832 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
5834 * resolve.c (resolve_operator): Make logical operands convert to the
5835 type with higher kind.
5837 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
5839 * check.c (g95_check_associated): Make sure both pointer and target has
5840 the same type and rank. Null pointer or array section with vector
5841 subscript as target are not allowed.
5842 * trans.h: Declare gfor_fndecl_associated.
5843 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
5844 gfor_fndecl_associated.
5845 * trans-intrinsic.c (g95_conv_associated): New function.
5846 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
5848 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
5850 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
5851 according to POINTER itself rather than TARGET.
5852 (g95_conv_expr_descriptor): Make lbound start at 1.
5853 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
5855 2003-06-01 Paul Brook <paul@nowt.org>
5857 * expr.c (g95_type_convert_binary): Make it match the standard.
5858 * g95.texi: Remove dead link.
5860 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
5862 * g95.texi: Cleanup somewhat in preparation for inclusion
5865 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5866 Canqun Yang <canqun@yahoo.com.cn>
5868 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
5870 (g95_find_forall_index): Return proper value.
5871 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
5872 compare the return value from g95_find_forall_index.
5874 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5875 * g95.h, io.c (g95_st_label): Remove "length".
5876 (g95_symtree): Remove "link".
5877 (g95_case): Remove "code".
5878 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
5879 g95_convert_real): Make an argument pointer to const.
5880 * decl.c (colon_seen): Add a TODO.
5881 * interface.c (g95_compare_types): Fix typo.
5882 * interface.c (compare_interfaces): Preserve value of "p".
5883 * intrinsic.c (sort_actual): Remove "i".
5884 * match.c (g95_match_assign): Proper type in call to g95_match().
5885 * parse.c (next_free): Avoid duplicate call due to macro.
5886 * parse.c (check_statement_label): wrong type in call to g95_error.
5887 * primary.c (match_real_constant): Add a TODO.
5888 * resolve.c (resolve_select): Remove useless conditional.
5889 * simplify.c (g95_simplify_repeat): Proper assignment to
5890 "value.character.string".
5891 * simplify.c (g95_simplify_reshape): Wrong variable in call to
5894 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
5896 * trans-stmt.c: Remove unnecessary include file defaults.h.
5898 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
5900 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
5902 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
5903 actual variables used as FORALL indexes.
5905 2003-05-15 Paul Brook <paul@nowt.org>
5907 * trans-array.c (g95_trans_static_array_pointer): Use
5909 (g95_trans_deferred_array): Initialize static array pointers.
5910 * trans-expr.c (g95_conv_function_call): Use formal arglist to
5911 correctly pass POINTER and absent CHARACTER arguments.
5913 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
5915 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
5916 (g95_resolve_forall_body): Resolve FORALL body.
5917 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
5918 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
5919 (g95_find_forall_index): Check whether the FORALL index appears in
5920 the expression or not.
5921 (resolve_code): Modified.
5923 2003-05-14 Paul Brook <paul@nowt.org>
5925 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
5927 2003-05-13 Paul Brook <paul@nowt.org>
5929 * trans-types.c (g95_max_array_element_size): Now a tree node.
5930 (g95_init_types): Work out max size properly.
5931 (g95_get_dtype_cst): Modify to match.
5933 2003-05-11 Paul Brook <paul@nowt.org>
5935 * trans-io.c (add_case): Create a label decl for case labels.
5937 2003-05-11 Paul Brook <paul@nowt.org>
5939 * arith.c (g95_integer_index_kind): New variable.
5940 * f95-lang.c (g95_init): Move frontend initialization here ...
5941 (g95_post_options): ... from here.
5942 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
5943 * intrinsic.c (add_functions): Use index kinds.
5944 * iresolve.c: Convert to index_kind where needed.
5945 * resolve.c (g95_resolve_index): Make public, use index_kind.
5946 (resolve_array_ref): Adjust to match.
5947 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
5948 * trans-stmt.c: Ditto.
5949 * trans-types.c: Ditto.
5950 * trans-types.h (g95_array_index_kind): Remove declaration.
5951 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
5953 2003-05-07 Paul Brook <paul@nowt.org>
5955 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
5956 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
5959 2003-05-07 Paul Brook <paul@nowt.org>
5961 * trans-array.c (trans_static_array_pointer,
5962 g95_trans_array_constructor_value, g95_conv_array_initializer,
5963 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
5964 (g95_add_loop_ss_code): Convert subscripts to the correct type.
5965 * trans-stmt.c (g95_trans_character_select): Ditto.
5966 * trans-types.c (g95_init_types): Ditto.
5968 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
5970 * f95-lang.c (expand_function_body): Use input_line, not lineno.
5971 * trans-decl.c (g95_generate_function_code,
5972 g95_generate_constructors): Likewise.
5973 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
5974 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
5977 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
5978 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
5979 with components point to the DERIVED type itself, and two DERIVED
5980 type with components point to each other.
5981 * trans-expr.c (g95_conv_componet_ref): Modified
5983 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
5984 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
5986 (g95_trans_pointer_assign): Implement Nullify.
5988 2003-05-01 Paul Brook <paul@nowt.org>
5990 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
5991 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
5993 2003-05-01 Paul Brook <paul@nowr.org>
5995 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
5996 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
5999 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
6001 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
6004 2003-04-28 Paul Brook <paul@nowt.org>
6006 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
6007 as their kind suggests.
6008 (g95_resolve_reshape): Ditto.
6010 2003-04-28 Chun Huang <compiler@sohu.com>
6012 * trans-expr.c (g95_conv_substring_expr): New function.
6013 (g95_conv_expr): Use it.
6015 2003-04-28 Paul Brook <paul@nowt.org>
6017 * iresolve.c (g95_resolve_transpose): Make it match the
6019 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
6021 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
6023 * trans-types.c (g95_add_field_to_struct): New function to
6024 add a field to a UNION_TYPE or RECORD_TYPE.
6025 * trans-types.h (g95_add_field_to_struct): Prototype.
6026 (g95_get_derived_type): Use g95_add_field_to_struct to add
6028 * trans-io.c (g95_add_field): Remove.
6029 (ADD_FIELD): Use new g95_add_field_to_struct function.
6030 (ADD_STRING): Likewise.
6031 * trans-stmt.c (g95_trans_select): Likewise.
6032 (g95_add_field): Remove duplicated function.
6034 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
6036 Port implementation for CHARACTER SELECT from Andy's tree.
6037 * trans-stmt.c (g95_trans_character_select): Implement character
6038 select. (g95_add_field): New function.
6039 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
6040 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
6041 * g95.h (struct g95_case): Add field 'int n'.
6042 * trans.h: Declare 'gfor_fndecl_select_string'.
6044 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
6046 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
6047 (g95_insert_bbd): Die on duplicates.
6048 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
6050 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
6052 * g95.texi: Require GMP 4.0 -- like we actually
6053 do. Explain the testsuite and what-goes-where.
6054 Don't use undefined texinfo symbol. Break very
6055 long line. Remove finished item from the list
6058 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
6060 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
6063 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
6065 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
6066 (g95_trans_forall_body): New function.
6068 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
6070 * resolve.c (resove_where): New function.
6071 (resolve_where_shape): New function.
6072 (resolve_code): Add call to 'resolve_where'
6073 * trans-stmt.c (g95_trans_where): Modified.
6074 (g95_trans_where_2): New function.
6075 (g95_trans_where_assign): New function.
6076 (g95_evaluate_where_mask): New function.
6077 (g95_add_to_stmt_list): New function.
6078 (g95_get_temp_expr): New function.
6079 * trans.h (where_stmt_list): New structure.
6081 2003-04-10 Paul Brook <paul@nowt.org>
6083 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
6084 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
6086 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
6088 Update after mainline -> tree-ssa-branch merge.
6089 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
6091 (g95_init): Update for new lang_hooks definition.
6092 (g95_post_options): New langhook.
6093 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
6094 * scanner.c (g95_new_file): Comment update.
6096 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6098 * g95.h, lang-options.h: Add -Wimplicit-interface.
6099 * options.c (g95_init_options, g95_parse_arg): Set it.
6100 * interface.c (check_intents): Warn about call with implicit
6102 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
6105 2003-04-05 Paul Brook <paul@nowt.org>
6107 * iresolve.c (g95_resolve_spread): Don't resole based on type.
6108 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
6110 2003-03-29 Paul Brook <paul@nowt.org>
6112 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
6113 (g95_resolve_unpack): Ditto.
6114 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
6115 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
6116 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
6118 2003-03-25 Paul Brook <paul@nowt.org>
6120 * arith.c (g95_unary_user, g95_user): Remove dead functions.
6122 * array.c (g95_free_array_ref): Ditto.
6124 * symbol.c (g95_use_derived_tree): Ditto.
6125 * intrinsic.c (add_functions): Use simplification for SCALE.
6126 * primary.c (g95_match_rvalue): Test sym, not symtree.
6128 2003-03-25 Paul Brook <paul@nowt.org>
6130 * trans-decl.c (build_function_decl): Add parameter before it gets
6131 turned into a constant.
6132 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
6133 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
6134 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
6136 2003-03-22 Paul Brook <paul@nowt.org>
6138 * trans-array.c (g95_conv_array_initializer): Allow scalar
6140 * trans-decl.c (g95_finish_var_decl): Result variables are not
6142 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
6143 (g95_conv_intrinsic_function): Use it.
6144 * trans-types.h (g95_type_spec): Remove dead declaration.
6146 2003-03-21 Paul Brook <paul@nowt.org>
6148 * trans-decl.c (g95_build_function_decl): Mark string parameters.
6150 2003-03-20 Paul Brook <paul@nowt.org>
6152 * trans-decl.c (g95_build_function_decl): Put character length
6153 parameters at the end of the function declaration.
6154 * trans-expr.c (g95_conv_function_call): Ditto.
6155 * trans-types.c (g95_get_function_type): Ditto.
6157 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6159 * resolve.c (resolve_formal_arglist): Don't impose intent for
6160 procedure arguments of pure functions.
6161 (resolve_select): Remove redundant assignment.
6163 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6165 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
6167 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
6168 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
6170 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
6172 * symbol.c (g95_add_type): Fix typo in comment.
6175 2003-03-16 Paul Brook <paul@nowt.org>
6177 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
6178 * expr.c (g95_build_call): Remove.
6179 * f95-lang.c (puchdecl_top_level): New function.
6180 * g95.h (g95_code): Store resolved symbol, not just the name.
6181 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
6182 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
6183 (g95_get_intrinsic_sub_symbol): New function.
6184 * iresolve.c (g95_resolve_cpu_time): Use it.
6185 (g95_resolve_random_number): Ditto.
6186 * resolve.c: Set code->resolved_sym instead of code->sub_name.
6187 * trans-decl.c (g95_get_extern_function_decl): Give external decls
6188 the correct DECL_CONTEXT. Add global symbold to the global scope.
6189 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
6192 2003-03-16 Paul Brook <paul@nowt.org>
6194 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
6195 * options.c (g95_parse_arg): Ditto.
6196 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
6197 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
6198 for the procedure, not the parameter.
6199 * trans-array.c (g95_trans_g77_array): New function.
6200 (g95_trans_assumed_size): Use it.
6201 (g95_trans_dummy_array_bias): Ditto.
6202 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
6203 (g95_conv_expr_descriptor): ... to here. Update callers.
6204 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
6205 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
6206 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
6207 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
6208 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
6209 (g95_sym_type): Ditto.
6211 2003-03-15 Paul Brook <paul@nowt.org>
6213 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
6215 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
6217 2003-03-14 Paul Brook <paul@nowt.org>
6219 * trans-array.c (g95_array_is_packed): Remove.
6220 (g95_conv_array_base): Correctly handle all descriptorless cases.
6221 (g95_conv_array_stride): Use descriptorless strides.
6222 (g95_trans_dummy_array_bias): Don't always repack the array.
6223 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
6225 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
6226 dummy and non-dummy arrays...
6227 (g95_sym_type, g95_get_derived_type): ... like these.
6228 (g95_get_array_type_bounds): Allow discontiguous arrays.
6230 2003-03-12 Paul Brook <paul@nowt.org>
6232 * array.c (g95_resolve_array_spec): Fix comment.
6233 * g95.h (symbol_attributes): New flag always_explicit.
6234 * resolve.c (resolve_formal_arglist): Set it always_explicit.
6235 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
6236 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
6237 (g95_trans_array_bounds): Allow assumed shape arrays.
6238 (g95_trans_repack_array): Remove.
6239 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
6240 * trans-decl.c (g95_build_qualified_array): Only ignore absent
6241 bounds for assumed size arrays.
6242 (g95_build_dummy_array_decl): Use descriptorless arrays.
6243 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
6244 (g95_trans_pointer_assign): Fix typo.
6245 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
6247 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
6248 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
6249 Also modify callers.
6250 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
6252 2003-03-08 Paul Brook <paul@nowt.org>
6254 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
6255 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
6256 * resolve.c (compare_spec_to_ref): Allow full array sections.
6258 2003-03-08 Paul Brook <paul@nowt.org>
6260 * expr.c (g95_simplify_expr): Also simplify array index and
6261 substring expressions.
6262 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
6263 * trans-array.c (g95_trans_array_bounds): New function.
6264 (g95_trans_auto_array_allocation): Use it.
6265 (g95_trans_assumed_size): Rewrite.
6266 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
6267 (gfor_fndecl_repack): Remove.
6268 (g95_build_qualified_array): Handle absent upper bounds.
6269 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
6270 (g95_get_symbol_decl): Update.
6271 (g95_build_intrinsic_function_decls): Initialize new decls.
6272 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
6273 (gfor_fndecl_repack): Remove.
6274 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
6275 * trans-types.c: (g95_build_array_type): Merge duplicated code..
6276 (g95_get_nodesc_array_type): Handle absent bounds.
6277 * trans-types.h (g95_get_nodesc_array_type): Declare.
6279 2003-03-04 Paul Brook <paul@nowt.org>
6281 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
6284 2003-03-02 Paul Brook <paul@nowt.org>
6286 * options.c (g95_init_options): Drfault to 1.
6287 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
6288 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
6289 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
6290 Handle non-constant size automatic arrays.
6291 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
6292 generic bound functions.
6293 (g95_trans_auto_array_allocation): Don't create a descriptor.
6294 (g95_trans_assumed_size): New function (broken).
6295 (g95_trans_dummy_array_bias): Remove unused var.
6296 * trans-array.h (g95_trans_assumed_size): Declare.
6297 * trans-decl.c (create_index_var): New fuction.
6298 (g95_build_qualified_array): New function.
6299 (g95_get_symbol_decl): Use it.
6300 (g95_trans_deferred_vars): Handle assumed shape seperately.
6301 * trans-types.c (get_element_type): Handle heap allocated arrays.
6302 (g95_is_nodesc_array): Include non-const size arrays.
6303 (g95_get_nodesc_array_type): Ditto.
6305 2003-02-23 Paul Brook <paul@nowt.org>
6307 * trans-array.c (g95_array_init_size): Should use stride, not size of
6310 2003-02-18 Paul Brook <paul@nowt.org>
6312 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
6313 after intrinsic function check.
6315 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6317 * io.c (match_io): Fix missing return value and remove useless
6319 * match.c (g95_match): Remove useless assignment.
6320 * module.c (parse_string): Remove useless post increment.
6321 * simplify.c (g95_simplify_verify): Remove useless assignment.
6323 2003-02-15 Paul Brook <paul@nowt.org>
6325 * expr.c (restricted_intrinsic): Handle bad values gracefully.
6326 * g95.h (symbol_attribute): Add referenced member.
6327 (g95_symbol): Add dummy_order member.
6328 (g95_set_sym_referenced): Declare.
6329 * match.c (g95_match_assignment, g95_match_call): Use it
6330 * primary.c (match_actual_arg, g95_match_rvalue,
6331 g95_match_variable): Ditto.
6332 * symbol.c (next_dummy_order): New variable.
6333 (g95_set_sym_referenced): New function.
6334 (check_done): New function.
6335 (g95_add_*): Use it.
6336 * trans-decl.c: Make formatting conform to GCC standards.
6337 (g95_defer_symbol_init): Add dummy variables in the right order.
6338 (g95_get_symbol_decl): Only accept referenced variables.
6339 (g95_create_module_variable): Module variables are always required.
6340 (generatr_local_decls): New function.
6341 (generate_local_vars): New function.
6342 (g95_generate_function_code): Use it.
6344 2003-02-13 Paul Brook <paul@nowt.org>
6346 * trans-decl.c (g95_conv_struct_cons): Remove.
6347 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
6348 * trans-expr.c (g95_conv_structure): New function.
6349 (g95_conv_expr): Use it.
6351 2003-02-09 Paul Brook <paul@nowt.org>
6353 * trans-array.c (g95_array_init_size): Don't evaluate the linit
6354 expressions multiple times.
6355 (g95_trans_auto_arry_allocation): Use pointer not tmp.
6357 2003-02-08 Paul Brook <paul@nowt.org>
6359 * module.c (mio_symtree_ref): Declare as static.
6360 (mio_expr): Remove dead code.
6361 (read_module): Set the symtree link for fixups.
6362 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
6363 (build_round_expr): ... to this.
6364 (g95_conv_intrinsic_aint): New function.
6365 (g95_conv_intrinsic_function): Use it.
6367 2003-02-08 Paul Brook <paul@nowt.org>
6369 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
6370 offset after modificaton, not the increment expression.
6371 * dependency.c: Kill excess whitespace.
6373 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
6375 * dependency.h: Remove some function declarations.
6376 * dependency.c (get_no_of_elements): Change this function not to
6378 * other: Add comments for all modified functions.
6380 2003-02-06 Paul Brook <paul@nowt.org>
6382 * g95spec.c (lang_specific_functions): Fix initializer warning.
6383 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
6384 for structure type names.
6385 * trans-decl.c (g95_cons_structure_cons): New function.
6386 (g95_get_symbol_decl): Use it.
6387 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
6390 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6392 * resolve.c (compare_cases): Add const to casts.
6394 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6396 * g95.h (g95_check_f): Change a1 to f1m.
6397 * intrinsic.c (add_sym_1m, check_specific,
6398 g95_intrinsic_func_interface): Use it.
6400 * module.c (init_pi_tree): Remove useless cast.
6401 (fp2): Fix argument type.
6403 * parse.c (parse_select_block): Add comment.
6405 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
6407 * lang-options.h: Fix warning involving C90 concatenated
6410 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6411 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6413 * io.c (format_asterisk): Complete initializer to kill warning.
6414 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
6415 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
6416 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
6417 new defines to complete initializers. Kills all warnings.
6419 * Make-lang.in: Comment cleanup.
6421 2003-02-05 Paul Brook <paul@nowt.org>
6423 * array.c (g95_free_constructor): Handle NULL expressions.
6424 * resolve.c (resolve_structure_cons): Ditto.
6425 * decl.c (g95_match_null): New Function.
6426 (variable_decl): Use it.
6427 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
6428 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
6429 * trans-types.c (g95_set_decl_attributes): Remove empty function.
6431 2003-02-05 Paul Brook <paul@nowt.org>
6433 * trans.h (build1_v): New macro.
6434 (build_v): Remove pointless and incorrect prototype.
6435 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
6436 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
6438 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
6440 * Make-lang.in (F95_OBJS): Remove one more dead file.
6442 2003-02-01 Paul Brook <paul@nowt.org>
6444 * lang-specs.h: Don't pass -ffixed-form to the linker.
6445 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
6447 2003-02-01 Paul Brook <paul@nowt.org>
6449 * Make-lang.in (F95_OBJS): Remove dead files.
6450 * trans-array.c (g95_array_init_size): Do the right thing when
6452 * trans-decl.c (g95_generate_function_code): Initialize deffered
6453 symbol list before translating contained subroutines.
6454 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
6455 scalar invariant values here...
6456 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
6457 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
6459 2003-01-29 Paul Brook <paul@nowt.org>
6461 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
6462 (g95_walk_elemental_function_args): Reverse chains before adding.
6463 (g95_reverse_ss): Move about a bit.
6464 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
6467 2003-01-28 Paul Brook <paul@nowt.org>
6469 * intrinsic.c (resolve_intrinsic): Use correct union member.
6470 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
6472 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
6473 use associated variables.
6474 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
6475 * trans-expr.c (g95_conv_expr_present): ... to here.
6476 * trans.h: Declare it.
6477 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
6479 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6481 * array.c (expand_iterator): Suppress useless assignment.
6482 * decl.c (match_char_spec): Ditto.
6483 * io.c (match_io_iterator): Ditto.
6484 * primary.c (match_real_constant): Ditto.
6485 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
6486 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
6487 * matchexp.c (match_add_operand, match_level_5): Likewise.
6488 * module.c (parse_atom, find_enum): Likewise.
6489 * resolve.c: move #include <string.h>
6490 (resolve_select): Fix serious typo.
6492 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
6494 * Make-lang.in: Don't build with broken tree-ssa-pre.
6496 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
6498 * resolve.c (resolve_index): Add a TODO.
6499 * symbol.c: Remove useless "#include <ctype.h>".
6501 2003-01-27 Paul Brook <paul@nowt.org>
6503 * check.c (check_rest): Allow different type kinds as an extension.
6504 * g95.h (g95_resolve_f): Add f1m.
6505 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
6506 * intrinsic.h: Chenge prototypes for MIN and MAX.
6507 * iresolve.c (g95_resolve_minmax): New function.
6508 (g95_resolve_min, g95_resolve_max): Use it.
6509 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
6511 (g95_conv_intrinsic_present): Fix logic.
6513 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
6515 * g95.h (g95_case): Don't be a tree, be a double linked list.
6516 * match.c (match_case_selector): Remove redundant semantics check.
6517 Clean up a few goto's to make it a tiny little bit faster.
6518 * resolve.c (case_tree): Die.
6519 (compare_cases): Accept and compare unbounded cases too.
6520 (check_case_overlap): Don't build a tree. Instead, merge-sort the
6521 whole list of g95_cases passed from resolve_select.
6522 (sane_logical_select): Die.
6523 (check_case_expr): Return FAILURE if a CASE label is of the wrong
6525 (resolve_select): Fixup case expression for computed GOTOs, put it
6526 in expr, not expr2, for easier handing in the parse tree dumper and
6527 the code generator. Rewrite the rest of the function: Kill
6528 unreachable case labels and unreachable case blocks.
6529 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
6530 an EXEC_SELECT, not case2 anymore.
6531 * trans-const.c (g95_conv_constant_to_tree): New function.
6532 (g95_conv_constant): Use it.
6533 * trans-const.h: Declare prototype for the new function.
6534 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
6535 g95_trans_character_select): New static functions.
6536 (g95_trans_select): Rewrite.
6538 2003-01-26 Paul Brook <paul@nowt.org>
6540 * intrinsic.c (add_fnctions): Properly add dreal.
6541 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
6542 (g95_conv_intrinsic_function): Use it.
6543 * trans-io.c (build_dt): Abort on internal files (unimplemented).
6545 2003-01-26 Paul Brook <paul@nowt.org>
6547 Widespread changes to the handling of symbols in expressions. These
6548 are now linked via g95_symtree nodes.
6549 * parse.c (g95_fixup_sibling symbols): New function.
6550 (parse_contained): Use it.
6551 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
6552 contained procedure that has bee correctly fixed up.
6553 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
6555 2003-01-24 Paul Brook <paul@nowt.org>
6557 * trans-array.c (g95_walk_expr): Function result attributes are in
6559 * trans-expr.c (g95_conv_function_call,
6560 g95_trans_arrayfunc_assign): Ditto.
6561 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
6563 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
6565 * expr.c (check_restricted): Fix error message.
6566 * symbol.c (free_st_labels): Plug memleak.
6568 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
6570 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
6571 reduce_binary_aa, reduce_binary, eval_intrinsic,
6572 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
6573 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
6574 for typesafe intrinsics helper functions.
6575 (g95_intrinsic_sym): Use them.
6576 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
6577 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
6578 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
6579 check_specific, g95_intrinsic_func_interface,
6580 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
6582 * trans-decl.c (g95_get_extern_function_decl): Likewise.
6583 * Make-lang.in: Don't disable warnings for strict prototypes
6584 any longer, everything is typesafe now.
6586 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
6588 * bbt.c (duplicate_node): Make static.
6589 * module.c (module_name): Make static.
6590 * scanner.c (include_dirs): Make static.
6592 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
6594 Hard coded _gfor_'s should not show up anymore.
6595 * g95.h (PREFIX): New macro.
6596 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
6598 (g95_resolve_random_number): Likewise.
6599 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
6600 * trans-io.c: Remove 'prefix' macro. Replace all uses with
6601 the new PREFIX macro from g95.h.
6603 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
6605 The troubles of forking... Andy implemented this just now too.
6606 Let's stick to that and keep the trees close.
6607 * g95.h (g95_st_label): 'format' member is now a g95_expr.
6608 * io.c: Revert previous changes.
6609 (g95_match_format): Match the format string as a character
6611 * match.h (g95_statement_label): Declare external.
6612 * parse.c: Revert previous changes.
6613 * symbol.c (g95_free_st_label): Free a g95_expr instead
6615 * trans-io.c: Revert previous changes.
6616 (build_dt): Use set_string to set the format string.
6618 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
6620 * io.c (format_string): Make non-static.
6621 (g95_match_format): Remember the format string.
6622 (terminate_io): Add I/O termination for empty I/O lists.
6623 * match.h: Declare external format_string.
6624 * parse.c (check_statement_label): Attack the format string
6625 to a format label for FORMAT statements.
6626 * trans-io.c (g95_add_field): Define prefix macro. Replace
6627 all uses of PREFIX define with a use of this macro.
6628 (build_dt): Implement formatted I/O for format labels.
6630 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
6632 * lang-options.h: Kill "-std=F".
6633 * options.c: Remove unimplemented "-std=F". Modify
6635 * misc.c (g95_terminal_width): New function.
6636 * error.c (g95_error_init_1): Use g95_terminal_width.
6637 * g95.h: Add prototype for g95_terminal_width, remove
6640 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
6642 * Make-lang.in: Fix typo.
6644 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
6646 * g95.h (struct g95_case): Remove unused cruft, new member
6647 'where' to keep track of the locus of the default case.
6648 * match.c (g95_match_case): Add locus to the current case.
6649 (match_case_selector): Likewise.
6650 * parse.c (parse_select_block): Move semantics check for
6651 multiple DEFAULT cases out of here to...
6652 * resolve.c (check_case_overlap): ...here. Return sooner
6654 (check_case_expr): Take two g95_cases now, use to sure the
6655 expression kinds are the same.
6656 (resolve_select): Cleanup.
6658 2003-01-18 Paul Brook <paul@nowt.org>
6660 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
6661 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
6663 (g95_get_extern_function_decl): Put decls in the correct context.
6665 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
6667 * trans-io.c: Port changes from Andy to set ERR flag.
6669 2003-01-17 Paul Brook <paul@nowt.org>
6671 * trans-array.c: Add various comments.
6672 (g95_ss_terminator): Declare as const.
6673 (g95_walk_expr): Remove first parameter and update all callers.
6674 (g95_walk_op_expr): Initialize scalar SS properly.
6675 * trans-array.h (g95_walk_expr): Update prototype.
6676 * trans-expr.c: Update for new g95_walk_expr.
6677 * trans-intrinsic.c: Ditto.
6678 * trans-io.c: Ditto.
6679 * trans.h: Various comments for SS chains.
6681 2003-01-17 Paul Brook <paul@nowt.org>
6683 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
6685 * intrinsic.c (add_functions): Use them.
6686 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
6687 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
6689 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
6691 Fallout of a small merge conflict:
6692 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
6694 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
6696 * initrinsic.c: New add_sym_* functions for strong typing.
6697 (add_conv): Make prototype strict.
6698 * dump-parse-tree.c, dependency.c: Include config.h
6699 * resolve.c, trans-io.c: Fix typos.
6701 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
6703 * dump-parse-tree.c (g95_show_code_node): Show the
6704 condition for a computed GOTO that was transformed
6705 to a SELECT CASE construct.
6706 * resolve.c (check_case_overlap): Revert previous switch
6707 to treaps, it was too slow and didn't catch all trouble.
6708 (resolve_symbol): Be more flexible about module procedures.
6709 * symbol.c (check_conflict): Point to relevant section in
6710 the standard for dubious conflict. Allow procedure
6711 dummy arguments to be optional again.
6712 * trans-io (add_field): Rename to g95_add_field. Change
6714 * trans-stmt (trans_select): Handle unbounded cases for
6715 integer SELECT CASE constructs. Fix/add more comment.
6717 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
6719 * g95.h: Uses GCC's function attribute macros.
6720 * error.c, module.c, parse.c, g95.h: More function attributes.
6722 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
6724 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
6725 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
6728 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
6730 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
6732 * trans.c (g95_trans_code): Use annotate_all_with_file_line
6733 instead of nowdead wrap_all_with_wfl.
6735 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
6737 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
6738 before generating code, so we can still see it even if the code
6739 generation phase dies.
6741 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
6743 * decl.c (build_sym): Split out initialization expression parts...
6744 (add_init_expr_to_sym): ...to here.
6745 (variable_decl): Add the symbol following an attribute list to the
6746 symbol tree before parsing the optional initialization expression
6747 if the symbol is not of a derived type.
6748 * primary.c (g95_match_rvalue): Don't assume a symbol always has
6749 a value if it is a PARAMETER.
6751 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
6753 * misc.c: Don't #include <mcheck.h>
6754 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
6755 ever was a glibc bug, then either this was never reported to
6756 glibc people, or it has been fixed for so long that there's
6757 no information you can find about it, anywhere.
6759 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
6762 * module.c (attr_bits, bt_types, array_spec_types):
6763 Switch 'const' and 'static'.
6764 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
6766 GNU'ify source code:
6767 * trans-io.c: Numerous fixes, one fixed warning and a few
6768 TODO markers so that we don't forget about them.
6770 2003-01-13 Paul Brook <paul@nowt.org>
6772 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
6773 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
6775 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
6776 * match.c (g95_match_stop): Fix dumb == -> != error.
6778 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
6780 * dump-parse-tree.c (show_indent): Add line breaks. This
6781 whole dumping process needs cleanups.
6782 * f95-lang.c (g95_mark_addressable): Fix prototype to match
6783 the langhook. Fix 'return's accordingly.
6784 * g95-support.h: Adjust prototype.
6785 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
6786 * lang-options.h: Add '-fsyntax-only'.
6787 * options.c (g95_init_options): Init 'no_backend'.
6788 (g95_parse_arg): Deal with '-fsyntax-only'.
6789 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
6792 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
6794 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
6795 arguments. Also make sure that if a symbol is marked INTRINSIC,
6796 an intrinsic with the symbol's name actually exists.
6797 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
6798 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
6799 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
6801 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
6803 * resolve.c (resolve_contained_functions): Fix condition, don't
6804 throw internal_error if a child namespace has no name. Apparently
6805 this can be the case?
6807 2003-01-11 Paul Brook <paul@nowt.org>
6809 Port changes from Andy's tree:
6810 * g95.h (g95_code): Add stop_code.
6811 * match.c (g95_match_stop): Detter syntax checking.
6812 * resolve.c (resolve_generic_f0): Return match type.
6813 (resolve_generic_f): Remove dead/duplicated code.
6814 (resolve_specific_f): Ditto.
6815 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
6816 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
6817 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
6819 2003-01-11 Paul Brook <paul@nowt.org>
6821 * trans-array.c: Various documentation/comment changes.
6822 * trans-stmt.c: Ditto.
6825 2003-01-10 Paul Brook <paul@nowt.org>
6827 * options.c/h: Add -fdump-parse-tree as alias of -v.
6829 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6831 * dump-parse-tree.c (g95_show_namespace): Fixed another
6832 typo. Sorry, it's Friday...
6834 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6837 * trans-array.c, trans-array.h, trans.c, trans-const.c,
6838 trans-const.h, trans-decl.c, trans-expr.c, trans.h
6839 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
6840 trans-types.c: Fix bogus copyright years, add 2003.
6841 * trans-types.h: Give copyright header.
6843 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6845 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
6846 * expr.c, options.c, scanner.c: Add some more 'const' markers.
6847 * intrinsic.c: Some constant strings moved to read-only memory.
6848 * io.c (format_asterisk): Move to...
6851 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6853 * dump-parse-tree.c (g95_show_namespace): Dump implicit
6854 types for ranges instead of per-letter. Indent the
6855 'CONTAINS' just like everything else.
6856 * resolve.c (resolve_contained_functions): Clarify comment.
6857 Explain non-obvious conditional expression. Improve
6858 diagnostics if tyoe cannot be resolved.
6859 Port semi-fix from Andy's tree:
6860 (was_declared): Move up before first use.
6861 (generic_sym, specific_sym): New functions. Code moved
6862 out if procedure_kind.
6863 (procedure_kind): Simplify using new functions.
6864 (resolve_generic_f): Make sure the functions we find in
6865 a parent namespace is generic.
6866 (resolve_specific_f): Ditto for specific functions.
6868 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6870 * trans-stmt.c, trans.c: Fix some code style issues. Add
6871 some more comment (but still not enough!).
6873 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6875 * symbol.c (flavors, procedures, intents, acces_types,
6876 access_types, ifsrc_types): Make const.
6877 * misc.c (g95_string2code): Make 'm' param 'const'.
6878 * module.c (find_enum, write_atom, mio_name): Make
6880 (attr_bits, bt_types, array_spec_types, array_ref_types,
6881 ref_types, expr_types): Make const.
6882 * g95.h: Adjust external decls.
6884 2003-01-09 Paul Brook <paul@nowt.org>
6886 * Testsuite: Add a load of new cases.
6888 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
6890 * Make-file.in: Add dependency on back end header files;
6891 a parallel build should work now.
6892 * f95-lang-c (lang_identifier): Remove bogus comment.
6893 (g95_be_parse_file): Fix prototype.
6894 (g95_init): Make static.
6895 (g95_finish): Make static.
6896 * error.c (g95_syntax_error): Kill. Make define in...
6897 * g95.h (g95_syntax_error): Define.
6898 (g95.options): Make 'source' member 'const'.
6899 * interface.c (g95_match_interface): Explain
6900 hard-to-read condition.
6901 (g95_match_end_interface): Ditto.
6902 * trans_const.c (g95_build_string_const): Make 's' parameter
6904 * trans_const.h: Adjust protoype accordingly.
6905 * trans-decl.c: Include tree-dump.h
6906 (g95_generate_function_code): Build fixes for recent changes
6907 in the tree-ssa branch.
6909 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
6911 * format.c: Kill, move code from here...
6913 * Make-lang.in: Adjust.
6916 * BUGS: Mention where to submit bugs. Move old content...
6917 * TODO: ...to here. New file.
6919 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
6920 Fix most warnings, and suppress the ones we can't fix for now.
6921 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
6922 these warnings just clutter the screen and there's not much
6923 we can do about them for now anyway.
6924 * check.c, iresolve.c: Mark unused function parameters.
6925 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
6926 they should be resolved before they get here.
6927 * error.c: Remove unused FILE *status_out.
6928 * f95-lang.c (g95_init): Remove bogus cast.
6929 * Many files: Make things 'const' where required.
6930 * g95.h: Fix prototypes for all modified functions above.
6931 (g95_options): Remove 'object' member.
6933 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
6935 * Make-file.in: Cleanup bogus targets. Add more comment.
6936 * lang-options.h: New option '-w'.
6937 * g95.h: add no_options field to struct g95_options.
6938 * options.c (g95_init_options): Default no_warnings to off.
6939 (g95_parse_arg): Recognise the '-w' switch and its alias,
6941 * error.c (g95_warning, g95_warning_now): Don't emit warning if
6942 no_warning option is set.
6943 * iresolve.c (g95_resolve_shape): Fix warning.
6945 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
6947 * primary.c (g95_next_string_char): Rename next_string_char, and
6948 make static. Adjust callers accordingly.
6949 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
6950 callers accordingly.
6951 * g95.h: Split out all g95_match* functions to...
6952 * match.h: ...here. New file.
6953 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
6954 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
6956 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
6958 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
6959 g95_merge_new_implicit): New functions.
6960 (g95_match_implicit_none, g95_match_implicit): Move from here...
6961 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
6962 Modify to use the new functions in symbol.c.
6963 * g95.h: Add and move prototypes.
6965 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6967 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
6968 node compare function.
6969 (g95_insert_bbt): Likewise.
6970 (g95_insert_bbt_with_overlap): Likewise.
6971 (g95_delete_bbt): Likewise.
6972 (delete_treap): Likewise. Also fix a potential bug when calling it.
6973 * module.c (compare_pointers): Change proto to compare_fn.
6974 (compare_integers): Likewise.
6975 (compare_true_names): Likewise.
6976 (find_true_name): Adjust call to compare_true_names to match proto.
6977 (require_atom, write_atom, mio_name): Fix 'const' warnings.
6978 (init_pi_tree): Make compare a compare_fn instead of (int *).
6979 * resolve.c (compare_cases): Change proto to compare_fn.
6980 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
6981 it static, and rename to compare_symtree.
6982 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
6984 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
6985 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
6987 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6988 * Make-lang.in: Fix spaces/tabs issues from previous patch.
6989 * patch.options: Blow away Paul's checkin mistake :-)
6990 * io.c (terminate_io): Fix memory leak (Arnaud).
6992 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6994 * Make-lang.in: Teach about building DVI, info manual.
6995 * g95.texi: New file.
6997 2003-01-02 Paul Brook <paul@nowt.org>
6999 * trans-array.c (g95_reverse_ss): Make static and don't use.
7000 (g95_conv_ss_descriptor): Don't use g95_loopinfo
7001 (g95_conv_array_parameters): Modify for pointer assignments.
7002 (g95_walk_subexpr): New function.
7003 (g95_walk_expr*): Use it.
7004 * trans-array.h (g95_reverse_ss): Remove prototype.
7005 * trans-expr.c (g95_trans_pointer_assign): Implement.
7006 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
7007 * trans-intrinsic.c: Sync with scalarizer changes.
7008 * trans-io.c: Ditto.
7010 2002-12-29 Paul Brook <paul@nowt.org>
7012 * trans-array.c: Document calling convention for arrays.
7014 2002-12-19 Paul Brook <paul@nowt.org>
7016 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
7017 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
7018 optional parameters for some intrinsics.
7019 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
7020 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
7021 optional parameters.
7022 * trans.h (g95_se): Add ignore_optional flag.
7024 2002-12-15 Paul Brook <paul@nowt.org>
7026 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
7027 * trans-decl.c (g95_generate_function_code): Use TDI_original.
7029 2002-12-14 Paul Brook <paul@nowt.org>
7031 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
7033 2002-12-12 Paul Brook <paul@nowt.org>
7035 * trans-array.c (g95_trans_array_constructor_subarray): Fully
7036 initialize the scalarizer.
7037 (various): Update to new format of g95_expr->value.constructor.
7039 2002-12-08 Paul Brook <paul@nowt.org>
7041 * trans-array.c (g95_put_offset_into_var): New function.
7042 (g95_trans_array_constructor_subarray): New function.
7043 (g95_trans_array_constructor_value): Use it.
7044 (g95_array_cons_size): Don't abort() on array components.
7046 2002-12-08 Paul Brook <paul@nowt.org>
7048 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
7049 * support.c: Update #includes.
7050 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
7051 * trans-array.c: Update #includes.
7053 * trans-const.c: Ditto.
7054 * trans-io.c: Ditto.
7055 * trans-types.c: Ditto.
7056 (g95_init_types): Set size_type_node.
7057 * trans-decl.c: Update #includes.
7058 (gfor_fndecl_adjust{l,r}): Declare and initialize.
7059 * trans-stmt.c: Update #includes.
7060 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
7061 (g95_trans_select): Fix check for unbounded ranges.
7062 * trans-expr.c: Update #includes.
7063 (g95_conv_string_tmp): New function.
7064 (g95_conv_concat_op): Use it.
7065 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
7066 * Trans-intrisic.c: Update #includes.
7067 (g95_conv_intrinsic_strcmp): New function.
7068 (g95_conv_intrinsic_adjust): Ditto.
7069 (g95_conv_intrinsic_function: Use them.
7071 2002-11-30 Paul Brook <paul@nowt.org>
7073 * trans-array.c (g95_walk_function_expr): Handle non-array return by
7075 * trans-dec.c (g95_build_function_decl): Handle character return
7077 (g95_get_fake_result_decl): Ditto.
7078 (g95_trans_deferred_vars): Ditto.
7079 * trans-expr.c (g95_conv_function_call): Ditto.
7080 (g95_trans_arrayfunc_assign) Limit to array valued functions.
7081 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
7082 (g95_conv_intrinsic_function): Use it.
7083 * trans-types.c (g95_sym_type): Handle functions returning strings.
7084 (g95_return_by_reference): Ditto.
7085 (g95_get_function_type): Ditto.
7087 2002-11-18 Paul Brook <paul@nowt.org>
7089 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
7090 requires a temporary.
7091 (g95_trans_select): Handle computed gotos.
7092 * trans-types.c (g95_build_array_type): Warn about non-functional
7093 assumed shape arrays.
7094 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
7096 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
7097 (g95_conv_intrinsic_int): New function.
7098 (g95_conv_intrinsic_mod): New function.
7099 (g95_conv_intrinsic_ichar): New function.
7100 (g95_conv_intrinsic_function): Use them.
7101 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
7103 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
7105 * trans-types.c (g95_build_array_type): Assumed
7106 sized arrays can have rank > 1.
7107 * trans.c (g95_trans_code): Remove erroneous
7108 warning about CONTINUE.
7109 * trans-expr.c (g95_conv_variable): Remove
7112 2002-11-15 Paul Brook <paul@nowt.org>
7114 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
7116 2002-10-31 Paul Brook <paul@nowt.org>
7118 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
7119 * trans-expr.c (g95_conv_component_ref): Handle character string
7121 (g95_conv_string_parameter): Ditto.
7122 * trans-types.c (g95_get_derived_type): Add length decl to caracter
7125 2002-10-10 Paul Brook <paul@nowt.org>
7127 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
7128 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
7130 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
7131 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
7132 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
7133 * trans-types.c (pvoid_type_node): Declare and initialize.
7134 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
7135 (g95_array_allocate): Fix when base==data.
7136 (g95_conv_array_parameter): Correctly handle reduced rank sections.
7137 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
7139 2002-10-09 Paul Brook <paul@nowt.org>
7141 * (g95_conv_expr_reference): Handle character strings correctly.
7143 2002-10-07 Paul Brook <paul@nowt.org>
7145 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
7147 * trans-array.c (g95_build_array_initializer): Remove.
7148 (g95_conv_array_initializer): New Function.
7149 (g95_trans_auto_arry_allocation): Cleanup.
7150 (g95_trans_init_character_array): Remove.
7151 * g95spec.c: Link in libgforbegin.
7152 * trans.c (g95_generate_code): Rename main function to MAIN__.
7153 (g95_create_var): New function.
7154 (g95_create_var_np): New function.
7155 (g95_evaluate_now): New function.
7156 (g95_start_block): New function.
7157 (g95_finish_block): New function.
7158 (g95_add_expr_to_block): New function.
7159 (g95_add_block_to_block): New function.
7160 * trans-expr.c (g95_conv_componen_ref): New function.
7161 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
7162 (F95_OBJS): Add dependency.o.
7163 * f95-lang.c (g95_is_simple_stmt): Remove.
7164 * f95-tree.c (mark_not_simple): New function.
7165 (unshare_all_trees): New function.
7166 (create_tmp_var, create_tmp_alias_var): Remove.
7167 * support.c (declare_tmp_vars, tree_last_decl): Remove.
7168 * trans*: Convert to new IR using GENERIC trees. Don't bother about
7169 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
7171 2002-10-01 Paul Brook <paul@nowt.org>
7173 * trans-array.c: Add support for descriptorless arrays.
7174 (g95_conv_array_data): New function.
7175 (g95_conv_array_base): New function.
7176 * trans-array.h: Declare these here.
7177 * trans-decl.c(g95_create_mopdule_variable): Perform variable
7178 initialization and creation here.
7179 (g95_create_module_vars): Instead of here.
7180 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
7181 * trans-intrinsic.c: Ditto.
7182 * trans-types.c (g95_is_nodesc_array): New function.
7183 (g95_get_nodesc_array_type): New function.
7184 (g95_sym_type, g95_get_derived_type): Use them.
7185 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
7187 2002-09-28 Paul Brook <paul@nowt.org>
7189 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
7190 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
7193 2002-09-24 Paul Brook <paul@nowt.org>
7195 * f95-lang.c (listify): Remove declaration.
7196 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
7198 * f95-tree.c (get_name): New function.
7199 * trans.c (module_namespace): Remove.
7200 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
7201 * trans-types.c: Ditto.
7203 2002-09-19 Paul Brook <paul@nowt.org>
7205 * trans-array.c (g95_get_array_cons_size): New Function.
7206 (g95_con_ss_startstride): Handle Array constructors.
7207 (g95_conv_loop_setup): Ditto.
7208 (g95_conv_array_parameter): Ditto.
7209 * tras-decl.c (g95_finish_var_decl): Make initializes variables
7212 2002-09-19 Paul Brook <paul@nowt.org>
7214 * trans.c (g95_simple_fold_tmp): Detect variables inside
7216 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
7218 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
7220 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
7222 2002-09-14 Paul Brook <paul@nowt.org>
7224 * trans.c (g95_create_module_variable): Move to trans-decl.c.
7225 * trans-const.c (g95_conv_string_init): New Function.
7226 * trans-const.h: Declare it.
7227 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
7228 variables. Don't bail on intrinsic symbols.
7229 (get_extern_function_decl): Handle specific intrinsic functions.
7230 * trans-types.c (g95_sym_type): Dummy functions don't return
7232 * trans-array.c (g95_build_array_initializer): New Function.
7233 (g95_trans_auto_array_allocation): Build initializer for static decls.
7234 Don't use mpz_addmul, it's GMP4 only.
7236 2002-09-12 Paul Brook <paul@nowt.org>
7238 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
7239 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
7240 assembler names for module procedures.
7242 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
7244 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
7247 2002-09-10 Paul Brook <paul@nowt.org>
7249 * trans-array.c: Change format of G95_SS_TEMP strictures.
7250 (g95_check_fncall_dependancy): New function.
7251 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
7253 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
7255 (g95_build_function_decl): Don't assume result arrays are packed.
7256 (g95_trans-deferred-vars): Handle array result variables.
7257 (g95_generate_fuction_code): Clear saved_function_decls.
7258 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
7260 (g95_trans_arrayfunc_assign): New function.
7261 (g95_trans_assignment): Use it.
7262 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
7263 (g95_se): Add direct_byref.
7264 * trans-types.c: Use sym->result rather than sym where appropriate.
7265 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
7266 Update other functions to use this.
7267 (g95_is_intrinsic_libcall): New function.
7268 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
7269 (g95_walk_intrinsic_function): Ditto.
7271 2002-09-08 Paul Brook <paul@nowt.org>
7273 * trans-types.c: Change rank field to dtype field in array descriptor.
7274 * trans-array.c: Implement filling of dtype array descriptor field.
7275 * trans-intrinsic.c: Fix broken LEN intrinsic.
7277 2002-09-07 Paul Brook <paul@nowt.org>
7279 * trans-intrinsic.c: Remove outdated todo intrinsic list.
7280 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
7281 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
7283 2002-09-06 Paul Brook <paul@nowt.org>
7285 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
7286 (gt-f95-trans-types.h): Add dependancy information.
7287 * config-lang.in (gtfiles): Add trans-types.c
7288 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
7289 back to top-level code.
7290 * trans-array.c, trans-types.c: Change format of array descriptor.
7291 (g95_conv_descriptor_dimension): New function.
7292 * trans-types.h (g95_conv_descriptor_rank): define.
7293 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
7296 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
7298 * trans-array.c, trans-types.c: Add rank information to descriptor.
7300 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
7302 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
7304 2002-09-04 Paul Brook <paul@nowt.org>
7306 * f95-lang.c (g95_create_decls): New function.
7307 (g95_init): Move initialization of external decls to above, and call
7308 from g95_be_parse_file.
7309 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
7310 * trans-types.c (g95_init_types): Always name integer and char types.
7311 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
7313 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
7315 * Make-lang.in: Add options.c to F95_PARSER_OBJS
7317 2002-09-02 Paul Brook <paul@nowt.org>
7319 * g95_generate_code: Clear the attr for __fortran_main.
7320 * trans-types.c (g95_finish_type): New function.
7321 * g95_init_io_state_type: Use g95_finish_type.
7322 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
7324 2002-09-01 Paul Brook <paul@nowt.org>
7326 * README.backend: Warn about the dangers of extra config.h files.
7327 Remove obsolete libgfor stuff.
7328 * config-lang.in: Add target-libgfor dependancy.
7329 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
7331 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
7333 * g95_conv_mpz_to_tree: Free storage pointed to by q,
7336 2002-08-30 Paul Brook <paul@nowt.org>
7338 * trans-intrinsic.c (g95_conv_intrinsic_function,
7339 g95_walk_intrinsic_function): Added ANY and ALL.
7340 (g95_conv_intrinsic_anyall): New function.
7341 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in